@anglr/datetime 5.0.0-beta.20221017033852 → 5.0.0-beta.20221018102923

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 (546) hide show
  1. package/changelog.md +113 -0
  2. package/date-fns/src/services/dateFnsDateApi.service.d.ts +4 -0
  3. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  4. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +11 -5
  5. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  6. package/es2015/moment/src/services/momentDateApi.service.js +9 -3
  7. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -1
  8. package/es2015/src/index.js +13 -13
  9. package/es2015/src/index.js.map +1 -1
  10. package/es2015/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
  11. package/es2015/src/interfaces/dateTime/datetime.interface.js.map +1 -0
  12. package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
  13. package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
  14. package/es2015/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
  15. package/es2015/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
  16. package/es2015/src/interfaces/index.js +4 -0
  17. package/es2015/src/interfaces/index.js.map +1 -0
  18. package/{es2020/src → es2015/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
  19. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
  20. package/es2015/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
  21. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
  22. package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
  23. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  24. package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
  25. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  26. package/{es2020/src → es2015/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
  27. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  28. package/es2015/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
  29. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  30. package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
  31. package/es2015/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
  32. package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
  33. package/es2015/src/legacy/picker/components/picker/picker.component.js.map +1 -0
  34. package/{es2020/src → es2015/src/legacy}/picker/components/pickerBase.component.js +4 -4
  35. package/es2015/src/legacy/picker/components/pickerBase.component.js.map +1 -0
  36. package/{es2020/src → es2015/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
  37. package/es2015/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
  38. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
  39. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  40. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  41. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
  42. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
  43. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
  44. package/{es2020/src → es2015/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
  45. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  46. package/es2015/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
  47. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  48. package/es2015/src/{picker → legacy/picker}/directives/index.js +0 -0
  49. package/es2015/src/legacy/picker/directives/index.js.map +1 -0
  50. package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
  51. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  52. package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
  53. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  54. package/es2015/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
  55. package/es2015/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  56. package/es2015/src/{picker → legacy/picker}/interfaces.js +0 -0
  57. package/es2015/src/legacy/picker/interfaces.js.map +1 -0
  58. package/es2015/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
  59. package/es2015/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
  60. package/es2015/src/{picker → legacy/picker}/misc/tokens.js +0 -0
  61. package/es2015/src/legacy/picker/misc/tokens.js.map +1 -0
  62. package/{es2020/src → es2015/src/legacy}/picker/modules/picker.module.js +10 -12
  63. package/es2015/src/legacy/picker/modules/picker.module.js.map +1 -0
  64. package/es2015/src/{picker → legacy/picker}/types.js +0 -0
  65. package/es2015/src/legacy/picker/types.js.map +1 -0
  66. package/es2015/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +7 -9
  67. package/es2015/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  68. package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
  69. package/es2015/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
  70. package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
  71. package/es2015/src/legacy/selector/components/selector/selector.component.js.map +1 -0
  72. package/es2015/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
  73. package/es2015/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  74. package/es2015/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
  75. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
  76. package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
  77. package/es2015/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  78. package/es2015/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
  79. package/es2015/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  80. package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
  81. package/es2015/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  82. package/es2015/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
  83. package/es2015/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  84. package/es2015/src/{selector → legacy/selector}/interfaces.js +0 -0
  85. package/es2015/src/legacy/selector/interfaces.js.map +1 -0
  86. package/es2015/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
  87. package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
  88. package/es2015/src/{selector → legacy/selector}/misc/tokens.js +0 -0
  89. package/es2015/src/legacy/selector/misc/tokens.js.map +1 -0
  90. package/{es2020/src → es2015/src/legacy}/selector/modules/basicSelector.module.js +4 -4
  91. package/es2015/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
  92. package/es2015/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
  93. package/es2015/src/legacy/selector/modules/selector.module.js.map +1 -0
  94. package/es2015/src/{selector → legacy/selector}/types.js +0 -0
  95. package/es2015/src/legacy/selector/types.js.map +1 -0
  96. package/es2015/src/misc/enums.js +23 -0
  97. package/es2015/src/misc/enums.js.map +1 -0
  98. package/es2015/src/misc/tokens.js +4 -0
  99. package/es2015/src/misc/tokens.js.map +1 -1
  100. package/es2015/src/misc/types.js +2 -0
  101. package/es2015/src/misc/types.js.map +1 -0
  102. package/es2015/src/misc/utils.js +112 -0
  103. package/es2015/src/misc/utils.js.map +1 -0
  104. package/es2015/src/misc/validators.js +107 -0
  105. package/es2015/src/misc/validators.js.map +1 -1
  106. package/es2015/src/modules/datePipes.module.js +4 -4
  107. package/es2015/src/modules/dateTime/directives/dateTimeBase.js +77 -0
  108. package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
  109. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  110. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  111. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +144 -0
  112. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  113. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +72 -0
  114. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
  115. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +71 -0
  116. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
  117. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js +152 -0
  118. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +1 -0
  119. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +64 -0
  120. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  121. package/es2015/src/modules/dateTime/directives/index.js +8 -0
  122. package/es2015/src/modules/dateTime/directives/index.js.map +1 -0
  123. package/es2015/src/modules/dateTime/index.js +3 -0
  124. package/es2015/src/modules/dateTime/index.js.map +1 -0
  125. package/es2015/src/modules/dateTime/modules/dateTime.module.js +39 -0
  126. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  127. package/es2015/src/modules/dateTime/modules/index.js +2 -0
  128. package/es2015/src/modules/dateTime/modules/index.js.map +1 -0
  129. package/es2015/src/modules/index.js +3 -0
  130. package/es2015/src/modules/index.js.map +1 -0
  131. package/es2015/src/pipes/dateConvert.pipe.js +3 -3
  132. package/es2015/src/pipes/dateFormat.pipe.js +3 -3
  133. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
  134. package/es2015/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  135. package/es2015/src/services/dateApi/dateApi.interface.js.map +1 -0
  136. package/es2015/src/services/{datePositionParser.interface.js → datePositionParser/datePositionParser.interface.js} +0 -0
  137. package/es2015/src/services/datePositionParser/datePositionParser.interface.js.map +1 -0
  138. package/{es2020/src/services → es2015/src/services/datePositionParser}/datePositionParser.service.js +3 -3
  139. package/es2015/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
  140. package/es2015/src/services/{dateTimeRelativeParser.service.js → dateTimeRelativeParser/dateTimeRelativeParser.service.js} +11 -11
  141. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
  142. package/{es2020/src/services → es2015/src/services/dateValueProvider}/dateValueProvider.service.js +4 -4
  143. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
  144. package/es2015/src/services/index.js +5 -3
  145. package/es2015/src/services/index.js.map +1 -1
  146. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +11 -5
  147. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  148. package/es2020/moment/src/services/momentDateApi.service.js +9 -3
  149. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -1
  150. package/es2020/src/index.js +13 -13
  151. package/es2020/src/index.js.map +1 -1
  152. package/es2020/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
  153. package/es2020/src/interfaces/dateTime/datetime.interface.js.map +1 -0
  154. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
  155. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
  156. package/es2020/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
  157. package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
  158. package/es2020/src/interfaces/index.js +4 -0
  159. package/es2020/src/interfaces/index.js.map +1 -0
  160. package/{es2015/src → es2020/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
  161. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
  162. package/es2020/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
  163. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
  164. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
  165. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  166. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
  167. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  168. package/{es2015/src → es2020/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
  169. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  170. package/es2020/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
  171. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  172. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
  173. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
  174. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
  175. package/es2020/src/legacy/picker/components/picker/picker.component.js.map +1 -0
  176. package/{es2015/src → es2020/src/legacy}/picker/components/pickerBase.component.js +4 -4
  177. package/es2020/src/legacy/picker/components/pickerBase.component.js.map +1 -0
  178. package/{es2015/src → es2020/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
  179. package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
  180. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
  181. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  182. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  183. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
  184. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
  185. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
  186. package/{es2015/src → es2020/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
  187. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  188. package/es2020/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
  189. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  190. package/es2020/src/{picker → legacy/picker}/directives/index.js +0 -0
  191. package/es2020/src/legacy/picker/directives/index.js.map +1 -0
  192. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
  193. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  194. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
  195. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  196. package/es2020/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
  197. package/es2020/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  198. package/es2020/src/{picker → legacy/picker}/interfaces.js +0 -0
  199. package/es2020/src/legacy/picker/interfaces.js.map +1 -0
  200. package/es2020/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
  201. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
  202. package/es2020/src/{picker → legacy/picker}/misc/tokens.js +0 -0
  203. package/es2020/src/legacy/picker/misc/tokens.js.map +1 -0
  204. package/{es2015/src → es2020/src/legacy}/picker/modules/picker.module.js +10 -12
  205. package/es2020/src/legacy/picker/modules/picker.module.js.map +1 -0
  206. package/es2020/src/{picker → legacy/picker}/types.js +0 -0
  207. package/es2020/src/legacy/picker/types.js.map +1 -0
  208. package/es2020/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +7 -9
  209. package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  210. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
  211. package/es2020/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
  212. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
  213. package/es2020/src/legacy/selector/components/selector/selector.component.js.map +1 -0
  214. package/es2020/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
  215. package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  216. package/es2020/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
  217. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
  218. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
  219. package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  220. package/es2020/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
  221. package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  222. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
  223. package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  224. package/es2020/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
  225. package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  226. package/es2020/src/{selector → legacy/selector}/interfaces.js +0 -0
  227. package/es2020/src/legacy/selector/interfaces.js.map +1 -0
  228. package/es2020/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
  229. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
  230. package/es2020/src/{selector → legacy/selector}/misc/tokens.js +0 -0
  231. package/es2020/src/legacy/selector/misc/tokens.js.map +1 -0
  232. package/{es2015/src → es2020/src/legacy}/selector/modules/basicSelector.module.js +4 -4
  233. package/es2020/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
  234. package/es2020/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
  235. package/es2020/src/legacy/selector/modules/selector.module.js.map +1 -0
  236. package/es2020/src/{selector → legacy/selector}/types.js +0 -0
  237. package/es2020/src/legacy/selector/types.js.map +1 -0
  238. package/es2020/src/misc/enums.js +23 -0
  239. package/es2020/src/misc/enums.js.map +1 -0
  240. package/es2020/src/misc/tokens.js +4 -0
  241. package/es2020/src/misc/tokens.js.map +1 -1
  242. package/es2020/src/misc/types.js +2 -0
  243. package/es2020/src/misc/types.js.map +1 -0
  244. package/es2020/src/misc/utils.js +111 -0
  245. package/es2020/src/misc/utils.js.map +1 -0
  246. package/es2020/src/misc/validators.js +107 -0
  247. package/es2020/src/misc/validators.js.map +1 -1
  248. package/es2020/src/modules/datePipes.module.js +4 -4
  249. package/es2020/src/modules/dateTime/directives/dateTimeBase.js +77 -0
  250. package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
  251. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  252. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  253. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +143 -0
  254. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  255. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +72 -0
  256. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
  257. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +71 -0
  258. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
  259. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js +149 -0
  260. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +1 -0
  261. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +64 -0
  262. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  263. package/es2020/src/modules/dateTime/directives/index.js +8 -0
  264. package/es2020/src/modules/dateTime/directives/index.js.map +1 -0
  265. package/es2020/src/modules/dateTime/index.js +3 -0
  266. package/es2020/src/modules/dateTime/index.js.map +1 -0
  267. package/es2020/src/modules/dateTime/modules/dateTime.module.js +39 -0
  268. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  269. package/es2020/src/modules/dateTime/modules/index.js +2 -0
  270. package/es2020/src/modules/dateTime/modules/index.js.map +1 -0
  271. package/es2020/src/modules/index.js +3 -0
  272. package/es2020/src/modules/index.js.map +1 -0
  273. package/es2020/src/pipes/dateConvert.pipe.js +3 -3
  274. package/es2020/src/pipes/dateFormat.pipe.js +3 -3
  275. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
  276. package/es2020/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  277. package/es2020/src/services/dateApi/dateApi.interface.js.map +1 -0
  278. package/es2020/src/services/{datePositionParser.interface.js → datePositionParser/datePositionParser.interface.js} +0 -0
  279. package/es2020/src/services/datePositionParser/datePositionParser.interface.js.map +1 -0
  280. package/{es2015/src/services → es2020/src/services/datePositionParser}/datePositionParser.service.js +3 -3
  281. package/es2020/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
  282. package/es2020/src/services/{dateTimeRelativeParser.service.js → dateTimeRelativeParser/dateTimeRelativeParser.service.js} +11 -11
  283. package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
  284. package/{es2015/src/services → es2020/src/services/dateValueProvider}/dateValueProvider.service.js +4 -4
  285. package/es2020/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
  286. package/es2020/src/services/index.js +5 -3
  287. package/es2020/src/services/index.js.map +1 -1
  288. package/moment/src/services/momentDateApi.service.d.ts +4 -0
  289. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  290. package/package.json +36 -36
  291. package/src/index.d.ts +13 -13
  292. package/src/index.d.ts.map +1 -1
  293. package/src/{misc → interfaces/dateTime}/datetime.interface.d.ts +2 -2
  294. package/src/interfaces/dateTime/datetime.interface.d.ts.map +1 -0
  295. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +37 -0
  296. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts.map +1 -0
  297. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts +0 -0
  298. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts.map +0 -0
  299. package/src/interfaces/index.d.ts +4 -0
  300. package/src/interfaces/index.d.ts.map +1 -0
  301. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.css +0 -0
  302. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts +1 -1
  303. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts.map +0 -0
  304. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.html +0 -0
  305. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts +0 -0
  306. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts.map +0 -0
  307. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.css +0 -0
  308. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts +3 -3
  309. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  310. package/src/legacy/picker/components/dayPicker/dayPicker.component.html +21 -0
  311. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts +0 -0
  312. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts.map +0 -0
  313. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.css +0 -0
  314. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts +2 -2
  315. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  316. package/src/legacy/picker/components/monthPicker/monthPicker.component.html +13 -0
  317. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts +0 -0
  318. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts.map +0 -0
  319. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts +0 -0
  320. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts.map +0 -0
  321. package/src/{picker → legacy/picker}/components/picker/picker.component.css +0 -0
  322. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts +3 -3
  323. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts.map +1 -1
  324. package/src/legacy/picker/components/picker/picker.component.html +3 -0
  325. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts +3 -3
  326. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts.map +1 -1
  327. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts +3 -3
  328. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts.map +1 -1
  329. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.css +0 -0
  330. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts +3 -3
  331. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  332. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.html +0 -0
  333. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts +0 -0
  334. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +0 -0
  335. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts +0 -0
  336. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts.map +0 -0
  337. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.css +0 -0
  338. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts +2 -2
  339. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  340. package/src/legacy/picker/components/yearPicker/yearPicker.component.html +13 -0
  341. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts +0 -0
  342. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts.map +0 -0
  343. package/src/{picker → legacy/picker}/directives/index.d.ts +0 -0
  344. package/src/{picker → legacy/picker}/directives/index.d.ts.map +0 -0
  345. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts +1 -1
  346. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts.map +0 -0
  347. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts +0 -0
  348. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts.map +0 -0
  349. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
  350. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts.map +0 -0
  351. package/src/{picker → legacy/picker}/interfaces.d.ts +0 -0
  352. package/src/{picker → legacy/picker}/interfaces.d.ts.map +0 -0
  353. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts +2 -2
  354. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts.map +1 -1
  355. package/src/{picker → legacy/picker}/misc/tokens.d.ts +0 -0
  356. package/src/{picker → legacy/picker}/misc/tokens.d.ts.map +0 -0
  357. package/src/{picker → legacy/picker}/modules/picker.module.d.ts +1 -1
  358. package/src/{picker → legacy/picker}/modules/picker.module.d.ts.map +0 -0
  359. package/src/{picker → legacy/picker}/types.d.ts +0 -0
  360. package/src/{picker → legacy/picker}/types.d.ts.map +0 -0
  361. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.css +0 -0
  362. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts +3 -5
  363. package/src/legacy/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -0
  364. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.html +0 -0
  365. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts +0 -0
  366. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts.map +0 -0
  367. package/src/{selector → legacy/selector}/components/selector/selector.component.css +0 -0
  368. package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts +4 -4
  369. package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts.map +1 -1
  370. package/src/{selector → legacy/selector}/components/selector/selector.component.html +2 -2
  371. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.css +0 -0
  372. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +3 -4
  373. package/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -0
  374. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.html +0 -0
  375. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +2 -2
  376. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +1 -1
  377. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +2 -2
  378. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  379. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +2 -2
  380. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  381. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts +1 -1
  382. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +0 -0
  383. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +2 -2
  384. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  385. package/src/{selector → legacy/selector}/interfaces.d.ts +0 -0
  386. package/src/{selector → legacy/selector}/interfaces.d.ts.map +0 -0
  387. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts +1 -1
  388. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts.map +1 -1
  389. package/src/{selector → legacy/selector}/misc/tokens.d.ts +0 -0
  390. package/src/{selector → legacy/selector}/misc/tokens.d.ts.map +0 -0
  391. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts +0 -0
  392. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts.map +0 -0
  393. package/src/{selector → legacy/selector}/modules/selector.module.d.ts +0 -0
  394. package/src/{selector → legacy/selector}/modules/selector.module.d.ts.map +0 -0
  395. package/src/{selector → legacy/selector}/types.d.ts +0 -0
  396. package/src/{selector → legacy/selector}/types.d.ts.map +0 -0
  397. package/src/misc/enums.d.ts +22 -0
  398. package/src/misc/enums.d.ts.map +1 -0
  399. package/src/misc/tokens.d.ts +6 -1
  400. package/src/misc/tokens.d.ts.map +1 -1
  401. package/src/misc/types.d.ts +11 -0
  402. package/src/misc/types.d.ts.map +1 -0
  403. package/src/misc/utils.d.ts +30 -0
  404. package/src/misc/utils.d.ts.map +1 -0
  405. package/src/misc/validators.d.ts +26 -1
  406. package/src/misc/validators.d.ts.map +1 -1
  407. package/src/modules/dateTime/directives/dateTimeBase.d.ts +56 -0
  408. package/src/modules/dateTime/directives/dateTimeBase.d.ts.map +1 -0
  409. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +40 -0
  410. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -0
  411. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +61 -0
  412. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -0
  413. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts +33 -0
  414. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -0
  415. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts +33 -0
  416. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -0
  417. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts +74 -0
  418. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts.map +1 -0
  419. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +29 -0
  420. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -0
  421. package/src/modules/dateTime/directives/index.d.ts +8 -0
  422. package/src/modules/dateTime/directives/index.d.ts.map +1 -0
  423. package/src/modules/dateTime/index.d.ts +3 -0
  424. package/src/modules/dateTime/index.d.ts.map +1 -0
  425. package/src/modules/dateTime/modules/dateTime.module.d.ts +15 -0
  426. package/src/modules/dateTime/modules/dateTime.module.d.ts.map +1 -0
  427. package/src/modules/dateTime/modules/index.d.ts +2 -0
  428. package/src/modules/dateTime/modules/index.d.ts.map +1 -0
  429. package/src/modules/index.d.ts +3 -0
  430. package/src/modules/index.d.ts.map +1 -0
  431. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  432. package/src/pipes/dateFormat.pipe.d.ts +3 -2
  433. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  434. package/src/services/{dateApi.interface.d.ts → dateApi/dateApi.interface.d.ts} +4 -0
  435. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -0
  436. package/src/services/{datePositionParser.interface.d.ts → datePositionParser/datePositionParser.interface.d.ts} +0 -0
  437. package/src/services/{datePositionParser.interface.d.ts.map → datePositionParser/datePositionParser.interface.d.ts.map} +0 -0
  438. package/src/services/{datePositionParser.service.d.ts → datePositionParser/datePositionParser.service.d.ts} +0 -0
  439. package/src/services/{datePositionParser.service.d.ts.map → datePositionParser/datePositionParser.service.d.ts.map} +0 -0
  440. package/src/services/{dateTimeRelativeParser.service.d.ts → dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts} +3 -3
  441. package/src/services/{dateTimeRelativeParser.service.d.ts.map → dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts.map} +1 -1
  442. package/src/services/{dateValueProvider.service.d.ts → dateValueProvider/dateValueProvider.service.d.ts} +2 -2
  443. package/src/services/{dateValueProvider.service.d.ts.map → dateValueProvider/dateValueProvider.service.d.ts.map} +1 -1
  444. package/src/services/index.d.ts +5 -3
  445. package/src/services/index.d.ts.map +1 -1
  446. package/version.bak +1 -1
  447. package/es2015/src/misc/datetime.interface.js.map +0 -1
  448. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  449. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  450. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  451. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  452. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  453. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  454. package/es2015/src/picker/components/picker/picker.component.animations.js.map +0 -1
  455. package/es2015/src/picker/components/picker/picker.component.js.map +0 -1
  456. package/es2015/src/picker/components/pickerBase.component.js.map +0 -1
  457. package/es2015/src/picker/components/pickerImplBase.component.js.map +0 -1
  458. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  459. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  460. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  461. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  462. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  463. package/es2015/src/picker/directives/index.js.map +0 -1
  464. package/es2015/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  465. package/es2015/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  466. package/es2015/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  467. package/es2015/src/picker/interfaces.js.map +0 -1
  468. package/es2015/src/picker/misc/datetimePicker.interface.js.map +0 -1
  469. package/es2015/src/picker/misc/tokens.js.map +0 -1
  470. package/es2015/src/picker/modules/picker.module.js.map +0 -1
  471. package/es2015/src/picker/types.js.map +0 -1
  472. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  473. package/es2015/src/selector/components/selector/selector.component.animations.js.map +0 -1
  474. package/es2015/src/selector/components/selector/selector.component.js.map +0 -1
  475. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  476. package/es2015/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  477. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  478. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  479. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  480. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  481. package/es2015/src/selector/interfaces.js.map +0 -1
  482. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  483. package/es2015/src/selector/misc/tokens.js.map +0 -1
  484. package/es2015/src/selector/modules/basicSelector.module.js.map +0 -1
  485. package/es2015/src/selector/modules/selector.module.js.map +0 -1
  486. package/es2015/src/selector/types.js.map +0 -1
  487. package/es2015/src/services/dateApi.interface.js.map +0 -1
  488. package/es2015/src/services/datePositionParser.interface.js.map +0 -1
  489. package/es2015/src/services/datePositionParser.service.js.map +0 -1
  490. package/es2015/src/services/dateTimeRelativeParser.service.js.map +0 -1
  491. package/es2015/src/services/dateValueProvider.service.js.map +0 -1
  492. package/es2015/src/services/formatProvider.interface.js.map +0 -1
  493. package/es2020/src/misc/datetime.interface.js.map +0 -1
  494. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  495. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  496. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  497. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  498. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  499. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  500. package/es2020/src/picker/components/picker/picker.component.animations.js.map +0 -1
  501. package/es2020/src/picker/components/picker/picker.component.js.map +0 -1
  502. package/es2020/src/picker/components/pickerBase.component.js.map +0 -1
  503. package/es2020/src/picker/components/pickerImplBase.component.js.map +0 -1
  504. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  505. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  506. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  507. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  508. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  509. package/es2020/src/picker/directives/index.js.map +0 -1
  510. package/es2020/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  511. package/es2020/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  512. package/es2020/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  513. package/es2020/src/picker/interfaces.js.map +0 -1
  514. package/es2020/src/picker/misc/datetimePicker.interface.js.map +0 -1
  515. package/es2020/src/picker/misc/tokens.js.map +0 -1
  516. package/es2020/src/picker/modules/picker.module.js.map +0 -1
  517. package/es2020/src/picker/types.js.map +0 -1
  518. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  519. package/es2020/src/selector/components/selector/selector.component.animations.js.map +0 -1
  520. package/es2020/src/selector/components/selector/selector.component.js.map +0 -1
  521. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  522. package/es2020/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  523. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  524. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  525. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  526. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  527. package/es2020/src/selector/interfaces.js.map +0 -1
  528. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  529. package/es2020/src/selector/misc/tokens.js.map +0 -1
  530. package/es2020/src/selector/modules/basicSelector.module.js.map +0 -1
  531. package/es2020/src/selector/modules/selector.module.js.map +0 -1
  532. package/es2020/src/selector/types.js.map +0 -1
  533. package/es2020/src/services/dateApi.interface.js.map +0 -1
  534. package/es2020/src/services/datePositionParser.interface.js.map +0 -1
  535. package/es2020/src/services/datePositionParser.service.js.map +0 -1
  536. package/es2020/src/services/dateTimeRelativeParser.service.js.map +0 -1
  537. package/es2020/src/services/dateValueProvider.service.js.map +0 -1
  538. package/es2020/src/services/formatProvider.interface.js.map +0 -1
  539. package/src/misc/datetime.interface.d.ts.map +0 -1
  540. package/src/picker/components/dayPicker/dayPicker.component.html +0 -21
  541. package/src/picker/components/monthPicker/monthPicker.component.html +0 -13
  542. package/src/picker/components/picker/picker.component.html +0 -3
  543. package/src/picker/components/yearPicker/yearPicker.component.html +0 -13
  544. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +0 -1
  545. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +0 -1
  546. package/src/services/dateApi.interface.d.ts.map +0 -1
@@ -0,0 +1,152 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Directive, Input } from '@angular/core';
3
+ import { BindThis, isBlank } from '@jscrpt/common';
4
+ import { getSingleDateTimeValue } from '../../../misc/utils';
5
+ import { DateTimeBase } from './dateTimeBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Base class for date time directives with value restrictions
9
+ */
10
+ export class DateTimeRestrictedBase extends DateTimeBase {
11
+ //######################### public properties - inputs #########################
12
+ /**
13
+ * Gets or sets max allowed date for date time
14
+ */
15
+ get maxDateTime() {
16
+ return this.ɵMaxDateTime;
17
+ }
18
+ set maxDateTime(value) {
19
+ var _a;
20
+ (_a = this._maxDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
21
+ this._maxDateInstanceChange = null;
22
+ if (isBlank(value)) {
23
+ this.maxDateSet(value);
24
+ return;
25
+ }
26
+ let val = value;
27
+ if (value instanceof (DateTimeBase)) {
28
+ this._maxDateInstanceChange = value.valueChange.subscribe(() => {
29
+ const val = getSingleDateTimeValue(value.value);
30
+ if (isBlank(val)) {
31
+ this.maxDateSet(null);
32
+ return;
33
+ }
34
+ this.setMinMaxValue(val, this.maxDateSet);
35
+ });
36
+ const v = getSingleDateTimeValue(value.value);
37
+ if (isBlank(v)) {
38
+ this.maxDateSet(null);
39
+ return;
40
+ }
41
+ val = v;
42
+ }
43
+ this.setMinMaxValue(val, this.maxDateSet);
44
+ }
45
+ /**
46
+ * Gets or sets min allowed date for date time
47
+ */
48
+ get minDateTime() {
49
+ return this.ɵMinDateTime;
50
+ }
51
+ set minDateTime(value) {
52
+ var _a;
53
+ (_a = this._minDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
54
+ this._minDateInstanceChange = null;
55
+ if (isBlank(value)) {
56
+ this.minDateSet(value);
57
+ return;
58
+ }
59
+ let val = value;
60
+ if (value instanceof (DateTimeBase)) {
61
+ this._minDateInstanceChange = value.valueChange.subscribe(() => {
62
+ const val = getSingleDateTimeValue(value.value);
63
+ if (isBlank(val)) {
64
+ this.minDateSet(null);
65
+ return;
66
+ }
67
+ this.setMinMaxValue(val, this.minDateSet);
68
+ });
69
+ const v = getSingleDateTimeValue(value.value);
70
+ if (isBlank(v)) {
71
+ this.minDateSet(null);
72
+ return;
73
+ }
74
+ val = v;
75
+ }
76
+ this.setMinMaxValue(val, this.minDateSet);
77
+ }
78
+ //######################### public methods - implementation of OnDestroy #########################
79
+ /**
80
+ * Called when component is destroyed
81
+ */
82
+ ngOnDestroy() {
83
+ var _a, _b;
84
+ (_a = this._maxDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
85
+ this._maxDateInstanceChange = null;
86
+ (_b = this._minDateInstanceChange) === null || _b === void 0 ? void 0 : _b.unsubscribe();
87
+ this._minDateInstanceChange = null;
88
+ }
89
+ //######################### protected methods #########################
90
+ /**
91
+ * Called whenever max date time restriction changes
92
+ */
93
+ onMaxDateTimeChange() {
94
+ }
95
+ /**
96
+ * Called whenever min date time restriction changes
97
+ */
98
+ onMinDateTimeChange() {
99
+ }
100
+ /**
101
+ * Sets min date time and notifies about changes
102
+ * @param value - Value to be set
103
+ */
104
+ minDateSet(value) {
105
+ this.ɵMinDateTime = value;
106
+ this.onMinDateTimeChange();
107
+ }
108
+ /**
109
+ * Sets max date time and notifies about changes
110
+ * @param value - Value to be set
111
+ */
112
+ maxDateSet(value) {
113
+ this.ɵMaxDateTime = value;
114
+ this.onMaxDateTimeChange();
115
+ }
116
+ /**
117
+ * Sets min or max date time value
118
+ * @param value - Value to be set
119
+ * @param setter - Action used for setting value
120
+ */
121
+ setMinMaxValue(value, setter) {
122
+ const val = this.dateApi.getValue(value, this.customFormat);
123
+ if (val.isValid()) {
124
+ setter(val.value);
125
+ }
126
+ else {
127
+ setter(null);
128
+ }
129
+ }
130
+ }
131
+ DateTimeRestrictedBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
132
+ DateTimeRestrictedBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeRestrictedBase, inputs: { maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, usesInheritance: true, ngImport: i0 });
133
+ __decorate([
134
+ BindThis,
135
+ __metadata("design:type", Function),
136
+ __metadata("design:paramtypes", [Object]),
137
+ __metadata("design:returntype", void 0)
138
+ ], DateTimeRestrictedBase.prototype, "minDateSet", null);
139
+ __decorate([
140
+ BindThis,
141
+ __metadata("design:type", Function),
142
+ __metadata("design:paramtypes", [Object]),
143
+ __metadata("design:returntype", void 0)
144
+ ], DateTimeRestrictedBase.prototype, "maxDateSet", null);
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, decorators: [{
146
+ type: Directive
147
+ }], propDecorators: { maxDateTime: [{
148
+ type: Input
149
+ }], minDateTime: [{
150
+ type: Input
151
+ }], minDateSet: [], maxDateSet: [] } });
152
+ //# sourceMappingURL=dateTimeRestrictedBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeRestrictedBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/dateTimeRestrictedBase.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAU,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;;AAE5C;;GAEG;AAEH,MAAM,OAAO,sBAAwC,SAAQ,YAAmB;IA0B5E,gFAAgF;IAEhF;;OAEG;IACH,IACW,WAAW;QAElB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,IAAW,WAAW,CAAC,KAA2B;;QAE9C,MAAA,IAAI,CAAC,sBAAsB,0CAAE,WAAW,EAAE,CAAC;QAC3C,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QAEnC,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAEvB,OAAO;SACV;QAED,IAAI,GAAG,GAAoC,KAAK,CAAC;QAEjD,IAAG,KAAK,aAAY,YAAmB,CAAA,EACvC;YACI,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE;gBAE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AAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACrB;aAED;YACI,MAAM,CAAC,IAAI,CAAC,CAAC;SAChB;IACL,CAAC;;mHA3MQ,sBAAsB;uGAAtB,sBAAsB;;IAwK9B,QAAQ;;;;wDAKR;;IAMA,QAAQ;;;;wDAKR;2FAxLQ,sBAAsB;kBADlC,SAAS;8BAiCK,WAAW;sBADrB,KAAK;gBAsDK,WAAW;sBADrB,KAAK;gBAqFI,UAAU,MAWV,UAAU","sourcesContent":["import {Directive, Input, OnDestroy} from '@angular/core';\nimport {Action1, BindThis, isBlank} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputOutputValue} from '../../../misc/types';\nimport {getSingleDateTimeValue} from '../../../misc/utils';\nimport {DateTimeBase} from './dateTimeBase';\n\n/**\n * Base class for date time directives with value restrictions\n */\n@Directive()\nexport class DateTimeRestrictedBase<TDate = unknown> extends DateTimeBase<TDate> implements OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for max date instance value changes\n */\n private _maxDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Subscription for min date instance value changes\n */\n private _minDateInstanceChange: Subscription|undefined|null;\n\n //######################### protected properties #########################\n\n /**\n * Max allowed value of date time\n */\n protected ɵMaxDateTime: TDate|undefined|null;\n\n /**\n * Min allowed value of date time\n */\n protected ɵMinDateTime: TDate|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets max allowed date for date time\n */\n @Input()\n public get maxDateTime(): TDate|undefined|null\n {\n return this.ɵMaxDateTime;\n }\n public set maxDateTime(value: TDate|undefined|null)\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.maxDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._maxDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.maxDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n val = v;\n }\n \n this.setMinMaxValue(val, this.maxDateSet);\n }\n\n /**\n * Gets or sets min allowed date for date time\n */\n @Input()\n public get minDateTime(): TDate|undefined|null\n {\n return this.ɵMinDateTime;\n }\n public set minDateTime(value: TDate|undefined|null)\n {\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.minDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._minDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.minDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.minDateSet(null);\n\n return;\n }\n\n val = v;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n\n /**\n * Sets min date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected minDateSet(value: TDate|undefined|null): void\n {\n this.ɵMinDateTime = value;\n this.onMinDateTimeChange();\n }\n\n /**\n * Sets max date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected maxDateSet(value: TDate|undefined|null): void\n {\n this.ɵMaxDateTime = value;\n this.onMaxDateTimeChange();\n }\n\n /**\n * Sets min or max date time value\n * @param value - Value to be set\n * @param setter - Action used for setting value\n */\n protected setMinMaxValue(value: string|number|TDate|Date, setter: Action1<TDate|undefined|null>): void\n {\n const val = this.dateApi.getValue(value, this.customFormat);\n\n if(val.isValid())\n {\n setter(val.value);\n }\n else\n {\n setter(null);\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `maxDateTime` input\n */\n public static ngAcceptInputType_maxDateTime: string|number|DateTimeBase|Date;\n\n /**\n * Custom input type for `minDateTime` input\n */\n public static ngAcceptInputType_minDateTime: string|number|DateTimeBase|Date;\n}\n"]}
@@ -0,0 +1,64 @@
1
+ import { Directive, forwardRef, Inject } from '@angular/core';
2
+ import { NG_VALIDATORS } from '@angular/forms';
3
+ import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
4
+ import { datetimeValidator } from '../../../../misc/validators';
5
+ import { DateTimeBase } from '../dateTimeBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Applies validator for date time
9
+ */
10
+ export class DateTimeValidatorDirective extends DateTimeBase {
11
+ //######################### constructor #########################
12
+ constructor(dateApi, formatProvider) {
13
+ super(dateApi, formatProvider);
14
+ //######################### private fields #########################
15
+ /**
16
+ * Function used for validations
17
+ */
18
+ this._validator = () => null;
19
+ }
20
+ //######################### public methods - implementation of OnInit #########################
21
+ /**
22
+ * Initialize component
23
+ */
24
+ ngOnInit() {
25
+ this._validator = datetimeValidator(this.dateApi, this.valueFormat, this.customFormat);
26
+ }
27
+ //######################### public methods - implementation of Validator #########################
28
+ /**
29
+ * Validates input and returns validation result
30
+ * @param control - Control that is being validated
31
+ * @returns validation results
32
+ */
33
+ validate(control) {
34
+ return this._validator(control);
35
+ }
36
+ }
37
+ DateTimeValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeValidatorDirective, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Directive });
38
+ DateTimeValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeValidatorDirective, selector: "[dateTime][validate]", providers: [
39
+ {
40
+ provide: NG_VALIDATORS,
41
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
42
+ multi: true
43
+ },
44
+ ], usesInheritance: true, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeValidatorDirective, decorators: [{
46
+ type: Directive,
47
+ args: [{
48
+ selector: '[dateTime][validate]',
49
+ providers: [
50
+ {
51
+ provide: NG_VALIDATORS,
52
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
53
+ multi: true
54
+ },
55
+ ],
56
+ }]
57
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
58
+ type: Inject,
59
+ args: [DATE_API]
60
+ }] }, { type: undefined, decorators: [{
61
+ type: Inject,
62
+ args: [FORMAT_PROVIDER]
63
+ }] }]; } });
64
+ //# sourceMappingURL=dateTimeValidator.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAGxG,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAcH,MAAM,OAAO,0BAA4C,SAAQ,YAAmB;IAShF,iEAAiE;IACjE,YAA8B,OAAuB,EAChB,cAA8B;QAE/D,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAXnC,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAO7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3F,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;uHApCQ,0BAA0B,kBAUf,QAAQ,aACR,eAAe;2GAX1B,0BAA0B,+CATnC;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;YACzD,KAAK,EAAE,IAAI;SACd;KACJ;2FAEQ,0BAA0B;kBAbtC,SAAS;mBACV;oBACI,QAAQ,EAAE,sBAAsB;oBAChC,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,2BAA2B,CAAC;4BACzD,KAAK,EAAE,IAAI;yBACd;qBACJ;iBACJ;;0BAWgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {FormatProvider} from '../../../../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {datetimeValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time\n */\n@Directive(\n{\n selector: '[dateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeValidatorDirective),\n multi: true\n },\n ],\n})\nexport class DateTimeValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider,)\n {\n super(dateApi, formatProvider);\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeValidator(this.dateApi, this.valueFormat, this.customFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
@@ -0,0 +1,8 @@
1
+ export * from './dateTimeBase';
2
+ export * from './dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive';
3
+ export * from './dateTimeInput/dateTimeInput.directive';
4
+ export * from './dateTimeMaxValidator/dateTimeMaxValidator.directive';
5
+ export * from './dateTimeMinValidator/dateTimeMinValidator.directive';
6
+ export * from './dateTimeRestrictedBase';
7
+ export * from './dateTimeValidator/dateTimeValidator.directive';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uEAAuE,CAAC;AACtF,cAAc,yCAAyC,CAAC;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,0BAA0B,CAAC;AACzC,cAAc,iDAAiD,CAAC","sourcesContent":["export * from './dateTimeBase';\nexport * from './dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive';\nexport * from './dateTimeInput/dateTimeInput.directive';\nexport * from './dateTimeMaxValidator/dateTimeMaxValidator.directive';\nexport * from './dateTimeMinValidator/dateTimeMinValidator.directive';\nexport * from './dateTimeRestrictedBase';\nexport * from './dateTimeValidator/dateTimeValidator.directive';\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './directives';
2
+ export * from './modules';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dateTime/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC","sourcesContent":["export * from './directives';\nexport * from './modules';\n"]}
@@ -0,0 +1,39 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { DateTimeControlValueAccessorDirective, DateTimeInputDirective, DateTimeMaxValidatorDirective, DateTimeMinValidatorDirective, DateTimeValidatorDirective } from '../directives';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Module for basic date time directives, components, pipes
6
+ */
7
+ export class DateTimeModule {
8
+ }
9
+ DateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ DateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateTimeModule, declarations: [DateTimeControlValueAccessorDirective,
11
+ DateTimeInputDirective,
12
+ DateTimeMaxValidatorDirective,
13
+ DateTimeMinValidatorDirective,
14
+ DateTimeValidatorDirective], exports: [DateTimeControlValueAccessorDirective,
15
+ DateTimeInputDirective,
16
+ DateTimeMaxValidatorDirective,
17
+ DateTimeMinValidatorDirective,
18
+ DateTimeValidatorDirective] });
19
+ DateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeModule });
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeModule, decorators: [{
21
+ type: NgModule,
22
+ args: [{
23
+ declarations: [
24
+ DateTimeControlValueAccessorDirective,
25
+ DateTimeInputDirective,
26
+ DateTimeMaxValidatorDirective,
27
+ DateTimeMinValidatorDirective,
28
+ DateTimeValidatorDirective,
29
+ ],
30
+ exports: [
31
+ DateTimeControlValueAccessorDirective,
32
+ DateTimeInputDirective,
33
+ DateTimeMaxValidatorDirective,
34
+ DateTimeMinValidatorDirective,
35
+ DateTimeValidatorDirective,
36
+ ],
37
+ }]
38
+ }] });
39
+ //# sourceMappingURL=dateTime.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTime.module.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/modules/dateTime.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,qCAAqC,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,0BAA0B,EAAC,MAAM,eAAe,CAAC;;AAEtL;;GAEG;AAoBH,MAAM,OAAO,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAfnB,qCAAqC;QACrC,sBAAsB;QACtB,6BAA6B;QAC7B,6BAA6B;QAC7B,0BAA0B,aAI1B,qCAAqC;QACrC,sBAAsB;QACtB,6BAA6B;QAC7B,6BAA6B;QAC7B,0BAA0B;4GAGrB,cAAc;2FAAd,cAAc;kBAnB1B,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,qCAAqC;wBACrC,sBAAsB;wBACtB,6BAA6B;wBAC7B,6BAA6B;wBAC7B,0BAA0B;qBAC7B;oBACD,OAAO,EACP;wBACI,qCAAqC;wBACrC,sBAAsB;wBACtB,6BAA6B;wBAC7B,6BAA6B;wBAC7B,0BAA0B;qBAC7B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateTimeControlValueAccessorDirective, DateTimeInputDirective, DateTimeMaxValidatorDirective, DateTimeMinValidatorDirective, DateTimeValidatorDirective} from '../directives';\n\n/**\n * Module for basic date time directives, components, pipes\n */\n@NgModule(\n{\n declarations:\n [\n DateTimeControlValueAccessorDirective,\n DateTimeInputDirective,\n DateTimeMaxValidatorDirective,\n DateTimeMinValidatorDirective,\n DateTimeValidatorDirective,\n ],\n exports:\n [\n DateTimeControlValueAccessorDirective,\n DateTimeInputDirective,\n DateTimeMaxValidatorDirective,\n DateTimeMinValidatorDirective,\n DateTimeValidatorDirective,\n ],\n})\nexport class DateTimeModule\n{\n}"]}
@@ -0,0 +1,2 @@
1
+ export * from './dateTime.module';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './dateTime.module';\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './datePipes.module';
2
+ export * from './dateTime';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC","sourcesContent":["export * from './datePipes.module';\nexport * from './dateTime';\n"]}
@@ -23,9 +23,9 @@ export class DateConvertPipe {
23
23
  return null;
24
24
  }
25
25
  }
26
- DateConvertPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateConvertPipe, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe });
27
- DateConvertPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateConvertPipe, name: "dateConvert" });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateConvertPipe, decorators: [{
26
+ DateConvertPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateConvertPipe, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe });
27
+ DateConvertPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateConvertPipe, name: "dateConvert" });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateConvertPipe, decorators: [{
29
29
  type: Pipe,
30
30
  args: [{ name: 'dateConvert' }]
31
31
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -30,9 +30,9 @@ export class DateFormatPipe {
30
30
  return '';
31
31
  }
32
32
  }
33
- DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFormatPipe, deps: [{ token: FORMAT_PROVIDER }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe });
34
- DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFormatPipe, name: "dateFormat" });
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateFormatPipe, decorators: [{
33
+ DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateFormatPipe, deps: [{ token: FORMAT_PROVIDER }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe });
34
+ DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateFormatPipe, name: "dateFormat" });
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateFormatPipe, decorators: [{
36
36
  type: Pipe,
37
37
  args: [{ name: 'dateFormat' }]
38
38
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;;AAGzD;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAED,sGAAsG;IAEtG;;;;;OAKG;IACI,SAAS,CAAC,KAAsB,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,WAAoB;QAE/H,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC;YACI,MAAM,GAAS,IAAI,CAAC,eAAgB,CAAC,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB;YACI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC1D;QAED,OAAO,EAAE,CAAC;IACd,CAAC;;2GAhCQ,cAAc,kBAGH,eAAe,aACf,QAAQ;yGAJnB,cAAc;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\nimport {DATE_API, FORMAT_PROVIDER} from '../misc/tokens';\nimport {DateApi, DateValue, FormatProvider} from '../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = any> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - Format that is used for formatting, can be also 'FormatProvider' key\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormat?: string): string\n {\n //format provider value\n if(format in this._formatProvider)\n {\n format = (<any>this._formatProvider)[format];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}"]}
1
+ {"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;;AAGzD;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAED,sGAAsG;IAEtG;;;;;OAKG;IACI,SAAS,CAAC,KAAsB,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,WAAoB;QAE/H,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC;YACI,MAAM,GAAS,IAAI,CAAC,eAAgB,CAAC,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB;YACI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC1D;QAED,OAAO,EAAE,CAAC;IACd,CAAC;;2GAhCQ,cAAc,kBAGH,eAAe,aACf,QAAQ;yGAJnB,cAAc;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\nimport {FormatProvider} from '../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../misc/tokens';\nimport {DateApi, DateValue} from '../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = any> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - Format that is used for formatting, can be also 'FormatProvider' key\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormat?: string): string\n {\n //format provider value\n if(format in this._formatProvider)\n {\n format = (<any>this._formatProvider)[format];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateApi.interface.js","sourceRoot":"","sources":["../../../../src/services/dateApi/dateApi.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Date can be represented as formatted string, timestamp or javascript Date object\n */\nexport type DateValue = Date|string|number;\n\n/**\n * Definition of type, that is used for creating instance of DateApiObject\n */\nexport interface DateApiObjectCtor<TObject extends DateApiObject<TDate> = any, TDate = any>\n{\n new (value: TDate|DateValue, format?: string, ...additionalParams: any[]): TObject;\n}\n\n/**\n * Instance of object wrapping TDate, allowing manipulation with it\n */\nexport interface DateApiObject<TDate = any>\n{\n /**\n * Original value that is not changed unless 'updateOriginal' is called\n */\n readonly originalValue: TDate;\n\n /**\n * Instance of date\n */\n readonly value: TDate;\n\n /**\n * Gets indication whether provided instance of date is valid\n */\n isValid(): boolean;\n\n /**\n * Gets indication whether provided instance of date is weekend day\n */\n isWeekend(): boolean;\n\n /**\n * Formats date value\n * @param format - Format token used for creating formatted string\n */\n format(format: string): string;\n\n /**\n * Gets value of date time as unix timestamp\n */\n unixTimestamp(): number;\n\n /**\n * Updates value to start date and time of current decade\n * @returns Itself for fluent API\n */\n startOfDecade(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current decade\n * @returns Itself for fluent API\n */\n endOfDecade(): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current year\n * @returns Itself for fluent API\n */\n startOfYear(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current year\n * @returns Itself for fluent API\n */\n endOfYear(): DateApiObject<TDate>;\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 addYears(count?: number): DateApiObject<TDate>;\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 subtractYears(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current month\n * @returns Itself for fluent API\n */\n startOfMonth(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current month\n * @returns Itself for fluent API\n */\n endOfMonth(): DateApiObject<TDate>;\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 addMonths(count?: number): DateApiObject<TDate>;\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 subtractMonths(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current week\n * @returns Itself for fluent API\n */\n startOfWeek(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current week\n * @returns Itself for fluent API\n */\n endOfWeek(): DateApiObject<TDate>;\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 addWeeks(count?: number): DateApiObject<TDate>;\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 subtractWeeks(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current day\n * @returns Itself for fluent API\n */\n startOfDay(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current day\n * @returns Itself for fluent API\n */\n endOfDay(): DateApiObject<TDate>;\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 addDays(count?: number): DateApiObject<TDate>;\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 subtractDays(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current hour\n * @returns Itself for fluent API\n */\n startOfHour(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current hour\n * @returns Itself for fluent API\n */\n endOfHour(): DateApiObject<TDate>;\n\n /**\n * Add hours, if count not specified adds 1 hour\n * @param count - Number of hours count\n * @returns Itself for fluent API\n */\n addHours(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract hours, if count not specified subtract 1 hour\n * @param count - Number of hours count\n * @returns Itself for fluent API\n */\n subtractHours(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current minute\n * @returns Itself for fluent API\n */\n startOfMinute(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current minute\n * @returns Itself for fluent API\n */\n endOfMinute(): DateApiObject<TDate>;\n\n /**\n * Add minutes, if count not specified adds 1 minute\n * @param count - Number of minutes count\n * @returns Itself for fluent API\n */\n addMinutes(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract minutes, if count not specified subtract 1 minute\n * @param count - Number of minutes count\n * @returns Itself for fluent API\n */\n subtractMinutes(count?: number): DateApiObject<TDate>;\n\n /**\n * Gets number of days in month\n */\n daysInMonth(): number;\n\n /**\n * Gets year\n */\n year(): number;\n /**\n * Sets year\n * @param year - Year to be set\n */\n year(year: number): DateApiObject<TDate>;\n /**\n * Gets or sets year\n * @param year - If specified, sets year\n */\n year(year?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets month\n */\n month(): number;\n /**\n * Sets month\n * @param month - Month to be set\n */\n month(month: number): DateApiObject<TDate>;\n /**\n * Gets or sets month\n * @param month - If specified, sets month\n */\n month(month?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets day of month one based\n */\n dayOfMonth(): number;\n /**\n * Sets day of month one based\n * @param day - Day of month to be set\n */\n dayOfMonth(day: number): DateApiObject<TDate>;\n /**\n * Gets or sets day of month one based\n * @param day - If specified, sets day of month\n */\n dayOfMonth(day?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets day of week zero based, first is monday\n */\n dayOfWeek(): number;\n /**\n * Sets day of week zero based, first is monday\n * @param day - Day of week to be set\n */\n dayOfWeek(day: number): DateApiObject<TDate>;\n /**\n * Gets or sets day of week zero based, first is monday\n * @param day - If specified, sets day of week\n */\n dayOfWeek(day?: number): number|DateApiObject<TDate>;\n\n /**\n * Gets hours zero based\n */\n hour(): number;\n /**\n * Sets hours zero\n * @param hour - hour to be set\n */\n hour(hour: number): DateApiObject<TDate>;\n /**\n * Gets or sets hours zero\n * @param hour - If specified, sets hour\n */\n hour(hour?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets minutes zero based\n */\n minute(): number;\n /**\n * Sets minutes zero based\n * @param minute - minutes to be set\n */\n minute(minute: number): DateApiObject<TDate>;\n /**\n * Gets or sets minutes zero based\n * @param minute - If specified, sets minutes\n */\n minute(minute?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets indication whether current value is before 'date'\n * @param date - Date which is this date compared to\n */\n isBefore(date: TDate): boolean;\n\n /**\n * Gets indication whether current value is after 'date'\n * @param date - Date which is this date compared to\n */\n isAfter(date: TDate): boolean;\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 diffDays(date: TDate): number;\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 isSameWeek(date: TDate): boolean;\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 isSameDecade(date: TDate): boolean;\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 isSameYear(date: TDate): boolean;\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 isSameMonth(date: TDate): boolean;\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 isSameDay(date: TDate): boolean;\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from value\n */\n clone(): DateApiObject<TDate>;\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from originalValue\n */\n cloneOriginal(): DateApiObject<TDate>;\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 updateOriginal(value?: TDate): DateApiObject<TDate>;\n\n /**\n * Changes value to same value as originalValue\n * @returns Itself for fluent API\n */\n resetOriginal(): DateApiObject<TDate>;\n}\n\n/**\n * Date api abstraction, used for obtaining DateApi wrapper object\n */\nexport interface DateApi<TDate = any, TDateApiObject extends DateApiObject<TDate> = DateApiObject<TDate>>\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 getValue(value: DateValue|TDate, format?: string): TDateApiObject;\n\n /**\n * Gets wrapping object used for manipulation instantiated to current date and time\n */\n now(): TDateApiObject;\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 getFormat(pseudoFormat: string): string;\n\n /**\n * Gets information\n */\n weekStartsOnMonday(): boolean;\n\n /**\n * Gets array of weekday names in short format, order of days is dependent on locale\n */\n weekdaysShort(): string[];\n\n /**\n * Tests whether is value TDate\n * @param value - Value to be tested whether is TDate\n */\n isDate(value: unknown): value is TDate;\n}"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePositionParser.interface.js","sourceRoot":"","sources":["../../../../src/services/datePositionParser/datePositionParser.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Parser used for parsing date using provided format and returning positions and selected date part\n */\nexport interface DatePositionParser\n{\n /**\n * Parse date as string and returns information about positions and selected part of date\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n parse(date: string, cursorPosition: number): DatePositionParserResult;\n\n /**\n * Parse date as string and returns information about position and selected part of date, while moving it to next part, if it was last part returns null\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n next(date: string, cursorPosition: number): null|DatePositionParserResult;\n\n /**\n * Parse date as string and returns information about position and selected part of date, while moving it to previous part, if it was first part returns null\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n previous(date: string, cursorPosition: number): null|DatePositionParserResult;\n}\n\n/**\n * Result of date position parsing\n */\nexport interface DatePositionParserResult\n{\n /**\n * Index of charater where returned part of date starts\n */\n positionFrom: number;\n\n /**\n * Index of charater where returned part of date ends\n */\n positionTo: number;\n\n /**\n * Type of part that is selected\n */\n part: string;\n}"]}
@@ -14,9 +14,9 @@ export class DatePositionParserService {
14
14
  return new DefaultDatePositionParser(format);
15
15
  }
16
16
  }
17
- DatePositionParserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePositionParserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
- DatePositionParserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePositionParserService, providedIn: 'root' });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePositionParserService, decorators: [{
17
+ DatePositionParserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePositionParserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
+ DatePositionParserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePositionParserService, providedIn: 'root' });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePositionParserService, decorators: [{
20
20
  type: Injectable,
21
21
  args: [{ providedIn: 'root' }]
22
22
  }] });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePositionParser.service.js","sourceRoot":"","sources":["../../../../src/services/datePositionParser/datePositionParser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAIvC;;GAEG;AAEH,MAAM,OAAO,yBAAyB;IAElC,oEAAoE;IAEpE;;;OAGG;IACI,YAAY,CAAC,MAAc;QAE9B,OAAO,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;;sHAXQ,yBAAyB;0H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C,MAAM,GAAG,SAAS,CAAC;SACpF;IACL,CAAC;CACJ","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\n\nimport {DatePositionParser, DatePositionParserResult} from './datePositionParser.interface';\n\n/**\n * Service used for parsing date\n */\n@Injectable({providedIn: 'root'})\nexport class DatePositionParserService\n{\n //######################### public methods #########################\n\n /**\n * Creates parser instance for specified format\n * @param format - Format to be used for parsing date string\n */\n public createParser(format: string): DatePositionParser\n {\n return new DefaultDatePositionParser(format);\n }\n}\n\n/**\n * Default implementation of DatePositionParser\n */\nexport class DefaultDatePositionParser implements DatePositionParser\n{\n //######################### protected fields #########################\n\n /**\n * Indication whether format contains separators\n */\n protected _hasSeparator: boolean = false;\n\n /**\n * Array of date parts of parsed date format\n */\n protected _datePartsIndexes: string[] = [];\n\n /**\n * Object storing indexes for strict date parts of parsed date format\n */\n protected _strictDatePartsIndexes: {[index: number]: {part: string, length: number}} = {};\n\n //######################### constructor #########################\n constructor(protected _format: string)\n {\n this._initialize();\n }\n\n //######################### public methods - implementation of DatePositionParser #########################\n\n /**\n * Parse date as string and returns information about position and selected part of date, while moving it to next part, if it was last part returns null\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n public next(date: string|null|undefined, cursorPosition: number): null|DatePositionParserResult\n {\n if(isBlank(date))\n {\n return null;\n }\n\n //non strict format\n if(this._hasSeparator)\n {\n let useNext = false;\n\n while(true)\n {\n if(cursorPosition == date.length)\n {\n return null;\n }\n\n if(useNext && !isNaN(+date[cursorPosition]))\n {\n return this.parse(date, cursorPosition);\n }\n\n if(isNaN(+date[cursorPosition]))\n {\n useNext = true;\n }\n\n cursorPosition++;\n }\n }\n //strict format\n else\n {\n const indexes = Object.keys(this._strictDatePartsIndexes).map(itm => +itm);\n\n for(const index of indexes)\n {\n if(cursorPosition < index)\n {\n return {\n part: this._strictDatePartsIndexes[index].part,\n positionFrom: index,\n positionTo: index + this._strictDatePartsIndexes[index].length\n };\n }\n }\n }\n\n return null;\n }\n\n /**\n * Parse date as string and returns information about position and selected part of date, while moving it to previous part, if it was first part returns null\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n public previous(date: string|null|undefined, cursorPosition: number): null|DatePositionParserResult\n {\n if(isBlank(date))\n {\n return null;\n }\n\n //non strict format\n if(this._hasSeparator)\n {\n let useNext = false;\n\n while(true)\n {\n if(cursorPosition < 0)\n {\n return null;\n }\n\n if(useNext && !isNaN(+date[cursorPosition]))\n {\n return this.parse(date, cursorPosition);\n }\n\n if(isNaN(+date[cursorPosition]))\n {\n useNext = true;\n }\n\n cursorPosition--;\n }\n }\n //strict format\n else\n {\n const indexes = Object.keys(this._strictDatePartsIndexes).reverse().map(itm => +itm);\n\n for(const index of indexes)\n {\n if(cursorPosition > index)\n {\n return {\n part: this._strictDatePartsIndexes[index].part,\n positionFrom: index,\n positionTo: index + this._strictDatePartsIndexes[index].length\n };\n }\n }\n }\n\n return null;\n }\n\n /**\n * Parse date as string and returns information about positions and selected part of date\n * @param date - String date to be parsed\n * @param cursorPosition - Current cursor position\n */\n public parse(date: string|null|undefined, cursorPosition: number): DatePositionParserResult\n {\n if(isBlank(date))\n {\n return {\n part: '',\n positionFrom: 0,\n positionTo: 0\n };\n }\n\n //non strict format\n if(this._hasSeparator)\n {\n //fix cursor position if is clicked on separator\n if(cursorPosition != date.length &&\n /[^0-9ɵ]/.test(date[cursorPosition]) &&\n /[^0-9ɵ]/.test(date[cursorPosition - 1]))\n {\n let breakCycle = false;\n cursorPosition++;\n\n while(/[^0-9ɵ]/.test(date[cursorPosition]))\n {\n if(cursorPosition >= date.length)\n {\n if(breakCycle)\n {\n return {\n part: '',\n positionFrom: 0,\n positionTo: 0\n };\n }\n\n breakCycle = true;\n cursorPosition = 0;\n }\n\n cursorPosition++;\n }\n }\n\n const updateDate = [date.substr(0, cursorPosition), 'ɵ', date.substr(cursorPosition)].join('');\n const indexed = updateDate.replace(/[^0-9ɵ]/g, ' ').split(' ');\n let partIndex = 0;\n let startPosition = 0;\n let selectionLength = 0;\n\n for(const itm of indexed)\n {\n //this segment contains cursor\n if(itm.indexOf('ɵ') >= 0)\n {\n selectionLength = itm.length - 1;\n\n break;\n }\n\n startPosition++;\n\n //separator\n if(!itm.length)\n {\n continue;\n }\n\n partIndex++;\n startPosition += itm.length;\n }\n\n return {\n part: this._datePartsIndexes[partIndex],\n positionFrom: startPosition,\n positionTo: startPosition + selectionLength\n };\n }\n //strict format\n else\n {\n const indexes = Object.keys(this._strictDatePartsIndexes).reverse().map(itm => +itm);\n\n for(const index of indexes)\n {\n if(cursorPosition >= index)\n {\n return {\n part: this._strictDatePartsIndexes[index].part,\n positionFrom: index,\n positionTo: index + this._strictDatePartsIndexes[index].length\n };\n }\n }\n }\n\n return {\n part: '',\n positionFrom: 0,\n positionTo: 0\n };\n }\n\n /**\n * Initialize parser, process format\n */\n protected _initialize(): void\n {\n this._hasSeparator = /[^yqmwdhs]/i.test(this._format);\n\n //non strict format\n if(this._hasSeparator)\n {\n this._datePartsIndexes = this._format.replace(/[^yqmwdhs]+/gi, ' ')\n .split(' ')\n .filter(itm => !!itm)\n .map(itm => itm[0]);\n }\n //strict format\n else\n {\n let lastPart: string|null = null;\n let lastIndex: number = 0;\n\n for(let x = 0; x < this._format.length; x++)\n {\n //next part\n if(this._format[x] != lastPart)\n {\n if(x > 0)\n {\n this._strictDatePartsIndexes[lastIndex].length = x - lastIndex;\n }\n\n lastIndex = x;\n lastPart = this._format[x];\n\n this._strictDatePartsIndexes[x] =\n {\n length: 0,\n part: this._format[x]\n };\n }\n }\n\n this._strictDatePartsIndexes[lastIndex].length = this._format.length - lastIndex;\n }\n }\n}"]}
@@ -1,6 +1,6 @@
1
1
  import { Injectable, Injector } from '@angular/core';
2
2
  import { isString } from '@jscrpt/common';
3
- import { DATE_API } from '../misc/tokens';
3
+ import { DATE_API } from '../../misc/tokens';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Service used for parsing relative date time strings
@@ -16,26 +16,26 @@ export class DateTimeRelativeParser {
16
16
  * @param value - Value to be parsed
17
17
  *
18
18
  * @summary
19
- * i - for minutes
19
+ * m - for minutes
20
20
  * h - for hours
21
21
  * d - for days
22
22
  * w - for weeks
23
- * m - for months
23
+ * M - for months
24
24
  * y - for years
25
25
  */
26
26
  parse(value) {
27
27
  var _a;
28
- const regex = /([+-])\s*(\d+)\s*([ihdwmy])/;
28
+ const regex = /([+-])\s*(\d+)\s*([hmdwMy])/;
29
+ let matches = null;
29
30
  //relative date provided
30
- if (isString(value) && regex.test(value)) {
31
- const matches = regex.exec(value);
31
+ if (isString(value) && (matches = regex.exec(value))) {
32
32
  const operation = matches[1];
33
33
  const amount = matches[2];
34
34
  const period = matches[3];
35
35
  this._dateApi = (_a = this._dateApi) !== null && _a !== void 0 ? _a : this._injector.get(DATE_API);
36
36
  const now = this._dateApi.now();
37
37
  switch (period) {
38
- case 'i':
38
+ case 'm':
39
39
  {
40
40
  operation == '+' ? now.addMinutes(+amount).endOfMinute() : now.subtractMinutes(+amount).startOfMinute();
41
41
  break;
@@ -55,7 +55,7 @@ export class DateTimeRelativeParser {
55
55
  operation == '+' ? now.addWeeks(+amount).endOfDay() : now.subtractWeeks(+amount).startOfDay();
56
56
  break;
57
57
  }
58
- case 'm':
58
+ case 'M':
59
59
  {
60
60
  operation == '+' ? now.addMonths(+amount).endOfDay() : now.subtractMonths(+amount).startOfDay();
61
61
  break;
@@ -71,9 +71,9 @@ export class DateTimeRelativeParser {
71
71
  return value;
72
72
  }
73
73
  }
74
- DateTimeRelativeParser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeRelativeParser, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
75
- DateTimeRelativeParser.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeRelativeParser, providedIn: 'root' });
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeRelativeParser, decorators: [{
74
+ DateTimeRelativeParser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRelativeParser, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
75
+ DateTimeRelativeParser.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRelativeParser, providedIn: 'root' });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRelativeParser, decorators: [{
77
77
  type: Injectable,
78
78
  args: [{ providedIn: 'root' }]
79
79
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeRelativeParser.service.js","sourceRoot":"","sources":["../../../../src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;;AAG3C;;GAEG;AAEH,MAAM,OAAO,sBAAsB;IAS/B,iEAAiE;IACjE,YAAsB,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;IAEzC,CAAC;IAED,oEAAoE;IAEpE;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,KAAsB;;QAE/B,MAAM,KAAK,GAAG,6BAA6B,CAAC;QAC5C,IAAI,OAAO,GAA2B,IAAI,CAAC;QAE3C,wBAAwB;QACxB,IAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EACnD;YACI,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAA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,CAAC;wBAE9F,MAAM;qBACT;gBACD,KAAK,GAAG;oBACR;wBACI,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;wBAEhG,MAAM;qBACT;gBACD,KAAK,GAAG;oBACR;wBACI,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;wBAE9F,MAAM;qBACT;aACJ;YAED,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;SACrB;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;;mHAtFQ,sBAAsB;uHAAtB,sBAAsB,cADV,MAAM;2FAClB,sBAAsB;kBADlC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, Injector} from '@angular/core';\nimport {isString} from '@jscrpt/common';\n\nimport {DATE_API} from '../../misc/tokens';\nimport {DateApi, DateApiObject, DateValue} from '../dateApi/dateApi.interface';\n\n/**\n * Service used for parsing relative date time strings\n */\n@Injectable({providedIn: 'root'})\nexport class DateTimeRelativeParser<TDate = any>\n{\n //######################### protected fields #########################\n \n /**\n * Date api for handling\n */\n protected _dateApi?: DateApi<TDate, DateApiObject>;\n\n //######################### constructor #########################\n constructor(protected _injector: Injector)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Tries to parse relative value and returns parsed TDate, otherwise returns input value\n * @param value - Value to be parsed\n * \n * @summary\n * m - for minutes\n * h - for hours\n * d - for days\n * w - for weeks\n * M - for months\n * y - for years\n */\n public parse(value: TDate|DateValue): TDate|DateValue\n {\n const regex = /([+-])\\s*(\\d+)\\s*([hmdwMy])/;\n let matches: RegExpExecArray | null = null;\n\n //relative date provided\n if(isString(value) && (matches = regex.exec(value)))\n {\n const operation = matches[1];\n const amount = matches[2];\n const period = matches[3];\n this._dateApi = this._dateApi ?? this._injector.get(DATE_API);\n const now = this._dateApi.now();\n\n switch(period)\n {\n case 'm':\n {\n operation == '+' ? now.addMinutes(+amount).endOfMinute() : now.subtractMinutes(+amount).startOfMinute();\n\n break;\n }\n case 'h':\n {\n operation == '+' ? now.addHours(+amount).endOfHour() : now.subtractHours(+amount).startOfHour();\n\n break;\n }\n case 'd':\n {\n operation == '+' ? now.addDays(+amount).endOfDay() : now.subtractDays(+amount).startOfDay();\n\n break;\n }\n case 'w':\n {\n operation == '+' ? now.addWeeks(+amount).endOfDay() : now.subtractWeeks(+amount).startOfDay();\n\n break;\n }\n case 'M':\n {\n operation == '+' ? now.addMonths(+amount).endOfDay() : now.subtractMonths(+amount).startOfDay();\n\n break;\n }\n case 'y':\n {\n operation == '+' ? now.addYears(+amount).endOfDay() : now.subtractYears(+amount).startOfDay();\n\n break;\n }\n }\n\n value = now.value;\n }\n\n return value;\n }\n}"]}
@@ -1,5 +1,5 @@
1
1
  import { Inject, Injectable } from '@angular/core';
2
- import { DATE_API } from '../misc/tokens';
2
+ import { DATE_API } from '../../misc/tokens';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Class used for obtaining DateTimeValue for various formats
@@ -56,9 +56,9 @@ export class DateValueProvider {
56
56
  };
57
57
  }
58
58
  }
59
- DateValueProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateValueProvider, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Injectable });
60
- DateValueProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateValueProvider, providedIn: 'root' });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateValueProvider, decorators: [{
59
+ DateValueProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateValueProvider, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Injectable });
60
+ DateValueProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateValueProvider, providedIn: 'root' });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateValueProvider, decorators: [{
62
62
  type: Injectable,
63
63
  args: [{ providedIn: 'root' }]
64
64
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateValueProvider.service.js","sourceRoot":"","sources":["../../../../src/services/dateValueProvider/dateValueProvider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;;AAG3C;;GAEG;AAEH,MAAM,OAAO,iBAAiB;IAE1B,iEAAiE;IACjE,YAAwC,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;IAEhE,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,QAAQ,CAAC,KAAY,EAAE,MAAc;QAExC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAClD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,KAAK,GAAU,KAAK,CAAC;QACzB,IAAI,GAAG,GAAU,KAAK,CAAC;QAEvB,QAAQ;QACR,IAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAC/B;YACI,KAAK,GAAG,GAAG,CAAC,aAAa,EAAE,CAAC,KAAK,CAA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kBAGN,QAAQ;kHAHnB,iBAAiB,cADL,MAAM;2FAClB,iBAAiB;kBAD7B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BAIf,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Injectable} from '@angular/core';\n\nimport {DateTimeValue} from '../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../misc/tokens';\nimport {DateApi} from '../dateApi/dateApi.interface';\n\n/**\n * Class used for obtaining DateTimeValue for various formats\n */\n@Injectable({providedIn: 'root'})\nexport class DateValueProvider<TDate = any>\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets DateTimeValue from single value based on format\n * @param value - Current value to be converted to ranged value\n * @param format - Format that is requested to be displayed, it tells what range should be created\n */\n public getValue(value: TDate, format: string): DateTimeValue<TDate>\n {\n const val = this._dateApi.getValue(value, format);\n const fullFormat = this._dateApi.getFormat(format);\n let start: TDate = value;\n let end: TDate = value;\n\n //minute\n if(fullFormat.indexOf('m') >= 0)\n {\n start = val.startOfMinute().value;\n end = val.endOfMinute().value;\n }\n //hour\n else if(fullFormat.indexOf('H') >= 0)\n {\n start = val.startOfHour().value;\n end = val.endOfHour().value;\n }\n //day\n else if(fullFormat.indexOf('d') >= 0)\n {\n start = val.startOfDay().value;\n end = val.endOfDay().value;\n }\n //week\n else if(fullFormat.indexOf('w') >= 0)\n {\n start = val.startOfWeek().value;\n end = val.endOfWeek().value;\n }\n //month\n else if(fullFormat.indexOf('M') >= 0)\n {\n start = val.startOfMonth().value;\n end = val.endOfMonth().value;\n }\n //year\n else if(fullFormat.indexOf('Y') >= 0 || fullFormat.indexOf('y') >= 0)\n {\n start = val.startOfYear().value;\n end = val.endOfYear().value;\n }\n\n return {\n from: start,\n to: end\n };\n }\n}"]}
@@ -1,4 +1,6 @@
1
- export * from './dateApi.interface';
2
- export * from './formatProvider.interface';
3
- export * from './datePositionParser.interface';
1
+ export * from './dateApi/dateApi.interface';
2
+ export * from './datePositionParser/datePositionParser.interface';
3
+ export * from './datePositionParser/datePositionParser.service';
4
+ export * from './dateTimeRelativeParser/dateTimeRelativeParser.service';
5
+ export * from './dateValueProvider/dateValueProvider.service';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './dateApi.interface';\nexport * from './formatProvider.interface';\nexport * from './datePositionParser.interface';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,yDAAyD,CAAC;AACxE,cAAc,+CAA+C,CAAC","sourcesContent":["export * from './dateApi/dateApi.interface';\nexport * from './datePositionParser/datePositionParser.interface';\nexport * from './datePositionParser/datePositionParser.service';\nexport * from './dateTimeRelativeParser/dateTimeRelativeParser.service';\nexport * from './dateValueProvider/dateValueProvider.service';\n"]}