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
@@ -1,72 +1,72 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { DateTimeAdapter } from 'nxt-pick-datetime';
3
- import * as i0 from "@angular/core";
4
- export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
5
- /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors */
6
- private readonly _clampDate;
7
- /**
8
- * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
9
- * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
10
- * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
11
- * will produce `'8/13/1800'`.
12
- */
13
- useUtcForDisplay: boolean;
14
- constructor(platform: Platform, dateTimeLocale?: string);
15
- getYear(date: Date): number;
16
- getMonth(date: Date): number;
17
- getDay(date: Date): number;
18
- getDate(date: Date): number;
19
- getHours(date: Date): number;
20
- getMinutes(date: Date): number;
21
- getSeconds(date: Date): number;
22
- getTime(date: Date): number;
23
- getNumDaysInMonth(date: Date): number;
24
- differenceInCalendarDays(dateLeft: Date, dateRight: Date): number | undefined;
25
- getYearName(date: Date): string;
26
- getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
27
- getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
28
- getDateNames(): string[];
29
- toIso8601(date: Date): string;
30
- isEqual(dateLeft: Date, dateRight: Date): boolean;
31
- isSameDay(dateLeft: Date, dateRight: Date): boolean;
32
- isValid(date: Date): boolean;
33
- invalid(): Date;
34
- isDateInstance(obj: any): boolean;
35
- addCalendarYears(date: Date, amount: number): Date;
36
- addCalendarMonths(date: Date, amount: number): Date;
37
- addCalendarDays(date: Date, amount: number): Date;
38
- setHours(date: Date, amount: number): Date;
39
- setMinutes(date: Date, amount: number): Date;
40
- setSeconds(date: Date, amount: number): Date;
41
- createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
42
- clone(date: Date): Date;
43
- now(): Date;
44
- format(date: Date, displayFormat: any): string;
45
- parse(value: any, _parseFormat: any): Date | undefined;
46
- /**
47
- * Returns the given value if given a valid Date or undefined. Deserializes valid ISO 8601 strings
48
- * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into undefined. Returns an
49
- * invalid date for all other values.
50
- */
51
- deserialize(value: any): Date | undefined;
52
- /**
53
- * Creates a date but allows the month and date to overflow.
54
- */
55
- private createDateWithOverflow;
56
- /**
57
- * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
58
- * other browsers do not. We remove them to make output consistent and because they interfere with
59
- * date parsing.
60
- */
61
- private stripDirectionalityCharacters;
62
- /**
63
- * When converting Date object to string, javascript built-in functions may return wrong
64
- * results because it applies its internal DST rules. The DST rules around the world change
65
- * very frequently, and the current valid rule is not always valid in previous years though.
66
- * We work around this problem building a new Date object which has its internal UTC
67
- * representation with the local date and time.
68
- */
69
- private _format;
70
- static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, [null, { optional: true; }]>;
71
- static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
72
- }
1
+ import { Platform } from '@angular/cdk/platform';
2
+ import { DateTimeAdapter } from 'nxt-pick-datetime';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
5
+ /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors */
6
+ private readonly _clampDate;
7
+ /**
8
+ * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
9
+ * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
10
+ * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
11
+ * will produce `'8/13/1800'`.
12
+ */
13
+ useUtcForDisplay: boolean;
14
+ constructor(platform: Platform, dateTimeLocale?: string);
15
+ getYear(date: Date): number;
16
+ getMonth(date: Date): number;
17
+ getDay(date: Date): number;
18
+ getDate(date: Date): number;
19
+ getHours(date: Date): number;
20
+ getMinutes(date: Date): number;
21
+ getSeconds(date: Date): number;
22
+ getTime(date: Date): number;
23
+ getNumDaysInMonth(date: Date): number;
24
+ differenceInCalendarDays(dateLeft: Date, dateRight: Date): number | undefined;
25
+ getYearName(date: Date): string;
26
+ getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
27
+ getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
28
+ getDateNames(): string[];
29
+ toIso8601(date: Date): string;
30
+ isEqual(dateLeft: Date, dateRight: Date): boolean;
31
+ isSameDay(dateLeft: Date, dateRight: Date): boolean;
32
+ isValid(date: Date): boolean;
33
+ invalid(): Date;
34
+ isDateInstance(obj: any): boolean;
35
+ addCalendarYears(date: Date, amount: number): Date;
36
+ addCalendarMonths(date: Date, amount: number): Date;
37
+ addCalendarDays(date: Date, amount: number): Date;
38
+ setHours(date: Date, amount: number): Date;
39
+ setMinutes(date: Date, amount: number): Date;
40
+ setSeconds(date: Date, amount: number): Date;
41
+ createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
42
+ clone(date: Date): Date;
43
+ now(): Date;
44
+ format(date: Date, displayFormat: any): string;
45
+ parse(value: any, _parseFormat: any): Date | undefined;
46
+ /**
47
+ * Returns the given value if given a valid Date or undefined. Deserializes valid ISO 8601 strings
48
+ * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into undefined. Returns an
49
+ * invalid date for all other values.
50
+ */
51
+ deserialize(value: any): Date | undefined;
52
+ /**
53
+ * Creates a date but allows the month and date to overflow.
54
+ */
55
+ private createDateWithOverflow;
56
+ /**
57
+ * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
58
+ * other browsers do not. We remove them to make output consistent and because they interfere with
59
+ * date parsing.
60
+ */
61
+ private stripDirectionalityCharacters;
62
+ /**
63
+ * When converting Date object to string, javascript built-in functions may return wrong
64
+ * results because it applies its internal DST rules. The DST rules around the world change
65
+ * very frequently, and the current valid rule is not always valid in previous years though.
66
+ * We work around this problem building a new Date object which has its internal UTC
67
+ * representation with the local date and time.
68
+ */
69
+ private _format;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, [null, { optional: true; }]>;
71
+ static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
72
+ }
@@ -1,5 +1,5 @@
1
- import { DateTimeFormats } from 'nxt-pick-datetime';
2
- /**
3
- * @internal
4
- */
5
- export declare const NXT_NATIVE_DATE_TIME_FORMATS: DateTimeFormats;
1
+ import { DateTimeFormats } from 'nxt-pick-datetime';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const NXT_NATIVE_DATE_TIME_FORMATS: DateTimeFormats;
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime/native-adapter" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="nxt-pick-datetime/native-adapter" />
5
+ export * from './public-api';
@@ -1,7 +1,7 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@angular/cdk/platform";
3
- export declare class NativeDateTimeModule {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
6
- static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
7
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/cdk/platform";
3
+ export declare class NativeDateTimeModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
7
+ }
@@ -1 +1 @@
1
- export { NativeDateTimeModule } from './native-adapter.module';
1
+ export { NativeDateTimeModule } from './native-adapter.module';
package/package.json CHANGED
@@ -2,19 +2,19 @@
2
2
  "name": "nxt-pick-datetime",
