import * as i0 from '@angular/core'; import { PipeTransform, OnInit, ChangeDetectorRef, ElementRef, Renderer2, EventEmitter, TemplateRef, AfterViewInit, ViewContainerRef, InjectionToken } from '@angular/core'; import { ALuDateAdapter, LuDateGranularity, ELuDateGranularity, LuTranslation } from '@lucca-front/ng/core'; import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms'; import { ALuInput } from '@lucca-front/ng/input'; import { ALuPickerPanel, ILuInputWithPicker } from '@lucca-front/ng/picker'; import { Overlay } from '@angular/cdk/overlay'; import { ALuSelectInputComponent } from '@lucca-front/ng/select'; import { Observable } from 'rxjs'; declare class LuDateAdapterPipe implements PipeTransform { private _adapter; constructor(_adapter: ALuDateAdapter); transform(d: D, format?: string): string; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵpipe: i0.ɵɵPipeDeclaration, "luDate", true>; } declare class LuDateAdapterModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface LuCalendarInputLabel { previous: string; next: string; } interface ICalendarItem { id: string; date: D; mods: string[]; label: string; isDisabled: boolean; granularity: LuDateGranularity; } declare abstract class ACalendarItem implements ICalendarItem { get id(): string; date: D; mods: string[]; isDisabled: boolean; label: string; readonly granularity: LuDateGranularity; } declare class DayItem extends ACalendarItem implements ICalendarItem { date: D; label: string; readonly granularity = ELuDateGranularity.day; constructor(date: D, label: string); } declare class MonthItem extends ACalendarItem implements ICalendarItem { date: D; label: string; readonly granularity = ELuDateGranularity.month; constructor(date: D, label: string); } declare class YearItem extends ACalendarItem implements ICalendarItem { date: D; label: string; readonly granularity = ELuDateGranularity.year; constructor(date: D, label: string); } declare class DecadeItem extends ACalendarItem implements ICalendarItem { date: D; label: string; readonly granularity = ELuDateGranularity.decade; constructor(date: D, label: string); } declare class LuCalendarItemFactory { private _adapter; constructor(_adapter: ALuDateAdapter); forgeDay(d: D, format?: string): DayItem; forgeMonth(d: D, format?: string): MonthItem; forgeYear(d: D, format?: string): YearItem; forgeDecade(d: D, format?: string): DecadeItem; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class LuCalendarInputComponent extends ALuInput implements ControlValueAccessor, OnInit, Validator { private _locale; private _factory; private _adapter; intl: LuCalendarInputLabel; min?: D; max?: D; granularity: LuDateGranularity; startOn: D; viewGranularity: LuDateGranularity; header: ICalendarItem; items: ICalendarItem[]; get mod(): "mod-yearlyView" | "mod-monthlyView" | "mod-dailyView"; labels: string[]; constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _renderer: Renderer2, _locale: string, _factory: LuCalendarItemFactory, _adapter: ALuDateAdapter); ngOnInit(): void; writeValue(value?: D): void; initDayLabels(): void; protected render(): void; protected renderDailyView(month?: D): void; protected renderMonthlyView(year?: D): void; protected renderYearlyView(decade?: D): void; protected applyDailyMods(): void; protected applyMonthlyMods(): void; protected applyYearlyMods(): void; select(item: ICalendarItem): void; protected selectDay(item: ICalendarItem): void; protected selectMonth(item: ICalendarItem): void; protected selectYear(item: ICalendarItem): void; previous(): void; next(): void; trackBy(_idx: any, item: ICalendarItem): string; increaseGranularity(): void; protected nextMonth(): void; protected nextYear(): void; protected nextDecade(): void; protected previousMonth(): void; protected previousYear(): void; protected previousDecade(): void; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-calendar", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "granularity": { "alias": "granularity"; "required": false; }; "startOn": { "alias": "startOn"; "required": false; }; }, {}, never, never, true, never>; } declare class LuCalendarInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class LuDatePickerComponent extends ALuPickerPanel { private _adapter; _value: D; min?: D; max?: D; granularity: LuDateGranularity; startOn: D; close: EventEmitter; open: EventEmitter; hovered: EventEmitter; onSelectValue: EventEmitter; set vcTemplateRef(tr: TemplateRef); constructor(_adapter: ALuDateAdapter); _emitOpenEvent(): void; _emitCloseEvent(): void; _emitHoveredEvent(h: boolean): void; _emitSelectValue(val: D): void; setValue(value: D): void; _onCalendar(val: D): void; _onInput(val: D): void; _onEnter(): void; _handleKeydown(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-date-picker", ["LuDatePicker"], { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "granularity": { "alias": "granularity"; "required": false; }; "startOn": { "alias": "startOn"; "required": false; }; }, { "close": "close"; "open": "open"; "hovered": "hovered"; "onSelectValue": "onSelectValue"; }, never, never, true, never>; } declare class LuDateInputDirective extends ALuInput implements Validator, OnInit { private _adapter; private _focused; min?: D; max?: D; granularity: LuDateGranularity; set placeholder(p: string); private _intl; constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _renderer: Renderer2, _adapter: ALuDateAdapter); ngOnInit(): void; protected render(): void; onInput(event: any): void; private parse; onFocus(): void; onBlur(): void; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "input[luDateInput]", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "granularity": { "alias": "granularity"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>; } declare class LuDateSelectInputComponent extends ALuSelectInputComponent implements ControlValueAccessor, ILuInputWithPicker, AfterViewInit, Validator { protected _changeDetectorRef: ChangeDetectorRef; protected _overlay: Overlay; protected _elementRef: ElementRef; protected _viewContainerRef: ViewContainerRef; protected _renderer: Renderer2; private _adapter; min?: D; max?: D; granularity: LuDateGranularity; set inputPlaceholder(p: string); hideClearer: boolean; protected _startOn: D; set startOn(s: D); get startOn(): D; get format(): string; private _intl; constructor(_changeDetectorRef: ChangeDetectorRef, _overlay: Overlay, _elementRef: ElementRef, _viewContainerRef: ViewContainerRef, _renderer: Renderer2, _adapter: ALuDateAdapter); validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-date-select", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "granularity": { "alias": "granularity"; "required": false; }; "inputPlaceholder": { "alias": "placeholder"; "required": false; }; "hideClearer": { "alias": "hideClearer"; "required": false; }; "startOn": { "alias": "startOn"; "required": false; }; }, {}, never, never, true, never>; } declare class LuDateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const luRelativeTimeFormatUnit: readonly ["second", "minute", "hour", "day", "week", "month", "year"]; type LuRelativeTimeFormatUnit = (typeof luRelativeTimeFormatUnit)[number]; interface LuRelativeTime { /** * The relevant unit for the relative time. */ unit: LuRelativeTimeFormatUnit; /** * The integer value of the relative time. * Negative values are used for past dates. */ value: number; } declare class LuHumanizeDateFormatter { #private; format(relativeTime: LuRelativeTime): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class LuHumanizeDatePipe implements PipeTransform { #private; transform(value: Date | string | number, allowedUnits?: readonly LuRelativeTimeFormatUnit[]): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare function getRelativeTime(date: number | Date, reference: number | Date, allowedUnits?: readonly LuRelativeTimeFormatUnit[]): LuRelativeTime; declare function relativeTimeTimer(date: Date | number, allowedUnits?: readonly LuRelativeTimeFormatUnit[]): Observable; declare class LuDateInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const LU_DATE_INPUT_TRANSLATIONS: InjectionToken>; interface ILuDateInputLabel { placeholderDay: string; placeholderMonth: string; placeholderYear: string; } declare const luDateInputTranslations: LuTranslation; declare class LuDatePickerModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class LuDateSelectInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const LU_DATE_SELECT_INPUT_TRANSLATIONS: InjectionToken>; interface ILuDateSelectInputLabel { placeholderDay: string; placeholderMonth: string; placeholderYear: string; } declare const luDateSelectInputTranslations: LuTranslation; export { LU_DATE_INPUT_TRANSLATIONS, LU_DATE_SELECT_INPUT_TRANSLATIONS, LuCalendarInputComponent, LuCalendarInputModule, LuDateAdapterModule, LuDateAdapterPipe, LuDateInputDirective, LuDateInputModule, LuDateModule, LuDatePickerComponent, LuDatePickerModule, LuDateSelectInputComponent, LuDateSelectInputModule, LuHumanizeDateFormatter, LuHumanizeDatePipe, getRelativeTime, luDateInputTranslations, luDateSelectInputTranslations, luRelativeTimeFormatUnit, relativeTimeTimer }; export type { ILuDateInputLabel, ILuDateSelectInputLabel, LuRelativeTime, LuRelativeTimeFormatUnit };