@netwin/angular-datetime-picker 18.2.0 → 19.0.0-rc.1

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 (77) hide show
  1. package/README.md +1 -27
  2. package/assets/style/picker.min.css +1 -1
  3. package/esm2022/lib/date-time/adapter/date-time-adapter.class.mjs +7 -13
  4. package/esm2022/lib/date-time/adapter/date-time-format.class.mjs +1 -4
  5. package/esm2022/lib/date-time/adapter/native-date-time-adapter.class.mjs +19 -34
  6. package/esm2022/lib/date-time/adapter/native-date-time-format.class.mjs +1 -2
  7. package/esm2022/lib/date-time/adapter/native-date-time.module.mjs +1 -4
  8. package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.mjs +10 -23
  9. package/esm2022/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.mjs +1 -2
  10. package/esm2022/lib/date-time/calendar-body.component.mjs +21 -30
  11. package/esm2022/lib/date-time/calendar-month-view.component.mjs +11 -27
  12. package/esm2022/lib/date-time/calendar-multi-year-view.component.mjs +9 -15
  13. package/esm2022/lib/date-time/calendar-year-view.component.mjs +9 -17
  14. package/esm2022/lib/date-time/calendar.component.mjs +14 -25
  15. package/esm2022/lib/date-time/date-time-inline.component.mjs +261 -107
  16. package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +1 -8
  17. package/esm2022/lib/date-time/date-time.module.mjs +10 -34
  18. package/esm2022/lib/date-time/options-provider.mjs +1 -1
  19. package/esm2022/lib/date-time/timer-box.component.mjs +4 -14
  20. package/esm2022/lib/date-time/timer.component.mjs +16 -15
  21. package/esm2022/lib/types/date-view.mjs +19 -0
  22. package/esm2022/lib/types/index.mjs +4 -0
  23. package/esm2022/lib/types/picker-type.mjs +2 -0
  24. package/esm2022/lib/types/select-mode.mjs +2 -0
  25. package/esm2022/public_api.mjs +13 -20
  26. package/fesm2022/netwin-angular-datetime-picker.mjs +2522 -4961
  27. package/fesm2022/netwin-angular-datetime-picker.mjs.map +1 -1
  28. package/lib/date-time/adapter/date-time-adapter.class.d.ts +16 -26
  29. package/lib/date-time/adapter/date-time-format.class.d.ts +8 -12
  30. package/lib/date-time/adapter/native-date-time-adapter.class.d.ts +7 -18
  31. package/lib/date-time/adapter/native-date-time-format.class.d.ts +0 -3
  32. package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.d.ts +6 -17
  33. package/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.d.ts +0 -3
  34. package/lib/date-time/calendar-body.component.d.ts +21 -26
  35. package/lib/date-time/calendar-month-view.component.d.ts +19 -24
  36. package/lib/date-time/calendar-multi-year-view.component.d.ts +7 -8
  37. package/lib/date-time/calendar-year-view.component.d.ts +8 -9
  38. package/lib/date-time/calendar.component.d.ts +15 -21
  39. package/lib/date-time/date-time-inline.component.d.ts +164 -74
  40. package/lib/date-time/date-time-picker-intl.service.d.ts +0 -4
  41. package/lib/date-time/date-time.module.d.ts +11 -18
  42. package/lib/date-time/timer-box.component.d.ts +4 -5
  43. package/lib/date-time/timer.component.d.ts +6 -9
  44. package/lib/types/date-view.d.ts +17 -0
  45. package/lib/types/index.d.ts +3 -0
  46. package/lib/types/picker-type.d.ts +7 -0
  47. package/lib/types/select-mode.d.ts +8 -0
  48. package/package.json +1 -1
  49. package/public_api.d.ts +12 -19
  50. package/esm2022/lib/date-time/date-time-picker-container.component.mjs +0 -405
  51. package/esm2022/lib/date-time/date-time-picker-input.directive.mjs +0 -598
  52. package/esm2022/lib/date-time/date-time-picker-trigger.directive.mjs +0 -64
  53. package/esm2022/lib/date-time/date-time-picker.animations.mjs +0 -21
  54. package/esm2022/lib/date-time/date-time-picker.component.mjs +0 -564
  55. package/esm2022/lib/date-time/date-time.class.mjs +0 -176
  56. package/esm2022/lib/date-time/numberedFixLen.pipe.mjs +0 -28
  57. package/esm2022/lib/dialog/dialog-config.class.mjs +0 -59
  58. package/esm2022/lib/dialog/dialog-container.component.mjs +0 -232
  59. package/esm2022/lib/dialog/dialog-ref.class.mjs +0 -134
  60. package/esm2022/lib/dialog/dialog.module.mjs +0 -26
  61. package/esm2022/lib/dialog/dialog.service.mjs +0 -228
  62. package/esm2022/lib/utils/index.mjs +0 -5
  63. package/esm2022/lib/utils/object.utils.mjs +0 -23
  64. package/lib/date-time/date-time-picker-container.component.d.ts +0 -130
  65. package/lib/date-time/date-time-picker-input.directive.d.ts +0 -164
  66. package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -23
  67. package/lib/date-time/date-time-picker.animations.d.ts +0 -8
  68. package/lib/date-time/date-time-picker.component.d.ts +0 -173
  69. package/lib/date-time/date-time.class.d.ts +0 -103
  70. package/lib/date-time/numberedFixLen.pipe.d.ts +0 -10
  71. package/lib/dialog/dialog-config.class.d.ts +0 -169
  72. package/lib/dialog/dialog-container.component.d.ts +0 -58
  73. package/lib/dialog/dialog-ref.class.d.ts +0 -51
  74. package/lib/dialog/dialog.module.d.ts +0 -11
  75. package/lib/dialog/dialog.service.d.ts +0 -76
  76. package/lib/utils/index.d.ts +0 -4
  77. package/lib/utils/object.utils.d.ts +0 -8
