@skyux/datetime 5.9.4 → 6.0.0-beta.10

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 (163) hide show
  1. package/documentation.json +709 -790
  2. package/esm2020/index.mjs +31 -0
  3. package/esm2020/lib/modules/date-pipe/date-format-utility.mjs +46 -0
  4. package/esm2020/lib/modules/date-pipe/date-pipe.module.mjs +21 -0
  5. package/esm2020/lib/modules/date-pipe/date.pipe.mjs +65 -0
  6. package/esm2020/lib/modules/date-pipe/fuzzy-date.pipe.mjs +47 -0
  7. package/esm2020/lib/modules/date-range-picker/date-range-picker.component.mjs +437 -0
  8. package/esm2020/lib/modules/date-range-picker/date-range-picker.module.mjs +47 -0
  9. package/esm2020/lib/modules/date-range-picker/date-range.service.mjs +97 -0
  10. package/esm2020/lib/modules/date-range-picker/types/date-range-calculation.mjs +2 -0
  11. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-config.mjs +2 -0
  12. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.mjs +2 -0
  13. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-id.mjs +118 -0
  14. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-type.mjs +23 -0
  15. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator-validate-function.mjs +2 -0
  16. package/esm2020/lib/modules/date-range-picker/types/date-range-calculator.mjs +53 -0
  17. package/esm2020/lib/modules/date-range-picker/types/date-range-default-calculator-config.mjs +2 -0
  18. package/esm2020/lib/modules/date-range-picker/types/date-range-default-calculator-configs.mjs +147 -0
  19. package/esm2020/lib/modules/date-range-picker/types/date-range-relative-value.mjs +249 -0
  20. package/esm2020/lib/modules/date-range-picker/types/date-range.mjs +2 -0
  21. package/esm2020/lib/modules/datepicker/date-formatter.mjs +38 -0
  22. package/esm2020/lib/modules/datepicker/datepicker-adapter.service.mjs +33 -0
  23. package/esm2020/lib/modules/datepicker/datepicker-calendar-change.mjs +2 -0
  24. package/esm2020/lib/modules/datepicker/datepicker-calendar-inner.component.mjs +310 -0
  25. package/esm2020/lib/modules/datepicker/datepicker-calendar.component.mjs +104 -0
  26. package/esm2020/lib/modules/datepicker/datepicker-config.service.mjs +21 -0
  27. package/esm2020/lib/modules/datepicker/datepicker-custom-date.mjs +2 -0
  28. package/esm2020/lib/modules/datepicker/datepicker-date.mjs +2 -0
  29. package/esm2020/lib/modules/datepicker/datepicker-input-fuzzy.directive.mjs +464 -0
  30. package/esm2020/lib/modules/datepicker/datepicker-input.directive.mjs +488 -0
  31. package/esm2020/lib/modules/datepicker/datepicker.component.mjs +328 -0
  32. package/esm2020/lib/modules/datepicker/datepicker.module.mjs +95 -0
  33. package/esm2020/lib/modules/datepicker/datepicker.service.mjs +21 -0
  34. package/esm2020/lib/modules/datepicker/daypicker-button.component.mjs +22 -0
  35. package/esm2020/lib/modules/datepicker/daypicker-cell.component.mjs +126 -0
  36. package/esm2020/lib/modules/datepicker/daypicker.component.mjs +211 -0
  37. package/esm2020/lib/modules/datepicker/fuzzy-date.mjs +2 -0
  38. package/esm2020/lib/modules/datepicker/fuzzy-date.service.mjs +402 -0
  39. package/esm2020/lib/modules/datepicker/monthpicker.component.mjs +80 -0
  40. package/esm2020/lib/modules/datepicker/yearpicker.component.mjs +86 -0
  41. package/esm2020/lib/modules/shared/sky-datetime-resources.module.mjs +131 -0
  42. package/esm2020/lib/modules/timepicker/timepicker.component.mjs +361 -0
  43. package/esm2020/lib/modules/timepicker/timepicker.directive.mjs +226 -0
  44. package/esm2020/lib/modules/timepicker/timepicker.interface.mjs +2 -0
  45. package/esm2020/lib/modules/timepicker/timepicker.module.mjs +46 -0
  46. package/esm2020/skyux-datetime.mjs +5 -0
  47. package/esm2020/testing/datepicker-fixture.mjs +53 -0
  48. package/esm2020/testing/public-api.mjs +3 -0
  49. package/esm2020/testing/skyux-datetime-testing.mjs +5 -0
  50. package/esm2020/testing/timepicker-fixture.mjs +50 -0
  51. package/fesm2015/{skyux-datetime-testing.js → skyux-datetime-testing.mjs} +1 -2
  52. package/fesm2015/skyux-datetime-testing.mjs.map +1 -0
  53. package/fesm2015/skyux-datetime.mjs +4752 -0
  54. package/fesm2015/skyux-datetime.mjs.map +1 -0
  55. package/{esm2015/testing/datepicker-fixture.js → fesm2020/skyux-datetime-testing.mjs} +57 -3
  56. package/fesm2020/skyux-datetime-testing.mjs.map +1 -0
  57. package/{fesm2015/skyux-datetime.js → fesm2020/skyux-datetime.mjs} +196 -218
  58. package/fesm2020/skyux-datetime.mjs.map +1 -0
  59. package/lib/modules/date-range-picker/date-range-picker.component.d.ts +2 -6
  60. package/lib/modules/datepicker/datepicker-input.directive.d.ts +11 -0
  61. package/package.json +42 -18
  62. package/testing/package.json +5 -5
  63. package/bundles/skyux-datetime-testing.umd.js +0 -143
  64. package/bundles/skyux-datetime.umd.js +0 -5488
  65. package/esm2015/index.js +0 -31
  66. package/esm2015/index.js.map +0 -1
  67. package/esm2015/lib/modules/date-pipe/date-format-utility.js +0 -46
  68. package/esm2015/lib/modules/date-pipe/date-format-utility.js.map +0 -1
  69. package/esm2015/lib/modules/date-pipe/date-pipe.module.js +0 -21
  70. package/esm2015/lib/modules/date-pipe/date-pipe.module.js.map +0 -1
  71. package/esm2015/lib/modules/date-pipe/date.pipe.js +0 -65
  72. package/esm2015/lib/modules/date-pipe/date.pipe.js.map +0 -1
  73. package/esm2015/lib/modules/date-pipe/fuzzy-date.pipe.js +0 -47
  74. package/esm2015/lib/modules/date-pipe/fuzzy-date.pipe.js.map +0 -1
  75. package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js +0 -453
  76. package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js.map +0 -1
  77. package/esm2015/lib/modules/date-range-picker/date-range-picker.module.js +0 -47
  78. package/esm2015/lib/modules/date-range-picker/date-range-picker.module.js.map +0 -1
  79. package/esm2015/lib/modules/date-range-picker/date-range.service.js +0 -97
  80. package/esm2015/lib/modules/date-range-picker/date-range.service.js.map +0 -1
  81. package/esm2015/lib/modules/date-range-picker/types/date-range-calculation.js +0 -2
  82. package/esm2015/lib/modules/date-range-picker/types/date-range-calculation.js.map +0 -1
  83. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-config.js +0 -2
  84. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-config.js.map +0 -1
  85. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.js +0 -2
  86. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.js.map +0 -1
  87. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-id.js +0 -118
  88. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-id.js.map +0 -1
  89. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-type.js +0 -23
  90. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-type.js.map +0 -1
  91. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-validate-function.js +0 -2
  92. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-validate-function.js.map +0 -1
  93. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator.js +0 -56
  94. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator.js.map +0 -1
  95. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-config.js +0 -2
  96. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-config.js.map +0 -1
  97. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-configs.js +0 -147
  98. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-configs.js.map +0 -1
  99. package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js +0 -249
  100. package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js.map +0 -1
  101. package/esm2015/lib/modules/date-range-picker/types/date-range.js +0 -2
  102. package/esm2015/lib/modules/date-range-picker/types/date-range.js.map +0 -1
  103. package/esm2015/lib/modules/datepicker/date-formatter.js +0 -38
  104. package/esm2015/lib/modules/datepicker/date-formatter.js.map +0 -1
  105. package/esm2015/lib/modules/datepicker/datepicker-adapter.service.js +0 -33
  106. package/esm2015/lib/modules/datepicker/datepicker-adapter.service.js.map +0 -1
  107. package/esm2015/lib/modules/datepicker/datepicker-calendar-change.js +0 -2
  108. package/esm2015/lib/modules/datepicker/datepicker-calendar-change.js.map +0 -1
  109. package/esm2015/lib/modules/datepicker/datepicker-calendar-inner.component.js +0 -315
  110. package/esm2015/lib/modules/datepicker/datepicker-calendar-inner.component.js.map +0 -1
  111. package/esm2015/lib/modules/datepicker/datepicker-calendar.component.js +0 -109
  112. package/esm2015/lib/modules/datepicker/datepicker-calendar.component.js.map +0 -1
  113. package/esm2015/lib/modules/datepicker/datepicker-config.service.js +0 -21
  114. package/esm2015/lib/modules/datepicker/datepicker-config.service.js.map +0 -1
  115. package/esm2015/lib/modules/datepicker/datepicker-custom-date.js +0 -2
  116. package/esm2015/lib/modules/datepicker/datepicker-custom-date.js.map +0 -1
  117. package/esm2015/lib/modules/datepicker/datepicker-date.js +0 -2
  118. package/esm2015/lib/modules/datepicker/datepicker-date.js.map +0 -1
  119. package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js +0 -467
  120. package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js.map +0 -1
  121. package/esm2015/lib/modules/datepicker/datepicker-input.directive.js +0 -446
  122. package/esm2015/lib/modules/datepicker/datepicker-input.directive.js.map +0 -1
  123. package/esm2015/lib/modules/datepicker/datepicker.component.js +0 -333
  124. package/esm2015/lib/modules/datepicker/datepicker.component.js.map +0 -1
  125. package/esm2015/lib/modules/datepicker/datepicker.module.js +0 -95
  126. package/esm2015/lib/modules/datepicker/datepicker.module.js.map +0 -1
  127. package/esm2015/lib/modules/datepicker/datepicker.service.js +0 -21
  128. package/esm2015/lib/modules/datepicker/datepicker.service.js.map +0 -1
  129. package/esm2015/lib/modules/datepicker/daypicker-button.component.js +0 -26
  130. package/esm2015/lib/modules/datepicker/daypicker-button.component.js.map +0 -1
  131. package/esm2015/lib/modules/datepicker/daypicker-cell.component.js +0 -130
  132. package/esm2015/lib/modules/datepicker/daypicker-cell.component.js.map +0 -1
  133. package/esm2015/lib/modules/datepicker/daypicker.component.js +0 -215
  134. package/esm2015/lib/modules/datepicker/daypicker.component.js.map +0 -1
  135. package/esm2015/lib/modules/datepicker/fuzzy-date.js +0 -2
  136. package/esm2015/lib/modules/datepicker/fuzzy-date.js.map +0 -1
  137. package/esm2015/lib/modules/datepicker/fuzzy-date.service.js +0 -403
  138. package/esm2015/lib/modules/datepicker/fuzzy-date.service.js.map +0 -1
  139. package/esm2015/lib/modules/datepicker/monthpicker.component.js +0 -84
  140. package/esm2015/lib/modules/datepicker/monthpicker.component.js.map +0 -1
  141. package/esm2015/lib/modules/datepicker/yearpicker.component.js +0 -90
  142. package/esm2015/lib/modules/datepicker/yearpicker.component.js.map +0 -1
  143. package/esm2015/lib/modules/shared/sky-datetime-resources.module.js +0 -131
  144. package/esm2015/lib/modules/shared/sky-datetime-resources.module.js.map +0 -1
  145. package/esm2015/lib/modules/timepicker/timepicker.component.js +0 -367
  146. package/esm2015/lib/modules/timepicker/timepicker.component.js.map +0 -1
  147. package/esm2015/lib/modules/timepicker/timepicker.directive.js +0 -228
  148. package/esm2015/lib/modules/timepicker/timepicker.directive.js.map +0 -1
  149. package/esm2015/lib/modules/timepicker/timepicker.interface.js +0 -2
  150. package/esm2015/lib/modules/timepicker/timepicker.interface.js.map +0 -1
  151. package/esm2015/lib/modules/timepicker/timepicker.module.js +0 -46
  152. package/esm2015/lib/modules/timepicker/timepicker.module.js.map +0 -1
  153. package/esm2015/skyux-datetime.js +0 -5
  154. package/esm2015/skyux-datetime.js.map +0 -1
  155. package/esm2015/testing/datepicker-fixture.js.map +0 -1
  156. package/esm2015/testing/public-api.js +0 -3
  157. package/esm2015/testing/public-api.js.map +0 -1
  158. package/esm2015/testing/skyux-datetime-testing.js +0 -5
  159. package/esm2015/testing/skyux-datetime-testing.js.map +0 -1
  160. package/esm2015/testing/timepicker-fixture.js +0 -50
  161. package/esm2015/testing/timepicker-fixture.js.map +0 -1
  162. package/fesm2015/skyux-datetime-testing.js.map +0 -1
  163. package/fesm2015/skyux-datetime.js.map +0 -1
