@skyux/datetime 5.1.4 → 5.5.0-alpha.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 (198) hide show
  1. package/README.md +6 -4
  2. package/bundles/skyux-datetime.umd.js +80 -80
  3. package/documentation.json +379 -22
  4. package/esm2015/index.js +28 -0
  5. package/esm2015/index.js.map +1 -0
  6. package/esm2015/lib/modules/date-pipe/date-format-utility.js +48 -0
  7. package/esm2015/lib/modules/date-pipe/date-format-utility.js.map +1 -0
  8. package/esm2015/lib/modules/date-pipe/date-pipe.module.js +21 -0
  9. package/esm2015/lib/modules/date-pipe/date-pipe.module.js.map +1 -0
  10. package/esm2015/lib/modules/date-pipe/date.pipe.js +65 -0
  11. package/esm2015/lib/modules/date-pipe/date.pipe.js.map +1 -0
  12. package/esm2015/lib/modules/date-pipe/fuzzy-date.pipe.js +47 -0
  13. package/esm2015/lib/modules/date-pipe/fuzzy-date.pipe.js.map +1 -0
  14. package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js +464 -0
  15. package/esm2015/lib/modules/date-range-picker/date-range-picker.component.js.map +1 -0
  16. package/esm2015/lib/modules/date-range-picker/date-range-picker.module.js +47 -0
  17. package/esm2015/lib/modules/date-range-picker/date-range-picker.module.js.map +1 -0
  18. package/esm2015/lib/modules/date-range-picker/date-range.service.js +97 -0
  19. package/esm2015/lib/modules/date-range-picker/date-range.service.js.map +1 -0
  20. package/esm2015/lib/modules/date-range-picker/types/date-range-calculation.js +2 -0
  21. package/esm2015/lib/modules/date-range-picker/types/date-range-calculation.js.map +1 -0
  22. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-config.js +2 -0
  23. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-config.js.map +1 -0
  24. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.js +2 -0
  25. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-date-range-function.js.map +1 -0
  26. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-id.js +118 -0
  27. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-id.js.map +1 -0
  28. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-type.js +23 -0
  29. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-type.js.map +1 -0
  30. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-validate-function.js +2 -0
  31. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator-validate-function.js.map +1 -0
  32. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator.js +56 -0
  33. package/esm2015/lib/modules/date-range-picker/types/date-range-calculator.js.map +1 -0
  34. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-config.js +2 -0
  35. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-config.js.map +1 -0
  36. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-configs.js +147 -0
  37. package/esm2015/lib/modules/date-range-picker/types/date-range-default-calculator-configs.js.map +1 -0
  38. package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js +252 -0
  39. package/esm2015/lib/modules/date-range-picker/types/date-range-relative-value.js.map +1 -0
  40. package/esm2015/lib/modules/date-range-picker/types/date-range.js +2 -0
  41. package/esm2015/lib/modules/date-range-picker/types/date-range.js.map +1 -0
  42. package/esm2015/lib/modules/datepicker/date-formatter.js +38 -0
  43. package/esm2015/lib/modules/datepicker/date-formatter.js.map +1 -0
  44. package/esm2015/lib/modules/datepicker/datepicker-adapter.service.js +33 -0
  45. package/esm2015/lib/modules/datepicker/datepicker-adapter.service.js.map +1 -0
  46. package/esm2015/lib/modules/datepicker/datepicker-calendar-change.js +2 -0
  47. package/esm2015/lib/modules/datepicker/datepicker-calendar-change.js.map +1 -0
  48. package/esm2015/lib/modules/datepicker/datepicker-calendar-inner.component.js +315 -0
  49. package/esm2015/lib/modules/datepicker/datepicker-calendar-inner.component.js.map +1 -0
  50. package/esm2015/lib/modules/datepicker/datepicker-calendar.component.js +109 -0
  51. package/esm2015/lib/modules/datepicker/datepicker-calendar.component.js.map +1 -0
  52. package/esm2015/lib/modules/datepicker/datepicker-config.service.js +21 -0
  53. package/esm2015/lib/modules/datepicker/datepicker-config.service.js.map +1 -0
  54. package/esm2015/lib/modules/datepicker/datepicker-custom-date.js +2 -0
  55. package/esm2015/lib/modules/datepicker/datepicker-custom-date.js.map +1 -0
  56. package/esm2015/lib/modules/datepicker/datepicker-date.js +2 -0
  57. package/esm2015/lib/modules/datepicker/datepicker-date.js.map +1 -0
  58. package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js +457 -0
  59. package/esm2015/lib/modules/datepicker/datepicker-input-fuzzy.directive.js.map +1 -0
  60. package/esm2015/lib/modules/datepicker/datepicker-input.directive.js +435 -0
  61. package/esm2015/lib/modules/datepicker/datepicker-input.directive.js.map +1 -0
  62. package/esm2015/lib/modules/datepicker/datepicker.component.js +333 -0
  63. package/esm2015/lib/modules/datepicker/datepicker.component.js.map +1 -0
  64. package/esm2015/lib/modules/datepicker/datepicker.module.js +95 -0
  65. package/esm2015/lib/modules/datepicker/datepicker.module.js.map +1 -0
  66. package/esm2015/lib/modules/datepicker/datepicker.service.js +21 -0
  67. package/esm2015/lib/modules/datepicker/datepicker.service.js.map +1 -0
  68. package/esm2015/lib/modules/datepicker/daypicker-button.component.js +26 -0
  69. package/esm2015/lib/modules/datepicker/daypicker-button.component.js.map +1 -0
  70. package/esm2015/lib/modules/datepicker/daypicker-cell.component.js +130 -0
  71. package/esm2015/lib/modules/datepicker/daypicker-cell.component.js.map +1 -0
  72. package/esm2015/lib/modules/datepicker/daypicker.component.js +215 -0
  73. package/esm2015/lib/modules/datepicker/daypicker.component.js.map +1 -0
  74. package/esm2015/lib/modules/datepicker/fuzzy-date.js +2 -0
  75. package/esm2015/lib/modules/datepicker/fuzzy-date.js.map +1 -0
  76. package/esm2015/lib/modules/datepicker/fuzzy-date.service.js +403 -0
  77. package/esm2015/lib/modules/datepicker/fuzzy-date.service.js.map +1 -0
  78. package/esm2015/lib/modules/datepicker/monthpicker.component.js +84 -0
  79. package/esm2015/lib/modules/datepicker/monthpicker.component.js.map +1 -0
  80. package/esm2015/lib/modules/datepicker/yearpicker.component.js +90 -0
  81. package/esm2015/lib/modules/datepicker/yearpicker.component.js.map +1 -0
  82. package/esm2015/lib/modules/shared/sky-datetime-resources.module.js +131 -0
  83. package/esm2015/lib/modules/shared/sky-datetime-resources.module.js.map +1 -0
  84. package/esm2015/lib/modules/timepicker/timepicker.component.js +367 -0
  85. package/esm2015/lib/modules/timepicker/timepicker.component.js.map +1 -0
  86. package/esm2015/lib/modules/timepicker/timepicker.directive.js +229 -0
  87. package/esm2015/lib/modules/timepicker/timepicker.directive.js.map +1 -0
  88. package/esm2015/lib/modules/timepicker/timepicker.interface.js +2 -0
  89. package/esm2015/lib/modules/timepicker/timepicker.interface.js.map +1 -0
  90. package/esm2015/lib/modules/timepicker/timepicker.module.js +46 -0
  91. package/esm2015/lib/modules/timepicker/timepicker.module.js.map +1 -0
  92. package/esm2015/skyux-datetime.js +2 -2
  93. package/esm2015/skyux-datetime.js.map +1 -0
  94. package/esm2015/testing/datepicker-fixture.js +1 -1
  95. package/esm2015/testing/datepicker-fixture.js.map +1 -0
  96. package/esm2015/testing/public-api.js +1 -1
  97. package/esm2015/testing/public-api.js.map +1 -0
  98. package/esm2015/testing/skyux-datetime-testing.js +1 -1
  99. package/esm2015/testing/skyux-datetime-testing.js.map +1 -0
  100. package/esm2015/testing/timepicker-fixture.js +1 -1
  101. package/esm2015/testing/timepicker-fixture.js.map +1 -0
  102. package/fesm2015/skyux-datetime-testing.js.map +1 -1
  103. package/fesm2015/skyux-datetime.js +301 -301
  104. package/fesm2015/skyux-datetime.js.map +1 -1
  105. package/index.d.ts +25 -0
  106. package/{modules → lib/modules}/date-pipe/date-format-utility.d.ts +0 -0
  107. package/{modules → lib/modules}/date-pipe/date-pipe.module.d.ts +0 -0
  108. package/{modules → lib/modules}/date-pipe/date.pipe.d.ts +0 -0
  109. package/{modules → lib/modules}/date-pipe/fuzzy-date.pipe.d.ts +0 -0
  110. package/{modules → lib/modules}/date-range-picker/date-range-picker.component.d.ts +0 -0
  111. package/{modules → lib/modules}/date-range-picker/date-range-picker.module.d.ts +0 -0
  112. package/{modules → lib/modules}/date-range-picker/date-range.service.d.ts +0 -0
  113. package/{modules → lib/modules}/date-range-picker/types/date-range-calculation.d.ts +0 -0
  114. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator-config.d.ts +0 -0
  115. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator-date-range-function.d.ts +0 -0
  116. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator-id.d.ts +0 -0
  117. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator-type.d.ts +0 -0
  118. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator-validate-function.d.ts +0 -0
  119. package/{modules → lib/modules}/date-range-picker/types/date-range-calculator.d.ts +0 -0
  120. package/{modules → lib/modules}/date-range-picker/types/date-range-default-calculator-config.d.ts +0 -0
  121. package/{modules → lib/modules}/date-range-picker/types/date-range-default-calculator-configs.d.ts +0 -0
  122. package/{modules → lib/modules}/date-range-picker/types/date-range-relative-value.d.ts +0 -0
  123. package/{modules → lib/modules}/date-range-picker/types/date-range.d.ts +0 -0
  124. package/{modules → lib/modules}/datepicker/date-formatter.d.ts +0 -0
  125. package/{modules → lib/modules}/datepicker/datepicker-adapter.service.d.ts +0 -0
  126. package/{modules → lib/modules}/datepicker/datepicker-calendar-change.d.ts +0 -0
  127. package/{modules → lib/modules}/datepicker/datepicker-calendar-inner.component.d.ts +0 -0
  128. package/{modules → lib/modules}/datepicker/datepicker-calendar.component.d.ts +0 -0
  129. package/{modules → lib/modules}/datepicker/datepicker-config.service.d.ts +0 -0
  130. package/{modules → lib/modules}/datepicker/datepicker-custom-date.d.ts +0 -0
  131. package/{modules → lib/modules}/datepicker/datepicker-date.d.ts +0 -0
  132. package/{modules → lib/modules}/datepicker/datepicker-input-fuzzy.directive.d.ts +0 -0
  133. package/{modules → lib/modules}/datepicker/datepicker-input.directive.d.ts +0 -0
  134. package/{modules → lib/modules}/datepicker/datepicker.component.d.ts +0 -0
  135. package/{modules → lib/modules}/datepicker/datepicker.module.d.ts +0 -0
  136. package/{modules → lib/modules}/datepicker/datepicker.service.d.ts +0 -0
  137. package/{modules → lib/modules}/datepicker/daypicker-button.component.d.ts +0 -0
  138. package/{modules → lib/modules}/datepicker/daypicker-cell.component.d.ts +0 -0
  139. package/{modules → lib/modules}/datepicker/daypicker.component.d.ts +0 -0
  140. package/{modules → lib/modules}/datepicker/fuzzy-date.d.ts +0 -0
  141. package/{modules → lib/modules}/datepicker/fuzzy-date.service.d.ts +0 -0
  142. package/{modules → lib/modules}/datepicker/monthpicker.component.d.ts +0 -0
  143. package/{modules → lib/modules}/datepicker/yearpicker.component.d.ts +0 -0
  144. package/{modules → lib/modules}/shared/sky-datetime-resources.module.d.ts +0 -0
  145. package/{modules → lib/modules}/timepicker/timepicker.component.d.ts +0 -0
  146. package/{modules → lib/modules}/timepicker/timepicker.directive.d.ts +0 -0
  147. package/{modules → lib/modules}/timepicker/timepicker.interface.d.ts +0 -0
  148. package/{modules → lib/modules}/timepicker/timepicker.module.d.ts +0 -0
  149. package/package.json +10 -10
  150. package/skyux-datetime.d.ts +1 -1
  151. package/LICENSE +0 -21
  152. package/bundles/skyux-datetime-testing.umd.js.map +0 -1
  153. package/bundles/skyux-datetime.umd.js.map +0 -1
  154. package/esm2015/modules/date-pipe/date-format-utility.js +0 -48
  155. package/esm2015/modules/date-pipe/date-pipe.module.js +0 -21
  156. package/esm2015/modules/date-pipe/date.pipe.js +0 -64
  157. package/esm2015/modules/date-pipe/fuzzy-date.pipe.js +0 -46
  158. package/esm2015/modules/date-range-picker/date-range-picker.component.js +0 -460
  159. package/esm2015/modules/date-range-picker/date-range-picker.module.js +0 -47
  160. package/esm2015/modules/date-range-picker/date-range.service.js +0 -96
  161. package/esm2015/modules/date-range-picker/types/date-range-calculation.js +0 -2
  162. package/esm2015/modules/date-range-picker/types/date-range-calculator-config.js +0 -2
  163. package/esm2015/modules/date-range-picker/types/date-range-calculator-date-range-function.js +0 -2
  164. package/esm2015/modules/date-range-picker/types/date-range-calculator-id.js +0 -118
  165. package/esm2015/modules/date-range-picker/types/date-range-calculator-type.js +0 -23
  166. package/esm2015/modules/date-range-picker/types/date-range-calculator-validate-function.js +0 -2
  167. package/esm2015/modules/date-range-picker/types/date-range-calculator.js +0 -56
  168. package/esm2015/modules/date-range-picker/types/date-range-default-calculator-config.js +0 -2
  169. package/esm2015/modules/date-range-picker/types/date-range-default-calculator-configs.js +0 -147
  170. package/esm2015/modules/date-range-picker/types/date-range-relative-value.js +0 -252
  171. package/esm2015/modules/date-range-picker/types/date-range.js +0 -2
  172. package/esm2015/modules/datepicker/date-formatter.js +0 -38
  173. package/esm2015/modules/datepicker/datepicker-adapter.service.js +0 -33
  174. package/esm2015/modules/datepicker/datepicker-calendar-change.js +0 -2
  175. package/esm2015/modules/datepicker/datepicker-calendar-inner.component.js +0 -315
  176. package/esm2015/modules/datepicker/datepicker-calendar.component.js +0 -108
  177. package/esm2015/modules/datepicker/datepicker-config.service.js +0 -21
  178. package/esm2015/modules/datepicker/datepicker-custom-date.js +0 -2
  179. package/esm2015/modules/datepicker/datepicker-date.js +0 -2
  180. package/esm2015/modules/datepicker/datepicker-input-fuzzy.directive.js +0 -453
  181. package/esm2015/modules/datepicker/datepicker-input.directive.js +0 -432
  182. package/esm2015/modules/datepicker/datepicker.component.js +0 -331
  183. package/esm2015/modules/datepicker/datepicker.module.js +0 -95
  184. package/esm2015/modules/datepicker/datepicker.service.js +0 -21
  185. package/esm2015/modules/datepicker/daypicker-button.component.js +0 -25
  186. package/esm2015/modules/datepicker/daypicker-cell.component.js +0 -128
  187. package/esm2015/modules/datepicker/daypicker.component.js +0 -214
  188. package/esm2015/modules/datepicker/fuzzy-date.js +0 -2
  189. package/esm2015/modules/datepicker/fuzzy-date.service.js +0 -402
  190. package/esm2015/modules/datepicker/monthpicker.component.js +0 -83
  191. package/esm2015/modules/datepicker/yearpicker.component.js +0 -89
  192. package/esm2015/modules/shared/sky-datetime-resources.module.js +0 -131
  193. package/esm2015/modules/timepicker/timepicker.component.js +0 -365
  194. package/esm2015/modules/timepicker/timepicker.directive.js +0 -227
  195. package/esm2015/modules/timepicker/timepicker.interface.js +0 -2
  196. package/esm2015/modules/timepicker/timepicker.module.js +0 -46
  197. package/esm2015/public-api.js +0 -28
  198. package/public-api.d.ts +0 -25
