import * as i0 from '@angular/core'; import { InjectionToken, SkipSelf, AfterContentInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit, AfterViewChecked, QueryList, ChangeDetectorRef, OnChanges, SimpleChanges, ViewContainerRef, DoCheck, OnInit, ModelSignal, InputSignal, Renderer2, Injector } from '@angular/core'; import * as i1 from '@angular/cdk/platform'; import { Platform } from '@angular/cdk/platform'; import * as i3 from '@angular/cdk/a11y'; import { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y'; import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, ValidatorFn, NgControl } from '@angular/forms'; import { NxFormfieldComponent, NxFormfieldControl, NxFormfieldUpdateEventType } from '@aposin/ng-aquila/formfield'; import { NxAbstractControl } from '@aposin/ng-aquila/shared'; import { Subject, Observable } from 'rxjs'; import { Directionality } from '@angular/cdk/bidi'; import * as i2 from '@angular/cdk/overlay'; import { Overlay, ScrollStrategy } from '@angular/cdk/overlay'; import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import * as i1$1 from '@angular/common'; import * as i4 from '@aposin/ng-aquila/icon'; /** Base class for all adapter implementations */ declare abstract class NxDateAdapter { protected locale: string; protected readonly _localeChanges: Subject; /** * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date. * This method is used to generate date strings that are compatible with native HTML attributes * such as the `min` or `max` attribute of an ``. * @param date The date to get the ISO date string for. * @returns The ISO date string date string. */ abstract toIso8601(date: D): string; /** * Formats a date as a string according to the given format. * @param date The value to format. * @param displayFormat The format to use to display the date as a string. * @returns The formatted date string. */ abstract format(date: D, displayFormat: any): string; /** * Parses a date from a user-provided value. * @param value The value to parse. * @param format The expected format of the value being parsed. * @param strict Whether strict parsing should be used (if supported). * @returns The parsed date. */ abstract parse(value: any, format: string | string[], strict: boolean): D | null; /** * Checks whether the given date is valid. * @param date The date to check. * @returns True if the date is valid. */ abstract isValid(date: D): boolean; /** * Clones the given date. * @param date The date to clone. * @returns A new date equal to the given date. */ abstract clone(date: D): D; /** * Checks whether the given object is considered a date instance by this DateAdapter. * @param obj The object to check. * @returns True if the object is a date instance. */ abstract isDateInstance(obj: any): boolean; /** * Checks whether the given date is valid. * @param date The date to check. * @returns True if the date is valid. */ abstract invalid(): D; /** * Gets the year component of the given date. * @param date The date to extract the year from. * @returns The year component. */ abstract getYear(date: D): number; /** * Gets the month component of the given date. * @param date The date to extract the month from. * @returns The month component (0-indexed, 0 = January). */ abstract getMonth(date: D): number; /** * Gets the date of the month component of the given date. * @param date The date to extract the date of the month from. * @returns The month component (1-indexed, 1 = first of month). */ abstract getDate(date: D): number; /** A stream that emits when the locale changes. */ get localeChanges(): Observable; /** * Attempts to deserialize a value to a valid date object. This is different from parsing in that * deserialize should only accept non-ambiguous, locale-independent formats (e.g. an ISO 8601 * string). The default implementation does not allow any deserialization, it simply checks that * the given value is already a valid date object or null. The `` will call this * method on all of its `@Input()` properties that accept dates. It is therefore possible to * support passing values from your backend directly to these properties by overriding this method * to also deserialize the format used by your backend. * @param value The value to be deserialized into a date object. * @returns The deserialized date object, either a valid date, null if the value can be deserialized into a null date (e.g. the empty string), or an invalid date. */ deserialize(value: any): D | null; /** * Checks if two dates are equal. * @param first The first date to check. * @param second The second date to check. * @returns True if the two dates are equal. Null dates are considered equal to other null dates. */ sameDate(first: D | null, second: D | null): boolean; /** * Compares two dates. * @param first The first date to compare. * @param second The second date to compare. * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier, a number greater than 0 if the first date is later. */ compareDate(first: D, second: D): number; /** * Sets the locale used for all dates. * @param locale The new locale. */ setLocale(locale: string): void; /** Returns the current set locale of the adapter. */ getLocale(): string; /** * Gets the name for the year of the given date. * @param date The date to get the year name for. * @returns The name of the given year (e.g. '2017'). */ abstract getYearName(date: D): string; /** * Creates a date with the given year, month, and date. Does not allow over/under-flow of the * month and date. * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989). * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11. * @param date The date of month of the date. Must be an integer 1 - length of the given month. * @returns The new date, or null if invalid. */ abstract createDate(year: number, month: number, date: number): D; /** * Gets the number of days in the month of the given date. * @param date The date whose month should be checked. * @returns The number of days in the month of the given date. */ abstract getNumDaysInMonth(date: D): number; /** * Gets a list of names for the dates of the month. * @returns An ordered list of all date of the month names, starting with '1'. */ abstract getDateNames(): string[]; /** * Gets the day of the week component of the given date. * @param date The date to extract the day of the week from. * @returns The month component (0-indexed, 0 = Sunday). */ abstract getDayOfWeek(date: D): number; /** * Gets the first day of the week. * @returns The first day of the week (0-indexed, 0 = Sunday). */ abstract getFirstDayOfWeek(): number; /** * Gets a list of names for the months. * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J'). * @returns An ordered list of all month names, starting with January. */ abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[]; /** * Gets today's date. * @returns Today's date. */ abstract today(): D; /** * Adds the given number of months to the date. * @param date The date to add months to. * @param months The number of months to add (may be negative). * @returns A new date equal to the given one with the specified number of months added. */ abstract addCalendarMonths(date: D, months: number): D; /** * Adds the given number of years to the date. * @param date The date to add years to. * @param years The number of years to add (may be negative). * @returns A new date equal to the given one with the specified number of years added. */ abstract addCalendarYears(date: D, years: number): D; /** * Adds the given number of days to the date. * @param date The date to add days to. * @param days The number of days to add (may be negative). * @returns A new date equal to the given one with the specified number of days added. */ abstract addCalendarDays(date: D, days: number): D; /** * Gets a list of names for the days of the week. * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S'). * @returns An ordered list of all weekday names, starting with Sunday. */ abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[]; /** * Clamp the given date between min and max dates. * @param date The date to clamp. * @param min The minimum value to allow. If null or omitted no min is enforced. * @param max The maximum value to allow. If null or omitted no max is enforced. * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`, * otherwise `date`. */ clampDate(date: D, min?: D | null, max?: D | null): D; } /** @docs-private */ interface NxDateFormats { parse: { dateInput: any; }; display: { dateInput: any; monthYearLabel: any; dateA11yLabel: any; monthYearA11yLabel: any; }; } declare const NX_DATE_FORMATS: InjectionToken; declare const NX_DATE_STRICT: InjectionToken; /** InjectionToken for datepicker that can be used to override default locale code. */ declare const NX_DATE_LOCALE: InjectionToken; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adapts the native JS Date for use with cdk-based components that work with dates. * @docs-private */ declare class NxNativeDateAdapter extends NxDateAdapter { /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */ private readonly _clampDate; /** * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates. * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()` * will produce `'8/13/1800'`. * * TODO(mmalerba): drop this variable. It's not being used in the code right now. We're now * getting the string representation of a Date object from it's utc representation. We're keeping * it here for sometime, just for precaution, in case we decide to revert some of these changes * though. */ useUtcForDisplay: boolean; constructor(dateLocale: string | null, platform: Platform); getYear(date: Date): number; getMonth(date: Date): number; getDate(date: Date): number; getDayOfWeek(date: Date): number; getMonthNames(style: 'long' | 'short' | 'narrow'): string[]; getDateNames(): string[]; getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[]; getYearName(date: Date): string; getFirstDayOfWeek(): number; getNumDaysInMonth(date: Date): number; clone(date: Date): Date; createDate(year: number, month: number, date: number): Date; today(): Date; parse(value: any): Date | null; format(date: Date, displayFormat: object): string; addCalendarYears(date: Date, years: number): Date; addCalendarMonths(date: Date, months: number): Date; addCalendarDays(date: Date, days: number): Date; toIso8601(date: Date): string; /** * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an * invalid date for all other values. */ deserialize(value: any): Date | null; isDateInstance(obj: any): obj is Date; isValid(date: Date): boolean; invalid(): Date; /** Creates a date but allows the month and date to overflow. */ private _createDateWithOverflow; /** * Pads a number to make it two digits. * @param n The number to pad. * @returns The padded number. */ private _2digit; /** * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while * other browsers do not. We remove them to make output consistent and because they interfere with * date parsing. * @param str The string to strip direction characters from. * @returns The stripped string. */ private _stripDirectionalityCharacters; /** * When converting Date object to string, javascript built-in functions may return wrong * results because it applies its internal DST rules. The DST rules around the world change * very frequently, and the current valid rule is not always valid in previous years though. * We work around this problem building a new Date object which has its internal UTC * representation with the local date and time. * @param dtf Intl.DateTimeFormat object, containg the desired string format. It must have timeZone set to 'utc' to work fine. * @param date Date from which we want to get the string representation according to dtf. * @returns A Date object with its UTC representation based on the passed in date info. */ private _format; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ declare const NX_NATIVE_DATE_FORMATS: NxDateFormats; declare const NX_DATE_LOCALE_PROVIDER: { provide: i0.InjectionToken; useFactory: (localeId: any, nxDateLocale: any) => any; deps: (i0.InjectionToken | SkipSelf[])[]; }; declare class NativeDateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class NxNativeDateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare abstract class NxDateRangeConnector { } declare const NX_DATEFIELD_VALUE_ACCESSOR: any; declare const NX_DATEFIELD_VALIDATORS: any; /** * An event used for datepicker input and change events. We don't always have access to a native * input or change event because the event may have been triggered by the user clicking on the * calendar popup. For consistency, we always use NxDatepickerInputEvent instead. */ declare class NxDatepickerInputEvent { /** Reference to the datepicker input component that emitted the event. */ readonly target: NxDatefieldDirective; /** Reference to the native input element associated with the datepicker input. */ readonly targetElement: HTMLElement; /** The new value for the target datepicker input. */ value: D | null; constructor( /** Reference to the datepicker input component that emitted the event. */ target: NxDatefieldDirective, /** Reference to the native input element associated with the datepicker input. */ targetElement: HTMLElement); } /** * Directive used to provide date processing functionality to an input. */ declare class NxDatefieldDirective implements AfterContentInit, ControlValueAccessor, OnDestroy, Validator { /** @docs-private */ readonly _elementRef: ElementRef; private readonly _formField; private readonly _dateRange; /** @docs-private */ currentFormattedDate: string | null; /** Whether the component has been initialized. */ private _isInitialized?; /** * @docs-private * To be able to set the hasPopup from the outside if the datepicker is not available in this directive like the date-range component */ hasPopup: i0.InputSignal; /** The datepicker that this input is associated with. */ set datepicker(value: NxDatepickerComponent); _datepicker?: NxDatepickerComponent; /** Function that can be used to filter out dates within the datepicker and invalidate values in the datefield. */ set datefieldFilter(value: (date: D | null) => boolean); /** Provide or read the current date. It's type depends on the chosen date implementation */ set value(value: D | null); get value(): D | null; private _value; /** Sets the minimum valid date. */ set min(value: D | null); get min(): D | null; private _min; /** Sets the maximum valid date. */ set max(value: D | null); get max(): D | null; private _max; /** * If supported by the date implementation enable strict parsing (applies to Moment's parse function here). * * The date value is not updated on a `strict` change. */ set strict(value: any); get strict(): any; private _strict; /** * Override the parse format given with parse.dateInput with the token NX_DATE_FORMATS. * * The date value is not updated on a `parseFormat` change. */ set parseFormat(value: string | string[]); get parseFormat(): string | string[]; private _parseFormat; /** Override the display format given with display.dateInput with the token NX_DATE_FORMATS */ set displayFormat(value: string); get displayFormat(): string; private _displayFormat; /** Whether the datepicker-input is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Whether the datefield is readonly. */ readonly readonly: i0.ModelSignal; private readonly _readonlyStateChangeEffect; /** Whether the datefield is readonly. */ setReadonly(value: boolean): void; /** Emits when a `change` event is fired on this ``. */ readonly dateChange: EventEmitter>; /** Emits when an `input` event is fired on this ``. */ readonly dateInput: EventEmitter>; /** Emits when the value changes (either due to user input or programmatic change). */ readonly _valueChange: EventEmitter; /** Emits when the disabled state has changed. */ readonly _disabledChange: EventEmitter; /** Emits when the readonly state has changed. */ readonly _readonlyChange: EventEmitter; readonly _dateAdapter: NxDateAdapter; private readonly _dateFormats; private readonly _destroyed; _dateFilter: (date: D | null) => boolean; _onTouched: () => void; private _cvaOnChange; private _validatorOnChange; constructor( /** @docs-private */ _elementRef: ElementRef, _dateAdapter: NxDateAdapter | null, _dateFormats: NxDateFormats | null, _dateStrict: boolean | null, _formField: NxFormfieldComponent | null, _dateRange: NxDateRangeConnector | null); ngAfterContentInit(): void; ngOnDestroy(): void; /** @docs-private */ registerOnValidatorChange(fn: () => void): void; /** @docs-private */ validate(c: AbstractControl): ValidationErrors | null; /** * Gets the element that the datepicker popup should be connected to. * @returns The element to connect the popup to. * @docs-private */ getConnectedOverlayOrigin(): ElementRef; writeValue(value: D): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; _onKeydown(event: KeyboardEvent): void; _onInput(value: string): void; _onChange(): void; _focus(): void; _onBlur(): void; /** Returns the validators of the datefield. */ getValidators(): ValidatorFn[]; /** Formats a value and sets it on the input native element. */ private _formatValue; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; private registerDatepicker; static ɵfac: i0.ɵɵFactoryDeclaration, [null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration, "input[nxDatefield]", ["nxDatefield"], { "hasPopup": { "alias": "hasPopup"; "required": false; "isSignal": true; }; "datepicker": { "alias": "datepicker"; "required": false; }; "datefieldFilter": { "alias": "datefieldFilter"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "strict": { "alias": "strict"; "required": false; }; "parseFormat": { "alias": "parseFormat"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "readonly": "readonlyChange"; "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>; } /** Datepicker data that requires internationalization. */ declare class NxDatepickerIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** A label for the calendar popup (used by screen readers). */ calendarLabel: string; /** A label for the button used to open the calendar popup (used by screen readers). */ openCalendarLabel: string; /** A label for the button used to close the calendar popup (used by screen readers). */ closeIconLabel: string; /** A label for the previous month button (used by screen readers). */ prevMonthLabel: string; /** A label for the next month button (used by screen readers). */ nextMonthLabel: string; /** A label for the previous year button (used by screen readers). */ prevYearLabel: string; /** A label for the next year button (used by screen readers). */ nextYearLabel: string; /** A label for the previous multi-year button (used by screen readers). */ prevMultiYearLabel: string; /** A label for the next multi-year button (used by screen readers). */ nextMultiYearLabel: string; /** A label for the 'switch to month view' button (used by screen readers). */ switchToMonthViewLabel: string; /** A label for the 'switch to year view' button (used by screen readers). */ switchToMultiYearViewLabel: string; /** A label for the today button (used by screen readers). */ todayButtonLabel: string; /** A label for describe the today button (used by screen readers). */ todayButtonAriaLabel: string; /** Announcement message after start date was selected (used by screen readers) */ startDateSelectedAnnouncement: string; /** Announcement message after date range selection is completed (used by screen readers) */ dateRangeSelectionCompleteAnnouncement: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * An internal class that represents the data corresponding to a single calendar cell. * @docs-private */ declare class NxCalendarCell { readonly value: number; readonly displayValue: string; readonly ariaLabel?: string | undefined; readonly enabled?: boolean | undefined; constructor(value: number, displayValue: string, ariaLabel?: string | undefined, enabled?: boolean | undefined); } /** * An internal component used to display calendar data in a table. * @docs-private */ declare class NxCalendarBodyComponent implements AfterViewInit, OnDestroy, AfterViewChecked { private readonly _elementRef; private readonly _focusMonitor; /** The label for the table. (e.g. "Jan 2017"). */ label: string; /** The cells to display in the table. */ rows: NxCalendarCell[][]; /** The value in the table that corresponds to today. */ todayValue: number; /** The value in the table that is currently selected. */ selectedValue: number | null; selectedEndDate: i0.InputSignal; betweenRange: i0.InputSignal; /** The number of columns in the table. */ numCols: number; /** Whether to allow selection of disabled cells. */ allowDisabledSelection: boolean; /** The cell number of the active cell in the table. */ activeCell: number; /** The items to display in the first row in the offset space. */ previousItems: number; /** The items to display in the last row in the offset space. */ followingItems: number; /** Emits when a new value out of rows is selected. */ readonly selectedValueChange: EventEmitter; readonly hoverValueChange: EventEmitter; /** Emits when a new value out of previousItems is selected. */ readonly selectedValueChangeToPrevious: EventEmitter; /** Emits when a new value out of followingItems is selected. */ readonly selectedValueChangeToFollowing: EventEmitter; _cells: QueryList>; private _injector; /** Preserves the current value of the _cells ViewChildren in case _cells changes. */ private _cellsPrevious; /** * Used to focus the active cell after change detection has run. */ private _focusActiveCellAfterViewChecked; private readonly _destroyed; constructor(_elementRef: ElementRef, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngAfterViewChecked(): void; ngOnDestroy(): void; _previousCellClicked(cell: NxCalendarCell): void; _cellClicked(cell: NxCalendarCell): void; _cellFocused(cell: NxCalendarCell): void; _followingCellClicked(cell: NxCalendarCell): void; /** The number of blank cells to put at the beginning for the first row. */ get _firstRowOffset(): number; /** The number of blank cells to put at the end of the last filled row. */ get _lastRowOffset(): number; /** The index of the last row. */ get _lastRowIndex(): number; _isActiveCell(rowIndex: number, colIndex: number): boolean; /** Focuses the active cell after the microtask queue is empty. */ _focusActiveCell(): void; /** Focuses the active cell after change detection has run and the microtask queue is empty. */ _scheduleFocusActiveCellAfterViewChecked(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * An internal component used to display a single month in the datepicker. * @docs-private */ declare class NxMonthViewComponent implements AfterContentInit { private readonly _cdr; private readonly _dir?; /** * The date to display in this month view (everything other than the month and year is ignored). */ set activeDate(value: D); get activeDate(): D; private _activeDate; isRange: i0.InputSignal; /** The currently selected date. */ set selected(value: D | DateRange | null); get selected(): D | DateRange | null; private _selected; /** The minimum selectable date. */ set minDate(value: D | null); get minDate(): D | null; private _minDate; /** The maximum selectable date. */ set maxDate(value: D | null); get maxDate(): D | null; private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new date is selected. */ readonly selectedChange: EventEmitter | null>; /** Emits when any date is selected. */ readonly _userSelection: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** Emits when user is hovering on date cell or navigating on date cells by keyboard */ readonly hoverDateChange: EventEmitter; /** The body of calendar table */ _nxCalendarBody: any; /** The label for this month (e.g. "January 2017"). */ _monthLabel: string; /** Grid of calendar cells representing the dates of the month. */ _weeks: NxCalendarCell[][]; /** The number of blank cells in the first row before the 1st of the month. */ _firstWeekOffset: number; /** * The date of the month that the currently selected Date falls on. * Null if the currently selected Date is in another month. */ protected readonly selectedDateInMonth: i0.ModelSignal; __selectedDate: number | null; /** The selected end date */ protected readonly selectedEndDate: i0.ModelSignal; /** The range between the selected start and end date */ protected readonly betweenRange: i0.ModelSignal; /** The date of the month that today falls on. Null if today is in another month. */ _todayDate: number | null; /** The names of the weekdays. */ _weekdays: { long: string; narrow: string; }[]; /** Number of days that should be displayed in one row. */ _numCols: number; readonly _dateAdapter: NxDateAdapter; private readonly _dateFormats; constructor(_cdr: ChangeDetectorRef, _dateFormats: NxDateFormats | null, _dateAdapter: NxDateAdapter | null, _dir?: (Directionality | null) | undefined); ngAfterContentInit(): void; handleHoverChange(date: number, monthsToAdd?: number): void; private calcDate; /** Handles when a new date is selected. */ _dateSelected(date: number, monthsToAdd?: number): void; /** Handles keydown events on the calendar body when calendar is in month view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; /** Initializes this month view. */ _init(): void; /** Focuses the active cell after the microtask queue is empty. */ private _focusActiveCell; /** Creates NxCalendarCells for the dates in this month. */ private _createWeekCells; /** Date filter for the month */ private _shouldEnableDate; /** * Gets the date in this month that the given Date falls on. * Returns null if the given Date is in another month. */ private _getDateInCurrentMonth; /** * Gets the range of dates in this month that the given DateRange falls on. * Returns an empty array if the given DateRange is exclusively in another month. * @param value The DateRange to check. * @returns The range of dates in this month that the DateRange falls on. */ private getRangeInMonth; /** * Gets the date to mark as selected. If the given date is null, it returns today's date */ private getInitialSelectionDate; /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */ private _hasSameMonthAndYear; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; private _getValidSingleDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; /** * Fill up the last row of the current month */ _getFirstDaysOfFollowingMonth(): number; /** * Returns a row with days, beginning with the date of `firstDayInRow`-parameter. * The returned row contains `daysCount` elements. */ _getRowOfDays(firstDayInRow: D, daysCount: number): NxCalendarCell[]; static ɵfac: i0.ɵɵFactoryDeclaration, [null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-month-view", ["nxMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "selectedDateInMonth": { "alias": "selectedDateInMonth"; "required": false; "isSignal": true; }; "selectedEndDate": { "alias": "selectedEndDate"; "required": false; "isSignal": true; }; "betweenRange": { "alias": "betweenRange"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "activeDateChange": "activeDateChange"; "hoverDateChange": "hoverDateChange"; "selectedDateInMonth": "selectedDateInMonthChange"; "selectedEndDate": "selectedEndDateChange"; "betweenRange": "betweenRangeChange"; }, never, never, true, never>; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ declare const yearsPerPage = 20; declare const yearsPerRow = 4; /** * An internal component used to display a year selector in the datepicker. * @docs-private */ declare class NxMultiYearViewComponent implements AfterContentInit { private readonly _cdr; private readonly _dir?; /** The date to display in this multi-year view (everything other than the year is ignored). */ set activeDate(value: D); get activeDate(): D; private _activeDate; /** The currently selected date. */ set selected(value: D | DateRange | null); get selected(): D | DateRange | null; private _selected; /** The minimum selectable date. */ set minDate(value: D | null); get minDate(): D | null; private _minDate; /** The maximum selectable date. */ set maxDate(value: D | null); get maxDate(): D | null; private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new year is selected. */ readonly selectedChange: EventEmitter; /** Emits the selected year. This doesn't imply a change on the selected date */ readonly yearSelected: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ _nxCalendarBody: any; /** Grid of calendar cells representing the currently displayed years. */ _years: NxCalendarCell[][]; /** The year that today falls on. */ _todayYear: number; /** The year of the selected date. Null if the selected date is null. */ _selectedYear: number | null; readonly _dateAdapter: NxDateAdapter; constructor(_cdr: ChangeDetectorRef, _dateAdapter: NxDateAdapter | null, _dir?: (Directionality | null) | undefined); ngAfterContentInit(): void; /** Initializes this multi-year view. */ _init(): void; /** Handles when a new year is selected. */ _yearSelected(year: number): void; /** Handles keydown events on the calendar body when calendar is in multi-year view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; _getActiveCell(): number; /** Focuses the active cell after the microtask queue is empty. */ private _focusActiveCell; /** Creates an NxCalendarCell for the given year. */ private _createCellForYear; /** Whether the given year is enabled. */ private _shouldEnableYear; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; static ɵfac: i0.ɵɵFactoryDeclaration, [null, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-multi-year-view", ["nxMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An internal component used to display a single year in the datepicker. * @docs-private */ declare class NxYearViewComponent implements AfterContentInit { private readonly _cdr; private readonly _dir?; isRange: i0.InputSignal; /** The date to display in this year view (everything other than the year is ignored). */ set activeDate(value: D); get activeDate(): D; private _activeDate; /** The currently selected date. */ set selected(value: D | DateRange | null); get selected(): D | DateRange | null; private _selected; /** The minimum selectable date. */ set minDate(value: D | null); get minDate(): D | null; private _minDate; /** The maximum selectable date. */ set maxDate(value: D | null); get maxDate(): D | null; private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new month is selected. */ readonly selectedChange: EventEmitter; /** Emits the selected month. This doesn't imply a change on the selected date */ readonly monthSelected: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ _nxCalendarBody: any; /** Grid of calendar cells representing the months of the year. */ _months: NxCalendarCell[][]; /** The label for this year (e.g. "2017"). */ _yearLabel: string; /** The month in this year that today falls on. Null if today is in a different year. */ _todayMonth: number | null; /** * The month in this year that the selected Date falls on. * Null if the selected Date is in a different year. */ _selectedMonth: number | null; _numCols: number; readonly _dateAdapter: NxDateAdapter; private readonly _dateFormats; constructor(_cdr: ChangeDetectorRef, _dateFormats: NxDateFormats | null, _dateAdapter: NxDateAdapter | null, _dir?: (Directionality | null) | undefined); ngAfterContentInit(): void; /** Handles when a new month is selected. */ _monthSelected(month: number): void; /** Handles keydown events on the calendar body when calendar is in year view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; /** Initializes this year view. */ _init(): void; /** Focuses the active cell after the microtask queue is empty. */ private _focusActiveCell; /** * Gets the month in this year that the given Date falls on. * Returns null if the given Date is in another year. */ private _getMonthInCurrentYear; /** Creates an NxCalendarCell for the given month. */ private _createCellForMonth; /** Whether the given month is enabled. */ private _shouldEnableMonth; /** * Tests whether the combination month/year is after this.maxDate, considering just the month and year of this.maxDate. */ private _isYearAndMonthAfterMaxDate; /** * Tests whether the combination month/year is before this.minDate, considering just the month and year of this.minDate. */ private _isYearAndMonthBeforeMinDate; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; static ɵfac: i0.ɵɵFactoryDeclaration, [null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-year-view", ["nxYearView"], { "isRange": { "alias": "isRange"; "required": false; "isSignal": true; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>; } /** * A calendar that is used as part of the datepicker. * @docs-private */ declare class NxCalendarComponent implements AfterContentInit, AfterViewInit, OnDestroy, OnChanges { protected readonly _intl: NxDatepickerIntl; private readonly _dir; private readonly _focusMonitor; private readonly _liveAnnouncer; private readonly _elementRef; /** Whether the datepicker should be in date range selection mode */ isRange: i0.InputSignal; /** A date representing the period (month or year) to start the calendar in. */ set startAt(value: D | null); get startAt(): D | null; private _startAt; /** Whether the calendar should be started in month or year view. */ startView: 'month' | 'year' | 'multi-year'; /** The currently selected date. */ set selected(value: D | DateRange | null); get selected(): D | DateRange | null; protected _selected: i0.WritableSignal | null>; /** Internal state for improved typesafety */ private _currentRange; private _inEndDateSelectionMode; /** The minimum selectable date. */ set minDate(value: D | null); get minDate(): D | null; private _minDate; /** The maximum selectable date. */ set maxDate(value: D | null); get maxDate(): D | null; private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Determines whether the today button is displayed in the calendar. */ showTodayButton: boolean; /** Emits when the currently selected date changes. */ readonly selectedChange: EventEmitter>; /** * Emits the year chosen in multiyear view. * This doesn't imply a change on the selected date. */ readonly yearSelected: EventEmitter; /** * Emits the month chosen in year view. * This doesn't imply a change on the selected date. */ readonly monthSelected: EventEmitter; /** Emits when any date is selected. */ readonly _userSelection: EventEmitter; /** * Emits when the Today button is clicked. * This doesn't imply a change on the selected date. */ readonly todayButtonClick: EventEmitter; /** Reference to the current month view component. */ monthView: NxMonthViewComponent; /** Reference to the current year view component. */ yearView: NxYearViewComponent; /** Reference to the current multi-year view component. */ multiYearView: NxMultiYearViewComponent; _previousButton: ElementRef; _nextButton: ElementRef; _changeViewButton: ElementRef; _todayButton: ElementRef; private _injector; /** * The current active date. This determines which time period is shown and which date is * highlighted when using keyboard navigation. */ set _activeDate(value: D); get _activeDate(): D; private _clampedActiveDate; /** Whether the calendar is in month view. */ _currentView: 'month' | 'year' | 'multi-year'; /** The label for the current calendar view. */ get _periodButtonText(): string; get _periodButtonLabel(): string; /** The label for the the previous button. */ get _prevButtonLabel(): string; /** The label for the the next button. */ get _nextButtonLabel(): string; get _isRtl(): boolean; /** Check whether today button should disable or not */ get _disableTodayButton(): boolean; private readonly _dateAdapter; private readonly _dateFormats; private readonly _destroyed; constructor(_intl: NxDatepickerIntl, _dateAdapter: NxDateAdapter | null, _dir: Directionality | null, _dateFormats: NxDateFormats | null, _cdr: ChangeDetectorRef, _focusMonitor: FocusMonitor, _liveAnnouncer: LiveAnnouncer, _elementRef: ElementRef); ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; _hoverDateChange(date: D): void; /** Handles date selection in the month view. */ _dateSelected(date: D | DateRange): void; /** Handles year selection in the multiyear view. */ _yearSelectedInMultiYearView(normalizedYear: D): void; /** Handles month selection in the year view. */ _monthSelectedInYearView(normalizedMonth: D): void; _userSelected(): void; /** Handles year/month selection in the multi-year/year views. */ _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void; /** Handles user clicks on the period label. */ _changeViewClicked(): void; /** Handles user clicks on the previous button. */ _previousClicked(): void; /** Handles user clicks on the next button. */ _nextClicked(): void; /** Whether the previous period button is enabled. */ _previousEnabled(): boolean; /** Whether the next period button is enabled. */ _nextEnabled(): boolean; /** Whether the two dates represent the same view in the current view mode (month or year). */ private _isSameView; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; private getValidRangeOrNullDate; /** Handles event on the today button */ protected todayButtonHandler(): void; protected todayButtonKeydownHandler(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, { optional: true; }, { optional: true; }, { optional: true; }, null, null, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-calendar", ["nxCalendar"], { "isRange": { "alias": "isRange"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "_userSelection": "_userSelection"; "todayButtonClick": "todayButtonClick"; }, never, never, true, never>; static ngAcceptInputType_showTodayButton: unknown; } /** Can be used to override the icon of a `nxDatepickerToggle`. */ declare class NxDatepickerToggleIconComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxDatepickerToggleComponent implements AfterContentInit, AfterViewInit, OnChanges, OnDestroy { readonly _intl: NxDatepickerIntl; private readonly _cdr; private readonly _defaultOptions; private readonly _focusMonitor; private _stateChanges; /** Custom icon set by the consumer. */ _customIcon: NxDatepickerToggleIconComponent; _toggleButton: ElementRef; /** Datepicker instance that the button will toggle. */ set datepicker(value: NxDatepickerComponent); get datepicker(): NxDatepickerComponent; _datepicker: NxDatepickerComponent; /** Whether the toggle button is disabled. */ readonly disabledInput: i0.ModelSignal; readonly disabled: i0.Signal; /** Sets the tabindex for the toggle button. Default: 0. */ set tabindex(value: NumberInput); get tabindex(): number; private _tabindex?; private readonly _destroyed; constructor(_intl: NxDatepickerIntl, _cdr: ChangeDetectorRef, _defaultOptions: DatepickerDefaultOptions | null, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; ngAfterContentInit(): void; _open(event: Event): void; private registerDatepicker; private _watchStateChanges; protected keydownHandler(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, { optional: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-datepicker-toggle", ["nxDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, { "disabledInput": "disabledChange"; }, ["_customIcon"], ["[nxDatepickerToggleIcon]"], true, never>; } /** Injection token that determines the scroll handling while the calendar is open. */ declare const NX_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ declare function NX_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ declare const NX_DATEPICKER_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof NX_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY; }; declare class DatepickerDefaultOptions { /** * Stream that emits whenever the default options are changed. Use this to notify * components if the default options have changed after initialization. */ changes?: Subject; /** Sets the focus on toggle behavior. (optional) */ toggleIconTabindex?: number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const DATEPICKER_DEFAULT_OPTIONS: InjectionToken; /** * Component used as the content for the datepicker dialog and popup. We use this instead of using * NxCalendarComponent directly as the content so we can control the initial focus. This also gives us a * place to put additional features of the popup that are not part of the calendar itself in the * future. (e.g. confirmation buttons). * @docs-private */ declare class NxDatepickerContentComponent implements AfterViewInit, OnDestroy { readonly _intl: NxDatepickerIntl; readonly elementRef: ElementRef; private readonly _focusMonitor; datepicker: NxDatepickerComponent; isRange: i0.Signal; private _afterNextRenderInitial; _calendar: NxCalendarComponent; _closeButton: ElementRef; constructor(_intl: NxDatepickerIntl, elementRef: ElementRef, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-datepicker-content", ["nxDatepickerContent"], {}, {}, never, never, true, never>; } /** Component responsible for managing the datepicker popup/dialog. */ declare class NxDatepickerComponent implements OnDestroy { private readonly _overlay; private readonly _viewContainerRef; private readonly _defaultScrollStrategyFactory; private readonly _dir; private readonly _document; private _injector; isRange: i0.Signal; /** The date to open the calendar initially. */ set startAt(value: D | null); get startAt(): D | null; private _startAt; /** The view that the calendar should start in. */ startView: 'month' | 'year' | 'multi-year'; /** Determines whether the today button is displayed in the calendar. */ showTodayButton: boolean; /** * Whether the datepicker pop-up should be disabled. * The datepicker is also disabled if the belonging input is readonly. */ readonly disabledInput: i0.ModelSignal; readonly disabled: i0.Signal; /** * Event emitter for selection changes. * * Emits if the datepicker is in single date selection mode. * Emits DateRange if the datepicker is in range selection mode. * Never emits any other type. `any` is used here to avoid breaking changes and will be removed in Angular NDBX v20 major release. */ readonly selectedChanged: EventEmitter; /** * Emits selected year in multiyear view. * This doesn't imply a change on the selected date. */ readonly yearSelected: EventEmitter>; /** * Emits selected month in year view. * This doesn't imply a change on the selected date. */ readonly monthSelected: EventEmitter>; /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */ panelClass: string | string[]; /** Emits when the datepicker has been opened. */ readonly openedStream: EventEmitter; /** Emits when the datepicker has been closed. */ readonly closedStream: EventEmitter; /** * Emits when the Today button is clicked. * This doesn't imply a change on the selected date. */ readonly todayButtonClick: EventEmitter; /** Whether the calendar is open. */ set opened(value: boolean); get opened(): boolean; private _opened; /** * The id for the datepicker calendar. * @docs-private */ id: string; /** * The currently selected date. * @docs-private */ set selected(value: D | DateRange | null); get selected(): D | DateRange | null; _selected: i0.WritableSignal | null>; selectedComputed: i0.Signal | null>; /** * The minimum selectable date. * @docs-private */ get minDate(): D | null; /** * The maximum selectable date. * @docs-private */ get maxDate(): D | null; set dateFilter(value: (date: D | null) => boolean); get dateFilter(): (date: D | null) => boolean; private _dateFilter; /** A reference to the overlay when the calendar is opened as a popup. */ private _popupRef; /** A portal containing the calendar for this datepicker. */ private _calendarPortal; /** Reference to the component instantiated in popup mode. */ private _popupComponentRef; /** The element that was focused before the datepicker was opened. */ private _focusedElementBeforeOpen; /** The input element this datepicker is associated with. */ _datepickerInput: NxDatefieldDirective; _datepickerInputStartDate?: NxDatefieldDirective; _datepickerInputEndDate?: NxDatefieldDirective; _toggleButton: NxDatepickerToggleComponent; /** Strategy factory that will be used to handle scrolling while the datepicker panel is open. */ private readonly _scrollStrategyFactory; /** Emits when the datepicker is disabled. */ readonly _disabledChange: Subject; private readonly _dateAdapter; private readonly _destroyed; rangeMode: i0.InputSignal; constructor(_overlay: Overlay, _viewContainerRef: ViewContainerRef, _defaultScrollStrategyFactory: () => ScrollStrategy, _dateAdapter: NxDateAdapter | null, _dir: Directionality | null, _document: Document | null); ngOnDestroy(): void; /** * Selects the given date. * @docs-private */ select(date: D | DateRange | null): void; /** * Emits the selected year in multiyear view. * @docs-private */ selectYear(normalizedYear: D | DateRange | null): void; /** * Emits selected month in year view. * @docs-private */ selectMonth(normalizedMonth: D | DateRange | null): void; /** * Register an input with this datepicker. * @param input The datepicker input to register with this datepicker. * @docs-private */ registerInput(input: NxDatefieldDirective, inputDateMode?: string): void; /** * Register an input toggle with this datepicker. * @docs-private */ registerToggle(toggle: NxDatepickerToggleComponent): void; /** * Open the calendar. * @docs-private */ open(): void; /** * Close the calendar. * @docs-private */ close(): void; /** Open the calendar as a popup. */ private _openAsPopup; /** Create the popup. */ private _createPopup; /** Destroy popup */ private _destroyPopup; /** Create the popup PositionStrategy. */ private _createPopupPositionStrategy; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; getStartAtDate(): D | null; handleTodayButtonClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-datepicker", ["nxDatepicker"], { "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; }, { "disabledInput": "disabledChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "openedStream": "opened"; "closedStream": "closed"; "todayButtonClick": "todayButtonClick"; }, never, never, true, never>; } declare class NxDateRangeIntl { /** ARIA label for the start date input field (used by screen readers) */ readonly startDateAriaLabel: i0.WritableSignal; /** ARIA label for the end date input field (used by screen readers) */ readonly endDateAriaLabel: i0.WritableSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class DateRange { readonly start: T | null; readonly end: T | null; constructor(start: T | null, end: T | null); } declare class NxDateRangeComponent implements NxFormfieldControl>, ControlValueAccessor, OnDestroy, AfterViewInit, Validator, NxAbstractControl, DoCheck, OnInit, NxDateRangeConnector { private _elementReference; private readonly _focusMonitor; private readonly _renderer; private readonly _injector; private readonly _intl; private readonly _formFieldComponent; private readonly _dateAdapter; protected static nextId: number; private readonly _destroyed; /** The start input field. We need this to connect to the datepicker */ private readonly _startDateDirective; /** Effect for connecting the datepicker to the end date field so the date picker can set the value */ private readonly _startDateDirectiveEffect; /** The end date input field. We need this to connect the datepicker */ private readonly _endDateDirective; /** Effect for connecting the datepicker to the end date field so the date picker can set the value */ private readonly _endDateDirectiveEffect; private readonly _dynamicStartDateWidthHook; /** * Value of the start date input field */ protected readonly startDate: ModelSignal; /** * Value of the end date input field */ protected readonly endDate: ModelSignal; /** * The width of the start date input field. This is set dynamically based on the content of the input field. */ protected readonly startDateInputWidth: ModelSignal; /** * The minimum date that can be selected. The date must be same or after the minimum date. */ readonly minDate: InputSignal; /** * The maximum date that can be selected. The date must be same or before the maximum date. */ readonly maxDate: InputSignal; readonly dateFilter: InputSignal<((date: D | null) => boolean) | null>; private readonly _dateFilterEffect; /** * The NxDatePicker this date range should connect to */ readonly datepicker: InputSignal | undefined>; /** The date range value of type @type {DateRange} */ set value(value: DateRange | null); get value(): DateRange | null; /** State changes subject to notifiy the Formfield of changes */ stateChanges: Subject; empty: boolean; id: string; focused: boolean; set required(value: boolean); get required(): boolean; private _required; set disabled(value: boolean); get disabled(): boolean; protected _disabled: boolean; set readonly(value: boolean); get readonly(): boolean; protected _readonly: boolean; shouldLabelFloat: boolean | undefined; /** Wether the component has an invalid value */ errorState: boolean; placeholder: string; controlType?: string | undefined; updateOn?: NxFormfieldUpdateEventType | undefined; /** * The aria-describedby ids that will be set by the formfield */ protected ariaDescribedByFormfield: i0.WritableSignal; /** * The aria-describedby attribute on the input for improved accessibility. */ readonly ariaDescribedByInput: InputSignal; protected ariaDescribedBy: i0.Signal; readonly groupAriaLabel: ModelSignal; readonly startDateAriaLabelInput: InputSignal; readonly startDateAriaLabel: i0.Signal; readonly endDateAriaLabelInput: InputSignal; readonly endDateAriaLabel: i0.Signal; readonly parseFormat: InputSignal; readonly displayFormat: InputSignal; readonly strict: InputSignal; /** * Callback function that is called when the control's value changes in the UI. */ onChange: (_: any) => void; /** * Callback function that is called when the control's is touched. */ onTouched: () => void; private _measureCanvas?; ngControl: NgControl | null; constructor(_elementReference: ElementRef, _focusMonitor: FocusMonitor, _renderer: Renderer2, _injector: Injector, _intl: NxDateRangeIntl, _formFieldComponent: NxFormfieldComponent | null, _dateAdapter: NxDateAdapter); ngOnInit(): void; ngDoCheck(): void; validate(control: AbstractControl): ValidationErrors | null; getValidators(): ValidatorFn[]; registerOnValidatorChange?(fn: () => void): void; setReadonly(value: boolean): void; setDescribedByIds(ids: string[]): void; setAriaLabel?(value: string): void; get elementRef(): ElementRef; setDisabledState?(isDisabled: boolean): void; ngAfterViewInit(): void; ngOnDestroy(): void; writeValue(obj: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; protected handleChange(): void; protected getAriaLabelId(): string | null; protected _onKeydown(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, null, { optional: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-date-range", never, { "startDate": { "alias": "startDate"; "required": false; "isSignal": true; }; "endDate": { "alias": "endDate"; "required": false; "isSignal": true; }; "startDateInputWidth": { "alias": "startDateInputWidth"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "datepicker": { "alias": "datepicker"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ariaDescribedByInput": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "groupAriaLabel": { "alias": "groupAriaLabel"; "required": false; "isSignal": true; }; "startDateAriaLabelInput": { "alias": "startDateAriaLabel"; "required": false; "isSignal": true; }; "endDateAriaLabelInput": { "alias": "startDateAriaLabel"; "required": false; "isSignal": true; }; "parseFormat": { "alias": "parseFormat"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "strict": { "alias": "strict"; "required": false; "isSignal": true; }; }, { "startDate": "startDateChange"; "endDate": "endDateChange"; "startDateInputWidth": "startDateInputWidthChange"; "groupAriaLabel": "groupAriaLabelChange"; }, never, never, true, never>; static ngAcceptInputType_required: unknown; static ngAcceptInputType_disabled: unknown; static ngAcceptInputType_readonly: unknown; } /** * Provides a set of date validators that can be used by form controls. * @dynamic */ declare class NxDateValidators { /** The form control validator for whether the input parses. */ static parse(dateAdapter: NxDateAdapter, dateFormats: NxDateFormats, input: HTMLInputElement, strict: boolean, customParseFormat: string | string[]): ValidatorFn; /** The form control validator for the min date. */ static min(dateAdapter: NxDateAdapter, min: D): ValidatorFn; /** The form control validator for the max date. */ static max(dateAdapter: NxDateAdapter, max: D): ValidatorFn; /** The form control validator for the date filter. */ static filter(dateAdapter: NxDateAdapter, dateFilter: (date: D | null) => boolean): ValidatorFn; } declare class NxDateRangeValidators { static min(dateAdapter: NxDateAdapter, min: D): ValidatorFn; /** The form control validator for the max date. */ static max(dateAdapter: NxDateAdapter, max: D): ValidatorFn; /** The form control validator for the date filter. */ static filter(dateAdapter: NxDateAdapter, dateFilter: (date: D | null) => boolean | null): ValidatorFn; /** The form control validator to check that the start date is before end date. */ static range(dateAdapter: NxDateAdapter): ValidatorFn; static complete(dateAdapter: NxDateAdapter): ValidatorFn; static required(dateAdapter: NxDateAdapter): ValidatorFn; } declare class NxDatefieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { DATEPICKER_DEFAULT_OPTIONS, DateRange, DatepickerDefaultOptions, NX_DATEFIELD_VALIDATORS, NX_DATEFIELD_VALUE_ACCESSOR, NX_DATEPICKER_SCROLL_STRATEGY, NX_DATEPICKER_SCROLL_STRATEGY_PROVIDER, NX_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY, NX_DATE_FORMATS, NX_DATE_LOCALE, NX_DATE_LOCALE_PROVIDER, NX_DATE_STRICT, NX_NATIVE_DATE_FORMATS, NativeDateModule, NxCalendarBodyComponent, NxCalendarCell, NxCalendarComponent, NxDateAdapter, NxDateRangeComponent, NxDateRangeIntl, NxDateRangeValidators, NxDateValidators, NxDatefieldDirective, NxDatefieldModule, NxDatepickerComponent, NxDatepickerContentComponent, NxDatepickerInputEvent, NxDatepickerIntl, NxDatepickerToggleComponent, NxDatepickerToggleIconComponent, NxMonthViewComponent, NxMultiYearViewComponent, NxNativeDateAdapter, NxNativeDateModule, NxYearViewComponent, yearsPerPage, yearsPerRow }; export type { NxDateFormats };