@anglr/datetime 1.0.0-beta.20220217103425 → 2.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 (463) hide show
  1. package/changelog.md +12 -0
  2. package/date-fns/datetime-date-fns.d.ts +64 -0
  3. package/date-fns/datetime-date-fns.internal.d.ts +64 -0
  4. package/date-fns/package.json +7 -7
  5. package/date-fns/src/{date-fns.d.ts → index.d.ts} +4 -4
  6. package/date-fns/src/index.d.ts.map +1 -0
  7. package/date-fns/src/misc/tokens.d.ts +10 -10
  8. package/date-fns/src/services/dateFnsDateApi.service.d.ts +36 -33
  9. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  10. package/date-fns/src/services/dateFnsLocale.service.d.ts +10 -10
  11. package/date-fns/temp/datetime-date-fns.api.md +47 -0
  12. package/datetime.d.ts +1913 -5
  13. package/datetime.internal.d.ts +2090 -0
  14. package/es2015/date-fns/src/index.js +4 -0
  15. package/es2015/date-fns/src/index.js.map +1 -0
  16. package/es2015/date-fns/src/misc/tokens.js +20 -0
  17. package/es2015/date-fns/src/misc/tokens.js.map +1 -0
  18. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +438 -0
  19. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  20. package/es2015/date-fns/src/services/dateFnsLocale.service.js +2 -0
  21. package/es2015/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  22. package/es2015/karma.conf.js +57 -0
  23. package/es2015/karma.conf.js.map +1 -0
  24. package/{moment/src/moment.d.ts → es2015/moment/src/index.js} +3 -3
  25. package/es2015/moment/src/index.js.map +1 -0
  26. package/es2015/moment/src/misc/tokens.js +15 -0
  27. package/es2015/moment/src/misc/tokens.js.map +1 -0
  28. package/es2015/moment/src/services/momentDateApi.service.js +398 -0
  29. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -0
  30. package/{src/datetime.d.ts → es2015/src/index.js} +19 -19
  31. package/es2015/src/index.js.map +1 -0
  32. package/es2015/src/misc/constants.js +33 -0
  33. package/es2015/src/misc/constants.js.map +1 -0
  34. package/es2015/src/misc/datetime.interface.js +2 -0
  35. package/es2015/src/misc/datetime.interface.js.map +1 -0
  36. package/es2015/src/misc/tokens.js +19 -0
  37. package/es2015/src/misc/tokens.js.map +1 -0
  38. package/es2015/src/misc/validators.js +58 -0
  39. package/es2015/src/misc/validators.js.map +1 -0
  40. package/es2015/src/modules/datePipes.module.js +33 -0
  41. package/es2015/src/modules/datePipes.module.js.map +1 -0
  42. package/es2015/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  43. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  44. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  45. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  46. package/es2015/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  47. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  48. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  49. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  50. package/es2015/src/picker/components/picker/picker.component.animations.js +71 -0
  51. package/es2015/src/picker/components/picker/picker.component.animations.js.map +1 -0
  52. package/es2015/src/picker/components/picker/picker.component.js +241 -0
  53. package/es2015/src/picker/components/picker/picker.component.js.map +1 -0
  54. package/es2015/src/picker/components/pickerBase.component.js +243 -0
  55. package/es2015/src/picker/components/pickerBase.component.js.map +1 -0
  56. package/es2015/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  57. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  58. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  59. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  60. package/es2015/src/picker/interfaces.js +5 -0
  61. package/es2015/src/picker/interfaces.js.map +1 -0
  62. package/es2015/src/picker/misc/datetimePicker.interface.js +2 -0
  63. package/es2015/src/picker/misc/datetimePicker.interface.js.map +1 -0
  64. package/es2015/src/picker/misc/tokens.js +6 -0
  65. package/es2015/src/picker/misc/tokens.js.map +1 -0
  66. package/es2015/src/picker/modules/picker.module.js +46 -0
  67. package/es2015/src/picker/modules/picker.module.js.map +1 -0
  68. package/es2015/src/picker/types.js +8 -0
  69. package/es2015/src/picker/types.js.map +1 -0
  70. package/es2015/src/pipes/asRequiredType.js +22 -0
  71. package/es2015/src/pipes/asRequiredType.js.map +1 -0
  72. package/es2015/src/pipes/dateConvert.pipe.js +35 -0
  73. package/es2015/src/pipes/dateConvert.pipe.js.map +1 -0
  74. package/es2015/src/pipes/dateFormat.pipe.js +45 -0
  75. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -0
  76. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +421 -0
  77. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  78. package/es2015/src/selector/components/selector/selector.component.animations.js +15 -0
  79. package/es2015/src/selector/components/selector/selector.component.animations.js.map +1 -0
  80. package/es2015/src/selector/components/selector/selector.component.js +344 -0
  81. package/es2015/src/selector/components/selector/selector.component.js.map +1 -0
  82. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +317 -0
  83. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  84. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  85. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  86. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  87. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  88. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  89. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  90. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +119 -0
  91. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  92. package/es2015/src/selector/interfaces.js +2 -0
  93. package/es2015/src/selector/interfaces.js.map +1 -0
  94. package/es2015/src/selector/misc/datetimeSelector.interface.js +2 -0
  95. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  96. package/es2015/src/selector/misc/tokens.js +6 -0
  97. package/es2015/src/selector/misc/tokens.js.map +1 -0
  98. package/es2015/src/selector/modules/basicSelector.module.js +20 -0
  99. package/es2015/src/selector/modules/basicSelector.module.js.map +1 -0
  100. package/es2015/src/selector/modules/selector.module.js +60 -0
  101. package/es2015/src/selector/modules/selector.module.js.map +1 -0
  102. package/es2015/src/selector/types.js +10 -0
  103. package/es2015/src/selector/types.js.map +1 -0
  104. package/es2015/src/services/dateApi.interface.js +2 -0
  105. package/es2015/src/services/dateApi.interface.js.map +1 -0
  106. package/es2015/src/services/datePositionParser.interface.js +2 -0
  107. package/es2015/src/services/datePositionParser.interface.js.map +1 -0
  108. package/es2015/src/services/datePositionParser.service.js +227 -0
  109. package/es2015/src/services/datePositionParser.service.js.map +1 -0
  110. package/es2015/src/services/dateTimeRelativeParser.service.js +66 -0
  111. package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -0
  112. package/es2015/src/services/dateValueProvider.service.js +58 -0
  113. package/es2015/src/services/dateValueProvider.service.js.map +1 -0
  114. package/es2015/src/services/formatProvider.interface.js +2 -0
  115. package/es2015/src/services/formatProvider.interface.js.map +1 -0
  116. package/es2015/src/services/index.js +4 -0
  117. package/es2015/src/services/index.js.map +1 -0
  118. package/es2020/date-fns/src/index.js +4 -0
  119. package/es2020/date-fns/src/index.js.map +1 -0
  120. package/es2020/date-fns/src/misc/tokens.js +20 -0
  121. package/es2020/date-fns/src/misc/tokens.js.map +1 -0
  122. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +437 -0
  123. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  124. package/es2020/date-fns/src/services/dateFnsLocale.service.js +2 -0
  125. package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  126. package/es2020/karma.conf.js +57 -0
  127. package/es2020/karma.conf.js.map +1 -0
  128. package/es2020/moment/src/index.js +3 -0
  129. package/es2020/moment/src/index.js.map +1 -0
  130. package/es2020/moment/src/misc/tokens.js +15 -0
  131. package/es2020/moment/src/misc/tokens.js.map +1 -0
  132. package/es2020/moment/src/services/momentDateApi.service.js +398 -0
  133. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -0
  134. package/es2020/src/index.js +19 -0
  135. package/es2020/src/index.js.map +1 -0
  136. package/es2020/src/misc/constants.js +33 -0
  137. package/es2020/src/misc/constants.js.map +1 -0
  138. package/es2020/src/misc/datetime.interface.js +2 -0
  139. package/es2020/src/misc/datetime.interface.js.map +1 -0
  140. package/es2020/src/misc/tokens.js +19 -0
  141. package/es2020/src/misc/tokens.js.map +1 -0
  142. package/es2020/src/misc/validators.js +58 -0
  143. package/es2020/src/misc/validators.js.map +1 -0
  144. package/es2020/src/modules/datePipes.module.js +33 -0
  145. package/es2020/src/modules/datePipes.module.js.map +1 -0
  146. package/es2020/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  147. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  148. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  149. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  150. package/es2020/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  151. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  152. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  153. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  154. package/es2020/src/picker/components/picker/picker.component.animations.js +71 -0
  155. package/es2020/src/picker/components/picker/picker.component.animations.js.map +1 -0
  156. package/es2020/src/picker/components/picker/picker.component.js +236 -0
  157. package/es2020/src/picker/components/picker/picker.component.js.map +1 -0
  158. package/es2020/src/picker/components/pickerBase.component.js +243 -0
  159. package/es2020/src/picker/components/pickerBase.component.js.map +1 -0
  160. package/es2020/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  161. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  162. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  163. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  164. package/es2020/src/picker/interfaces.js +5 -0
  165. package/es2020/src/picker/interfaces.js.map +1 -0
  166. package/es2020/src/picker/misc/datetimePicker.interface.js +2 -0
  167. package/es2020/src/picker/misc/datetimePicker.interface.js.map +1 -0
  168. package/es2020/src/picker/misc/tokens.js +6 -0
  169. package/es2020/src/picker/misc/tokens.js.map +1 -0
  170. package/es2020/src/picker/modules/picker.module.js +46 -0
  171. package/es2020/src/picker/modules/picker.module.js.map +1 -0
  172. package/es2020/src/picker/types.js +8 -0
  173. package/es2020/src/picker/types.js.map +1 -0
  174. package/es2020/src/pipes/asRequiredType.js +22 -0
  175. package/es2020/src/pipes/asRequiredType.js.map +1 -0
  176. package/es2020/src/pipes/dateConvert.pipe.js +35 -0
  177. package/es2020/src/pipes/dateConvert.pipe.js.map +1 -0
  178. package/es2020/src/pipes/dateFormat.pipe.js +45 -0
  179. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -0
  180. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js +417 -0
  181. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  182. package/es2020/src/selector/components/selector/selector.component.animations.js +15 -0
  183. package/es2020/src/selector/components/selector/selector.component.animations.js.map +1 -0
  184. package/es2020/src/selector/components/selector/selector.component.js +334 -0
  185. package/es2020/src/selector/components/selector/selector.component.js.map +1 -0
  186. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +314 -0
  187. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  188. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  189. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  190. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  191. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  192. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  193. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  194. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +118 -0
  195. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  196. package/es2020/src/selector/interfaces.js +2 -0
  197. package/es2020/src/selector/interfaces.js.map +1 -0
  198. package/es2020/src/selector/misc/datetimeSelector.interface.js +2 -0
  199. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  200. package/es2020/src/selector/misc/tokens.js +6 -0
  201. package/es2020/src/selector/misc/tokens.js.map +1 -0
  202. package/es2020/src/selector/modules/basicSelector.module.js +20 -0
  203. package/es2020/src/selector/modules/basicSelector.module.js.map +1 -0
  204. package/es2020/src/selector/modules/selector.module.js +60 -0
  205. package/es2020/src/selector/modules/selector.module.js.map +1 -0
  206. package/es2020/src/selector/types.js +10 -0
  207. package/es2020/src/selector/types.js.map +1 -0
  208. package/es2020/src/services/dateApi.interface.js +2 -0
  209. package/es2020/src/services/dateApi.interface.js.map +1 -0
  210. package/es2020/src/services/datePositionParser.interface.js +2 -0
  211. package/es2020/src/services/datePositionParser.interface.js.map +1 -0
  212. package/es2020/src/services/datePositionParser.service.js +227 -0
  213. package/es2020/src/services/datePositionParser.service.js.map +1 -0
  214. package/es2020/src/services/dateTimeRelativeParser.service.js +65 -0
  215. package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -0
  216. package/es2020/src/services/dateValueProvider.service.js +58 -0
  217. package/es2020/src/services/dateValueProvider.service.js.map +1 -0
  218. package/es2020/src/services/formatProvider.interface.js +2 -0
  219. package/es2020/src/services/formatProvider.interface.js.map +1 -0
  220. package/es2020/src/services/index.js +4 -0
  221. package/es2020/src/services/index.js.map +1 -0
  222. package/karma.conf.d.ts +2 -0
  223. package/karma.conf.d.ts.map +1 -0
  224. package/moment/datetime-moment.d.ts +47 -0
  225. package/moment/datetime-moment.internal.d.ts +47 -0
  226. package/moment/package.json +7 -7
  227. package/moment/src/index.d.ts +3 -0
  228. package/moment/src/index.d.ts.map +1 -0
  229. package/moment/src/misc/tokens.d.ts +5 -5
  230. package/moment/src/services/momentDateApi.service.d.ts +35 -32
  231. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  232. package/moment/temp/datetime-moment.api.md +36 -0
  233. package/package.json +91 -48
  234. package/src/index.d.ts +19 -0
  235. package/src/index.d.ts.map +1 -0
  236. package/src/misc/constants.d.ts +32 -32
  237. package/src/misc/datetime.interface.d.ts +34 -34
  238. package/src/misc/tokens.d.ts +10 -10
  239. package/src/misc/validators.d.ts +25 -25
  240. package/src/modules/datePipes.module.d.ts +12 -5
  241. package/src/modules/datePipes.module.d.ts.map +1 -1
  242. package/src/picker/components/dayPicker/dayPicker.component.d.ts +68 -65
  243. package/src/picker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  244. package/src/picker/components/dayPicker/dayPicker.component.html +7 -7
  245. package/src/picker/components/dayPicker/dayPicker.interfaces.d.ts +10 -10
  246. package/src/picker/components/monthPicker/monthPicker.component.d.ts +52 -49
  247. package/src/picker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  248. package/src/picker/components/monthPicker/monthPicker.component.html +6 -6
  249. package/src/picker/components/monthPicker/monthPicker.interfaces.d.ts +6 -6
  250. package/src/picker/components/picker/picker.component.animations.d.ts +4 -4
  251. package/src/picker/components/picker/picker.component.d.ts +104 -101
  252. package/src/picker/components/picker/picker.component.d.ts.map +1 -1
  253. package/src/picker/components/pickerBase.component.d.ts +169 -166
  254. package/src/picker/components/pickerBase.component.d.ts.map +1 -1
  255. package/src/picker/components/yearPicker/yearPicker.component.d.ts +57 -54
  256. package/src/picker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  257. package/src/picker/components/yearPicker/yearPicker.component.html +6 -6
  258. package/src/picker/components/yearPicker/yearPicker.interfaces.d.ts +6 -6
  259. package/src/picker/interfaces.d.ts +4 -4
  260. package/src/picker/misc/datetimePicker.interface.d.ts +188 -188
  261. package/src/picker/misc/tokens.d.ts +6 -6
  262. package/src/picker/modules/picker.module.d.ts +16 -5
  263. package/src/picker/modules/picker.module.d.ts.map +1 -1
  264. package/src/picker/types.d.ts +7 -7
  265. package/src/pipes/asRequiredType.d.ts +21 -0
  266. package/src/pipes/asRequiredType.d.ts.map +1 -0
  267. package/src/pipes/dateConvert.pipe.d.ts +18 -15
  268. package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
  269. package/src/pipes/dateFormat.pipe.d.ts +20 -17
  270. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  271. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts +187 -184
  272. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
  273. package/src/selector/components/selector/selector.component.animations.d.ts +4 -4
  274. package/src/selector/components/selector/selector.component.d.ts +155 -152
  275. package/src/selector/components/selector/selector.component.d.ts.map +1 -1
  276. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +170 -167
  277. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
  278. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +22 -19
  279. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  280. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +22 -19
  281. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  282. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts +21 -18
  283. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +1 -1
  284. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +53 -50
  285. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  286. package/src/selector/interfaces.d.ts +1 -1
  287. package/src/selector/misc/datetimeSelector.interface.d.ts +82 -82
  288. package/src/selector/misc/tokens.d.ts +6 -6
  289. package/src/selector/modules/basicSelector.module.d.ts +10 -5
  290. package/src/selector/modules/basicSelector.module.d.ts.map +1 -1
  291. package/src/selector/modules/selector.module.d.ts +18 -5
  292. package/src/selector/modules/selector.module.d.ts.map +1 -1
  293. package/src/selector/types.d.ts +9 -9
  294. package/src/services/dateApi.interface.d.ts +275 -275
  295. package/src/services/datePositionParser.interface.d.ts +40 -40
  296. package/src/services/datePositionParser.service.d.ts +60 -57
  297. package/src/services/datePositionParser.service.d.ts.map +1 -1
  298. package/src/services/dateTimeRelativeParser.service.d.ts +21 -18
  299. package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
  300. package/src/services/dateValueProvider.service.d.ts +18 -15
  301. package/src/services/dateValueProvider.service.d.ts.map +1 -1
  302. package/src/services/formatProvider.interface.d.ts +17 -17
  303. package/src/services/index.d.ts +3 -3
  304. package/tsconfig.karma.json +5 -6
  305. package/version.bak +1 -1
  306. package/appveyor.yml +0 -70
  307. package/date-fns/dist/es2015/date-fns/index.js +0 -10
  308. package/date-fns/dist/es2015/date-fns/public_api.js +0 -7
  309. package/date-fns/dist/es2015/date-fns/src/date-fns.js +0 -9
  310. package/date-fns/dist/es2015/date-fns/src/misc/tokens.js +0 -32
  311. package/date-fns/dist/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -512
  312. package/date-fns/dist/es2015/date-fns/src/services/dateFnsLocale.service.js +0 -18
  313. package/date-fns/dist/es5/date-fns/index.js +0 -10
  314. package/date-fns/dist/es5/date-fns/public_api.js +0 -7
  315. package/date-fns/dist/es5/date-fns/src/date-fns.js +0 -9
  316. package/date-fns/dist/es5/date-fns/src/misc/tokens.js +0 -32
  317. package/date-fns/dist/es5/date-fns/src/services/dateFnsDateApi.service.js +0 -902
  318. package/date-fns/dist/es5/date-fns/src/services/dateFnsLocale.service.js +0 -18
  319. package/date-fns/index.d.ts +0 -5
  320. package/date-fns/index.d.ts.map +0 -1
  321. package/date-fns/index.metadata.json +0 -1
  322. package/date-fns/public_api.d.ts +0 -2
  323. package/date-fns/public_api.d.ts.map +0 -1
  324. package/date-fns/src/date-fns.d.ts.map +0 -1
  325. package/date-fns/src/services/dateFnsDateApi.service.ngfactory.d.ts.map +0 -1
  326. package/datetime.d.ts.map +0 -1
  327. package/datetime.metadata.json +0 -1
  328. package/dist/es2015/datetime.js +0 -10
  329. package/dist/es2015/public_api.js +0 -7
  330. package/dist/es2015/src/datetime.js +0 -24
  331. package/dist/es2015/src/misc/constants.js +0 -46
  332. package/dist/es2015/src/misc/datetime.interface.js +0 -52
  333. package/dist/es2015/src/misc/tokens.js +0 -29
  334. package/dist/es2015/src/misc/validators.js +0 -80
  335. package/dist/es2015/src/modules/datePipes.module.js +0 -26
  336. package/dist/es2015/src/picker/components/dayPicker/dayPicker.component.js +0 -215
  337. package/dist/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  338. package/dist/es2015/src/picker/components/monthPicker/monthPicker.component.js +0 -138
  339. package/dist/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  340. package/dist/es2015/src/picker/components/picker/picker.component.animations.js +0 -77
  341. package/dist/es2015/src/picker/components/picker/picker.component.js +0 -386
  342. package/dist/es2015/src/picker/components/pickerBase.component.js +0 -406
  343. package/dist/es2015/src/picker/components/yearPicker/yearPicker.component.js +0 -158
  344. package/dist/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  345. package/dist/es2015/src/picker/interfaces.js +0 -10
  346. package/dist/es2015/src/picker/misc/datetimePicker.interface.js +0 -245
  347. package/dist/es2015/src/picker/misc/tokens.js +0 -12
  348. package/dist/es2015/src/picker/modules/picker.module.js +0 -35
  349. package/dist/es2015/src/picker/types.js +0 -13
  350. package/dist/es2015/src/pipes/dateConvert.pipe.js +0 -50
  351. package/dist/es2015/src/pipes/dateFormat.pipe.js +0 -64
  352. package/dist/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +0 -588
  353. package/dist/es2015/src/selector/components/selector/selector.component.animations.js +0 -21
  354. package/dist/es2015/src/selector/components/selector/selector.component.js +0 -514
  355. package/dist/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -456
  356. package/dist/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -73
  357. package/dist/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -73
  358. package/dist/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -70
  359. package/dist/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -171
  360. package/dist/es2015/src/selector/interfaces.js +0 -7
  361. package/dist/es2015/src/selector/misc/datetimeSelector.interface.js +0 -106
  362. package/dist/es2015/src/selector/misc/tokens.js +0 -12
  363. package/dist/es2015/src/selector/modules/basicSelector.module.js +0 -20
  364. package/dist/es2015/src/selector/modules/selector.module.js +0 -45
  365. package/dist/es2015/src/selector/types.js +0 -15
  366. package/dist/es2015/src/services/dateApi.interface.js +0 -316
  367. package/dist/es2015/src/services/datePositionParser.interface.js +0 -56
  368. package/dist/es2015/src/services/datePositionParser.service.js +0 -297
  369. package/dist/es2015/src/services/dateTimeRelativeParser.service.js +0 -97
  370. package/dist/es2015/src/services/dateValueProvider.service.js +0 -79
  371. package/dist/es2015/src/services/formatProvider.interface.js +0 -28
  372. package/dist/es2015/src/services/index.js +0 -9
  373. package/dist/es5/datetime.js +0 -10
  374. package/dist/es5/public_api.js +0 -7
  375. package/dist/es5/src/datetime.js +0 -24
  376. package/dist/es5/src/misc/constants.js +0 -46
  377. package/dist/es5/src/misc/datetime.interface.js +0 -52
  378. package/dist/es5/src/misc/tokens.js +0 -29
  379. package/dist/es5/src/misc/validators.js +0 -124
  380. package/dist/es5/src/modules/datePipes.module.js +0 -30
  381. package/dist/es5/src/picker/components/dayPicker/dayPicker.component.js +0 -323
  382. package/dist/es5/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  383. package/dist/es5/src/picker/components/monthPicker/monthPicker.component.js +0 -233
  384. package/dist/es5/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  385. package/dist/es5/src/picker/components/picker/picker.component.animations.js +0 -77
  386. package/dist/es5/src/picker/components/picker/picker.component.js +0 -460
  387. package/dist/es5/src/picker/components/pickerBase.component.js +0 -561
  388. package/dist/es5/src/picker/components/yearPicker/yearPicker.component.js +0 -253
  389. package/dist/es5/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  390. package/dist/es5/src/picker/interfaces.js +0 -10
  391. package/dist/es5/src/picker/misc/datetimePicker.interface.js +0 -245
  392. package/dist/es5/src/picker/misc/tokens.js +0 -12
  393. package/dist/es5/src/picker/modules/picker.module.js +0 -39
  394. package/dist/es5/src/picker/types.js +0 -13
  395. package/dist/es5/src/pipes/dateConvert.pipe.js +0 -63
  396. package/dist/es5/src/pipes/dateFormat.pipe.js +0 -79
  397. package/dist/es5/src/selector/components/inputDateTime/inputDateTime.component.js +0 -808
  398. package/dist/es5/src/selector/components/selector/selector.component.animations.js +0 -21
  399. package/dist/es5/src/selector/components/selector/selector.component.js +0 -653
  400. package/dist/es5/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -656
  401. package/dist/es5/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -84
  402. package/dist/es5/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -84
  403. package/dist/es5/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -82
  404. package/dist/es5/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -230
  405. package/dist/es5/src/selector/interfaces.js +0 -7
  406. package/dist/es5/src/selector/misc/datetimeSelector.interface.js +0 -106
  407. package/dist/es5/src/selector/misc/tokens.js +0 -12
  408. package/dist/es5/src/selector/modules/basicSelector.module.js +0 -24
  409. package/dist/es5/src/selector/modules/selector.module.js +0 -49
  410. package/dist/es5/src/selector/types.js +0 -15
  411. package/dist/es5/src/services/dateApi.interface.js +0 -316
  412. package/dist/es5/src/services/datePositionParser.interface.js +0 -56
  413. package/dist/es5/src/services/datePositionParser.service.js +0 -366
  414. package/dist/es5/src/services/dateTimeRelativeParser.service.js +0 -108
  415. package/dist/es5/src/services/dateValueProvider.service.js +0 -92
  416. package/dist/es5/src/services/formatProvider.interface.js +0 -28
  417. package/dist/es5/src/services/index.js +0 -9
  418. package/moment/dist/es2015/moment/index.js +0 -10
  419. package/moment/dist/es2015/moment/public_api.js +0 -7
  420. package/moment/dist/es2015/moment/src/misc/tokens.js +0 -26
  421. package/moment/dist/es2015/moment/src/moment.js +0 -8
  422. package/moment/dist/es2015/moment/src/services/momentDateApi.service.js +0 -466
  423. package/moment/dist/es5/moment/index.js +0 -10
  424. package/moment/dist/es5/moment/public_api.js +0 -7
  425. package/moment/dist/es5/moment/src/misc/tokens.js +0 -26
  426. package/moment/dist/es5/moment/src/moment.js +0 -8
  427. package/moment/dist/es5/moment/src/services/momentDateApi.service.js +0 -858
  428. package/moment/index.d.ts +0 -5
  429. package/moment/index.d.ts.map +0 -1
  430. package/moment/index.metadata.json +0 -1
  431. package/moment/public_api.d.ts +0 -2
  432. package/moment/public_api.d.ts.map +0 -1
  433. package/moment/src/moment.d.ts.map +0 -1
  434. package/moment/src/services/momentDateApi.service.ngfactory.d.ts.map +0 -1
  435. package/public_api.d.ts +0 -2
  436. package/public_api.d.ts.map +0 -1
  437. package/src/datetime.d.ts.map +0 -1
  438. package/src/modules/datePipes.module.ngfactory.d.ts.map +0 -1
  439. package/src/picker/components/dayPicker/dayPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  440. package/src/picker/components/dayPicker/dayPicker.component.ngfactory.d.ts.map +0 -1
  441. package/src/picker/components/monthPicker/monthPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  442. package/src/picker/components/monthPicker/monthPicker.component.ngfactory.d.ts.map +0 -1
  443. package/src/picker/components/picker/picker.component.ngfactory.d.ts.map +0 -1
  444. package/src/picker/components/yearPicker/yearPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  445. package/src/picker/components/yearPicker/yearPicker.component.ngfactory.d.ts.map +0 -1
  446. package/src/picker/modules/picker.module.ngfactory.d.ts.map +0 -1
  447. package/src/pipes/dateConvert.pipe.ngfactory.d.ts.map +0 -1
  448. package/src/pipes/dateFormat.pipe.ngfactory.d.ts.map +0 -1
  449. package/src/selector/components/inputDateTime/inputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  450. package/src/selector/components/inputDateTime/inputDateTime.component.ngfactory.d.ts.map +0 -1
  451. package/src/selector/components/selector/selector.component.css.shim.ngstyle.d.ts.map +0 -1
  452. package/src/selector/components/selector/selector.component.ngfactory.d.ts.map +0 -1
  453. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  454. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.ngfactory.d.ts.map +0 -1
  455. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ngfactory.d.ts.map +0 -1
  456. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ngfactory.d.ts.map +0 -1
  457. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.ngfactory.d.ts.map +0 -1
  458. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ngfactory.d.ts.map +0 -1
  459. package/src/selector/modules/basicSelector.module.ngfactory.d.ts.map +0 -1
  460. package/src/selector/modules/selector.module.ngfactory.d.ts.map +0 -1
  461. package/src/services/datePositionParser.service.ngfactory.d.ts.map +0 -1
  462. package/src/services/dateTimeRelativeParser.service.ngfactory.d.ts.map +0 -1
  463. package/src/services/dateValueProvider.service.ngfactory.d.ts.map +0 -1
