import * as _angular_core from '@angular/core'; import { OnInit, ElementRef, Signal } from '@angular/core'; import { Palette, PortalContent } from '@lucca-front/ng/core'; import { ConnectionPositionPair } from '@angular/cdk/overlay'; import { ControlValueAccessor, Validator, NgControl, AbstractControl, ValidationErrors } from '@angular/forms'; import { LuccaIcon } from '@lucca-front/icons'; import { FilterPillInputComponent } from '@lucca-front/ng/filter-pills'; import { PopoverDirective } from '@lucca-front/ng/popover2'; type CalendarMode = 'day' | 'month' | 'year'; interface Date2Translate { from: string; to: string; directionKeysTip: string; pickDate: string; previous: string; next: string; clear: string; } interface CellStatus { classes: string[]; disabled?: boolean; selected?: boolean; label?: string; } interface DateRangeInput { class?: `palette-${Palette}` | string; start: Date | string; end?: Date | string; label?: string; scope?: CalendarMode; } interface DateRange extends DateRangeInput { start: Date; end?: Date; } interface RangeInfo { range?: DateRange; isStart: boolean; isEnd: boolean; label?: string; } interface CalendarCellInfo { day: number; date: Date; status: CellStatus; disabled: boolean; isWeekend: boolean; isCurrent: boolean; isOverflow: boolean; isSelected: boolean; noButton: boolean; label?: string; rangeInfo: RangeInfo; classes: Record; } interface CalendarMonthInfo { date: Date; short: string; long: string; isCurrent: boolean; status: CellStatus; rangeInfo: RangeInfo; classes: Record; } interface CalendarYearInfo { date: Date; name: string; isCurrent: boolean; status: CellStatus; rangeInfo: RangeInfo; classes: Record; } declare class Calendar2CellDirective { #private; luCalendar2Cell: _angular_core.InputSignal; luCalendar2Mode: _angular_core.InputSignal; luCalendar2Date: _angular_core.InputSignal; get tabindex(): 0 | -1; isTabbableDate: _angular_core.Signal; keydown($event: Event): void; focus(): void; blur(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class Calendar2Component implements OnInit { #private; readonly elementRef: ElementRef; intl: _angular_core.InputSignalWithTransform>; showOverflow: _angular_core.InputSignalWithTransform; enableOverflow: _angular_core.InputSignalWithTransform; removeYearOverflow: _angular_core.InputSignalWithTransform; hideToday: _angular_core.InputSignalWithTransform; hasTodayButton: _angular_core.InputSignalWithTransform; hideWeekend: _angular_core.InputSignalWithTransform; disableModeChange: _angular_core.InputSignalWithTransform; date: _angular_core.ModelSignal; tabbableDate: _angular_core.ModelSignal; mode: _angular_core.ModelSignal; displayMode: _angular_core.ModelSignal; ranges: _angular_core.InputSignal; getCellInfo: _angular_core.InputSignal<(date: Date, displayMode: CalendarMode) => CellStatus>; month: _angular_core.Signal; year: _angular_core.Signal; decade: _angular_core.Signal; previousMonth: _angular_core.Signal; nextMonth: _angular_core.Signal; nextPage: _angular_core.OutputEmitterRef; previousPage: _angular_core.OutputEmitterRef; dateClicked: _angular_core.OutputEmitterRef; dateHovered: _angular_core.ModelSignal; todayLabel: string; thisMonthLabel: string; thisYearLabel: string; calendar2CellInstances: _angular_core.Signal; daysOfWeek: { long: string; short: string; }[]; monthGridDisplay: _angular_core.Signal; yearGridDisplay: _angular_core.Signal; decadeGridDisplay: _angular_core.Signal; currentMonthLabel: _angular_core.Signal; currentYearLabel: _angular_core.Signal; currentDecadeLabel: _angular_core.Signal; constructor(); focusTabbableDate(): void; blurTabbableDate(): void; clickToday(): void; ngOnInit(): void; onCellClicked(date: Date): void; dateToCellInfo(date: Date, isOverflow?: boolean): CalendarCellInfo; getRangeInfo(date: Date, scope: CalendarMode, isOverflow?: boolean): { range: DateRange; isStart: boolean; isEnd: boolean; label: string; class: string; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare function getDateFormat(locale: string, mode?: CalendarMode): string; declare function getSeparator(locale: string): string; declare function getLocalizedDateFormat(locale: string, period?: 'year' | 'month' | 'day'): string; declare const DATE_FORMAT: { readonly DATE: "date"; readonly DATE_ISO: "date-iso"; }; type DateFormat = (typeof DATE_FORMAT)[keyof typeof DATE_FORMAT]; declare abstract class AbstractDateComponent { protected locale: string; protected dateFormat: string; protected separator: string; protected dateFormatWithMode: _angular_core.Signal; intlDateTimeFormat: Intl.DateTimeFormat; intlDateTimeFormatMonth: Intl.DateTimeFormat; intlDateTimeFormatYear: Intl.DateTimeFormat; intl: _angular_core.InputSignalWithTransform>; onTouched?: () => void; disabled: _angular_core.WritableSignal; readonly format: _angular_core.InputSignal; protected inDateISOFormat: _angular_core.Signal; readonly ranges: _angular_core.InputSignalWithTransform; readonly hideToday: _angular_core.InputSignalWithTransform; readonly hasTodayButton: _angular_core.InputSignalWithTransform; readonly clearable: _angular_core.InputSignalWithTransform; readonly clearBehavior: _angular_core.InputSignal<"clear" | "reset">; readonly mode: _angular_core.InputSignal; readonly hideWeekend: _angular_core.InputSignalWithTransform; readonly getCellInfo: _angular_core.InputSignal<(day: Date, mode: CalendarMode) => CellStatus>; readonly min: _angular_core.InputSignalWithTransform; readonly max: _angular_core.InputSignalWithTransform; readonly focusedDate: _angular_core.InputSignalWithTransform; calendarMode: _angular_core.ModelSignal; readonly panelOpened: _angular_core.OutputEmitterRef; readonly panelClosed: _angular_core.OutputEmitterRef; readonly dateFormatLocalized: _angular_core.Signal; protected currentDate: _angular_core.WritableSignal; protected tabbableDate: _angular_core.WritableSignal; protected constructor(); isInMinMax(date: Date, mode: CalendarMode): boolean; isAfterMin(date: Date, mode: CalendarMode): boolean; isBeforeMax(date: Date, mode: CalendarMode): boolean; isValidDate(date: Date): boolean; prev(mode: CalendarMode): void; next(mode: CalendarMode): void; registerOnTouched(fn: () => void): void; setDisabledState?(isDisabled: boolean): void; move(direction: 1 | -1, mode: CalendarMode): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type DateInputValidatorErrorType = { min: true; max: true; date: true; }; declare class DateInputComponent extends AbstractDateComponent implements OnInit, ControlValueAccessor, Validator, FilterPillInputComponent { #private; parentInput: FilterPillInputComponent; ngControl: NgControl; autocomplete: _angular_core.InputSignal; placeholder: _angular_core.InputSignal; disableOverflow: _angular_core.InputSignalWithTransform; hideOverflow: _angular_core.InputSignalWithTransform; widthAuto: _angular_core.InputSignalWithTransform; filterPillDisabled: _angular_core.WritableSignal; popoverPositions: ConnectionPositionPair[]; inputFocused: _angular_core.WritableSignal; selectedDate: _angular_core.WritableSignal; initialValue: _angular_core.WritableSignal; dateFromWriteValue: _angular_core.WritableSignal; calendar: _angular_core.Signal; inputRef: _angular_core.Signal>; displayValue: _angular_core.Signal; userTextInput: _angular_core.WritableSignal; combinedGetCellInfo: (date: Date, mode: CalendarMode) => CellStatus; previousButton: _angular_core.Signal>; nextButton: _angular_core.Signal>; isFilterPill: boolean; get isWidthAuto(): boolean; isFilterPillEmpty: _angular_core.Signal; isFilterPillClearable: _angular_core.Signal; filterPillPopoverCloseFn?: () => void; get isNavigationButtonFocused(): boolean; constructor(); ngOnInit(): void; registerFilterPillClosePopover(closeFn: () => void): void; enableFilterPillMode(): void; clearFilterPillValue(): void; getDefaultFilterPillIcon(): LuccaIcon; openPopover(ref: PopoverDirective): void; arrowDown(popoverRef: PopoverDirective): void; spaceDown(event: Event, popoverRef: PopoverDirective): void; validate(control: AbstractControl): Partial | null; writeValue(date: Date | string | null): void; registerOnChange(fn: (value: Date | string | null) => void): void; setDisabledState(isDisabled: boolean): void; reset(): Date | null; clear(): void; currentDateChangeFromCalendar(date: Date): void; dateClicked(date: Date, popoverRef: PopoverDirective): void; inputBlurred(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface CalendarShortcut { label: string; range: DateRange; } declare const PremadeShortcuts: Record DateRange>; declare class DateRangeInputComponent extends AbstractDateComponent implements OnInit, ControlValueAccessor, Validator, FilterPillInputComponent { #private; parentInput: FilterPillInputComponent; hasTwoCalendars: Signal; idSuffix: number; startTextInputRef: Signal>; startUserTextInput: _angular_core.WritableSignal; endTextInputRef: Signal>; endUserTextInput: _angular_core.WritableSignal; initialValue: _angular_core.WritableSignal; selectedRange: _angular_core.WritableSignal; dateHovered: _angular_core.WritableSignal; placeholder: _angular_core.InputSignal; widthAuto: _angular_core.InputSignalWithTransform; label: Signal; popoverPositions: ConnectionPositionPair[]; inputFocused: _angular_core.WritableSignal; editedField: _angular_core.WritableSignal<0 | 1 | -1>; highlightedField: _angular_core.WritableSignal<0 | 1 | -1>; shortcuts: _angular_core.InputSignal; autocomplete: _angular_core.InputSignal; protected currentRightDate: Signal; protected currentStartDisplayDate: Signal; protected currentEndDisplayDate: Signal; calendars: Signal; combinedGetCellInfo: (date: Date, mode: CalendarMode) => CellStatus; calendarRanges: Signal; startLabel: Signal; endLabel: Signal; previousButton: Signal>; nextButton: Signal>; focusedCalendarIndex: _angular_core.WritableSignal; focusedCalendar: Signal; isFilterPill: boolean; get isWidthAuto(): boolean; isFilterPillEmpty: Signal; isFilterPillClearable: Signal; filterPillPopoverCloseFn?: () => void; filterPillDisabled: _angular_core.WritableSignal; get isNavigationButtonFocused(): boolean; constructor(); ngOnInit(): void; getNextCalendarDate(date: Date): Date; popoverClosed(): void; inputBlur(): void; fixOrderIfNeeded(): void; tabbableDateChange(date: Date, calendarIndex: number): void; openPopover(ref: PopoverDirective, propertyToFocus?: 'start' | 'end', focusTabbableDate?: boolean): void; dateClicked(date: Date, popoverRef: PopoverDirective): void; arrowDown(popoverRef: PopoverDirective, fieldToFocus: 'start' | 'end'): void; validate(control: AbstractControl): ValidationErrors | null; writeValue(dateRange: DateRange | DateRangeInput | null): void; registerOnChange(fn: (value: DateRange | DateRangeInput | null) => void): void; setDisabledState(isDisabled: boolean): void; clear(): void; currentDateChangeFromCalendar(date: Date): void; getDateLabelForInput(date: Date): string; selectShortcut(shortcut: CalendarShortcut, popover: PopoverDirective): void; registerFilterPillClosePopover(closeFn: () => void): void; enableFilterPillMode(): void; clearFilterPillValue(): void; getDefaultFilterPillIcon(): LuccaIcon; textInputChange(inputValue: string, rangeProperty: 'start' | 'end'): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { Calendar2Component, DateInputComponent, DateRangeInputComponent, PremadeShortcuts, getDateFormat, getLocalizedDateFormat, getSeparator }; export type { CalendarMode, CalendarShortcut, CellStatus, DateInputValidatorErrorType, DateRange, DateRangeInput };