nxt-pick-datetime 16.0.0-alpha.6 → 16.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 (111) hide show
  1. package/{esm2020 → esm2022}/lib/class/date-time-adapter.class.mjs +96 -96
  2. package/{esm2020 → esm2022}/lib/class/date-time-format.class.mjs +3 -3
  3. package/esm2022/lib/class/date-time.class.mjs +96 -0
  4. package/{esm2020 → esm2022}/lib/class/dialog-config.class.mjs +46 -46
  5. package/{esm2020 → esm2022}/lib/class/dialog-ref.class.mjs +118 -118
  6. package/esm2022/lib/date-time/calendar/calendar.component.mjs +347 -0
  7. package/esm2022/lib/date-time/calendar-body/calendar-body.component.mjs +152 -0
  8. package/esm2022/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +430 -0
  9. package/esm2022/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +359 -0
  10. package/esm2022/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +363 -0
  11. package/esm2022/lib/date-time/date-time-inline/date-time-inline.component.mjs +276 -0
  12. package/esm2022/lib/date-time/date-time-picker/date-time-picker.component.mjs +542 -0
  13. package/{esm2020 → esm2022}/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs +18 -18
  14. package/esm2022/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +390 -0
  15. package/esm2022/lib/date-time/date-time-picker-input.directive.mjs +619 -0
  16. package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +62 -0
  17. package/esm2022/lib/date-time/date-time-picker-trigger.directive.mjs +71 -0
  18. package/esm2022/lib/date-time/date-time.module.mjs +97 -0
  19. package/esm2022/lib/date-time/number-fixed-len.pipe.mjs +23 -0
  20. package/esm2022/lib/date-time/timer/timer.component.mjs +300 -0
  21. package/esm2022/lib/date-time/timer-box/timer-box.component.mjs +96 -0
  22. package/esm2022/lib/dialog/dialog-container/dialog-container.component.mjs +249 -0
  23. package/esm2022/lib/dialog/dialog.module.mjs +43 -0
  24. package/esm2022/lib/dialog/dialog.service.mjs +252 -0
  25. package/esm2022/lib/utils/object.mjs +24 -0
  26. package/esm2022/moment-adapter/date-time-adapter.class.mjs +221 -0
  27. package/{esm2020 → esm2022}/moment-adapter/date-time-format.class.mjs +12 -12
  28. package/esm2022/moment-adapter/moment-adapter.module.mjs +38 -0
  29. package/{esm2020 → esm2022}/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +4 -4
  30. package/{esm2020 → esm2022}/moment-adapter/public-api.mjs +2 -2
  31. package/esm2022/native-adapter/date-time-adapter.class.mjs +367 -0
  32. package/{esm2020 → esm2022}/native-adapter/date-time-format.class.mjs +12 -12
  33. package/esm2022/native-adapter/native-adapter.module.mjs +38 -0
  34. package/{esm2020 → esm2022}/native-adapter/nxt-pick-datetime-native-adapter.mjs +4 -4
  35. package/{esm2020 → esm2022}/native-adapter/public-api.mjs +1 -1
  36. package/{esm2020 → esm2022}/nxt-pick-datetime.mjs +4 -4
  37. package/{esm2020 → esm2022}/public-api.mjs +13 -13
  38. package/{fesm2020 → fesm2022}/nxt-pick-datetime-moment-adapter.mjs +257 -257
  39. package/{fesm2020 → fesm2022}/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  40. package/{fesm2020 → fesm2022}/nxt-pick-datetime-native-adapter.mjs +402 -402
  41. package/{fesm2020 → fesm2022}/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  42. package/{fesm2020 → fesm2022}/nxt-pick-datetime.mjs +4858 -4860
  43. package/{fesm2020 → fesm2022}/nxt-pick-datetime.mjs.map +1 -1
  44. package/index.d.ts +5 -5
  45. package/lib/class/date-time-adapter.class.d.ts +176 -176
  46. package/lib/class/date-time-format.class.d.ts +12 -12
  47. package/lib/class/date-time.class.d.ts +76 -76
  48. package/lib/class/dialog-config.class.d.ts +90 -90
  49. package/lib/class/dialog-ref.class.d.ts +50 -50
  50. package/lib/date-time/calendar/calendar.component.d.ts +147 -147
  51. package/lib/date-time/calendar-body/calendar-body.component.d.ts +79 -79
  52. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +139 -139
  53. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +115 -115
  54. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +123 -123
  55. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +106 -106
  56. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +172 -172
  57. package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +6 -6
  58. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +129 -129
  59. package/lib/date-time/date-time-picker-input.directive.d.ts +167 -167
  60. package/lib/date-time/date-time-picker-intl.service.d.ts +51 -51
  61. package/lib/date-time/date-time-picker-trigger.directive.d.ts +22 -22
  62. package/lib/date-time/date-time.module.d.ts +23 -23
  63. package/lib/date-time/number-fixed-len.pipe.d.ts +8 -8
  64. package/lib/date-time/timer/timer.component.d.ts +131 -131
  65. package/lib/date-time/timer-box/timer-box.component.d.ts +37 -37
  66. package/lib/dialog/dialog-container/dialog-container.component.d.ts +69 -69
  67. package/lib/dialog/dialog.module.d.ts +12 -12
  68. package/lib/dialog/dialog.service.d.ts +78 -78
  69. package/lib/utils/object.d.ts +9 -10
  70. package/moment-adapter/date-time-adapter.class.d.ts +64 -64
  71. package/moment-adapter/date-time-format.class.d.ts +5 -5
  72. package/moment-adapter/index.d.ts +5 -5
  73. package/moment-adapter/moment-adapter.module.d.ts +6 -6
  74. package/moment-adapter/public-api.d.ts +2 -2
  75. package/native-adapter/date-time-adapter.class.d.ts +72 -72
  76. package/native-adapter/date-time-format.class.d.ts +5 -5
  77. package/native-adapter/index.d.ts +5 -5
  78. package/native-adapter/native-adapter.module.d.ts +7 -7
  79. package/native-adapter/public-api.d.ts +1 -1
  80. package/package.json +18 -28
  81. package/public-api.d.ts +14 -14
  82. package/esm2020/lib/class/date-time.class.mjs +0 -95
  83. package/esm2020/lib/date-time/calendar/calendar.component.mjs +0 -346
  84. package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +0 -151
  85. package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +0 -429
  86. package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +0 -358
  87. package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +0 -362
  88. package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +0 -275
  89. package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +0 -541
  90. package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +0 -389
  91. package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +0 -618
  92. package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +0 -61
  93. package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +0 -70
  94. package/esm2020/lib/date-time/date-time.module.mjs +0 -96
  95. package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +0 -22
  96. package/esm2020/lib/date-time/timer/timer.component.mjs +0 -299
  97. package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +0 -95
  98. package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +0 -248
  99. package/esm2020/lib/dialog/dialog.module.mjs +0 -42
  100. package/esm2020/lib/dialog/dialog.service.mjs +0 -252
  101. package/esm2020/lib/utils/object.mjs +0 -25
  102. package/esm2020/moment-adapter/date-time-adapter.class.mjs +0 -220
  103. package/esm2020/moment-adapter/moment-adapter.module.mjs +0 -37
  104. package/esm2020/native-adapter/date-time-adapter.class.mjs +0 -366
  105. package/esm2020/native-adapter/native-adapter.module.mjs +0 -37
  106. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +0 -274
  107. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +0 -1
  108. package/fesm2015/nxt-pick-datetime-native-adapter.mjs +0 -420
  109. package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +0 -1
  110. package/fesm2015/nxt-pick-datetime.mjs +0 -5014
  111. package/fesm2015/nxt-pick-datetime.mjs.map +0 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="nxt-pick-datetime" />