3
3
  "description": "Date time picker for Angular",
4
4
  "bugs": "https://github.com/Liquid-JS/nxt-components/issues",
5
- "version": "16.0.0-alpha.6",
5
+ "version": "16.0.0",
6
6
  "license": "MIT",
7
7
  "repository": "https://github.com/Liquid-JS/nxt-components.git",
8
8
  "homepage": "https://github.com/Liquid-JS/nxt-components/tree/master/packages/pick-datetime",
9
9
  "peerDependencies": {
10
- "@angular/animations": "^15.2.4",
11
- "@angular/cdk": "^15.2.4",
12
- "@angular/common": "^15.2.4",
13
- "@angular/core": "^15.2.4",
14
- "@angular/forms": "^15.2.4",
15
- "@angular/localize": "^15.2.4",
10
+ "@angular/animations": "^16.0.0",
11
+ "@angular/cdk": "^16.0.0",
12
+ "@angular/common": "^16.0.0",
13
+ "@angular/core": "^16.0.0",
14
+ "@angular/forms": "^16.0.0",
15
+ "@angular/localize": "^16.0.0",
16
16
  "moment": "^2.29.4",
17
- "rxjs": "^7.8.0"
17
+ "rxjs": "^7.8.1"
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.5.0"
@@ -28,34 +28,24 @@
28
28
  },
29
29
  ".": {
30
30
  "types": "./index.d.ts",
31
- "esm2020": "./esm2020/nxt-pick-datetime.mjs",
32
- "es2020": "./fesm2020/nxt-pick-datetime.mjs",
33
- "es2015": "./fesm2015/nxt-pick-datetime.mjs",
34
- "node": "./fesm2015/nxt-pick-datetime.mjs",
35
- "default": "./fesm2020/nxt-pick-datetime.mjs"
31
+ "esm2022": "./esm2022/nxt-pick-datetime.mjs",
32
+ "esm": "./esm2022/nxt-pick-datetime.mjs",
33
+ "default": "./fesm2022/nxt-pick-datetime.mjs"
36
34
  },
37
35
  "./moment-adapter": {
38
36
  "types": "./moment-adapter/index.d.ts",
39
- "esm2020": "./esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs",
40
- "es2020": "./fesm2020/nxt-pick-datetime-moment-adapter.mjs",
41
- "es2015": "./fesm2015/nxt-pick-datetime-moment-adapter.mjs",
42
- "node": "./fesm2015/nxt-pick-datetime-moment-adapter.mjs",
43
- "default": "./fesm2020/nxt-pick-datetime-moment-adapter.mjs"
37
+ "esm2022": "./esm2022/moment-adapter/nxt-pick-datetime-moment-adapter.mjs",
38
+ "esm": "./esm2022/moment-adapter/nxt-pick-datetime-moment-adapter.mjs",
39
+ "default": "./fesm2022/nxt-pick-datetime-moment-adapter.mjs"
44
40
  },
45
41
  "./native-adapter": {
46
42
  "types": "./native-adapter/index.d.ts",
47
- "esm2020": "./esm2020/native-adapter/nxt-pick-datetime-native-adapter.mjs",
48
- "es2020": "./fesm2020/nxt-pick-datetime-native-adapter.mjs",
49
- "es2015": "./fesm2015/nxt-pick-datetime-native-adapter.mjs",
50
- "node": "./fesm2015/nxt-pick-datetime-native-adapter.mjs",
51
- "default": "./fesm2020/nxt-pick-datetime-native-adapter.mjs"
43
+ "esm2022": "./esm2022/native-adapter/nxt-pick-datetime-native-adapter.mjs",
44
+ "esm": "./esm2022/native-adapter/nxt-pick-datetime-native-adapter.mjs",
45
+ "default": "./fesm2022/nxt-pick-datetime-native-adapter.mjs"
52
46
  }
53
47
  },
54
- "module": "fesm2015/nxt-pick-datetime.mjs",
55
- "es2020": "fesm2020/nxt-pick-datetime.mjs",
56
- "esm2020": "esm2020/nxt-pick-datetime.mjs",
57
- "fesm2020": "fesm2020/nxt-pick-datetime.mjs",
58
- "fesm2015": "fesm2015/nxt-pick-datetime.mjs",
48
+ "module": "fesm2022/nxt-pick-datetime.mjs",
59
49
  "typings": "index.d.ts",
60
50
  "sideEffects": false
61
51
  }
