nxt-pick-datetime 13.0.1 → 15.0.0

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 (90) hide show
  1. package/README.md +130 -147
  2. package/assets/picker.scss +88 -93
  3. package/esm2020/lib/class/date-time-adapter.class.mjs +8 -8
  4. package/esm2020/lib/class/date-time-format.class.mjs +2 -2
  5. package/esm2020/lib/class/date-time.class.mjs +54 -71
  6. package/esm2020/lib/class/dialog-config.class.mjs +3 -13
  7. package/esm2020/lib/class/dialog-ref.class.mjs +9 -10
  8. package/esm2020/lib/date-time/calendar/calendar.component.mjs +89 -94
  9. package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +32 -28
  10. package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +71 -80
  11. package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +57 -63
  12. package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +57 -68
  13. package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +68 -78
  14. package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +164 -182
  15. package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs +2 -2
  16. package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +109 -117
  17. package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +185 -203
  18. package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +5 -5
  19. package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +20 -19
  20. package/esm2020/lib/date-time/date-time.module.mjs +79 -71
  21. package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +9 -13
  22. package/esm2020/lib/date-time/timer/timer.component.mjs +64 -59
  23. package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +22 -17
  24. package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +44 -49
  25. package/esm2020/lib/dialog/dialog.module.mjs +26 -19
  26. package/esm2020/lib/dialog/dialog.service.mjs +52 -49
  27. package/esm2020/lib/utils/object.mjs +3 -3
  28. package/esm2020/moment-adapter/date-time-adapter.class.mjs +17 -16
  29. package/esm2020/moment-adapter/date-time-format.class.mjs +2 -2
  30. package/esm2020/moment-adapter/moment-adapter.module.mjs +18 -22
  31. package/esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +1 -1
  32. package/esm2020/moment-adapter/public-api.mjs +2 -2
  33. package/esm2020/native-adapter/date-time-adapter.class.mjs +13 -13
  34. package/esm2020/native-adapter/date-time-format.class.mjs +2 -2
  35. package/esm2020/native-adapter/native-adapter.module.mjs +24 -22
  36. package/esm2020/native-adapter/nxt-pick-datetime-native-adapter.mjs +1 -1
  37. package/esm2020/native-adapter/public-api.mjs +2 -2
  38. package/esm2020/nxt-pick-datetime.mjs +1 -1
  39. package/esm2020/public-api.mjs +14 -14
  40. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +33 -35
  41. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  42. package/fesm2015/nxt-pick-datetime-native-adapter.mjs +36 -33
  43. package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  44. package/fesm2015/nxt-pick-datetime.mjs +1234 -1257
  45. package/fesm2015/nxt-pick-datetime.mjs.map +1 -1
  46. package/fesm2020/nxt-pick-datetime-moment-adapter.mjs +33 -35
  47. package/fesm2020/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  48. package/fesm2020/nxt-pick-datetime-native-adapter.mjs +36 -33
  49. package/fesm2020/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  50. package/fesm2020/nxt-pick-datetime.mjs +1164 -1247
  51. package/fesm2020/nxt-pick-datetime.mjs.map +1 -1
  52. package/lib/class/date-time-adapter.class.d.ts +31 -31
  53. package/lib/class/date-time-format.class.d.ts +2 -2
  54. package/lib/class/date-time.class.d.ts +24 -23
  55. package/lib/class/dialog-config.class.d.ts +5 -5
  56. package/lib/class/dialog-ref.class.d.ts +16 -17
  57. package/lib/date-time/calendar/calendar.component.d.ts +41 -41
  58. package/lib/date-time/calendar-body/calendar-body.component.d.ts +11 -11
  59. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +40 -40
  60. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +38 -38
  61. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +36 -36
  62. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +38 -40
  63. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +51 -53
  64. package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +1 -1
  65. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +38 -39
  66. package/lib/date-time/date-time-picker-input.directive.d.ts +59 -53
  67. package/lib/date-time/date-time-picker-intl.service.d.ts +3 -3
  68. package/lib/date-time/date-time-picker-trigger.directive.d.ts +9 -9
  69. package/lib/date-time/date-time.module.d.ts +4 -4
  70. package/lib/date-time/number-fixed-len.pipe.d.ts +2 -2
  71. package/lib/date-time/timer/timer.component.d.ts +22 -22
  72. package/lib/date-time/timer-box/timer-box.component.d.ts +10 -10
  73. package/lib/dialog/dialog-container/dialog-container.component.d.ts +28 -24
  74. package/lib/dialog/dialog.module.d.ts +4 -4
  75. package/lib/dialog/dialog.service.d.ts +28 -28
  76. package/moment-adapter/date-time-adapter.class.d.ts +9 -9
  77. package/moment-adapter/date-time-format.class.d.ts +2 -2
  78. package/moment-adapter/moment-adapter.module.d.ts +0 -5
  79. package/moment-adapter/public-api.d.ts +1 -1
  80. package/native-adapter/date-time-adapter.class.d.ts +6 -6
  81. package/native-adapter/date-time-format.class.d.ts +2 -2
  82. package/native-adapter/native-adapter.module.d.ts +0 -5
  83. package/native-adapter/public-api.d.ts +1 -1
  84. package/package.json +17 -15
  85. package/public-api.d.ts +13 -13
  86. package/moment-adapter/package.json +0 -10
  87. package/native-adapter/package.json +0 -10
  88. /package/{nxt-pick-datetime.d.ts → index.d.ts} +0 -0
  89. /package/moment-adapter/{nxt-pick-datetime-moment-adapter.d.ts → index.d.ts} +0 -0
  90. /package/native-adapter/{nxt-pick-datetime-native-adapter.d.ts → index.d.ts} +0 -0
