import { ComponentFactoryResolver, ComponentRef, OnChanges, ElementRef, EventEmitter, OnDestroy, Type, OnInit, SimpleChanges } from '@angular/core'; import { Observable, ReplaySubject, Subject } from 'rxjs'; import { NbOverlayRef } from '../cdk/overlay/mapping'; import { NbAdjustableConnectedPositionStrategy, NbAdjustment, NbAdjustmentValues, NbPositionBuilderService } from '../cdk/overlay/overlay-position'; import { NbOverlayService } from '../cdk/overlay/overlay-service'; import { NbTriggerStrategy, NbTriggerStrategyBuilderService } from '../cdk/overlay/overlay-trigger'; import { NbDatepickerContainerComponent } from './datepicker-container.component'; import { NbCalendarRange, NbCalendarRangeComponent } from '../calendar/calendar-range.component'; import { NbCalendarComponent } from '../calendar/calendar.component'; import { NbCalendarCell, NbCalendarSize, NbCalendarViewMode, NbCalendarSizeValues, NbCalendarViewModeValues } from '../calendar-kit/model'; import { NbDateService } from '../calendar-kit/services/date.service'; import { NbDatepicker, NbPickerValidatorConfig } from './datepicker.directive'; import { NbBooleanInput } from '../helpers'; import * as i0 from "@angular/core"; /** * The `NbBasePicker` component concentrates overlay manipulation logic. * */ export declare abstract class NbBasePicker extends NbDatepicker { protected overlay: NbOverlayService; protected positionBuilder: NbPositionBuilderService; protected triggerStrategyBuilder: NbTriggerStrategyBuilderService; protected cfr: ComponentFactoryResolver; protected dateService: NbDateService; protected dateServiceOptions: any; /** * Datepicker date format. Can be used only with date adapters (moment, date-fns) since native date * object doesn't support formatting. * */ abstract format: string; /** * Defines if we should render previous and next months * in the current month view. * */ abstract boundingMonth: boolean; /** * Defines starting view for calendar. * */ abstract startView: NbCalendarViewMode; /** * Minimum available date for selection. * */ abstract min: D; /** * Maximum available date for selection. * */ abstract max: D; /** * Predicate that decides which cells will be disabled. * */ abstract filter: (D: any) => boolean; /** * Custom day cell component. Have to implement `NbCalendarCell` interface. * */ abstract dayCellComponent: Type>; /** * Custom month cell component. Have to implement `NbCalendarCell` interface. * */ abstract monthCellComponent: Type>; /** * Custom year cell component. Have to implement `NbCalendarCell` interface. * */ abstract yearCellComponent: Type>; /** * Size of the calendar and entire components. * Can be 'medium' which is default or 'large'. * */ abstract size: NbCalendarSize; /** * Depending on this date a particular month is selected in the calendar */ abstract visibleDate: D; /** * Hide picker when a date or a range is selected, `true` by default * @type {boolean} */ abstract hideOnSelect: boolean; /** * Determines should we show calendar navigation or not. * @type {boolean} */ abstract showNavigation: boolean; /** * Sets symbol used as a header for week numbers column * */ abstract weekNumberSymbol: string; /** * Determines should we show week numbers column. * False by default. * */ abstract showWeekNumber: boolean; /** * Sets first day of the week, it can be 1 if week starts from monday and 0 if from sunday and so on. * `undefined` means that default locale setting will be used. * */ abstract firstDayOfWeek: number | undefined; readonly formatChanged$: Subject; /** * Calendar component class that has to be instantiated inside overlay. * */ protected abstract pickerClass: Type

; /** * Overlay reference object. * */ protected ref: NbOverlayRef; /** * Datepicker container that contains instantiated picker. * */ protected container: ComponentRef; /** * Positioning strategy used by overlay. * */ protected positionStrategy: NbAdjustableConnectedPositionStrategy; /** * Trigger strategy used by overlay * */ protected triggerStrategy: NbTriggerStrategy; /** * HTML input reference to which datepicker connected. * */ protected hostRef: ElementRef; protected init$: ReplaySubject; /** * Stream of picker changes. Required to be the subject because picker hides and shows and picker * change stream becomes recreated. * */ protected onChange$: Subject; /** * Reference to the picker instance itself. * */ protected pickerRef: ComponentRef; protected overlayOffset: number; protected adjustment: NbAdjustment; protected destroy$: Subject; /** * Queue contains the last value that was applied to the picker when it was hidden. * This value will be passed to the picker as soon as it shown. * */ protected queue: T | undefined; protected blur$: Subject; protected constructor(overlay: NbOverlayService, positionBuilder: NbPositionBuilderService, triggerStrategyBuilder: NbTriggerStrategyBuilderService, cfr: ComponentFactoryResolver, dateService: NbDateService, dateServiceOptions: any); /** * Returns picker instance. * */ get picker(): any; /** * Stream of picker value changes. * */ get valueChange(): Observable; get isShown(): boolean; get init(): Observable; /** * Emits when datepicker looses focus. */ get blur(): Observable; protected abstract get pickerValueChange(): Observable; /** * Datepicker knows nothing about host html input element. * So, attach method attaches datepicker to the host input element. * */ attach(hostRef: ElementRef): void; getValidatorConfig(): NbPickerValidatorConfig; show(): void; shouldHide(): boolean; hide(): void; protected abstract writeQueue(): any; protected createOverlay(): void; protected openDatepicker(): void; protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy; protected subscribeOnPositionChange(): void; protected createTriggerStrategy(): NbTriggerStrategy; protected subscribeOnTriggers(): void; protected instantiatePicker(): void; /** * Subscribes on picker value changes and emit data through this.onChange$ subject. * */ protected subscribeOnValueChange(): void; protected patchWithInputs(): void; protected checkFormat(): void; } export declare class NbBasePickerComponent extends NbBasePicker implements OnInit, OnChanges, OnDestroy { /** * Datepicker date format. Can be used only with date adapters (moment, date-fns) since native date * object doesn't support formatting. * */ format: string; /** * Defines if we should render previous and next months * in the current month view. * */ boundingMonth: boolean; /** * Defines starting view for calendar. * */ startView: NbCalendarViewMode; static ngAcceptInputType_startView: NbCalendarViewModeValues; /** * Minimum available date for selection. * */ min: D; /** * Maximum available date for selection. * */ max: D; /** * Predicate that decides which cells will be disabled. * */ filter: (D: any) => boolean; /** * Custom day cell component. Have to implement `NbCalendarCell` interface. * */ dayCellComponent: Type>; /** * Custom month cell component. Have to implement `NbCalendarCell` interface. * */ monthCellComponent: Type>; /** * Custom year cell component. Have to implement `NbCalendarCell` interface. * */ yearCellComponent: Type>; /** * Size of the calendar and entire components. * Can be 'medium' which is default or 'large'. * */ size: NbCalendarSize; static ngAcceptInputType_size: NbCalendarSizeValues; /** * Depending on this date a particular month is selected in the calendar */ visibleDate: D; /** * Hide picker when a date or a range is selected, `true` by default * @type {boolean} */ hideOnSelect: boolean; /** * Determines should we show calendars navigation or not. * @type {boolean} */ showNavigation: boolean; /** * Sets symbol used as a header for week numbers column * */ weekNumberSymbol: string; /** * Determines should we show week numbers column. * False by default. * */ get showWeekNumber(): boolean; set showWeekNumber(value: boolean); protected _showWeekNumber: boolean; static ngAcceptInputType_showWeekNumber: NbBooleanInput; firstDayOfWeek: number | undefined; /** * Determines picker overlay offset (in pixels). * */ overlayOffset: number; adjustment: NbAdjustment; static ngAcceptInputType_adjustment: NbAdjustmentValues; constructor(document: any, positionBuilder: NbPositionBuilderService, triggerStrategyBuilder: NbTriggerStrategyBuilderService, overlay: NbOverlayService, cfr: ComponentFactoryResolver, dateService: NbDateService, dateServiceOptions: any); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; protected pickerClass: Type

; protected get pickerValueChange(): Observable; get value(): T; set value(value: T); protected writeQueue(): void; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, null, null, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, { "format": { "alias": "format"; "required": false; }; "boundingMonth": { "alias": "boundingMonth"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "dayCellComponent": { "alias": "dayCellComponent"; "required": false; }; "monthCellComponent": { "alias": "monthCellComponent"; "required": false; }; "yearCellComponent": { "alias": "yearCellComponent"; "required": false; }; "size": { "alias": "size"; "required": false; }; "visibleDate": { "alias": "visibleDate"; "required": false; }; "hideOnSelect": { "alias": "hideOnSelect"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "weekNumberSymbol": { "alias": "weekNumberSymbol"; "required": false; }; "showWeekNumber": { "alias": "showWeekNumber"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "overlayOffset": { "alias": "overlayOffset"; "required": false; }; "adjustment": { "alias": "adjustment"; "required": false; }; }, {}, never, never, false, never>; } /** * The DatePicker components itself. * Provides a proxy to `NbCalendar` options as well as custom picker options. */ export declare class NbDatepickerComponent extends NbBasePickerComponent> { protected pickerClass: Type>; /** * Date which will be rendered as selected. * */ set date(date: D); /** * Emits date when selected. * */ get dateChange(): EventEmitter; get value(): D; set value(date: D); protected get pickerValueChange(): Observable; protected writeQueue(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nb-datepicker", never, { "date": { "alias": "date"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, false, never>; } /** * The RangeDatePicker components itself. * Provides a proxy to `NbCalendarRange` options as well as custom picker options. */ export declare class NbRangepickerComponent extends NbBasePickerComponent, NbCalendarRangeComponent> { protected pickerClass: Type>; /** * Range which will be rendered as selected. * */ set range(range: NbCalendarRange); /** * Emits range when start selected and emits again when end selected. * */ get rangeChange(): EventEmitter>; get value(): NbCalendarRange; set value(range: NbCalendarRange); protected get pickerValueChange(): Observable>; shouldHide(): boolean; protected writeQueue(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nb-rangepicker", never, { "range": { "alias": "range"; "required": false; }; }, { "rangeChange": "rangeChange"; }, never, never, false, never>; }