@@ -1,11 +1,8 @@
1
- /**
2
- * calendar.component
3
- */
4
1
  import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
2
+ import { DateView, SelectMode } from '../types';
5
3
  import { DateTimeAdapter } from './adapter/date-time-adapter.class';
6
4
  import { OwlDateTimeFormats } from './adapter/date-time-format.class';
7
5
  import { OwlDateTimeIntl } from './date-time-picker-intl.service';
8
- import { DateView, DateViewType, SelectMode } from './date-time.class';
9
6
  import * as i0 from "@angular/core";
10
7
  export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterViewChecked, OnDestroy {
11
8
  private elmRef;
@@ -14,7 +11,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
14
11
  private cdRef;
15
12
  private dateTimeAdapter;
16
13
  private dateTimeFormats;
17
- DateView: typeof DateView;
14
+ protected readonly DateView: typeof DateView;
18
15
  get minDate(): T | null;
19
16
  set minDate(value: T | null);
20
17
  get maxDate(): T | null;
@@ -29,20 +26,20 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
29
26
  get periodButtonLabel(): string;
30
27
  get prevButtonLabel(): string;
31
28
  get nextButtonLabel(): string;
32
- get currentView(): DateViewType;
33
- set currentView(view: DateViewType);
29
+ get currentView(): DateView;
30
+ set currentView(view: DateView);
34
31
  get isInSingleMode(): boolean;
35
32
  get isInRangeMode(): boolean;
36
33
  get showControlArrows(): boolean;
37
34
  get isMonthView(): boolean;
38
35
  /**
39
36
  * Bind class 'owl-dt-calendar' to host
40
- * */
37
+ */
41
38
  get owlDTCalendarClass(): boolean;
42
39
  constructor(elmRef: ElementRef, pickerIntl: OwlDateTimeIntl, ngZone: NgZone, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
43
40
  /**
44
41
  * Date filter for the month and year view
45
- * */
42
+ */
46
43
  dateFilter: (date: T) => boolean;
47
44
  /**
48
45
  * Set the first day of week
@@ -61,7 +58,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
61
58
  /**
62
59
  * The view that the calendar should start in.
63
60
  */
64
- startView: DateViewType;
61
+ startView: DateView;
65
62
  /**
66
63
  * Whether to should only the year and multi-year views.
67
64
  */
@@ -72,7 +69,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
72
69
  multiyearOnly: boolean;
73
70
  /**
74
71
  * Whether to hide dates in other months at the start or end of the current month.
75
- * */
72
+ */
76
73
  hideOtherMonths: boolean;
77
74
  /** Emits when the currently picker moment changes. */
78
75
  pickerMomentChange: EventEmitter<T>;
@@ -80,15 +77,13 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
80
77
  readonly dateClicked: EventEmitter<T>;
81
78
  /** Emits when the currently selected date changes. */
82
79
  readonly selectedChange: EventEmitter<T>;
83
- /** Emits when any date is selected. */
84
- readonly userSelection: EventEmitter<void>;
85
80
  /**
86
81
  * Emits the selected year. This doesn't imply a change on the selected date
87
- * */
82
+ */
88
83
  readonly yearSelected: EventEmitter<T>;
89
84
  /**
90
85
  * Emits the selected month. This doesn't imply a change on the selected date
91
- * */
86
+ */
92
87
  readonly monthSelected: EventEmitter<T>;
93
88
  private _currentView;
94
89
  private intlChangesSub;
@@ -111,22 +106,21 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
111
106
  toggleViews(): void;
112
107
  /**
113
108
  * Handles user clicks on the previous button.
114
- * */
109
+ */
115
110
  previousClicked(): void;
116
111
  /**
117
112
  * Handles user clicks on the next button.
118
- * */
113
+ */
119
114
  nextClicked(): void;
120
115
  dateSelected(date: T): void;
121
116
  /**
122
117
  * Change the pickerMoment value and switch to a specific view
123
118
  */
124
- goToDateInView(date: T, view: DateViewType): void;
119
+ goToDateInView(date: T, view: DateView): void;
125
120
  /**
126
121
  * Change the pickerMoment value
127
122
  */
128
123
  handlePickerMomentChange(date: T): void;
129
- userSelected(): void;
130
124
  /**
131
125
  * Whether the previous period button is enabled.
132
126
  */
@@ -137,7 +131,7 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
137
131
  nextButtonEnabled(): boolean;
138
132
  /**
139
133
  * Focus to the host element
140
- * */
134
+ */
141
135
  focusActiveCell(): void;
142
136
  selectYearInMultiYearView(normalizedYear: T): void;
143
137
  selectMonthInYearView(normalizedMonth: T): void;
@@ -150,5 +144,5 @@ export declare class OwlCalendarComponent<T> implements AfterContentInit, AfterV
150
144
  */
151
145
  private getValidDate;
152
146
  static ɵfac: i0.ɵɵFactoryDeclaration<OwlCalendarComponent<any>, [null, null, null, null, { optional: true; }, { optional: true; }]>;
153
- 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; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "userSelection": "userSelection"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
147
+ 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; }; }, { "pickerMomentChange": "pickerMomentChange"; "dateClicked": "dateClicked"; "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; }, never, never, false, never>;
154
148
  }
@@ -1,102 +1,192 @@
1
- import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { DateTimeAdapter } from './adapter/date-time-adapter.class';
4
- import { OwlDateTimeFormats } from './adapter/date-time-format.class';
5
- import { OwlDateTimeContainerComponent } from './date-time-picker-container.component';
6
- import { OwlDateTime, PickerMode, PickerType, SelectMode } from './date-time.class';
3
+ import { DateView, PickerType, SelectMode } from '../types';
7
4
  import * as i0 from "@angular/core";
8
- export declare const OWL_DATETIME_VALUE_ACCESSOR: any;
9
- export declare class OwlDateTimeInlineComponent<T> extends OwlDateTime<T> implements OnInit, ControlValueAccessor {
10
- protected changeDetector: ChangeDetectorRef;
11
- protected dateTimeAdapter: DateTimeAdapter<T>;
12
- protected dateTimeFormats: OwlDateTimeFormats;
13
- container: OwlDateTimeContainerComponent<T>;
14
- /**
15
- * Set the type of the dateTime picker
16
- * 'both' -- show both calendar and timer
17
- * 'calendar' -- show only calendar
18
- * 'timer' -- show only timer
19
- */
20
- private _pickerType;
21
- get pickerType(): PickerType;
22
- set pickerType(val: PickerType);
23
- private _disabled;
24
- get disabled(): boolean;
25
- set disabled(value: boolean);
26
- private _selectMode;
27
- get selectMode(): SelectMode;
28
- set selectMode(mode: SelectMode);
29
- /** The date to open the calendar to initially. */
5
+ export declare class OwlDateTimeInlineComponent implements ControlValueAccessor {
6
+ #private;
7
+ readonly id: string;
8
+ /**
9
+ * Whether the timer is in hour12 format
10
+ */
11
+ hour12Timer: boolean;
12
+ /**
13
+ * The view that the calendar should start in.
14
+ */
15
+ startView: DateView;
16
+ /**
17
+ * Whether to should only the year and multi-year views.
18
+ */
19
+ yearOnly: boolean;
20
+ /**
21
+ * Whether to should only the multi-year view.
22
+ */
23
+ multiyearOnly: boolean;
24
+ /**
25
+ * Hours to change per step
26
+ */
27
+ stepHour: number;
28
+ /**
29
+ * Minutes to change per step
30
+ */
31
+ stepMinute: number;
32
+ /**
33
+ * Seconds to change per step
34
+ */
35
+ stepSecond: number;
36
+ /**
37
+ * Set the first day of week.
38
+ * Has to be a number between 0 (Sunday) and 6 (Saturday)
39
+ */
40
+ private _firstDayOfWeek;
41
+ get firstDayOfWeek(): number;
42
+ set firstDayOfWeek(value: number);
43
+ /**
44
+ * Whether to hide dates in other months at the start or end of the current month.
45
+ */
46
+ hideOtherMonths: boolean;
47
+ protected get formatOptions(): Intl.DateTimeFormatOptions;
48
+ /**
49
+ * Date Time Checker to check if the give dateTime is selectable
50
+ */
51
+ dateTimeChecker: (dateTime: Date) => boolean;
52
+ protected getValidDate(obj: unknown): Date | null;
53
+ /**
54
+ * Set the {@link PickerType} of the dateTime picker
55
+ */
56
+ pickerType: PickerType;
57
+ /**
58
+ * Whether the picker is disabled or not
59
+ */
60
+ disabled: boolean;
61
+ /**
62
+ * Whether to show the second's timer
63
+ */
64
+ showSecondsTimer: boolean;
65
+ /**
66
+ * Which select mode to use:
67
+ * - 'single'
68
+ * - 'range'
69
+ * - 'rangeFrom'
70
+ * - 'rangeTo'
71
+ */
72
+ selectMode: SelectMode;
73
+ /**
74
+ * The date to open the calendar to initially.
75
+ */
30
76
  private _startAt;
31
- get startAt(): T | null;
32
- set startAt(date: T | null);
33
- /** The date to open for range calendar. */
77
+ get startAt(): Date | null;
78
+ set startAt(date: Date | null);
79
+ /**
80
+ * The date to open for range calendar.
81
+ */
34
82
  private _endAt;
35
- get endAt(): T | null;
36
- set endAt(date: T | null);
37
- private _dateTimeFilter;
38
- get dateTimeFilter(): (date: T | null) => boolean;
39
- set dateTimeFilter(filter: (date: T | null) => boolean);
40
- /** The minimum valid date. */
83
+ get endAt(): Date | null;
84
+ set endAt(date: Date | null);
85
+ /**
86
+ * @deprecated use `dateTimeFilter` instead!
87
+ */
88
+ owlDateTimeFilter: ((date: Date | null) => boolean) | null;
89
+ dateTimeFilter: ((date: Date | null) => boolean) | null;
90
+ protected get dateTimeFilterGetter(): ((date: Date | null) => boolean) | null;
41
91
  private _min;
42
- get minDateTime(): T | null;
43
- set minDateTime(value: T | null);
44
- /** The maximum valid date. */
92
+ /**
93
+ * The minimum valid date.
94
+ */
95
+ get min(): Date | null;
96
+ set min(value: Date | null);
45
97
  private _max;
46
- get maxDateTime(): T | null;
47
- set maxDateTime(value: T | null);
98
+ /**
99
+ * The maximum valid date.
100
+ */
101
+ get max(): Date | null;
102
+ set max(value: Date | null);
48
103
  private _value;
49
- get value(): T | null;
50
- set value(value: T | null);
104
+ get value(): Date | null;
105
+ set value(value: Date | null);
51
106
  private _values;
52
- get values(): Array<T>;
53
- set values(values: Array<T>);
107
+ get values(): Array<Date> | null;
108
+ set values(values: Array<Date>);
54
109
  /**
55
110
  * Emits selected year in multi-year view
56
111
  * This doesn't imply a change on the selected date.
57
- * */
58
- yearSelected: EventEmitter<T>;
112
+ */
113
+ readonly yearSelected: EventEmitter<Date>;
59
114
  /**
60
115
  * Emits selected month in year view
61
116
  * This doesn't imply a change on the selected date.
62
- * */
63
- monthSelected: EventEmitter<T>;
117
+ */
118
+ readonly monthSelected: EventEmitter<Date>;
64
119
  /**
65
120
  * Emits selected date
66
- * */
67
- dateSelected: EventEmitter<T>;
121
+ */
122
+ readonly dateSelected: EventEmitter<Date>;
123
+ protected activeSelectedIndex: number;
68
124
  private _selected;
69
- get selected(): T | null;
70
- set selected(value: T | null);
125
+ protected get selected(): Date | null;
126
+ protected set selected(value: Date | null);
71
127
  private _selecteds;
72
- get selecteds(): Array<T>;
73
- set selecteds(values: Array<T>);
74
- get opened(): boolean;
75
- get pickerMode(): PickerMode;
76
- get isInSingleMode(): boolean;
77
- get isInRangeMode(): boolean;
78
- get owlDTInlineClass(): boolean;
128
+ protected get selecteds(): Array<Date>;
129
+ protected set selecteds(values: Array<Date>);
130
+ /**
131
+ * Returns whether the picker is in single mode
132
+ */
133
+ protected get isInSingleMode(): boolean;
134
+ /**
135
+ * Returns whether the picker is in range mode (range, rangeFrom, rangeTo)
136
+ */
137
+ protected get isInRangeMode(): boolean;
138
+ /**
139
+ * The range 'from' label
140
+ */
141
+ protected get fromLabel(): string;
142
+ /**
143
+ * The range 'to' label
144
+ */
145
+ protected get toLabel(): string;
146
+ /**
147
+ * The range 'from' formatted value
148
+ */
149
+ protected get fromFormattedValue(): string;
150
+ /**
151
+ * The range 'to' formatted value
152
+ */
153
+ protected get toFormattedValue(): string;
79
154
  private onModelChange;
80
155
  private onModelTouched;
81
- constructor(changeDetector: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: OwlDateTimeFormats);
82
- ngOnInit(): void;
83
- writeValue(value: any): void;
84
- registerOnChange(fn: any): void;
85
- registerOnTouched(fn: any): void;
156
+ constructor();
157
+ writeValue(value: Date | Array<Date>): void;
158
+ registerOnChange(fn: (v: Date | Array<Date>) => void): void;
159
+ registerOnTouched(fn: () => void): void;
86
160
  setDisabledState(isDisabled: boolean): void;
87
- select(date: Array<T> | T): void;
161
+ select(date: Array<Date> | Date): void;
88
162
  /**
89
163
  * Emits the selected year in multi-year view
90
- * */
91
- selectYear(normalizedYear: T): void;
164
+ */
165
+ selectYear(normalizedYear: Date): void;
92
166
  /**
93
167
  * Emits selected month in year view
94
- * */
95
- selectMonth(normalizedMonth: T): void;
168
+ */
169
+ selectMonth(normalizedMonth: Date): void;
96
170
  /**
97
171
  * Emits the selected date
98
- * */
99
- selectDate(normalizedDate: T): void;
100
- static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInlineComponent<any>, [null, { optional: true; }, { optional: true; }]>;
101
- 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; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, false, never>;
172
+ */
173
+ selectDate(normalizedDate: Date): void;
174
+ /**
175
+ * Sets the active "selected" index in range mode.
176
+ * - 0 for 'from'
177
+ * - 1 for 'to'
178
+ */
179
+ protected setActiveSelectedIndex(index: number): void;
180
+ /**
181
+ * Handle click on inform radio group
182
+ */
183
+ protected handleKeydownOnInfoGroup(event: KeyboardEvent, next: HTMLElement, index: number): void;
184
+ static ɵfac: i0.ɵɵFactoryDeclaration<OwlDateTimeInlineComponent, never>;
185
+ static ɵcmp: i0.ɵɵComponentDeclaration<OwlDateTimeInlineComponent, "owl-date-time-inline", never, { "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; }; "pickerType": { "alias": "pickerType"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "selectMode": { "alias": "selectMode"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "endAt": { "alias": "endAt"; "required": false; }; "owlDateTimeFilter": { "alias": "owlDateTimeFilter"; "required": false; }; "dateTimeFilter": { "alias": "dateTimeFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "dateSelected": "dateSelected"; }, never, never, false, never>;
186
+ static ngAcceptInputType_hour12Timer: unknown;
187
+ static ngAcceptInputType_yearOnly: unknown;
188
+ static ngAcceptInputType_multiyearOnly: unknown;
189
+ static ngAcceptInputType_hideOtherMonths: unknown;
190
+ static ngAcceptInputType_disabled: unknown;
191
+ static ngAcceptInputType_showSecondsTimer: unknown;
102
192
  }
@@ -34,10 +34,6 @@ export declare class OwlDateTimeIntl {
34
34
  switchToMonthViewLabel: string;
35
35
  /** A label for the 'switch to year view' button (used by screen readers). */
36
36
  switchToMultiYearViewLabel: string;
37
- /** A label for the cancel button */
38
- cancelBtnLabel: string;
39
- /** A label for the set button */
40
- setBtnLabel: string;
41
37
  /** A label for the range 'from' in picker info */
42
38
  rangeFromLabel: string;
43
39
  /** A label for the range 'to' in picker info */
@@ -1,23 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./date-time-picker-trigger.directive";
3
- import * as i2 from "./date-time-picker-input.directive";
4
- import * as i3 from "./date-time-picker.component";
5
- import * as i4 from "./date-time-picker-container.component";
6
- import * as i5 from "./calendar-multi-year-view.component";
7
- import * as i6 from "./calendar-year-view.component";
8
- import * as i7 from "./calendar-month-view.component";
9
- import * as i8 from "./timer.component";
10
- import * as i9 from "./timer-box.component";
11
- import * as i10 from "./calendar.component";
12
- import * as i11 from "./calendar-body.component";
13
- import * as i12 from "./numberedFixLen.pipe";
14
- import * as i13 from "./date-time-inline.component";
15
- import * as i14 from "@angular/common";
16
- import * as i15 from "@angular/cdk/overlay";
17
- import * as i16 from "../dialog/dialog.module";
18
- import * as i17 from "@angular/cdk/a11y";
2
+ import * as i1 from "./calendar-multi-year-view.component";
3
+ import * as i2 from "./calendar-year-view.component";
4
+ import * as i3 from "./calendar-month-view.component";
5
+ import * as i4 from "./timer.component";
6
+ import * as i5 from "./timer-box.component";
7
+ import * as i6 from "./calendar.component";
8
+ import * as i7 from "./calendar-body.component";
9
+ import * as i8 from "./date-time-inline.component";
10
+ import * as i9 from "@angular/common";
11
+ import * as i10 from "@angular/cdk/a11y";
19
12
  export declare class OwlDateTimeModule {
20
13
  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]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OwlDateTimeModule, [typeof i1.OwlMultiYearViewComponent, typeof i2.OwlYearViewComponent, typeof i3.OwlMonthViewComponent, typeof i4.OwlTimerComponent, typeof i5.OwlTimerBoxComponent, typeof i6.OwlCalendarComponent, typeof i7.OwlCalendarBodyComponent, typeof i8.OwlDateTimeInlineComponent], [typeof i9.CommonModule, typeof i10.A11yModule], [typeof i8.OwlDateTimeInlineComponent, typeof i6.OwlCalendarComponent, typeof i4.OwlTimerComponent, typeof i1.OwlMultiYearViewComponent, typeof i2.OwlYearViewComponent, typeof i3.OwlMonthViewComponent]>;
22
15
  static ɵinj: i0.ɵɵInjectorDeclaration<OwlDateTimeModule>;
23
16
  }
@@ -9,20 +9,19 @@ export declare class OwlTimerBoxComponent implements OnInit, OnDestroy {
9
9
  /**
10
10
  * Value would be displayed in the box
11
11
  * If it is null, the box would display [value]
12
- * */
12
+ */
13
13
  boxValue: number;
14
14
  value: number;
15
15
  min: number;
16
16
  max: number;
17
17
  step: number;
18
18
  inputLabel: string;
19
- valueChange: EventEmitter<number>;
20
- inputChange: EventEmitter<number>;
19
+ readonly valueChange: EventEmitter<number>;
20
+ readonly inputChange: EventEmitter<number>;
21
21
  private inputStream;
22
22
  private inputStreamSub;
23
23
  private hasFocus;
24
- get displayValue(): string;
25
- get owlDTTimerBoxClass(): boolean;
24
+ protected get displayValue(): string;
26
25
  private valueInput;
27
26
  private onValueInputMouseWheelBind;
28
27
  ngOnInit(): void;
@@ -1,6 +1,3 @@
1
- /**
2
- * timer.component
3
- */
4
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone } from '@angular/core';
5
2
  import { DateTimeAdapter } from './adapter/date-time-adapter.class';
6
3
  import { OwlDateTimeIntl } from './date-time-picker-intl.service';
@@ -49,7 +46,7 @@ export declare class OwlTimerComponent<T> {
49
46
  * The value would be displayed in hourBox.
50
47
  * We need this because the value displayed in hourBox it not
51
48
  * the same as the hourValue when the timer is in hour12Timer mode.
52
- * */
49
+ */
53
50
  get hourBoxValue(): number;
54
51
  get minuteValue(): number;
55
52
  get secondValue(): number;
@@ -66,12 +63,12 @@ export declare class OwlTimerComponent<T> {
66
63
  constructor(ngZone: NgZone, elmRef: ElementRef, pickerIntl: OwlDateTimeIntl, cdRef: ChangeDetectorRef, dateTimeAdapter: DateTimeAdapter<T>);
67
64
  /**
68
65
  * Focus to the host element
69
- * */
66
+ */
70
67
  focus(): void;
71
68
  /**
72
69
  * Set the hour value via typing into timer box input
73
70
  * We need this to handle the hour value when the timer is in hour12 mode
74
- * */
71
+ */
75
72
  setHourValueViaInput(hours: number): void;
76
73
  setHourValue(hours: number): void;
77
74
  setMinuteValue(minutes: number): void;
@@ -106,21 +103,21 @@ export declare class OwlTimerComponent<T> {
106
103
  * 1 is after the comparedDate
107
104
  * -1 is before the comparedDate
108
105
  * 0 is equal the comparedDate
109
- * */
106
+ */
110
107
  private compareHours;
111
108
  /**
112
109
  * PickerMoment's minute value +/- certain amount and compare it to the give date
113
110
  * 1 is after the comparedDate
114
111
  * -1 is before the comparedDate
115
112
  * 0 is equal the comparedDate
116
- * */
113
+ */
117
114
  private compareMinutes;
118
115
  /**
119
116
  * PickerMoment's second value +/- certain amount and compare it to the give date
120
117
  * 1 is after the comparedDate
121
118
  * -1 is before the comparedDate
122
119
  * 0 is equal the comparedDate
123
- * */
120
+ */
124
121
  private compareSeconds;
125
122
  /**
126
123
  * Get a valid date object
@@ -0,0 +1,17 @@
1
+ /**
2
+ * An enum that identifies the different views of the calendar view.
3
+ */
4
+ export declare enum DateView {
5
+ /**
6
+ * Shows the all days of the month.
7
+ */
8
+ MONTH = "month",
9
+ /**
10
+ * Shows the all months of the year.
11
+ */
12
+ YEAR = "year",
13
+ /**
14
+ * Shows multiple years numbers.
15
+ */
16
+ MULTI_YEARS = "multi-years"
17
+ }
@@ -0,0 +1,3 @@
1
+ export * from './date-view';
2
+ export * from './picker-type';
3
+ export * from './select-mode';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The type of the date time picker.
3
+ * - `both` - show both calendar and timer.
4
+ * - `calendar` - show only calendar.
5
+ * - `timer` - show only timer.
6
+ */
7
+ export type PickerType = 'both' | 'calendar' | 'timer';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Select mode for the date picker
3
+ * - 'single': single date selection
4
+ * - 'range': range date selection
5
+ * - 'rangeFrom': range date selection with start date
6
+ * - 'rangeTo': range date selection with end date
7
+ */
8
+ export type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netwin/angular-datetime-picker",
3
- "version": "18.2.0",
3
+ "version": "19.0.0-rc.1",
4
4
  "description": "Angular Date Time Picker",
5
5
  "keywords": [
6
6
  "Angular",
package/public_api.d.ts CHANGED
@@ -1,24 +1,17 @@
1
- /**
2
- * picker
3
- */
4
- export { OwlDateTimeModule } from './lib/date-time/date-time.module';
5
- export { OwlDateTimeIntl } from './lib/date-time/date-time-picker-intl.service';
6
- export { OwlNativeDateTimeModule } from './lib/date-time/adapter/native-date-time.module';
7
- export { DateTimeAdapter, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_LOCALE_PROVIDER } from './lib/date-time/adapter/date-time-adapter.class';
8
- export { OWL_DATE_TIME_FORMATS, OwlDateTimeFormats } from './lib/date-time/adapter/date-time-format.class';
9
- export { UnixTimestampDateTimeAdapter } from './lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class';
10
- export { OWL_UNIX_TIMESTAMP_DATE_TIME_FORMATS } from './lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class';
11
- export { OwlDateTimeInlineComponent } from './lib/date-time/date-time-inline.component';
12
- export { OwlDateTimeComponent } from './lib/date-time/date-time-picker.component';
1
+ export * from './lib/date-time/adapter/date-time-adapter.class';
2
+ export * from './lib/date-time/adapter/date-time-format.class';
3
+ export * from './lib/date-time/adapter/native-date-time-adapter.class';
4
+ export * from './lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class';
5
+ export * from './lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class';
6
+ export * from './lib/date-time/options-provider';
7
+ export * from './lib/date-time/adapter/native-date-time.module';
8
+ export * from './lib/date-time/date-time-picker-intl.service';
9
+ export * from './lib/date-time/date-time.module';
13
10
  export * from './lib/date-time/calendar-body.component';
14
- export * from './lib/date-time/timer.component';
15
- export * from './lib/date-time/date-time-picker-trigger.directive';
16
- export * from './lib/date-time/date-time-picker-input.directive';
11
+ export * from './lib/date-time/calendar-month-view.component';
17
12
  export * from './lib/date-time/calendar-multi-year-view.component';
18
13
  export * from './lib/date-time/calendar-year-view.component';
19
- export * from './lib/date-time/calendar-month-view.component';
20
14
  export * from './lib/date-time/calendar.component';
15
+ export * from './lib/date-time/date-time-inline.component';
21
16
  export * from './lib/date-time/timer.component';
22
- export { NativeDateTimeAdapter } from './lib/date-time/adapter/native-date-time-adapter.class';
23
- export * from './lib/date-time/options-provider';
24
- export { DateView, DateViewType, PickerMode, PickerType, SelectMode } from './lib/date-time/date-time.class';
17
+ export * from './lib/types';