nxt-pick-datetime 10.0.0 → 13.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 (124) hide show
  1. package/{esm2015/lib/class/date-time-adapter.class.js → esm2020/lib/class/date-time-adapter.class.mjs} +0 -0
  2. package/{esm2015/lib/class/date-time-format.class.js → esm2020/lib/class/date-time-format.class.mjs} +1 -1
  3. package/esm2020/lib/class/date-time.class.mjs +161 -0
  4. package/{esm2015/lib/class/dialog-config.class.js → esm2020/lib/class/dialog-config.class.mjs} +0 -0
  5. package/esm2020/lib/class/dialog-ref.class.mjs +121 -0
  6. package/esm2020/lib/date-time/calendar/calendar.component.mjs +345 -0
  7. package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +145 -0
  8. package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +438 -0
  9. package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +359 -0
  10. package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +369 -0
  11. package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +264 -0
  12. package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +529 -0
  13. package/{esm2015/lib/date-time/date-time-picker-container/date-time-picker-container.animations.js → esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs} +1 -1
  14. package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +390 -0
  15. package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +624 -0
  16. package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +61 -0
  17. package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +68 -0
  18. package/esm2020/lib/date-time/date-time.module.mjs +88 -0
  19. package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +25 -0
  20. package/esm2020/lib/date-time/timer/timer.component.mjs +292 -0
  21. package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +88 -0
  22. package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +243 -0
  23. package/esm2020/lib/dialog/dialog.module.mjs +34 -0
  24. package/esm2020/lib/dialog/dialog.service.mjs +240 -0
  25. package/{esm2015/lib/utils/object.js → esm2020/lib/utils/object.mjs} +0 -0
  26. package/esm2020/moment-adapter/date-time-adapter.class.mjs +215 -0
  27. package/{esm2015/moment-adapter/date-time-format.class.js → esm2020/moment-adapter/date-time-format.class.mjs} +0 -0
  28. package/esm2020/moment-adapter/moment-adapter.module.mjs +41 -0
  29. package/esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +5 -0
  30. package/{esm2015/moment-adapter/public-api.js → esm2020/moment-adapter/public-api.mjs} +0 -0
  31. package/esm2020/native-adapter/date-time-adapter.class.mjs +344 -0
  32. package/{esm2015/native-adapter/date-time-format.class.js → esm2020/native-adapter/date-time-format.class.mjs} +0 -0
  33. package/esm2020/native-adapter/native-adapter.module.mjs +35 -0
  34. package/esm2020/native-adapter/nxt-pick-datetime-native-adapter.mjs +5 -0
  35. package/{esm2015/native-adapter/public-api.js → esm2020/native-adapter/public-api.mjs} +0 -0
  36. package/esm2020/nxt-pick-datetime.mjs +5 -0
  37. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  38. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +269 -0
  39. package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +1 -0
  40. package/fesm2015/{nxt-pick-datetime-native-adapter.js → nxt-pick-datetime-native-adapter.mjs} +41 -27
  41. package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +1 -0
  42. package/fesm2015/nxt-pick-datetime.mjs +4974 -0
  43. package/fesm2015/nxt-pick-datetime.mjs.map +1 -0
  44. package/{fesm2015/nxt-pick-datetime-moment-adapter.js → fesm2020/nxt-pick-datetime-moment-adapter.mjs} +48 -27
  45. package/fesm2020/nxt-pick-datetime-moment-adapter.mjs.map +1 -0
  46. package/fesm2020/nxt-pick-datetime-native-adapter.mjs +390 -0
  47. package/fesm2020/nxt-pick-datetime-native-adapter.mjs.map +1 -0
  48. package/{fesm2015/nxt-pick-datetime.js → fesm2020/nxt-pick-datetime.mjs} +2207 -1967
  49. package/fesm2020/nxt-pick-datetime.mjs.map +1 -0
  50. package/lib/class/date-time.class.d.ts +3 -0
  51. package/lib/class/dialog-ref.class.d.ts +2 -0
  52. package/lib/date-time/calendar/calendar.component.d.ts +3 -0
  53. package/lib/date-time/calendar-body/calendar-body.component.d.ts +3 -0
  54. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +3 -0
  55. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +3 -0
  56. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +3 -0
  57. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +3 -0
  58. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +3 -0
  59. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +3 -0
  60. package/lib/date-time/date-time-picker-input.directive.d.ts +3 -0
  61. package/lib/date-time/date-time-picker-intl.service.d.ts +3 -0
  62. package/lib/date-time/date-time-picker-trigger.directive.d.ts +3 -0
  63. package/lib/date-time/date-time.module.d.ts +21 -0
  64. package/lib/date-time/number-fixed-len.pipe.d.ts +3 -0
  65. package/lib/date-time/timer/timer.component.d.ts +3 -0
  66. package/lib/date-time/timer-box/timer-box.component.d.ts +3 -0
  67. package/lib/dialog/dialog-container/dialog-container.component.d.ts +5 -2
  68. package/lib/dialog/dialog.module.d.ts +9 -0
  69. package/lib/dialog/dialog.service.d.ts +6 -2
  70. package/moment-adapter/date-time-adapter.class.d.ts +3 -0
  71. package/moment-adapter/moment-adapter.module.d.ts +7 -0
  72. package/moment-adapter/nxt-pick-datetime-moment-adapter.d.ts +1 -3
  73. package/moment-adapter/package.json +6 -7
  74. package/native-adapter/date-time-adapter.class.d.ts +3 -0
  75. package/native-adapter/native-adapter.module.d.ts +8 -0
  76. package/native-adapter/nxt-pick-datetime-native-adapter.d.ts +1 -3
  77. package/native-adapter/package.json +6 -7
  78. package/nxt-pick-datetime.d.ts +1 -14
  79. package/package.json +48 -13
  80. package/bundles/nxt-pick-datetime-moment-adapter.umd.js +0 -577
  81. package/bundles/nxt-pick-datetime-moment-adapter.umd.js.map +0 -1
  82. package/bundles/nxt-pick-datetime-moment-adapter.umd.min.js +0 -17
  83. package/bundles/nxt-pick-datetime-moment-adapter.umd.min.js.map +0 -1
  84. package/bundles/nxt-pick-datetime-native-adapter.umd.js +0 -706
  85. package/bundles/nxt-pick-datetime-native-adapter.umd.js.map +0 -1
  86. package/bundles/nxt-pick-datetime-native-adapter.umd.min.js +0 -16
  87. package/bundles/nxt-pick-datetime-native-adapter.umd.min.js.map +0 -1
  88. package/bundles/nxt-pick-datetime.umd.js +0 -5809
  89. package/bundles/nxt-pick-datetime.umd.js.map +0 -1
  90. package/bundles/nxt-pick-datetime.umd.min.js +0 -17
  91. package/bundles/nxt-pick-datetime.umd.min.js.map +0 -1
  92. package/esm2015/lib/class/date-time.class.js +0 -151
  93. package/esm2015/lib/class/dialog-ref.class.js +0 -113
  94. package/esm2015/lib/date-time/calendar/calendar.component.js +0 -331
  95. package/esm2015/lib/date-time/calendar-body/calendar-body.component.js +0 -144
  96. package/esm2015/lib/date-time/calendar-month-view/calendar-month-view.component.js +0 -425
  97. package/esm2015/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.js +0 -347
  98. package/esm2015/lib/date-time/calendar-year-view/calendar-year-view.component.js +0 -356
  99. package/esm2015/lib/date-time/date-time-inline/date-time-inline.component.js +0 -246
  100. package/esm2015/lib/date-time/date-time-picker/date-time-picker.component.js +0 -511
  101. package/esm2015/lib/date-time/date-time-picker-container/date-time-picker-container.component.js +0 -373
  102. package/esm2015/lib/date-time/date-time-picker-input.directive.js +0 -592
  103. package/esm2015/lib/date-time/date-time-picker-intl.service.js +0 -59
  104. package/esm2015/lib/date-time/date-time-picker-trigger.directive.js +0 -63
  105. package/esm2015/lib/date-time/date-time.module.js +0 -60
  106. package/esm2015/lib/date-time/number-fixed-len.pipe.js +0 -21
  107. package/esm2015/lib/date-time/timer/timer.component.js +0 -287
  108. package/esm2015/lib/date-time/timer-box/timer-box.component.js +0 -77
  109. package/esm2015/lib/dialog/dialog-container/dialog-container.component.js +0 -202
  110. package/esm2015/lib/dialog/dialog.module.js +0 -26
  111. package/esm2015/lib/dialog/dialog.service.js +0 -225
  112. package/esm2015/moment-adapter/date-time-adapter.class.js +0 -206
  113. package/esm2015/moment-adapter/moment-adapter.module.js +0 -28
  114. package/esm2015/moment-adapter/nxt-pick-datetime-moment-adapter.js +0 -8
  115. package/esm2015/native-adapter/date-time-adapter.class.js +0 -342
  116. package/esm2015/native-adapter/native-adapter.module.js +0 -26
  117. package/esm2015/native-adapter/nxt-pick-datetime-native-adapter.js +0 -8
  118. package/esm2015/nxt-pick-datetime.js +0 -19
  119. package/fesm2015/nxt-pick-datetime-moment-adapter.js.map +0 -1
  120. package/fesm2015/nxt-pick-datetime-native-adapter.js.map +0 -1
  121. package/fesm2015/nxt-pick-datetime.js.map +0 -1
  122. package/moment-adapter/nxt-pick-datetime-moment-adapter.metadata.json +0 -1
  123. package/native-adapter/nxt-pick-datetime-native-adapter.metadata.json +0 -1
  124. package/nxt-pick-datetime.metadata.json +0 -1