@@ -0,0 +1,28 @@
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-id';
8
+ export * from './lib/modules/date-range-picker/types/date-range-calculator-type';
9
+ export * from './lib/modules/date-range-picker/date-range-picker.module';
10
+ export * from './lib/modules/date-range-picker/date-range.service';
11
+ export * from './lib/modules/datepicker/datepicker-config.service';
12
+ export * from './lib/modules/datepicker/datepicker.module';
13
+ export * from './lib/modules/datepicker/fuzzy-date';
14
+ export * from './lib/modules/datepicker/fuzzy-date.service';
15
+ export * from './lib/modules/datepicker/datepicker-calendar-change';
16
+ export * from './lib/modules/datepicker/datepicker-custom-date';
17
+ export * from './lib/modules/timepicker/timepicker.interface';
18
+ export * from './lib/modules/timepicker/timepicker.module';
19
+ // Components and directives must be exported to support Angular’s “partial” Ivy compiler.
20
+ // Obscure names are used to indicate types are not part of the public API.
21
+ export { SkyDatepickerCalendarComponent as λ1 } from './lib/modules/datepicker/datepicker-calendar.component';
22
+ export { SkyDatepickerComponent as λ2 } from './lib/modules/datepicker/datepicker.component';
23
+ export { SkyDatepickerInputDirective as λ3 } from './lib/modules/datepicker/datepicker-input.directive';
24
+ export { SkyFuzzyDatepickerInputDirective as λ4 } from './lib/modules/datepicker/datepicker-input-fuzzy.directive';
25
+ export { SkyDateRangePickerComponent as λ5 } from './lib/modules/date-range-picker/date-range-picker.component';
26
+ export { SkyTimepickerComponent as λ6 } from './lib/modules/timepicker/timepicker.component';
27
+ export { SkyTimepickerInputDirective as λ7 } from './lib/modules/timepicker/timepicker.directive';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,gEAAgE,CAAC;AAC/E,cAAc,kEAAkE,CAAC;AACjF,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-id';\nexport * from './lib/modules/date-range-picker/types/date-range-calculator-type';\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"]}
@@ -0,0 +1,48 @@
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
+ /* istanbul ignore next */
9
+ constructor() { }
10
+ static format(locale, value, pattern) {
11
+ let date;
12
+ if (isBlank(value) || value !== value) {
13
+ return undefined;
14
+ }
15
+ // Moment will interpret any non-date object as today's date. That would
16
+ // introduce a breaking change, so we check for it here. This could probably be removed
17
+ // in a future major version.
18
+ if (value instanceof Object && !(value instanceof Date)) {
19
+ handleInvalidDate(value);
20
+ }
21
+ // Use moment to avoid inconsistencies between browsers interpreting the value differently.
22
+ const momentDate = moment(value);
23
+ if (momentDate.isValid()) {
24
+ date = momentDate.toDate();
25
+ }
26
+ else {
27
+ handleInvalidDate(value);
28
+ }
29
+ return SkyIntlDateFormatter.format(date, locale, SkyDateFormatUtility._ALIASES[pattern] || pattern);
30
+ }
31
+ }
32
+ SkyDateFormatUtility._ALIASES = {
33
+ medium: 'yMMMdjms',
34
+ short: 'yMdjm',
35
+ fullDate: 'yMMMMEEEEd',
36
+ longDate: 'yMMMMd',
37
+ mediumDate: 'yMMMd',
38
+ shortDate: 'yMd',
39
+ mediumTime: 'jms',
40
+ shortTime: 'jm',
41
+ };
42
+ function isBlank(obj) {
43
+ return !obj;
44
+ }
45
+ function handleInvalidDate(value) {
46
+ throw new Error('Invalid value: ' + value);
47
+ }
48
+ //# sourceMappingURL=date-format-utility.js.map
@@ -0,0 +1 @@
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;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,OAAO,oBAAoB;IAY/B,0BAA0B;IAC1B,gBAAe,CAAC;IAET,MAAM,CAAC,MAAM,CAClB,MAAc,EACd,KAAU,EACV,OAAe;QAEf,IAAI,IAAU,CAAC;QAEf,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,EAAE;YACrC,OAAO,SAAS,CAAC;SAClB;QAED,wEAAwE;QACxE,uFAAuF;QACvF,6BAA6B;QAC7B,IAAI,KAAK,YAAY,MAAM,IAAI,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC,EAAE;YACvD,iBAAiB,CAAC,KAAK,CAAC,CAAC;SAC1B;QAED,2FAA2F;QAC3F,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE;YACxB,IAAI,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;SAC5B;aAAM;YACL,iBAAiB,CAAC,KAAK,CAAC,CAAC;SAC1B;QAED,OAAO,oBAAoB,CAAC,MAAM,CAChC,IAAI,EACJ,MAAM,EACN,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAClD,CAAC;IACJ,CAAC;;AA7Cc,6BAAQ,GAA8B;IACnD,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,IAAI;CAChB,CAAC;AAuCJ,SAAS,OAAO,CAAC,GAAQ;IACvB,OAAO,CAAC,GAAG,CAAC;AACd,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAU;IACnC,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["// This class is mostly ported from 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\n\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 /* istanbul ignore next */\n constructor() {}\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"]}
@@ -0,0 +1,21 @@
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
@@ -0,0 +1 @@
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;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,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';\n\nimport { NgModule } from '@angular/core';\nimport { SkyDatetimeResourcesModule } from '../shared/sky-datetime-resources.module';\n\nimport { SkyDatePipe } from './date.pipe';\n\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"]}
@@ -0,0 +1,65 @@
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
@@ -0,0 +1 @@
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;AAE/D,OAAO,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;;;AAE7D;;;;;;;;GAQG;AAKH,MAAM,OAAO,WAAW;IAetB,YAAoB,cAAoC;QAApC,mBAAc,GAAd,cAAc,CAAsB;QAdhD,kBAAa,GAAG,OAAO,CAAC;QAIxB,kBAAa,GAAG,OAAO,CAAC;QAQxB,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;QAG1C,IAAI,CAAC,cAAc;aAChB,aAAa,EAAE;aACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aACnC,SAAS,CAAC,CAAC,UAA4B,EAAE,EAAE;YAC1C,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC;YACvC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACP,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACI,SAAS,CAAC,KAAU,EAAE,MAAe,EAAE,MAAe;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAE5B,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,oBAAoB;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC;QAEjD,IAAI,CAAC,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';\n\nimport { SkyAppLocaleInfo, SkyAppLocaleProvider } from '@skyux/i18n';\n\nimport { Subject } from 'rxjs';\n\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"]}
@@ -0,0 +1,47 @@
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
@@ -0,0 +1 @@
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;AAIpD,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';\n\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"]}