@netwin/angular-datetime-picker 19.1.0 → 20.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +0 -1
  2. package/assets/style/picker.min.css +1 -1
  3. package/fesm2022/netwin-angular-datetime-picker.mjs +800 -3154
  4. package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
  5. package/index.d.ts +1473 -3
  6. package/package.json +4 -4
  7. package/lib/date-time/adapter/date-time-adapter.class.d.ts +0 -193
  8. package/lib/date-time/adapter/date-time-format.class.d.ts +0 -15
  9. package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +0 -72
  10. package/lib/date-time/adapter/native-date-time-format.class.d.ts +0 -5
  11. package/lib/date-time/adapter/native-date-time.module.d.ts +0 -12
  12. package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +0 -67
  13. package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +0 -5
  14. package/lib/date-time/calendar-body.component.d.ts +0 -79
  15. package/lib/date-time/calendar-month-view.component.d.ts +0 -141
  16. package/lib/date-time/calendar-multi-year-view.component.d.ts +0 -107
  17. package/lib/date-time/calendar-year-view.component.d.ts +0 -120
  18. package/lib/date-time/calendar.component.d.ts +0 -169
  19. package/lib/date-time/date-time-inline.component.d.ts +0 -115
  20. package/lib/date-time/date-time-picker-container.component.d.ts +0 -131
  21. package/lib/date-time/date-time-picker-input.directive.d.ts +0 -172
  22. package/lib/date-time/date-time-picker-intl.service.d.ts +0 -53
  23. package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -23
  24. package/lib/date-time/date-time-picker.animations.d.ts +0 -8
  25. package/lib/date-time/date-time-picker.component.d.ts +0 -171
  26. package/lib/date-time/date-time.class.d.ts +0 -103
  27. package/lib/date-time/date-time.module.d.ts +0 -22
  28. package/lib/date-time/numberedFixLen.pipe.d.ts +0 -10
  29. package/lib/date-time/options-provider.d.ts +0 -23
  30. package/lib/date-time/timer-box.component.d.ts +0 -42
  31. package/lib/date-time/timer.component.d.ts +0 -131
  32. package/lib/dialog/dialog-config.class.d.ts +0 -169
  33. package/lib/dialog/dialog-container.component.d.ts +0 -69
  34. package/lib/dialog/dialog-ref.class.d.ts +0 -51
  35. package/lib/dialog/dialog.module.d.ts +0 -11
  36. package/lib/dialog/dialog.service.d.ts +0 -76
  37. package/lib/utils/array.utils.d.ts +0 -2
  38. package/lib/utils/constants.d.ts +0 -16
  39. package/lib/utils/date.utils.d.ts +0 -9
  40. package/lib/utils/index.d.ts +0 -4
  41. package/lib/utils/object.utils.d.ts +0 -8
  42. package/public_api.d.ts +0 -21
package/index.d.ts CHANGED
@@ -1,5 +1,1475 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, OutputRef, AfterContentInit, AfterViewChecked, OnInit, OnDestroy, Provider } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/platform';
4
+ import * as rxjs from 'rxjs';
5
+ import { Subject } from 'rxjs';
6
+ import { ControlValueAccessor } from '@angular/forms';
7
+
8
+ declare class NativeDateTimeModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
12
+ }
13
+ declare class OwlNativeDateTimeModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlNativeDateTimeModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OwlNativeDateTimeModule, never, [typeof NativeDateTimeModule], never>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<OwlNativeDateTimeModule>;
17
+ }
18
+
19
+ /** InjectionToken for date time picker that can be used to override default locale code. */
20
+ declare const OWL_DATE_TIME_LOCALE: InjectionToken<string>;
21
+ /** Provider for OWL_DATE_TIME_LOCALE injection token. */
22
+ declare const OWL_DATE_TIME_LOCALE_PROVIDER: {
23
+ provide: InjectionToken<string>;
24
+ useExisting: InjectionToken<string>;
25
+ };
26
+ declare abstract class DateTimeAdapter<T> {
27
+ /** The locale to use for all dates. */
28
+ protected locale: string;
29
+ /** A stream that emits when the locale changes. */
30
+ protected _localeChanges: Subject<string>;
31
+ localeChanges: rxjs.Observable<string>;
32
+ /** total milliseconds in a day. */
33
+ protected readonly millisecondsInDay = 86400000;
34
+ /** total milliseconds in a minute. */
35
+ protected readonly milliseondsInMinute = 60000;
36
+ /**
37
+ * Get the year of the given date
38
+ */
39
+ abstract getYear(date: T): number;
40
+ /**
41
+ * Get the month of the given date
42
+ * 0 -- January
43
+ * 11 -- December
44
+ */
45
+ abstract getMonth(date: T): number;
46
+ /**
47
+ * Get the day of the week of the given date
48
+ * 0 -- Sunday
49
+ * 6 -- Saturday
50
+ */
51
+ abstract getDay(date: T): number;
52
+ /**
53
+ * Get the day num of the given date
54
+ */
55
+ abstract getDate(date: T): number;
56
+ /**
57
+ * Get the hours of the given date
58
+ */
59
+ abstract getHours(date: T): number;
60
+ /**
61
+ * Get the minutes of the given date
62
+ */
63
+ abstract getMinutes(date: T): number;
64
+ /**
65
+ * Get the seconds of the given date
66
+ */
67
+ abstract getSeconds(date: T): number;
68
+ /**
69
+ * Get the milliseconds timestamp of the given date
70
+ */
71
+ abstract getTime(date: T): number;
72
+ /**
73
+ * Gets the number of days in the month of the given date.
74
+ */
75
+ abstract getNumDaysInMonth(date: T): number;
76
+ /**
77
+ * Get the number of calendar days between the given dates.
78
+ * If dateLeft is before dateRight, it would return positive value
79
+ * If dateLeft is after dateRight, it would return negative value
80
+ */
81
+ abstract differenceInCalendarDays(dateLeft: T, dateRight: T): number;
82
+ /**
83
+ * Gets the name for the year of the given date.
84
+ */
85
+ abstract getYearName(date: T): string;
86
+ /**
87
+ * Get a list of month names
88
+ */
89
+ abstract getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
90
+ /**
91
+ * Get a list of week names
92
+ */
93
+ abstract getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
94
+ /**
95
+ * Gets a list of names for the dates of the month.
96
+ */
97
+ abstract getDateNames(): Array<string>;
98
+ /**
99
+ * Return a Date object as a string, using the ISO standard
100
+ */
101
+ abstract toIso8601(date: T): string;
102
+ /**
103
+ * Check if the give dates are equal
104
+ */
105
+ abstract isEqual(dateLeft: T, dateRight: T): boolean;
106
+ /**
107
+ * Check if the give dates are the same day
108
+ */
109
+ abstract isSameDay(dateLeft: T, dateRight: T): boolean;
110
+ /**
111
+ * Checks whether the given date is valid.
112
+ */
113
+ abstract isValid(date: T): boolean;
114
+ /**
115
+ * Gets date instance that is not valid.
116
+ */
117
+ abstract invalid(): T;
118
+ /**
119
+ * Checks whether the given object is considered a date instance by this DateTimeAdapter.
120
+ */
121
+ abstract isDateInstance(obj: unknown): obj is T;
122
+ /**
123
+ * Add the specified number of years to the given date
124
+ */
125
+ abstract addCalendarYears(date: T, amount: number): T;
126
+ /**
127
+ * Add the specified number of months to the given date
128
+ */
129
+ abstract addCalendarMonths(date: T, amount: number): T;
130
+ /**
131
+ * Add the specified number of days to the given date
132
+ */
133
+ abstract addCalendarDays(date: T, amount: number): T;
134
+ /**
135
+ * Set the hours to the given date.
136
+ */
137
+ abstract setHours(date: T, amount: number): T;
138
+ /**
139
+ * Set the minutes to the given date.
140
+ */
141
+ abstract setMinutes(date: T, amount: number): T;
142
+ /**
143
+ * Set the seconds to the given date.
144
+ */
145
+ abstract setSeconds(date: T, amount: number): T;
146
+ /**
147
+ * Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
148
+ * month and date.
149
+ */
150
+ abstract createDate(year: number, month: number, date: number): T;
151
+ abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
152
+ /**
153
+ * Clone the given date
154
+ */
155
+ abstract clone(date: T): T;
156
+ /**
157
+ * Get a new moment
158
+ */
159
+ abstract now(): T;
160
+ /**
161
+ * Formats a date as a string according to the given format.
162
+ */
163
+ abstract format(date: T, displayFormat: Intl.DateTimeFormatOptions): string;
164
+ /**
165
+ * Parse a user-provided value to a Date Object
166
+ */
167
+ abstract parse(value: unknown): T | null;
168
+ /**
169
+ * Compare two given dates
170
+ * 1 if the first date is after the second,
171
+ * -1 if the first date is before the second
172
+ * 0 if dates are equal.
173
+ */
174
+ compare(first: T, second: T): number;
175
+ /**
176
+ * Check if two given dates are in the same year
177
+ * 1 if the first date's year is after the second,
178
+ * -1 if the first date's year is before the second
179
+ * 0 if two given dates are in the same year
180
+ */
181
+ compareYear(first: T, second: T): number;
182
+ /**
183
+ * Attempts to deserialize a value to a valid date object. This is different from parsing in that
184
+ * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
185
+ * string). The default implementation does not allow any deserialization, it simply checks that
186
+ * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
187
+ * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
188
+ * support passing values from your backend directly to these properties by overriding this method
189
+ * to also deserialize the format used by your backend.
190
+ */
191
+ deserialize(value: T | null): T | null;
192
+ /**
193
+ * Sets the locale used for all dates.
194
+ */
195
+ setLocale(locale: string): void;
196
+ /**
197
+ * Get the locale used for all dates.
198
+ */
199
+ getLocale(): string;
200
+ /**
201
+ * Clamp the given date between min and max dates.
202
+ */
203
+ clampDate(date: T, min?: T | null, max?: T | null): T;
204
+ }
205
+
1
206
  /**
2
- * Generated bundle index. Do not edit.
207
+ * date-time-format.class
3
208
  */