@@ -0,0 +1,4 @@
1
+ export * from './services/dateFnsDateApi.service';
2
+ export * from './services/dateFnsLocale.service';
3
+ export * from './misc/tokens';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../date-fns/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC","sourcesContent":["export * from './services/dateFnsDateApi.service';\nexport * from './services/dateFnsLocale.service';\nexport * from './misc/tokens';"]}
@@ -0,0 +1,20 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { FORMAT_PROVIDER } from '@anglr/datetime';
3
+ /**
4
+ * Injection token used for obtaining Date fns locale service
5
+ */
6
+ export const DATE_FNS_LOCALE = new InjectionToken('DATE_FNS_LOCALE');
7
+ /**
8
+ * Injection token used for obtaining date-fns FormatProvider implementation
9
+ */
10
+ export const DATEFNS_FORMAT_PROVIDER = {
11
+ provide: FORMAT_PROVIDER,
12
+ useFactory: () => {
13
+ return {
14
+ date: 'P',
15
+ dateTime: 'Pp',
16
+ time: 'p'
17
+ };
18
+ }
19
+ };
20
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../date-fns/src/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAiB,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAIhE;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkC,IAAI,cAAc,CAAgB,iBAAiB,CAAC,CAAC;AAEnH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GACpC;IACI,OAAO,EAAE,eAAe;IACxB,UAAU,EAAE,GAAG,EAAE;QAEb,OAAuB;YACnB,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,GAAG;SACZ,CAAC;IACN,CAAC;CACJ,CAAC","sourcesContent":["import {FactoryProvider, InjectionToken} from '@angular/core';\nimport {FormatProvider, FORMAT_PROVIDER} from '@anglr/datetime';\n\nimport {DateFnsLocale} from '../services/dateFnsLocale.service';\n\n/**\n * Injection token used for obtaining Date fns locale service\n */\nexport const DATE_FNS_LOCALE: InjectionToken<DateFnsLocale> = new InjectionToken<DateFnsLocale>('DATE_FNS_LOCALE');\n\n/**\n * Injection token used for obtaining date-fns FormatProvider implementation\n */\nexport const DATEFNS_FORMAT_PROVIDER: FactoryProvider =\n{\n provide: FORMAT_PROVIDER,\n useFactory: () =>\n {\n return <FormatProvider>{\n date: 'P',\n dateTime: 'Pp',\n time: 'p'\n };\n }\n};"]}
@@ -0,0 +1,438 @@
1
+ import { Inject, Injectable } from '@angular/core';
2
+ import { DateTimeRelativeParser } from '@anglr/datetime';
3
+ import { isBlank, isPresent, isString } from '@jscrpt/common';
4
+ import { toDate, getDate, setDate, isAfter, isBefore, differenceInCalendarDays, format, startOfMonth, endOfMonth, startOfWeek, endOfWeek, startOfDay, endOfDay, addMonths, addWeeks, addDays, subMonths, subWeeks, subDays, getDaysInMonth, isSameDay, isSameWeek, isSameMonth, isValid, parse, parseISO, addYears, subYears, startOfYear, endOfYear, isWeekend, setYear, getYear, isSameYear, startOfDecade, endOfDecade, setMonth, getMonth, setISODay, getISODay } from 'date-fns';
5
+ import { DATE_FNS_LOCALE } from '../misc/tokens';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@anglr/datetime";
8
+ /**
9
+ * Instance of object wrapping TDate, allowing manipulation with it
10
+ */
11
+ class DateFnsDateApiObject {
12
+ //######################### constructor #########################
13
+ constructor(value, _localeSvc, format) {
14
+ this._localeSvc = _localeSvc;
15
+ if (isString(value)) {
16
+ //ISO string
17
+ if (/^\d+-\d+-\d+(T\d+:\d+:\d+)?/.test(value)) {
18
+ this._value = this._originalValue = parseISO(value);
19
+ }
20
+ else {
21
+ if (isBlank(format)) {
22
+ throw new Error('date-fns requires format parameter to be set for parsing non ISO string date!');
23
+ }
24
+ this._value = this._originalValue = parse(value, format, new Date(1970, 0));
25
+ }
26
+ }
27
+ else {
28
+ this._value = this._originalValue = toDate(value);
29
+ }
30
+ }
31
+ //######################### public properties - implementation of DateApiObject #########################
32
+ /**
33
+ * Original value that is not changed unless 'updateOriginal' is called
34
+ */
35
+ get originalValue() {
36
+ return this._originalValue;
37
+ }
38
+ /**
39
+ * Instance of date
40
+ */
41
+ get value() {
42
+ return this._value;
43
+ }
44
+ //######################### public methods - implementation of DateApiObject #########################
45
+ /**
46
+ * Gets indication whether provided instance of date is valid
47
+ */
48
+ isValid() {
49
+ return isValid(this._value);
50
+ }
51
+ /**
52
+ * Gets indication whether provided instance of date is weekend day
53
+ */
54
+ isWeekend() {
55
+ return isWeekend(this._value);
56
+ }
57
+ /**
58
+ * Formats date value
59
+ * @param formatString - Format token used for creating formatted string
60
+ */
61
+ format(formatString) {
62
+ return format(this._value, formatString, { locale: this._localeSvc.locale });
63
+ }
64
+ /**
65
+ * Updates value to start date and time of current decade
66
+ * @returns Itself for fluent API
67
+ */
68
+ startOfDecade() {
69
+ this._value = startOfDecade(this._value);
70
+ return this;
71
+ }
72
+ /**
73
+ * Updates value to end date and time of current decade
74
+ * @returns Itself for fluent API
75
+ */
76
+ endOfDecade() {
77
+ this._value = endOfDecade(this._value);
78
+ return this;
79
+ }
80
+ /**
81
+ * Updates value to start date and time of current year
82
+ * @returns Itself for fluent API
83
+ */
84
+ startOfYear() {
85
+ this._value = startOfYear(this._value);
86
+ return this;
87
+ }
88
+ /**
89
+ * Updates value to end date and time of current year
90
+ * @returns Itself for fluent API
91
+ */
92
+ endOfYear() {
93
+ this._value = endOfYear(this._value);
94
+ return this;
95
+ }
96
+ /**
97
+ * Add years, if count not specified adds 1 year
98
+ * @param count - Number of years count
99
+ * @returns Itself for fluent API
100
+ */
101
+ addYears(count) {
102
+ this._value = addYears(this._value, count !== null && count !== void 0 ? count : 1);
103
+ return this;
104
+ }
105
+ /**
106
+ * Subtract years, if count not specified subtract 1 year
107
+ * @param count - Number of years count
108
+ * @returns Itself for fluent API
109
+ */
110
+ subtractYears(count) {
111
+ this._value = subYears(this._value, count !== null && count !== void 0 ? count : 1);
112
+ return this;
113
+ }
114
+ /**
115
+ * Updates value to start date and time of current month
116
+ * @returns Itself for fluent API
117
+ */
118
+ startOfMonth() {
119
+ this._value = startOfMonth(this._value);
120
+ return this;
121
+ }
122
+ /**
123
+ * Updates value to end date and time of current month
124
+ * @returns Itself for fluent API
125
+ */
126
+ endOfMonth() {
127
+ this._value = endOfMonth(this._value);
128
+ return this;
129
+ }
130
+ /**
131
+ * Add months, if count not specified adds 1 month
132
+ * @param count - Number of months count
133
+ * @returns Itself for fluent API
134
+ */
135
+ addMonths(count) {
136
+ this._value = addMonths(this._value, count !== null && count !== void 0 ? count : 1);
137
+ return this;
138
+ }
139
+ /**
140
+ * Subtract months, if count not specified subtract 1 month
141
+ * @param count - Number of months count
142
+ * @returns Itself for fluent API
143
+ */
144
+ subtractMonths(count) {
145
+ this._value = subMonths(this._value, count !== null && count !== void 0 ? count : 1);
146
+ return this;
147
+ }
148
+ /**
149
+ * Updates value to start date and time of current week
150
+ * @returns Itself for fluent API
151
+ */
152
+ startOfWeek() {
153
+ this._value = startOfWeek(this._value, { locale: this._localeSvc.locale });
154
+ return this;
155
+ }
156
+ /**
157
+ * Updates value to end date and time of current week
158
+ * @returns Itself for fluent API
159
+ */
160
+ endOfWeek() {
161
+ this._value = endOfWeek(this._value, { locale: this._localeSvc.locale });
162
+ return this;
163
+ }
164
+ /**
165
+ * Add weeks, if count not specified adds 1 week
166
+ * @param count - Number of weeks count
167
+ * @returns Itself for fluent API
168
+ */
169
+ addWeeks(count) {
170
+ this._value = addWeeks(this._value, count !== null && count !== void 0 ? count : 1);
171
+ return this;
172
+ }
173
+ /**
174
+ * Subtract weeks, if count not specified subtract 1 week
175
+ * @param count - Number of weeks count
176
+ * @returns Itself for fluent API
177
+ */
178
+ subtractWeeks(count) {
179
+ this._value = subWeeks(this._value, count !== null && count !== void 0 ? count : 1);
180
+ return this;
181
+ }
182
+ /**
183
+ * Updates value to start date and time of current day
184
+ * @returns Itself for fluent API
185
+ */
186
+ startOfDay() {
187
+ this._value = startOfDay(this._value);
188
+ return this;
189
+ }
190
+ /**
191
+ * Updates value to end date and time of current day
192
+ * @returns Itself for fluent API
193
+ */
194
+ endOfDay() {
195
+ this._value = endOfDay(this._value);
196
+ return this;
197
+ }
198
+ /**
199
+ * Add days, if count not specified adds 1 day
200
+ * @param count - Number of days count
201
+ * @returns Itself for fluent API
202
+ */
203
+ addDays(count) {
204
+ this._value = addDays(this._value, count !== null && count !== void 0 ? count : 1);
205
+ return this;
206
+ }
207
+ /**
208
+ * Subtract days, if count not specified subtract 1 day
209
+ * @param count - Number of days count
210
+ * @returns Itself for fluent API
211
+ */
212
+ subtractDays(count) {
213
+ this._value = subDays(this._value, count !== null && count !== void 0 ? count : 1);
214
+ return this;
215
+ }
216
+ /**
217
+ * Gets number of days in month
218
+ */
219
+ daysInMonth() {
220
+ return getDaysInMonth(this._value);
221
+ }
222
+ /**
223
+ * Gets or sets year
224
+ * @param year - If specified, sets year
225
+ */
226
+ year(year) {
227
+ if (isPresent(year)) {
228
+ this._value = setYear(this._value, year);
229
+ return this;
230
+ }
231
+ return getYear(this._value);
232
+ }
233
+ /**
234
+ * Gets or sets month
235
+ * @param month - If specified, sets month
236
+ */
237
+ month(month) {
238
+ if (isPresent(month)) {
239
+ this._value = setMonth(this._value, month);
240
+ return this;
241
+ }
242
+ return getMonth(this._value);
243
+ }
244
+ /**
245
+ * Gets or sets day of month one based
246
+ * @param day - If specified, sets day of month
247
+ */
248
+ dayOfMonth(day) {
249
+ if (isPresent(day)) {
250
+ this._value = setDate(this._value, day);
251
+ return this;
252
+ }
253
+ return getDate(this._value);
254
+ }
255
+ /**
256
+ * Gets or sets day of week zero based, first is monday
257
+ * @param day - If specified, sets day of week
258
+ */
259
+ dayOfWeek(day) {
260
+ if (isPresent(day)) {
261
+ this._value = setISODay(this._value, day + 1);
262
+ return this;
263
+ }
264
+ return getISODay(this._value) - 1;
265
+ }
266
+ /**
267
+ * Gets indication whether current value is before 'date'
268
+ * @param date - Date which is this date compared to
269
+ */
270
+ isBefore(date) {
271
+ return isBefore(this._value, date);
272
+ }
273
+ /**
274
+ * Gets indication whether current value is after 'date'
275
+ * @param date - Date which is this date compared to
276
+ */
277
+ isAfter(date) {
278
+ return isAfter(this._value, date);
279
+ }
280
+ /**
281
+ * Gets number of days between this and provided date
282
+ * @param date - Date which is used for computation of diff against
283
+ */
284
+ diffDays(date) {
285
+ return differenceInCalendarDays(this._value, date);
286
+ }
287
+ /**
288
+ * Compares whether this date is same week as provided date
289
+ * @param date - Date which is used for comparison of same week
290
+ */
291
+ isSameWeek(date) {
292
+ return isSameWeek(this._value, date, { locale: this._localeSvc.locale });
293
+ }
294
+ /**
295
+ * Compares whether this date is same decade as provided date
296
+ * @param date - Date which is used for comparison of same decade
297
+ */
298
+ isSameDecade(date) {
299
+ const year = getYear(this._value);
300
+ const start = year - (year % 10);
301
+ const end = start + 10;
302
+ return getYear(date) >= start && getYear(date) < end;
303
+ }
304
+ /**
305
+ * Compares whether this date is same year as provided date
306
+ * @param date - Date which is used for comparison of same year
307
+ */
308
+ isSameYear(date) {
309
+ return isSameYear(this._value, date);
310
+ }
311
+ /**
312
+ * Compares whether this date is same month as provided date
313
+ * @param date - Date which is used for comparison of same month
314
+ */
315
+ isSameMonth(date) {
316
+ return isSameMonth(this._value, date);
317
+ }
318
+ /**
319
+ * Compares whether this date is same day as provided date
320
+ * @param date - Date which is used for comparison of same day
321
+ */
322
+ isSameDay(date) {
323
+ return isSameDay(this._value, date);
324
+ }
325
+ /**
326
+ * Creates clone of this instance, value and originalValue have same value and are cloned from value
327
+ */
328
+ clone() {
329
+ return new DateFnsDateApiObject(new Date(this._value), this._localeSvc);
330
+ }
331
+ /**
332
+ * Creates clone of this instance, value and originalValue have same value and are cloned from originalValue
333
+ */
334
+ cloneOriginal() {
335
+ return new DateFnsDateApiObject(new Date(this._originalValue), this._localeSvc);
336
+ }
337
+ /**
338
+ * Updates originalValue, if value is not provided originalValue is set to value
339
+ * @param value - Value to be set as original, or null (value will be used as value)
340
+ * @returns Itself for fluent API
341
+ */
342
+ updateOriginal(value) {
343
+ if (isBlank(value)) {
344
+ this._originalValue = this._value;
345
+ }
346
+ else {
347
+ this._value = this._originalValue = value;
348
+ }
349
+ return this;
350
+ }
351
+ /**
352
+ * Changes value to same value as originalValue
353
+ * @returns Itself for fluent API
354
+ */
355
+ resetOriginal() {
356
+ this._value = this._originalValue;
357
+ return this;
358
+ }
359
+ }
360
+ /**
361
+ * Date api using DateFnsJS, used for obtaining DateApi wrapper object
362
+ */
363
+ export class DateFnsDateApi {
364
+ //######################### constructor #########################
365
+ constructor(_localeSvc, _relativeParser) {
366
+ this._localeSvc = _localeSvc;
367
+ this._relativeParser = _relativeParser;
368
+ }
369
+ //######################### public methods - implementation of DateApi #########################
370
+ /**
371
+ * Gets wrapping object used for manipulation
372
+ * @param value - Value to be converted (parsed) and used for manipulation
373
+ * @param format - Format string used for parsing string value
374
+ */
375
+ getValue(value, format) {
376
+ return new DateFnsDateApiObject(this._relativeParser.parse(value), this._localeSvc, format);
377
+ }
378
+ /**
379
+ * Gets wrapping object used for manipulation instantiated to current date and time
380
+ */
381
+ now() {
382
+ return new DateFnsDateApiObject(new Date(), this._localeSvc);
383
+ }
384
+ /**
385
+ * Gets format string using pseudo format
386
+ * @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string
387
+ */
388
+ getFormat(pseudoFormat) {
389
+ if (/^p+$/i.test(pseudoFormat)) {
390
+ const widths = {
391
+ 1: 'short',
392
+ 2: 'medium',
393
+ 3: 'long',
394
+ 4: 'full'
395
+ };
396
+ //date time format
397
+ if (pseudoFormat.indexOf('Pp') >= 0 && pseudoFormat.length <= 8) {
398
+ return this._localeSvc.locale.formatLong.dateTime({ width: widths[pseudoFormat.length / 2] });
399
+ }
400
+ //date format
401
+ else if (pseudoFormat.indexOf('P') >= 0 && pseudoFormat.length <= 4) {
402
+ return this._localeSvc.locale.formatLong.date({ width: widths[pseudoFormat.length] });
403
+ }
404
+ //time format
405
+ else if (pseudoFormat.indexOf('p') >= 0 && pseudoFormat.length <= 4) {
406
+ return this._localeSvc.locale.formatLong.time({ width: widths[pseudoFormat.length] });
407
+ }
408
+ }
409
+ return pseudoFormat;
410
+ }
411
+ /**
412
+ * Gets information
413
+ */
414
+ weekStartsOnMonday() {
415
+ var _a;
416
+ return ((_a = this._localeSvc.locale.options) === null || _a === void 0 ? void 0 : _a.weekStartsOn) === 1;
417
+ }
418
+ /**
419
+ * Gets array of weekday names in short format, order of days is dependent on locale
420
+ */
421
+ weekdaysShort() {
422
+ let startIndex = this._localeSvc.locale.options.weekStartsOn;
423
+ const weekdays = [];
424
+ for (let x = 0; x < 7; x++) {
425
+ weekdays.push(this._localeSvc.locale.localize.day(startIndex++ % 7, { width: 'short' }));
426
+ }
427
+ return weekdays;
428
+ }
429
+ }
430
+ DateFnsDateApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFnsDateApi, deps: [{ token: DATE_FNS_LOCALE }, { token: i1.DateTimeRelativeParser }], target: i0.ɵɵFactoryTarget.Injectable });
431
+ DateFnsDateApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFnsDateApi });
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFnsDateApi, decorators: [{
433
+ type: Injectable
434
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
435
+ type: Inject,
436
+ args: [DATE_FNS_LOCALE]
437
+ }] }, { type: i1.DateTimeRelativeParser }]; } });
438
+ //# sourceMappingURL=dateFnsDateApi.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFnsDateApi.service.js","sourceRoot":"","sources":["../../../../date-fns/src/services/dateFnsDateApi.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAoC,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAEpd,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;;;AAG/C;;GAEG;AACH,MAAM,oBAAoB;IAgCtB,iEAAiE;IACjE,YAAY,KAAqB,EACX,UAAyB,EACnC,MAAe;QADL,eAAU,GAAV,UAAU,CAAe;QAG3C,IAAG,QAAQ,CAAC,KAAK,CAAC,EAClB;YACI,YAAY;YACZ,IAAG,6BAA6B,CAAC,IAAI,CAAC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,OAAO,YAAY,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,kBAAkB;;QAErB,OAAO,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,0CAAE,YAAY,MAAK,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACI,aAAa;QAEhB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAQ,CAAC,YAAa,CAAC;QAC/D,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EACzB;YACI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAS,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;SAC3F;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;;2GAtFQ,cAAc,kBAGH,eAAe;+GAH1B,cAAc;2FAAd,cAAc;kBAD1B,UAAU;;0BAIM,MAAM;2BAAC,eAAe","sourcesContent":["import {Inject, Injectable} from '@angular/core';\nimport {DateApi, DateValue, DateApiObject, DateTimeRelativeParser} from '@anglr/datetime';\nimport {isBlank, isPresent, isString} from '@jscrpt/common';\nimport {toDate, getDate, setDate, isAfter, isBefore, differenceInCalendarDays, format, startOfMonth, endOfMonth, startOfWeek, endOfWeek, startOfDay, endOfDay, addMonths, addWeeks, addDays, subMonths, subWeeks, subDays, getDaysInMonth, isSameDay, isSameWeek, isSameMonth, isValid, parse, parseISO, addYears, subYears, startOfYear, endOfYear, isWeekend, setYear, getYear, isSameYear, startOfDecade, endOfDecade, setMonth, getMonth, setISODay, getISODay} from 'date-fns';\n\nimport {DATE_FNS_LOCALE} from '../misc/tokens';\nimport {DateFnsLocale} from './dateFnsLocale.service';\n\n/**\n * Instance of object wrapping TDate, allowing manipulation with it\n */\nclass DateFnsDateApiObject implements DateApiObject<Date>\n{\n //######################### private fields #########################\n\n /**\n * Original value that is not changed unless 'updateOriginal' is called\n */\n private _originalValue: Date;\n\n /**\n * Instance of date\n */\n private _value: Date;\n\n //######################### public properties - implementation of DateApiObject #########################\n\n /**\n * Original value that is not changed unless 'updateOriginal' is called\n */\n public get originalValue(): Date\n {\n return this._originalValue;\n }\n\n /**\n * Instance of date\n */\n public get value(): Date\n {\n return this._value;\n }\n\n //######################### constructor #########################\n constructor(value: DateValue|Date,\n protected _localeSvc: DateFnsLocale,\n format?: string)\n {\n if(isString(value))\n {\n //ISO string\n if(/^\\d+-\\d+-\\d+(T\\d+:\\d+:\\d+)?/.test(value))\n {\n this._value = this._originalValue = parseISO(value);\n }\n else\n {\n if(isBlank(format))\n {\n throw new Error('date-fns requires format parameter to be set for parsing non ISO string date!');\n }\n\n this._value = this._originalValue = parse(value, format, new Date(1970, 0));\n }\n }\n else\n {\n this._value = this._originalValue = toDate(value);\n }\n }\n\n //######################### public methods - implementation of DateApiObject #########################\n\n /**\n * Gets indication whether provided instance of date is valid\n */\n public isValid(): boolean\n {\n return isValid(this._value);\n }\n\n /**\n * Gets indication whether provided instance of date is weekend day\n */\n public isWeekend(): boolean\n {\n return isWeekend(this._value);\n }\n\n /**\n * Formats date value\n * @param formatString - Format token used for creating formatted string\n */\n public format(formatString: string): string\n {\n return format(this._value, formatString, {locale: this._localeSvc.locale});\n }\n\n /**\n * Updates value to start date and time of current decade\n * @returns Itself for fluent API\n */\n public startOfDecade(): DateApiObject<Date>\n {\n this._value = startOfDecade(this._value);\n \n return this;\n }\n\n /**\n * Updates value to end date and time of current decade\n * @returns Itself for fluent API\n */\n public endOfDecade(): DateApiObject<Date>\n {\n this._value = endOfDecade(this._value);\n \n return this;\n }\n\n /**\n * Updates value to start date and time of current year\n * @returns Itself for fluent API\n */\n public startOfYear(): DateApiObject<Date>\n {\n this._value = startOfYear(this._value);\n\n return this;\n }\n\n /**\n * Updates value to end date and time of current year\n * @returns Itself for fluent API\n */\n public endOfYear(): DateApiObject<Date>\n {\n this._value = endOfYear(this._value);\n\n return this;\n }\n\n /**\n * Add years, if count not specified adds 1 year\n * @param count - Number of years count\n * @returns Itself for fluent API\n */\n public addYears(count?: number): DateApiObject<Date>\n {\n this._value = addYears(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Subtract years, if count not specified subtract 1 year\n * @param count - Number of years count\n * @returns Itself for fluent API\n */\n public subtractYears(count?: number): DateApiObject<Date>\n {\n this._value = subYears(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Updates value to start date and time of current month\n * @returns Itself for fluent API\n */\n public startOfMonth(): DateApiObject<Date>\n {\n this._value = startOfMonth(this._value);\n\n return this;\n }\n\n /**\n * Updates value to end date and time of current month\n * @returns Itself for fluent API\n */\n public endOfMonth(): DateApiObject<Date>\n {\n this._value = endOfMonth(this._value);\n\n return this;\n }\n\n /**\n * Add months, if count not specified adds 1 month\n * @param count - Number of months count\n * @returns Itself for fluent API\n */\n public addMonths(count?: number): DateApiObject<Date>\n {\n this._value = addMonths(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Subtract months, if count not specified subtract 1 month\n * @param count - Number of months count\n * @returns Itself for fluent API\n */\n public subtractMonths(count?: number): DateApiObject<Date>\n {\n this._value = subMonths(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Updates value to start date and time of current week\n * @returns Itself for fluent API\n */\n public startOfWeek(): DateApiObject<Date>\n {\n this._value = startOfWeek(this._value, {locale: this._localeSvc.locale});\n\n return this;\n }\n\n /**\n * Updates value to end date and time of current week\n * @returns Itself for fluent API\n */\n public endOfWeek(): DateApiObject<Date>\n {\n this._value = endOfWeek(this._value, {locale: this._localeSvc.locale});\n\n return this;\n }\n\n /**\n * Add weeks, if count not specified adds 1 week\n * @param count - Number of weeks count\n * @returns Itself for fluent API\n */\n public addWeeks(count?: number): DateApiObject<Date>\n {\n this._value = addWeeks(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Subtract weeks, if count not specified subtract 1 week\n * @param count - Number of weeks count\n * @returns Itself for fluent API\n */\n public subtractWeeks(count?: number): DateApiObject<Date>\n {\n this._value = subWeeks(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Updates value to start date and time of current day\n * @returns Itself for fluent API\n */\n public startOfDay(): DateApiObject<Date>\n {\n this._value = startOfDay(this._value);\n\n return this;\n }\n\n /**\n * Updates value to end date and time of current day\n * @returns Itself for fluent API\n */\n public endOfDay(): DateApiObject<Date>\n {\n this._value = endOfDay(this._value);\n\n return this;\n }\n\n /**\n * Add days, if count not specified adds 1 day\n * @param count - Number of days count\n * @returns Itself for fluent API\n */\n public addDays(count?: number): DateApiObject<Date>\n {\n this._value = addDays(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Subtract days, if count not specified subtract 1 day\n * @param count - Number of days count\n * @returns Itself for fluent API\n */\n public subtractDays(count?: number): DateApiObject<Date>\n {\n this._value = subDays(this._value, count ?? 1);\n\n return this;\n }\n\n /**\n * Gets number of days in month\n */\n public daysInMonth(): number\n {\n return getDaysInMonth(this._value);\n }\n\n /**\n * Gets year\n */\n public year(): number;\n /**\n * Sets year\n * @param year - Year to be set\n */\n public year(year: number): DateApiObject<Date>;\n /**\n * Gets or sets year\n * @param year - If specified, sets year\n */\n public year(year?: number): DateApiObject<Date>|number\n {\n if(isPresent(year))\n {\n this._value = setYear(this._value, year!);\n\n return this;\n }\n\n return getYear(this._value);\n }\n\n /**\n * Gets month\n */\n public month(): number\n /**\n * Sets month\n * @param month - Month to be set\n */\n public month(month: number): DateApiObject<Date>\n /**\n * Gets or sets month\n * @param month - If specified, sets month\n */\n public month(month?: number): DateApiObject<Date>|number\n {\n if(isPresent(month))\n {\n this._value = setMonth(this._value, month!);\n\n return this;\n }\n\n return getMonth(this._value);\n }\n\n /**\n * Gets day of month one based\n */\n public dayOfMonth(): number;\n /**\n * Sets day of month one based\n * @param day - Day of month to be set\n */\n public dayOfMonth(day: number): DateApiObject<Date>;\n /**\n * Gets or sets day of month one based\n * @param day - If specified, sets day of month\n */\n public dayOfMonth(day?: number): DateApiObject<Date>|number\n {\n if(isPresent(day))\n {\n this._value = setDate(this._value, day!);\n\n return this;\n }\n\n return getDate(this._value);\n }\n\n /**\n * Gets day of week zero based, first is monday\n */\n public dayOfWeek(): number;\n /**\n * Sets day of week zero based, first is monday\n * @param day - Day of week to be set\n */\n public dayOfWeek(day: number): DateApiObject<Date>;\n /**\n * Gets or sets day of week zero based, first is monday\n * @param day - If specified, sets day of week\n */\n public dayOfWeek(day?: number): number|DateApiObject<Date>\n {\n if(isPresent(day))\n {\n this._value = setISODay(this._value, day + 1!);\n\n return this;\n }\n\n return getISODay(this._value) - 1;\n }\n\n /**\n * Gets indication whether current value is before 'date'\n * @param date - Date which is this date compared to\n */\n public isBefore(date: Date): boolean\n {\n return isBefore(this._value, date);\n }\n\n /**\n * Gets indication whether current value is after 'date'\n * @param date - Date which is this date compared to\n */\n public isAfter(date: Date): boolean\n {\n return isAfter(this._value, date);\n }\n\n /**\n * Gets number of days between this and provided date\n * @param date - Date which is used for computation of diff against\n */\n public diffDays(date: Date): number\n {\n return differenceInCalendarDays(this._value, date);\n }\n\n /**\n * Compares whether this date is same week as provided date\n * @param date - Date which is used for comparison of same week\n */\n public isSameWeek(date: Date): boolean\n {\n return isSameWeek(this._value, date, {locale: this._localeSvc.locale});\n }\n\n /**\n * Compares whether this date is same decade as provided date\n * @param date - Date which is used for comparison of same decade\n */\n public isSameDecade(date: Date): boolean\n {\n const year = getYear(this._value);\n const start = year - (year % 10);\n const end = start + 10;\n\n return getYear(date) >= start && getYear(date) < end;\n }\n\n /**\n * Compares whether this date is same year as provided date\n * @param date - Date which is used for comparison of same year\n */\n public isSameYear(date: Date): boolean\n {\n return isSameYear(this._value, date);\n }\n\n /**\n * Compares whether this date is same month as provided date\n * @param date - Date which is used for comparison of same month\n */\n public isSameMonth(date: Date): boolean\n {\n return isSameMonth(this._value, date);\n }\n\n /**\n * Compares whether this date is same day as provided date\n * @param date - Date which is used for comparison of same day\n */\n public isSameDay(date: Date): boolean\n {\n return isSameDay(this._value, date);\n }\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from value\n */\n public clone(): DateApiObject<Date>\n {\n return new DateFnsDateApiObject(new Date(this._value), this._localeSvc);\n }\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from originalValue\n */\n public cloneOriginal(): DateApiObject<Date>\n {\n return new DateFnsDateApiObject(new Date(this._originalValue), this._localeSvc);\n }\n\n /**\n * Updates originalValue, if value is not provided originalValue is set to value\n * @param value - Value to be set as original, or null (value will be used as value)\n * @returns Itself for fluent API\n */\n public updateOriginal(value?: Date): DateApiObject<Date>\n {\n if(isBlank(value))\n {\n this._originalValue = this._value;\n }\n else\n {\n this._value = this._originalValue = value!;\n }\n\n return this;\n }\n\n /**\n * Changes value to same value as originalValue\n * @returns Itself for fluent API\n */\n public resetOriginal(): DateApiObject<Date>\n {\n this._value = this._originalValue;\n\n return this;\n }\n}\n\n/**\n * Date api using DateFnsJS, used for obtaining DateApi wrapper object\n */\n@Injectable()\nexport class DateFnsDateApi implements DateApi<Date>\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_FNS_LOCALE) protected _localeSvc: DateFnsLocale,\n protected _relativeParser: DateTimeRelativeParser<Date>)\n {\n }\n\n //######################### public methods - implementation of DateApi #########################\n\n /**\n * Gets wrapping object used for manipulation\n * @param value - Value to be converted (parsed) and used for manipulation\n * @param format - Format string used for parsing string value\n */\n public getValue(value: DateValue|Date, format?: string): DateApiObject<Date>\n {\n return new DateFnsDateApiObject(this._relativeParser.parse(value), this._localeSvc, format);\n }\n\n /**\n * Gets wrapping object used for manipulation instantiated to current date and time\n */\n public now(): DateApiObject<Date>\n {\n return new DateFnsDateApiObject(new Date(), this._localeSvc);\n }\n\n /**\n * Gets format string using pseudo format\n * @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string\n */\n public getFormat(pseudoFormat: string): string\n {\n if(/^p+$/i.test(pseudoFormat))\n {\n const widths: {[index: number]: string} =\n {\n 1: 'short',\n 2: 'medium',\n 3: 'long',\n 4: 'full'\n };\n\n //date time format\n if(pseudoFormat.indexOf('Pp') >= 0 && pseudoFormat.length <= 8)\n {\n return this._localeSvc.locale.formatLong!.dateTime({width: widths[pseudoFormat.length / 2]});\n }\n //date format\n else if(pseudoFormat.indexOf('P') >= 0 && pseudoFormat.length <= 4)\n {\n return this._localeSvc.locale.formatLong!.date({width: widths[pseudoFormat.length]});\n }\n //time format\n else if(pseudoFormat.indexOf('p') >= 0 && pseudoFormat.length <= 4)\n {\n return this._localeSvc.locale.formatLong!.time({width: widths[pseudoFormat.length]});\n }\n }\n\n return pseudoFormat;\n }\n\n /**\n * Gets information \n */\n public weekStartsOnMonday(): boolean\n {\n return this._localeSvc.locale.options?.weekStartsOn === 1;\n }\n\n /**\n * Gets array of weekday names in short format, order of days is dependent on locale\n */\n public weekdaysShort(): string[]\n {\n let startIndex = this._localeSvc.locale.options!.weekStartsOn!;\n const weekdays: string[] = [];\n\n for(let x = 0; x < 7; x++)\n {\n weekdays.push(this._localeSvc.locale.localize!.day(startIndex++ % 7, {width: 'short'}));\n }\n\n return weekdays;\n }\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dateFnsLocale.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFnsLocale.service.js","sourceRoot":"","sources":["../../../../date-fns/src/services/dateFnsLocale.service.ts"],"names":[],"mappings":"","sourcesContent":["import {Locale} from 'date-fns';\n\n/**\n * Date FNS locale service, used for obtaining locale\n */\nexport interface DateFnsLocale\n{\n /**\n * Gets current active locale for date fns\n */\n readonly locale: Locale;\n}"]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin, path = require('path');
3
+ process.env.CHROME_BIN = require('puppeteer').executablePath();
4
+ // karma.conf.js
5
+ module.exports = function (config) {
6
+ config.set({
7
+ basePath: '.',
8
+ browsers: ['ChromeHeadlessNS'],
9
+ customLaunchers: {
10
+ ChromeHeadlessNS: {
11
+ base: 'ChromeHeadless',
12
+ flags: ['--no-sandbox']
13
+ }
14
+ },
15
+ frameworks: ['jasmine', 'webpack'],
16
+ plugins: [
17
+ 'karma-chrome-launcher',
18
+ 'karma-jasmine',
19
+ 'karma-webpack'
20
+ ],
21
+ preprocessors: {
22
+ 'tests/**/*.ts': ['webpack']
23
+ },
24
+ files: [
25
+ {
26
+ pattern: 'tests/**/*.ts',
27
+ watched: false
28
+ }
29
+ ],
30
+ reporters: ['progress'],
31
+ webpack: {
32
+ module: {
33
+ rules: [
34
+ {
35
+ test: /\.ts$/,
36
+ loader: '@ngtools/webpack'
37
+ },
38
+ {
39
+ test: /\.html$/,
40
+ loader: 'raw-loader'
41
+ },
42
+ {
43
+ test: /\.css$/,
44
+ loader: 'raw-loader'
45
+ }
46
+ ]
47
+ },
48
+ plugins: [
49
+ new AngularCompilerPlugin({
50
+ tsConfigPath: path.join(__dirname, 'tsconfig.karma.json'),
51
+ sourceMap: true
52
+ })
53
+ ]
54
+ }
55
+ });
56
+ };
57
+ //# sourceMappingURL=karma.conf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"karma.conf.js","sourceRoot":"","sources":["../karma.conf.ts"],"names":[],"mappings":";AAAA,MAAM,qBAAqB,GAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC,qBAAqB,EAC1E,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE,CAAC;AAE/D,gBAAgB;AAChB,MAAM,CAAC,OAAO,GAAG,UAAS,MAAW;IAEjC,MAAM,CAAC,GAAG,CACV;QACI,QAAQ,EAAE,GAAG;QACb,QAAQ,EAAE,CAAC,kBAAkB,CAAC;QAC9B,eAAe,EACf;YACI,gBAAgB,EAChB;gBACI,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,CAAC,cAAc,CAAC;aAC1B;SACJ;QACD,UAAU,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;QAClC,OAAO,EACP;YACI,uBAAuB;YACvB,eAAe;YACf,eAAe;SAClB;QACD,aAAa,EACb;YACI,eAAe,EAAE,CAAC,SAAS,CAAC;SAC/B;QACD,KAAK,EACL;YACI;gBACI,OAAO,EAAE,eAAe;gBACxB,OAAO,EAAE,KAAK;aACjB;SACJ;QACD,SAAS,EAAE,CAAC,UAAU,CAAC;QACvB,OAAO,EACP;YACI,MAAM,EACN;gBACI,KAAK,EACL;oBACI;wBACI,IAAI,EAAE,OAAO;wBACb,MAAM,EAAE,kBAAkB;qBAC7B;oBACD;wBACI,IAAI,EAAE,SAAS;wBACf,MAAM,EAAE,YAAY;qBACvB;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,YAAY;qBACvB;iBACJ;aACJ;YACD,OAAO,EACP;gBACI,IAAI,qBAAqB,CACzB;oBACI,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC;oBACzD,SAAS,EAAE,IAAI;iBAClB,CAAC;aACL;SACJ;KACJ,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin,\n path = require('path');\n\nprocess.env.CHROME_BIN = require('puppeteer').executablePath();\n\n// karma.conf.js\nmodule.exports = function(config: any)\n{\n config.set(\n {\n basePath: '.',\n browsers: ['ChromeHeadlessNS'],\n customLaunchers:\n {\n ChromeHeadlessNS:\n {\n base: 'ChromeHeadless',\n flags: ['--no-sandbox']\n }\n },\n frameworks: ['jasmine', 'webpack'],\n plugins:\n [\n 'karma-chrome-launcher',\n 'karma-jasmine',\n 'karma-webpack'\n ],\n preprocessors:\n {\n 'tests/**/*.ts': ['webpack']\n },\n files:\n [\n {\n pattern: 'tests/**/*.ts',\n watched: false\n }\n ],\n reporters: ['progress'],\n webpack:\n {\n module:\n {\n rules:\n [\n {\n test: /\\.ts$/,\n loader: '@ngtools/webpack'\n },\n {\n test: /\\.html$/,\n loader: 'raw-loader'\n },\n {\n test: /\\.css$/,\n loader: 'raw-loader'\n }\n ]\n },\n plugins:\n [\n new AngularCompilerPlugin(\n {\n tsConfigPath: path.join(__dirname, 'tsconfig.karma.json'),\n sourceMap: true\n })\n ]\n }\n });\n};"]}
@@ -1,3 +1,3 @@
1
- export * from './services/momentDateApi.service';
2
- export * from './misc/tokens';
3
- //# sourceMappingURL=moment.d.ts.map
1
+ export * from './services/momentDateApi.service';
2
+ export * from './misc/tokens';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../moment/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC","sourcesContent":["export * from './services/momentDateApi.service';\nexport * from './misc/tokens';"]}
@@ -0,0 +1,15 @@
1
+ import { FORMAT_PROVIDER } from '@anglr/datetime';
2
+ /**
3
+ * Injection token used for obtaining moment FormatProvider implementation
4
+ */
5
+ export const MOMENT_FORMAT_PROVIDER = {
6
+ provide: FORMAT_PROVIDER,
7
+ useFactory: () => {
8
+ return {
9
+ date: 'L',
10
+ dateTime: 'L LT',
11
+ time: 'LT'
12
+ };
13
+ }
14
+ };
15
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../moment/src/misc/tokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GACnC;IACI,OAAO,EAAE,eAAe;IACxB,UAAU,EAAE,GAAG,EAAE;QAEb,OAAuB;YACnB,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,IAAI;SACb,CAAC;IACN,CAAC;CACJ,CAAC","sourcesContent":["import {FactoryProvider} from '@angular/core';\nimport {FormatProvider, FORMAT_PROVIDER} from '@anglr/datetime';\n\n/**\n * Injection token used for obtaining moment FormatProvider implementation\n */\nexport const MOMENT_FORMAT_PROVIDER: FactoryProvider =\n{\n provide: FORMAT_PROVIDER,\n useFactory: () =>\n {\n return <FormatProvider>{\n date: 'L',\n dateTime: 'L LT',\n time: 'LT'\n };\n }\n};"]}