import '../../datepicker.globals'; import '@sebgroup/green-core/components/icon/icons/calendar.js'; import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js'; import { WeekDay } from '@angular/common'; import { ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core'; import { NgControl } from '@angular/forms'; import { Observable } from 'rxjs'; import { TranslocoScope, TranslocoService } from '@jsverse/transloco'; import { DateControlValueAccessorComponent } from '../../date-control-value-accessor/date-control-value-accessor.component'; import type { CalendarType } from '../../datepicker.models'; import * as i0 from "@angular/core"; /** * Date pickers simplify the task of selecting a date in a visual representation of a calendar. * https://designlibrary.sebgroup.com/components/component-datepicker * * Selector: `nggv-dateinput` * * When focusing an date element, the calendar allows for navigation using both tab and arrow keys. * Pressing 'esc' will close the calendar. * * Requires TranslocoLocale, but in turn allows for setting locale dynamically: * https://jsverse.github.io/transloco/docs/plugins/locale/#manually-setting-locale * * To configure TranslocoLocale, follow this guide: * https://jsverse.github.io/transloco/docs/plugins/locale/#setup */ export declare class DateInputComponent extends DateControlValueAccessorComponent implements OnDestroy { ngControl: NgControl; protected translocoScope: TranslocoScope; protected transloco: TranslocoService; protected elementRef: ElementRef; protected cdr: ChangeDetectorRef; toggleButtonRef?: ElementRef; /** Special property used for selecting DOM elements during automated UI testing. */ thook: string | null | undefined; get isSmall(): boolean; get isLarge(): boolean; /** Set type of calendar: either 'normal' or 'expanded'. Default is 'normal'. */ type: CalendarType; /** If set to true, the value will not be editable. */ readonly: boolean; /** * An array of Dates or parsable strings that corresponds with dates that should not be selectable in the calendar. * I.e. bank holidays. */ disableDates: (string | Date)[]; /** * An array of weekdays that should not be selectable in the calendar. * Can be used together with or instead of @Input() disableDates. */ disableWeekDays: WeekDay[]; /** Mininum number of rows shown in the calendar. */ minRows: number; /** Sets a from-date of which all dates before will be invalid. */ firstValid: Date | undefined; /** Sets a to-date of which all dates after will be invalid. */ lastValid: Date | undefined; /** Sets a closing time for today to toggle availability for today's date. */ closingTime: Date | undefined; /** Sets first day of week in calendar. Defaults to Monday. */ firstDayOfWeek: WeekDay; /** If set to true, it will allow to close the calendar on escape button click. */ closeCalendarOnEscape: boolean; /** If the date-input should close when scrolling the viewport. Default: false*/ closeOnScroll: boolean; /** * Sets the displayed size of the date input field. */ size: 'small' | 'large'; dynamicPosition: boolean; /** @internal */ /** @internal */ shown: boolean; /** @internal */ showInput$: Observable; /** Observable for listening to scrolls when the datepicker is open */ private documentScroll$; /** Observable for listening to clicks outside of the datepicker. */ private documentClick$; /** Subject used for unsubscribe pattern on above observable. */ private datepickerClosed$; constructor(ngControl: NgControl, translocoScope: TranslocoScope, transloco: TranslocoService, elementRef: ElementRef, cdr: ChangeDetectorRef); ngOnDestroy(): void; /** * @internal * Called from the datepicker-component when a date button is clicked in the calendar. * * @param date date object emitted when selecting a date in the datepicker. */ onDateChange(date: Date): void; /** * @internal * Called when entering date manually in input field. */ onValueChange(eventTarget: any): void; /** * @internal * Listen to 'esc' keypress and closes datepicker if open. */ keyListener(event: KeyboardEvent): void; /** @internal */ toggleDatepicker(): void; /** To externally trigger the datepicker to close. */ close(): void; /** * Set the shown state of the datepicker popup. If true the popup will be visible. * If the state is set to false, call onTouched to notify any state listeners * @param state the shown state which to set. */ private setShown; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }