import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { FieldComponent } from '@danske/sapphire-angular'; import { DateValue } from '@internationalized/date'; import { FocusMonitor } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { Segment, EditableSegmentType } from './utils/Segment'; import { ControlValueAccessor, ValidatorFn } from '@angular/forms'; import * as i0 from "@angular/core"; import * as i1 from "@danske/sapphire-angular"; /** * Sapphire date input field. */ export declare class DateFieldInputComponent implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy { private elementRef; private focusMonitor; readonly localeFromContext: string; readonly dateFormatLocaleFromContext: string | null; field?: FieldComponent | undefined; constructor(elementRef: ElementRef, focusMonitor: FocusMonitor, localeFromContext: string, dateFormatLocaleFromContext: string | null, 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; private onClick; focusBefore: EventEmitter; focusAfter: EventEmitter; /** * 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; value: DateValue | null; locale: string; /** * Whether to always show leading zeros in the month, and day fields. * By default, this is determined by the user's locale. */ shouldForceLeadingZeros?: BooleanInput; segmentAriaLabel?: (segmentType: EditableSegmentType) => string; /** * This can be the placeholderValue or the actual value * or neither. * When the date is partially filled, we still * want an actual date to work with, but we don't want to * modify the actual value nor the placeholderValue until * we have a full date from the user. */ private displayValue; private dateFormatLocale; private dateFormatterByLocale; private get dateFormatter(); private onChange; private onTouched; private segmentComponents; private validSegments; private adjustSegment; private generateSegments; setValue({ value, updateSegments, emitChange, }: { value: DateValue | null; updateSegments: boolean; emitChange: boolean; }): void; private setDisplayValue; isPartiallyFilled(): boolean; /** * Implements validation to provide in NG_VALIDATORS */ validate: ValidatorFn; segments: Segment[]; focusedSegment?: Segment; increment(segmentType: EditableSegmentType): void; decrement(segmentType: EditableSegmentType): void; incrementPage(segmentType: EditableSegmentType): void; decrementPage(segmentType: EditableSegmentType): void; setSegment(segmentType: EditableSegmentType, value: number): void; clearSegment(segmentType: EditableSegmentType): void; clear(): void; /** * Implementing ControlValueAccessor interface below */ writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; focus(end?: boolean): void; onSegmentFocus(segment: Segment): void; /** * Find the current focused segment and focus the next or previous segment. */ focusSegment(offset: 1 | -1): void; focusNextSegment(): void; focusPreviousSegment(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Implementing OnDestroy interface below */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }