@anglr/datetime 4.0.0 → 5.0.0-beta.20221017112052

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 (503) hide show
  1. package/changelog.md +75 -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 -10
  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 +8 -8
  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 +102 -0
  103. package/es2015/src/misc/utils.js.map +1 -0
  104. package/es2015/src/misc/validators.js +30 -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/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  108. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  109. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +191 -0
  110. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  111. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +53 -0
  112. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  113. package/es2015/src/modules/dateTime/directives/index.js +4 -0
  114. package/es2015/src/modules/dateTime/directives/index.js.map +1 -0
  115. package/es2015/src/modules/dateTime/index.js +3 -0
  116. package/es2015/src/modules/dateTime/index.js.map +1 -0
  117. package/es2015/src/modules/dateTime/modules/dateTime.module.js +31 -0
  118. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  119. package/es2015/src/modules/dateTime/modules/index.js +2 -0
  120. package/es2015/src/modules/dateTime/modules/index.js.map +1 -0
  121. package/es2015/src/modules/index.js +3 -0
  122. package/es2015/src/modules/index.js.map +1 -0
  123. package/es2015/src/pipes/dateConvert.pipe.js +3 -3
  124. package/es2015/src/pipes/dateFormat.pipe.js +3 -3
  125. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
  126. package/es2015/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  127. package/es2015/src/services/dateApi/dateApi.interface.js.map +1 -0
  128. package/es2015/src/services/datePositionParser.service.js +3 -3
  129. package/es2015/src/services/dateTimeRelativeParser.service.js +3 -3
  130. package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -1
  131. package/es2015/src/services/dateValueProvider.service.js +3 -3
  132. package/es2015/src/services/dateValueProvider.service.js.map +1 -1
  133. package/es2015/src/services/index.js +1 -2
  134. package/es2015/src/services/index.js.map +1 -1
  135. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +11 -5
  136. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  137. package/es2020/moment/src/services/momentDateApi.service.js +9 -3
  138. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -1
  139. package/es2020/src/index.js +13 -10
  140. package/es2020/src/index.js.map +1 -1
  141. package/es2020/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
  142. package/es2020/src/interfaces/dateTime/datetime.interface.js.map +1 -0
  143. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
  144. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
  145. package/es2020/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
  146. package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
  147. package/es2020/src/interfaces/index.js +4 -0
  148. package/es2020/src/interfaces/index.js.map +1 -0
  149. package/{es2015/src → es2020/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
  150. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
  151. package/es2020/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
  152. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
  153. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
  154. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  155. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
  156. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  157. package/{es2015/src → es2020/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
  158. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  159. package/es2020/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
  160. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  161. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
  162. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
  163. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
  164. package/es2020/src/legacy/picker/components/picker/picker.component.js.map +1 -0
  165. package/{es2015/src → es2020/src/legacy}/picker/components/pickerBase.component.js +4 -4
  166. package/es2020/src/legacy/picker/components/pickerBase.component.js.map +1 -0
  167. package/{es2015/src → es2020/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
  168. package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
  169. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
  170. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  171. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  172. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
  173. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
  174. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
  175. package/{es2015/src → es2020/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
  176. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  177. package/es2020/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
  178. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  179. package/es2020/src/{picker → legacy/picker}/directives/index.js +0 -0
  180. package/es2020/src/legacy/picker/directives/index.js.map +1 -0
  181. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
  182. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  183. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
  184. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  185. package/es2020/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
  186. package/es2020/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  187. package/es2020/src/{picker → legacy/picker}/interfaces.js +0 -0
  188. package/es2020/src/legacy/picker/interfaces.js.map +1 -0
  189. package/es2020/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
  190. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
  191. package/es2020/src/{picker → legacy/picker}/misc/tokens.js +0 -0
  192. package/es2020/src/legacy/picker/misc/tokens.js.map +1 -0
  193. package/{es2015/src → es2020/src/legacy}/picker/modules/picker.module.js +10 -12
  194. package/es2020/src/legacy/picker/modules/picker.module.js.map +1 -0
  195. package/es2020/src/{picker → legacy/picker}/types.js +0 -0
  196. package/es2020/src/legacy/picker/types.js.map +1 -0
  197. package/es2020/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +8 -8
  198. package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  199. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
  200. package/es2020/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
  201. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
  202. package/es2020/src/legacy/selector/components/selector/selector.component.js.map +1 -0
  203. package/es2020/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
  204. package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  205. package/es2020/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
  206. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
  207. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
  208. package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  209. package/es2020/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
  210. package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  211. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
  212. package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  213. package/es2020/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
  214. package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  215. package/es2020/src/{selector → legacy/selector}/interfaces.js +0 -0
  216. package/es2020/src/legacy/selector/interfaces.js.map +1 -0
  217. package/es2020/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
  218. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
  219. package/es2020/src/{selector → legacy/selector}/misc/tokens.js +0 -0
  220. package/es2020/src/legacy/selector/misc/tokens.js.map +1 -0
  221. package/{es2015/src → es2020/src/legacy}/selector/modules/basicSelector.module.js +4 -4
  222. package/es2020/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
  223. package/es2020/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
  224. package/es2020/src/legacy/selector/modules/selector.module.js.map +1 -0
  225. package/es2020/src/{selector → legacy/selector}/types.js +0 -0
  226. package/es2020/src/legacy/selector/types.js.map +1 -0
  227. package/es2020/src/misc/enums.js +23 -0
  228. package/es2020/src/misc/enums.js.map +1 -0
  229. package/es2020/src/misc/tokens.js +4 -0
  230. package/es2020/src/misc/tokens.js.map +1 -1
  231. package/es2020/src/misc/types.js +2 -0
  232. package/es2020/src/misc/types.js.map +1 -0
  233. package/es2020/src/misc/utils.js +101 -0
  234. package/es2020/src/misc/utils.js.map +1 -0
  235. package/es2020/src/misc/validators.js +30 -0
  236. package/es2020/src/misc/validators.js.map +1 -1
  237. package/es2020/src/modules/datePipes.module.js +4 -4
  238. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  239. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  240. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +190 -0
  241. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  242. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +53 -0
  243. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  244. package/es2020/src/modules/dateTime/directives/index.js +4 -0
  245. package/es2020/src/modules/dateTime/directives/index.js.map +1 -0
  246. package/es2020/src/modules/dateTime/index.js +3 -0
  247. package/es2020/src/modules/dateTime/index.js.map +1 -0
  248. package/es2020/src/modules/dateTime/modules/dateTime.module.js +31 -0
  249. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  250. package/es2020/src/modules/dateTime/modules/index.js +2 -0
  251. package/es2020/src/modules/dateTime/modules/index.js.map +1 -0
  252. package/es2020/src/modules/index.js +3 -0
  253. package/es2020/src/modules/index.js.map +1 -0
  254. package/es2020/src/pipes/dateConvert.pipe.js +3 -3
  255. package/es2020/src/pipes/dateFormat.pipe.js +3 -3
  256. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
  257. package/es2020/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  258. package/es2020/src/services/dateApi/dateApi.interface.js.map +1 -0
  259. package/es2020/src/services/datePositionParser.service.js +3 -3
  260. package/es2020/src/services/dateTimeRelativeParser.service.js +3 -3
  261. package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -1
  262. package/es2020/src/services/dateValueProvider.service.js +3 -3
  263. package/es2020/src/services/dateValueProvider.service.js.map +1 -1
  264. package/es2020/src/services/index.js +1 -2
  265. package/es2020/src/services/index.js.map +1 -1
  266. package/moment/src/services/momentDateApi.service.d.ts +4 -0
  267. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  268. package/package.json +36 -36
  269. package/src/index.d.ts +13 -10
  270. package/src/index.d.ts.map +1 -1
  271. package/src/{misc → interfaces/dateTime}/datetime.interface.d.ts +2 -2
  272. package/src/interfaces/dateTime/datetime.interface.d.ts.map +1 -0
  273. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +32 -0
  274. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts.map +1 -0
  275. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts +0 -0
  276. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts.map +0 -0
  277. package/src/interfaces/index.d.ts +4 -0
  278. package/src/interfaces/index.d.ts.map +1 -0
  279. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.css +0 -0
  280. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts +1 -1
  281. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts.map +0 -0
  282. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.html +0 -0
  283. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts +0 -0
  284. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts.map +0 -0
  285. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.css +0 -0
  286. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts +3 -3
  287. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  288. package/src/legacy/picker/components/dayPicker/dayPicker.component.html +21 -0
  289. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts +0 -0
  290. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts.map +0 -0
  291. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.css +0 -0
  292. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts +2 -2
  293. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  294. package/src/legacy/picker/components/monthPicker/monthPicker.component.html +13 -0
  295. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts +0 -0
  296. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts.map +0 -0
  297. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts +0 -0
  298. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts.map +0 -0
  299. package/src/{picker → legacy/picker}/components/picker/picker.component.css +0 -0
  300. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts +3 -3
  301. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts.map +1 -1
  302. package/src/legacy/picker/components/picker/picker.component.html +3 -0
  303. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts +3 -3
  304. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts.map +1 -1
  305. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts +3 -3
  306. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts.map +1 -1
  307. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.css +0 -0
  308. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts +3 -3
  309. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  310. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.html +0 -0
  311. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts +0 -0
  312. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +0 -0
  313. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts +0 -0
  314. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts.map +0 -0
  315. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.css +0 -0
  316. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts +2 -2
  317. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  318. package/src/legacy/picker/components/yearPicker/yearPicker.component.html +13 -0
  319. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts +0 -0
  320. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts.map +0 -0
  321. package/src/{picker → legacy/picker}/directives/index.d.ts +0 -0
  322. package/src/{picker → legacy/picker}/directives/index.d.ts.map +0 -0
  323. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts +1 -1
  324. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts.map +0 -0
  325. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts +0 -0
  326. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts.map +0 -0
  327. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
  328. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts.map +0 -0
  329. package/src/{picker → legacy/picker}/interfaces.d.ts +0 -0
  330. package/src/{picker → legacy/picker}/interfaces.d.ts.map +0 -0
  331. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts +2 -2
  332. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts.map +1 -1
  333. package/src/{picker → legacy/picker}/misc/tokens.d.ts +0 -0
  334. package/src/{picker → legacy/picker}/misc/tokens.d.ts.map +0 -0
  335. package/src/{picker → legacy/picker}/modules/picker.module.d.ts +1 -1
  336. package/src/{picker → legacy/picker}/modules/picker.module.d.ts.map +0 -0
  337. package/src/{picker → legacy/picker}/types.d.ts +0 -0
  338. package/src/{picker → legacy/picker}/types.d.ts.map +0 -0
  339. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.css +0 -0
  340. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts +5 -5
  341. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
  342. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.html +0 -0
  343. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts +0 -0
  344. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts.map +0 -0
  345. package/src/{selector → legacy/selector}/components/selector/selector.component.css +0 -0
  346. package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts +5 -4
  347. package/src/legacy/selector/components/selector/selector.component.d.ts.map +1 -0
  348. package/src/{selector → legacy/selector}/components/selector/selector.component.html +2 -2
  349. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.css +0 -0
  350. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +4 -4
  351. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
  352. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.html +0 -0
  353. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +2 -2
  354. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +1 -1
  355. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +2 -2
  356. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  357. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +2 -2
  358. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  359. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts +1 -1
  360. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +0 -0
  361. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +2 -2
  362. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  363. package/src/{selector → legacy/selector}/interfaces.d.ts +0 -0
  364. package/src/{selector → legacy/selector}/interfaces.d.ts.map +0 -0
  365. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts +1 -1
  366. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts.map +1 -1
  367. package/src/{selector → legacy/selector}/misc/tokens.d.ts +0 -0
  368. package/src/{selector → legacy/selector}/misc/tokens.d.ts.map +0 -0
  369. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts +0 -0
  370. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts.map +0 -0
  371. package/src/{selector → legacy/selector}/modules/selector.module.d.ts +0 -0
  372. package/src/{selector → legacy/selector}/modules/selector.module.d.ts.map +0 -0
  373. package/src/{selector → legacy/selector}/types.d.ts +0 -0
  374. package/src/{selector → legacy/selector}/types.d.ts.map +0 -0
  375. package/src/misc/enums.d.ts +22 -0
  376. package/src/misc/enums.d.ts.map +1 -0
  377. package/src/misc/tokens.d.ts +6 -1
  378. package/src/misc/tokens.d.ts.map +1 -1
  379. package/src/misc/types.d.ts +11 -0
  380. package/src/misc/types.d.ts.map +1 -0
  381. package/src/misc/utils.d.ts +25 -0
  382. package/src/misc/utils.d.ts.map +1 -0
  383. package/src/misc/validators.d.ts +9 -1
  384. package/src/misc/validators.d.ts.map +1 -1
  385. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +40 -0
  386. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -0
  387. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +97 -0
  388. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -0
  389. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +22 -0
  390. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -0
  391. package/src/modules/dateTime/directives/index.d.ts +4 -0
  392. package/src/modules/dateTime/directives/index.d.ts.map +1 -0
  393. package/src/modules/dateTime/index.d.ts +3 -0
  394. package/src/modules/dateTime/index.d.ts.map +1 -0
  395. package/src/modules/dateTime/modules/dateTime.module.d.ts +13 -0
  396. package/src/modules/dateTime/modules/dateTime.module.d.ts.map +1 -0
  397. package/src/modules/dateTime/modules/index.d.ts +2 -0
  398. package/src/modules/dateTime/modules/index.d.ts.map +1 -0
  399. package/src/modules/index.d.ts +3 -0
  400. package/src/modules/index.d.ts.map +1 -0
  401. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  402. package/src/pipes/dateFormat.pipe.d.ts +3 -2
  403. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  404. package/src/services/{dateApi.interface.d.ts → dateApi/dateApi.interface.d.ts} +4 -0
  405. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -0
  406. package/src/services/dateTimeRelativeParser.service.d.ts +1 -1
  407. package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
  408. package/src/services/dateValueProvider.service.d.ts +2 -2
  409. package/src/services/dateValueProvider.service.d.ts.map +1 -1
  410. package/src/services/index.d.ts +1 -2
  411. package/src/services/index.d.ts.map +1 -1
  412. package/version.bak +1 -1
  413. package/es2015/src/misc/datetime.interface.js.map +0 -1
  414. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  415. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  416. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  417. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  418. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  419. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  420. package/es2015/src/picker/components/picker/picker.component.animations.js.map +0 -1
  421. package/es2015/src/picker/components/picker/picker.component.js.map +0 -1
  422. package/es2015/src/picker/components/pickerBase.component.js.map +0 -1
  423. package/es2015/src/picker/components/pickerImplBase.component.js.map +0 -1
  424. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  425. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  426. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  427. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  428. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  429. package/es2015/src/picker/directives/index.js.map +0 -1
  430. package/es2015/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  431. package/es2015/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  432. package/es2015/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  433. package/es2015/src/picker/interfaces.js.map +0 -1
  434. package/es2015/src/picker/misc/datetimePicker.interface.js.map +0 -1
  435. package/es2015/src/picker/misc/tokens.js.map +0 -1
  436. package/es2015/src/picker/modules/picker.module.js.map +0 -1
  437. package/es2015/src/picker/types.js.map +0 -1
  438. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  439. package/es2015/src/selector/components/selector/selector.component.animations.js.map +0 -1
  440. package/es2015/src/selector/components/selector/selector.component.js.map +0 -1
  441. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  442. package/es2015/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  443. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  444. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  445. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  446. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  447. package/es2015/src/selector/interfaces.js.map +0 -1
  448. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  449. package/es2015/src/selector/misc/tokens.js.map +0 -1
  450. package/es2015/src/selector/modules/basicSelector.module.js.map +0 -1
  451. package/es2015/src/selector/modules/selector.module.js.map +0 -1
  452. package/es2015/src/selector/types.js.map +0 -1
  453. package/es2015/src/services/dateApi.interface.js.map +0 -1
  454. package/es2015/src/services/formatProvider.interface.js.map +0 -1
  455. package/es2020/src/misc/datetime.interface.js.map +0 -1
  456. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  457. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  458. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  459. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  460. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  461. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  462. package/es2020/src/picker/components/picker/picker.component.animations.js.map +0 -1
  463. package/es2020/src/picker/components/picker/picker.component.js.map +0 -1
  464. package/es2020/src/picker/components/pickerBase.component.js.map +0 -1
  465. package/es2020/src/picker/components/pickerImplBase.component.js.map +0 -1
  466. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  467. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  468. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  469. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  470. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  471. package/es2020/src/picker/directives/index.js.map +0 -1
  472. package/es2020/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  473. package/es2020/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  474. package/es2020/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  475. package/es2020/src/picker/interfaces.js.map +0 -1
  476. package/es2020/src/picker/misc/datetimePicker.interface.js.map +0 -1
  477. package/es2020/src/picker/misc/tokens.js.map +0 -1
  478. package/es2020/src/picker/modules/picker.module.js.map +0 -1
  479. package/es2020/src/picker/types.js.map +0 -1
  480. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  481. package/es2020/src/selector/components/selector/selector.component.animations.js.map +0 -1
  482. package/es2020/src/selector/components/selector/selector.component.js.map +0 -1
  483. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  484. package/es2020/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  485. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  486. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  487. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  488. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  489. package/es2020/src/selector/interfaces.js.map +0 -1
  490. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  491. package/es2020/src/selector/misc/tokens.js.map +0 -1
  492. package/es2020/src/selector/modules/basicSelector.module.js.map +0 -1
  493. package/es2020/src/selector/modules/selector.module.js.map +0 -1
  494. package/es2020/src/selector/types.js.map +0 -1
  495. package/es2020/src/services/dateApi.interface.js.map +0 -1
  496. package/es2020/src/services/formatProvider.interface.js.map +0 -1
  497. package/src/misc/datetime.interface.d.ts.map +0 -1
  498. package/src/picker/components/dayPicker/dayPicker.component.html +0 -21
  499. package/src/picker/components/monthPicker/monthPicker.component.html +0 -13
  500. package/src/picker/components/picker/picker.component.html +0 -3
  501. package/src/picker/components/yearPicker/yearPicker.component.html +0 -13
  502. package/src/selector/components/selector/selector.component.d.ts.map +0 -1
  503. package/src/services/dateApi.interface.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { forwardRef, Directive, Inject } from '@angular/core';
2
2
  import { NG_VALIDATORS } from '@angular/forms';
3
- import { Validators } from '../../../misc/validators';
3
+ import { Validators } from '../../../../misc/validators';
4
4
  import { DateTimeSelectorComponent } from '../../components/selector/selector.component';
5
- import { DATE_API } from '../../../misc/tokens';
5
+ import { DATE_API } from '../../../../misc/tokens';
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "../../components/selector/selector.component";
8
8
  /**
@@ -36,9 +36,9 @@ export class DatetimeMaxValidatorDirective {
36
36
  return this._validator(control);
37
37
  }
38
38
  }
39
- DatetimeMaxValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeMaxValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
40
- DatetimeMaxValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: DatetimeMaxValidatorDirective, selector: "date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])", providers: [DATETIME_MIN_VALIDATOR], ngImport: i0 });
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeMaxValidatorDirective, decorators: [{
39
+ DatetimeMaxValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeMaxValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
40
+ DatetimeMaxValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DatetimeMaxValidatorDirective, selector: "date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])", providers: [DATETIME_MIN_VALIDATOR], ngImport: i0 });
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeMaxValidatorDirective, decorators: [{
42
42
  type: Directive,
43
43
  args: [{
44
44
  selector: 'date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeMaxValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;;;AAEjD;;GAEG;AACH,MAAM,sBAAsB,GAC5B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,6BAA6B;IAStC,iEAAiE;IACjE,YAAY,gBAAkD,EAChC,OAAuB;QATrD,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAMzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;0HA1BQ,6BAA6B,2DAWlB,QAAQ;8GAXnB,6BAA6B,6NAF3B,CAAC,sBAAsB,CAAC;2FAE1B,6BAA6B;kBALzC,SAAS;mBACV;oBACI,QAAQ,EAAE,oMAAoM;oBAC9M,SAAS,EAAE,CAAC,sBAAsB,CAAC;iBACtC;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {ExistingProvider, forwardRef, Directive, Inject} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\nimport {DateApi} from '../../../../services/dateApi/dateApi.interface';\nimport {DATE_API} from '../../../../misc/tokens';\n\n/**\n * Validator that is injected with directive DatetimeMaxValidatorDirective\n */\nconst DATETIME_MIN_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeMaxValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime max validator, validating max datetime value \n */\n@Directive(\n{\n selector: 'date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])',\n providers: [DATETIME_MIN_VALIDATOR]\n})\nexport class DatetimeMaxValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>)\n {\n this._validator = Validators.maxDatetime(datetimeSelector, dateApi);\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}"]}
@@ -1,8 +1,8 @@
1
1
  import { forwardRef, Directive, Inject } from '@angular/core';
2
2
  import { NG_VALIDATORS } from '@angular/forms';
3
- import { Validators } from '../../../misc/validators';
3
+ import { Validators } from '../../../../misc/validators';
4
4
  import { DateTimeSelectorComponent } from '../../components/selector/selector.component';
5
- import { DATE_API } from '../../../misc/tokens';
5
+ import { DATE_API } from '../../../../misc/tokens';
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "../../components/selector/selector.component";
8
8
  /**
@@ -36,9 +36,9 @@ export class DatetimeMinValidatorDirective {
36
36
  return this._validator(control);
37
37
  }
38
38
  }
39
- DatetimeMinValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeMinValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
40
- DatetimeMinValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: DatetimeMinValidatorDirective, selector: "date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])", providers: [DATETIME_MIN_VALIDATOR], ngImport: i0 });
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeMinValidatorDirective, decorators: [{
39
+ DatetimeMinValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeMinValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
40
+ DatetimeMinValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DatetimeMinValidatorDirective, selector: "date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])", providers: [DATETIME_MIN_VALIDATOR], ngImport: i0 });
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeMinValidatorDirective, decorators: [{
42
42
  type: Directive,
43
43
  args: [{
44
44
  selector: 'date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;;;AAEjD;;GAEG;AACH,MAAM,sBAAsB,GAC5B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,6BAA6B;IAStC,iEAAiE;IACjE,YAAY,gBAAkD,EAChC,OAAuB;QATrD,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAMzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;0HA1BQ,6BAA6B,2DAWlB,QAAQ;8GAXnB,6BAA6B,6NAF3B,CAAC,sBAAsB,CAAC;2FAE1B,6BAA6B;kBALzC,SAAS;mBACV;oBACI,QAAQ,EAAE,oMAAoM;oBAC9M,SAAS,EAAE,CAAC,sBAAsB,CAAC;iBACtC;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {ExistingProvider, forwardRef, Directive, Inject} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\nimport {DateApi} from '../../../../services/dateApi/dateApi.interface';\nimport {DATE_API} from '../../../../misc/tokens';\n\n/**\n * Validator that is injected with directive DatetimeMinValidatorDirective\n */\nconst DATETIME_MIN_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeMinValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime min validator, validating min datetime value \n */\n@Directive(\n{\n selector: 'date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])',\n providers: [DATETIME_MIN_VALIDATOR]\n})\nexport class DatetimeMinValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>)\n {\n this._validator = Validators.minDatetime(datetimeSelector, dateApi);\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}"]}
@@ -1,6 +1,6 @@
1
1
  import { forwardRef, Directive } from '@angular/core';
2
2
  import { NG_VALIDATORS } from '@angular/forms';
3
- import { Validators } from '../../../misc/validators';
3
+ import { Validators } from '../../../../misc/validators';
4
4
  import { DateTimeSelectorComponent } from '../../components/selector/selector.component';
5
5
  import * as i0 from "@angular/core";
6
6
  import * as i1 from "../../components/selector/selector.component";
@@ -35,9 +35,9 @@ export class DatetimeValidatorDirective {
35
35
  return this._validator(control);
36
36
  }
37
37
  }
38
- DatetimeValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }], target: i0.ɵɵFactoryTarget.Directive });
39
- DatetimeValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: DatetimeValidatorDirective, selector: "date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])", providers: [DATETIME_VALIDATOR], ngImport: i0 });
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatetimeValidatorDirective, decorators: [{
38
+ DatetimeValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeValidatorDirective, deps: [{ token: i1.DateTimeSelectorComponent }], target: i0.ɵɵFactoryTarget.Directive });
39
+ DatetimeValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DatetimeValidatorDirective, selector: "date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])", providers: [DATETIME_VALIDATOR], ngImport: i0 });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatetimeValidatorDirective, decorators: [{
41
41
  type: Directive,
42
42
  args: [{
43
43
  selector: 'date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;;;AAEvF;;GAEG;AACH,MAAM,kBAAkB,GACxB;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;IACzD,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,0BAA0B;IASnC,iEAAiE;IACjE,YAAY,gBAAkD;QAR9D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAKzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;uHAzBQ,0BAA0B;2GAA1B,0BAA0B,+LAFxB,CAAC,kBAAkB,CAAC;2FAEtB,0BAA0B;kBALtC,SAAS;mBACV;oBACI,QAAQ,EAAE,sKAAsK;oBAChL,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAClC","sourcesContent":["import {ExistingProvider, forwardRef, Directive} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\n\n/**\n * Validator that is injected with directive DatetimeValidatorDirective\n */\nconst DATETIME_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime validator, validating datetime\n */\n@Directive(\n{\n selector: 'date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])',\n providers: [DATETIME_VALIDATOR]\n})\nexport class DatetimeValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>)\n {\n this._validator = Validators.datetime(datetimeSelector);\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}"]}
@@ -103,9 +103,9 @@ export class DateTimeSelectorControlValueAccessor {
103
103
  }
104
104
  }
105
105
  }
106
- DateTimeSelectorControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorControlValueAccessor, deps: [{ token: i1.DateTimeSelectorComponent }], target: i0.ɵɵFactoryTarget.Directive });
107
- DateTimeSelectorControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: DateTimeSelectorControlValueAccessor, selector: "date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]", inputs: { range: "range", formatted: "formatted" }, providers: [DATE_TIME_SELECTOR_VALUE_ACCESSOR], ngImport: i0 });
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorControlValueAccessor, decorators: [{
106
+ DateTimeSelectorControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorControlValueAccessor, deps: [{ token: i1.DateTimeSelectorComponent }], target: i0.ɵɵFactoryTarget.Directive });
107
+ DateTimeSelectorControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeSelectorControlValueAccessor, selector: "date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]", inputs: { range: "range", formatted: "formatted" }, providers: [DATE_TIME_SELECTOR_VALUE_ACCESSOR], ngImport: i0 });
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorControlValueAccessor, decorators: [{
109
109
  type: Directive,
110
110
  args: [{
111
111
  selector: 'date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectorControlValueAccessor.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ts"],"names":[],"mappings":"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","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Input, OnDestroy} from '@angular/core';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\n\n/**\n * Value accessor provider for date time selector\n */\nconst DATE_TIME_SELECTOR_VALUE_ACCESSOR = <ExistingProvider>\n{\n provide: NG_VALUE_ACCESSOR, \n useExisting: forwardRef(() => DateTimeSelectorControlValueAccessor), \n multi: true\n};\n\n/**\n * Value accessor for getting and setting values for date time selector\n */\n@Directive(\n{\n selector: 'date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]',\n providers: [DATE_TIME_SELECTOR_VALUE_ACCESSOR]\n})\nexport class DateTimeSelectorControlValueAccessor<TDate> implements ControlValueAccessor, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions that are destroyed on directive destruction\n */\n protected _subscriptions: Subscription = new Subscription();\n\n //######################### public properties - inputs #########################\n\n /**\n * Indication whether value for selector is represented as range from, to\n */\n @Input()\n public range: boolean = false;\n\n /**\n * Indication whether value for selector is represented as formatted string value, if both 'formatted' and 'range' are set, 'range' takes precedence\n */\n @Input()\n public formatted: boolean = false;\n\n //######################### constructor #########################\n constructor(protected _selector: DateTimeSelectorComponent<TDate>)\n {\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._subscriptions?.unsubscribe();\n }\n\n //######################### public methods - implementation of ControlValueAccessor #########################\n\n /**\n * Sets value to datetime selector\n */\n public writeValue(value: string|DateTimeValue<TDate>|TDate|null): void\n {\n if(this.range)\n {\n this._selector.value = value as DateTimeValue<TDate>;\n }\n else if(this.formatted)\n {\n this._selector.formattedValue = value as string;\n }\n else\n {\n this._selector.value =\n {\n from: value as TDate,\n to: value as TDate\n };\n }\n }\n\n /**\n * Registers callback that is called when value of datetime selector value changes\n */\n public registerOnChange(fn: (data: string|DateTimeValue<TDate>|TDate|null) => any): void\n {\n this._subscriptions.add(this._selector.valueChange.subscribe(() => this._emitValue(fn)));\n }\n\n /**\n * Registers callback that is called when datetime selector was touched by user\n */\n public registerOnTouched(fn: () => any): void\n {\n this._subscriptions.add(this._selector.touched.subscribe(() => fn()));\n }\n\n /**\n * Used for setting control as disabled\n * @param isDisabled - disabled status to set on the element\n */\n public setDisabledState(isDisabled: boolean): void\n {\n this._selector.setDisabled(isDisabled);\n }\n\n //######################### protected methods #########################\n\n /**\n * Used for emitting value that was changed\n * @param fn - Function that is used for emitting changed value\n */\n protected _emitValue(fn: (value: string|DateTimeValue<TDate>|TDate|null) => any): void\n {\n if(this.range)\n {\n fn(this._selector.value);\n }\n else if(this.formatted)\n {\n fn(this._selector.formattedValue);\n }\n else\n {\n const value = this._selector.value;\n\n if(!value)\n {\n fn(null);\n }\n else\n {\n fn(value.from!);\n }\n }\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/legacy/selector/interfaces.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './misc/datetimeSelector.interface';"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeSelector.interface.js","sourceRoot":"","sources":["../../../../../src/legacy/selector/misc/datetimeSelector.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {PositionOptions} from '@anglr/common';\nimport {Observable} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DateTimePickerOptions} from '../../picker/misc/datetimePicker.interface';\n\n/**\n * Defintion of datetime selector component options\n */\nexport interface DateTimeSelectorOptions<TSelector = any, TPicker = any> extends DateTimePickerOptions<TPicker>\n{\n /**\n * Definition of type that is used for selector\n */\n selectorComponent: Type<TSelector>;\n\n /**\n * Indication whether close picker on value selection\n */\n pickerCloseOnValueSelect: boolean;\n\n /**\n * Indication whether picker is disabled\n */\n pickerDisabled: boolean;\n\n /**\n * Indication whether use absolute positioning of picker\n */\n pickerAbsolute: boolean;\n\n /**\n * Position options that are used in case of absolute picker\n */\n positionOptions: Partial<PositionOptions>;\n\n /**\n * Css selector for absolute picker container\n */\n pickerAbsoluteContainer: string;\n}\n\n/**\n * Describes datetime selector component used for displaying and selecting value\n */\nexport interface DateTimeSelector<TDate = any>\n{\n /**\n * Currently used format for displaying data\n */\n format: string;\n\n /**\n * Placeholder that is displayed when there is no value selected\n */\n placeholder: string|null;\n\n /**\n * Gets current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Gets formatted value\n */\n readonly formattedValue: string|null;\n\n /**\n * Gets indication whether is current value valid\n */\n readonly valid: boolean;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: Observable<void>;\n\n /**\n * Occurs when selector is touched by user\n */\n readonly touched: Observable<void>;\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n readonly pickerRequest: Observable<boolean>;\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n setMinValue(value: TDate|null): void;\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime selector\n * @param value - Value to be set to this selector\n */\n setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n setDisabled(disabled?: boolean): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/legacy/selector/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAqD,IAAI,cAAc,CAAmC,kCAAkC,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimeSelectorOptions} from './datetimeSelector.interface';\n\n/**\n * Injection token used for obtaining datetime selector configuration\n */\nexport const DATE_TIME_SELECTOR_CONFIGURATION: InjectionToken<Partial<DateTimeSelectorOptions>> = new InjectionToken<Partial<DateTimeSelectorOptions>>('DATE_TIME_SELECTOR_CONFIGURATION');"]}
@@ -6,10 +6,10 @@ import * as i0 from "@angular/core";
6
6
  */
7
7
  export class DateTimeBasicSelectorModule {
8
8
  }
9
- DateTimeBasicSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeBasicSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- DateTimeBasicSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeBasicSelectorModule, declarations: [SimpleInputDateTimeSelectorComponent] });
11
- DateTimeBasicSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeBasicSelectorModule });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeBasicSelectorModule, decorators: [{
9
+ DateTimeBasicSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeBasicSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ DateTimeBasicSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateTimeBasicSelectorModule, declarations: [SimpleInputDateTimeSelectorComponent] });
11
+ DateTimeBasicSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeBasicSelectorModule });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeBasicSelectorModule, decorators: [{
13
13
  type: NgModule,
14
14
  args: [{
15
15
  declarations: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basicSelector.module.js","sourceRoot":"","sources":["../../../../../src/legacy/selector/modules/basicSelector.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,oCAAoC,EAAC,MAAM,iEAAiE,CAAC;;AAErH;;GAEG;AAQH,MAAM,OAAO,2BAA2B;;wHAA3B,2BAA2B;yHAA3B,2BAA2B,iBAHhC,oCAAoC;yHAG/B,2BAA2B;2FAA3B,2BAA2B;kBAPvC,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,oCAAoC;qBACvC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {SimpleInputDateTimeSelectorComponent} from '../components/simpleInputDateTime/simpleInputDateTime.component';\n\n/**\n * Angular module for date time basic input selector component\n */\n@NgModule(\n{\n declarations:\n [\n SimpleInputDateTimeSelectorComponent\n ]\n})\nexport class DateTimeBasicSelectorModule\n{\n}"]}
@@ -15,8 +15,8 @@ import * as i0 from "@angular/core";
15
15
  */
16
16
  export class DateTimeSelectorModule {
17
17
  }
18
- DateTimeSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
19
- DateTimeSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorModule, declarations: [DateTimeSelectorComponent,
18
+ DateTimeSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
19
+ DateTimeSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorModule, declarations: [DateTimeSelectorComponent,
20
20
  InputDateTimeSelectorComponent,
21
21
  DateTimeSelectorControlValueAccessor,
22
22
  DatetimeValidatorDirective,
@@ -30,12 +30,10 @@ DateTimeSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
30
30
  DatetimeMinValidatorDirective,
31
31
  DatetimeMaxValidatorDirective,
32
32
  DateTimePickerRendererDirective] });
33
- DateTimeSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorModule, imports: [[
34
- AngularCommonModule,
35
- CommonDynamicModule,
36
- DateTimePickerModule,
37
- ]] });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimeSelectorModule, decorators: [{
33
+ DateTimeSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorModule, imports: [AngularCommonModule,
34
+ CommonDynamicModule,
35
+ DateTimePickerModule] });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorModule, decorators: [{
39
37
  type: NgModule,
40
38
  args: [{
41
39
  imports: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector.module.js","sourceRoot":"","sources":["../../../../../src/legacy/selector/modules/selector.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,yBAAyB,EAAC,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAC,8BAA8B,EAAC,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAC,oCAAoC,EAAC,MAAM,mFAAmF,CAAC;AACvI,OAAO,EAAC,0BAA0B,EAAC,MAAM,6DAA6D,CAAC;AACvG,OAAO,EAAC,6BAA6B,EAAC,MAAM,mEAAmE,CAAC;AAChH,OAAO,EAAC,6BAA6B,EAAC,MAAM,mEAAmE,CAAC;AAChH,OAAO,EAAC,+BAA+B,EAAC,MAAM,uEAAuE,CAAC;;AAEtH;;GAEG;AA6BH,MAAM,OAAO,sBAAsB;;mHAAtB,sBAAsB;oHAAtB,sBAAsB,iBAlB3B,yBAAyB;QACzB,8BAA8B;QAC9B,oCAAoC;QACpC,0BAA0B;QAC1B,6BAA6B;QAC7B,6BAA6B;QAC7B,+BAA+B,aAZ/B,mBAAmB;QACnB,mBAAmB;QACnB,oBAAoB,aAcpB,yBAAyB;QACzB,oCAAoC;QACpC,0BAA0B;QAC1B,6BAA6B;QAC7B,6BAA6B;QAC7B,+BAA+B;oHAG1B,sBAAsB,YAxB3B,mBAAmB;QACnB,mBAAmB;QACnB,oBAAoB;2FAsBf,sBAAsB;kBA5BlC,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,mBAAmB;wBACnB,mBAAmB;wBACnB,oBAAoB;qBACvB;oBACD,YAAY,EACZ;wBACI,yBAAyB;wBACzB,8BAA8B;wBAC9B,oCAAoC;wBACpC,0BAA0B;wBAC1B,6BAA6B;wBAC7B,6BAA6B;wBAC7B,+BAA+B;qBAClC;oBACD,OAAO,EACP;wBACI,yBAAyB;wBACzB,oCAAoC;wBACpC,0BAA0B;wBAC1B,6BAA6B;wBAC7B,6BAA6B;wBAC7B,+BAA+B;qBAClC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule as AngularCommonModule} from '@angular/common';\nimport {CommonDynamicModule} from '@anglr/common';\n\nimport {DateTimePickerModule} from '../../picker/modules/picker.module';\nimport {DateTimeSelectorComponent} from '../components/selector/selector.component';\nimport {InputDateTimeSelectorComponent} from '../components/inputDateTime/inputDateTime.component';\nimport {DateTimeSelectorControlValueAccessor} from '../directives/selectorControlValueAccessor/selectorControlValueAccessor.directive';\nimport {DatetimeValidatorDirective} from '../directives/datetimeValidator/datetimeValidator.directive';\nimport {DatetimeMinValidatorDirective} from '../directives/datetimeMinValidator/datetimeMinValidator.directive';\nimport {DatetimeMaxValidatorDirective} from '../directives/datetimeMaxValidator/datetimeMaxValidator.directive';\nimport {DateTimePickerRendererDirective} from '../directives/dateTimePickerRenderer/dateTimePickerRenderer.directive';\n\n/**\n * Angular module for date time selector components\n */\n@NgModule(\n{\n imports:\n [\n AngularCommonModule,\n CommonDynamicModule,\n DateTimePickerModule,\n ],\n declarations:\n [\n DateTimeSelectorComponent,\n InputDateTimeSelectorComponent,\n DateTimeSelectorControlValueAccessor,\n DatetimeValidatorDirective,\n DatetimeMinValidatorDirective,\n DatetimeMaxValidatorDirective,\n DateTimePickerRendererDirective,\n ],\n exports:\n [\n DateTimeSelectorComponent,\n DateTimeSelectorControlValueAccessor,\n DatetimeValidatorDirective,\n DatetimeMinValidatorDirective,\n DatetimeMaxValidatorDirective,\n DateTimePickerRendererDirective,\n ]\n})\nexport class DateTimeSelectorModule\n{\n}"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/legacy/selector/types.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC;AACnE,cAAc,0CAA0C,CAAC;AACzD,cAAc,qDAAqD,CAAC;AACpE,cAAc,gEAAgE,CAAC;AAC/E,cAAc,kEAAkE,CAAC;AACjF,cAAc,kEAAkE,CAAC;AACjF,cAAc,4DAA4D,CAAC;AAC3E,cAAc,kFAAkF,CAAC;AACjG,cAAc,sEAAsE,CAAC;AACrF,cAAc,eAAe,CAAC","sourcesContent":["export * from './components/inputDateTime/inputDateTime.component';\nexport * from './components/selector/selector.component';\nexport * from './components/selector/selector.component.animations';\nexport * from './components/simpleInputDateTime/simpleInputDateTime.component';\nexport * from './directives/datetimeMaxValidator/datetimeMaxValidator.directive';\nexport * from './directives/datetimeMinValidator/datetimeMinValidator.directive';\nexport * from './directives/datetimeValidator/datetimeValidator.directive';\nexport * from './directives/selectorControlValueAccessor/selectorControlValueAccessor.directive';\nexport * from './directives/dateTimePickerRenderer/dateTimePickerRenderer.directive';\nexport * from './misc/tokens';"]}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Available formats for date time value
3
+ */
4
+ export var DateTimeValueFormat;
5
+ (function (DateTimeValueFormat) {
6
+ /**
7
+ * Instance of date
8
+ */
9
+ DateTimeValueFormat[DateTimeValueFormat["DateInstance"] = 0] = "DateInstance";
10
+ /**
11
+ * Numeric unix timestamp in seconds
12
+ */
13
+ DateTimeValueFormat[DateTimeValueFormat["UnixTimestamp"] = 1] = "UnixTimestamp";
14
+ /**
15
+ * Formatted date as string value
16
+ */
17
+ DateTimeValueFormat[DateTimeValueFormat["FormattedString"] = 2] = "FormattedString";
18
+ /**
19
+ * Range of date instances from, to
20
+ */
21
+ DateTimeValueFormat[DateTimeValueFormat["RangeOfDateInstances"] = 3] = "RangeOfDateInstances";
22
+ })(DateTimeValueFormat || (DateTimeValueFormat = {}));
23
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/misc/enums.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,mBAqBX;AArBD,WAAY,mBAAmB;IAE3B;;OAEG;IACH,6EAAY,CAAA;IAEZ;;OAEG;IACH,+EAAa,CAAA;IAEb;;OAEG;IACH,mFAAe,CAAA;IAEf;;OAEG;IACH,6FAAoB,CAAA;AACxB,CAAC,EArBW,mBAAmB,KAAnB,mBAAmB,QAqB9B","sourcesContent":["/**\n * Available formats for date time value\n */\nexport enum DateTimeValueFormat\n{\n /**\n * Instance of date\n */\n DateInstance,\n\n /**\n * Numeric unix timestamp in seconds\n */\n UnixTimestamp,\n\n /**\n * Formatted date as string value\n */\n FormattedString,\n\n /**\n * Range of date instances from, to\n */\n RangeOfDateInstances,\n}"]}
@@ -3,6 +3,10 @@ import { InjectionToken } from '@angular/core';
3
3
  * Injection token used for injecting type that creates instance of DateApiObject
4
4
  */
5
5
  export const DATE_API_OBJECT_TYPE = new InjectionToken('DATE_API_OBJECT_TYPE');
6
+ /**
7
+ * Injection token used for injecting type that represents date time input
8
+ */
9
+ export const DATE_TIME_INPUT = new InjectionToken('DATE_TIME_INPUT');
6
10
  /**
7
11
  * Injection token used for obtaining DateApi implementation
8
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC,IAAI,cAAc,CAAoB,sBAAsB,CAAC,CAAC;AAErI;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA4B,IAAI,cAAc,CAAU,UAAU,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,IAAI,cAAc,CAAiB,iBAAiB,EACjB;IACI,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,GAAG,EAAE;QAEV,OAAO;YACH,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,MAAM;YACjB,cAAc,EAAE,KAAK;SACxB,CAAC;IACN,CAAC;CACJ,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateApi, DateApiObjectCtor, FormatProvider} from '../services';\n\n/**\n * Injection token used for injecting type that creates instance of DateApiObject\n */\nexport const DATE_API_OBJECT_TYPE: InjectionToken<DateApiObjectCtor> = new InjectionToken<DateApiObjectCtor>('DATE_API_OBJECT_TYPE');\n\n/**\n * Injection token used for obtaining DateApi implementation\n */\nexport const DATE_API: InjectionToken<DateApi> = new InjectionToken<DateApi>('DATE_API');\n\n/**\n * Injection token used for obtaining FormatProvider implementation\n */\nexport const FORMAT_PROVIDER: InjectionToken<FormatProvider> = new InjectionToken<FormatProvider>('FORMAT_PROVIDER',\n {\n providedIn: 'root',\n factory: () =>\n {\n return {\n date: 'yyyy-MM-dd',\n dateTime: 'yyyy-MM-dd HH:mm',\n time: 'HH:mm',\n year: 'yyyy',\n month: 'MM',\n week: 'ww',\n day: 'dd',\n hour: 'HH',\n minute: 'mm',\n second: 'ss',\n dayName: 'cccc',\n dayNameShort: 'cccccc',\n monthName: 'LLLL',\n monthNameShort: 'LLL'\n };\n }\n });"]}
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAK7C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC,IAAI,cAAc,CAAoB,sBAAsB,CAAC,CAAC;AAErI;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkC,IAAI,cAAc,CAAgB,iBAAiB,CAAC,CAAC;AAEnH;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA4B,IAAI,cAAc,CAAU,UAAU,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,IAAI,cAAc,CAAiB,iBAAiB,EACjB;IACI,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,GAAG,EAAE;QAEV,OAAO;YACH,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,MAAM;YACjB,cAAc,EAAE,KAAK;SACxB,CAAC;IACN,CAAC;CACJ,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimeInput, FormatProvider} from '../interfaces';\nimport {DateApi, DateApiObjectCtor} from '../services';\n\n/**\n * Injection token used for injecting type that creates instance of DateApiObject\n */\nexport const DATE_API_OBJECT_TYPE: InjectionToken<DateApiObjectCtor> = new InjectionToken<DateApiObjectCtor>('DATE_API_OBJECT_TYPE');\n\n/**\n * Injection token used for injecting type that represents date time input\n */\nexport const DATE_TIME_INPUT: InjectionToken<DateTimeInput> = new InjectionToken<DateTimeInput>('DATE_TIME_INPUT');\n\n/**\n * Injection token used for obtaining DateApi implementation\n */\nexport const DATE_API: InjectionToken<DateApi> = new InjectionToken<DateApi>('DATE_API');\n\n/**\n * Injection token used for obtaining FormatProvider implementation\n */\nexport const FORMAT_PROVIDER: InjectionToken<FormatProvider> = new InjectionToken<FormatProvider>('FORMAT_PROVIDER',\n {\n providedIn: 'root',\n factory: () =>\n {\n return {\n date: 'yyyy-MM-dd',\n dateTime: 'yyyy-MM-dd HH:mm',\n time: 'HH:mm',\n year: 'yyyy',\n month: 'MM',\n week: 'ww',\n day: 'dd',\n hour: 'HH',\n minute: 'mm',\n second: 'ss',\n dayName: 'cccc',\n dayNameShort: 'cccccc',\n monthName: 'LLLL',\n monthNameShort: 'LLL'\n };\n }\n });"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/misc/types.ts"],"names":[],"mappings":"","sourcesContent":["import {DateTimeValue} from '../interfaces';\nimport {DateApiObject} from '../services';\n\n/**\n * Type that represents parsed date value or values in case of range\n */\nexport type DateTimeObjectValue<TDate = unknown> = DateApiObject<TDate>|[DateApiObject<TDate>|null, DateApiObject<TDate>|null];\n\n/**\n * Type that represents input output types that can be processed by date time\n */\nexport type DateTimeInputOutputValue<TDate = unknown> = string|number|DateTimeValue<TDate>|TDate;\n"]}
@@ -0,0 +1,102 @@
1
+ import { isBlank, isJsObject, isPresent, isString, nameof } from '@jscrpt/common';
2
+ import { DateTimeValueFormat } from './enums';
3
+ /**
4
+ * Parses date time input output value
5
+ * @param value - Value to be parsed
6
+ * @param dateApi - Date api used for obtaining result
7
+ * @param dateTimeFormat - Date time format type, optional, if not specified autodetection of format will be used
8
+ * @param stringFormat - String format for parsing string dates, required only for string dates
9
+ */
10
+ export function parseDateTime(value, dateApi, dateTimeFormat, stringFormat) {
11
+ if (isBlank(value)) {
12
+ return value;
13
+ }
14
+ //format is specified
15
+ if (isPresent(dateTimeFormat)) {
16
+ //string format required, but format string was not provided
17
+ if (dateTimeFormat == DateTimeValueFormat.FormattedString && isBlank(stringFormat)) {
18
+ throw new Error('DateTime: unable to parse string date, because format is missing!');
19
+ }
20
+ //value is range
21
+ if (isDateTimeValue(value)) {
22
+ //requirested format is different
23
+ if (dateTimeFormat != DateTimeValueFormat.RangeOfDateInstances) {
24
+ throw new Error('DateTime: requested datetime format is not range, but value is range!');
25
+ }
26
+ return [
27
+ isBlank(value.from) ? null : parseDateTime(value.from, dateApi, DateTimeValueFormat.DateInstance, null),
28
+ isBlank(value.to) ? null : parseDateTime(value.to, dateApi, DateTimeValueFormat.DateInstance, null),
29
+ ];
30
+ }
31
+ //value should be date instance, or number, or string, but it is not
32
+ if (dateTimeFormat != DateTimeValueFormat.DateInstance &&
33
+ dateTimeFormat != DateTimeValueFormat.FormattedString &&
34
+ dateTimeFormat != DateTimeValueFormat.UnixTimestamp) {
35
+ throw new Error('DateTime: unable to get date time value, should be date instance, or string, or number!');
36
+ }
37
+ //value is string, instance of date or unix timestamp
38
+ return dateApi.getValue(value, stringFormat !== null && stringFormat !== void 0 ? stringFormat : undefined);
39
+ }
40
+ //value is range
41
+ if (isDateTimeValue(value)) {
42
+ return [
43
+ isBlank(value.from) ? null : parseDateTime(value.from, dateApi, DateTimeValueFormat.DateInstance, null),
44
+ isBlank(value.to) ? null : parseDateTime(value.to, dateApi, DateTimeValueFormat.DateInstance, null),
45
+ ];
46
+ }
47
+ //string format, but format string was not provided
48
+ if (isString(value) && isBlank(stringFormat)) {
49
+ throw new Error('DateTime: unable to parse string date, because format is missing!');
50
+ }
51
+ //value is string, instance of date or unix timestamp
52
+ return dateApi.getValue(value, stringFormat !== null && stringFormat !== void 0 ? stringFormat : undefined);
53
+ }
54
+ /**
55
+ * Formats value into specified format of date time
56
+ * @param value - Value that should be converted to input output date time value
57
+ * @param dateTimeFormat - Date time format type
58
+ * @param stringFormat - String format for parsing string dates, required only for string dates
59
+ */
60
+ export function formatDateTime(value, dateTimeFormat, stringFormat) {
61
+ var _a, _b, _c, _d;
62
+ if (isBlank(value)) {
63
+ return value;
64
+ }
65
+ //value is range
66
+ if (Array.isArray(value)) {
67
+ //range is expected
68
+ if (dateTimeFormat != DateTimeValueFormat.RangeOfDateInstances) {
69
+ throw new Error('DateTime: value is array of values, but format is not range!');
70
+ }
71
+ return {
72
+ from: (_b = (_a = value[0]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null,
73
+ to: (_d = (_c = value[1]) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : null,
74
+ };
75
+ }
76
+ //range is not expected
77
+ if (dateTimeFormat == DateTimeValueFormat.RangeOfDateInstances) {
78
+ throw new Error('DateTime: value is not array of values, but format is range!');
79
+ }
80
+ //string date time
81
+ if (dateTimeFormat == DateTimeValueFormat.FormattedString) {
82
+ //string format is missing for string date time
83
+ if (isBlank(stringFormat)) {
84
+ throw new Error('DateTime: missing string format for string date time!');
85
+ }
86
+ return value.format(stringFormat);
87
+ }
88
+ if (dateTimeFormat == DateTimeValueFormat.UnixTimestamp) {
89
+ value.unixTimestamp();
90
+ }
91
+ return value.value;
92
+ }
93
+ /**
94
+ * Tests whether value is `DateTimeValue`
95
+ * @param value - Value that is tested
96
+ */
97
+ export function isDateTimeValue(value) {
98
+ return isJsObject(value) &&
99
+ nameof('from') in value &&
100
+ nameof('to') in value;
101
+ }
102
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/misc/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import {isBlank, isJsObject, isPresent, isString, nameof} from '@jscrpt/common';\n\nimport {DateTimeValue} from '../interfaces';\nimport {DateApi, DateApiObject} from '../services';\nimport {DateTimeValueFormat} from './enums';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from './types';\n\n/**\n * Parses date time input output value\n * @param value - Value to be parsed\n * @param dateApi - Date api used for obtaining result\n * @param dateTimeFormat - Date time format type, optional, if not specified autodetection of format will be used\n * @param stringFormat - String format for parsing string dates, required only for string dates\n */\nexport function parseDateTime<TDate = unknown>(value: DateTimeInputOutputValue<TDate>|undefined|null,\n dateApi: DateApi<TDate>,\n dateTimeFormat: DateTimeValueFormat|undefined|null,\n stringFormat: string|undefined|null,): DateTimeObjectValue<TDate>|undefined|null\n{\n if(isBlank(value))\n {\n return value;\n }\n\n //format is specified\n if(isPresent(dateTimeFormat))\n {\n //string format required, but format string was not provided\n if(dateTimeFormat == DateTimeValueFormat.FormattedString && isBlank(stringFormat))\n {\n throw new Error('DateTime: unable to parse string date, because format is missing!');\n }\n\n //value is range\n if(isDateTimeValue(value))\n {\n //requirested format is different\n if(dateTimeFormat != DateTimeValueFormat.RangeOfDateInstances)\n {\n throw new Error('DateTime: requested datetime format is not range, but value is range!');\n }\n\n return [\n isBlank(value.from) ? null : parseDateTime(value.from, dateApi, DateTimeValueFormat.DateInstance, null) as DateApiObject<TDate>,\n isBlank(value.to) ? null : parseDateTime(value.to, dateApi, DateTimeValueFormat.DateInstance, null) as DateApiObject<TDate>,\n ];\n }\n\n //value should be date instance, or number, or string, but it is not\n if(dateTimeFormat != DateTimeValueFormat.DateInstance &&\n dateTimeFormat != DateTimeValueFormat.FormattedString &&\n dateTimeFormat != DateTimeValueFormat.UnixTimestamp)\n {\n throw new Error('DateTime: unable to get date time value, should be date instance, or string, or number!');\n }\n\n //value is string, instance of date or unix timestamp\n return dateApi.getValue(value, stringFormat ?? undefined);\n }\n\n //value is range\n if(isDateTimeValue(value))\n {\n return [\n isBlank(value.from) ? null : parseDateTime(value.from, dateApi, DateTimeValueFormat.DateInstance, null) as DateApiObject<TDate>,\n isBlank(value.to) ? null : parseDateTime(value.to, dateApi, DateTimeValueFormat.DateInstance , null) as DateApiObject<TDate>,\n ];\n }\n\n //string format, but format string was not provided\n if(isString(value) && isBlank(stringFormat))\n {\n throw new Error('DateTime: unable to parse string date, because format is missing!');\n }\n\n //value is string, instance of date or unix timestamp\n return dateApi.getValue(value, stringFormat ?? undefined);\n}\n\n/**\n * Formats value into specified format of date time\n * @param value - Value that should be converted to input output date time value\n * @param dateTimeFormat - Date time format type\n * @param stringFormat - String format for parsing string dates, required only for string dates\n */\nexport function formatDateTime<TDate = unknown>(value: DateTimeObjectValue<TDate>|undefined|null,\n dateTimeFormat: DateTimeValueFormat,\n stringFormat: string|undefined|null): DateTimeInputOutputValue<TDate>|undefined|null\n{\n if(isBlank(value))\n {\n return value;\n }\n\n //value is range\n if(Array.isArray(value))\n {\n //range is expected\n if(dateTimeFormat != DateTimeValueFormat.RangeOfDateInstances)\n {\n throw new Error('DateTime: value is array of values, but format is not range!');\n }\n\n return {\n from: value[0]?.value ?? null,\n to: value[1]?.value ?? null,\n };\n }\n\n //range is not expected\n if(dateTimeFormat == DateTimeValueFormat.RangeOfDateInstances)\n {\n throw new Error('DateTime: value is not array of values, but format is range!');\n }\n\n //string date time\n if(dateTimeFormat == DateTimeValueFormat.FormattedString)\n {\n //string format is missing for string date time\n if(isBlank(stringFormat))\n {\n throw new Error('DateTime: missing string format for string date time!');\n }\n\n return value.format(stringFormat);\n }\n\n if(dateTimeFormat == DateTimeValueFormat.UnixTimestamp)\n {\n value.unixTimestamp();\n }\n\n return value.value;\n}\n\n/**\n * Tests whether value is `DateTimeValue`\n * @param value - Value that is tested\n */\nexport function isDateTimeValue<TDate = unknown>(value: unknown): value is DateTimeValue<TDate>\n{\n return isJsObject(value) &&\n nameof<DateTimeValue>('from') in value &&\n nameof<DateTimeValue>('to') in value;\n}"]}
@@ -1,3 +1,33 @@
1
+ import { isBlank } from '@jscrpt/common';
2
+ import { parseDateTime } from './utils';
3
+ /**
4
+ * Date time validator factory function, creates validator for checking validity of datetime
5
+ * @param dateApi - Date api used for parsing date time
6
+ * @param valueFormat - Optional required format
7
+ * @param stringFormat - Optional string format of value
8
+ */
9
+ export function datetimeValidator(dateApi, valueFormat, stringFormat) {
10
+ return (control) => {
11
+ if (isBlank(control.value)) {
12
+ return null;
13
+ }
14
+ const parsedValue = parseDateTime(control.value, dateApi, valueFormat, stringFormat);
15
+ if (!parsedValue) {
16
+ return null;
17
+ }
18
+ if (!Array.isArray(parsedValue)) {
19
+ if (!parsedValue.isValid()) {
20
+ return {
21
+ 'datetime': true
22
+ };
23
+ }
24
+ }
25
+ else {
26
+ //TODO: support for ranges
27
+ }
28
+ return null;
29
+ };
30
+ }
1
31
  /**
2
32
  * Validations functions for datetime
3
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/misc/validators.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,OAAO,UAAU;IAEnB;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAc,QAAoC;QAEpE,OAAO,GAA0B,EAAE;YAE/B,IAAG,CAAC,QAAQ,CAAC,KAAK,EAClB;gBACI,OAAO;oBACH,UAAU,EAAE,IAAI;iBACnB,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAc,QAAoC,EAAE,OAAuB;QAEhG,OAAO,CAAC,OAAwB,EAAyB,EAAE;YAEvD,IAAG,CAAC,CAAC,OAAO,CAAC,KAAK;gBACf,QAAQ,CAAC,KAAK;gBACd,QAAQ,CAAC,QAAQ;gBACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC9D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAc,QAAoC,EAAE,OAAuB;QAEhG,OAAO,CAAC,OAAwB,EAAyB,EAAE;YAEvD,IAAG,CAAC,CAAC,OAAO,CAAC,KAAK;gBACf,QAAQ,CAAC,KAAK;gBACd,QAAQ,CAAC,QAAQ;gBACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC7D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\nimport {DateApi} from '../services';\nimport {DateTimeValueObject} from './datetime.interface';\n\n/**\n * Validations functions for datetime\n */\nexport class Validators\n{\n /**\n * Creates validator function that validates control if its value is valid datetime value\n * @param datetime - Object storing information about datetime value\n */\n public static datetime<TDate = any>(datetime: DateTimeValueObject<TDate>): ValidatorFn\n {\n return (): ValidationErrors|null =>\n {\n if(!datetime.valid)\n {\n return {\n 'datetime': true\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of minimal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static minDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.minValue &&\n dateApi.getValue(control.value).isBefore(datetime.minValue))\n {\n return {\n 'minDatetime': datetime.minValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of maximal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static maxDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.maxValue &&\n dateApi.getValue(control.value).isAfter(datetime.maxValue))\n {\n return {\n 'maxDatetime': datetime.maxValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n}"]}
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/misc/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAIvC,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAItC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAkB,OAAuB,EACvB,WAA+C,EAC/C,YAAmC;IAElF,OAAO,CAAC,OAAyD,EAAyB,EAAE;QAExF,IAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EACzB;YACI,OAAO,IAAI,CAAC;SACf;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAErF,IAAG,CAAC,WAAW,EACf;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC9B;YACI,IAAG,CAAC,WAAW,CAAC,OAAO,EAAE,EACzB;gBACI,OAAO;oBACH,UAAU,EAAE,IAAI;iBACnB,CAAC;aACL;SACJ;aAED;YACI,0BAA0B;SAC7B;QAED,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,UAAU;IAEnB;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAc,QAAoC;QAEpE,OAAO,GAA0B,EAAE;YAE/B,IAAG,CAAC,QAAQ,CAAC,KAAK,EAClB;gBACI,OAAO;oBACH,UAAU,EAAE,IAAI;iBACnB,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAc,QAAoC,EAAE,OAAuB;QAEhG,OAAO,CAAC,OAAwB,EAAyB,EAAE;YAEvD,IAAG,CAAC,CAAC,OAAO,CAAC,KAAK;gBACf,QAAQ,CAAC,KAAK;gBACd,QAAQ,CAAC,QAAQ;gBACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC9D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAc,QAAoC,EAAE,OAAuB;QAEhG,OAAO,CAAC,OAAwB,EAAyB,EAAE;YAEvD,IAAG,CAAC,CAAC,OAAO,CAAC,KAAK;gBACf,QAAQ,CAAC,KAAK;gBACd,QAAQ,CAAC,QAAQ;gBACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC7D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\nimport {isBlank} from '@jscrpt/common';\n\nimport {DateApi} from '../services';\nimport {DateTimeValueObject} from '../interfaces/dateTime/datetime.interface';\nimport {parseDateTime} from './utils';\nimport {DateTimeValueFormat} from './enums';\nimport {DateTimeInputOutputValue} from './types';\n\n/**\n * Date time validator factory function, creates validator for checking validity of datetime\n * @param dateApi - Date api used for parsing date time\n * @param valueFormat - Optional required format\n * @param stringFormat - Optional string format of value\n */\nexport function datetimeValidator<TDate = unknown>(dateApi: DateApi<TDate>,\n valueFormat: DateTimeValueFormat|undefined|null,\n stringFormat: string|undefined|null,): ValidatorFn\n{\n return (control: AbstractControl<DateTimeInputOutputValue<TDate>>): ValidationErrors|null =>\n {\n if(isBlank(control.value))\n {\n return null;\n }\n\n const parsedValue = parseDateTime(control.value, dateApi, valueFormat, stringFormat);\n\n if(!parsedValue)\n {\n return null;\n }\n\n if(!Array.isArray(parsedValue))\n {\n if(!parsedValue.isValid())\n {\n return {\n 'datetime': true\n };\n }\n }\n else\n {\n //TODO: support for ranges\n }\n\n return null;\n };\n}\n\n/**\n * Validations functions for datetime\n */\nexport class Validators\n{\n /**\n * Creates validator function that validates control if its value is valid datetime value\n * @param datetime - Object storing information about datetime value\n */\n public static datetime<TDate = any>(datetime: DateTimeValueObject<TDate>): ValidatorFn\n {\n return (): ValidationErrors|null =>\n {\n if(!datetime.valid)\n {\n return {\n 'datetime': true\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of minimal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static minDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.minValue &&\n dateApi.getValue(control.value).isBefore(datetime.minValue))\n {\n return {\n 'minDatetime': datetime.minValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of maximal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static maxDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.maxValue &&\n dateApi.getValue(control.value).isAfter(datetime.maxValue))\n {\n return {\n 'maxDatetime': datetime.maxValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n}"]}
@@ -7,12 +7,12 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export class DatePipesModule {
9
9
  }
10
- DatePipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
- DatePipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePipesModule, declarations: [DateFormatPipe,
10
+ DatePipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
+ DatePipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DatePipesModule, declarations: [DateFormatPipe,
12
12
  DateConvertPipe], exports: [DateFormatPipe,
13
13
  DateConvertPipe] });
14
- DatePipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePipesModule });
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DatePipesModule, decorators: [{
14
+ DatePipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePipesModule });
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DatePipesModule, decorators: [{
16
16
  type: NgModule,
17
17
  args: [{
18
18
  declarations: [
@@ -0,0 +1,76 @@
1
+ import { Directive, forwardRef, Inject } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { Subscription } from 'rxjs';
4
+ import { DATE_TIME_INPUT } from '../../../../misc/tokens';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Control value accessor that is used for getting and setting value for date time
8
+ */
9
+ export class DateTimeControlValueAccessorDirective {
10
+ //######################### constructor #########################
11
+ constructor(input) {
12
+ this.input = input;
13
+ //######################### protected properties #########################
14
+ /**
15
+ * Subscriptions created during initialization
16
+ */
17
+ this.initSubscriptions = new Subscription();
18
+ }
19
+ //######################### public methods - implementation of OnDestroy #########################
20
+ /**
21
+ * Called when component is destroyed
22
+ */
23
+ ngOnDestroy() {
24
+ this.initSubscriptions.unsubscribe();
25
+ }
26
+ //######################### public methods - implementation of ControlValueAccessor #########################
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ writeValue(value) {
31
+ this.input.value = value;
32
+ }
33
+ /**
34
+ * @inheritdoc
35
+ */
36
+ registerOnChange(fn) {
37
+ this.initSubscriptions.add(this.input.valueChange.subscribe(() => fn(this.input.value)));
38
+ }
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ registerOnTouched(fn) {
43
+ this.initSubscriptions.add(this.input.focus.subscribe(() => fn()));
44
+ }
45
+ /**
46
+ * @inheritdoc
47
+ */
48
+ setDisabledState(isDisabled) {
49
+ this.input.disabled = isDisabled;
50
+ }
51
+ }
52
+ DateTimeControlValueAccessorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeControlValueAccessorDirective, deps: [{ token: DATE_TIME_INPUT }], target: i0.ɵɵFactoryTarget.Directive });
53
+ DateTimeControlValueAccessorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeControlValueAccessorDirective, selector: "[dateTime][formControlName],[dateTime][formControl],[dateTime][ngModel]", providers: [
54
+ {
55
+ provide: NG_VALUE_ACCESSOR,
56
+ useExisting: forwardRef(() => DateTimeControlValueAccessorDirective),
57
+ multi: true,
58
+ },
59
+ ], ngImport: i0 });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeControlValueAccessorDirective, decorators: [{
61
+ type: Directive,
62
+ args: [{
63
+ selector: '[dateTime][formControlName],[dateTime][formControl],[dateTime][ngModel]',
64
+ providers: [
65
+ {
66
+ provide: NG_VALUE_ACCESSOR,
67
+ useExisting: forwardRef(() => DateTimeControlValueAccessorDirective),
68
+ multi: true,
69
+ },
70
+ ],
71
+ }]
72
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
73
+ type: Inject,
74
+ args: [DATE_TIME_INPUT]
75
+ }] }]; } });
76
+ //# sourceMappingURL=dateTimeControlValueAccessor.directive.js.map