4
- /// <amd-module name="@netwin/angular-datetime-picker" />
5
- export * from './public_api';
209
+
210
+ type OwlDateTimeFormats = {
211
+ fullPickerInput: Partial<Intl.DateTimeFormatOptions>;
212
+ datePickerInput: Partial<Intl.DateTimeFormatOptions>;
213
+ timePickerInput: Partial<Intl.DateTimeFormatOptions>;
214
+ monthYearLabel: Partial<Intl.DateTimeFormatOptions>;
215
+ dateA11yLabel: Partial<Intl.DateTimeFormatOptions>;
216
+ monthYearA11yLabel: Partial<Intl.DateTimeFormatOptions>;
217
+ };
218
+ /** InjectionToken for date time picker that can be used to override default format. */
219
+ declare const OWL_DATE_TIME_FORMATS: InjectionToken<OwlDateTimeFormats>;
220
+
221
+ /**
222
+ * date-time.class
223
+ */
224
+
225
+ declare const PickerType: {
226
+ /**
227
+ * Shows both calendar and timer views.
228
+ */
229
+ readonly Both: "both";
230
+ /**
231
+ * Shows only the calendar view.
232
+ */
233
+ readonly Calendar: "calendar";
234
+ /**
235
+ * Shows only the timer view.
236
+ */
237
+ readonly Timer: "timer";
238
+ };
239
+ type PickerType = (typeof PickerType)[keyof typeof PickerType];
240
+ declare const SelectMode: {
241
+ /**
242
+ * Selects a single date.
243
+ */
244
+ readonly Single: "single";
245
+ /**
246
+ * Selects a date range.
247
+ */
248
+ readonly Range: "range";
249
+ /**
250
+ * Selects a date range from a specific date.
251
+ * The end date (range[1]) will always be `null` in this mode.
252
+ */
253
+ readonly RangeFrom: "rangeFrom";
254
+ /**
255
+ * Selects a date range up to a specific date.
256
+ * The start date (range[0]) will always be `null` in this mode.
257
+ */
258
+ readonly RangeTo: "rangeTo";
259
+ };
260
+ type SelectMode = (typeof SelectMode)[keyof typeof SelectMode];
261
+ declare const DateView: {
262
+ /**
263
+ * Shows all days of a month in a grid.
264
+ */
265
+ readonly MONTH: "month";
266
+ /**
267
+ * Shows all months of a year in a grid.
268
+ */
269
+ readonly YEAR: "year";
270
+ /**
271
+ * Shows a list of years.
272
+ */
273
+ readonly MULTI_YEARS: "multi-years";
274
+ };
275
+ type DateViewType = (typeof DateView)[keyof typeof DateView];
276
+ declare abstract class OwlDateTime<T> {
277
+ protected readonly dateTimeAdapter: DateTimeAdapter<T>;
278
+ protected readonly dateTimeFormats: OwlDateTimeFormats;
279
+ /**
280
+ * Whether to show the second's timer
281
+ */
282
+ showSecondsTimer: boolean;
283
+ /**
284
+ * Whether the timer is in hour12 format
285
+ */
286
+ hour12Timer: boolean;
287
+ /**
288
+ * The view that the calendar should start in.
289
+ */
290
+ startView: DateViewType;
291
+ /**
292
+ * Whether to should only the year and multi-year views.
293
+ */
294
+ yearOnly: boolean;
295
+ /**
296
+ * Whether to should only the multi-year view.
297
+ */
298
+ multiyearOnly: boolean;
299
+ /**
300
+ * Hours to change per step
301
+ */
302
+ stepHour: number;
303
+ /**
304
+ * Minutes to change per step
305
+ */
306
+ stepMinute: number;
307
+ /**
308
+ * Seconds to change per step
309
+ */
310
+ stepSecond: number;
311
+ /**
312
+ * Set the first day of week
313
+ */
314
+ firstDayOfWeek: number | undefined;
315
+ /**
316
+ * Whether to hide dates in other months at the start or end of the current month.
317
+ */
318
+ hideOtherMonths: boolean;
319
+ readonly id: string;
320
+ abstract disabled: boolean;
321
+ abstract get selected(): T | null;
322
+ abstract get selecteds(): Array<T> | null;
323
+ abstract get dateTimeFilter(): (date: T | null) => boolean;
324
+ abstract get maxDateTime(): T | null;
325
+ abstract get minDateTime(): T | null;
326
+ abstract get selectMode(): SelectMode;
327
+ abstract get startAt(): T | null;
328
+ abstract get endAt(): T | null;
329
+ abstract get opened(): boolean;
330
+ abstract get pickerType(): PickerType;
331
+ abstract get isInSingleMode(): boolean;
332
+ abstract get isInRangeMode(): boolean;
333
+ abstract select(date: T | Array<T>): void;
334
+ abstract yearSelected: OutputRef<T>;
335
+ abstract monthSelected: OutputRef<T>;
336
+ abstract dateSelected: OutputRef<T>;
337
+ abstract selectYear(normalizedYear: T): void;
338
+ abstract selectMonth(normalizedMonth: T): void;
339
+ abstract selectDate(normalizedDate: T): void;
340
+ get displayFormat(): Partial<Intl.DateTimeFormatOptions>;
341
+ /**
342
+ * Date Time Checker to check if the give dateTime is selectable
343
+ */
344
+ dateTimeChecker: (dateTime: T) => boolean;
345
+ constructor();
346
+ protected getValidDate(obj: unknown): T | null;
347
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTime<any>, never>;
348
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTime<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; }; "stepHour": { "alias": "stepHour"; "required": false; }; "stepMinute": { "alias": "stepMinute"; "required": false; }; "stepSecond": { "alias": "stepSecond"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; }, {}, never, never, true, never>;
349
+ static ngAcceptInputType_showSecondsTimer: unknown;
350
+ static ngAcceptInputType_hour12Timer: unknown;
351
+ static ngAcceptInputType_stepHour: unknown;
352
+ static ngAcceptInputType_stepMinute: unknown;
353
+ static ngAcceptInputType_stepSecond: unknown;
354
+ static ngAcceptInputType_firstDayOfWeek: unknown;
355
+ static ngAcceptInputType_hideOtherMonths: unknown;
356
+ }
357
+
358
+ declare class CalendarCell {
359
+ value: number;
360
+ displayValue: string;
361
+ ariaLabel: string;
362
+ enabled: boolean;
363
+ out: boolean;
364
+ cellClass: string;
365
+ constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, out?: boolean, cellClass?: string);
366
+ }
367
+ declare class OwlCalendarBodyComponent {
368
+ private readonly elmRef;
369
+ private readonly ngZone;
370
+ /**
371
+ * The cell number of the active cell in the table.
372
+ */
373
+ activeCell: number;
374
+ /**
375
+ * The cells to display in the table.
376
+ */
377
+ rows: Array<Array<CalendarCell>>;
378
+ /**
379
+ * The number of columns in the table.
380
+ */
381
+ numCols: number;
382
+ /**
383
+ * The ratio (width / height) to use for the cells in the table.
384
+ */
385
+ cellRatio: number;
386
+ /**
387
+ * The value in the table that corresponds to today.
388
+ */
389
+ todayValue: number;
390
+ /**
391
+ * The value in the table that is currently selected.
392
+ */
393
+ selectedValues: Array<number>;
394
+ /**
395
+ * Current picker select mode
396
+ */
397
+ selectMode: SelectMode;
398
+ /**
399
+ * Emit when a calendar cell is selected
400
+ */
401
+ readonly selectCell: i0.OutputEmitterRef<CalendarCell>;
402
+ protected handleSelect(cell: CalendarCell): void;
403
+ protected get isInSingleMode(): boolean;
404
+ protected get isInRangeMode(): boolean;
405
+ isActiveCell(rowIndex: number, colIndex: number): boolean;
406
+ /**
407
+ * Check if the cell is selected
408
+ */
409
+ isSelected(value: number): boolean;
410
+ /**
411
+ * Check if the cell in the range
412
+ */
413
+ isInRange(value: number): boolean;
414
+ /**
415
+ * Check if the cell is the range from
416
+ */
417
+ isRangeFrom(value: number): boolean;
418
+ /**
419
+ * Check if the cell is the range to
420
+ */
421
+ isRangeTo(value: number): boolean;
422
+ /**
423
+ * Focus to a active cell
424
+ */
425
+ focusActiveCell(): void;
426
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarBodyComponent, never>;
427
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarBodyComponent, "[owl-date-time-calendar-body]", ["owlDateTimeCalendarBody"], { "activeCell": { "alias": "activeCell"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "cellRatio": { "alias": "cellRatio"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; }, { "selectCell": "selectCell"; }, never, never, true, never>;
428
+ }
429
+
430
+ declare class OwlCalendarComponent<T> implements AfterContentInit, AfterViewChecked {
431
+ private readonly elmRef;
432
+ private readonly pickerIntl;
433
+ private readonly ngZone;
434
+ private readonly cdRef;
435
+ private readonly dateTimeAdapter;
436
+ private readonly dateTimeFormats;
437
+ protected readonly DateView: {
438
+ readonly MONTH: "month";
439
+ readonly YEAR: "year";
440
+ readonly MULTI_YEARS: "multi-years";
441
+ };
442
+ get minDate(): T | null;
443
+ set minDate(value: T | null);
444
+ get maxDate(): T | null;
445
+ set maxDate(value: T | null);
446
+ get pickerMoment(): T;
447
+ set pickerMoment(value: T);
448
+ get selected(): T | null;
449
+ set selected(value: T | null);
450
+ get selecteds(): Array<T>;
451
+ set selecteds(values: Array<T>);
452
+ get periodButtonText(): string;
453
+ get periodButtonLabel(): string;
454
+ get todayButtonLabel(): string;
455
+ get prevButtonLabel(): string;
456
+ get nextButtonLabel(): string;
457
+ get currentView(): DateViewType;
458
+ set currentView(view: DateViewType);
459
+ get isInSingleMode(): boolean;
460
+ get isInRangeMode(): boolean;
461
+ get showControlArrows(): boolean;
462
+ get isMonthView(): boolean;
463
+ get isTodayAllowed(): boolean;
464
+ /**
465
+ * Date filter for the month and year view
466
+ */
467
+ dateFilter: (date: T) => boolean;
468
+ /**
469
+ * Set the first day of week
470
+ */
471
+ firstDayOfWeek: number;
472
+ /** The minimum selectable date. */
473
+ private _minDate;
474
+ /** The maximum selectable date. */
475
+ private _maxDate;
476
+ /** The current picker moment */
477
+ private _pickerMoment;
478
+ selectMode: SelectMode;
479
+ /** The currently selected moment. */
480
+ private _selected;
481
+ private _selecteds;
482
+ /**
483
+ * The view that the calendar should start in.
484
+ */
485
+ startView: DateViewType;
486
+ /**
487
+ * Whether to should only the year and multi-year views.
488
+ */
489
+ yearOnly: boolean;
490
+ /**
491
+ * Whether to should only the multi-year view.
492
+ */
493
+ multiyearOnly: boolean;
494
+ /**
495
+ * Whether to hide dates in other months at the start or end of the current month.
496
+ */
497
+ hideOtherMonths: boolean;
498
+ /**
499
+ * Flag to show today button to jump to today's date. Defaults to `false`.
500
+ */
501
+ showTodayButton: boolean;
502
+ /**
503
+ * Emits when the currently picker moment changes.
504
+ */
505
+ readonly pickerMomentChange: i0.OutputEmitterRef<T>;
506
+ /**
507
+ * Emits when the selected date changes.
508
+ */
509
+ readonly dateClicked: i0.OutputEmitterRef<T>;
510
+ /**
511
+ * Emits when the currently selected date changes.
512
+ */
513
+ readonly selectedChange: i0.OutputEmitterRef<T>;
514
+ /**
515
+ * Emits when any date is selected.
516
+ */
517
+ readonly userSelection: i0.OutputEmitterRef<void>;
518
+ /**
519
+ * Emits the selected year. This doesn't imply a change on the selected date
520
+ */
521
+ readonly yearSelected: i0.OutputEmitterRef<T>;
522
+ /**
523
+ * Emits the selected month. This doesn't imply a change on the selected date
524
+ */
525
+ readonly monthSelected: i0.OutputEmitterRef<T>;
526
+ private _currentView;
527
+ constructor();
528
+ /**
529
+ * Used for scheduling that focus should be moved to the active cell on the next tick.
530
+ * We need to schedule it, rather than do it immediately, because we have to wait
531
+ * for Angular to re-evaluate the view children.
532
+ */
533
+ private moveFocusOnNextTick;
534
+ /**
535
+ * Date filter for the month and year view
536
+ */
537
+ dateFilterForViews: (date: T | null) => boolean;
538
+ ngAfterContentInit(): void;
539
+ ngAfterViewChecked(): void;
540
+ /**
541
+ * Toggle between month view and year view
542
+ */
543
+ toggleViews(): void;
544
+ /**
545
+ * Handles user clicks on the previous button.
546
+ */
547
+ previousClicked(): void;
548
+ /**
549
+ * Handles user clicks on the next button.
550
+ */
551
+ nextClicked(): void;
552
+ jumpToToday(): void;
553
+ dateSelected(date: T): void;
554
+ /**
555
+ * Change the pickerMoment value and switch to a specific view
556
+ */
557
+ goToDateInView(date: T, view: DateViewType): void;
558
+ /**
559
+ * Change the pickerMoment value
560
+ */
561
+ handlePickerMomentChange(date: T): void;
562
+ userSelected(): void;
563
+ /**
564
+ * Whether the previous period button is enabled.
565
+ */
566
+ prevButtonEnabled(): boolean;
567
+ /**
568
+ * Whether the next period button is enabled.
569
+ */
570
+ nextButtonEnabled(): boolean;
571
+ /**
572
+ * Focus to the host element
573
+ */
574
+ focusActiveCell(): void;
575
+ selectYearInMultiYearView(normalizedYear: T): void;
576
+ selectMonthInYearView(normalizedMonth: T): void;
577
+ /**
578
+ * Whether the two dates represent the same view in the current view mode (month or year).
579
+ */
580
+ private isSameView;
581
+ /**
582
+ * Get a valid date object
583
+ */
584
+ private getValidDate;
585
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarComponent<any>, never>;
586
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlCalendarComponent<any>, "owl-date-time-calendar", ["owlDateTimeCalendar"], { "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "yearOnly": { "alias": "yearOnly"; "required": false; }; "multiyearOnly": { "alias": "multiyearOnly"; "required": false; }; "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, true, never>;
587
+ }
588
+
589
+ declare class OwlTimerComponent<T> {
590
+ private readonly ngZone;
591
+ private readonly elmRef;
592
+ private readonly pickerIntl;
593
+ private readonly cdRef;
594
+ private readonly dateTimeAdapter;
595
+ /** The current picker moment */
596
+ private _pickerMoment;
597
+ get pickerMoment(): T;
598
+ set pickerMoment(value: T);
599
+ /** The minimum selectable date time. */
600
+ private _minDateTime;
601
+ get minDateTime(): T | null;
602
+ set minDateTime(value: T | null);
603
+ /** The maximum selectable date time. */
604
+ private _maxDateTime;
605
+ get maxDateTime(): T | null;
606
+ set maxDateTime(value: T | null);
607
+ private isPM;
608
+ /**
609
+ * Whether to show the second's timer
610
+ */
611
+ readonly showSecondsTimer: i0.InputSignal<boolean>;
612
+ /**
613
+ * Whether the timer is in hour12 format
614
+ */
615
+ readonly hour12Timer: i0.InputSignal<boolean>;
616
+ /**
617
+ * Hours to change per step
618
+ */
619
+ readonly stepHour: i0.InputSignal<number>;
620
+ /**
621
+ * Minutes to change per step
622
+ */
623
+ readonly stepMinute: i0.InputSignal<number>;
624
+ /**
625
+ * Seconds to change per step
626
+ */
627
+ readonly stepSecond: i0.InputSignal<number>;
628
+ readonly selectedChange: i0.OutputEmitterRef<T>;
629
+ protected get hourValue(): number;
630
+ /**
631
+ * The value would be displayed in hourBox.
632
+ * We need this because the value displayed in hourBox it not
633
+ * the same as the hourValue when the timer is in hour12Timer mode.
634
+ */
635
+ protected get hourBoxValue(): number;
636
+ protected get minuteValue(): number;
637
+ protected get secondValue(): number;
638
+ protected get upHourButtonLabel(): string;
639
+ protected get downHourButtonLabel(): string;
640
+ protected get upMinuteButtonLabel(): string;
641
+ protected get downMinuteButtonLabel(): string;
642
+ protected get upSecondButtonLabel(): string;
643
+ protected get downSecondButtonLabel(): string;
644
+ protected get hour12ButtonLabel(): string;
645
+ /**
646
+ * Focus to the host element
647
+ */
648
+ focus(): void;
649
+ /**
650
+ * Set the hour value via typing into timer box input
651
+ * We need this to handle the hour value when the timer is in hour12 mode
652
+ */
653
+ setHourValueViaInput(hours: number): void;
654
+ setHourValue(hours: number): void;
655
+ setMinuteValue(minutes: number): void;
656
+ setSecondValue(seconds: number): void;
657
+ setMeridiem(event: Event): void;
658
+ /**
659
+ * Check if the up hour button is enabled
660
+ */
661
+ upHourEnabled(): boolean;
662
+ /**
663
+ * Check if the down hour button is enabled
664
+ */
665
+ downHourEnabled(): boolean;
666
+ /**
667
+ * Check if the up minute button is enabled
668
+ */
669
+ upMinuteEnabled(): boolean;
670
+ /**
671
+ * Check if the down minute button is enabled
672
+ */
673
+ downMinuteEnabled(): boolean;
674
+ /**
675
+ * Check if the up second button is enabled
676
+ */
677
+ upSecondEnabled(): boolean;
678
+ /**
679
+ * Check if the down second button is enabled
680
+ */
681
+ downSecondEnabled(): boolean;
682
+ /**
683
+ * PickerMoment's hour value +/- certain amount and compare it to the give date
684
+ * 1 is after the comparedDate
685
+ * -1 is before the comparedDate
686
+ * 0 is equal the comparedDate
687
+ */
688
+ private compareHours;
689
+ /**
690
+ * PickerMoment's minute value +/- certain amount and compare it to the give date
691
+ * 1 is after the comparedDate
692
+ * -1 is before the comparedDate
693
+ * 0 is equal the comparedDate
694
+ */
695
+ private compareMinutes;
696
+ /**
697
+ * PickerMoment's second value +/- certain amount and compare it to the give date
698
+ * 1 is after the comparedDate
699
+ * -1 is before the comparedDate
700
+ * 0 is equal the comparedDate
701
+ */
702
+ private compareSeconds;
703
+ /**
704
+ * Get a valid date object
705
+ */
706
+ private getValidDate;
707
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlTimerComponent<any>, never>;
708
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlTimerComponent<any>, "owl-date-time-timer", ["owlDateTimeTimer"], { "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "minDateTime": { "alias": "minDateTime"; "required": false; }; "maxDateTime": { "alias": "maxDateTime"; "required": false; }; "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; "isSignal": true; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; "isSignal": true; }; "stepHour": { "alias": "stepHour"; "required": false; "isSignal": true; }; "stepMinute": { "alias": "stepMinute"; "required": false; "isSignal": true; }; "stepSecond": { "alias": "stepSecond"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
709
+ }
710
+
711
+ declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterContentInit {
712
+ private readonly cdRef;
713
+ private readonly elmRef;
714
+ private readonly pickerIntl;
715
+ private readonly dateTimeAdapter;
716
+ protected calendar: OwlCalendarComponent<T>;
717
+ protected timer: OwlTimerComponent<T>;
718
+ picker: OwlDateTime<T>;
719
+ activeSelectedIndex: number;
720
+ private retainStartTime;
721
+ private retainEndTime;
722
+ showTodayButton: boolean;
723
+ /**
724
+ * The current picker moment. This determines which time period is shown and which date is
725
+ * highlighted when using keyboard navigation.
726
+ */
727
+ private _clamPickerMoment;
728
+ get pickerMoment(): T;
729
+ set pickerMoment(value: T);
730
+ get pickerType(): PickerType;
731
+ /**
732
+ * The range 'from' label
733
+ */
734
+ get fromLabel(): string;
735
+ /**
736
+ * The range 'to' label
737
+ */
738
+ get toLabel(): string;
739
+ /**
740
+ * The range 'from' formatted value
741
+ */
742
+ get fromFormattedValue(): string;
743
+ /**
744
+ * The range 'to' formatted value
745
+ */
746
+ get toFormattedValue(): string;
747
+ get containerElm(): HTMLElement;
748
+ ngOnInit(): void;
749
+ ngAfterContentInit(): void;
750
+ dateSelected(date: T): void;
751
+ timeSelected(time: T): void;
752
+ /**
753
+ * Handle click on inform radio group
754
+ */
755
+ handleClickOnInfoGroup(event: Event, index: number): void;
756
+ /**
757
+ * Handle click on inform radio group
758
+ */
759
+ handleKeydownOnInfoGroup(event: KeyboardEvent, next: HTMLElement, index: number): void;
760
+ /**
761
+ * Set the value of activeSelectedIndex
762
+ */
763
+ private setActiveSelectedIndex;
764
+ private initPicker;
765
+ /**
766
+ * Select calendar date in single mode,
767
+ * it returns null when date is not selected.
768
+ */
769
+ private dateSelectedInSingleMode;
770
+ /**
771
+ * Select dates in range Mode
772
+ */
773
+ private dateSelectedInRangeMode;
774
+ /**
775
+ * Update the given calendar date's time and check if it is valid
776
+ * Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
777
+ * we need to update the given calendar date's time before selecting it.
778
+ * if it is valid, return the updated dateTime
779
+ * if it is not valid, return null
780
+ */
781
+ private updateAndCheckCalendarDate;
782
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeContainerComponent<any>, never>;
783
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeContainerComponent<any>, "owl-date-time-container", ["owlDateTimeContainer"], { "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, {}, never, never, true, never>;
784
+ }
785
+
786
+ declare class OwlDateTimeInlineComponent<T> extends OwlDateTime<T> implements OnInit, ControlValueAccessor {
787
+ #private;
788
+ protected readonly container: i0.Signal<OwlDateTimeContainerComponent<any>>;
789
+ /**
790
+ * Set the type of the dateTime picker
791
+ * 'both' -- show both calendar and timer
792
+ * 'calendar' -- show only calendar
793
+ * 'timer' -- show only timer
794
+ */
795
+ pickerType: PickerType;
796
+ disabled: boolean;
797
+ private _selectMode;
798
+ get selectMode(): SelectMode;
799
+ set selectMode(mode: SelectMode);
800
+ /** The date to open the calendar to initially. */
801
+ private _startAt;
802
+ get startAt(): T | null;
803
+ set startAt(date: T | null);
804
+ /** The date to open for range calendar. */
805
+ private _endAt;
806
+ get endAt(): T | null;
807
+ set endAt(date: T | null);
808
+ private _dateTimeFilter;
809
+ get dateTimeFilter(): (date: T | null) => boolean;
810
+ set dateTimeFilter(filter: (date: T | null) => boolean);
811
+ /** The minimum valid date. */
812
+ private _min;
813
+ get minDateTime(): T | null;
814
+ set minDateTime(value: T | null);
815
+ /** The maximum valid date. */
816
+ private _max;
817
+ get maxDateTime(): T | null;
818
+ set maxDateTime(value: T | null);
819
+ private _value;
820
+ get value(): T | null;
821
+ set value(value: T | null);
822
+ private _values;
823
+ get values(): Array<T>;
824
+ set values(values: Array<T>);
825
+ /**
826
+ * Limit to the amount of days that can be selected at once.
827
+ */
828
+ rangeLimit: number | null;
829
+ /**
830
+ * Flag to show today button to jump to today's date. Defaults to `false`.
831
+ */
832
+ showTodayButton: boolean;
833
+ /**
834
+ * Variable to hold the old max date time value for when we override it with rangeLimit
835
+ */
836
+ private _initialMaxDateTime;
837
+ /**
838
+ * Emits selected year in multi-year view
839
+ * This doesn't imply a change on the selected date.
840
+ */
841
+ readonly yearSelected: i0.OutputEmitterRef<T>;
842
+ /**
843
+ * Emits selected month in year view
844
+ * This doesn't imply a change on the selected date.
845
+ */
846
+ readonly monthSelected: i0.OutputEmitterRef<T>;
847
+ /**
848
+ * Emits selected date
849
+ */
850
+ readonly dateSelected: i0.OutputEmitterRef<T>;
851
+ private _selected;
852
+ get selected(): T | null;
853
+ set selected(value: T | null);
854
+ private _selecteds;
855
+ get selecteds(): Array<T>;
856
+ set selecteds(values: Array<T>);
857
+ readonly opened = true;
858
+ get isInSingleMode(): boolean;
859
+ get isInRangeMode(): boolean;
860
+ private onModelChange;
861
+ private onModelTouched;
862
+ ngOnInit(): void;
863
+ writeValue(value: unknown): void;
864
+ registerOnChange(fn: (v: T | Array<T>) => void): void;
865
+ registerOnTouched(fn: () => void): void;
866
+ select(date: Array<T> | T): void;
867
+ /**
868
+ * Emits the selected year in multi-year view
869
+ */
870
+ selectYear(normalizedYear: T): void;
871
+ /**
872
+ * Emits selected month in year view
873
+ */
874
+ selectMonth(normalizedMonth: T): void;
875
+ /**
876
+ * Emits the selected date
877
+ */
878
+ selectDate(normalizedDate: T): void;
879
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInlineComponent<any>, never>;
880
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeInlineComponent<any>, "owl-date-time-inline", never, { "pickerType": { "alias": "pickerType"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "endAt": { "alias": "endAt"; "required": false; }; "dateTimeFilter": { "alias": "owlDateTimeFilter"; "required": false; }; "minDateTime": { "alias": "min"; "required": false; }; "maxDateTime": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; "rangeLimit": { "alias": "rangeLimit"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, true, never>;
881
+ static ngAcceptInputType_disabled: unknown;
882
+ static ngAcceptInputType_showTodayButton: unknown;
883
+ }
884
+
885
+ declare class OwlMonthViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
886
+ private readonly cdRef;
887
+ private readonly dateTimeAdapter;
888
+ private readonly dateTimeFormats;
889
+ /**
890
+ * Whether to hide dates in other months at the start or end of the current month.
891
+ */
892
+ hideOtherMonths: boolean;
893
+ private isDefaultFirstDayOfWeek;
894
+ /**
895
+ * Define the first day of a week
896
+ * Sunday: 0 - Saturday: 6
897
+ */
898
+ private _firstDayOfWeek;
899
+ get firstDayOfWeek(): number;
900
+ set firstDayOfWeek(val: number);
901
+ /**
902
+ * The select mode of the picker;
903
+ */
904
+ private _selectMode;
905
+ get selectMode(): SelectMode;
906
+ set selectMode(val: SelectMode);
907
+ /** The currently selected date. */
908
+ private _selected;
909
+ get selected(): T | null;
910
+ set selected(value: T | null);
911
+ private _selecteds;
912
+ get selecteds(): Array<T>;
913
+ set selecteds(values: Array<T>);
914
+ private _pickerMoment;
915
+ get pickerMoment(): T;
916
+ set pickerMoment(value: T);
917
+ /**
918
+ * A function used to filter which dates are selectable
919
+ */
920
+ private _dateFilter;
921
+ get dateFilter(): (date: T) => boolean;
922
+ set dateFilter(filter: (date: T) => boolean);
923
+ /** The minimum selectable date. */
924
+ private _minDate;
925
+ get minDate(): T | null;
926
+ set minDate(value: T | null);
927
+ /** The maximum selectable date. */
928
+ private _maxDate;
929
+ get maxDate(): T | null;
930
+ set maxDate(value: T | null);
931
+ private _weekdays;
932
+ get weekdays(): Array<Record<Intl.DateTimeFormatOptions['weekday'], string>>;
933
+ private _days;
934
+ get days(): Array<Array<CalendarCell>>;
935
+ get activeCell(): number;
936
+ get isInSingleMode(): boolean;
937
+ get isInRangeMode(): boolean;
938
+ private firstDateOfMonth;
939
+ private localeSub;
940
+ private initiated;
941
+ private dateNames;
942
+ /**
943
+ * The date of the month that today falls on.
944
+ */
945
+ todayDate: number | null;
946
+ /**
947
+ * An array to hold all selectedDates' value
948
+ * the value is the day number in current month
949
+ */
950
+ selectedDates: Array<number>;
951
+ firstRowOffset: number;
952
+ /**
953
+ * Callback to invoke when a new date is selected
954
+ */
955
+ readonly selectedChange: i0.OutputEmitterRef<T>;
956
+ /**
957
+ * Callback to invoke when any date is selected.
958
+ */
959
+ readonly userSelection: i0.OutputEmitterRef<void>;
960
+ /** Emits when any date is activated. */
961
+ readonly pickerMomentChange: i0.OutputEmitterRef<T>;
962
+ /** The body of calendar table */
963
+ calendarBodyElm: OwlCalendarBodyComponent;
964
+ ngOnInit(): void;
965
+ ngAfterContentInit(): void;
966
+ ngOnDestroy(): void;
967
+ /**
968
+ * Handle a calendarCell selected
969
+ */
970
+ selectCalendarCell(cell: CalendarCell): void;
971
+ /**
972
+ * Handle a new date selected
973
+ */
974
+ private selectDate;
975
+ /**
976
+ * Handle keydown event on calendar body
977
+ */
978
+ handleCalendarKeydown(event: KeyboardEvent): void;
979
+ /**
980
+ * Generate the calendar weekdays array
981
+ */
982
+ private generateWeekDays;
983
+ /**
984
+ * Generate the calendar days array
985
+ */
986
+ private generateCalendar;
987
+ private updateFirstDayOfWeek;
988
+ /**
989
+ * Creates CalendarCell for days.
990
+ */
991
+ private createDateCell;
992
+ /**
993
+ * Check if the date is valid
994
+ */
995
+ private isDateEnabled;
996
+ /**
997
+ * Get a valid date object
998
+ */
999
+ private getValidDate;
1000
+ /**
1001
+ * Check if the give dates are none-null and in the same month
1002
+ */
1003
+ isSameMonth(dateLeft: T, dateRight: T): boolean;
1004
+ /**
1005
+ * Set the selectedDates value.
1006
+ * In single mode, it has only one value which represent the selected date
1007
+ * In range mode, it would has two values, one for the fromValue and the other for the toValue
1008
+ */
1009
+ private setSelectedDates;
1010
+ private focusActiveCell;
1011
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlMonthViewComponent<any>, never>;
1012
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlMonthViewComponent<any>, "owl-date-time-month-view", ["owlYearView"], { "hideOtherMonths": { "alias": "hideOtherMonths"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "pickerMomentChange": "pickerMomentChange"; }, never, never, true, never>;
1013
+ }
1014
+
1015
+ declare class OwlMultiYearViewComponent<T> implements AfterContentInit {
1016
+ private readonly cdRef;
1017
+ private readonly pickerIntl;
1018
+ private readonly dateTimeAdapter;
1019
+ private readonly options;
1020
+ /**
1021
+ * The select mode of the picker;
1022
+ */
1023
+ private _selectMode;
1024
+ get selectMode(): SelectMode;
1025
+ set selectMode(val: SelectMode);
1026
+ /** The currently selected date. */
1027
+ private _selected;
1028
+ get selected(): T | null;
1029
+ set selected(value: T | null);
1030
+ private _selecteds;
1031
+ get selecteds(): Array<T>;
1032
+ set selecteds(values: Array<T>);
1033
+ private _pickerMoment;
1034
+ get pickerMoment(): T | null;
1035
+ set pickerMoment(value: T);
1036
+ /**
1037
+ * A function used to filter which dates are selectable
1038
+ */
1039
+ private _dateFilter;
1040
+ get dateFilter(): (date: T) => boolean;
1041
+ set dateFilter(filter: (date: T) => boolean);
1042
+ /** The minimum selectable date. */
1043
+ private _minDate;
1044
+ get minDate(): T | null;
1045
+ set minDate(value: T | null);
1046
+ /** The maximum selectable date. */
1047
+ private _maxDate;
1048
+ get maxDate(): T | null;
1049
+ set maxDate(value: T | null);
1050
+ private _todayYear;
1051
+ protected get todayYear(): number;
1052
+ private _years;
1053
+ protected get years(): Array<Array<CalendarCell>>;
1054
+ private _selectedYears;
1055
+ protected get selectedYears(): Array<number>;
1056
+ private initiated;
1057
+ protected get isInSingleMode(): boolean;
1058
+ protected get isInRangeMode(): boolean;
1059
+ protected get activeCell(): number | undefined;
1060
+ protected get tableHeader(): string | undefined;
1061
+ protected get prevButtonLabel(): string;
1062
+ protected get nextButtonLabel(): string;
1063
+ /**
1064
+ * Callback to invoke when a new month is selected
1065
+ */
1066
+ readonly changeYear: i0.OutputEmitterRef<T>;
1067
+ /**
1068
+ * Emits the selected year. This doesn't imply a change on the selected date
1069
+ */
1070
+ readonly yearSelected: i0.OutputEmitterRef<T>;
1071
+ /** Emits when any date is activated. */
1072
+ readonly pickerMomentChange: i0.OutputEmitterRef<T>;
1073
+ /** Emits when use keyboard enter to select a calendar cell */
1074
+ readonly keyboardEnter: i0.OutputEmitterRef<void>;
1075
+ /** The body of calendar table */
1076
+ protected readonly calendarBodyElm: i0.Signal<OwlCalendarBodyComponent>;
1077
+ ngAfterContentInit(): void;
1078
+ /**
1079
+ * Handle a calendarCell selected
1080
+ */
1081
+ selectCalendarCell(cell: CalendarCell): void;
1082
+ private selectYear;
1083
+ /**
1084
+ * Generate the previous year list
1085
+ */
1086
+ prevYearList(event: Event): void;
1087
+ /**
1088
+ * Generate the next year list
1089
+ */
1090
+ nextYearList(event: Event): void;
1091
+ generateYearList(): void;
1092
+ /** Whether the previous period button is enabled. */
1093
+ previousEnabled(): boolean;
1094
+ /** Whether the next period button is enabled. */
1095
+ nextEnabled(): boolean;
1096
+ handleCalendarKeydown(event: KeyboardEvent): void;
1097
+ /**
1098
+ * Creates an CalendarCell for the given year.
1099
+ */
1100
+ private createYearCell;
1101
+ private setSelectedYears;
1102
+ /** Whether the given year is enabled. */
1103
+ private isYearEnabled;
1104
+ private isSameYearList;
1105
+ /**
1106
+ * Get a valid date object
1107
+ */
1108
+ private getValidDate;
1109
+ private focusActiveCell;
1110
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlMultiYearViewComponent<any>, never>;
1111
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlMultiYearViewComponent<any>, "owl-date-time-multi-year-view", never, { "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "changeYear": "changeYear"; "yearSelected": "yearSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, true, never>;
1112
+ }
1113
+
1114
+ declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
1115
+ showDivider: boolean;
1116
+ upBtnAriaLabel: string;
1117
+ upBtnDisabled: boolean;
1118
+ downBtnAriaLabel: string;
1119
+ downBtnDisabled: boolean;
1120
+ /**
1121
+ * Value would be displayed in the box
1122
+ * If it is null, the box would display [value]
1123
+ */
1124
+ boxValue: number;
1125
+ value: number;
1126
+ min: number;
1127
+ max: number;
1128
+ step: number;
1129
+ inputLabel: string;
1130
+ readonly valueChange: i0.OutputEmitterRef<number>;
1131
+ readonly inputChange: i0.OutputEmitterRef<number>;
1132
+ private inputStream;
1133
+ private inputStreamSub;
1134
+ private hasFocus;
1135
+ protected get displayValue(): string;
1136
+ private valueInput;
1137
+ private onValueInputMouseWheelBind;
1138
+ ngOnInit(): void;
1139
+ ngOnDestroy(): void;
1140
+ upBtnClicked(): void;
1141
+ downBtnClicked(): void;
1142
+ handleInputChange(val: string): void;
1143
+ focusIn(): void;
1144
+ focusOut(value: string): void;
1145
+ private updateValue;
1146
+ private updateValueViaInput;
1147
+ private onValueInputMouseWheel;
1148
+ private bindValueInputMouseWheel;
1149
+ private unbindValueInputMouseWheel;
1150
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlTimerBoxComponent, never>;
1151
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlTimerBoxComponent, "owl-date-time-timer-box", ["owlDateTimeTimerBox"], { "showDivider": { "alias": "showDivider"; "required": false; }; "upBtnAriaLabel": { "alias": "upBtnAriaLabel"; "required": false; }; "upBtnDisabled": { "alias": "upBtnDisabled"; "required": false; }; "downBtnAriaLabel": { "alias": "downBtnAriaLabel"; "required": false; }; "downBtnDisabled": { "alias": "downBtnDisabled"; "required": false; }; "boxValue": { "alias": "boxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "inputLabel": { "alias": "inputLabel"; "required": false; }; }, { "valueChange": "valueChange"; "inputChange": "inputChange"; }, never, never, true, never>;
1152
+ }
1153
+
1154
+ declare class OwlYearViewComponent<T> implements OnInit, AfterContentInit, OnDestroy {
1155
+ private readonly cdRef;
1156
+ private readonly dateTimeAdapter;
1157
+ private readonly dateTimeFormats;
1158
+ /**
1159
+ * The select mode of the picker;
1160
+ */
1161
+ private _selectMode;
1162
+ get selectMode(): SelectMode;
1163
+ set selectMode(val: SelectMode);
1164
+ /** The currently selected date. */
1165
+ private _selected;
1166
+ get selected(): T | null;
1167
+ set selected(value: T | null);
1168
+ private _selecteds;
1169
+ get selecteds(): Array<T>;
1170
+ set selecteds(values: Array<T>);
1171
+ private _pickerMoment;
1172
+ get pickerMoment(): T | null;
1173
+ set pickerMoment(value: T);
1174
+ /**
1175
+ * A function used to filter which dates are selectable
1176
+ */
1177
+ private _dateFilter;
1178
+ get dateFilter(): (date: T) => boolean;
1179
+ set dateFilter(filter: (date: T) => boolean);
1180
+ /** The minimum selectable date. */
1181
+ private _minDate;
1182
+ get minDate(): T | null;
1183
+ set minDate(value: T | null);
1184
+ /** The maximum selectable date. */
1185
+ private _maxDate;
1186
+ get maxDate(): T | null;
1187
+ set maxDate(value: T | null);
1188
+ private readonly monthNames;
1189
+ private _months;
1190
+ protected get months(): Array<Array<CalendarCell>>;
1191
+ protected get activeCell(): number;
1192
+ protected get isInSingleMode(): boolean;
1193
+ protected get isInRangeMode(): boolean;
1194
+ private localeSub;
1195
+ private initiated;
1196
+ todayMonth: number | null;
1197
+ /**
1198
+ * An array to hold all selectedDates' month value
1199
+ * the value is the month number in current year
1200
+ */
1201
+ selectedMonths: Array<number>;
1202
+ /**
1203
+ * Callback to invoke when a new month is selected
1204
+ */
1205
+ readonly changeMonth: i0.OutputEmitterRef<T>;
1206
+ /**
1207
+ * Emits the selected year. This doesn't imply a change on the selected date
1208
+ */
1209
+ readonly monthSelected: i0.OutputEmitterRef<T>;
1210
+ /** Emits when any date is activated. */
1211
+ readonly pickerMomentChange: i0.OutputEmitterRef<T>;
1212
+ /** Emits when use keyboard enter to select a calendar cell */
1213
+ readonly keyboardEnter: i0.OutputEmitterRef<void>;
1214
+ /** The body of calendar table */
1215
+ protected calendarBodyElm: OwlCalendarBodyComponent;
1216
+ ngOnInit(): void;
1217
+ ngAfterContentInit(): void;
1218
+ ngOnDestroy(): void;
1219
+ /**
1220
+ * Handle a calendarCell selected
1221
+ */
1222
+ selectCalendarCell(cell: CalendarCell): void;
1223
+ /**
1224
+ * Handle a new month selected
1225
+ */
1226
+ private selectMonth;
1227
+ /**
1228
+ * Handle keydown event on calendar body
1229
+ */
1230
+ handleCalendarKeydown(event: KeyboardEvent): void;
1231
+ /**
1232
+ * Generate the calendar month list
1233
+ */
1234
+ private generateMonthList;
1235
+ /**
1236
+ * Creates an CalendarCell for the given month.
1237
+ */
1238
+ private createMonthCell;
1239
+ /**
1240
+ * Check if the given month is enable
1241
+ */
1242
+ private isMonthEnabled;
1243
+ /**
1244
+ * Gets the month in this year that the given Date falls on.
1245
+ * Returns null if the given Date is in another year.
1246
+ */
1247
+ private getMonthInCurrentYear;
1248
+ /**
1249
+ * Set the selectedMonths value
1250
+ * In single mode, it has only one value which represent the month the selected date in
1251
+ * In range mode, it would has two values, one for the month the fromValue in and the other for the month the toValue in
1252
+ */
1253
+ private setSelectedMonths;
1254
+ /**
1255
+ * Check the given dates are in the same year
1256
+ */
1257
+ private hasSameYear;
1258
+ /**
1259
+ * Get a valid date object
1260
+ */
1261
+ private getValidDate;
1262
+ private focusActiveCell;
1263
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlYearViewComponent<any>, never>;
1264
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlYearViewComponent<any>, "owl-date-time-year-view", ["owlMonthView"], { "selectMode": { "alias": "selectMode"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selecteds": { "alias": "selecteds"; "required": false; }; "pickerMoment": { "alias": "pickerMoment"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "changeMonth": "changeMonth"; "monthSelected": "monthSelected"; "pickerMomentChange": "pickerMomentChange"; "keyboardEnter": "keyboardEnter"; }, never, never, true, never>;
1265
+ }
1266
+
1267
+ declare class OwlDateTimeModule {
1268
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeModule, never>;
1269
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, never, [typeof OwlCalendarBodyComponent, typeof OwlCalendarComponent, typeof OwlDateTimeContainerComponent, typeof OwlDateTimeInlineComponent, typeof OwlMonthViewComponent, typeof OwlMultiYearViewComponent, typeof OwlTimerBoxComponent, typeof OwlTimerComponent, typeof OwlYearViewComponent], [typeof OwlCalendarComponent, typeof OwlDateTimeInlineComponent, typeof OwlMonthViewComponent, typeof OwlMultiYearViewComponent, typeof OwlTimerComponent, typeof OwlYearViewComponent]>;
1270
+ static ɵinj: i0.ɵɵInjectorDeclaration<OwlDateTimeModule>;
1271
+ }
1272
+
1273
+ declare class OwlDateTimeIntl {
1274
+ /**
1275
+ * Stream that emits whenever the labels here are changed. Use this to notify
1276
+ * components if the labels have changed after initialization.
1277
+ */
1278
+ readonly changes: Subject<void>;
1279
+ /** A label for the up second button (used by screen readers). */
1280
+ upSecondLabel: string;
1281
+ /** A label for the down second button (used by screen readers). */
1282
+ downSecondLabel: string;
1283
+ /** A label for the up minute button (used by screen readers). */
1284
+ upMinuteLabel: string;
1285
+ /** A label for the down minute button (used by screen readers). */
1286
+ downMinuteLabel: string;
1287
+ /** A label for the up hour button (used by screen readers). */
1288
+ upHourLabel: string;
1289
+ /** A label for the down hour button (used by screen readers). */
1290
+ downHourLabel: string;
1291
+ /** A label for the previous month button (used by screen readers). */
1292
+ prevMonthLabel: string;
1293
+ /** A label for the next month button (used by screen readers). */
1294
+ nextMonthLabel: string;
1295
+ /** A label for the previous year button (used by screen readers). */
1296
+ prevYearLabel: string;
1297
+ /** A label for the next year button (used by screen readers). */
1298
+ nextYearLabel: string;
1299
+ /** A label for the previous multi-year button (used by screen readers). */
1300
+ prevMultiYearLabel: string;
1301
+ /** A label for the next multi-year button (used by screen readers). */
1302
+ nextMultiYearLabel: string;
1303
+ /** A label for the 'switch to month view' button (used by screen readers). */
1304
+ switchToMonthViewLabel: string;
1305
+ /** A label for the 'switch to year view' button (used by screen readers). */
1306
+ switchToMultiYearViewLabel: string;
1307
+ /** A label for the range 'from' in picker info */
1308
+ rangeFromLabel: string;
1309
+ /** A label for the range 'to' in picker info */
1310
+ rangeToLabel: string;
1311
+ /** A label for the hour12 button (AM) */
1312
+ hour12AMLabel: string;
1313
+ /** A label for the hour12 button (PM) */
1314
+ hour12PMLabel: string;
1315
+ /** A label for the today button */
1316
+ todayButtonLabel: string;
1317
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeIntl, never>;
1318
+ static ɵprov: i0.ɵɵInjectableDeclaration<OwlDateTimeIntl>;
1319
+ }
1320
+
1321
+ declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
1322
+ private readonly owlDateTimeLocale;
1323
+ private readonly platform;
1324
+ /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
1325
+ private readonly _clampDate;
1326
+ /**
1327
+ * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
1328
+ * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
1329
+ * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
1330
+ * will produce `'8/13/1800'`.
1331
+ */
1332
+ useUtcForDisplay: boolean;
1333
+ constructor();
1334
+ getYear(date: Date): number;
1335
+ getMonth(date: Date): number;
1336
+ getDay(date: Date): number;
1337
+ getDate(date: Date): number;
1338
+ getHours(date: Date): number;
1339
+ getMinutes(date: Date): number;
1340
+ getSeconds(date: Date): number;
1341
+ getTime(date: Date): number;
1342
+ getNumDaysInMonth(date: Date): number;
1343
+ differenceInCalendarDays(dateLeft: Date, dateRight: Date): number;
1344
+ getYearName(date: Date): string;
1345
+ getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
1346
+ getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
1347
+ getDateNames(): Array<string>;
1348
+ toIso8601(date: Date): string;
1349
+ isEqual(dateLeft: Date, dateRight: Date): boolean;
1350
+ isSameDay(dateLeft: Date, dateRight: Date): boolean;
1351
+ isValid(date: Date): boolean;
1352
+ invalid(): Date;
1353
+ isDateInstance(obj: unknown): obj is Date;
1354
+ addCalendarYears(date: Date, amount: number): Date;
1355
+ addCalendarMonths(date: Date, amount: number): Date;
1356
+ addCalendarDays(date: Date, amount: number): Date;
1357
+ setHours(date: Date, amount: number): Date;
1358
+ setMinutes(date: Date, amount: number): Date;
1359
+ setSeconds(date: Date, amount: number): Date;
1360
+ createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
1361
+ clone(date: Date): Date;
1362
+ now(): Date;
1363
+ format(date: Date, displayFormat: Intl.DateTimeFormatOptions): string;
1364
+ parse(value: number | string): Date | null;
1365
+ /**
1366
+ * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
1367
+ * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
1368
+ * invalid date for all other values.
1369
+ */
1370
+ deserialize(value: Date | null): Date | null;
1371
+ /**
1372
+ * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
1373
+ * other browsers do not. We remove them to make output consistent and because they interfere with
1374
+ * date parsing.
1375
+ */
1376
+ private stripDirectionalityCharacters;
1377
+ /**
1378
+ * When converting Date object to string, javascript built-in functions may return wrong
1379
+ * results because it applies its internal DST rules. The DST rules around the world change
1380
+ * very frequently, and the current valid rule is not always valid in previous years though.
1381
+ * We work around this problem building a new Date object which has its internal UTC
1382
+ * representation with the local date and time.
1383
+ */
1384
+ private _format;
1385
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, never>;
1386
+ static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
1387
+ }
1388
+
1389
+ declare class UnixTimestampDateTimeAdapter extends DateTimeAdapter<number> {
1390
+ private readonly owlDateTimeLocale;
1391
+ private readonly platform;
1392
+ constructor();
1393
+ /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */
1394
+ private readonly _clampDate;
1395
+ /**
1396
+ * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
1397
+ * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
1398
+ * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
1399
+ * will produce `'8/13/1800'`.
1400
+ */
1401
+ useUtcForDisplay: boolean;
1402
+ /**
1403
+ * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
1404
+ * other browsers do not. We remove them to make output consistent and because they interfere with
1405
+ * date parsing.
1406
+ */
1407
+ private static search_ltr_rtl_pattern;
1408
+ private static stripDirectionalityCharacters;
1409
+ /**
1410
+ * When converting Date object to string, javascript built-in functions may return wrong
1411
+ * results because it applies its internal DST rules. The DST rules around the world change
1412
+ * very frequently, and the current valid rule is not always valid in previous years though.
1413
+ * We work around this problem building a new Date object which has its internal UTC
1414
+ * representation with the local date and time.
1415
+ */
1416
+ private static _format;
1417
+ addCalendarDays(date: number, amount: number): number;
1418
+ addCalendarMonths(date: number, amount: number): number;
1419
+ addCalendarYears(date: number, amount: number): number;
1420
+ clone(date: number): number;
1421
+ createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): number;
1422
+ differenceInCalendarDays(dateLeft: number, dateRight: number): number;
1423
+ format(date: number, displayFormat: Intl.DateTimeFormatOptions): string;
1424
+ getDate(date: number): number;
1425
+ getDateNames(): Array<string>;
1426
+ getDay(date: number): number;
1427
+ getDayOfWeekNames(style: Intl.DateTimeFormatOptions['weekday']): Array<string>;
1428
+ getHours(date: number): number;
1429
+ getMinutes(date: number): number;
1430
+ getMonth(date: number): number;
1431
+ getMonthNames(style: Intl.DateTimeFormatOptions['month']): Array<string>;
1432
+ getNumDaysInMonth(date: number): number;
1433
+ getSeconds(date: number): number;
1434
+ getTime(date: number): number;
1435
+ getYear(date: number): number;
1436
+ getYearName(date: number): string;
1437
+ invalid(): number;
1438
+ isDateInstance(obj: unknown): obj is number;
1439
+ isEqual(dateLeft: number, dateRight: number): boolean;
1440
+ isSameDay(dateLeft: number, dateRight: number): boolean;
1441
+ isValid(date: number): boolean;
1442
+ now(): number;
1443
+ parse(value: number | string | null): number;
1444
+ setHours(date: number, amount: number): number;
1445
+ setMinutes(date: number, amount: number): number;
1446
+ setSeconds(date: number, amount: number): number;
1447
+ toIso8601(date: number): string;
1448
+ static ɵfac: i0.ɵɵFactoryDeclaration<UnixTimestampDateTimeAdapter, never>;
1449
+ static ɵprov: i0.ɵɵInjectableDeclaration<UnixTimestampDateTimeAdapter>;
1450
+ }
1451
+
1452
+ /**
1453
+ * unix-timestamp-date-time-format.class
1454
+ */
1455
+
1456
+ declare const OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS: OwlDateTimeFormats;
1457
+
1458
+ declare function defaultOptionsFactory(): Options;
1459
+ declare function multiYearOptionsFactory(options: Options): Options['multiYear'];
1460
+ type Options = {
1461
+ multiYear: {
1462
+ yearsPerRow: number;
1463
+ yearRows: number;
1464
+ };
1465
+ };
1466
+ declare class DefaultOptions {
1467
+ static create(): Options;
1468
+ }
1469
+ declare abstract class OptionsTokens {
1470
+ static all: InjectionToken<Options>;
1471
+ }
1472
+ declare const optionsProviders: Array<Provider>;
1473
+
1474
+ export { CalendarCell, DateTimeAdapter, DateView, DefaultOptions, NativeDateTimeAdapter, OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_LOCALE_PROVIDER, OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS, OptionsTokens, OwlCalendarBodyComponent, OwlCalendarComponent, OwlDateTimeInlineComponent, OwlDateTimeIntl, OwlDateTimeModule, OwlMonthViewComponent, OwlMultiYearViewComponent, OwlNativeDateTimeModule, OwlTimerComponent, OwlYearViewComponent, PickerType, SelectMode, UnixTimestampDateTimeAdapter, defaultOptionsFactory, multiYearOptionsFactory, optionsProviders };
1475
+ export type { DateViewType, Options, OwlDateTimeFormats };