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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (546) hide show
  1. package/changelog.md +113 -0
  2. package/date-fns/src/services/dateFnsDateApi.service.d.ts +4 -0
  3. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  4. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +11 -5
  5. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  6. package/es2015/moment/src/services/momentDateApi.service.js +9 -3
  7. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -1
  8. package/es2015/src/index.js +13 -13
  9. package/es2015/src/index.js.map +1 -1
  10. package/es2015/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
  11. package/es2015/src/interfaces/dateTime/datetime.interface.js.map +1 -0
  12. package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
  13. package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
  14. package/es2015/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
  15. package/es2015/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
  16. package/es2015/src/interfaces/index.js +4 -0
  17. package/es2015/src/interfaces/index.js.map +1 -0
  18. package/{es2020/src → es2015/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
  19. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
  20. package/es2015/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
  21. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
  22. package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
  23. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  24. package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
  25. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  26. package/{es2020/src → es2015/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
  27. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  28. package/es2015/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
  29. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  30. package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
  31. package/es2015/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
  32. package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
  33. package/es2015/src/legacy/picker/components/picker/picker.component.js.map +1 -0
  34. package/{es2020/src → es2015/src/legacy}/picker/components/pickerBase.component.js +4 -4
  35. package/es2015/src/legacy/picker/components/pickerBase.component.js.map +1 -0
  36. package/{es2020/src → es2015/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
  37. package/es2015/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
  38. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
  39. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  40. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  41. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
  42. package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
  43. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
  44. package/{es2020/src → es2015/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
  45. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  46. package/es2015/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
  47. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  48. package/es2015/src/{picker → legacy/picker}/directives/index.js +0 -0
  49. package/es2015/src/legacy/picker/directives/index.js.map +1 -0
  50. package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
  51. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  52. package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
  53. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  54. package/es2015/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
  55. package/es2015/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  56. package/es2015/src/{picker → legacy/picker}/interfaces.js +0 -0
  57. package/es2015/src/legacy/picker/interfaces.js.map +1 -0
  58. package/es2015/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
  59. package/es2015/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
  60. package/es2015/src/{picker → legacy/picker}/misc/tokens.js +0 -0
  61. package/es2015/src/legacy/picker/misc/tokens.js.map +1 -0
  62. package/{es2020/src → es2015/src/legacy}/picker/modules/picker.module.js +10 -12
  63. package/es2015/src/legacy/picker/modules/picker.module.js.map +1 -0
  64. package/es2015/src/{picker → legacy/picker}/types.js +0 -0
  65. package/es2015/src/legacy/picker/types.js.map +1 -0
  66. package/es2015/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +7 -9
  67. package/es2015/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  68. package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
  69. package/es2015/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
  70. package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
  71. package/es2015/src/legacy/selector/components/selector/selector.component.js.map +1 -0
  72. package/es2015/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
  73. package/es2015/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  74. package/es2015/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
  75. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
  76. package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
  77. package/es2015/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  78. package/es2015/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
  79. package/es2015/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  80. package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
  81. package/es2015/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  82. package/es2015/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
  83. package/es2015/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  84. package/es2015/src/{selector → legacy/selector}/interfaces.js +0 -0
  85. package/es2015/src/legacy/selector/interfaces.js.map +1 -0
  86. package/es2015/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
  87. package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
  88. package/es2015/src/{selector → legacy/selector}/misc/tokens.js +0 -0
  89. package/es2015/src/legacy/selector/misc/tokens.js.map +1 -0
  90. package/{es2020/src → es2015/src/legacy}/selector/modules/basicSelector.module.js +4 -4
  91. package/es2015/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
  92. package/es2015/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
  93. package/es2015/src/legacy/selector/modules/selector.module.js.map +1 -0
  94. package/es2015/src/{selector → legacy/selector}/types.js +0 -0
  95. package/es2015/src/legacy/selector/types.js.map +1 -0
  96. package/es2015/src/misc/enums.js +23 -0
  97. package/es2015/src/misc/enums.js.map +1 -0
  98. package/es2015/src/misc/tokens.js +4 -0
  99. package/es2015/src/misc/tokens.js.map +1 -1
  100. package/es2015/src/misc/types.js +2 -0
  101. package/es2015/src/misc/types.js.map +1 -0
  102. package/es2015/src/misc/utils.js +112 -0
  103. package/es2015/src/misc/utils.js.map +1 -0
  104. package/es2015/src/misc/validators.js +107 -0
  105. package/es2015/src/misc/validators.js.map +1 -1
  106. package/es2015/src/modules/datePipes.module.js +4 -4
  107. package/es2015/src/modules/dateTime/directives/dateTimeBase.js +77 -0
  108. package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
  109. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  110. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  111. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +144 -0
  112. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  113. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +72 -0
  114. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
  115. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +71 -0
  116. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
  117. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js +152 -0
  118. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +1 -0
  119. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +64 -0
  120. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  121. package/es2015/src/modules/dateTime/directives/index.js +8 -0
  122. package/es2015/src/modules/dateTime/directives/index.js.map +1 -0
  123. package/es2015/src/modules/dateTime/index.js +3 -0
  124. package/es2015/src/modules/dateTime/index.js.map +1 -0
  125. package/es2015/src/modules/dateTime/modules/dateTime.module.js +39 -0
  126. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  127. package/es2015/src/modules/dateTime/modules/index.js +2 -0
  128. package/es2015/src/modules/dateTime/modules/index.js.map +1 -0
  129. package/es2015/src/modules/index.js +3 -0
  130. package/es2015/src/modules/index.js.map +1 -0
  131. package/es2015/src/pipes/dateConvert.pipe.js +3 -3
  132. package/es2015/src/pipes/dateFormat.pipe.js +3 -3
  133. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
  134. package/es2015/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  135. package/es2015/src/services/dateApi/dateApi.interface.js.map +1 -0
  136. package/es2015/src/services/{datePositionParser.interface.js → datePositionParser/datePositionParser.interface.js} +0 -0
  137. package/es2015/src/services/datePositionParser/datePositionParser.interface.js.map +1 -0
  138. package/{es2020/src/services → es2015/src/services/datePositionParser}/datePositionParser.service.js +3 -3
  139. package/es2015/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
  140. package/es2015/src/services/{dateTimeRelativeParser.service.js → dateTimeRelativeParser/dateTimeRelativeParser.service.js} +11 -11
  141. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
  142. package/{es2020/src/services → es2015/src/services/dateValueProvider}/dateValueProvider.service.js +4 -4
  143. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
  144. package/es2015/src/services/index.js +5 -3
  145. package/es2015/src/services/index.js.map +1 -1
  146. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +11 -5
  147. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  148. package/es2020/moment/src/services/momentDateApi.service.js +9 -3
  149. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -1
  150. package/es2020/src/index.js +13 -13
  151. package/es2020/src/index.js.map +1 -1
  152. package/es2020/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
  153. package/es2020/src/interfaces/dateTime/datetime.interface.js.map +1 -0
  154. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
  155. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
  156. package/es2020/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
  157. package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
  158. package/es2020/src/interfaces/index.js +4 -0
  159. package/es2020/src/interfaces/index.js.map +1 -0
  160. package/{es2015/src → es2020/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
  161. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
  162. package/es2020/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
  163. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
  164. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
  165. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  166. package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
  167. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  168. package/{es2015/src → es2020/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
  169. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  170. package/es2020/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
  171. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  172. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
  173. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
  174. package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
  175. package/es2020/src/legacy/picker/components/picker/picker.component.js.map +1 -0
  176. package/{es2015/src → es2020/src/legacy}/picker/components/pickerBase.component.js +4 -4
  177. package/es2020/src/legacy/picker/components/pickerBase.component.js.map +1 -0
  178. package/{es2015/src → es2020/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
  179. package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
  180. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
  181. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  182. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  183. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
  184. package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
  185. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
  186. package/{es2015/src → es2020/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
  187. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  188. package/es2020/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
  189. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  190. package/es2020/src/{picker → legacy/picker}/directives/index.js +0 -0
  191. package/es2020/src/legacy/picker/directives/index.js.map +1 -0
  192. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
  193. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  194. package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
  195. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  196. package/es2020/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
  197. package/es2020/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  198. package/es2020/src/{picker → legacy/picker}/interfaces.js +0 -0
  199. package/es2020/src/legacy/picker/interfaces.js.map +1 -0
  200. package/es2020/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
  201. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
  202. package/es2020/src/{picker → legacy/picker}/misc/tokens.js +0 -0
  203. package/es2020/src/legacy/picker/misc/tokens.js.map +1 -0
  204. package/{es2015/src → es2020/src/legacy}/picker/modules/picker.module.js +10 -12
  205. package/es2020/src/legacy/picker/modules/picker.module.js.map +1 -0
  206. package/es2020/src/{picker → legacy/picker}/types.js +0 -0
  207. package/es2020/src/legacy/picker/types.js.map +1 -0
  208. package/es2020/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +7 -9
  209. package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  210. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
  211. package/es2020/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
  212. package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
  213. package/es2020/src/legacy/selector/components/selector/selector.component.js.map +1 -0
  214. package/es2020/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
  215. package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  216. package/es2020/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
  217. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
  218. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
  219. package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  220. package/es2020/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
  221. package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  222. package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
  223. package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  224. package/es2020/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
  225. package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  226. package/es2020/src/{selector → legacy/selector}/interfaces.js +0 -0
  227. package/es2020/src/legacy/selector/interfaces.js.map +1 -0
  228. package/es2020/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
  229. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
  230. package/es2020/src/{selector → legacy/selector}/misc/tokens.js +0 -0
  231. package/es2020/src/legacy/selector/misc/tokens.js.map +1 -0
  232. package/{es2015/src → es2020/src/legacy}/selector/modules/basicSelector.module.js +4 -4
  233. package/es2020/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
  234. package/es2020/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
  235. package/es2020/src/legacy/selector/modules/selector.module.js.map +1 -0
  236. package/es2020/src/{selector → legacy/selector}/types.js +0 -0
  237. package/es2020/src/legacy/selector/types.js.map +1 -0
  238. package/es2020/src/misc/enums.js +23 -0
  239. package/es2020/src/misc/enums.js.map +1 -0
  240. package/es2020/src/misc/tokens.js +4 -0
  241. package/es2020/src/misc/tokens.js.map +1 -1
  242. package/es2020/src/misc/types.js +2 -0
  243. package/es2020/src/misc/types.js.map +1 -0
  244. package/es2020/src/misc/utils.js +111 -0
  245. package/es2020/src/misc/utils.js.map +1 -0
  246. package/es2020/src/misc/validators.js +107 -0
  247. package/es2020/src/misc/validators.js.map +1 -1
  248. package/es2020/src/modules/datePipes.module.js +4 -4
  249. package/es2020/src/modules/dateTime/directives/dateTimeBase.js +77 -0
  250. package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
  251. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
  252. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  253. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +143 -0
  254. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  255. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +72 -0
  256. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
  257. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +71 -0
  258. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
  259. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js +149 -0
  260. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +1 -0
  261. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +64 -0
  262. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  263. package/es2020/src/modules/dateTime/directives/index.js +8 -0
  264. package/es2020/src/modules/dateTime/directives/index.js.map +1 -0
  265. package/es2020/src/modules/dateTime/index.js +3 -0
  266. package/es2020/src/modules/dateTime/index.js.map +1 -0
  267. package/es2020/src/modules/dateTime/modules/dateTime.module.js +39 -0
  268. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  269. package/es2020/src/modules/dateTime/modules/index.js +2 -0
  270. package/es2020/src/modules/dateTime/modules/index.js.map +1 -0
  271. package/es2020/src/modules/index.js +3 -0
  272. package/es2020/src/modules/index.js.map +1 -0
  273. package/es2020/src/pipes/dateConvert.pipe.js +3 -3
  274. package/es2020/src/pipes/dateFormat.pipe.js +3 -3
  275. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
  276. package/es2020/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
  277. package/es2020/src/services/dateApi/dateApi.interface.js.map +1 -0
  278. package/es2020/src/services/{datePositionParser.interface.js → datePositionParser/datePositionParser.interface.js} +0 -0
  279. package/es2020/src/services/datePositionParser/datePositionParser.interface.js.map +1 -0
  280. package/{es2015/src/services → es2020/src/services/datePositionParser}/datePositionParser.service.js +3 -3
  281. package/es2020/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
  282. package/es2020/src/services/{dateTimeRelativeParser.service.js → dateTimeRelativeParser/dateTimeRelativeParser.service.js} +11 -11
  283. package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
  284. package/{es2015/src/services → es2020/src/services/dateValueProvider}/dateValueProvider.service.js +4 -4
  285. package/es2020/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
  286. package/es2020/src/services/index.js +5 -3
  287. package/es2020/src/services/index.js.map +1 -1
  288. package/moment/src/services/momentDateApi.service.d.ts +4 -0
  289. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  290. package/package.json +36 -36
  291. package/src/index.d.ts +13 -13
  292. package/src/index.d.ts.map +1 -1
  293. package/src/{misc → interfaces/dateTime}/datetime.interface.d.ts +2 -2
  294. package/src/interfaces/dateTime/datetime.interface.d.ts.map +1 -0
  295. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +37 -0
  296. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts.map +1 -0
  297. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts +0 -0
  298. package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts.map +0 -0
  299. package/src/interfaces/index.d.ts +4 -0
  300. package/src/interfaces/index.d.ts.map +1 -0
  301. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.css +0 -0
  302. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts +1 -1
  303. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts.map +0 -0
  304. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.html +0 -0
  305. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts +0 -0
  306. package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts.map +0 -0
  307. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.css +0 -0
  308. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts +3 -3
  309. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  310. package/src/legacy/picker/components/dayPicker/dayPicker.component.html +21 -0
  311. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts +0 -0
  312. package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts.map +0 -0
  313. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.css +0 -0
  314. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts +2 -2
  315. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  316. package/src/legacy/picker/components/monthPicker/monthPicker.component.html +13 -0
  317. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts +0 -0
  318. package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts.map +0 -0
  319. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts +0 -0
  320. package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts.map +0 -0
  321. package/src/{picker → legacy/picker}/components/picker/picker.component.css +0 -0
  322. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts +3 -3
  323. package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts.map +1 -1
  324. package/src/legacy/picker/components/picker/picker.component.html +3 -0
  325. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts +3 -3
  326. package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts.map +1 -1
  327. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts +3 -3
  328. package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts.map +1 -1
  329. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.css +0 -0
  330. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts +3 -3
  331. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  332. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.html +0 -0
  333. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts +0 -0
  334. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +0 -0
  335. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts +0 -0
  336. package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts.map +0 -0
  337. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.css +0 -0
  338. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts +2 -2
  339. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  340. package/src/legacy/picker/components/yearPicker/yearPicker.component.html +13 -0
  341. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts +0 -0
  342. package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts.map +0 -0
  343. package/src/{picker → legacy/picker}/directives/index.d.ts +0 -0
  344. package/src/{picker → legacy/picker}/directives/index.d.ts.map +0 -0
  345. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts +1 -1
  346. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts.map +0 -0
  347. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts +0 -0
  348. package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts.map +0 -0
  349. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
  350. package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts.map +0 -0
  351. package/src/{picker → legacy/picker}/interfaces.d.ts +0 -0
  352. package/src/{picker → legacy/picker}/interfaces.d.ts.map +0 -0
  353. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts +2 -2
  354. package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts.map +1 -1
  355. package/src/{picker → legacy/picker}/misc/tokens.d.ts +0 -0
  356. package/src/{picker → legacy/picker}/misc/tokens.d.ts.map +0 -0
  357. package/src/{picker → legacy/picker}/modules/picker.module.d.ts +1 -1
  358. package/src/{picker → legacy/picker}/modules/picker.module.d.ts.map +0 -0
  359. package/src/{picker → legacy/picker}/types.d.ts +0 -0
  360. package/src/{picker → legacy/picker}/types.d.ts.map +0 -0
  361. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.css +0 -0
  362. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts +3 -5
  363. package/src/legacy/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -0
  364. package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.html +0 -0
  365. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts +0 -0
  366. package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts.map +0 -0
  367. package/src/{selector → legacy/selector}/components/selector/selector.component.css +0 -0
  368. package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts +4 -4
  369. package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts.map +1 -1
  370. package/src/{selector → legacy/selector}/components/selector/selector.component.html +2 -2
  371. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.css +0 -0
  372. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +3 -4
  373. package/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -0
  374. package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.html +0 -0
  375. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +2 -2
  376. package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +1 -1
  377. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +2 -2
  378. package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  379. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +2 -2
  380. package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  381. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts +1 -1
  382. package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +0 -0
  383. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +2 -2
  384. package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  385. package/src/{selector → legacy/selector}/interfaces.d.ts +0 -0
  386. package/src/{selector → legacy/selector}/interfaces.d.ts.map +0 -0
  387. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts +1 -1
  388. package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts.map +1 -1
  389. package/src/{selector → legacy/selector}/misc/tokens.d.ts +0 -0
  390. package/src/{selector → legacy/selector}/misc/tokens.d.ts.map +0 -0
  391. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts +0 -0
  392. package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts.map +0 -0
  393. package/src/{selector → legacy/selector}/modules/selector.module.d.ts +0 -0
  394. package/src/{selector → legacy/selector}/modules/selector.module.d.ts.map +0 -0
  395. package/src/{selector → legacy/selector}/types.d.ts +0 -0
  396. package/src/{selector → legacy/selector}/types.d.ts.map +0 -0
  397. package/src/misc/enums.d.ts +22 -0
  398. package/src/misc/enums.d.ts.map +1 -0
  399. package/src/misc/tokens.d.ts +6 -1
  400. package/src/misc/tokens.d.ts.map +1 -1
  401. package/src/misc/types.d.ts +11 -0
  402. package/src/misc/types.d.ts.map +1 -0
  403. package/src/misc/utils.d.ts +30 -0
  404. package/src/misc/utils.d.ts.map +1 -0
  405. package/src/misc/validators.d.ts +26 -1
  406. package/src/misc/validators.d.ts.map +1 -1
  407. package/src/modules/dateTime/directives/dateTimeBase.d.ts +56 -0
  408. package/src/modules/dateTime/directives/dateTimeBase.d.ts.map +1 -0
  409. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +40 -0
  410. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -0
  411. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +61 -0
  412. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -0
  413. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts +33 -0
  414. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -0
  415. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts +33 -0
  416. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -0
  417. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts +74 -0
  418. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts.map +1 -0
  419. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +29 -0
  420. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -0
  421. package/src/modules/dateTime/directives/index.d.ts +8 -0
  422. package/src/modules/dateTime/directives/index.d.ts.map +1 -0
  423. package/src/modules/dateTime/index.d.ts +3 -0
  424. package/src/modules/dateTime/index.d.ts.map +1 -0
  425. package/src/modules/dateTime/modules/dateTime.module.d.ts +15 -0
  426. package/src/modules/dateTime/modules/dateTime.module.d.ts.map +1 -0
  427. package/src/modules/dateTime/modules/index.d.ts +2 -0
  428. package/src/modules/dateTime/modules/index.d.ts.map +1 -0
  429. package/src/modules/index.d.ts +3 -0
  430. package/src/modules/index.d.ts.map +1 -0
  431. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  432. package/src/pipes/dateFormat.pipe.d.ts +3 -2
  433. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  434. package/src/services/{dateApi.interface.d.ts → dateApi/dateApi.interface.d.ts} +4 -0
  435. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -0
  436. package/src/services/{datePositionParser.interface.d.ts → datePositionParser/datePositionParser.interface.d.ts} +0 -0
  437. package/src/services/{datePositionParser.interface.d.ts.map → datePositionParser/datePositionParser.interface.d.ts.map} +0 -0
  438. package/src/services/{datePositionParser.service.d.ts → datePositionParser/datePositionParser.service.d.ts} +0 -0
  439. package/src/services/{datePositionParser.service.d.ts.map → datePositionParser/datePositionParser.service.d.ts.map} +0 -0
  440. package/src/services/{dateTimeRelativeParser.service.d.ts → dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts} +3 -3
  441. package/src/services/{dateTimeRelativeParser.service.d.ts.map → dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts.map} +1 -1
  442. package/src/services/{dateValueProvider.service.d.ts → dateValueProvider/dateValueProvider.service.d.ts} +2 -2
  443. package/src/services/{dateValueProvider.service.d.ts.map → dateValueProvider/dateValueProvider.service.d.ts.map} +1 -1
  444. package/src/services/index.d.ts +5 -3
  445. package/src/services/index.d.ts.map +1 -1
  446. package/version.bak +1 -1
  447. package/es2015/src/misc/datetime.interface.js.map +0 -1
  448. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  449. package/es2015/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  450. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  451. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  452. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  453. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  454. package/es2015/src/picker/components/picker/picker.component.animations.js.map +0 -1
  455. package/es2015/src/picker/components/picker/picker.component.js.map +0 -1
  456. package/es2015/src/picker/components/pickerBase.component.js.map +0 -1
  457. package/es2015/src/picker/components/pickerImplBase.component.js.map +0 -1
  458. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  459. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  460. package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  461. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  462. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  463. package/es2015/src/picker/directives/index.js.map +0 -1
  464. package/es2015/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  465. package/es2015/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  466. package/es2015/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  467. package/es2015/src/picker/interfaces.js.map +0 -1
  468. package/es2015/src/picker/misc/datetimePicker.interface.js.map +0 -1
  469. package/es2015/src/picker/misc/tokens.js.map +0 -1
  470. package/es2015/src/picker/modules/picker.module.js.map +0 -1
  471. package/es2015/src/picker/types.js.map +0 -1
  472. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  473. package/es2015/src/selector/components/selector/selector.component.animations.js.map +0 -1
  474. package/es2015/src/selector/components/selector/selector.component.js.map +0 -1
  475. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  476. package/es2015/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  477. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  478. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  479. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  480. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  481. package/es2015/src/selector/interfaces.js.map +0 -1
  482. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  483. package/es2015/src/selector/misc/tokens.js.map +0 -1
  484. package/es2015/src/selector/modules/basicSelector.module.js.map +0 -1
  485. package/es2015/src/selector/modules/selector.module.js.map +0 -1
  486. package/es2015/src/selector/types.js.map +0 -1
  487. package/es2015/src/services/dateApi.interface.js.map +0 -1
  488. package/es2015/src/services/datePositionParser.interface.js.map +0 -1
  489. package/es2015/src/services/datePositionParser.service.js.map +0 -1
  490. package/es2015/src/services/dateTimeRelativeParser.service.js.map +0 -1
  491. package/es2015/src/services/dateValueProvider.service.js.map +0 -1
  492. package/es2015/src/services/formatProvider.interface.js.map +0 -1
  493. package/es2020/src/misc/datetime.interface.js.map +0 -1
  494. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  495. package/es2020/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  496. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  497. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  498. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  499. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  500. package/es2020/src/picker/components/picker/picker.component.animations.js.map +0 -1
  501. package/es2020/src/picker/components/picker/picker.component.js.map +0 -1
  502. package/es2020/src/picker/components/pickerBase.component.js.map +0 -1
  503. package/es2020/src/picker/components/pickerImplBase.component.js.map +0 -1
  504. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  505. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  506. package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  507. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  508. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  509. package/es2020/src/picker/directives/index.js.map +0 -1
  510. package/es2020/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  511. package/es2020/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  512. package/es2020/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  513. package/es2020/src/picker/interfaces.js.map +0 -1
  514. package/es2020/src/picker/misc/datetimePicker.interface.js.map +0 -1
  515. package/es2020/src/picker/misc/tokens.js.map +0 -1
  516. package/es2020/src/picker/modules/picker.module.js.map +0 -1
  517. package/es2020/src/picker/types.js.map +0 -1
  518. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
  519. package/es2020/src/selector/components/selector/selector.component.animations.js.map +0 -1
  520. package/es2020/src/selector/components/selector/selector.component.js.map +0 -1
  521. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
  522. package/es2020/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  523. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  524. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  525. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  526. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  527. package/es2020/src/selector/interfaces.js.map +0 -1
  528. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +0 -1
  529. package/es2020/src/selector/misc/tokens.js.map +0 -1
  530. package/es2020/src/selector/modules/basicSelector.module.js.map +0 -1
  531. package/es2020/src/selector/modules/selector.module.js.map +0 -1
  532. package/es2020/src/selector/types.js.map +0 -1
  533. package/es2020/src/services/dateApi.interface.js.map +0 -1
  534. package/es2020/src/services/datePositionParser.interface.js.map +0 -1
  535. package/es2020/src/services/datePositionParser.service.js.map +0 -1
  536. package/es2020/src/services/dateTimeRelativeParser.service.js.map +0 -1
  537. package/es2020/src/services/dateValueProvider.service.js.map +0 -1
  538. package/es2020/src/services/formatProvider.interface.js.map +0 -1
  539. package/src/misc/datetime.interface.d.ts.map +0 -1
  540. package/src/picker/components/dayPicker/dayPicker.component.html +0 -21
  541. package/src/picker/components/monthPicker/monthPicker.component.html +0 -13
  542. package/src/picker/components/picker/picker.component.html +0 -3
  543. package/src/picker/components/yearPicker/yearPicker.component.html +0 -13
  544. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +0 -1
  545. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +0 -1
  546. package/src/services/dateApi.interface.d.ts.map +0 -1
@@ -0,0 +1,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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeControlValueAccessor.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AACzF,OAAO,EAAuB,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;;AAGxD;;GAEG;AAcH,MAAM,OAAO,qCAAqC;IAS9C,iEAAiE;IACjE,YAA+C,KAA2B;QAA3B,UAAK,GAAL,KAAK,CAAsB;QAR1E,0EAA0E;QAE1E;;WAEG;QACO,sBAAiB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAK/D,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;IAED,6GAA6G;IAE7G;;OAEG;IACI,UAAU,CAAC,KAAqD;QAEnE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,gBAAgB,CAAC,EAAkE;QAEtF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,EAAc;QAEnC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACI,gBAAgB,CAAC,UAAmB;QAEvC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;IACrC,CAAC;;kIAxDQ,qCAAqC,kBAU1B,eAAe;sHAV1B,qCAAqC,kGAT9C;QAEI;YACI,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,qCAAqC,CAAC;YACpE,KAAK,EAAE,IAAI;SACd;KACJ;2FAEQ,qCAAqC;kBAbjD,SAAS;mBACV;oBACI,QAAQ,EAAE,yEAAyE;oBACnF,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,sCAAsC,CAAC;4BACpE,KAAK,EAAE,IAAI;yBACd;qBACJ;iBACJ;;0BAWgB,MAAM;2BAAC,eAAe","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnDestroy} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInput} from '../../../../interfaces';\nimport {DATE_TIME_INPUT} from '../../../../misc/tokens';\nimport {DateTimeInputOutputValue} from '../../../../misc/types';\n\n/**\n * Control value accessor that is used for getting and setting value for date time\n */\n@Directive(\n{\n selector: '[dateTime][formControlName],[dateTime][formControl],[dateTime][ngModel]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTimeControlValueAccessorDirective),\n multi: true,\n },\n ],\n})\nexport class DateTimeControlValueAccessorDirective<TDate = unknown> implements ControlValueAccessor, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n //######################### constructor #########################\n constructor(@Inject(DATE_TIME_INPUT) protected input: DateTimeInput<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.initSubscriptions.unsubscribe();\n }\n\n //######################### public methods - implementation of ControlValueAccessor #########################\n\n /**\n * @inheritdoc\n */\n public writeValue(value: DateTimeInputOutputValue<TDate>|undefined|null): void\n {\n this.input.value = value;\n }\n\n /**\n * @inheritdoc\n */\n public registerOnChange(fn: (data: DateTimeInputOutputValue<TDate>|undefined|null) => void): void\n {\n this.initSubscriptions.add(this.input.valueChange.subscribe(() => fn(this.input.value)));\n }\n\n /**\n * @inheritdoc\n */\n public registerOnTouched(fn: () => void): void\n {\n this.initSubscriptions.add(this.input.focus.subscribe(() => fn()));\n }\n\n /**\n * @inheritdoc\n */\n public setDisabledState(isDisabled: boolean): void\n {\n this.input.disabled = isDisabled;\n }\n}"]}
@@ -0,0 +1,143 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Directive, ElementRef, EventEmitter, forwardRef, Inject } from '@angular/core';
3
+ import { BindThis } from '@jscrpt/common';
4
+ import { DATE_API, DATE_TIME_INPUT, FORMAT_PROVIDER } from '../../../../misc/tokens';
5
+ import { formatDateTime, parseDateTime } from '../../../../misc/utils';
6
+ import { DateTimeBase } from '../dateTimeBase';
7
+ import * as i0 from "@angular/core";
8
+ //TODO: range is unimplemented
9
+ /**
10
+ * Directive that is used for setting up date time input
11
+ */
12
+ export class DateTimeInputDirective extends DateTimeBase {
13
+ //######################### constructors #########################
14
+ constructor(element, dateApi, formatProvider) {
15
+ super(dateApi, formatProvider);
16
+ this.element = element;
17
+ /**
18
+ * @inheritdoc
19
+ */
20
+ this.focus = new EventEmitter();
21
+ /**
22
+ * @inheritdoc
23
+ */
24
+ this.blur = new EventEmitter();
25
+ this.element.nativeElement.addEventListener('input', this.handleInput);
26
+ this.element.nativeElement.addEventListener('focus', this.handleFocus);
27
+ this.element.nativeElement.addEventListener('blur', this.handleBlur);
28
+ }
29
+ //######################### public properties - implementation of DateTimeInput #########################
30
+ /**
31
+ * @inheritdoc
32
+ */
33
+ get rawValue() {
34
+ return this.element.nativeElement.value;
35
+ }
36
+ set rawValue(value) {
37
+ this.element.nativeElement.value = value ?? '';
38
+ }
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ get value() {
43
+ return this.ɵValue;
44
+ }
45
+ set value(value) {
46
+ this.ɵValue = value;
47
+ //accepts all available formats
48
+ this.internalValue = parseDateTime(value, this.dateApi, null, this.customFormat);
49
+ //not range value
50
+ if (!Array.isArray(this.internalValue)) {
51
+ this.rawValue = this.internalValue?.format(this.customFormat);
52
+ }
53
+ else {
54
+ //TODO: add support for ranges
55
+ }
56
+ }
57
+ /**
58
+ * @inheritdoc
59
+ */
60
+ get disabled() {
61
+ return this.element.nativeElement.disabled;
62
+ }
63
+ set disabled(value) {
64
+ this.element.nativeElement.disabled = value;
65
+ }
66
+ //######################### public methods - implementation of OnDestroy #########################
67
+ /**
68
+ * Called when component is destroyed
69
+ */
70
+ ngOnDestroy() {
71
+ this.element.nativeElement.removeEventListener('input', this.handleInput);
72
+ this.element.nativeElement.removeEventListener('focus', this.handleFocus);
73
+ this.element.nativeElement.removeEventListener('blur', this.handleBlur);
74
+ }
75
+ //######################### protected methods #########################
76
+ /**
77
+ * Handles input event on input
78
+ */
79
+ handleInput() {
80
+ this.internalValue = parseDateTime(this.rawValue, this.dateApi, this.valueFormat, this.customFormat);
81
+ this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);
82
+ this.valueChange.next();
83
+ }
84
+ /**
85
+ * Handles focus event on input
86
+ * @param event - Event that occured
87
+ */
88
+ handleFocus(event) {
89
+ this.focus.emit(event);
90
+ }
91
+ /**
92
+ * Handles blur event on input
93
+ * @param event - Event that occured
94
+ */
95
+ handleBlur(event) {
96
+ this.blur.emit(event);
97
+ }
98
+ }
99
+ DateTimeInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeInputDirective, deps: [{ token: i0.ElementRef }, { token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Directive });
100
+ DateTimeInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeInputDirective, selector: "input[dateTime][dateTimeInput]", providers: [
101
+ {
102
+ provide: DATE_TIME_INPUT,
103
+ useExisting: forwardRef(() => DateTimeInputDirective),
104
+ },
105
+ ], exportAs: ["dateTime"], usesInheritance: true, ngImport: i0 });
106
+ __decorate([
107
+ BindThis,
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", []),
110
+ __metadata("design:returntype", void 0)
111
+ ], DateTimeInputDirective.prototype, "handleInput", null);
112
+ __decorate([
113
+ BindThis,
114
+ __metadata("design:type", Function),
115
+ __metadata("design:paramtypes", [FocusEvent]),
116
+ __metadata("design:returntype", void 0)
117
+ ], DateTimeInputDirective.prototype, "handleFocus", null);
118
+ __decorate([
119
+ BindThis,
120
+ __metadata("design:type", Function),
121
+ __metadata("design:paramtypes", [FocusEvent]),
122
+ __metadata("design:returntype", void 0)
123
+ ], DateTimeInputDirective.prototype, "handleBlur", null);
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeInputDirective, decorators: [{
125
+ type: Directive,
126
+ args: [{
127
+ selector: 'input[dateTime][dateTimeInput]',
128
+ providers: [
129
+ {
130
+ provide: DATE_TIME_INPUT,
131
+ useExisting: forwardRef(() => DateTimeInputDirective),
132
+ },
133
+ ],
134
+ exportAs: 'dateTime',
135
+ }]
136
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
137
+ type: Inject,
138
+ args: [DATE_API]
139
+ }] }, { type: undefined, decorators: [{
140
+ type: Inject,
141
+ args: [FORMAT_PROVIDER]
142
+ }] }]; }, propDecorators: { handleInput: [], handleFocus: [], handleBlur: [] } });
143
+ //# sourceMappingURL=dateTimeInput.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeInput.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.ts"],"names":[],"mappings":"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","sourcesContent":["import {Directive, ElementRef, EventEmitter, ExistingProvider, forwardRef, Inject, OnDestroy} from '@angular/core';\nimport {BindThis} from '@jscrpt/common';\n\nimport {DateTimeInput, FormatProvider} from '../../../../interfaces';\nimport {DATE_API, DATE_TIME_INPUT, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from '../../../../misc/types';\nimport {formatDateTime, parseDateTime} from '../../../../misc/utils';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n//TODO: range is unimplemented\n\n/**\n * Directive that is used for setting up date time input\n */\n@Directive(\n{\n selector: 'input[dateTime][dateTimeInput]',\n providers:\n [\n <ExistingProvider>\n {\n provide: DATE_TIME_INPUT,\n useExisting: forwardRef(() => DateTimeInputDirective),\n },\n ],\n exportAs: 'dateTime',\n})\nexport class DateTimeInputDirective<TDate = unknown> extends DateTimeBase<TDate> implements DateTimeInput, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Internal representation of current date time value\n */\n protected internalValue: DateTimeObjectValue<TDate>|undefined|null;\n\n //######################### public properties - implementation of DateTimeInput #########################\n\n /**\n * @inheritdoc\n */\n public get rawValue(): string|undefined|null\n {\n return this.element.nativeElement.value;\n }\n public set rawValue(value: string|undefined|null)\n {\n this.element.nativeElement.value = value ?? '';\n }\n\n /**\n * @inheritdoc\n */\n public override get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public override set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n this.ɵValue = value;\n\n //accepts all available formats\n this.internalValue = parseDateTime(value, this.dateApi, null, this.customFormat);\n \n //not range value\n if(!Array.isArray(this.internalValue))\n {\n this.rawValue = this.internalValue?.format(this.customFormat);\n }\n else\n {\n //TODO: add support for ranges\n }\n }\n\n /**\n * @inheritdoc\n */\n public get disabled(): boolean\n {\n return this.element.nativeElement.disabled;\n }\n public set disabled(value: boolean)\n {\n this.element.nativeElement.disabled = value;\n }\n\n /**\n * @inheritdoc\n */\n public focus: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n\n /**\n * @inheritdoc\n */\n public blur: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n\n //######################### constructors #########################\n constructor(protected element: ElementRef<HTMLInputElement>,\n @Inject(DATE_API) dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider,)\n {\n super(dateApi, formatProvider);\n\n this.element.nativeElement.addEventListener('input', this.handleInput);\n this.element.nativeElement.addEventListener('focus', this.handleFocus);\n this.element.nativeElement.addEventListener('blur', this.handleBlur);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.element.nativeElement.removeEventListener('input', this.handleInput);\n this.element.nativeElement.removeEventListener('focus', this.handleFocus);\n this.element.nativeElement.removeEventListener('blur', this.handleBlur);\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles input event on input\n */\n @BindThis\n protected handleInput(): void\n {\n this.internalValue = parseDateTime(this.rawValue, this.dateApi, this.valueFormat, this.customFormat);\n this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);\n\n this.valueChange.next();\n }\n\n /**\n * Handles focus event on input\n * @param event - Event that occured\n */\n @BindThis\n protected handleFocus(event: FocusEvent): void\n {\n this.focus.emit(event);\n }\n\n /**\n * Handles blur event on input\n * @param event - Event that occured\n */\n @BindThis\n protected handleBlur(event: FocusEvent): void\n {\n this.blur.emit(event);\n }\n}"]}
@@ -0,0 +1,72 @@
1
+ import { Directive, forwardRef, Inject } from '@angular/core';
2
+ import { NG_VALIDATORS } from '@angular/forms';
3
+ import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
4
+ import { datetimeMaxValidator, datetimeValidator } from '../../../../misc/validators';
5
+ import { DateTimeRestrictedBase } from '../dateTimeRestrictedBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Applies validator for date time max value
9
+ */
10
+ export class DateTimeMaxValidatorDirective extends DateTimeRestrictedBase {
11
+ //######################### constructor #########################
12
+ constructor(dateApi, formatProvider) {
13
+ super(dateApi, formatProvider);
14
+ //######################### private fields #########################
15
+ /**
16
+ * Function used for validations
17
+ */
18
+ this._validator = () => null;
19
+ this._validator = datetimeValidator(dateApi, null, null);
20
+ }
21
+ //######################### public methods - implementation of OnInit #########################
22
+ /**
23
+ * Initialize component
24
+ */
25
+ ngOnInit() {
26
+ this._validator = datetimeMaxValidator(this.dateApi, this.maxDateTime, this.valueFormat, this.customFormat);
27
+ }
28
+ //######################### public methods - implementation of Validator #########################
29
+ /**
30
+ * Validates input and returns validation result
31
+ * @param control - Control that is being validated
32
+ * @returns validation results
33
+ */
34
+ validate(control) {
35
+ return this._validator(control);
36
+ }
37
+ //######################### protected methods - overrides #########################
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ onMaxDateTimeChange() {
42
+ this._validator = datetimeMaxValidator(this.dateApi, this.maxDateTime, this.valueFormat, this.customFormat);
43
+ }
44
+ }
45
+ DateTimeMaxValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeMaxValidatorDirective, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Directive });
46
+ DateTimeMaxValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeMaxValidatorDirective, selector: "[dateTime][maxDateTime][validate]", providers: [
47
+ {
48
+ provide: NG_VALIDATORS,
49
+ useExisting: forwardRef(() => DateTimeMaxValidatorDirective),
50
+ multi: true
51
+ },
52
+ ], usesInheritance: true, ngImport: i0 });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeMaxValidatorDirective, decorators: [{
54
+ type: Directive,
55
+ args: [{
56
+ selector: '[dateTime][maxDateTime][validate]',
57
+ providers: [
58
+ {
59
+ provide: NG_VALIDATORS,
60
+ useExisting: forwardRef(() => DateTimeMaxValidatorDirective),
61
+ multi: true
62
+ },
63
+ ],
64
+ }]
65
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
66
+ type: Inject,
67
+ args: [DATE_API]
68
+ }] }, { type: undefined, decorators: [{
69
+ type: Inject,
70
+ args: [FORMAT_PROVIDER]
71
+ }] }]; } });
72
+ //# sourceMappingURL=dateTimeMaxValidator.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeMaxValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAGxG,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAE,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAEpF,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;;AAEjE;;GAEG;AAcH,MAAM,OAAO,6BAA+C,SAAQ,sBAA6B;IAS7F,iEAAiE;IACjE,YAA8B,OAAuB,EAChB,cAA8B;QAE/D,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAXnC,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAOzC,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChH,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACgB,mBAAmB;QAElC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChH,CAAC;;0HA/CQ,6BAA6B,kBAUlB,QAAQ,aACR,eAAe;8GAX1B,6BAA6B,4DATtC;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;YAC5D,KAAK,EAAE,IAAI;SACd;KACJ;2FAEQ,6BAA6B;kBAbzC,SAAS;mBACV;oBACI,QAAQ,EAAE,mCAAmC;oBAC7C,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;4BAC5D,KAAK,EAAE,IAAI;yBACd;qBACJ;iBACJ;;0BAWgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {FormatProvider} from '../../../../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {datetimeMaxValidator, datetimeValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeRestrictedBase} from '../dateTimeRestrictedBase';\n\n/**\n * Applies validator for date time max value\n */\n@Directive(\n{\n selector: '[dateTime][maxDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMaxValidatorDirective),\n multi: true\n },\n ],\n})\nexport class DateTimeMaxValidatorDirective<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider,)\n {\n super(dateApi, formatProvider);\n this._validator = datetimeValidator(dateApi, null, null);\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.maxDateTime, this.valueFormat, this.customFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMaxDateTimeChange(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.maxDateTime, this.valueFormat, this.customFormat);\n }\n}"]}
@@ -0,0 +1,71 @@
1
+ import { Directive, forwardRef, Inject } from '@angular/core';
2
+ import { NG_VALIDATORS } from '@angular/forms';
3
+ import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
4
+ import { datetimeMinValidator } from '../../../../misc/validators';
5
+ import { DateTimeRestrictedBase } from '../dateTimeRestrictedBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Applies validator for date time min value
9
+ */
10
+ export class DateTimeMinValidatorDirective extends DateTimeRestrictedBase {
11
+ //######################### constructor #########################
12
+ constructor(dateApi, formatProvider) {
13
+ super(dateApi, formatProvider);
14
+ //######################### private fields #########################
15
+ /**
16
+ * Function used for validations
17
+ */
18
+ this._validator = () => null;
19
+ }
20
+ //######################### public methods - implementation of OnInit #########################
21
+ /**
22
+ * Initialize component
23
+ */
24
+ ngOnInit() {
25
+ this._validator = datetimeMinValidator(this.dateApi, this.minDateTime, this.valueFormat, this.customFormat);
26
+ }
27
+ //######################### public methods - implementation of Validator #########################
28
+ /**
29
+ * Validates input and returns validation result
30
+ * @param control - Control that is being validated
31
+ * @returns validation results
32
+ */
33
+ validate(control) {
34
+ return this._validator(control);
35
+ }
36
+ //######################### protected methods - overrides #########################
37
+ /**
38
+ * @inheritdoc
39
+ */
40
+ onMinDateTimeChange() {
41
+ this._validator = datetimeMinValidator(this.dateApi, this.minDateTime, this.valueFormat, this.customFormat);
42
+ }
43
+ }
44
+ DateTimeMinValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeMinValidatorDirective, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Directive });
45
+ DateTimeMinValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeMinValidatorDirective, selector: "[dateTime][minDateTime][validate]", providers: [
46
+ {
47
+ provide: NG_VALIDATORS,
48
+ useExisting: forwardRef(() => DateTimeMinValidatorDirective),
49
+ multi: true
50
+ },
51
+ ], usesInheritance: true, ngImport: i0 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeMinValidatorDirective, decorators: [{
53
+ type: Directive,
54
+ args: [{
55
+ selector: '[dateTime][minDateTime][validate]',
56
+ providers: [
57
+ {
58
+ provide: NG_VALIDATORS,
59
+ useExisting: forwardRef(() => DateTimeMinValidatorDirective),
60
+ multi: true
61
+ },
62
+ ],
63
+ }]
64
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
65
+ type: Inject,
66
+ args: [DATE_API]
67
+ }] }, { type: undefined, decorators: [{
68
+ type: Inject,
69
+ args: [FORMAT_PROVIDER]
70
+ }] }]; } });
71
+ //# sourceMappingURL=dateTimeMinValidator.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAGxG,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;;AAEjE;;GAEG;AAcH,MAAM,OAAO,6BAA+C,SAAQ,sBAA6B;IAS7F,iEAAiE;IACjE,YAA8B,OAAuB,EAChB,cAA8B;QAE/D,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAXnC,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAO7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChH,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACgB,mBAAmB;QAElC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChH,CAAC;;0HA9CQ,6BAA6B,kBAUlB,QAAQ,aACR,eAAe;8GAX1B,6BAA6B,4DATtC;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;YAC5D,KAAK,EAAE,IAAI;SACd;KACJ;2FAEQ,6BAA6B;kBAbzC,SAAS;mBACV;oBACI,QAAQ,EAAE,mCAAmC;oBAC7C,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;4BAC5D,KAAK,EAAE,IAAI;yBACd;qBACJ;iBACJ;;0BAWgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {FormatProvider} from '../../../../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {datetimeMinValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeRestrictedBase} from '../dateTimeRestrictedBase';\n\n/**\n * Applies validator for date time min value\n */\n@Directive(\n{\n selector: '[dateTime][minDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMinValidatorDirective),\n multi: true\n },\n ],\n})\nexport class DateTimeMinValidatorDirective<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider,)\n {\n super(dateApi, formatProvider);\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.minDateTime, this.valueFormat, this.customFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMinDateTimeChange(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.minDateTime, this.valueFormat, this.customFormat);\n }\n}"]}
@@ -0,0 +1,149 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Directive, Input } from '@angular/core';
3
+ import { BindThis, isBlank } from '@jscrpt/common';
4
+ import { getSingleDateTimeValue } from '../../../misc/utils';
5
+ import { DateTimeBase } from './dateTimeBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Base class for date time directives with value restrictions
9
+ */
10
+ export class DateTimeRestrictedBase extends DateTimeBase {
11
+ //######################### public properties - inputs #########################
12
+ /**
13
+ * Gets or sets max allowed date for date time
14
+ */
15
+ get maxDateTime() {
16
+ return this.ɵMaxDateTime;
17
+ }
18
+ set maxDateTime(value) {
19
+ this._maxDateInstanceChange?.unsubscribe();
20
+ this._maxDateInstanceChange = null;
21
+ if (isBlank(value)) {
22
+ this.maxDateSet(value);
23
+ return;
24
+ }
25
+ let val = value;
26
+ if (value instanceof (DateTimeBase)) {
27
+ this._maxDateInstanceChange = value.valueChange.subscribe(() => {
28
+ const val = getSingleDateTimeValue(value.value);
29
+ if (isBlank(val)) {
30
+ this.maxDateSet(null);
31
+ return;
32
+ }
33
+ this.setMinMaxValue(val, this.maxDateSet);
34
+ });
35
+ const v = getSingleDateTimeValue(value.value);
36
+ if (isBlank(v)) {
37
+ this.maxDateSet(null);
38
+ return;
39
+ }
40
+ val = v;
41
+ }
42
+ this.setMinMaxValue(val, this.maxDateSet);
43
+ }
44
+ /**
45
+ * Gets or sets min allowed date for date time
46
+ */
47
+ get minDateTime() {
48
+ return this.ɵMinDateTime;
49
+ }
50
+ set minDateTime(value) {
51
+ this._minDateInstanceChange?.unsubscribe();
52
+ this._minDateInstanceChange = null;
53
+ if (isBlank(value)) {
54
+ this.minDateSet(value);
55
+ return;
56
+ }
57
+ let val = value;
58
+ if (value instanceof (DateTimeBase)) {
59
+ this._minDateInstanceChange = value.valueChange.subscribe(() => {
60
+ const val = getSingleDateTimeValue(value.value);
61
+ if (isBlank(val)) {
62
+ this.minDateSet(null);
63
+ return;
64
+ }
65
+ this.setMinMaxValue(val, this.minDateSet);
66
+ });
67
+ const v = getSingleDateTimeValue(value.value);
68
+ if (isBlank(v)) {
69
+ this.minDateSet(null);
70
+ return;
71
+ }
72
+ val = v;
73
+ }
74
+ this.setMinMaxValue(val, this.minDateSet);
75
+ }
76
+ //######################### public methods - implementation of OnDestroy #########################
77
+ /**
78
+ * Called when component is destroyed
79
+ */
80
+ ngOnDestroy() {
81
+ this._maxDateInstanceChange?.unsubscribe();
82
+ this._maxDateInstanceChange = null;
83
+ this._minDateInstanceChange?.unsubscribe();
84
+ this._minDateInstanceChange = null;
85
+ }
86
+ //######################### protected methods #########################
87
+ /**
88
+ * Called whenever max date time restriction changes
89
+ */
90
+ onMaxDateTimeChange() {
91
+ }
92
+ /**
93
+ * Called whenever min date time restriction changes
94
+ */
95
+ onMinDateTimeChange() {
96
+ }
97
+ /**
98
+ * Sets min date time and notifies about changes
99
+ * @param value - Value to be set
100
+ */
101
+ minDateSet(value) {
102
+ this.ɵMinDateTime = value;
103
+ this.onMinDateTimeChange();
104
+ }
105
+ /**
106
+ * Sets max date time and notifies about changes
107
+ * @param value - Value to be set
108
+ */
109
+ maxDateSet(value) {
110
+ this.ɵMaxDateTime = value;
111
+ this.onMaxDateTimeChange();
112
+ }
113
+ /**
114
+ * Sets min or max date time value
115
+ * @param value - Value to be set
116
+ * @param setter - Action used for setting value
117
+ */
118
+ setMinMaxValue(value, setter) {
119
+ const val = this.dateApi.getValue(value, this.customFormat);
120
+ if (val.isValid()) {
121
+ setter(val.value);
122
+ }
123
+ else {
124
+ setter(null);
125
+ }
126
+ }
127
+ }
128
+ DateTimeRestrictedBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
129
+ DateTimeRestrictedBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeRestrictedBase, inputs: { maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, usesInheritance: true, ngImport: i0 });
130
+ __decorate([
131
+ BindThis,
132
+ __metadata("design:type", Function),
133
+ __metadata("design:paramtypes", [Object]),
134
+ __metadata("design:returntype", void 0)
135
+ ], DateTimeRestrictedBase.prototype, "minDateSet", null);
136
+ __decorate([
137
+ BindThis,
138
+ __metadata("design:type", Function),
139
+ __metadata("design:paramtypes", [Object]),
140
+ __metadata("design:returntype", void 0)
141
+ ], DateTimeRestrictedBase.prototype, "maxDateSet", null);
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, decorators: [{
143
+ type: Directive
144
+ }], propDecorators: { maxDateTime: [{
145
+ type: Input
146
+ }], minDateTime: [{
147
+ type: Input
148
+ }], minDateSet: [], maxDateSet: [] } });
149
+ //# sourceMappingURL=dateTimeRestrictedBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeRestrictedBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/dateTimeRestrictedBase.ts"],"names":[],"mappings":"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","sourcesContent":["import {Directive, Input, OnDestroy} from '@angular/core';\nimport {Action1, BindThis, isBlank} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputOutputValue} from '../../../misc/types';\nimport {getSingleDateTimeValue} from '../../../misc/utils';\nimport {DateTimeBase} from './dateTimeBase';\n\n/**\n * Base class for date time directives with value restrictions\n */\n@Directive()\nexport class DateTimeRestrictedBase<TDate = unknown> extends DateTimeBase<TDate> implements OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for max date instance value changes\n */\n private _maxDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Subscription for min date instance value changes\n */\n private _minDateInstanceChange: Subscription|undefined|null;\n\n //######################### protected properties #########################\n\n /**\n * Max allowed value of date time\n */\n protected ɵMaxDateTime: TDate|undefined|null;\n\n /**\n * Min allowed value of date time\n */\n protected ɵMinDateTime: TDate|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets max allowed date for date time\n */\n @Input()\n public get maxDateTime(): TDate|undefined|null\n {\n return this.ɵMaxDateTime;\n }\n public set maxDateTime(value: TDate|undefined|null)\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.maxDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._maxDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.maxDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n val = v;\n }\n \n this.setMinMaxValue(val, this.maxDateSet);\n }\n\n /**\n * Gets or sets min allowed date for date time\n */\n @Input()\n public get minDateTime(): TDate|undefined|null\n {\n return this.ɵMinDateTime;\n }\n public set minDateTime(value: TDate|undefined|null)\n {\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.minDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._minDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.minDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.minDateSet(null);\n\n return;\n }\n\n val = v;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n\n /**\n * Sets min date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected minDateSet(value: TDate|undefined|null): void\n {\n this.ɵMinDateTime = value;\n this.onMinDateTimeChange();\n }\n\n /**\n * Sets max date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected maxDateSet(value: TDate|undefined|null): void\n {\n this.ɵMaxDateTime = value;\n this.onMaxDateTimeChange();\n }\n\n /**\n * Sets min or max date time value\n * @param value - Value to be set\n * @param setter - Action used for setting value\n */\n protected setMinMaxValue(value: string|number|TDate|Date, setter: Action1<TDate|undefined|null>): void\n {\n const val = this.dateApi.getValue(value, this.customFormat);\n\n if(val.isValid())\n {\n setter(val.value);\n }\n else\n {\n setter(null);\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `maxDateTime` input\n */\n public static ngAcceptInputType_maxDateTime: string|number|DateTimeBase|Date;\n\n /**\n * Custom input type for `minDateTime` input\n */\n public static ngAcceptInputType_minDateTime: string|number|DateTimeBase|Date;\n}\n"]}
@@ -0,0 +1,64 @@
1
+ import { Directive, forwardRef, Inject } from '@angular/core';
2
+ import { NG_VALIDATORS } from '@angular/forms';
3
+ import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
4
+ import { datetimeValidator } from '../../../../misc/validators';
5
+ import { DateTimeBase } from '../dateTimeBase';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Applies validator for date time
9
+ */
10
+ export class DateTimeValidatorDirective extends DateTimeBase {
11
+ //######################### constructor #########################
12
+ constructor(dateApi, formatProvider) {
13
+ super(dateApi, formatProvider);
14
+ //######################### private fields #########################
15
+ /**
16
+ * Function used for validations
17
+ */
18
+ this._validator = () => null;
19
+ }
20
+ //######################### public methods - implementation of OnInit #########################
21
+ /**
22
+ * Initialize component
23
+ */
24
+ ngOnInit() {
25
+ this._validator = datetimeValidator(this.dateApi, this.valueFormat, this.customFormat);
26
+ }
27
+ //######################### public methods - implementation of Validator #########################
28
+ /**
29
+ * Validates input and returns validation result
30
+ * @param control - Control that is being validated
31
+ * @returns validation results
32
+ */
33
+ validate(control) {
34
+ return this._validator(control);
35
+ }
36
+ }
37
+ DateTimeValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeValidatorDirective, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Directive });
38
+ DateTimeValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeValidatorDirective, selector: "[dateTime][validate]", providers: [
39
+ {
40
+ provide: NG_VALIDATORS,
41
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
42
+ multi: true
43
+ },
44
+ ], usesInheritance: true, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeValidatorDirective, decorators: [{
46
+ type: Directive,
47
+ args: [{
48
+ selector: '[dateTime][validate]',
49
+ providers: [
50
+ {
51
+ provide: NG_VALIDATORS,
52
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
53
+ multi: true
54
+ },
55
+ ],
56
+ }]
57
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
58
+ type: Inject,
59
+ args: [DATE_API]
60
+ }] }, { type: undefined, decorators: [{
61
+ type: Inject,
62
+ args: [FORMAT_PROVIDER]
63
+ }] }]; } });
64
+ //# sourceMappingURL=dateTimeValidator.directive.js.map