@@ -1,38 +1,37 @@
1
1
  import { BlockScrollStrategy, Overlay, ScrollStrategy } from '@angular/cdk/overlay';
2
2
  import { ChangeDetectorRef, EventEmitter, InjectionToken, NgZone, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
3
3
  import { DateTimeAdapter } from '../../class/date-time-adapter.class';
4
- import { OwlDateTimeFormats } from '../../class/date-time-format.class';
5
- import { OwlDateTimeDirective, PickerMode, PickerType, SelectMode } from '../../class/date-time.class';
6
- import { OwlDialogService } from '../../dialog/dialog.service';
7
- import { OwlDateTimeInputDirective } from '../date-time-picker-input.directive';
4
+ import { DateTimeFormats } from '../../class/date-time-format.class';
5
+ import { DateTimeDirective, PickerMode, PickerType } from '../../class/date-time.class';
6
+ import { DialogService } from '../../dialog/dialog.service';
7
+ import { DateTimeInputDirective } from '../date-time-picker-input.directive';
8
8
  import * as i0 from "@angular/core";
9
9
  /** Injection token that determines the scroll handling while the dtPicker is open. */
10
- export declare const OWL_DTPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
10
+ export declare const NXT_DTPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
11
11
  /** @docs-private */
12
- export declare function OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => BlockScrollStrategy;
12
+ export declare function NXT_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => BlockScrollStrategy;
13
13
  /** @docs-private */
14
- export declare const OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER: {
14
+ export declare const NXT_DTPICKER_SCROLL_STRATEGY_PROVIDER: {
15
15
  provide: InjectionToken<() => ScrollStrategy>;
16
16
  deps: (typeof Overlay)[];
17
- useFactory: typeof OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY;
17
+ useFactory: typeof NXT_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY;
18
18
  };
19
- export declare class OwlDateTimeComponent<T> extends OwlDateTimeDirective<T> implements OnInit, OnDestroy {
20
- private overlay;
21
- private viewContainerRef;
22
- private dialogService;
23
- private ngZone;
24
- protected changeDetector: ChangeDetectorRef;
25
- protected dateTimeAdapter: DateTimeAdapter<T>;
26
- protected dateTimeFormats: OwlDateTimeFormats;
27
- private document;
19
+ export declare class DateTimeComponent<T> extends DateTimeDirective<T> implements OnInit, OnDestroy {
20
+ private readonly overlay;
21
+ private readonly viewContainerRef;
22
+ private readonly dialogService;
23
+ private readonly ngZone;
24
+ protected readonly changeDetector: ChangeDetectorRef;
25
+ private readonly defaultScrollStrategy;
26
+ private readonly document?;
28
27
  /** Custom class for the picker backdrop. */
29
28
  backdropClass: string | string[];
30
29
  /** Custom class for the picker overlay pane. */
31
30
  panelClass: string | string[];
32
31
  /** The date to open the calendar to initially. */
33
- private _startAt;
34
- get startAt(): T | null;
35
- set startAt(date: T | null);
32
+ private _startAt?;
33
+ get startAt(): T | undefined;
34
+ set startAt(date: T | undefined);
36
35
  /**
37
36
  * Set the type of the dateTime picker
38
37
  * 'both' -- show both calendar and timer
@@ -49,7 +48,7 @@ export declare class OwlDateTimeComponent<T> extends OwlDateTimeDirective<T> imp
49
48
  get pickerMode(): PickerMode;
50
49
  set pickerMode(mode: PickerMode);
51
50
  /** Whether the date time picker should be disabled. */
52
- private _disabled;
51
+ private _disabled?;
53
52
  get disabled(): boolean;
54
53
  set disabled(value: boolean);
55
54
  /** Whether the calendar is open. */
@@ -60,64 +59,63 @@ export declare class OwlDateTimeComponent<T> extends OwlDateTimeDirective<T> imp
60
59
  * The scroll strategy when the picker is open
61
60
  * Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
62
61
  * */
63
- scrollStrategy: ScrollStrategy;
62
+ scrollStrategy?: ScrollStrategy;
64
63
  /**
65
64
  * Callback when the picker is closed
66
65
  * */
67
- afterPickerClosed: EventEmitter<any>;
66
+ readonly afterPickerClosed: EventEmitter<void>;
68
67
  /**
69
68
  * Callback when the picker is open
70
69
  * */
71
- afterPickerOpen: EventEmitter<any>;
70
+ readonly afterPickerOpen: EventEmitter<void>;
72
71
  /**
73
72
  * Emits selected year in multi-year view
74
73
  * This doesn't imply a change on the selected date.
75
74
  * */
76
- yearSelected: EventEmitter<T>;
75
+ readonly yearSelected: EventEmitter<T>;
77
76
  /**
78
77
  * Emits selected month in year view
79
78
  * This doesn't imply a change on the selected date.
80
79
  * */
81
- monthSelected: EventEmitter<T>;
80
+ readonly monthSelected: EventEmitter<T>;
82
81
  /**
83
82
  * Emit when the selected value has been confirmed
84
83
  * */
85
- confirmSelectedChange: EventEmitter<T | T[]>;
84
+ readonly confirmSelectedChange: EventEmitter<T | (T | undefined)[]>;
86
85
  /**
87
86
  * Emits when the date time picker is disabled.
88
87
  * */
89
- disabledChange: EventEmitter<boolean>;
90
- private pickerContainerPortal;
91
- private pickerContainer;
92
- private popupRef;
93
- private dialogRef;
94
- private dtInputSub;
95
- private hidePickerStreamSub;
96
- private confirmSelectedStreamSub;
97
- private pickerOpenedStreamSub;
88
+ readonly disabledChange: EventEmitter<boolean>;
89
+ private pickerContainerPortal?;
90
+ private pickerContainer?;
91
+ private popupRef?;
92
+ private dialogRef?;
93
+ private dtInputSub?;
94
+ private hidePickerStreamSub?;
95
+ private confirmSelectedStreamSub?;
96
+ private pickerOpenedStreamSub?;
98
97
  /** The element that was focused before the date time picker was opened. */
99
- private focusedElementBeforeOpen;
100
- private _dtInput;
101
- get dtInput(): OwlDateTimeInputDirective<T>;
102
- private _selected;
103
- get selected(): T | null;
104
- set selected(value: T | null);
98
+ private focusedElementBeforeOpen?;
99
+ private _dtInput?;
100
+ get dtInput(): DateTimeInputDirective<T> | undefined;
101
+ private _selected?;
102
+ get selected(): T | undefined;
103
+ set selected(value: T | undefined);
105
104
  private _selecteds;
106
- get selecteds(): T[];
107
- set selecteds(values: T[]);
105
+ get selecteds(): Array<T | undefined>;
106
+ set selecteds(values: Array<T | undefined>);
108
107
  /** The minimum selectable date. */
109
- get minDateTime(): T | null;
108
+ get min(): T | undefined;
110
109
  /** The maximum selectable date. */
111
- get maxDateTime(): T | null;
112
- get dateTimeFilter(): (date: T | null) => boolean;
113
- get selectMode(): SelectMode;
110
+ get max(): T | undefined;
111
+ get dateTimeFilter(): ((date?: T | undefined) => boolean) | undefined;
112
+ get selectMode(): import("../../class/date-time.class").SelectMode | undefined;
114
113
  get isInSingleMode(): boolean;
115
114
  get isInRangeMode(): boolean;
116
- private defaultScrollStrategy;
117
- constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, dialogService: OwlDialogService, ngZone: NgZone, changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, defaultScrollStrategy: any, dateTimeFormats: OwlDateTimeFormats, document: any);
115
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, dialogService: DialogService, ngZone: NgZone, changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, defaultScrollStrategy: () => ScrollStrategy, dateTimeFormats: DateTimeFormats, document?: Document | undefined);
118
116
  ngOnInit(): void;
119
117
  ngOnDestroy(): void;
120
- registerInput(input: OwlDateTimeInputDirective<T>): void;
118
+ registerInput(input: DateTimeInputDirective<T>): void;
121
119
  open(): void;
122
120
  /**
123
121
  * Selects the given date
@@ -152,6 +150,6 @@ export declare class OwlDateTimeComponent<T> extends OwlDateTimeDirective<T> imp
152
150
  * Create the popup PositionStrategy.
153
151
  * */
154
152
  private createPopupPositionStrategy;
155
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeComponent<any>, [null, null, null, null, null, { optional: true; }, null, { optional: true; }, { optional: true; }]>;
156
- static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeComponent<any>, "owl-date-time", ["owlDateTime"], { "backdropClass": "backdropClass"; "panelClass": "panelClass"; "startAt": "startAt"; "pickerType": "pickerType"; "pickerMode": "pickerMode"; "disabled": "disabled"; "opened": "opened"; "scrollStrategy": "scrollStrategy"; }, { "afterPickerClosed": "afterPickerClosed"; "afterPickerOpen": "afterPickerOpen"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never>;
153
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeComponent<any>, [null, null, null, null, null, null, null, null, { optional: true; }]>;
154
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeComponent<any>, "nxt-date-time", never, { "backdropClass": "backdropClass"; "panelClass": "panelClass"; "startAt": "startAt"; "pickerType": "pickerType"; "pickerMode": "pickerMode"; "disabled": "disabled"; "opened": "opened"; "scrollStrategy": "scrollStrategy"; }, { "afterPickerClosed": "afterPickerClosed"; "afterPickerOpen": "afterPickerOpen"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
157
155
  }
@@ -1,5 +1,5 @@
1
1
  import { AnimationTriggerMetadata } from '@angular/animations';
2
- export declare const owlDateTimePickerAnimations: {
2
+ export declare const dateTimePickerAnimations: {
3
3
  readonly transformPicker: AnimationTriggerMetadata;
4
4
  readonly fadeInPicker: AnimationTriggerMetadata;
5
5
  };
@@ -1,41 +1,40 @@
1
1
  import { AnimationEvent } from '@angular/animations';
2
2
  import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
3
  import { DateTimeAdapter } from '../../class/date-time-adapter.class';
5
- import { OwlDateTimeDirective, PickerType } from '../../class/date-time.class';
6
- import { OwlCalendarComponent } from '../calendar/calendar.component';
7
- import { OwlDateTimeIntl } from '../date-time-picker-intl.service';
8
- import { OwlTimerComponent } from '../timer/timer.component';
4
+ import { DateTimeDirective } from '../../class/date-time.class';
5
+ import { CalendarComponent } from '../calendar/calendar.component';
6
+ import { DateTimeIntl } from '../date-time-picker-intl.service';
7
+ import { TimerComponent } from '../timer/timer.component';
9
8
  import * as i0 from "@angular/core";
10
- export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
11
- private cdRef;
12
- private elmRef;
13
- private pickerIntl;
14
- private dateTimeAdapter;
15
- calendar: OwlCalendarComponent<T>;
16
- timer: OwlTimerComponent<T>;
17
- picker: OwlDateTimeDirective<T>;
9
+ export declare class DateTimeContainerComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
10
+ private readonly cdRef;
11
+ private readonly elmRef;
12
+ private readonly pickerIntl;
13
+ private readonly dateTimeAdapter;
14
+ calendar?: CalendarComponent<T>;
15
+ timer?: TimerComponent<T>;
16
+ picker?: DateTimeDirective<T>;
18
17
  activeSelectedIndex: number;
19
18
  /**
20
19
  * Stream emits when try to hide picker
21
20
  * */
22
- private hidePicker$;
23
- get hidePickerStream(): Observable<any>;
21
+ private readonly hidePicker$;
22
+ readonly hidePickerStream: import("rxjs").Observable<void>;
24
23
  /**
25
24
  * Stream emits when try to confirm the selected value
26
25
  * */
27
- private confirmSelected$;
28
- get confirmSelectedStream(): Observable<any>;
29
- private pickerOpened$;
30
- get pickerOpenedStream(): Observable<any>;
26
+ private readonly confirmSelected$;
27
+ readonly confirmSelectedStream: import("rxjs").Observable<Event>;
28
+ private readonly pickerOpened$;
29
+ readonly pickerOpenedStream: import("rxjs").Observable<void>;
31
30
  /**
32
31
  * The current picker moment. This determines which time period is shown and which date is
33
32
  * highlighted when using keyboard navigation.
34
33
  */
35
- private _clamPickerMoment;
36
- get pickerMoment(): T;
37
- set pickerMoment(value: T);
38
- get pickerType(): PickerType;
34
+ private _clamPickerMoment?;
35
+ get pickerMoment(): T | undefined;
36
+ set pickerMoment(value: T | undefined);
37
+ get pickerType(): import("../../class/date-time.class").PickerType | undefined;
39
38
  get cancelLabel(): string;
40
39
  get setLabel(): string;
41
40
  /**
@@ -61,28 +60,28 @@ export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterCo
61
60
  * */
62
61
  get showControlButtons(): boolean;
63
62
  get containerElm(): HTMLElement;
64
- get owlDTContainerClass(): boolean;
65
- get owlDTPopupContainerClass(): boolean;
66
- get owlDTDialogContainerClass(): boolean;
67
- get owlDTInlineContainerClass(): boolean;
68
- get owlDTContainerDisabledClass(): boolean;
69
- get owlDTContainerId(): string;
70
- get owlDTContainerAnimation(): any;
71
- constructor(cdRef: ChangeDetectorRef, elmRef: ElementRef, pickerIntl: OwlDateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
63
+ get containerClass(): boolean;
64
+ get popupContainerClass(): boolean;
65
+ get dialogContainerClass(): boolean;
66
+ get inlineContainerClass(): boolean;
67
+ get containerDisabledClass(): boolean;
68
+ get containerId(): string | undefined;
69
+ get containerAnimation(): any;
70
+ constructor(cdRef: ChangeDetectorRef, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, dateTimeAdapter: DateTimeAdapter<T>);
72
71
  ngOnInit(): void;
73
72
  ngAfterContentInit(): void;
74
73
  ngAfterViewInit(): void;
75
74
  handleContainerAnimationDone(event: AnimationEvent): void;
76
- dateSelected(date: T): void;
77
- timeSelected(time: T): void;
75
+ dateSelected(date?: T): void;
76
+ timeSelected(time?: T): void;
78
77
  /**
79
78
  * Handle click on cancel button
80
79
  */
81
- onCancelClicked(event: any): void;
80
+ onCancelClicked(event: Event): void;
82
81
  /**
83
82
  * Handle click on set button
84
83
  */
85
- onSetClicked(event: any): void;
84
+ onSetClicked(event: Event): void;
86
85
  /**
87
86
  * Handle click on inform radio group
88
87
  */
@@ -98,7 +97,7 @@ export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterCo
98
97
  private initPicker;
99
98
  /**
100
99
  * Select calendar date in single mode,
101
- * it returns null when date is not selected.
100
+ * it returns undefined when date is not selected.
102
101
  */
103
102
  private dateSelectedInSingleMode;
104
103
  /**
@@ -110,13 +109,13 @@ export declare class OwlDateTimeContainerComponent<T> implements OnInit, AfterCo
110
109
  * Because the calendar date has 00:00:00 as default time, if the picker type is 'both',
111
110
  * we need to update the given calendar date's time before selecting it.
112
111
  * if it is valid, return the updated dateTime
113
- * if it is not valid, return null
112
+ * if it is not valid, return undefined
114
113
  */
115
114
  private updateAndCheckCalendarDate;
116
115
  /**
117
116
  * Focus to the picker
118
117
  * */
119
118
  private focusPicker;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeContainerComponent<any>, [null, null, null, { optional: true; }]>;
121
- static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeContainerComponent<any>, "owl-date-time-container", ["owlDateTimeContainer"], {}, {}, never, never>;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeContainerComponent<any>, never>;
120
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeContainerComponent<any>, "nxt-date-time-container", never, {}, {}, never, never, false, never>;
122
121
  }
@@ -1,39 +1,39 @@
1
1
  import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
2
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
3
3
  import { DateTimeAdapter } from '../class/date-time-adapter.class';
4
- import { OwlDateTimeFormats } from '../class/date-time-format.class';
4
+ import { DateTimeFormats } from '../class/date-time-format.class';
5
5
  import { SelectMode } from '../class/date-time.class';
6
- import { OwlDateTimeComponent } from './date-time-picker/date-time-picker.component';
6
+ import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
7
7
  import * as i0 from "@angular/core";
8
- export declare const OWL_DATETIME_VALUE_ACCESSOR: any;
9
- export declare const OWL_DATETIME_VALIDATORS: any;
10
- export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
11
- private elmRef;
12
- private renderer;
13
- private dateTimeAdapter;
14
- private dateTimeFormats;
8
+ export declare const NXT_DATETIME_VALUE_ACCESSOR: any;
9
+ export declare const NXT_DATETIME_VALIDATORS: any;
10
+ export declare class DateTimeInputDirective<T> implements OnInit, AfterContentInit, OnDestroy, ControlValueAccessor, Validator {
11
+ private readonly elmRef;
12
+ private readonly renderer;
13
+ private readonly dateTimeAdapter;
14
+ private readonly dateTimeFormats;
15
15
  /**
16
16
  * The date time picker that this input is associated with.
17
17
  * */
18
- set owlDateTime(value: OwlDateTimeComponent<T>);
18
+ set dateTime(value: DateTimeComponent<T>);
19
+ private _dateTimeFilter?;
19
20
  /**
20
21
  * A function to filter date time
21
22
  */
22
- set owlDateTimeFilter(filter: (date: T | null) => boolean);
23
- private _dateTimeFilter;
24
- get dateTimeFilter(): (date: T) => boolean;
23
+ set dateTimeFilter(filter: ((date?: T) => boolean) | undefined);
24
+ get dateTimeFilter(): ((date?: T) => boolean) | undefined;
25
25
  /** Whether the date time picker's input is disabled. */
26
26
  private _disabled;
27
27
  get disabled(): boolean;
28
28
  set disabled(value: boolean);
29
29
  /** The minimum valid date. */
30
- private _min;
31
- get min(): T | null;
32
- set min(value: T | null);
30
+ private _min?;
31
+ get min(): T | undefined;
32
+ set min(value: T | undefined);
33
33
  /** The maximum valid date. */
34
- private _max;
35
- get max(): T | null;
36
- set max(value: T | null);
34
+ private _max?;
35
+ get max(): T | undefined;
36
+ set max(value: T | undefined);
37
37
  /**
38
38
  * The picker's select mode
39
39
  */
@@ -44,56 +44,64 @@ export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterConten
44
44
  * The character to separate the 'from' and 'to' in input value
45
45
  */
46
46
  rangeSeparator: string;
47
- private _value;
48
- get value(): T | null;
49
- set value(value: T | null);
47
+ private _value?;
48
+ get value(): T | undefined;
49
+ set value(value: T | undefined);
50
50
  private _values;
51
- get values(): T[];
52
- set values(values: T[]);
51
+ get values(): Array<T | undefined>;
52
+ set values(values: Array<T | undefined>);
53
53
  /**
54
54
  * Callback to invoke when `change` event is fired on this `<input>`
55
55
  * */
56
- dateTimeChange: EventEmitter<any>;
56
+ readonly dateTimeChange: EventEmitter<{
57
+ source: DateTimeInputDirective<T>;
58
+ value?: T | (T | undefined)[] | undefined;
59
+ input: HTMLInputElement;
60
+ }>;
57
61
  /**
58
62
  * Callback to invoke when an `input` event is fired on this `<input>`.
59
63
  * */
60
- dateTimeInput: EventEmitter<any>;
61
- get elementRef(): ElementRef;
64
+ readonly dateTimeInput: EventEmitter<{
65
+ source: DateTimeInputDirective<T>;
66
+ value?: T | (T | undefined)[] | undefined;
67
+ input: HTMLInputElement;
68
+ }>;
69
+ get elementRef(): ElementRef<HTMLInputElement>;
62
70
  get isInSingleMode(): boolean;
63
71
  get isInRangeMode(): boolean;
64
72
  /** The date-time-picker that this input is associated with. */
65
- dtPicker: OwlDateTimeComponent<T>;
66
- private dtPickerSub;
67
- private localeSub;
73
+ dtPicker?: DateTimeComponent<T>;
74
+ private dtPickerSub?;
75
+ private localeSub?;
68
76
  private lastValueValid;
69
- private onModelChange;
70
- private onModelTouched;
71
- private validatorOnChange;
77
+ private onModelChange?;
78
+ private onModelTouched?;
79
+ private validatorOnChange?;
72
80
  /** The form control validator for whether the input parses. */
73
- private parseValidator;
81
+ private readonly parseValidator;
74
82
  /** The form control validator for the min date. */
75
- private minValidator;
83
+ private readonly minValidator;
76
84
  /** The form control validator for the max date. */
77
- private maxValidator;
85
+ private readonly maxValidator;
78
86
  /** The form control validator for the date filter. */
79
- private filterValidator;
87
+ private readonly filterValidator;
80
88
  /**
81
89
  * The form control validator for the range.
82
90
  * Check whether the 'before' value is before the 'to' value
83
91
  * */
84
- private rangeValidator;
92
+ private readonly rangeValidator;
85
93
  /** The combined form control validator for this input. */
86
- private validator;
94
+ private readonly validator;
87
95
  /** Emits when the value changes (either due to user input or programmatic change). */
88
- valueChange: EventEmitter<T | T[]>;
96
+ readonly valueChange: EventEmitter<T | (T | undefined)[] | undefined>;
89
97
  /** Emits when the disabled state has changed */
90
- disabledChange: EventEmitter<boolean>;
91
- get owlDateTimeInputAriaHaspopup(): boolean;
92
- get owlDateTimeInputAriaOwns(): string;
93
- get minIso8601(): string;
94
- get maxIso8601(): string;
95
- get owlDateTimeInputDisabled(): boolean;
96
- constructor(elmRef: ElementRef, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
98
+ readonly disabledChange: EventEmitter<boolean>;
99
+ get inputAriaHaspopup(): boolean;
100
+ get inputAriaOwns(): string | undefined;
101
+ get minIso8601(): string | undefined;
102
+ get maxIso8601(): string | undefined;
103
+ get inputDisabled(): boolean;
104
+ constructor(elmRef: ElementRef<HTMLInputElement>, renderer: Renderer2, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
97
105
  ngOnInit(): void;
98
106
  ngAfterContentInit(): void;
99
107
  ngOnDestroy(): void;
@@ -101,9 +109,7 @@ export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterConten
101
109
  registerOnChange(fn: any): void;
102
110
  registerOnTouched(fn: any): void;
103
111
  setDisabledState(isDisabled: boolean): void;
104
- validate(c: AbstractControl): {
105
- [key: string]: any;
106
- };
112
+ validate(c: AbstractControl): ValidationErrors | null;
107
113
  registerOnValidatorChange(fn: () => void): void;
108
114
  /**
109
115
  * Open the picker when user hold alt + DOWN_ARROW
@@ -147,6 +153,6 @@ export declare class OwlDateTimeInputDirective<T> implements OnInit, AfterConten
147
153
  * Check if the two value is the same
148
154
  */
149
155
  private isSameValue;
150
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInputDirective<any>, [null, null, { optional: true; }, { optional: true; }]>;
151
- static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTimeInputDirective<any>, "input[owlDateTime]", ["owlDateTimeInput"], { "owlDateTime": "owlDateTime"; "owlDateTimeFilter": "owlDateTimeFilter"; "_disabled": "_disabled"; "min": "min"; "max": "max"; "selectMode": "selectMode"; "rangeSeparator": "rangeSeparator"; "value": "value"; "values": "values"; }, { "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never>;
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeInputDirective<any>, never>;
157
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeInputDirective<any>, "input[nxtDateTime]", ["nxtDateTimeInput"], { "dateTime": "nxtDateTime"; "dateTimeFilter": "dateTimeFilter"; "_disabled": "_disabled"; "min": "min"; "max": "max"; "selectMode": "selectMode"; "rangeSeparator": "rangeSeparator"; "value": "value"; "values": "values"; }, { "dateTimeChange": "dateTimeChange"; "dateTimeInput": "dateTimeInput"; }, never, never, false, never>;
152
158
  }
@@ -1,6 +1,6 @@
1
1
  import { Subject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
- export declare class OwlDateTimeIntl {
3
+ export declare class DateTimeIntl {
4
4
  /**
5
5
  * Stream that emits whenever the labels here are changed. Use this to notify
6
6
  * components if the labels have changed after initialization.
@@ -46,6 +46,6 @@ export declare class OwlDateTimeIntl {
46
46
  hour12AMLabel: string;
47
47
  /** A label for the hour12 button (PM) */
48
48
  hour12PMLabel: string;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeIntl, never>;
50
- static ɵprov: i0.ɵɵInjectableDeclaration<OwlDateTimeIntl>;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeIntl, never>;
50
+ static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeIntl>;
51
51
  }
@@ -1,14 +1,14 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
- import { OwlDateTimeComponent } from './date-time-picker/date-time-picker.component';
2
+ import { DateTimeComponent } from './date-time-picker/date-time-picker.component';
3
3
  import * as i0 from "@angular/core";
4
- export declare class OwlDateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
5
- protected changeDetector: ChangeDetectorRef;
6
- dtPicker: OwlDateTimeComponent<T>;
7
- private _disabled;
4
+ export declare class DateTimeTriggerDirective<T> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
5
+ protected readonly changeDetector: ChangeDetectorRef;
6
+ dtPicker?: DateTimeComponent<T>;
7
+ private _disabled?;
8
8
  get disabled(): boolean;
9
9
  set disabled(value: boolean);
10
- get owlDTTriggerDisabledClass(): boolean;
11
- private stateChanges;
10
+ get triggerDisabledClass(): boolean;
11
+ private stateChanges?;
12
12
  constructor(changeDetector: ChangeDetectorRef);
13
13
  ngOnInit(): void;
14
14
  ngOnChanges(changes: SimpleChanges): void;
@@ -16,6 +16,6 @@ export declare class OwlDateTimeTriggerDirective<T> implements OnInit, OnChanges
16
16
  ngOnDestroy(): void;
17
17
  handleClickOnHost(event: Event): void;
18
18
  private watchStateChanges;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeTriggerDirective<any>, never>;
20
- static ɵdir: i0.ɵɵDirectiveDeclaration<OwlDateTimeTriggerDirective<any>, "[owlDateTimeTrigger]", never, { "dtPicker": "owlDateTimeTrigger"; "disabled": "disabled"; }, {}, never>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeTriggerDirective<any>, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeTriggerDirective<any>, "[nxtDateTimeTrigger]", never, { "dtPicker": "nxtDateTimeTrigger"; "disabled": "disabled"; }, {}, never, never, false, never>;
21
21
  }
@@ -16,8 +16,8 @@ import * as i14 from "@angular/common";
16
16
  import * as i15 from "@angular/cdk/overlay";
17
17
  import * as i16 from "../dialog/dialog.module";
18
18
  import * as i17 from "@angular/cdk/a11y";
19
- export declare class OwlDateTimeModule {
20
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, [typeof i1.OwlDateTimeTriggerDirective, typeof i2.OwlDateTimeInputDirective, typeof i3.OwlDateTimeComponent, typeof i4.OwlDateTimeContainerComponent, typeof i5.OwlMultiYearViewComponent, typeof i6.OwlYearViewComponent, typeof i7.OwlMonthViewComponent, typeof i8.OwlTimerComponent, typeof i9.OwlTimerBoxComponent, typeof i10.OwlCalendarComponent, typeof i11.OwlCalendarBodyComponent, typeof i12.NumberFixedLenPipe, typeof i13.OwlDateTimeInlineComponent], [typeof i14.CommonModule, typeof i15.OverlayModule, typeof i16.OwlDialogModule, typeof i17.A11yModule], [typeof i10.OwlCalendarComponent, typeof i8.OwlTimerComponent, typeof i1.OwlDateTimeTriggerDirective, typeof i2.OwlDateTimeInputDirective, typeof i3.OwlDateTimeComponent, typeof i13.OwlDateTimeInlineComponent, typeof i5.OwlMultiYearViewComponent, typeof i6.OwlYearViewComponent, typeof i7.OwlMonthViewComponent]>;
22
- static ɵinj: i0.ɵɵInjectorDeclaration<OwlDateTimeModule>;
19
+ export declare class DateTimeModule {
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i4.DateTimeContainerComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent, typeof i8.TimerComponent, typeof i9.TimerBoxComponent, typeof i10.CalendarComponent, typeof i11.CalendarBodyComponent, typeof i12.NumberFixedLenPipe, typeof i13.DateTimeInlineComponent], [typeof i14.CommonModule, typeof i15.OverlayModule, typeof i16.DialogModule, typeof i17.A11yModule], [typeof i10.CalendarComponent, typeof i8.TimerComponent, typeof i1.DateTimeTriggerDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeComponent, typeof i13.DateTimeInlineComponent, typeof i5.MultiYearViewComponent, typeof i6.YearViewComponent, typeof i7.MonthViewComponent]>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeModule>;
23
23
  }
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class NumberFixedLenPipe implements PipeTransform {
4
- transform(num: number, len: number): any;
4
+ transform(num: number | undefined, len: number | undefined): string | number | undefined;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<NumberFixedLenPipe, never>;
6
- static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen">;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NumberFixedLenPipe, "numberFixedLen", false>;
7
7
  }
@@ -1,25 +1,25 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnInit } from '@angular/core';
2
2
  import { DateTimeAdapter } from '../../class/date-time-adapter.class';
3
- import { OwlDateTimeIntl } from '../date-time-picker-intl.service';
3
+ import { DateTimeIntl } from '../date-time-picker-intl.service';
4
4
  import * as i0 from "@angular/core";
5
- export declare class OwlTimerComponent<T> implements OnInit {
6
- private ngZone;
7
- private elmRef;
8
- private pickerIntl;
9
- private cdRef;
10
- private dateTimeAdapter;
5
+ export declare class TimerComponent<T> implements OnInit {
6
+ private readonly ngZone;
7
+ private readonly elmRef;
8
+ private readonly pickerIntl;
9
+ private readonly cdRef;
10
+ private readonly dateTimeAdapter;
11
11
  /** The current picker moment */
12
- private _pickerMoment;
13
- get pickerMoment(): T;
14
- set pickerMoment(value: T);
12
+ private _pickerMoment?;
13
+ get pickerMoment(): T | undefined;
14
+ set pickerMoment(value: T | undefined);
15
15
  /** The minimum selectable date time. */
16
- private _minDateTime;
17
- get minDateTime(): T | null;
18
- set minDateTime(value: T | null);
16
+ private _minDateTime?;
17
+ get min(): T | undefined;
18
+ set min(value: T | undefined);
19
19
  /** The maximum selectable date time. */
20
- private _maxDateTime;
21
- get maxDateTime(): T | null;
22
- set maxDateTime(value: T | null);
20
+ private _maxDateTime?;
21
+ get max(): T | undefined;
22
+ set max(value: T | undefined);
23
23
  private isPM;
24
24
  /**
25
25
  * Whether to show the second's timer
@@ -57,10 +57,10 @@ export declare class OwlTimerComponent<T> implements OnInit {
57
57
  get upSecondButtonLabel(): string;
58
58
  get downSecondButtonLabel(): string;
59
59
  get hour12ButtonLabel(): string;
60
- selectedChange: EventEmitter<T>;
61
- get owlDTTimerClass(): boolean;
62
- get owlDTTimeTabIndex(): number;
63
- constructor(ngZone: NgZone, elmRef: ElementRef, pickerIntl: OwlDateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
60
+ readonly selectedChange: EventEmitter<T>;
61
+ get timerClass(): boolean;
62
+ get timeTabIndex(): number;
63
+ constructor(ngZone: NgZone, elmRef: ElementRef<HTMLElement>, pickerIntl: DateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
64
64
  ngOnInit(): void;
65
65
  /**
66
66
  * Focus to the host element
@@ -124,6 +124,6 @@ export declare class OwlTimerComponent<T> implements OnInit {
124
124
  * Get a valid date object
125
125
  */
126
126
  private getValidDate;
127
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlTimerComponent<any>, [null, null, null, null, { optional: true; }]>;
128
- static ɵcmp: i0.ɵɵComponentDeclaration<OwlTimerComponent<any>, "owl-date-time-timer", ["owlDateTimeTimer"], { "pickerMoment": "pickerMoment"; "minDateTime": "minDateTime"; "maxDateTime": "maxDateTime"; "showSecondsTimer": "showSecondsTimer"; "hour12Timer": "hour12Timer"; "stepHour": "stepHour"; "stepMinute": "stepMinute"; "stepSecond": "stepSecond"; }, { "selectedChange": "selectedChange"; }, never, never>;
127
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimerComponent<any>, never>;
128
+ static ɵcmp: i0.ɵɵComponentDeclaration<TimerComponent<any>, "nxt-date-time-timer", never, { "pickerMoment": "pickerMoment"; "min": "min"; "max": "max"; "showSecondsTimer": "showSecondsTimer"; "hour12Timer": "hour12Timer"; "stepHour": "stepHour"; "stepMinute": "stepMinute"; "stepSecond": "stepSecond"; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
129
129
  }