import { AfterViewInit, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { FieldControl, FieldComponent, IconRegistry } from '@danske/sapphire-angular'; import { DateValue } from '@internationalized/date'; import { FocusMonitor } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { ControlValueAccessor, ValidatorFn } from '@angular/forms'; import { PredefinedDate } from '../../calendar/public_api'; import * as i0 from "@angular/core"; import * as i1 from "@danske/sapphire-angular"; /** * Sapphire date input field. */ export declare class DateFieldComponent

implements FieldControl, ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy { private elementRef; private focusMonitor; readonly localeFromContext: string; field?: FieldComponent | undefined; constructor(elementRef: ElementRef, focusMonitor: FocusMonitor, iconRegistry: IconRegistry, localeFromContext: string, field?: FieldComponent | undefined); /** * A unique id for the host DOM element. * If none is supplied, it will be auto-generated. */ id: string; disabled: BooleanInput; readonly: BooleanInput; required: BooleanInput; showWeekNumbersInCalendar: BooleanInput; value: DateValue | null; /** * A set of predefined dates that the user can more conveniently select. */ predefinedDates?: Record; /** * The placeholder date. This is used as the starting * point when modifying the field by keyboard. * * Defaults to the date value, if provided, otherwise to today's date. */ placeholderValue?: DateValue; /** * The minimum allowed date that a user may select. */ minValue?: DateValue; /** * The maximum allowed date that a user may select. */ maxValue?: DateValue; /** * Callback that is called for each date of the calendar. If it * returns true, then the date is unavailable. */ isDateUnavailable?: (date: DateValue) => boolean; noClearButton: BooleanInput; noCalendarButton: BooleanInput; locale: string; /** * Whether to always show leading zeros in the month, and dayfields. * By default, this is determined by the user's locale. */ shouldForceLeadingZeros?: BooleanInput; calendarButtonId: string; onChange: ((date: DateValue | null) => void) | undefined; private onTouched; private popoverTrigger?; private dateFieldInput?; onCalendarSelectDate(): void; isPartiallyFilled(): boolean; /** * Implements validation to provide in NG_VALIDATORS */ validate: ValidatorFn; clear(): void; /** * Implementing ControlValueAccessor interface below */ writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; /** * Implementing FieldControl interface below */ focus(): void; getId(): string | undefined; isDisabled(): boolean; ariaLabelledBy: string | undefined; readonly hasDefaultWidth = true; ngAfterViewInit(): void; ngDoCheck(): void; ngOnChanges(changes: SimpleChanges): void; /** * Implementing OnDestroy interface below */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "sp-date-field", never, { "id": "id"; "disabled": "disabled"; "readonly": "readonly"; "required": "required"; "showWeekNumbersInCalendar": "showWeekNumbersInCalendar"; "value": "value"; "predefinedDates": "predefinedDates"; "placeholderValue": "placeholderValue"; "minValue": "minValue"; "maxValue": "maxValue"; "isDateUnavailable": "isDateUnavailable"; "noClearButton": "noClearButton"; "noCalendarButton": "noCalendarButton"; "locale": "locale"; "shouldForceLeadingZeros": "shouldForceLeadingZeros"; }, {}, never, never, false, [{ directive: typeof i1.UseComponentStylesOnHost; inputs: {}; outputs: {}; }]>; }