5
+ export * from './public-api';
@@ -1,176 +1,176 @@
1
- import { Observable, Subject } from 'rxjs';
2
- export declare abstract class DateTimeAdapter<T> {
3
- /** The locale to use for all dates */
4
- protected locale: any;
5
- /** A stream that emits when the locale changes */
6
- protected _localeChanges: Subject<void>;
7
- get localeChanges(): Observable<void>;
8
- /** total milliseconds in a day */
9
- protected readonly millisecondsInDay = 86400000;
10
- /** total milliseconds in a minute */
11
- protected readonly milliseondsInMinute = 60000;
12
- /**
13
- * Get the year of the given date
14
- */
15
- abstract getYear(date?: T): number;
16
- /**
17
- * Get the month of the given date
18
- * 0 -- January
19
- * 11 -- December
20
- * */
21
- abstract getMonth(date?: T): number;
22
- /**
23
- * Get the day of the week of the given date
24
- * 0 -- Sunday
25
- * 6 -- Saturday
26
- * */
27
- abstract getDay(date?: T): number;
28
- /**
29
- * Get the day num of the given date
30
- */
31
- abstract getDate(date?: T): number;
32
- /**
33
- * Get the hours of the given date
34
- */
35
- abstract getHours(date?: T): number;
36
- /**
37
- * Get the minutes of the given date
38
- */
39
- abstract getMinutes(date?: T): number;
40
- /**
41
- * Get the seconds of the given date
42
- */
43
- abstract getSeconds(date?: T): number;
44
- /**
45
- * Get the milliseconds timestamp of the given date
46
- */
47
- abstract getTime(date?: T): number;
48
- /**
49
- * Gets the number of days in the month of the given date.
50
- */
51
- abstract getNumDaysInMonth(date?: T): number;
52
- /**
53
- * Get the number of calendar days between the given dates.
54
- * If dateLeft is before dateRight, it would return positive value
55
- * If dateLeft is after dateRight, it would return negative value
56
- */
57
- abstract differenceInCalendarDays(dateLeft?: T, dateRight?: T): number | undefined;
58
- /**
59
- * Gets the name for the year of the given date.
60
- */
61
- abstract getYearName(date?: T): string;
62
- /**
63
- * Get a list of month names
64
- */
65
- abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
66
- /**
67
- * Get a list of week names
68
- */
69
- abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
70
- /**
71
- * Gets a list of names for the dates of the month.
72
- */
73
- abstract getDateNames(): string[];
74
- /**
75
- * Return a Date object as a string, using the ISO standard
76
- */
77
- abstract toIso8601(date: T): string;
78
- /**
79
- * Check if the give dates are equal
80
- */
81
- abstract isEqual(dateLeft?: T, dateRight?: T): boolean;
82
- /**
83
- * Check if the give dates are the same day
84
- */
85
- abstract isSameDay(dateLeft?: T, dateRight?: T): boolean;
86
- /**
87
- * Checks whether the given date is valid.
88
- */
89
- abstract isValid(date?: T): boolean;
90
- /**
91
- * Gets date instance that is not valid.
92
- */
93
- abstract invalid(): T;
94
- /**
95
- * Checks whether the given object is considered a date instance by this DateTimeAdapter.
96
- */
97
- abstract isDateInstance(obj: any): boolean;
98
- /**
99
- * Add the specified number of years to the given date
100
- */
101
- abstract addCalendarYears(date: T | undefined, amount: number): T;
102
- /**
103
- * Add the specified number of months to the given date
104
- */
105
- abstract addCalendarMonths(date: T | undefined, amount: number): T;
106
- /**
107
- * Add the specified number of days to the given date
108
- */
109
- abstract addCalendarDays(date: T | undefined, amount: number): T;
110
- /**
111
- * Set the hours to the given date.
112
- */
113
- abstract setHours(date: T | undefined, amount: number): T;
114
- /**
115
- * Set the minutes to the given date.
116
- */
117
- abstract setMinutes(date: T | undefined, amount: number): T;
118
- /**
119
- * Set the seconds to the given date.
120
- */
121
- abstract setSeconds(date: T | undefined, amount: number): T;
122
- /**
123
- * Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
124
- * month and date.
125
- */
126
- abstract createDate(year: number, month: number, date: number): T;
127
- abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
128
- /**
129
- * Clone the given date
130
- */
131
- abstract clone(date?: T): T;
132
- /**
133
- * Get a new moment
134
- * */
135
- abstract now(): T;
136
- /**
137
- * Formats a date as a string according to the given format.
138
- */
139
- abstract format(date: T | undefined, displayFormat: any): string;
140
- /**
141
- * Parse a user-provided value to a Date Object
142
- */
143
- abstract parse(value: any, parseFormat: any): T | undefined;
144
- /**
145
- * Compare two given dates
146
- * 1 if the first date is after the second,
147
- * -1 if the first date is before the second
148
- * 0 if dates are equal.
149
- * */
150
- compare(first?: T, second?: T): number;
151
- /**
152
- * Check if two given dates are in the same year
153
- * 1 if the first date's year is after the second,
154
- * -1 if the first date's year is before the second
155
- * 0 if two given dates are in the same year
156
- * */
157
- compareYear(first?: T, second?: T): number;
158
- /**
159
- * Attempts to deserialize a value to a valid date object. This is different from parsing in that
160
- * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
161
- * string). The default implementation does not allow any deserialization, it simply checks that
162
- * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
163
- * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
164
- * support passing values from your backend directly to these properties by overriding this method
165
- * to also deserialize the format used by your backend.
166
- */
167
- deserialize(value: any): T | undefined;
168
- /**
169
- * Sets the locale used for all dates.
170
- */
171
- setLocale(locale: any): void;
172
- /**
173
- * Clamp the given date between min and max dates.
174
- */
175
- clampDate(date: T, min?: T, max?: T): T;
176
- }
1
+ import { Observable, Subject } from 'rxjs';
2
+ export declare abstract class DateTimeAdapter<T> {
3
+ /** The locale to use for all dates */
4
+ protected locale: any;
5
+ /** A stream that emits when the locale changes */
6
+ protected _localeChanges: Subject<void>;
7
+ get localeChanges(): Observable<void>;
8
+ /** total milliseconds in a day */
9
+ protected readonly millisecondsInDay = 86400000;
10
+ /** total milliseconds in a minute */
11
+ protected readonly milliseondsInMinute = 60000;
12
+ /**
13
+ * Get the year of the given date
14
+ */
15
+ abstract getYear(date?: T): number;
16
+ /**
17
+ * Get the month of the given date
18
+ * 0 -- January
19
+ * 11 -- December
20
+ * */
21
+ abstract getMonth(date?: T): number;
22
+ /**
23
+ * Get the day of the week of the given date
24
+ * 0 -- Sunday
25
+ * 6 -- Saturday
26
+ * */
27
+ abstract getDay(date?: T): number;
28
+ /**
29
+ * Get the day num of the given date
30
+ */
31
+ abstract getDate(date?: T): number;
32
+ /**
33
+ * Get the hours of the given date
34
+ */
35
+ abstract getHours(date?: T): number;
36
+ /**
37
+ * Get the minutes of the given date
38
+ */
39
+ abstract getMinutes(date?: T): number;
40
+ /**
41
+ * Get the seconds of the given date
42
+ */
43
+ abstract getSeconds(date?: T): number;
44
+ /**
45
+ * Get the milliseconds timestamp of the given date
46
+ */
47
+ abstract getTime(date?: T): number;
48
+ /**
49
+ * Gets the number of days in the month of the given date.
50
+ */
51
+ abstract getNumDaysInMonth(date?: T): number;
52
+ /**
53
+ * Get the number of calendar days between the given dates.
54
+ * If dateLeft is before dateRight, it would return positive value
55
+ * If dateLeft is after dateRight, it would return negative value
56
+ */
57
+ abstract differenceInCalendarDays(dateLeft?: T, dateRight?: T): number | undefined;
58
+ /**
59
+ * Gets the name for the year of the given date.
60
+ */
61
+ abstract getYearName(date?: T): string;
62
+ /**
63
+ * Get a list of month names
64
+ */
65
+ abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
66
+ /**
67
+ * Get a list of week names
68
+ */
69
+ abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
70
+ /**
71
+ * Gets a list of names for the dates of the month.
72
+ */
73
+ abstract getDateNames(): string[];
74
+ /**
75
+ * Return a Date object as a string, using the ISO standard
76
+ */
77
+ abstract toIso8601(date: T): string;
78
+ /**
79
+ * Check if the give dates are equal
80
+ */
81
+ abstract isEqual(dateLeft?: T, dateRight?: T): boolean;
82
+ /**
83
+ * Check if the give dates are the same day
84
+ */
85
+ abstract isSameDay(dateLeft?: T, dateRight?: T): boolean;
86
+ /**
87
+ * Checks whether the given date is valid.
88
+ */
89
+ abstract isValid(date?: T): boolean;
90
+ /**
91
+ * Gets date instance that is not valid.
92
+ */
93
+ abstract invalid(): T;
94
+ /**
95
+ * Checks whether the given object is considered a date instance by this DateTimeAdapter.
96
+ */
97
+ abstract isDateInstance(obj: any): boolean;
98
+ /**
99
+ * Add the specified number of years to the given date
100
+ */
101
+ abstract addCalendarYears(date: T | undefined, amount: number): T;
102
+ /**
103
+ * Add the specified number of months to the given date
104
+ */
105
+ abstract addCalendarMonths(date: T | undefined, amount: number): T;
106
+ /**
107
+ * Add the specified number of days to the given date
108
+ */
109
+ abstract addCalendarDays(date: T | undefined, amount: number): T;
110
+ /**
111
+ * Set the hours to the given date.
112
+ */
113
+ abstract setHours(date: T | undefined, amount: number): T;
114
+ /**
115
+ * Set the minutes to the given date.
116
+ */
117
+ abstract setMinutes(date: T | undefined, amount: number): T;
118
+ /**
119
+ * Set the seconds to the given date.
120
+ */
121
+ abstract setSeconds(date: T | undefined, amount: number): T;
122
+ /**
123
+ * Creates a date with the given year, month, date, hour, minute and second. Does not allow over/under-flow of the
124
+ * month and date.
125
+ */
126
+ abstract createDate(year: number, month: number, date: number): T;
127
+ abstract createDate(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): T;
128
+ /**
129
+ * Clone the given date
130
+ */
131
+ abstract clone(date?: T): T;
132
+ /**
133
+ * Get a new moment
134
+ * */
135
+ abstract now(): T;
136
+ /**
137
+ * Formats a date as a string according to the given format.
138
+ */
139
+ abstract format(date: T | undefined, displayFormat: any): string;
140
+ /**
141
+ * Parse a user-provided value to a Date Object
142
+ */
143
+ abstract parse(value: any, parseFormat: any): T | undefined;
144
+ /**
145
+ * Compare two given dates
146
+ * 1 if the first date is after the second,
147
+ * -1 if the first date is before the second
148
+ * 0 if dates are equal.
149
+ * */
150
+ compare(first?: T, second?: T): number;
151
+ /**
152
+ * Check if two given dates are in the same year
153
+ * 1 if the first date's year is after the second,
154
+ * -1 if the first date's year is before the second
155
+ * 0 if two given dates are in the same year
156
+ * */
157
+ compareYear(first?: T, second?: T): number;
158
+ /**
159
+ * Attempts to deserialize a value to a valid date object. This is different from parsing in that
160
+ * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
161
+ * string). The default implementation does not allow any deserialization, it simply checks that
162
+ * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
163
+ * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
164
+ * support passing values from your backend directly to these properties by overriding this method
165
+ * to also deserialize the format used by your backend.
166
+ */
167
+ deserialize(value: any): T | undefined;
168
+ /**
169
+ * Sets the locale used for all dates.
170
+ */
171
+ setLocale(locale: any): void;
172
+ /**
173
+ * Clamp the given date between min and max dates.
174
+ */
175
+ clampDate(date: T, min?: T, max?: T): T;
176
+ }
@@ -1,12 +1,12 @@
1
- import { InjectionToken } from '@angular/core';
2
- export interface DateTimeFormats {
3
- parseInput: any;
4
- fullPickerInput: any;
5
- datePickerInput: any;
6
- timePickerInput: any;
7
- monthYearLabel: any;
8
- dateA11yLabel: any;
9
- monthYearA11yLabel: any;
10
- }
11
- /** InjectionToken for date time picker that can be used to override default format */
12
- export declare const NXT_DATE_TIME_FORMATS: InjectionToken<DateTimeFormats>;
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface DateTimeFormats {
3
+ parseInput: any;
4
+ fullPickerInput: any;
5
+ datePickerInput: any;
6
+ timePickerInput: any;
7
+ monthYearLabel: any;
8
+ dateA11yLabel: any;
9
+ monthYearA11yLabel: any;
10
+ }
11
+ /** InjectionToken for date time picker that can be used to override default format */
12
+ export declare const NXT_DATE_TIME_FORMATS: InjectionToken<DateTimeFormats>;
@@ -1,76 +1,76 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { DateTimeAdapter } from './date-time-adapter.class';
3
- import { DateTimeFormats } from './date-time-format.class';
4
- import * as i0 from "@angular/core";
5
- export type PickerType = 'both' | 'calendar' | 'timer';
6
- export type PickerMode = 'popup' | 'dialog' | 'inline';
7
- export type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
8
- export type RenderItem = 'year' | 'month' | 'date';
9
- export type ViewType = 'month' | 'year' | 'multi-years';
10
- export type DateFilter<T> = (date?: T, forRender?: RenderItem) => boolean;
11
- export declare abstract class DateTimeDirective<T> {
12
- protected readonly dateTimeAdapter: DateTimeAdapter<T>;
13
- protected readonly dateTimeFormats: DateTimeFormats;
14
- /**
15
- * When true, shows a timer to configure the seconds value
16
- */
17
- showSecondsTimer: boolean;
18
- /**
19
- * When true, the timer will be in 12-hour format mode
20
- */
21
- hour12Timer: boolean;
22
- /**
23
- * The view that the calendar should start on
24
- */
25
- startView: ViewType;
26
- /**
27
- * Hours to change per step
28
- */
29
- stepHour: number;
30
- /**
31
- * Minutes to change per step
32
- */
33
- stepMinute: number;
34
- /**
35
- * Seconds to change per step
36
- */
37
- stepSecond: number;
38
- /**
39
- * Set the first day of week
40
- *
41
- * Valid values are from 0 [Sunday] to 6 [Saturday]
42
- */
43
- firstDayOfWeek: number;
44
- /**
45
- * If true, don't show dates from preious / next month on the calendar month view
46
- */
47
- hideOtherMonths: boolean;
48
- readonly id: string;
49
- abstract get selected(): T | undefined;
50
- abstract get selecteds(): Array<T | undefined>;
51
- abstract get dateTimeFilter(): DateFilter<T> | undefined;
52
- abstract get max(): T | undefined;
53
- abstract get min(): T | undefined;
54
- abstract get selectMode(): SelectMode | undefined;
55
- abstract get startAt(): T | undefined;
56
- abstract get isOpen(): boolean;
57
- abstract get pickerMode(): PickerMode;
58
- abstract get pickerType(): PickerType;
59
- abstract get isInSingleMode(): boolean;
60
- abstract get isInRangeMode(): boolean;
61
- abstract select(date: T | Array<T | undefined>): void;
62
- abstract yearSelected: EventEmitter<T>;
63
- abstract monthSelected: EventEmitter<T>;
64
- abstract selectYear(normalizedYear: T): void;
65
- abstract selectMonth(normalizedMonth: T): void;
66
- get formatString(): string;
67
- /**
68
- * Date Time Checker to check if the give dateTime is selectable
69
- */
70
- dateTimeChecker: (dateTime: T | undefined) => boolean;
71
- get disabled(): boolean;
72
- constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
73
- protected getValidDate(obj: any): T | undefined;
74
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDirective<any>, never>;
75
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeDirective<any>, never, never, { "showSecondsTimer": "showSecondsTimer"; "hour12Timer": "hour12Timer"; "startView": "startView"; "stepHour": "stepHour"; "stepMinute": "stepMinute"; "stepSecond": "stepSecond"; "firstDayOfWeek": "firstDayOfWeek"; "hideOtherMonths": "hideOtherMonths"; }, {}, never, never, false, never>;
76
- }
1
+ import { EventEmitter } from '@angular/core';
2
+ import { DateTimeAdapter } from './date-time-adapter.class';
3
+ import { DateTimeFormats } from './date-time-format.class';
4
+ import * as i0 from "@angular/core";
5
+ export type PickerType = 'both' | 'calendar' | 'timer';
6
+ export type PickerMode = 'popup' | 'dialog' | 'inline';
7
+ export type SelectMode = 'single' | 'range' | 'rangeFrom' | 'rangeTo';
8
+ export type RenderItem = 'year' | 'month' | 'date';
9
+ export type ViewType = 'month' | 'year' | 'multi-years';
10
+ export type DateFilter<T> = (date?: T, forRender?: RenderItem) => boolean;
11
+ export declare abstract class DateTimeDirective<T> {
12
+ protected readonly dateTimeAdapter: DateTimeAdapter<T>;
13
+ protected readonly dateTimeFormats: DateTimeFormats;
14
+ /**
15
+ * When true, shows a timer to configure the seconds value
16
+ */
17
+ showSecondsTimer: boolean;
18
+ /**
19
+ * When true, the timer will be in 12-hour format mode
20
+ */
21
+ hour12Timer: boolean;
22
+ /**
23
+ * The view that the calendar should start on
24
+ */
25
+ startView: ViewType;
26
+ /**
27
+ * Hours to change per step
28
+ */
29
+ stepHour: number;
30
+ /**
31
+ * Minutes to change per step
32
+ */
33
+ stepMinute: number;
34
+ /**
35
+ * Seconds to change per step
36
+ */
37
+ stepSecond: number;
38
+ /**
39
+ * Set the first day of week
40
+ *
41
+ * Valid values are from 0 [Sunday] to 6 [Saturday]
42
+ */
43
+ firstDayOfWeek: number;
44
+ /**
45
+ * If true, don't show dates from preious / next month on the calendar month view
46
+ */
47
+ hideOtherMonths: boolean;
48
+ readonly id: string;
49
+ abstract get selected(): T | undefined;
50
+ abstract get selecteds(): Array<T | undefined>;
51
+ abstract get dateTimeFilter(): DateFilter<T> | undefined;
52
+ abstract get max(): T | undefined;
53
+ abstract get min(): T | undefined;
54
+ abstract get selectMode(): SelectMode | undefined;
55
+ abstract get startAt(): T | undefined;
56
+ abstract get isOpen(): boolean;
57
+ abstract get pickerMode(): PickerMode;
58
+ abstract get pickerType(): PickerType;
59
+ abstract get isInSingleMode(): boolean;
60
+ abstract get isInRangeMode(): boolean;
61
+ abstract select(date: T | Array<T | undefined>): void;
62
+ abstract yearSelected: EventEmitter<T>;
63
+ abstract monthSelected: EventEmitter<T>;
64
+ abstract selectYear(normalizedYear: T): void;
65
+ abstract selectMonth(normalizedMonth: T): void;
66
+ get formatString(): string;
67
+ /**
68
+ * Date Time Checker to check if the give dateTime is selectable
69
+ */
70
+ dateTimeChecker: (dateTime: T | undefined) => boolean;
71
+ get disabled(): boolean;
72
+ constructor(dateTimeAdapter: DateTimeAdapter<T>, dateTimeFormats: DateTimeFormats);
73
+ protected getValidDate(obj: any): T | undefined;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDirective<any>, never>;
75
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeDirective<any>, never, never, { "showSecondsTimer": { "alias": "showSecondsTimer"; "required": false; }; "hour12Timer": { "alias": "hour12Timer"; "required": false; }; "startView": { "alias": "startView"; "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, false, never>;
76
+ }