package/esm2015/index.js DELETED
@@ -1,31 +0,0 @@
1
- export * from './lib/modules/date-pipe/date.pipe';
2
- export * from './lib/modules/date-pipe/date-pipe.module';
3
- export * from './lib/modules/date-pipe/fuzzy-date.pipe';
4
- export * from './lib/modules/date-range-picker/types/date-range-calculation';
5
- export * from './lib/modules/date-range-picker/types/date-range-calculator';
6
- export * from './lib/modules/date-range-picker/types/date-range-calculator-config';
7
- export * from './lib/modules/date-range-picker/types/date-range-calculator-date-range-function';
8
- export * from './lib/modules/date-range-picker/types/date-range-calculator-id';
9
- export * from './lib/modules/date-range-picker/types/date-range-calculator-type';
10
- export * from './lib/modules/date-range-picker/types/date-range-calculator-validate-function';
11
- export * from './lib/modules/date-range-picker/types/date-range';
12
- export * from './lib/modules/date-range-picker/date-range-picker.module';
13
- export * from './lib/modules/date-range-picker/date-range.service';
14
- export * from './lib/modules/datepicker/datepicker-config.service';
15
- export * from './lib/modules/datepicker/datepicker.module';
16
- export * from './lib/modules/datepicker/fuzzy-date';
17
- export * from './lib/modules/datepicker/fuzzy-date.service';
18
- export * from './lib/modules/datepicker/datepicker-calendar-change';
19
- export * from './lib/modules/datepicker/datepicker-custom-date';
20
- export * from './lib/modules/timepicker/timepicker.interface';
21
- export * from './lib/modules/timepicker/timepicker.module';
22
- // Components and directives must be exported to support Angular’s “partial” Ivy compiler.
23
- // Obscure names are used to indicate types are not part of the public API.
24
- export { SkyDatepickerCalendarComponent as λ1 } from './lib/modules/datepicker/datepicker-calendar.component';
25
- export { SkyDatepickerComponent as λ2 } from './lib/modules/datepicker/datepicker.component';
26
- export { SkyDatepickerInputDirective as λ3 } from './lib/modules/datepicker/datepicker-input.directive';
27
- export { SkyFuzzyDatepickerInputDirective as λ4 } from './lib/modules/datepicker/datepicker-input-fuzzy.directive';
28
- export { SkyDateRangePickerComponent as λ5 } from './lib/modules/date-range-picker/date-range-picker.component';
29
- export { SkyTimepickerComponent as λ6 } from './lib/modules/timepicker/timepicker.component';
30
- export { SkyTimepickerInputDirective as λ7 } from './lib/modules/timepicker/timepicker.directive';
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/datetime/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,0CAA0C,CAAC;AAEzD,cAAc,yCAAyC,CAAC;AAExD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,6DAA6D,CAAC;AAC5E,cAAc,oEAAoE,CAAC;AACnF,cAAc,iFAAiF,CAAC;AAChG,cAAc,gEAAgE,CAAC;AAC/E,cAAc,kEAAkE,CAAC;AACjF,cAAc,+EAA+E,CAAC;AAC9F,cAAc,kDAAkD,CAAC;AACjE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAE3D,0FAA0F;AAC1F,2EAA2E;AAC3E,OAAO,EAAE,8BAA8B,IAAI,EAAE,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,sBAAsB,IAAI,EAAE,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,2BAA2B,IAAI,EAAE,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,gCAAgC,IAAI,EAAE,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,2BAA2B,IAAI,EAAE,EAAE,MAAM,6DAA6D,CAAC;AAChH,OAAO,EAAE,sBAAsB,IAAI,EAAE,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,2BAA2B,IAAI,EAAE,EAAE,MAAM,+CAA+C,CAAC","sourcesContent":["export * from './lib/modules/date-pipe/date.pipe';\nexport * from './lib/modules/date-pipe/date-pipe.module';\n\nexport * from './lib/modules/date-pipe/fuzzy-date.pipe';\n\nexport * from './lib/modules/date-range-picker/types/date-range-calculation';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-config';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-date-range-function';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-id';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-type';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-validate-function';\nexport * from './lib/modules/date-range-picker/types/date-range';\nexport * from './lib/modules/date-range-picker/date-range-picker.module';\nexport * from './lib/modules/date-range-picker/date-range.service';\n\nexport * from './lib/modules/datepicker/datepicker-config.service';\nexport * from './lib/modules/datepicker/datepicker.module';\nexport * from './lib/modules/datepicker/fuzzy-date';\nexport * from './lib/modules/datepicker/fuzzy-date.service';\nexport * from './lib/modules/datepicker/datepicker-calendar-change';\nexport * from './lib/modules/datepicker/datepicker-custom-date';\n\nexport * from './lib/modules/timepicker/timepicker.interface';\nexport * from './lib/modules/timepicker/timepicker.module';\n\n// Components and directives must be exported to support Angular’s “partial” Ivy compiler.\n// Obscure names are used to indicate types are not part of the public API.\nexport { SkyDatepickerCalendarComponent as λ1 } from './lib/modules/datepicker/datepicker-calendar.component';\nexport { SkyDatepickerComponent as λ2 } from './lib/modules/datepicker/datepicker.component';\nexport { SkyDatepickerInputDirective as λ3 } from './lib/modules/datepicker/datepicker-input.directive';\nexport { SkyFuzzyDatepickerInputDirective as λ4 } from './lib/modules/datepicker/datepicker-input-fuzzy.directive';\nexport { SkyDateRangePickerComponent as λ5 } from './lib/modules/date-range-picker/date-range-picker.component';\nexport { SkyTimepickerComponent as λ6 } from './lib/modules/timepicker/timepicker.component';\nexport { SkyTimepickerInputDirective as λ7 } from './lib/modules/timepicker/timepicker.directive';\n"]}
@@ -1,46 +0,0 @@
1
- // This class is mostly ported from the Angular 4.x DatePipe in order to maintain the old
2
- // behavior of using the `Intl` API for formatting dates rather than having to register every
3
- // supported locale.
4
- // https://github.com/angular/angular/blob/4.4.x/packages/common/src/pipes/date_pipe.ts
5
- import { SkyIntlDateFormatter } from '@skyux/i18n';
6
- import moment from 'moment';
7
- export class SkyDateFormatUtility {
8
- static format(locale, value, pattern) {
9
- let date;
10
- if (isBlank(value) || value !== value) {
11
- return undefined;
12
- }
13
- // Moment will interpret any non-date object as today's date. That would
14
- // introduce a breaking change, so we check for it here. This could probably be removed
15
- // in a future major version.
16
- if (value instanceof Object && !(value instanceof Date)) {
17
- handleInvalidDate(value);
18
- }
19
- // Use moment to avoid inconsistencies between browsers interpreting the value differently.
20
- const momentDate = moment(value);
21
- if (momentDate.isValid()) {
22
- date = momentDate.toDate();
23
- }
24
- else {
25
- handleInvalidDate(value);
26
- }
27
- return SkyIntlDateFormatter.format(date, locale, SkyDateFormatUtility._ALIASES[pattern] || pattern);
28
- }
29
- }
30
- SkyDateFormatUtility._ALIASES = {
31
- medium: 'yMMMdjms',
32
- short: 'yMdjm',
33
- fullDate: 'yMMMMEEEEd',
34
- longDate: 'yMMMMd',
35
- mediumDate: 'yMMMd',
36
- shortDate: 'yMd',
37
- mediumTime: 'jms',
38
- shortTime: 'jm',
39
- };
40
- function isBlank(obj) {
41
- return !obj;
42
- }
43
- function handleInvalidDate(value) {
44
- throw new Error('Invalid value: ' + value);
45
- }
46
- //# sourceMappingURL=date-format-utility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-format-utility.js","sourceRoot":"","sources":["../../../../../../../../libs/components/datetime/src/lib/modules/date-pipe/date-format-utility.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,6FAA6F;AAC7F,oBAAoB;AACpB,uFAAuF;AACvF,OAAO,EAAE,o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the Angular 4.x DatePipe in order to maintain the old\n// behavior of using the `Intl` API for formatting dates rather than having to register every\n// supported locale.\n// https://github.com/angular/angular/blob/4.4.x/packages/common/src/pipes/date_pipe.ts\nimport { SkyIntlDateFormatter } from '@skyux/i18n';\n\nimport moment from 'moment';\n\nexport class SkyDateFormatUtility {\n private static _ALIASES: { [key: string]: string } = {\n medium: 'yMMMdjms',\n short: 'yMdjm',\n fullDate: 'yMMMMEEEEd',\n longDate: 'yMMMMd',\n mediumDate: 'yMMMd',\n shortDate: 'yMd',\n mediumTime: 'jms',\n shortTime: 'jm',\n };\n\n public static format(\n locale: string,\n value: any,\n pattern: string\n ): string | null {\n let date: Date;\n\n if (isBlank(value) || value !== value) {\n return undefined;\n }\n\n // Moment will interpret any non-date object as today's date. That would\n // introduce a breaking change, so we check for it here. This could probably be removed\n // in a future major version.\n if (value instanceof Object && !(value instanceof Date)) {\n handleInvalidDate(value);\n }\n\n // Use moment to avoid inconsistencies between browsers interpreting the value differently.\n const momentDate = moment(value);\n if (momentDate.isValid()) {\n date = momentDate.toDate();\n } else {\n handleInvalidDate(value);\n }\n\n return SkyIntlDateFormatter.format(\n date,\n locale,\n SkyDateFormatUtility._ALIASES[pattern] || pattern\n );\n }\n}\n\nfunction isBlank(obj: any): boolean {\n return !obj;\n}\n\nfunction handleInvalidDate(value: any): void {\n throw new Error('Invalid value: ' + value);\n}\n"]}
@@ -1,21 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { SkyDatetimeResourcesModule } from '../shared/sky-datetime-resources.module';
4
- import { SkyDatePipe } from './date.pipe';
5
- import { SkyFuzzyDatePipe } from './fuzzy-date.pipe';
6
- import * as i0 from "@angular/core";
7
- export class SkyDatePipeModule {
8
- }
9
- SkyDatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- SkyDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipeModule, declarations: [SkyDatePipe, SkyFuzzyDatePipe], imports: [CommonModule, SkyDatetimeResourcesModule], exports: [SkyDatePipe, SkyFuzzyDatePipe] });
11
- SkyDatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipeModule, providers: [SkyDatePipe, SkyFuzzyDatePipe], imports: [[CommonModule, SkyDatetimeResourcesModule]] });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipeModule, decorators: [{
13
- type: NgModule,
14
- args: [{
15
- declarations: [SkyDatePipe, SkyFuzzyDatePipe],
16
- providers: [SkyDatePipe, SkyFuzzyDatePipe],
17
- imports: [CommonModule, SkyDatetimeResourcesModule],
18
- exports: [SkyDatePipe, SkyFuzzyDatePipe],
19
- }]
20
- }] });
21
- //# sourceMappingURL=date-pipe.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-pipe.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/datetime/src/lib/modules/date-pipe/date-pipe.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;;AAQrD,MAAM,OAAO,iBAAiB;;+GAAjB,iBAAiB;gHAAjB,iBAAiB,iBALb,WAAW,EAAE,gBAAgB,aAElC,YAAY,EAAE,0BAA0B,aACxC,WAAW,EAAE,gBAAgB;gHAE5B,iBAAiB,aAJjB,CAAC,WAAW,EAAE,gBAAgB,CAAC,YACjC,CAAC,YAAY,EAAE,0BAA0B,CAAC;4FAGxC,iBAAiB;kBAN7B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,WAAW,EAAE,gBAAgB,CAAC;oBAC7C,SAAS,EAAE,CAAC,WAAW,EAAE,gBAAgB,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,EAAE,0BAA0B,CAAC;oBACnD,OAAO,EAAE,CAAC,WAAW,EAAE,gBAAgB,CAAC;iBACzC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyDatetimeResourcesModule } from '../shared/sky-datetime-resources.module';\n\nimport { SkyDatePipe } from './date.pipe';\nimport { SkyFuzzyDatePipe } from './fuzzy-date.pipe';\n\n@NgModule({\n declarations: [SkyDatePipe, SkyFuzzyDatePipe],\n providers: [SkyDatePipe, SkyFuzzyDatePipe],\n imports: [CommonModule, SkyDatetimeResourcesModule],\n exports: [SkyDatePipe, SkyFuzzyDatePipe],\n})\nexport class SkyDatePipeModule {}\n"]}
@@ -1,65 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import { SkyAppLocaleProvider } from '@skyux/i18n';
3
- import { Subject } from 'rxjs';
4
- import { takeUntil } from 'rxjs/operators';
5
- import { SkyDateFormatUtility } from './date-format-utility';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@skyux/i18n";
8
- /**
9
- * Formats date values according to locale rules.
10
- * @example
11
- * ```markup
12
- * {{ myDate | skyDate }}
13
- * {{ myDate | skyDate:'medium' }}
14
- * {{ myDate | skyDate:'medium':'en-CA' }}
15
- * ```
16
- */
17
- export class SkyDatePipe {
18
- constructor(localeProvider) {
19
- this.localeProvider = localeProvider;
20
- this.defaultFormat = 'short';
21
- this.defaultLocale = 'en-US';
22
- this.ngUnsubscribe = new Subject();
23
- this.localeProvider
24
- .getLocaleInfo()
25
- .pipe(takeUntil(this.ngUnsubscribe))
26
- .subscribe((localeInfo) => {
27
- this.defaultLocale = localeInfo.locale;
28
- this.updateFormattedValue();
29
- });
30
- }
31
- ngOnDestroy() {
32
- this.ngUnsubscribe.next();
33
- this.ngUnsubscribe.complete();
34
- }
35
- /**
36
- * Transforms a date value using locale and format rules.
37
- * @param value Specifies the date value to transform.
38
- * @param format Specifies the format to apply to the transform. The format string is
39
- * constructed by a series of symbols that represent date-time values. The symbols are
40
- * identical to [Angular's `DatePipe`](https://angular.io/api/common/DatePipe#pre-defined-format-options) format options.
41
- * @param locale Specifies the locale code to use in the transform.
42
- */
43
- transform(value, format, locale) {
44
- this.value = value;
45
- this.format = format;
46
- this.locale = locale;
47
- this.updateFormattedValue();
48
- return this.formattedValue;
49
- }
50
- updateFormattedValue() {
51
- const locale = this.locale || this.defaultLocale;
52
- const format = this.format || this.defaultFormat;
53
- this.formattedValue = SkyDateFormatUtility.format(locale, this.value, format);
54
- }
55
- }
56
- SkyDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipe, deps: [{ token: i1.SkyAppLocaleProvider }], target: i0.ɵɵFactoryTarget.Pipe });
57
- SkyDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipe, name: "skyDate", pure: false });
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDatePipe, decorators: [{
59
- type: Pipe,
60
- args: [{
61
- name: 'skyDate',
62
- pure: false,
63
- }]
64
- }], ctorParameters: function () { return [{ type: i1.SkyAppLocaleProvider }]; } });
65
- //# sourceMappingURL=date.pipe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.pipe.js","sourceRoot":"","sources":["../../../../../../../../libs/components/datetime/src/lib/modules/date-pipe/date.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,IAAI,EAAiB,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAoB,oBAAoB,EAAE,MAAM,aA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C,cAAc,GAAG,oBAAoB,CAAC,MAAM,CAC/C,MAAM,EACN,IAAI,CAAC,KAAK,EACV,MAAM,CACP,CAAC;IACJ,CAAC;;yGAzDU,WAAW;uGAAX,WAAW;4FAAX,WAAW;kBAJvB,IAAI;mBAAC;oBACJ,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,KAAK;iBACZ","sourcesContent":["import { OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { SkyAppLocaleInfo, SkyAppLocaleProvider } from '@skyux/i18n';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyDateFormatUtility } from './date-format-utility';\n\n/**\n * Formats date values according to locale rules.\n * @example\n * ```markup\n * {{ myDate | skyDate }}\n * {{ myDate | skyDate:'medium' }}\n * {{ myDate | skyDate:'medium':'en-CA' }}\n * ```\n */\n@Pipe({\n name: 'skyDate',\n pure: false,\n})\nexport class SkyDatePipe implements OnDestroy, PipeTransform {\n private defaultFormat = 'short';\n\n private format: string;\n\n private defaultLocale = 'en-US';\n\n private locale: string;\n\n private value: any;\n\n private formattedValue: string;\n\n private ngUnsubscribe = new Subject<void>();\n\n constructor(private localeProvider: SkyAppLocaleProvider) {\n this.localeProvider\n .getLocaleInfo()\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((localeInfo: SkyAppLocaleInfo) => {\n this.defaultLocale = localeInfo.locale;\n this.updateFormattedValue();\n });\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * Transforms a date value using locale and format rules.\n * @param value Specifies the date value to transform.\n * @param format Specifies the format to apply to the transform. The format string is\n * constructed by a series of symbols that represent date-time values. The symbols are\n * identical to [Angular's `DatePipe`](https://angular.io/api/common/DatePipe#pre-defined-format-options) format options.\n * @param locale Specifies the locale code to use in the transform.\n */\n public transform(value: any, format?: string, locale?: string): string {\n this.value = value;\n this.format = format;\n this.locale = locale;\n\n this.updateFormattedValue();\n\n return this.formattedValue;\n }\n\n private updateFormattedValue(): void {\n const locale = this.locale || this.defaultLocale;\n const format = this.format || this.defaultFormat;\n\n this.formattedValue = SkyDateFormatUtility.format(\n locale,\n this.value,\n format\n );\n }\n}\n"]}
@@ -1,47 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import { SkyFuzzyDateService } from '../datepicker/fuzzy-date.service';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "../datepicker/fuzzy-date.service";
5
- /**
6
- * Formats date values using two or more date tokens that represent the day, month,
7
- * and year. The tokens are described in the [moment.js values](https://momentjs.com/docs/#/displaying/).
8
- * @example
9
- * ```markup
10
- * {{ myFuzzyDate | skyFuzzyDate:'MMM Y' }}
11
- * {{ myFuzzyDate | skyFuzzyDate:'MMM Y':'en-CA' }}
12
- * ```
13
- */
14
- export class SkyFuzzyDatePipe {
15
- constructor(fuzzyDateService) {
16
- this.fuzzyDateService = fuzzyDateService;
17
- }
18
- /**
19
- * Transforms fuzzy date values using two or more date tokens that represent the day, month,
20
- * and year.
21
- * @param value Specifies the date value to transform.
22
- * @param format Specifies the format to apply to the transform. You construct the format
23
- * string with a two or more tokens that specify the components of date-time value. The
24
- * tokens are described in the [moment.js values](https://momentjs.com/docs/#/displaying/).
25
- * If you don't provide a format, `SkyFuzzyDatePipe` attempts to format fuzzy dates based
26
- * on the browser's default locale.
27
- * @param locale Specifies the locale code to use in the transform.
28
- */
29
- transform(value, format, locale) {
30
- if (!value) {
31
- return undefined;
32
- }
33
- const fuzzyDateFormat = format || this.fuzzyDateService.getLocaleShortFormat(locale);
34
- const fuzzyDateLocale = locale || this.fuzzyDateService.getCurrentLocale();
35
- return this.fuzzyDateService.format(value, fuzzyDateFormat, fuzzyDateLocale);
36
- }
37
- }
38
- SkyFuzzyDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFuzzyDatePipe, deps: [{ token: i1.SkyFuzzyDateService }], target: i0.ɵɵFactoryTarget.Pipe });
39
- SkyFuzzyDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFuzzyDatePipe, name: "skyFuzzyDate", pure: false });
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFuzzyDatePipe, decorators: [{
41
- type: Pipe,
42
- args: [{
43
- name: 'skyFuzzyDate',
44
- pure: false,
45
- }]
46
- }], ctorParameters: function () { return [{ type: i1.SkyFuzzyDateService }]; } });
47
- //# sourceMappingURL=fuzzy-date.pipe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fuzzy-date.pipe.js","sourceRoot":"","sources":["../../../../../../../../libs/components/datetime/src/lib/modules/date-pipe/fuzzy-date.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;;;AAEvE;;;;;;;;GAQG;AAKH,MAAM,OAAO,gBAAgB;IAC3B,YAAoB,gBAAqC;QAArC,qBAAgB,GAAhB,gBAAgB,CAAqB;IAAG,CAAC;IAE7D;;;;;;;;;;OAUG;IACI,SAAS,CACd,KAAmB,EACnB,MAAe,EACf,MAAe;QAEf,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,eAAe,GACnB,MAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC/D,MAAM,eAAe,GAAG,MAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CACjC,KAAK,EACL,eAAe,EACf,eAAe,CAChB,CAAC;IACJ,CAAC;;8GA9BU,gBAAgB;4GAAhB,gBAAgB;4FAAhB,gBAAgB;kBAJ5B,IAAI;mBAAC;oBACJ,IAAI,EAAE,cAAc;oBACpB,IAAI,EAAE,KAAK;iBACZ","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport { SkyFuzzyDate } from '../datepicker/fuzzy-date';\nimport { SkyFuzzyDateService } from '../datepicker/fuzzy-date.service';\n\n/**\n * Formats date values using two or more date tokens that represent the day, month,\n * and year. The tokens are described in the [moment.js values](https://momentjs.com/docs/#/displaying/).\n * @example\n * ```markup\n * {{ myFuzzyDate | skyFuzzyDate:'MMM Y' }}\n * {{ myFuzzyDate | skyFuzzyDate:'MMM Y':'en-CA' }}\n * ```\n */\n@Pipe({\n name: 'skyFuzzyDate',\n pure: false,\n})\nexport class SkyFuzzyDatePipe implements PipeTransform {\n constructor(private fuzzyDateService: SkyFuzzyDateService) {}\n\n /**\n * Transforms fuzzy date values using two or more date tokens that represent the day, month,\n * and year.\n * @param value Specifies the date value to transform.\n * @param format Specifies the format to apply to the transform. You construct the format\n * string with a two or more tokens that specify the components of date-time value. The\n * tokens are described in the [moment.js values](https://momentjs.com/docs/#/displaying/).\n * If you don't provide a format, `SkyFuzzyDatePipe` attempts to format fuzzy dates based\n * on the browser's default locale.\n * @param locale Specifies the locale code to use in the transform.\n */\n public transform(\n value: SkyFuzzyDate,\n format?: string,\n locale?: string\n ): string {\n if (!value) {\n return undefined;\n }\n const fuzzyDateFormat =\n format || this.fuzzyDateService.getLocaleShortFormat(locale);\n const fuzzyDateLocale = locale || this.fuzzyDateService.getCurrentLocale();\n return this.fuzzyDateService.format(\n value,\n fuzzyDateFormat,\n fuzzyDateLocale\n );\n }\n}\n"]}