import { ScrollStrategy } from '@angular/cdk/overlay'; import { ElementRef, EventEmitter, FactoryProvider, InjectionToken, OnDestroy, Provider } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { RealsoftDatepickerInputBase } from './datepicker-input'; import { DateAdapter } from './shared/date-adapter'; import { RealsoftMomentDateAdapterOptions } from './shared/moment-date-adapter'; import * as i0 from "@angular/core"; export declare class DateRange { readonly start: D | null; readonly end: D | null; constructor(start: D | null, // The start date of the range end: D | null); } export type ExtractDateTypeFromSelection = T extends DateRange ? D : NonNullable; export interface RealsoftDateSelectionModelChange { selection: S; source: unknown; previousSelection?: S; } export declare abstract class RealsoftDateSelectionModel> implements OnDestroy { readonly selection: S; protected _adapter: DateAdapter; private readonly _selectionChange; selectionChange: Observable>; constructor(selection: S, // The current selection _adapter: DateAdapter); updateSelection(value: S, source: unknown): void; _isValidDateInstance(date: D): boolean; abstract add(date: D | null): void; abstract isValid(): boolean; abstract isComplete(): boolean; abstract clone(): RealsoftDateSelectionModel; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } export declare class RealsoftSingleDateSelectionModel extends RealsoftDateSelectionModel { constructor(adapter: DateAdapter); add(date: D | null): void; isValid(): boolean; isComplete(): boolean; clone(): RealsoftSingleDateSelectionModel; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } export declare class RealsoftRangeDateSelectionModel extends RealsoftDateSelectionModel, D> { constructor(adapter: DateAdapter); add(date: D | null): void; isValid(): boolean; isComplete(): boolean; clone(): RealsoftRangeDateSelectionModel; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } export type RealsoftDatepickerDropdownPositionX = 'start' | 'end'; export type RealsoftDatepickerDropdownPositionY = 'above' | 'below'; export type DateFilterFn = (date: D | null) => boolean; export interface RealsoftDatepickerPanel, S, D = ExtractDateTypeFromSelection> { closedStream: EventEmitter; openedStream: EventEmitter; datepickerInput: C; id: string; disabled: boolean; opened: boolean; open(): void; registerInput(input: C): RealsoftDateSelectionModel; stateChanges: Subject; } export interface RealsoftDatepickerControl { getStartValue(): D | null; min: D | null; max: D | null; disabled: boolean; dateFilter: DateFilterFn; getConnectedOverlayOrigin(): ElementRef; getOverlayLabelId(): string | null; stateChanges: Observable; } export type RealsoftCalendarView = 'month' | 'year' | 'multi-year'; export type RealsoftCalendarCellCssClasses = string | string[] | Set | { [key: string]: any; }; export type RealsoftCalendarCellClassFunction = (date: D, view: 'month' | 'year' | 'multi-year') => RealsoftCalendarCellCssClasses; export declare const REALSOFT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; export declare class RealsoftCalendarCell { value: number; displayValue: string; ariaLabel: string; enabled: boolean; cssClasses: RealsoftCalendarCellCssClasses; compareValue: number; rawValue?: D; readonly id: number; constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: RealsoftCalendarCellCssClasses, compareValue?: number, rawValue?: D); } export interface RealsoftCalendarUserEvent { value: D; event: Event; } export declare class RealsoftDatepickerInputEvent { target: RealsoftDatepickerInputBase; targetElement: HTMLElement; value: D | null; constructor(target: RealsoftDatepickerInputBase, // Reference to the datepicker input component that emitted the event targetElement: HTMLElement); } export interface RealsoftFormFieldPartial { getConnectedOverlayOrigin(): ElementRef; getLabelId(): string | null; _elementRef: ElementRef; _shouldLabelFloat(): boolean; _hasFloatingLabel(): boolean; _labelId: string; } export type RealsoftDateFormats = { parse: { dateInput: any; timeInput?: any; }; display: { dateInput: any; monthLabel?: any; monthYearLabel: any; dateA11yLabel: any; monthYearA11yLabel: any; timeInput?: any; timeOptionLabel?: any; }; }; export declare const REALSOFT_MOMENT_DATE_FORMATS: RealsoftDateFormats; export declare const REALSOFT_DATE_FORMATS: InjectionToken; export declare function REALSOFT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: RealsoftSingleDateSelectionModel, adapter: DateAdapter): RealsoftSingleDateSelectionModel; export declare const REALSOFT_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider; export declare const REALSOFT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider; export declare function REALSOFT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent: RealsoftDateSelectionModel, adapter: DateAdapter): RealsoftDateSelectionModel; export declare const REALSOFT_DATE_LOCALE: InjectionToken<{}>; export declare function REALSOFT_DATE_LOCALE_FACTORY(): {}; export declare const REALSOFT_NATIVE_DATE_FORMATS: RealsoftDateFormats; export declare function provideNativeDateAdapter(formats?: RealsoftDateFormats): Provider[]; export declare function provideRealsoftMomentDateAdapter(formats?: RealsoftDateFormats, options?: RealsoftMomentDateAdapterOptions): Provider[];