1 | import { ComponentFactoryResolver, ComponentRef, OnChanges, ElementRef, EventEmitter, OnDestroy, Type, OnInit, SimpleChanges } from '@angular/core';
|
2 | import { Observable, ReplaySubject, Subject } from 'rxjs';
|
3 | import { NbOverlayRef } from '../cdk/overlay/mapping';
|
4 | import { NbAdjustableConnectedPositionStrategy, NbAdjustment, NbAdjustmentValues, NbPositionBuilderService } from '../cdk/overlay/overlay-position';
|
5 | import { NbOverlayService } from '../cdk/overlay/overlay-service';
|
6 | import { NbTriggerStrategy, NbTriggerStrategyBuilderService } from '../cdk/overlay/overlay-trigger';
|
7 | import { NbDatepickerContainerComponent } from './datepicker-container.component';
|
8 | import { NbCalendarRange, NbCalendarRangeComponent } from '../calendar/calendar-range.component';
|
9 | import { NbCalendarComponent } from '../calendar/calendar.component';
|
10 | import { NbCalendarCell, NbCalendarSize, NbCalendarViewMode, NbCalendarSizeValues, NbCalendarViewModeValues } from '../calendar-kit/model';
|
11 | import { NbDateService } from '../calendar-kit/services/date.service';
|
12 | import { NbDatepicker, NbPickerValidatorConfig } from './datepicker.directive';
|
13 | import { NbBooleanInput } from '../helpers';
|
14 | import * as i0 from "@angular/core";
|
15 |
|
16 |
|
17 |
|
18 | export declare abstract class NbBasePicker<D, T, P> extends NbDatepicker<T, D> {
|
19 | protected overlay: NbOverlayService;
|
20 | protected positionBuilder: NbPositionBuilderService;
|
21 | protected triggerStrategyBuilder: NbTriggerStrategyBuilderService;
|
22 | protected cfr: ComponentFactoryResolver;
|
23 | protected dateService: NbDateService<D>;
|
24 | protected dateServiceOptions: any;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | abstract format: string;
|
30 | |
31 |
|
32 |
|
33 |
|
34 | abstract boundingMonth: boolean;
|
35 | |
36 |
|
37 |
|
38 | abstract startView: NbCalendarViewMode;
|
39 | |
40 |
|
41 |
|
42 | abstract min: D;
|
43 | |
44 |
|
45 |
|
46 | abstract max: D;
|
47 | |
48 |
|
49 |
|
50 | abstract filter: (D: any) => boolean;
|
51 | |
52 |
|
53 |
|
54 | abstract dayCellComponent: Type<NbCalendarCell<D, T>>;
|
55 | |
56 |
|
57 |
|
58 | abstract monthCellComponent: Type<NbCalendarCell<D, T>>;
|
59 | |
60 |
|
61 |
|
62 | abstract yearCellComponent: Type<NbCalendarCell<D, T>>;
|
63 | |
64 |
|
65 |
|
66 |
|
67 | abstract size: NbCalendarSize;
|
68 | |
69 |
|
70 |
|
71 | abstract visibleDate: D;
|
72 | |
73 |
|
74 |
|
75 |
|
76 | abstract hideOnSelect: boolean;
|
77 | |
78 |
|
79 |
|
80 |
|
81 | abstract showNavigation: boolean;
|
82 | |
83 |
|
84 |
|
85 | abstract weekNumberSymbol: string;
|
86 | |
87 |
|
88 |
|
89 |
|
90 | abstract showWeekNumber: boolean;
|
91 | |
92 |
|
93 |
|
94 |
|
95 | abstract firstDayOfWeek: number | undefined;
|
96 | readonly formatChanged$: Subject<void>;
|
97 | |
98 |
|
99 |
|
100 | protected abstract pickerClass: Type<P>;
|
101 | |
102 |
|
103 |
|
104 | protected ref: NbOverlayRef;
|
105 | |
106 |
|
107 |
|
108 | protected container: ComponentRef<NbDatepickerContainerComponent>;
|
109 | |
110 |
|
111 |
|
112 | protected positionStrategy: NbAdjustableConnectedPositionStrategy;
|
113 | |
114 |
|
115 |
|
116 | protected triggerStrategy: NbTriggerStrategy;
|
117 | |
118 |
|
119 |
|
120 | protected hostRef: ElementRef;
|
121 | protected init$: ReplaySubject<void>;
|
122 | |
123 |
|
124 |
|
125 |
|
126 | protected onChange$: Subject<T>;
|
127 | |
128 |
|
129 |
|
130 | protected pickerRef: ComponentRef<any>;
|
131 | protected overlayOffset: number;
|
132 | protected adjustment: NbAdjustment;
|
133 | protected destroy$: Subject<void>;
|
134 | |
135 |
|
136 |
|
137 |
|
138 | protected queue: T | undefined;
|
139 | protected blur$: Subject<void>;
|
140 | protected constructor(overlay: NbOverlayService, positionBuilder: NbPositionBuilderService, triggerStrategyBuilder: NbTriggerStrategyBuilderService, cfr: ComponentFactoryResolver, dateService: NbDateService<D>, dateServiceOptions: any);
|
141 | /**
|
142 | * Returns picker instance.
|
143 | * */
|
144 | get picker(): any;
|
145 | /**
|
146 | * Stream of picker value changes.
|
147 | * */
|
148 | get valueChange(): Observable<T>;
|
149 | get isShown(): boolean;
|
150 | get init(): Observable<void>;
|
151 | /**
|
152 | * Emits when datepicker looses focus.
|
153 | */
|
154 | get blur(): Observable<void>;
|
155 | protected abstract get pickerValueChange(): Observable<T>;
|
156 | /**
|
157 | * Datepicker knows nothing about host html input element.
|
158 | * So, attach method attaches datepicker to the host input element.
|
159 | * */
|
160 | attach(hostRef: ElementRef): void;
|
161 | getValidatorConfig(): NbPickerValidatorConfig<D>;
|
162 | show(): void;
|
163 | shouldHide(): boolean;
|
164 | hide(): void;
|
165 | protected abstract writeQueue(): any;
|
166 | protected createOverlay(): void;
|
167 | protected openDatepicker(): void;
|
168 | protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy;
|
169 | protected subscribeOnPositionChange(): void;
|
170 | protected createTriggerStrategy(): NbTriggerStrategy;
|
171 | protected subscribeOnTriggers(): void;
|
172 | protected instantiatePicker(): void;
|
173 | /**
|
174 | * Subscribes on picker value changes and emit data through this.onChange$ subject.
|
175 | * */
|
176 | protected subscribeOnValueChange(): void;
|
177 | protected patchWithInputs(): void;
|
178 | protected checkFormat(): void;
|
179 | }
|
180 | export declare class NbBasePickerComponent<D, T, P> extends NbBasePicker<D, T, P> implements OnInit, OnChanges, OnDestroy {
|
181 | |
182 |
|
183 |
|
184 |
|
185 | format: string;
|
186 | |
187 |
|
188 |
|
189 |
|
190 | boundingMonth: boolean;
|
191 | |
192 |
|
193 |
|
194 | startView: NbCalendarViewMode;
|
195 | static ngAcceptInputType_startView: NbCalendarViewModeValues;
|
196 | |
197 |
|
198 |
|
199 | min: D;
|
200 | |
201 |
|
202 |
|
203 | max: D;
|
204 | |
205 |
|
206 |
|
207 | filter: (D: any) => boolean;
|
208 | |
209 |
|
210 |
|
211 | dayCellComponent: Type<NbCalendarCell<D, T>>;
|
212 | |
213 |
|
214 |
|
215 | monthCellComponent: Type<NbCalendarCell<D, T>>;
|
216 | |
217 |
|
218 |
|
219 | yearCellComponent: Type<NbCalendarCell<D, T>>;
|
220 | |
221 |
|
222 |
|
223 |
|
224 | size: NbCalendarSize;
|
225 | static ngAcceptInputType_size: NbCalendarSizeValues;
|
226 | |
227 |
|
228 |
|
229 | visibleDate: D;
|
230 | |
231 |
|
232 |
|
233 |
|
234 | hideOnSelect: boolean;
|
235 | |
236 |
|
237 |
|
238 |
|
239 | showNavigation: boolean;
|
240 | |
241 |
|
242 |
|
243 | weekNumberSymbol: string;
|
244 | |
245 |
|
246 |
|
247 |
|
248 | get showWeekNumber(): boolean;
|
249 | set showWeekNumber(value: boolean);
|
250 | protected _showWeekNumber: boolean;
|
251 | static ngAcceptInputType_showWeekNumber: NbBooleanInput;
|
252 | firstDayOfWeek: number | undefined;
|
253 | |
254 |
|
255 |
|
256 | overlayOffset: number;
|
257 | adjustment: NbAdjustment;
|
258 | static ngAcceptInputType_adjustment: NbAdjustmentValues;
|
259 | constructor(document: any, positionBuilder: NbPositionBuilderService, triggerStrategyBuilder: NbTriggerStrategyBuilderService, overlay: NbOverlayService, cfr: ComponentFactoryResolver, dateService: NbDateService<D>, dateServiceOptions: any);
|
260 | ngOnInit(): void;
|
261 | ngOnChanges(changes: SimpleChanges): void;
|
262 | ngOnDestroy(): void;
|
263 | protected pickerClass: Type<P>;
|
264 | protected get pickerValueChange(): Observable<T>;
|
265 | get value(): T;
|
266 | set value(value: T);
|
267 | protected writeQueue(): void;
|
268 | static ɵfac: i0.ɵɵFactoryDeclaration<NbBasePickerComponent<any, any, any>, [null, null, null, null, null, null, { optional: true; }]>;
|
269 | static ɵcmp: i0.ɵɵComponentDeclaration<NbBasePickerComponent<any, any, any>, "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>;
|
270 | }
|
271 |
|
272 |
|
273 |
|
274 |
|
275 | export declare class NbDatepickerComponent<D> extends NbBasePickerComponent<D, D, NbCalendarComponent<D>> {
|
276 | protected pickerClass: Type<NbCalendarComponent<D>>;
|
277 | |
278 |
|
279 |
|
280 | set date(date: D);
|
281 | |
282 |
|
283 |
|
284 | get dateChange(): EventEmitter<D>;
|
285 | get value(): D;
|
286 | set value(date: D);
|
287 | protected get pickerValueChange(): Observable<D>;
|
288 | protected writeQueue(): void;
|
289 | static ɵfac: i0.ɵɵFactoryDeclaration<NbDatepickerComponent<any>, never>;
|
290 | static ɵcmp: i0.ɵɵComponentDeclaration<NbDatepickerComponent<any>, "nb-datepicker", never, { "date": { "alias": "date"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
|
291 | }
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | export declare class NbRangepickerComponent<D> extends NbBasePickerComponent<D, NbCalendarRange<D>, NbCalendarRangeComponent<D>> {
|
297 | protected pickerClass: Type<NbCalendarRangeComponent<D>>;
|
298 | |
299 |
|
300 |
|
301 | set range(range: NbCalendarRange<D>);
|
302 | |
303 |
|
304 |
|
305 | get rangeChange(): EventEmitter<NbCalendarRange<D>>;
|
306 | get value(): NbCalendarRange<D>;
|
307 | set value(range: NbCalendarRange<D>);
|
308 | protected get pickerValueChange(): Observable<NbCalendarRange<D>>;
|
309 | shouldHide(): boolean;
|
310 | protected writeQueue(): void;
|
311 | static ɵfac: i0.ɵɵFactoryDeclaration<NbRangepickerComponent<any>, never>;
|
312 | static ɵcmp: i0.ɵɵComponentDeclaration<NbRangepickerComponent<any>, "nb-rangepicker", never, { "range": { "alias": "range"; "required": false; }; }, { "rangeChange": "rangeChange"; }, never, never, false, never>;
|
313 | }
|