@@ -1,3 +1,4 @@
1
+ import * as i0 from '@angular/core';
1
2
  import { InjectionToken, Injectable, Optional, Inject, NgModule } from '@angular/core';
2
3
  import { DateTimeAdapter, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_FORMATS } from 'nxt-pick-datetime';
3
4
  import moment from 'moment';
@@ -197,13 +198,21 @@ class MomentDateTimeAdapter extends DateTimeAdapter {
197
198
  return (this.options && this.options.useUtc) ? moment.utc(...args) : moment(...args);
198
199
  }
199
200
  }
200
- MomentDateTimeAdapter.decorators = [
201
- { type: Injectable }
202
- ];
203
- MomentDateTimeAdapter.ctorParameters = () => [
204
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [OWL_DATE_TIME_LOCALE,] }] },
205
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS,] }] }
206
- ];
201
+ MomentDateTimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeAdapter, deps: [{ token: OWL_DATE_TIME_LOCALE, optional: true }, { token: OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
202
+ MomentDateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeAdapter });
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeAdapter, decorators: [{
204
+ type: Injectable
205
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
206
+ type: Optional
207
+ }, {
208
+ type: Inject,
209
+ args: [OWL_DATE_TIME_LOCALE]
210
+ }] }, { type: undefined, decorators: [{
211
+ type: Optional
212
+ }, {
213
+ type: Inject,
214
+ args: [OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS]
215
+ }] }]; } });
207
216
 
208
217
  const OWL_MOMENT_DATE_TIME_FORMATS = {
209
218
  parseInput: 'l LT',
@@ -217,30 +226,42 @@ const OWL_MOMENT_DATE_TIME_FORMATS = {
217
226
 
218
227
  class MomentDateTimeModule {
219
228
  }
220
- MomentDateTimeModule.decorators = [
221
- { type: NgModule, args: [{
222
- providers: [
223
- {
224
- provide: DateTimeAdapter,
225
- useClass: MomentDateTimeAdapter,
226
- deps: [OWL_DATE_TIME_LOCALE, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS]
227
- }
228
- ]
229
- },] }
230
- ];
231
- const ɵ0 = OWL_MOMENT_DATE_TIME_FORMATS;
229
+ MomentDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
230
+ MomentDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeModule });
231
+ MomentDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeModule, providers: [
232
+ {
233
+ provide: DateTimeAdapter,
234
+ useClass: MomentDateTimeAdapter,
235
+ deps: [OWL_DATE_TIME_LOCALE, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS]
236
+ }
237
+ ] });
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: MomentDateTimeModule, decorators: [{
239
+ type: NgModule,
240
+ args: [{
241
+ providers: [
242
+ {
243
+ provide: DateTimeAdapter,
244
+ useClass: MomentDateTimeAdapter,
245
+ deps: [OWL_DATE_TIME_LOCALE, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS]
246
+ }
247
+ ]
248
+ }]
249
+ }] });
232
250
  class OwlMomentDateTimeModule {
233
251
  }
234
- OwlMomentDateTimeModule.decorators = [
235
- { type: NgModule, args: [{
236
- imports: [MomentDateTimeModule],
237
- providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: ɵ0 }]
238
- },] }
239
- ];
252
+ OwlMomentDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlMomentDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
253
+ OwlMomentDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlMomentDateTimeModule, imports: [MomentDateTimeModule] });
254
+ OwlMomentDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlMomentDateTimeModule, providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_MOMENT_DATE_TIME_FORMATS }], imports: [[MomentDateTimeModule]] });
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlMomentDateTimeModule, decorators: [{
256
+ type: NgModule,
257
+ args: [{
258
+ imports: [MomentDateTimeModule],
259
+ providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_MOMENT_DATE_TIME_FORMATS }]
260
+ }]
261
+ }] });
240
262
 
241
263
  /**
242
264
  * Generated bundle index. Do not edit.
243
265
  */
244
266
 
245
- export { OwlMomentDateTimeModule, MomentDateTimeModule as ɵa, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS as ɵb, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS_FACTORY as ɵc, MomentDateTimeAdapter as ɵd, OWL_MOMENT_DATE_TIME_FORMATS as ɵe };
246
- //# sourceMappingURL=nxt-pick-datetime-moment-adapter.js.map
267
+ export { OwlMomentDateTimeModule };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nxt-pick-datetime-moment-adapter.mjs","sources":["../../../projects/nxt-pick-datetime/moment-adapter/src/date-time-adapter.class.ts","../../../projects/nxt-pick-datetime/moment-adapter/src/date-time-format.class.ts","../../../projects/nxt-pick-datetime/moment-adapter/src/moment-adapter.module.ts","../../../projects/nxt-pick-datetime/moment-adapter/src/nxt-pick-datetime-moment-adapter.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'\nimport moment, { Moment } from 'moment'\nimport { DateTimeAdapter, OWL_DATE_TIME_LOCALE } from 'nxt-pick-datetime'\n\n/** Configurable options for {@see MomentDateAdapter}. */\nexport interface OwlMomentDateTimeAdapterOptions {\n /**\n * Turns the use of utc dates on or off.\n * Changing this will change how the DateTimePicker output value.\n * {@default false}\n */\n useUtc: boolean\n}\n\n/** InjectionToken for moment date adapter to configure options. */\nexport const OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS = new InjectionToken<OwlMomentDateTimeAdapterOptions>(\n 'OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS', {\n providedIn: 'root',\n factory: OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS_FACTORY\n })\n\n/** @docs-private */\nexport function OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS_FACTORY(): OwlMomentDateTimeAdapterOptions {\n return {\n useUtc: false\n }\n}\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length)\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i)\n }\n return valuesArray\n}\n\n@Injectable()\nexport class MomentDateTimeAdapter extends DateTimeAdapter<Moment> {\n\n private _localeData: {\n longMonths: string[]\n shortMonths: string[]\n longDaysOfWeek: string[]\n shortDaysOfWeek: string[]\n narrowDaysOfWeek: string[]\n dates: string[]\n }\n\n constructor(\n @Optional() @Inject(OWL_DATE_TIME_LOCALE)\n owlDateTimeLocale?: string,\n @Optional() @Inject(OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS)\n private options?: OwlMomentDateTimeAdapterOptions\n ) {\n super()\n this.setLocale(owlDateTimeLocale || moment.locale())\n }\n\n public setLocale(locale: string) {\n super.setLocale(locale)\n\n const momentLocaleData = moment.localeData(locale)\n this._localeData = {\n longMonths: momentLocaleData.months(),\n shortMonths: momentLocaleData.monthsShort(),\n longDaysOfWeek: momentLocaleData.weekdays(),\n shortDaysOfWeek: momentLocaleData.weekdaysShort(),\n narrowDaysOfWeek: momentLocaleData.weekdaysMin(),\n dates: range(31, (i) => this.createDate(2017, 0, i + 1).format('D'))\n }\n }\n\n public getYear(date: Moment): number {\n return this.clone(date).year()\n }\n\n public getMonth(date: Moment): number {\n return this.clone(date).month()\n }\n\n public getDay(date: Moment): number {\n return this.clone(date).day()\n }\n\n public getDate(date: Moment): number {\n return this.clone(date).date()\n }\n\n public getHours(date: Moment): number {\n return this.clone(date).hours()\n }\n\n public getMinutes(date: Moment): number {\n return this.clone(date).minutes()\n }\n\n public getSeconds(date: Moment): number {\n return this.clone(date).seconds()\n }\n\n public getTime(date: Moment): number {\n return this.clone(date).valueOf()\n }\n\n public getNumDaysInMonth(date: Moment): number {\n return this.clone(date).daysInMonth()\n }\n\n public differenceInCalendarDays(dateLeft: Moment, dateRight: Moment): number {\n return this.clone(dateLeft).diff(dateRight, 'days')\n }\n\n public getYearName(date: Moment): string {\n return this.clone(date).format('YYYY')\n }\n\n public getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n return style === 'long' ? this._localeData.longMonths : this._localeData.shortMonths\n }\n\n public getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (style === 'long') {\n return this._localeData.longDaysOfWeek\n }\n if (style === 'short') {\n return this._localeData.shortDaysOfWeek\n }\n return this._localeData.narrowDaysOfWeek\n }\n\n public getDateNames(): string[] {\n return this._localeData.dates\n }\n\n public toIso8601(date: Moment): string {\n return this.clone(date).format()\n }\n\n public isEqual(dateLeft: Moment, dateRight: Moment): boolean {\n\n if (dateLeft && dateRight) {\n return this.clone(dateLeft).isSame(this.clone(dateRight))\n }\n\n return dateLeft === dateRight\n }\n\n public isSameDay(dateLeft: Moment, dateRight: Moment): boolean {\n\n if (dateLeft && dateRight) {\n return this.clone(dateLeft).isSame(this.clone(dateRight), 'day')\n }\n\n return dateLeft === dateRight\n }\n\n public isValid(date: Moment): boolean {\n return this.clone(date).isValid()\n }\n\n public invalid(): Moment {\n return moment.invalid()\n }\n\n public isDateInstance(obj: any): boolean {\n return moment.isMoment(obj)\n }\n\n public addCalendarYears(date: Moment, amount: number): Moment {\n return this.clone(date).add({ years: amount })\n }\n\n public addCalendarMonths(date: Moment, amount: number): Moment {\n return this.clone(date).add({ months: amount })\n }\n\n public addCalendarDays(date: Moment, amount: number): Moment {\n return this.clone(date).add({ days: amount })\n }\n\n public setHours(date: Moment, amount: number): Moment {\n return this.clone(date).hours(amount)\n }\n\n public setMinutes(date: Moment, amount: number): Moment {\n return this.clone(date).minutes(amount)\n }\n\n public setSeconds(date: Moment, amount: number): Moment {\n return this.clone(date).seconds(amount)\n }\n\n public createDate(year: number, month: number, date: number): Moment\n public createDate(year: number, month: number, date: number, hours: number = 0, minutes: number = 0, seconds: number = 0): Moment {\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`)\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`)\n }\n\n if (hours < 0 || hours > 23) {\n throw Error(`Invalid hours \"${hours}\". Hours has to be between 0 and 23.`)\n }\n\n if (minutes < 0 || minutes > 59) {\n throw Error(`Invalid minutes \"${minutes}\". Minutes has to between 0 and 59.`)\n }\n\n if (seconds < 0 || seconds > 59) {\n throw Error(`Invalid seconds \"${seconds}\". Seconds has to be between 0 and 59.`)\n }\n\n const result = this.createMoment({ year, month, date, hours, minutes, seconds }).locale(this.locale)\n\n // If the result isn't valid, the date must have been out of bounds for this month.\n if (!result.isValid()) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`)\n }\n\n return result\n }\n\n public clone(date: Moment): Moment {\n return this.createMoment(date).clone().locale(this.locale)\n }\n\n public now(): Moment {\n return this.createMoment().locale(this.locale)\n }\n\n public format(date: Moment, displayFormat: any): string {\n date = this.clone(date)\n if (!this.isValid(date)) {\n throw Error('MomentDateTimeAdapter: Cannot format invalid date.')\n }\n return date.format(displayFormat)\n }\n\n public parse(value: any, parseFormat: any): Moment | null {\n if (value && typeof value === 'string') {\n return this.createMoment(value, parseFormat, this.locale)\n }\n return value ? this.createMoment(value).locale(this.locale) : null\n }\n\n /**\n * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty\n * string into null. Returns an invalid date for all other values.\n */\n deserialize(value: any): Moment | null {\n let date\n if (value instanceof Date) {\n date = this.createMoment(value)\n }\n if (typeof value === 'string') {\n if (!value) {\n return null\n }\n date = this.createMoment(value, moment.ISO_8601).locale(this.locale)\n }\n if (date && this.isValid(date)) {\n return date\n }\n return super.deserialize(value)\n }\n\n /** Creates a Moment instance while respecting the current UTC settings. */\n private createMoment(...args: any[]): Moment {\n return (this.options && this.options.useUtc) ? moment.utc(...args) : moment(...args)\n }\n}\n","import { OwlDateTimeFormats } from 'nxt-pick-datetime'\n\nexport const OWL_MOMENT_DATE_TIME_FORMATS: OwlDateTimeFormats = {\n parseInput: 'l LT',\n fullPickerInput: 'l LT',\n datePickerInput: 'l',\n timePickerInput: 'LT',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY'\n}\n","import { NgModule } from '@angular/core'\nimport { DateTimeAdapter, OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE } from 'nxt-pick-datetime'\nimport { MomentDateTimeAdapter, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS } from './date-time-adapter.class'\nimport { OWL_MOMENT_DATE_TIME_FORMATS } from './date-time-format.class'\n\n@NgModule({\n providers: [\n {\n provide: DateTimeAdapter,\n useClass: MomentDateTimeAdapter,\n deps: [OWL_DATE_TIME_LOCALE, OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS]\n }\n ]\n})\nexport class MomentDateTimeModule { }\n\n@NgModule({\n imports: [MomentDateTimeModule],\n providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_MOMENT_DATE_TIME_FORMATS }]\n})\nexport class OwlMomentDateTimeModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAcA;AACO,MAAM,oCAAoC,GAAG,IAAI,cAAc,CAClE,sCAAsC,EAAE;IACpC,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,4CAA4C;CACxD,CAAC,CAAA;AAEN;SACgB,4CAA4C;IACxD,OAAO;QACH,MAAM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Ae,EAAE,IAAI;IACrB,cAAc,EAAE,UAAU;IAC1B,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,WAAW;CAClC;;MCIY,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB;kHAApB,oBAAoB,aARlB;QACP;YACI,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,CAAC,oBAAoB,EAAE,oCAAoC,CAAC;SACrE;KACJ;2FAEQ,oBAAoB;kBAThC,QAAQ;mBAAC;oBACN,SAAS,EAAE;wBACP;4BACI,OAAO,EAAE,eAAe;4BACxB,QAAQ,EAAE,qBAAqB;4BAC/B,IAAI,EAAE,CAAC,oBAAoB,EAAE,oCAAoC,CAAC;yBACrE;qBACJ;iBACJ;;MAOY,uBAAuB;;oHAAvB,uBAAuB;qHAAvB,uBAAuB,YANvB,oBAAoB;qHAMpB,uBAAuB,aAFrB,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,4BAA4B,EAAE,CAAC,YAD9E,CAAC,oBAAoB,CAAC;2FAGtB,uBAAuB;kBAJnC,QAAQ;mBAAC;oBACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,4BAA4B,EAAE,CAAC;iBAC1F;;;ACnBD;;;;;;"}
@@ -0,0 +1,390 @@
1
+ import * as i1 from '@angular/cdk/platform';
2
+ import { PlatformModule } from '@angular/cdk/platform';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, Optional, Inject, NgModule } from '@angular/core';
5
+ import { DateTimeAdapter, OWL_DATE_TIME_LOCALE, OWL_DATE_TIME_FORMATS } from 'nxt-pick-datetime';
6
+
7
+ /** The default month names to use if Intl API is not available. */
8
+ const DEFAULT_MONTH_NAMES = {
9
+ long: [
10
+ 'January',
11
+ 'February',
12
+ 'March',
13
+ 'April',
14
+ 'May',
15
+ 'June',
16
+ 'July',
17
+ 'August',
18
+ 'September',
19
+ 'October',
20
+ 'November',
21
+ 'December'
22
+ ],
23
+ short: [
24
+ 'Jan',
25
+ 'Feb',
26
+ 'Mar',
27
+ 'Apr',
28
+ 'May',
29
+ 'Jun',
30
+ 'Jul',
31
+ 'Aug',
32
+ 'Sep',
33
+ 'Oct',
34
+ 'Nov',
35
+ 'Dec'
36
+ ],
37
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']
38
+ };
39
+ /** The default day of the week names to use if Intl API is not available. */
40
+ const DEFAULT_DAY_OF_WEEK_NAMES = {
41
+ long: [
42
+ 'Sunday',
43
+ 'Monday',
44
+ 'Tuesday',
45
+ 'Wednesday',
46
+ 'Thursday',
47
+ 'Friday',
48
+ 'Saturday'
49
+ ],
50
+ short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
51
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
52
+ };
53
+ /** The default date names to use if Intl API is not available. */
54
+ const DEFAULT_DATE_NAMES = range(31, i => String(i + 1));
55
+ /** Whether the browser supports the Intl API. */
56
+ const SUPPORTS_INTL_API = typeof Intl !== 'undefined';
57
+ /**
58
+ * Matches strings that have the form of a valid RFC 3339 string
59
+ * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date
60
+ * because the regex will match strings an with out of bounds month, date, etc.
61
+ */
62
+ const ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
63
+ /** Creates an array and fills it with values. */
64
+ function range(length, valueFunction) {
65
+ const valuesArray = Array(length);
66
+ for (let i = 0; i < length; i++) {
67
+ valuesArray[i] = valueFunction(i);
68
+ }
69
+ return valuesArray;
70
+ }
71
+ class NativeDateTimeAdapter extends DateTimeAdapter {
72
+ constructor(platform, owlDateTimeLocale) {
73
+ super();
74
+ super.setLocale(owlDateTimeLocale);
75
+ // IE does its own time zone correction, so we disable this on IE.
76
+ this.useUtcForDisplay = !platform.TRIDENT;
77
+ this._clampDate = platform.TRIDENT || platform.EDGE;
78
+ }
79
+ getYear(date) {
80
+ return date.getFullYear();
81
+ }
82
+ getMonth(date) {
83
+ return date.getMonth();
84
+ }
85
+ getDay(date) {
86
+ return date.getDay();
87
+ }
88
+ getDate(date) {
89
+ return date.getDate();
90
+ }
91
+ getHours(date) {
92
+ return date.getHours();
93
+ }
94
+ getMinutes(date) {
95
+ return date.getMinutes();
96
+ }
97
+ getSeconds(date) {
98
+ return date.getSeconds();
99
+ }
100
+ getTime(date) {
101
+ return date.getTime();
102
+ }
103
+ getNumDaysInMonth(date) {
104
+ const lastDateOfMonth = this.createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0);
105
+ return this.getDate(lastDateOfMonth);
106
+ }
107
+ differenceInCalendarDays(dateLeft, dateRight) {
108
+ if (this.isValid(dateLeft) && this.isValid(dateRight)) {
109
+ const dateLeftStartOfDay = this.createDate(this.getYear(dateLeft), this.getMonth(dateLeft), this.getDate(dateLeft));
110
+ const dateRightStartOfDay = this.createDate(this.getYear(dateRight), this.getMonth(dateRight), this.getDate(dateRight));
111
+ const timeStampLeft = this.getTime(dateLeftStartOfDay) -
112
+ dateLeftStartOfDay.getTimezoneOffset() *
113
+ this.milliseondsInMinute;
114
+ const timeStampRight = this.getTime(dateRightStartOfDay) -
115
+ dateRightStartOfDay.getTimezoneOffset() *
116
+ this.milliseondsInMinute;
117
+ return Math.round((timeStampLeft - timeStampRight) / this.millisecondsInDay);
118
+ }
119
+ else {
120
+ return null;
121
+ }
122
+ }
123
+ getYearName(date) {
124
+ if (SUPPORTS_INTL_API) {
125
+ const dtf = new Intl.DateTimeFormat(this.locale, {
126
+ year: 'numeric',
127
+ timeZone: 'utc'
128
+ });
129
+ return this.stripDirectionalityCharacters(this._format(dtf, date));
130
+ }
131
+ return String(this.getYear(date));
132
+ }
133
+ getMonthNames(style) {
134
+ if (SUPPORTS_INTL_API) {
135
+ const dtf = new Intl.DateTimeFormat(this.locale, {
136
+ month: style,
137
+ timeZone: 'utc'
138
+ });
139
+ return range(12, i => this.stripDirectionalityCharacters(this._format(dtf, new Date(2017, i, 1))));
140
+ }
141
+ return DEFAULT_MONTH_NAMES[style];
142
+ }
143
+ getDayOfWeekNames(style) {
144
+ if (SUPPORTS_INTL_API) {
145
+ const dtf = new Intl.DateTimeFormat(this.locale, {
146
+ weekday: style,
147
+ timeZone: 'utc'
148
+ });
149
+ return range(7, i => this.stripDirectionalityCharacters(this._format(dtf, new Date(2017, 0, i + 1))));
150
+ }
151
+ return DEFAULT_DAY_OF_WEEK_NAMES[style];
152
+ }
153
+ getDateNames() {
154
+ if (SUPPORTS_INTL_API) {
155
+ const dtf = new Intl.DateTimeFormat(this.locale, {
156
+ day: 'numeric',
157
+ timeZone: 'utc'
158
+ });
159
+ return range(31, i => this.stripDirectionalityCharacters(this._format(dtf, new Date(2017, 0, i + 1))));
160
+ }
161
+ return DEFAULT_DATE_NAMES;
162
+ }
163
+ toIso8601(date) {
164
+ return date.toISOString();
165
+ }
166
+ isEqual(dateLeft, dateRight) {
167
+ if (this.isValid(dateLeft) && this.isValid(dateRight)) {
168
+ return dateLeft.getTime() === dateRight.getTime();
169
+ }
170
+ else {
171
+ return false;
172
+ }
173
+ }
174
+ isSameDay(dateLeft, dateRight) {
175
+ if (this.isValid(dateLeft) && this.isValid(dateRight)) {
176
+ const dateLeftStartOfDay = this.clone(dateLeft);
177
+ const dateRightStartOfDay = this.clone(dateRight);
178
+ dateLeftStartOfDay.setHours(0, 0, 0, 0);
179
+ dateRightStartOfDay.setHours(0, 0, 0, 0);
180
+ return (dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime());
181
+ }
182
+ else {
183
+ return false;
184
+ }
185
+ }
186
+ isValid(date) {
187
+ return date && !isNaN(date.getTime());
188
+ }
189
+ invalid() {
190
+ return new Date(NaN);
191
+ }
192
+ isDateInstance(obj) {
193
+ return obj instanceof Date;
194
+ }
195
+ addCalendarYears(date, amount) {
196
+ return this.addCalendarMonths(date, amount * 12);
197
+ }
198
+ addCalendarMonths(date, amount) {
199
+ const result = this.clone(date);
200
+ amount = Number(amount);
201
+ const desiredMonth = result.getMonth() + amount;
202
+ const dateWithDesiredMonth = new Date(0);
203
+ dateWithDesiredMonth.setFullYear(result.getFullYear(), desiredMonth, 1);
204
+ dateWithDesiredMonth.setHours(0, 0, 0, 0);
205
+ const daysInMonth = this.getNumDaysInMonth(dateWithDesiredMonth);
206
+ // Set the last day of the new month
207
+ // if the original date was the last day of the longer month
208
+ result.setMonth(desiredMonth, Math.min(daysInMonth, result.getDate()));
209
+ return result;
210
+ }
211
+ addCalendarDays(date, amount) {
212
+ const result = this.clone(date);
213
+ amount = Number(amount);
214
+ result.setDate(result.getDate() + amount);
215
+ return result;
216
+ }
217
+ setHours(date, amount) {
218
+ const result = this.clone(date);
219
+ result.setHours(amount);
220
+ return result;
221
+ }
222
+ setMinutes(date, amount) {
223
+ const result = this.clone(date);
224
+ result.setMinutes(amount);
225
+ return result;
226
+ }
227
+ setSeconds(date, amount) {
228
+ const result = this.clone(date);
229
+ result.setSeconds(amount);
230
+ return result;
231
+ }
232
+ createDate(year, month, date, hours = 0, minutes = 0, seconds = 0) {
233
+ if (month < 0 || month > 11) {
234
+ throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
235
+ }
236
+ if (date < 1) {
237
+ throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
238
+ }
239
+ if (hours < 0 || hours > 23) {
240
+ throw Error(`Invalid hours "${hours}". Hours has to be between 0 and 23.`);
241
+ }
242
+ if (minutes < 0 || minutes > 59) {
243
+ throw Error(`Invalid minutes "${minutes}". Minutes has to between 0 and 59.`);
244
+ }
245
+ if (seconds < 0 || seconds > 59) {
246
+ throw Error(`Invalid seconds "${seconds}". Seconds has to be between 0 and 59.`);
247
+ }
248
+ const result = this.createDateWithOverflow(year, month, date, hours, minutes, seconds);
249
+ // Check that the date wasn't above the upper bound for the month, causing the month to overflow
250
+ // For example, createDate(2017, 1, 31) would try to create a date 2017/02/31 which is invalid
251
+ if (result.getMonth() !== month) {
252
+ throw Error(`Invalid date "${date}" for month with index "${month}".`);
253
+ }
254
+ return result;
255
+ }
256
+ clone(date) {
257
+ return this.createDate(this.getYear(date), this.getMonth(date), this.getDate(date), this.getHours(date), this.getMinutes(date), this.getSeconds(date));
258
+ }
259
+ now() {
260
+ return new Date();
261
+ }
262
+ format(date, displayFormat) {
263
+ if (!this.isValid(date)) {
264
+ throw Error('JSNativeDate: Cannot format invalid date.');
265
+ }
266
+ if (SUPPORTS_INTL_API) {
267
+ if (this._clampDate &&
268
+ (date.getFullYear() < 1 || date.getFullYear() > 9999)) {
269
+ date = this.clone(date);
270
+ date.setFullYear(Math.max(1, Math.min(9999, date.getFullYear())));
271
+ }
272
+ displayFormat = { ...displayFormat, timeZone: 'utc' };
273
+ const dtf = new Intl.DateTimeFormat(this.locale, displayFormat);
274
+ return this.stripDirectionalityCharacters(this._format(dtf, date));
275
+ }
276
+ return this.stripDirectionalityCharacters(date.toDateString());
277
+ }
278
+ parse(value, _parseFormat) {
279
+ // There is no way using the native JS Date to set the parse format or locale
280
+ if (typeof value === 'number') {
281
+ return new Date(value);
282
+ }
283
+ return value ? new Date(Date.parse(value)) : null;
284
+ }
285
+ /**
286
+ * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
287
+ * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
288
+ * invalid date for all other values.
289
+ */
290
+ deserialize(value) {
291
+ if (typeof value === 'string') {
292
+ if (!value) {
293
+ return null;
294
+ }
295
+ // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the
296
+ // string is the right format first.
297
+ if (ISO_8601_REGEX.test(value)) {
298
+ const date = new Date(value);
299
+ if (this.isValid(date)) {
300
+ return date;
301
+ }
302
+ }
303
+ }
304
+ return super.deserialize(value);
305
+ }
306
+ /**
307
+ * Creates a date but allows the month and date to overflow.
308
+ */
309
+ createDateWithOverflow(year, month, date, hours = 0, minutes = 0, seconds = 0) {
310
+ const result = new Date(year, month, date, hours, minutes, seconds);
311
+ if (year >= 0 && year < 100) {
312
+ result.setFullYear(this.getYear(result) - 1900);
313
+ }
314
+ return result;
315
+ }
316
+ /**
317
+ * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
318
+ * other browsers do not. We remove them to make output consistent and because they interfere with
319
+ * date parsing.
320
+ */
321
+ stripDirectionalityCharacters(str) {
322
+ return str.replace(/[\u200e\u200f]/g, '');
323
+ }
324
+ /**
325
+ * When converting Date object to string, javascript built-in functions may return wrong
326
+ * results because it applies its internal DST rules. The DST rules around the world change
327
+ * very frequently, and the current valid rule is not always valid in previous years though.
328
+ * We work around this problem building a new Date object which has its internal UTC
329
+ * representation with the local date and time.
330
+ */
331
+ _format(dtf, date) {
332
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
333
+ return dtf.format(d);
334
+ }
335
+ }
336
+ NativeDateTimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeAdapter, deps: [{ token: i1.Platform }, { token: OWL_DATE_TIME_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
337
+ NativeDateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeAdapter });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeAdapter, decorators: [{
339
+ type: Injectable
340
+ }], ctorParameters: function () { return [{ type: i1.Platform }, { type: undefined, decorators: [{
341
+ type: Optional
342
+ }, {
343
+ type: Inject,
344
+ args: [OWL_DATE_TIME_LOCALE]
345
+ }] }]; } });
346
+
347
+ const OWL_NATIVE_DATE_TIME_FORMATS = {
348
+ parseInput: null,
349
+ fullPickerInput: { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' },
350
+ datePickerInput: { year: 'numeric', month: 'numeric', day: 'numeric' },
351
+ timePickerInput: { hour: 'numeric', minute: 'numeric' },
352
+ monthYearLabel: { year: 'numeric', month: 'short' },
353
+ dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
354
+ monthYearA11yLabel: { year: 'numeric', month: 'long' }
355
+ };
356
+
357
+ class NativeDateTimeModule {
358
+ }
359
+ NativeDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
360
+ NativeDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeModule, imports: [PlatformModule] });
361
+ NativeDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeModule, providers: [
362
+ { provide: DateTimeAdapter, useClass: NativeDateTimeAdapter }
363
+ ], imports: [[PlatformModule]] });
364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NativeDateTimeModule, decorators: [{
365
+ type: NgModule,
366
+ args: [{
367
+ imports: [PlatformModule],
368
+ providers: [
369
+ { provide: DateTimeAdapter, useClass: NativeDateTimeAdapter }
370
+ ]
371
+ }]
372
+ }] });
373
+ class OwlNativeDateTimeModule {
374
+ }
375
+ OwlNativeDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlNativeDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
376
+ OwlNativeDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlNativeDateTimeModule, imports: [NativeDateTimeModule] });
377
+ OwlNativeDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlNativeDateTimeModule, providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_NATIVE_DATE_TIME_FORMATS }], imports: [[NativeDateTimeModule]] });
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: OwlNativeDateTimeModule, decorators: [{
379
+ type: NgModule,
380
+ args: [{
381
+ imports: [NativeDateTimeModule],
382
+ providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_NATIVE_DATE_TIME_FORMATS }]
383
+ }]
384
+ }] });
385
+
386
+ /**
387
+ * Generated bundle index. Do not edit.
388
+ */
389
+
390
+ export { OwlNativeDateTimeModule };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nxt-pick-datetime-native-adapter.mjs","sources":["../../../projects/nxt-pick-datetime/native-adapter/src/date-time-adapter.class.ts","../../../projects/nxt-pick-datetime/native-adapter/src/date-time-format.class.ts","../../../projects/nxt-pick-datetime/native-adapter/src/native-adapter.module.ts","../../../projects/nxt-pick-datetime/native-adapter/src/nxt-pick-datetime-native-adapter.ts"],"sourcesContent":["import { Platform } from '@angular/cdk/platform'\nimport { Inject, Injectable, Optional } from '@angular/core'\nimport { DateTimeAdapter, OWL_DATE_TIME_LOCALE } from 'nxt-pick-datetime'\n\n/** The default month names to use if Intl API is not available. */\nconst DEFAULT_MONTH_NAMES = {\n long: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n short: [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n ],\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']\n}\n\n/** The default day of the week names to use if Intl API is not available. */\nconst DEFAULT_DAY_OF_WEEK_NAMES = {\n long: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday'\n ],\n short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S']\n}\n\n/** The default date names to use if Intl API is not available. */\nconst DEFAULT_DATE_NAMES = range(31, i => String(i + 1))\n\n/** Whether the browser supports the Intl API. */\nconst SUPPORTS_INTL_API = typeof Intl !== 'undefined'\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings an with out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX = /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length)\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i)\n }\n return valuesArray\n}\n\n@Injectable()\nexport class NativeDateTimeAdapter extends DateTimeAdapter<Date> {\n /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */\n private readonly _clampDate: boolean\n\n /**\n * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.\n * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off\n * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`\n * will produce `'8/13/1800'`.\n */\n useUtcForDisplay: boolean\n\n constructor(\n platform: Platform,\n @Optional()\n @Inject(OWL_DATE_TIME_LOCALE)\n owlDateTimeLocale?: string\n ) {\n super()\n super.setLocale(owlDateTimeLocale)\n\n // IE does its own time zone correction, so we disable this on IE.\n this.useUtcForDisplay = !platform.TRIDENT\n this._clampDate = platform.TRIDENT || platform.EDGE\n }\n\n public getYear(date: Date): number {\n return date.getFullYear()\n }\n\n public getMonth(date: Date): number {\n return date.getMonth()\n }\n\n public getDay(date: Date): number {\n return date.getDay()\n }\n\n public getDate(date: Date): number {\n return date.getDate()\n }\n\n public getHours(date: Date): number {\n return date.getHours()\n }\n\n public getMinutes(date: Date): number {\n return date.getMinutes()\n }\n\n public getSeconds(date: Date): number {\n return date.getSeconds()\n }\n\n public getTime(date: Date): number {\n return date.getTime()\n }\n\n public getNumDaysInMonth(date: Date): number {\n const lastDateOfMonth = this.createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + 1,\n 0\n )\n\n return this.getDate(lastDateOfMonth)\n }\n\n public differenceInCalendarDays(dateLeft: Date, dateRight: Date): number {\n if (this.isValid(dateLeft) && this.isValid(dateRight)) {\n const dateLeftStartOfDay = this.createDate(\n this.getYear(dateLeft),\n this.getMonth(dateLeft),\n this.getDate(dateLeft)\n )\n const dateRightStartOfDay = this.createDate(\n this.getYear(dateRight),\n this.getMonth(dateRight),\n this.getDate(dateRight)\n )\n\n const timeStampLeft =\n this.getTime(dateLeftStartOfDay) -\n dateLeftStartOfDay.getTimezoneOffset() *\n this.milliseondsInMinute\n const timeStampRight =\n this.getTime(dateRightStartOfDay) -\n dateRightStartOfDay.getTimezoneOffset() *\n this.milliseondsInMinute\n return Math.round(\n (timeStampLeft - timeStampRight) / this.millisecondsInDay\n )\n } else {\n return null\n }\n }\n\n public getYearName(date: Date): string {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {\n year: 'numeric',\n timeZone: 'utc'\n })\n return this.stripDirectionalityCharacters(this._format(dtf, date))\n }\n return String(this.getYear(date))\n }\n\n public getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {\n month: style,\n timeZone: 'utc'\n })\n return range(12, i =>\n this.stripDirectionalityCharacters(\n this._format(dtf, new Date(2017, i, 1))\n )\n )\n }\n return DEFAULT_MONTH_NAMES[style]\n }\n\n public getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {\n weekday: style,\n timeZone: 'utc'\n })\n return range(7, i =>\n this.stripDirectionalityCharacters(\n this._format(dtf, new Date(2017, 0, i + 1))\n )\n )\n }\n\n return DEFAULT_DAY_OF_WEEK_NAMES[style]\n }\n\n public getDateNames(): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {\n day: 'numeric',\n timeZone: 'utc'\n })\n return range(31, i =>\n this.stripDirectionalityCharacters(\n this._format(dtf, new Date(2017, 0, i + 1))\n )\n )\n }\n return DEFAULT_DATE_NAMES\n }\n\n public toIso8601(date: Date): string {\n return date.toISOString()\n }\n\n public isEqual(dateLeft: Date, dateRight: Date): boolean {\n if (this.isValid(dateLeft) && this.isValid(dateRight)) {\n return dateLeft.getTime() === dateRight.getTime()\n } else {\n return false\n }\n }\n\n public isSameDay(dateLeft: Date, dateRight: Date): boolean {\n if (this.isValid(dateLeft) && this.isValid(dateRight)) {\n const dateLeftStartOfDay = this.clone(dateLeft)\n const dateRightStartOfDay = this.clone(dateRight)\n dateLeftStartOfDay.setHours(0, 0, 0, 0)\n dateRightStartOfDay.setHours(0, 0, 0, 0)\n return (\n dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()\n )\n } else {\n return false\n }\n }\n\n public isValid(date: Date): boolean {\n return date && !isNaN(date.getTime())\n }\n\n public invalid(): Date {\n return new Date(NaN)\n }\n\n public isDateInstance(obj: any): boolean {\n return obj instanceof Date\n }\n\n public addCalendarYears(date: Date, amount: number): Date {\n return this.addCalendarMonths(date, amount * 12)\n }\n\n public addCalendarMonths(date: Date, amount: number): Date {\n const result = this.clone(date)\n amount = Number(amount)\n\n const desiredMonth = result.getMonth() + amount\n const dateWithDesiredMonth = new Date(0)\n dateWithDesiredMonth.setFullYear(result.getFullYear(), desiredMonth, 1)\n dateWithDesiredMonth.setHours(0, 0, 0, 0)\n\n const daysInMonth = this.getNumDaysInMonth(dateWithDesiredMonth)\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n result.setMonth(desiredMonth, Math.min(daysInMonth, result.getDate()))\n return result\n }\n\n public addCalendarDays(date: Date, amount: number): Date {\n const result = this.clone(date)\n amount = Number(amount)\n result.setDate(result.getDate() + amount)\n return result\n }\n\n public setHours(date: Date, amount: number): Date {\n const result = this.clone(date)\n result.setHours(amount)\n return result\n }\n\n public setMinutes(date: Date, amount: number): Date {\n const result = this.clone(date)\n result.setMinutes(amount)\n return result\n }\n\n public setSeconds(date: Date, amount: number): Date {\n const result = this.clone(date)\n result.setSeconds(amount)\n return result\n }\n\n public createDate(\n year: number,\n month: number,\n date: number,\n hours: number = 0,\n minutes: number = 0,\n seconds: number = 0\n ): Date {\n if (month < 0 || month > 11) {\n throw Error(\n `Invalid month index \"${month}\". Month index has to be between 0 and 11.`\n )\n }\n\n if (date < 1) {\n throw Error(\n `Invalid date \"${date}\". Date has to be greater than 0.`\n )\n }\n\n if (hours < 0 || hours > 23) {\n throw Error(\n `Invalid hours \"${hours}\". Hours has to be between 0 and 23.`\n )\n }\n\n if (minutes < 0 || minutes > 59) {\n throw Error(\n `Invalid minutes \"${minutes}\". Minutes has to between 0 and 59.`\n )\n }\n\n if (seconds < 0 || seconds > 59) {\n throw Error(\n `Invalid seconds \"${seconds}\". Seconds has to be between 0 and 59.`\n )\n }\n\n const result = this.createDateWithOverflow(\n year,\n month,\n date,\n hours,\n minutes,\n seconds\n )\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n // For example, createDate(2017, 1, 31) would try to create a date 2017/02/31 which is invalid\n if (result.getMonth() !== month) {\n throw Error(\n `Invalid date \"${date}\" for month with index \"${month}\".`\n )\n }\n\n return result\n }\n\n public clone(date: Date): Date {\n return this.createDate(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHours(date),\n this.getMinutes(date),\n this.getSeconds(date)\n )\n }\n\n public now(): Date {\n return new Date()\n }\n\n public format(date: Date, displayFormat: any): string {\n if (!this.isValid(date)) {\n throw Error('JSNativeDate: Cannot format invalid date.')\n }\n\n if (SUPPORTS_INTL_API) {\n if (\n this._clampDate &&\n (date.getFullYear() < 1 || date.getFullYear() > 9999)\n ) {\n date = this.clone(date)\n date.setFullYear(\n Math.max(1, Math.min(9999, date.getFullYear()))\n )\n }\n\n displayFormat = { ...displayFormat, timeZone: 'utc' }\n const dtf = new Intl.DateTimeFormat(this.locale, displayFormat)\n return this.stripDirectionalityCharacters(this._format(dtf, date))\n }\n\n return this.stripDirectionalityCharacters(date.toDateString())\n }\n\n public parse(value: any, _parseFormat: any): Date | null {\n // There is no way using the native JS Date to set the parse format or locale\n if (typeof value === 'number') {\n return new Date(value)\n }\n return value ? new Date(Date.parse(value)) : null\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n public deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n const date = new Date(value)\n if (this.isValid(date)) {\n return date\n }\n }\n }\n return super.deserialize(value)\n }\n\n /**\n * Creates a date but allows the month and date to overflow.\n */\n private createDateWithOverflow(\n year: number,\n month: number,\n date: number,\n hours: number = 0,\n minutes: number = 0,\n seconds: number = 0\n ): Date {\n const result = new Date(year, month, date, hours, minutes, seconds)\n\n if (year >= 0 && year < 100) {\n result.setFullYear(this.getYear(result) - 1900)\n }\n return result\n }\n\n /**\n * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while\n * other browsers do not. We remove them to make output consistent and because they interfere with\n * date parsing.\n */\n private stripDirectionalityCharacters(str: string) {\n return str.replace(/[\\u200e\\u200f]/g, '')\n }\n\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n */\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\n const d = new Date(\n Date.UTC(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n )\n )\n return dtf.format(d)\n }\n}\n","import { OwlDateTimeFormats } from 'nxt-pick-datetime'\n\nexport const OWL_NATIVE_DATE_TIME_FORMATS: OwlDateTimeFormats = {\n parseInput: null,\n fullPickerInput: { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' },\n datePickerInput: { year: 'numeric', month: 'numeric', day: 'numeric' },\n timePickerInput: { hour: 'numeric', minute: 'numeric' },\n monthYearLabel: { year: 'numeric', month: 'short' },\n dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },\n monthYearA11yLabel: { year: 'numeric', month: 'long' }\n}\n","import { PlatformModule } from '@angular/cdk/platform'\nimport { NgModule } from '@angular/core'\nimport { DateTimeAdapter, OWL_DATE_TIME_FORMATS } from 'nxt-pick-datetime'\nimport { NativeDateTimeAdapter } from './date-time-adapter.class'\nimport { OWL_NATIVE_DATE_TIME_FORMATS } from './date-time-format.class'\n\n@NgModule({\n imports: [PlatformModule],\n providers: [\n { provide: DateTimeAdapter, useClass: NativeDateTimeAdapter }\n ]\n})\nexport class NativeDateTimeModule { }\n\n@NgModule({\n imports: [NativeDateTimeModule],\n providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_NATIVE_DATE_TIME_FORMATS }]\n})\nexport class OwlNativeDateTimeModule { }\n","/**\n * Generated bundle index. Do not ed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