package/public-api.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export { DateTimeAdapter } from './lib/class/date-time-adapter.class';
2
- export { DateTimeFormats, NXT_DATE_TIME_FORMATS } from './lib/class/date-time-format.class';
3
- export { DateFilter, PickerMode, PickerType, RenderItem, SelectMode, ViewType } from './lib/class/date-time.class';
4
- export { MonthViewComponent } from './lib/date-time/calendar-month-view/calendar-month-view.component';
5
- export { MultiYearViewComponent } from './lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component';
6
- export { YearViewComponent } from './lib/date-time/calendar-year-view/calendar-year-view.component';
7
- export { CalendarComponent } from './lib/date-time/calendar/calendar.component';
8
- export { DateTimeInlineComponent } from './lib/date-time/date-time-inline/date-time-inline.component';
9
- export { DateTimeInputDirective, DateTimeInputEvent } from './lib/date-time/date-time-picker-input.directive';
10
- export { DateTimeIntl } from './lib/date-time/date-time-picker-intl.service';
11
- export { DateTimeTriggerDirective } from './lib/date-time/date-time-picker-trigger.directive';
12
- export { DateTimeComponent } from './lib/date-time/date-time-picker/date-time-picker.component';
13
- export { DateTimeModule } from './lib/date-time/date-time.module';
14
- export { TimerComponent } from './lib/date-time/timer/timer.component';
1
+ export { DateTimeAdapter } from './lib/class/date-time-adapter.class';
2
+ export { DateTimeFormats, NXT_DATE_TIME_FORMATS } from './lib/class/date-time-format.class';
3
+ export { DateFilter, PickerMode, PickerType, RenderItem, SelectMode, ViewType } from './lib/class/date-time.class';
4
+ export { MonthViewComponent } from './lib/date-time/calendar-month-view/calendar-month-view.component';
5
+ export { MultiYearViewComponent } from './lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component';
6
+ export { YearViewComponent } from './lib/date-time/calendar-year-view/calendar-year-view.component';
7
+ export { CalendarComponent } from './lib/date-time/calendar/calendar.component';
8
+ export { DateTimeInlineComponent } from './lib/date-time/date-time-inline/date-time-inline.component';
9
+ export { DateTimeInputDirective, DateTimeInputEvent } from './lib/date-time/date-time-picker-input.directive';
10
+ export { DateTimeIntl } from './lib/date-time/date-time-picker-intl.service';
11
+ export { DateTimeTriggerDirective } from './lib/date-time/date-time-picker-trigger.directive';
12
+ export { DateTimeComponent } from './lib/date-time/date-time-picker/date-time-picker.component';
13
+ export { DateTimeModule } from './lib/date-time/date-time.module';
14
+ export { TimerComponent } from './lib/date-time/timer/timer.component';
@@ -1,95 +0,0 @@
1
- import { Directive, Inject, Input } from '@angular/core';
2
- import { NXT_DATE_TIME_FORMATS } from './date-time-format.class';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./date-time-adapter.class";
5
- /** @internal */
6
- let nextUniqueId = 0;
7
- export class DateTimeDirective {
8
- get formatString() {
9
- return this.pickerType === 'both'
10
- ? this.dateTimeFormats.fullPickerInput
11
- : this.pickerType === 'calendar'
12
- ? this.dateTimeFormats.datePickerInput
13
- : this.dateTimeFormats.timePickerInput;
14
- }
15
- get disabled() {
16
- return false;
17
- }
18
- constructor(dateTimeAdapter, dateTimeFormats) {
19
- this.dateTimeAdapter = dateTimeAdapter;
20
- this.dateTimeFormats = dateTimeFormats;
21
- /**
22
- * When true, shows a timer to configure the seconds value
23
- */
24
- this.showSecondsTimer = false;
25
- /**
26
- * When true, the timer will be in 12-hour format mode
27
- */
28
- this.hour12Timer = false;
29
- /**
30
- * The view that the calendar should start on
31
- */
32
- this.startView = 'month';
33
- /**
34
- * Hours to change per step
35
- */
36
- this.stepHour = 1;
37
- /**
38
- * Minutes to change per step
39
- */
40
- this.stepMinute = 1;
41
- /**
42
- * Seconds to change per step
43
- */
44
- this.stepSecond = 1;
45
- /**
46
- * Set the first day of week
47
- *
48
- * Valid values are from 0 [Sunday] to 6 [Saturday]
49
- */
50
- this.firstDayOfWeek = 0;
51
- /**
52
- * If true, don't show dates from preious / next month on the calendar month view
53
- */
54
- this.hideOtherMonths = false;
55
- this.id = `nxt-dt-picker-${nextUniqueId++}`;
56
- /**
57
- * Date Time Checker to check if the give dateTime is selectable
58
- */
59
- this.dateTimeChecker = (dateTime) => (!!dateTime &&
60
- (!this.dateTimeFilter || this.dateTimeFilter(dateTime)) &&
61
- (!this.min || this.dateTimeAdapter.compare(dateTime, this.min) >= 0) &&
62
- (!this.max || this.dateTimeAdapter.compare(dateTime, this.max) <= 0));
63
- }
64
- getValidDate(obj) {
65
- return this.dateTimeAdapter.isDateInstance(obj) &&
66
- this.dateTimeAdapter.isValid(obj)
67
- ? obj
68
- : undefined;
69
- }
70
- }
71
- DateTimeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DateTimeDirective, deps: [{ token: i1.DateTimeAdapter }, { token: NXT_DATE_TIME_FORMATS }], target: i0.ɵɵFactoryTarget.Directive });
72
- DateTimeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: DateTimeDirective, inputs: { showSecondsTimer: "showSecondsTimer", hour12Timer: "hour12Timer", startView: "startView", stepHour: "stepHour", stepMinute: "stepMinute", stepSecond: "stepSecond", firstDayOfWeek: "firstDayOfWeek", hideOtherMonths: "hideOtherMonths" }, ngImport: i0 });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DateTimeDirective, decorators: [{
74
- type: Directive
75
- }], ctorParameters: function () { return [{ type: i1.DateTimeAdapter }, { type: undefined, decorators: [{
76
- type: Inject,
77
- args: [NXT_DATE_TIME_FORMATS]
78
- }] }]; }, propDecorators: { showSecondsTimer: [{
79
- type: Input
80
- }], hour12Timer: [{
81
- type: Input
82
- }], startView: [{
83
- type: Input
84
- }], stepHour: [{
85
- type: Input
86
- }], stepMinute: [{
87
- type: Input
88
- }], stepSecond: [{
89
- type: Input
90
- }], firstDayOfWeek: [{
91
- type: Input
92
- }], hideOtherMonths: [{
93
- type: Input
94
- }] } });
95
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGljay1kYXRldGltZS9zcmMvbGliL2NsYXNzL2RhdGUtdGltZS5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFn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