@anglr/datetime 6.1.0 → 7.0.0-beta.20230817095054

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 (425) hide show
  1. package/changelog.md +40 -9
  2. package/date-fns/package.json +3 -4
  3. package/{es2020 → es2022}/date-fns/src/services/dateFnsDateApi.service.js +31 -17
  4. package/es2022/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  5. package/{es2020 → es2022}/moment/src/services/momentDateApi.service.js +20 -8
  6. package/es2022/moment/src/services/momentDateApi.service.js.map +1 -0
  7. package/{es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js → es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js} +56 -73
  8. package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js.map +1 -0
  9. package/{es2015 → es2022}/src/directives/datePickerInput/datePickerInput.directive.js +5 -4
  10. package/es2022/src/directives/datePickerInput/datePickerInput.directive.js.map +1 -0
  11. package/{es2020 → es2022}/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +29 -18
  12. package/{es2015 → es2022}/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +1 -1
  13. package/{es2020 → es2022}/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +5 -4
  14. package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +1 -0
  15. package/{es2020 → es2022}/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +5 -4
  16. package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -0
  17. package/{es2020 → es2022}/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +9 -4
  18. package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -0
  19. package/{es2020 → es2022}/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +5 -4
  20. package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -0
  21. package/{es2020 → es2022}/src/directives/withNow/withNow.directive.js +10 -9
  22. package/es2022/src/directives/withNow/withNow.directive.js.map +1 -0
  23. package/{es2015 → es2022}/src/directives/withTime/withTime.directive.js +5 -4
  24. package/es2022/src/directives/withTime/withTime.directive.js.map +1 -0
  25. package/{es2020 → es2022}/src/directives/withToday/withToday.directive.js +10 -9
  26. package/es2022/src/directives/withToday/withToday.directive.js.map +1 -0
  27. package/{es2020 → es2022}/src/misc/validators.js +2 -2
  28. package/es2022/src/misc/validators.js.map +1 -0
  29. package/{es2020 → es2022}/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +65 -39
  30. package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -0
  31. package/{es2020 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +6 -4
  32. package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -0
  33. package/{es2015 → es2022}/src/modules/calendar/modules/monthCalendar.module.js +8 -7
  34. package/es2022/src/modules/calendar/modules/monthCalendar.module.js.map +1 -0
  35. package/{es2020 → es2022}/src/modules/calendar/services/eventParser/eventParser.service.js +6 -4
  36. package/es2022/src/modules/calendar/services/eventParser/eventParser.service.js.map +1 -0
  37. package/es2022/src/modules/datePipes.module.js +29 -0
  38. package/es2022/src/modules/datePipes.module.js.map +1 -0
  39. package/{es2020 → es2022}/src/modules/dateTime/directives/dateTime/dateTime.directive.js +69 -41
  40. package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -0
  41. package/{es2015 → es2022}/src/modules/dateTime/directives/dateTimeBase.js +27 -22
  42. package/es2022/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
  43. package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +17 -15
  44. package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
  45. package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +36 -27
  46. package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
  47. package/{es2015 → es2022}/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +17 -15
  48. package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
  49. package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +17 -15
  50. package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
  51. package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +17 -15
  52. package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
  53. package/{es2015 → es2022}/src/modules/dateTime/modules/dateTime.module.js +16 -15
  54. package/es2022/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
  55. package/{es2020 → es2022}/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +58 -39
  56. package/es2022/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -0
  57. package/{es2020 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +61 -24
  58. package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -0
  59. package/{es2020 → es2022}/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +15 -14
  60. package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -0
  61. package/{es2020 → es2022}/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +6 -4
  62. package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -0
  63. package/{es2020 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +24 -27
  64. package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
  65. package/{es2020 → es2022}/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +10 -12
  66. package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -0
  67. package/{es2020 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +52 -21
  68. package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -0
  69. package/{es2020 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +1 -1
  70. package/{es2020 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +57 -41
  71. package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  72. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +37 -0
  73. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  74. package/{es2015 → es2022}/src/modules/dateTimePicker/modules/dateTimePicker.module.js +7 -6
  75. package/es2022/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -0
  76. package/{es2015 → es2022}/src/pipes/dateConvert.pipe.js +6 -4
  77. package/es2022/src/pipes/dateConvert.pipe.js.map +1 -0
  78. package/{es2015 → es2022}/src/pipes/dateFormat.pipe.js +7 -4
  79. package/es2022/src/pipes/dateFormat.pipe.js.map +1 -0
  80. package/{es2020 → es2022}/src/services/datePositionParser/datePositionParser.service.js +19 -17
  81. package/es2022/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
  82. package/{es2020 → es2022}/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +11 -4
  83. package/es2022/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
  84. package/{es2020 → es2022}/src/services/dateValueProvider/dateValueProvider.service.js +6 -4
  85. package/es2022/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
  86. package/moment/package.json +3 -4
  87. package/package.json +50 -58
  88. package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts +67 -0
  89. package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts.map +1 -0
  90. package/src/misc/types.d.ts +2 -2
  91. package/src/misc/types.d.ts.map +1 -1
  92. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts +1 -1
  93. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts +1 -1
  94. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +1 -1
  95. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts +1 -1
  96. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -1
  97. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts +6 -0
  98. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts.map +1 -1
  99. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts +1 -1
  100. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
  101. package/src/services/dateApi/dateApi.interface.d.ts +2 -2
  102. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -1
  103. package/version.bak +1 -1
  104. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -590
  105. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +0 -1
  106. package/es2015/moment/src/services/momentDateApi.service.js +0 -547
  107. package/es2015/moment/src/services/momentDateApi.service.js.map +0 -1
  108. package/es2015/src/directives/datePickerInput/datePickerInput.directive.js.map +0 -1
  109. package/es2015/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +0 -325
  110. package/es2015/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +0 -29
  111. package/es2015/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +0 -1
  112. package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +0 -37
  113. package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +0 -1
  114. package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +0 -137
  115. package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +0 -1
  116. package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +0 -29
  117. package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +0 -1
  118. package/es2015/src/directives/withNow/withNow.directive.js +0 -44
  119. package/es2015/src/directives/withNow/withNow.directive.js.map +0 -1
  120. package/es2015/src/directives/withTime/withTime.directive.js.map +0 -1
  121. package/es2015/src/directives/withToday/withToday.directive.js +0 -44
  122. package/es2015/src/directives/withToday/withToday.directive.js.map +0 -1
  123. package/es2015/src/misc/utils.js +0 -164
  124. package/es2015/src/misc/utils.js.map +0 -1
  125. package/es2015/src/misc/validators.js +0 -142
  126. package/es2015/src/misc/validators.js.map +0 -1
  127. package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +0 -198
  128. package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +0 -1
  129. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +0 -27
  130. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +0 -1
  131. package/es2015/src/modules/calendar/modules/monthCalendar.module.js.map +0 -1
  132. package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js +0 -75
  133. package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js.map +0 -1
  134. package/es2015/src/modules/datePipes.module.js +0 -28
  135. package/es2015/src/modules/datePipes.module.js.map +0 -1
  136. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js +0 -254
  137. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +0 -1
  138. package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +0 -1
  139. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +0 -77
  140. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +0 -1
  141. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +0 -1
  142. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +0 -1
  143. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +0 -70
  144. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +0 -1
  145. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +0 -63
  146. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +0 -1
  147. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +0 -1
  148. package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +0 -186
  149. package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +0 -1
  150. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +0 -299
  151. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +0 -1
  152. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +0 -151
  153. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +0 -1
  154. package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +0 -123
  155. package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +0 -1
  156. package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +0 -137
  157. package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  158. package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +0 -126
  159. package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +0 -1
  160. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +0 -261
  161. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +0 -1
  162. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +0 -1
  163. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +0 -222
  164. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  165. package/es2015/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +0 -30
  166. package/es2015/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  167. package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +0 -1
  168. package/es2015/src/pipes/dateConvert.pipe.js.map +0 -1
  169. package/es2015/src/pipes/dateFormat.pipe.js.map +0 -1
  170. package/es2015/src/services/datePositionParser/datePositionParser.service.js +0 -243
  171. package/es2015/src/services/datePositionParser/datePositionParser.service.js.map +0 -1
  172. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +0 -81
  173. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +0 -1
  174. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js +0 -69
  175. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js.map +0 -1
  176. package/es2020/date-fns/src/index.js +0 -4
  177. package/es2020/date-fns/src/index.js.map +0 -1
  178. package/es2020/date-fns/src/misc/tokens.js +0 -31
  179. package/es2020/date-fns/src/misc/tokens.js.map +0 -1
  180. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +0 -1
  181. package/es2020/date-fns/src/services/dateFnsLocale.service.js +0 -2
  182. package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +0 -1
  183. package/es2020/moment/src/index.js +0 -3
  184. package/es2020/moment/src/index.js.map +0 -1
  185. package/es2020/moment/src/misc/tokens.js +0 -26
  186. package/es2020/moment/src/misc/tokens.js.map +0 -1
  187. package/es2020/moment/src/services/momentDateApi.service.js.map +0 -1
  188. package/es2020/src/directives/datePickerInput/datePickerInput.directive.js +0 -37
  189. package/es2020/src/directives/datePickerInput/datePickerInput.directive.js.map +0 -1
  190. package/es2020/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +0 -1
  191. package/es2020/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +0 -1
  192. package/es2020/src/directives/index.js +0 -10
  193. package/es2020/src/directives/index.js.map +0 -1
  194. package/es2020/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +0 -1
  195. package/es2020/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +0 -1
  196. package/es2020/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +0 -1
  197. package/es2020/src/directives/withNow/withNow.directive.js.map +0 -1
  198. package/es2020/src/directives/withTime/withTime.directive.js +0 -32
  199. package/es2020/src/directives/withTime/withTime.directive.js.map +0 -1
  200. package/es2020/src/directives/withToday/withToday.directive.js.map +0 -1
  201. package/es2020/src/index.js +0 -13
  202. package/es2020/src/index.js.map +0 -1
  203. package/es2020/src/interfaces/dateTime/datetime.interface.js +0 -2
  204. package/es2020/src/interfaces/dateTime/datetime.interface.js.map +0 -1
  205. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +0 -2
  206. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +0 -1
  207. package/es2020/src/interfaces/formatProvider/formatProvider.interface.js +0 -2
  208. package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +0 -1
  209. package/es2020/src/interfaces/index.js +0 -4
  210. package/es2020/src/interfaces/index.js.map +0 -1
  211. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js +0 -94
  212. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +0 -1
  213. package/es2020/src/misc/constants.js +0 -33
  214. package/es2020/src/misc/constants.js.map +0 -1
  215. package/es2020/src/misc/enums.js +0 -23
  216. package/es2020/src/misc/enums.js.map +0 -1
  217. package/es2020/src/misc/tokens.js +0 -38
  218. package/es2020/src/misc/tokens.js.map +0 -1
  219. package/es2020/src/misc/types.js +0 -2
  220. package/es2020/src/misc/types.js.map +0 -1
  221. package/es2020/src/misc/validators.js.map +0 -1
  222. package/es2020/src/modules/calendar/components/index.js +0 -2
  223. package/es2020/src/modules/calendar/components/index.js.map +0 -1
  224. package/es2020/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +0 -1
  225. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +0 -2
  226. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +0 -1
  227. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +0 -1
  228. package/es2020/src/modules/calendar/directives/index.js +0 -3
  229. package/es2020/src/modules/calendar/directives/index.js.map +0 -1
  230. package/es2020/src/modules/calendar/index.js +0 -7
  231. package/es2020/src/modules/calendar/index.js.map +0 -1
  232. package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js +0 -2
  233. package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js.map +0 -1
  234. package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +0 -2
  235. package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +0 -1
  236. package/es2020/src/modules/calendar/interfaces/eventData.interface.js +0 -2
  237. package/es2020/src/modules/calendar/interfaces/eventData.interface.js.map +0 -1
  238. package/es2020/src/modules/calendar/interfaces/index.js +0 -4
  239. package/es2020/src/modules/calendar/interfaces/index.js.map +0 -1
  240. package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +0 -27
  241. package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +0 -1
  242. package/es2020/src/modules/calendar/misc/enums/index.js +0 -3
  243. package/es2020/src/modules/calendar/misc/enums/index.js.map +0 -1
  244. package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +0 -19
  245. package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +0 -1
  246. package/es2020/src/modules/calendar/misc/index.js +0 -2
  247. package/es2020/src/modules/calendar/misc/index.js.map +0 -1
  248. package/es2020/src/modules/calendar/modules/index.js +0 -2
  249. package/es2020/src/modules/calendar/modules/index.js.map +0 -1
  250. package/es2020/src/modules/calendar/modules/monthCalendar.module.js +0 -32
  251. package/es2020/src/modules/calendar/modules/monthCalendar.module.js.map +0 -1
  252. package/es2020/src/modules/calendar/services/eventParser/eventParser.service.js.map +0 -1
  253. package/es2020/src/modules/calendar/services/index.js +0 -2
  254. package/es2020/src/modules/calendar/services/index.js.map +0 -1
  255. package/es2020/src/modules/datePipes.module.js +0 -28
  256. package/es2020/src/modules/datePipes.module.js.map +0 -1
  257. package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +0 -1
  258. package/es2020/src/modules/dateTime/directives/dateTimeBase.js +0 -61
  259. package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +0 -1
  260. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +0 -1
  261. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +0 -1
  262. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +0 -70
  263. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +0 -1
  264. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +0 -1
  265. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +0 -1
  266. package/es2020/src/modules/dateTime/directives/index.js +0 -8
  267. package/es2020/src/modules/dateTime/directives/index.js.map +0 -1
  268. package/es2020/src/modules/dateTime/index.js +0 -3
  269. package/es2020/src/modules/dateTime/index.js.map +0 -1
  270. package/es2020/src/modules/dateTime/modules/dateTime.module.js +0 -43
  271. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +0 -1
  272. package/es2020/src/modules/dateTime/modules/index.js +0 -2
  273. package/es2020/src/modules/dateTime/modules/index.js.map +0 -1
  274. package/es2020/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +0 -1
  275. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +0 -1
  276. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +0 -2
  277. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +0 -1
  278. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +0 -1
  279. package/es2020/src/modules/dateTimePicker/components/index.js +0 -9
  280. package/es2020/src/modules/dateTimePicker/components/index.js.map +0 -1
  281. package/es2020/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +0 -1
  282. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  283. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js +0 -347
  284. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  285. package/es2020/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +0 -1
  286. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +0 -1
  287. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +0 -2
  288. package/es2020/src/modules/dateTimePicker/directives/index.js +0 -6
  289. package/es2020/src/modules/dateTimePicker/directives/index.js.map +0 -1
  290. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  291. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +0 -2
  292. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  293. package/es2020/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +0 -30
  294. package/es2020/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  295. package/es2020/src/modules/dateTimePicker/index.js +0 -6
  296. package/es2020/src/modules/dateTimePicker/index.js.map +0 -1
  297. package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +0 -2
  298. package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +0 -1
  299. package/es2020/src/modules/dateTimePicker/interfaces/index.js +0 -3
  300. package/es2020/src/modules/dateTimePicker/interfaces/index.js.map +0 -1
  301. package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +0 -2
  302. package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +0 -1
  303. package/es2020/src/modules/dateTimePicker/misc/tokens.js +0 -10
  304. package/es2020/src/modules/dateTimePicker/misc/tokens.js.map +0 -1
  305. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js +0 -29
  306. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +0 -1
  307. package/es2020/src/modules/dateTimePicker/modules/index.js +0 -2
  308. package/es2020/src/modules/dateTimePicker/modules/index.js.map +0 -1
  309. package/es2020/src/modules/index.js +0 -5
  310. package/es2020/src/modules/index.js.map +0 -1
  311. package/es2020/src/pipes/dateConvert.pipe.js +0 -35
  312. package/es2020/src/pipes/dateConvert.pipe.js.map +0 -1
  313. package/es2020/src/pipes/dateFormat.pipe.js +0 -39
  314. package/es2020/src/pipes/dateFormat.pipe.js.map +0 -1
  315. package/es2020/src/services/dateApi/dateApi.interface.js +0 -2
  316. package/es2020/src/services/dateApi/dateApi.interface.js.map +0 -1
  317. package/es2020/src/services/datePositionParser/datePositionParser.interface.js +0 -2
  318. package/es2020/src/services/datePositionParser/datePositionParser.interface.js.map +0 -1
  319. package/es2020/src/services/datePositionParser/datePositionParser.service.js.map +0 -1
  320. package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +0 -1
  321. package/es2020/src/services/dateValueProvider/dateValueProvider.service.js.map +0 -1
  322. package/es2020/src/services/index.js +0 -6
  323. package/es2020/src/services/index.js.map +0 -1
  324. package/src/dark.scss +0 -38
  325. package/src/default.scss +0 -33
  326. package/src/theme.scss +0 -80
  327. /package/{es2015 → es2022}/date-fns/src/index.js +0 -0
  328. /package/{es2015 → es2022}/date-fns/src/index.js.map +0 -0
  329. /package/{es2015 → es2022}/date-fns/src/misc/tokens.js +0 -0
  330. /package/{es2015 → es2022}/date-fns/src/misc/tokens.js.map +0 -0
  331. /package/{es2015 → es2022}/date-fns/src/services/dateFnsLocale.service.js +0 -0
  332. /package/{es2015 → es2022}/date-fns/src/services/dateFnsLocale.service.js.map +0 -0
  333. /package/{es2015 → es2022}/moment/src/index.js +0 -0
  334. /package/{es2015 → es2022}/moment/src/index.js.map +0 -0
  335. /package/{es2015 → es2022}/moment/src/misc/tokens.js +0 -0
  336. /package/{es2015 → es2022}/moment/src/misc/tokens.js.map +0 -0
  337. /package/{es2015 → es2022}/src/directives/index.js +0 -0
  338. /package/{es2015 → es2022}/src/directives/index.js.map +0 -0
  339. /package/{es2015 → es2022}/src/index.js +0 -0
  340. /package/{es2015 → es2022}/src/index.js.map +0 -0
  341. /package/{es2015 → es2022}/src/interfaces/dateTime/datetime.interface.js +0 -0
  342. /package/{es2015 → es2022}/src/interfaces/dateTime/datetime.interface.js.map +0 -0
  343. /package/{es2015 → es2022}/src/interfaces/dateTimeInput/dateTimeInput.interface.js +0 -0
  344. /package/{es2015 → es2022}/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +0 -0
  345. /package/{es2015 → es2022}/src/interfaces/formatProvider/formatProvider.interface.js +0 -0
  346. /package/{es2015 → es2022}/src/interfaces/formatProvider/formatProvider.interface.js.map +0 -0
  347. /package/{es2015 → es2022}/src/interfaces/index.js +0 -0
  348. /package/{es2015 → es2022}/src/interfaces/index.js.map +0 -0
  349. /package/{es2015 → es2022}/src/legacy/picker/components/picker/picker.component.animations.js +0 -0
  350. /package/{es2015 → es2022}/src/legacy/picker/components/picker/picker.component.animations.js.map +0 -0
  351. /package/{es2015 → es2022}/src/misc/constants.js +0 -0
  352. /package/{es2015 → es2022}/src/misc/constants.js.map +0 -0
  353. /package/{es2015 → es2022}/src/misc/enums.js +0 -0
  354. /package/{es2015 → es2022}/src/misc/enums.js.map +0 -0
  355. /package/{es2015 → es2022}/src/misc/tokens.js +0 -0
  356. /package/{es2015 → es2022}/src/misc/tokens.js.map +0 -0
  357. /package/{es2015 → es2022}/src/misc/types.js +0 -0
  358. /package/{es2015 → es2022}/src/misc/types.js.map +0 -0
  359. /package/{es2020 → es2022}/src/misc/utils.js +0 -0
  360. /package/{es2020 → es2022}/src/misc/utils.js.map +0 -0
  361. /package/{es2015 → es2022}/src/modules/calendar/components/index.js +0 -0
  362. /package/{es2015 → es2022}/src/modules/calendar/components/index.js.map +0 -0
  363. /package/{es2015 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +0 -0
  364. /package/{es2015 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +0 -0
  365. /package/{es2015 → es2022}/src/modules/calendar/directives/index.js +0 -0
  366. /package/{es2015 → es2022}/src/modules/calendar/directives/index.js.map +0 -0
  367. /package/{es2015 → es2022}/src/modules/calendar/index.js +0 -0
  368. /package/{es2015 → es2022}/src/modules/calendar/index.js.map +0 -0
  369. /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarDayData.interface.js +0 -0
  370. /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarDayData.interface.js.map +0 -0
  371. /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +0 -0
  372. /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +0 -0
  373. /package/{es2015 → es2022}/src/modules/calendar/interfaces/eventData.interface.js +0 -0
  374. /package/{es2015 → es2022}/src/modules/calendar/interfaces/eventData.interface.js.map +0 -0
  375. /package/{es2015 → es2022}/src/modules/calendar/interfaces/index.js +0 -0
  376. /package/{es2015 → es2022}/src/modules/calendar/interfaces/index.js.map +0 -0
  377. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +0 -0
  378. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +0 -0
  379. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/index.js +0 -0
  380. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/index.js.map +0 -0
  381. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +0 -0
  382. /package/{es2015 → es2022}/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +0 -0
  383. /package/{es2015 → es2022}/src/modules/calendar/misc/index.js +0 -0
  384. /package/{es2015 → es2022}/src/modules/calendar/misc/index.js.map +0 -0
  385. /package/{es2015 → es2022}/src/modules/calendar/modules/index.js +0 -0
  386. /package/{es2015 → es2022}/src/modules/calendar/modules/index.js.map +0 -0
  387. /package/{es2015 → es2022}/src/modules/calendar/services/index.js +0 -0
  388. /package/{es2015 → es2022}/src/modules/calendar/services/index.js.map +0 -0
  389. /package/{es2015 → es2022}/src/modules/dateTime/directives/index.js +0 -0
  390. /package/{es2015 → es2022}/src/modules/dateTime/directives/index.js.map +0 -0
  391. /package/{es2015 → es2022}/src/modules/dateTime/index.js +0 -0
  392. /package/{es2015 → es2022}/src/modules/dateTime/index.js.map +0 -0
  393. /package/{es2015 → es2022}/src/modules/dateTime/modules/index.js +0 -0
  394. /package/{es2015 → es2022}/src/modules/dateTime/modules/index.js.map +0 -0
  395. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +0 -0
  396. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +0 -0
  397. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/index.js +0 -0
  398. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/index.js.map +0 -0
  399. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
  400. /package/{es2015 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -0
  401. /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +0 -0
  402. /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/index.js +0 -0
  403. /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/index.js.map +0 -0
  404. /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +0 -0
  405. /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +0 -0
  406. /package/{es2015 → es2022}/src/modules/dateTimePicker/index.js +0 -0
  407. /package/{es2015 → es2022}/src/modules/dateTimePicker/index.js.map +0 -0
  408. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +0 -0
  409. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +0 -0
  410. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/index.js +0 -0
  411. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/index.js.map +0 -0
  412. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +0 -0
  413. /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +0 -0
  414. /package/{es2015 → es2022}/src/modules/dateTimePicker/misc/tokens.js +0 -0
  415. /package/{es2015 → es2022}/src/modules/dateTimePicker/misc/tokens.js.map +0 -0
  416. /package/{es2015 → es2022}/src/modules/dateTimePicker/modules/index.js +0 -0
  417. /package/{es2015 → es2022}/src/modules/dateTimePicker/modules/index.js.map +0 -0
  418. /package/{es2015 → es2022}/src/modules/index.js +0 -0
  419. /package/{es2015 → es2022}/src/modules/index.js.map +0 -0
  420. /package/{es2015 → es2022}/src/services/dateApi/dateApi.interface.js +0 -0
  421. /package/{es2015 → es2022}/src/services/dateApi/dateApi.interface.js.map +0 -0
  422. /package/{es2015 → es2022}/src/services/datePositionParser/datePositionParser.interface.js +0 -0
  423. /package/{es2015 → es2022}/src/services/datePositionParser/datePositionParser.interface.js.map +0 -0
  424. /package/{es2015 → es2022}/src/services/index.js +0 -0
  425. /package/{es2015 → es2022}/src/services/index.js.map +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonDateTimeInput.directive.js","sourceRoot":"","sources":["../../../../src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,YAAY,EAAoB,UAAU,EAAE,MAAM,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAC1H,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,gDAAgD,CAAC;AAG5E,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAU,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;;;AAE1D;;GAEG;AACH,MAca,8BAAgD,SAAQ,YAAmB;IAyE9D;IACkB;IAClB;IAzEtB,0EAA0E;IAE1E;;OAEG;IACO,aAAa,CAA4C;IAEnE,yGAAyG;IAEzG;;OAEG;IACI,QAAQ,CAAwB;IAEvC;;OAEG;IACH,IACoB,KAAK;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IACD,IAA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J;oBACD,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,UAAU;iBACvB;;0BA2EgB,MAAM;2BAAC,QAAQ;4EAtDR,KAAK;sBADxB,KAAK;gBAuII,WAAW,MAUX,UAAU","sourcesContent":["import {Directive, ElementRef, EventEmitter, ExistingProvider, forwardRef, Inject, Input, OnDestroy} from '@angular/core';\nimport {BindThis, isBlank} from '@jscrpt/common';\n\nimport {DATE_API, DATE_TIME_INPUT} from '../../misc/tokens';\nimport {DateTimeBase} from '../../modules/dateTime/directives/dateTimeBase';\nimport {DateTimeInput} from '../../interfaces';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from '../../misc/types';\nimport {formatDateTime, parseDateTime} from '../../misc/utils';\nimport {DateApi, DateValueProvider} from '../../services';\n\n/**\n * Directive that is used for setting up date time input for button\n */\n@Directive(\n{\n selector: 'button[dateTime][dateTimeInput],a[dateTime][dateTimeInput]',\n providers:\n [\n <ExistingProvider>\n {\n provide: DATE_TIME_INPUT,\n useExisting: forwardRef(() => ButtonDateTimeInputSADirective),\n },\n ],\n standalone: true,\n exportAs: 'dateTime',\n})\nexport class ButtonDateTimeInputSADirective<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 rawValue: string|undefined|null;\n\n /**\n * @inheritdoc\n */\n @Input()\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 //accepts all available formats\n this.setInternalValue(value);\n this.ɵValue = formatDateTime(this.internalValue, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);\n \n //not range value\n if(!Array.isArray(this.internalValue))\n {\n this.rawValue = this.internalValue?.format(this.dateTimeData.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 //TODO: check if anchor\n return this.elementRef.nativeElement.disabled;\n }\n public set disabled(value: boolean)\n {\n this.elementRef.nativeElement.disabled = value;\n }\n\n /**\n * @inheritdoc\n */\n public get element(): HTMLElement\n {\n return this.elementRef.nativeElement;\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 elementRef: ElementRef<HTMLButtonElement>,\n @Inject(DATE_API) protected dateApi: DateApi<TDate>,\n protected valueProvider: DateValueProvider<TDate>,)\n {\n super();\n\n this.elementRef.nativeElement.addEventListener('click', this.handleClick);\n this.elementRef.nativeElement.addEventListener('blur', this.handleBlur);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public override ngOnDestroy(): void\n {\n super.ngOnDestroy();\n\n this.elementRef.nativeElement.removeEventListener('click', this.handleClick);\n this.elementRef.nativeElement.removeEventListener('blur', this.handleBlur);\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets internal value and fix lowest time difference\n * @param value - Value to be set\n */\n protected setInternalValue(value: DateTimeInputOutputValue<TDate>|undefined|null): void\n {\n this.internalValue = parseDateTime(value, this.dateApi, null, this.dateTimeData.customFormat);\n\n if(isBlank(this.internalValue))\n {\n return;\n }\n\n //update for specified format, round\n\n //ranged value\n if(Array.isArray(this.internalValue))\n {\n const [from, to] = this.internalValue;\n\n if(from)\n {\n const val = this.valueProvider.getValue(from.value, this.dateTimeData.customFormat).from;\n\n if(val)\n {\n this.internalValue[0] = this.dateApi.getValue(val, this.dateTimeData.customFormat);\n }\n }\n\n if(to)\n {\n const val = this.valueProvider.getValue(to.value, this.dateTimeData.customFormat).to;\n\n if(val)\n {\n this.internalValue[1] = this.dateApi.getValue(val, this.dateTimeData.customFormat);\n }\n }\n }\n else\n {\n const val = this.valueProvider.getValue(this.internalValue.value, this.dateTimeData.customFormat).from;\n\n if(val)\n {\n this.internalValue = this.dateApi.getValue(val, this.dateTimeData.customFormat);\n }\n }\n }\n\n /**\n * Handles focus event on input\n * @param event - Event that occured\n */\n @BindThis\n protected handleClick(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}"]}
@@ -8,11 +8,12 @@ import * as i3 from "../dateTimeInputHandler/dateTimeInputHandler.directive";
8
8
  /**
9
9
  * Directive that combines date picker with date input
10
10
  */
11
- export class DatePickerInputSADirective {
11
+ class DatePickerInputSADirective {
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DatePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: DatePickerInputSADirective, isStandalone: true, selector: "input[dateTime][datePickerInput]", hostDirectives: [{ directive: i1.DateTimePickerSADirective, inputs: ["withPickerOptions", "withPickerOptions", "pickerOptions", "pickerOptions"] }, { directive: i2.DateTimeInputSADirective }, { directive: i3.DateTimeInputHandlerSADirective }], ngImport: i0 });
12
14
  }
13
- DatePickerInputSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DatePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
14
- DatePickerInputSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DatePickerInputSADirective, isStandalone: true, selector: "input[dateTime][datePickerInput]", hostDirectives: [{ directive: i1.DateTimePickerSADirective, inputs: ["withPickerOptions", "withPickerOptions", "pickerOptions", "pickerOptions"] }, { directive: i2.DateTimeInputSADirective }, { directive: i3.DateTimeInputHandlerSADirective }], ngImport: i0 });
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DatePickerInputSADirective, decorators: [{
15
+ export { DatePickerInputSADirective };
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DatePickerInputSADirective, decorators: [{
16
17
  type: Directive,
17
18
  args: [{
18
19
  selector: 'input[dateTime][datePickerInput]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePickerInput.directive.js","sourceRoot":"","sources":["../../../../src/directives/datePickerInput/datePickerInput.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,wBAAwB,EAAE,yBAAyB,EAAC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,+BAA+B,EAAC,MAAM,wDAAwD,CAAC;;;;;AAEvG;;GAEG;AACH,MAsBa,0BAA0B;uGAA1B,0BAA0B;2FAA1B,0BAA0B;;SAA1B,0BAA0B;2FAA1B,0BAA0B;kBAtBtC,SAAS;mBACV;oBACI,QAAQ,EAAE,kCAAkC;oBAC5C,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI;4BACI,SAAS,EAAE,yBAAyB;4BACpC,MAAM,EACN;gCACI,mBAAmB;gCACnB,eAAe;6BAClB;yBACJ;wBACD;4BACI,SAAS,EAAE,wBAAwB;yBACtC;wBACD;4BACI,SAAS,EAAE,+BAA+B;yBAC7C;qBACJ;iBACJ","sourcesContent":["import {Directive} from '@angular/core';\n\nimport {DateTimeInputSADirective, DateTimePickerSADirective} from '../../modules';\nimport {DateTimeInputHandlerSADirective} from '../dateTimeInputHandler/dateTimeInputHandler.directive';\n\n/**\n * Directive that combines date picker with date input\n */\n@Directive(\n{\n selector: 'input[dateTime][datePickerInput]',\n standalone: true,\n hostDirectives:\n [\n {\n directive: DateTimePickerSADirective,\n inputs:\n [\n 'withPickerOptions',\n 'pickerOptions',\n ]\n },\n {\n directive: DateTimeInputSADirective,\n },\n {\n directive: DateTimeInputHandlerSADirective,\n },\n ],\n})\nexport class DatePickerInputSADirective\n{\n}"]}
@@ -12,7 +12,31 @@ import * as i2 from "../../services";
12
12
  /**
13
13
  * Directive that adds handler for date time input, which allows navigation using keyboard and checking restriction of value
14
14
  */
15
- export class DateTimeInputHandlerSADirective {
15
+ class DateTimeInputHandlerSADirective {
16
+ input;
17
+ dateApi;
18
+ dateTimeData;
19
+ parserSvc;
20
+ valueProvider;
21
+ picker;
22
+ //######################### protected properties #########################
23
+ /**
24
+ * Subscriptions created during initialization
25
+ */
26
+ initSubscriptions = new Subscription();
27
+ /**
28
+ * Instance of parser created for specific format
29
+ */
30
+ parser;
31
+ /**
32
+ * Gets input element as html input
33
+ */
34
+ get inputElement() {
35
+ if (this.input.element.nodeName == 'INPUT') {
36
+ return this.input.element;
37
+ }
38
+ throw new Error('You cant use DateTimeInputHandlerSADirective without input element!');
39
+ }
16
40
  //######################### constructor #########################
17
41
  constructor(input, dateApi, dateTimeData, parserSvc, valueProvider, picker) {
18
42
  this.input = input;
@@ -21,23 +45,9 @@ export class DateTimeInputHandlerSADirective {
21
45
  this.parserSvc = parserSvc;
22
46
  this.valueProvider = valueProvider;
23
47
  this.picker = picker;
24
- //######################### protected properties #########################
25
- /**
26
- * Subscriptions created during initialization
27
- */
28
- this.initSubscriptions = new Subscription();
29
48
  this.parser = parserSvc.createParser(this.dateTimeData.customFormat);
30
49
  this.initSubscriptions.add(this.dateTimeData.customFormatChanges.subscribe(() => this.parser = parserSvc.createParser(this.dateTimeData.customFormat)));
31
50
  }
32
- /**
33
- * Gets input element as html input
34
- */
35
- get inputElement() {
36
- if (this.input.element.nodeName == 'INPUT') {
37
- return this.input.element;
38
- }
39
- throw new Error('You cant use DateTimeInputHandlerSADirective without input element!');
40
- }
41
51
  //######################### public methods - implementation of OnInit #########################
42
52
  /**
43
53
  * Initialize component
@@ -277,9 +287,9 @@ export class DateTimeInputHandlerSADirective {
277
287
  }
278
288
  }
279
289
  }
290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeInputHandlerSADirective, deps: [{ token: DATE_TIME_INPUT }, { token: DATE_API }, { token: i1.DateTimeSADirective }, { token: i2.DatePositionParserService }, { token: i2.DateValueProvider }, { token: i1.DateTimePickerSADirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
291
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: DateTimeInputHandlerSADirective, isStandalone: true, selector: "[dateTime][withHandler]", ngImport: i0 });
280
292
  }
281
- DateTimeInputHandlerSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeInputHandlerSADirective, deps: [{ token: DATE_TIME_INPUT }, { token: DATE_API }, { token: i1.DateTimeSADirective }, { token: i2.DatePositionParserService }, { token: i2.DateValueProvider }, { token: i1.DateTimePickerSADirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
282
- DateTimeInputHandlerSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimeInputHandlerSADirective, isStandalone: true, selector: "[dateTime][withHandler]", ngImport: i0 });
283
293
  __decorate([
284
294
  BindThis,
285
295
  __metadata("design:type", Function),
@@ -304,7 +314,8 @@ __decorate([
304
314
  __metadata("design:paramtypes", [KeyboardEvent]),
305
315
  __metadata("design:returntype", void 0)
306
316
  ], DateTimeInputHandlerSADirective.prototype, "handleKeyboard", null);
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeInputHandlerSADirective, decorators: [{
317
+ export { DateTimeInputHandlerSADirective };
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeInputHandlerSADirective, decorators: [{
308
319
  type: Directive,
309
320
  args: [{
310
321
  selector: '[dateTime][withHandler]',
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeInputHandler.directive.js","sourceRoot":"","sources":["../../../../src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAqB,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAU,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,yBAAyB,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAA6C,yBAAyB,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;;;;AAExH;;GAEG;AAMH,MAAM,OAAO,+BAA+B;IA2BxC,iEAAiE;IACjE,YAA+C,KAA2B,EAClC,OAAuB,EACzC,YAAwC,EACxC,SAAoC,EACpC,aAAuC,EAC3B,MAAyC;QAL5B,UAAK,GAAL,KAAK,CAAsB;QAClC,YAAO,GAAP,OAAO,CAAgB;QACzC,iBAAY,GAAZ,YAAY,CAA4B;QACxC,cAAS,GAAT,SAAS,CAA2B;QACpC,kBAAa,GAAb,aAAa,CAA0B;QAC3B,WAAM,GAAN,MAAM,CAAmC;QA/B3E,0EAA0E;QAE1E;;WAEG;QACO,sBAAiB,GAAiB,IAAI,YAAY,EAAE,CAAC;QA4B3D,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QACrE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,GA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AAC,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;oBAEnG,MAAM;iBACT;SACJ;IACL,CAAC;;4HA1WQ,+BAA+B,kBA4BpB,eAAe,aACf,QAAQ;gHA7BnB,+BAA+B;AAuExC;IAAC,QAAQ;;;;mEAkBR;AAKD;IAAC,QAAQ;;;;kEAcR;AAMD;IAAC,QAAQ;;qCACuB,aAAa;;qEAwB5C;AAMD;IAAC,QAAQ;;qCACuB,aAAa;;qEA+F5C;2FAjPQ,+BAA+B;kBAL3C,SAAS;mBACV;oBACI,QAAQ,EAAE,yBAAyB;oBACnC,UAAU,EAAE,IAAI;iBACnB;;0BA6BgB,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ;;0BAIf,QAAQ;4CAuCX,YAAY,MAuBZ,WAAW,MAoBX,cAAc,MA+Bd,cAAc","sourcesContent":["import {Directive, Inject, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {Action1, BindThis} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInput} from '../../interfaces';\nimport {DATE_API, DATE_TIME_INPUT} from '../../misc/tokens';\nimport {DateTimeObjectValue} from '../../misc/types';\nimport {parseDateTime, parseRawInput} from '../../misc/utils';\nimport {DateTimePickerSADirective, DateTimeSADirective} from '../../modules';\nimport {DateApi, DateApiObject, DatePositionParser, DatePositionParserService, DateValueProvider} from '../../services';\n\n/**\n * Directive that adds handler for date time input, which allows navigation using keyboard and checking restriction of value\n */\n@Directive(\n{\n selector: '[dateTime][withHandler]',\n standalone: true,\n})\nexport class DateTimeInputHandlerSADirective<TDate = unknown> implements OnInit, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n /**\n * Instance of parser created for specific format\n */\n protected parser: DatePositionParser;\n\n /**\n * Gets input element as html input\n */\n protected get inputElement(): HTMLInputElement\n {\n if(this.input.element.nodeName == 'INPUT')\n {\n return this.input.element as HTMLInputElement;\n }\n\n throw new Error('You cant use DateTimeInputHandlerSADirective without input element!');\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_TIME_INPUT) protected input: DateTimeInput<TDate>,\n @Inject(DATE_API) protected dateApi: DateApi<TDate>,\n protected dateTimeData: DateTimeSADirective<TDate>,\n protected parserSvc: DatePositionParserService,\n protected valueProvider: DateValueProvider<TDate>,\n @Optional() protected picker?: DateTimePickerSADirective<TDate>,)\n {\n this.parser = parserSvc.createParser(this.dateTimeData.customFormat);\n this.initSubscriptions.add(this.dateTimeData.customFormatChanges.subscribe(() => this.parser = parserSvc.createParser(this.dateTimeData.customFormat)));\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.input.element.addEventListener('keydown', this.handleKeyboard);\n this.input.element.addEventListener('keypress', this.handleKeypress);\n this.input.element.addEventListener('select', this.handleSelect);\n this.input.element.addEventListener('click', this.handleClick);\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 this.input.element.removeEventListener('keydown', this.handleKeyboard);\n this.input.element.removeEventListener('keypress', this.handleKeypress);\n this.input.element.removeEventListener('select', this.handleSelect);\n this.input.element.removeEventListener('click', this.handleClick);\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles selection of text inside of input\n */\n @BindThis\n protected handleSelect(): void\n {\n this.runWithValue(() =>\n {\n //handles when all text is selected\n if(this.inputElement.selectionStart == 0 && this.inputElement.selectionEnd == this.inputElement.value.length)\n {\n const result = this.parser.parse(this.inputElement.value, this.inputElement.selectionStart);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Handles click event inside of input\n */\n @BindThis\n protected handleClick(): void\n {\n this.runWithValue(() =>\n {\n const result = this.parser.parse(this.inputElement.value, this.inputElement.selectionStart ?? 0);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n */\n @BindThis\n protected handleKeypress(event: KeyboardEvent): void\n {\n const selectionStart = this.inputElement.selectionStart ?? 0;\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\n const newRawValueArray = this.inputElement.value.split('');\n newRawValueArray.splice(selectionStart , selectionEnd - selectionStart);\n newRawValueArray.splice(selectionStart, 0, ...event.key);\n const newRawValue = newRawValueArray.join('');\n\n const [parsedValue] = parseRawInput(newRawValue, this.dateApi, this.dateTimeData, this.valueProvider);\n\n this.runWithValue(parsedValue =>\n {\n if(this.minMaxConstraintTest(parsedValue))\n {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n () =>\n {\n //TODO: add support for ranges\n },\n parsedValue);\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n */\n @BindThis\n protected handleKeyboard(event: KeyboardEvent): void\n {\n this.runWithValue(parsedValue =>\n {\n const selectionStart = this.inputElement.selectionStart ?? 0;\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n \n const result = event.key == 'ArrowLeft' ? this.parser.previous(this.inputElement.value, selectionStart) : this.parser.next(this.inputElement.value, selectionStart);\n \n if(result)\n {\n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n \n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n \n let result = this.parser.parse(this.inputElement.value, selectionStart);\n const selectionStartNew = result.positionFrom;\n \n this.stepChangeValue(parsedValue, result.part, event.key == 'ArrowUp');\n \n result = this.parser.parse(this.inputElement.value, selectionStartNew);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n \n break;\n }\n case 'Tab':\n {\n const result = event.shiftKey ? this.parser.previous(this.inputElement.value, selectionStart) : this.parser.next(this.inputElement.value, selectionStart);\n \n if(result)\n {\n event.preventDefault();\n event.stopPropagation();\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n \n break;\n }\n case 'a':\n {\n if(event.ctrlKey)\n {\n event.preventDefault();\n event.stopPropagation();\n }\n \n break;\n }\n case 'Backspace':\n {\n this.input.value = null;\n this.input.valueChange.next();\n \n break;\n }\n case 'Escape':\n {\n this.picker?.hidePicker();\n \n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this.picker?.showPicker();\n }\n \n break;\n }\n }\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n * @param value - Value to be tested\n */\n protected minMaxConstraintTest(value: DateApiObject<TDate>): boolean\n {\n return (!!this.dateTimeData.minDateTime && value.isBefore(this.dateTimeData.minDateTime)) ||\n (!!this.dateTimeData.maxDateTime && value.isAfter(this.dateTimeData.maxDateTime));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param value - Value to be used checked for constrains\n * @param code - Code that should be executed which can change current value\n */\n protected withMinMaxConstraint(value: DateApiObject<TDate>, code: () => void): void\n {\n value.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this.minMaxConstraintTest(value))\n {\n value.resetOriginal();\n }\n\n //value has changed, change input value\n if(!value.isSame(value.originalValue))\n {\n this.input.value = value.value;\n this.input.valueChange.next();\n }\n }\n\n /**\n * Runs code for existing and valid value of date time\n * @param singleValueCode - Code to be run when only single value can be inside of date time\n * @param rangeValueCode - Code to be run when range value can be inside of date time\n * @param parsedValueDefault - Default parsed value to be used\n */\n protected runWithValue(singleValueCode: Action1<DateApiObject<TDate>>, rangeValueCode: Action1<[DateApiObject<TDate> | null, DateApiObject<TDate> | null]>, parsedValueDefault?: DateTimeObjectValue<TDate>|undefined|null): void\n {\n const parsedValue = parsedValueDefault ?? parseDateTime(this.input.value, this.dateApi, null, this.dateTimeData.customFormat);\n\n if(!parsedValue)\n {\n return;\n }\n\n if(Array.isArray(parsedValue))\n {\n rangeValueCode(parsedValue);\n }\n else\n {\n //do nothing for invalid value\n if(!parsedValue.isValid())\n {\n return;\n }\n\n singleValueCode(parsedValue);\n }\n }\n\n /**\n * Changes current value of date for for specified part by single step\n * @param value - Value to be used checked for constrains\n * @param part - Part of date that should be changed\n * @param increment - Indication whether value should be incremented or decremented\n */\n protected stepChangeValue(value: DateApiObject<TDate>, part: string, increment: boolean): void\n {\n switch(part)\n {\n case 'y':\n case 'Y':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addYears(1) : value.subtractYears(1));\n\n break;\n }\n case 'Q':\n {\n break;\n }\n case 'M':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addMonths(1) : value.subtractMonths(1));\n\n break;\n }\n case 'w':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addWeeks(1) : value.subtractWeeks(1));\n\n break;\n }\n case 'd':\n case 'D':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addDays(1) : value.subtractDays(1));\n\n break;\n }\n case 'H':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addHours(1) : value.subtractHours(1));\n\n break;\n }\n case 'm':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addMinutes(1) : value.subtractMinutes(1));\n\n break;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"dateTimeInputHandler.directive.js","sourceRoot":"","sources":["../../../../src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAqB,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAU,QAAQ,EAAC,MAAM,gBAAgB,CAA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IADT,QAAQ;;qCACuB,aAAa;;qEAwB5C;AAOS;IADT,QAAQ;;qCACuB,aAAa;;qEA+F5C;SAjPQ,+BAA+B;2FAA/B,+BAA+B;kBAL3C,SAAS;mBACV;oBACI,QAAQ,EAAE,yBAAyB;oBACnC,UAAU,EAAE,IAAI;iBACnB;;0BA6BgB,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ;;0BAIf,QAAQ;4CAuCX,YAAY,MAuBZ,WAAW,MAoBX,cAAc,MA+Bd,cAAc","sourcesContent":["import {Directive, Inject, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {Action1, BindThis} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInput} from '../../interfaces';\nimport {DATE_API, DATE_TIME_INPUT} from '../../misc/tokens';\nimport {DateTimeObjectValue} from '../../misc/types';\nimport {parseDateTime, parseRawInput} from '../../misc/utils';\nimport {DateTimePickerSADirective, DateTimeSADirective} from '../../modules';\nimport {DateApi, DateApiObject, DatePositionParser, DatePositionParserService, DateValueProvider} from '../../services';\n\n/**\n * Directive that adds handler for date time input, which allows navigation using keyboard and checking restriction of value\n */\n@Directive(\n{\n selector: '[dateTime][withHandler]',\n standalone: true,\n})\nexport class DateTimeInputHandlerSADirective<TDate = unknown> implements OnInit, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n /**\n * Instance of parser created for specific format\n */\n protected parser: DatePositionParser;\n\n /**\n * Gets input element as html input\n */\n protected get inputElement(): HTMLInputElement\n {\n if(this.input.element.nodeName == 'INPUT')\n {\n return this.input.element as HTMLInputElement;\n }\n\n throw new Error('You cant use DateTimeInputHandlerSADirective without input element!');\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_TIME_INPUT) protected input: DateTimeInput<TDate>,\n @Inject(DATE_API) protected dateApi: DateApi<TDate>,\n protected dateTimeData: DateTimeSADirective<TDate>,\n protected parserSvc: DatePositionParserService,\n protected valueProvider: DateValueProvider<TDate>,\n @Optional() protected picker?: DateTimePickerSADirective<TDate>,)\n {\n this.parser = parserSvc.createParser(this.dateTimeData.customFormat);\n this.initSubscriptions.add(this.dateTimeData.customFormatChanges.subscribe(() => this.parser = parserSvc.createParser(this.dateTimeData.customFormat)));\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.input.element.addEventListener('keydown', this.handleKeyboard);\n this.input.element.addEventListener('keypress', this.handleKeypress);\n this.input.element.addEventListener('select', this.handleSelect);\n this.input.element.addEventListener('click', this.handleClick);\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 this.input.element.removeEventListener('keydown', this.handleKeyboard);\n this.input.element.removeEventListener('keypress', this.handleKeypress);\n this.input.element.removeEventListener('select', this.handleSelect);\n this.input.element.removeEventListener('click', this.handleClick);\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles selection of text inside of input\n */\n @BindThis\n protected handleSelect(): void\n {\n this.runWithValue(() =>\n {\n //handles when all text is selected\n if(this.inputElement.selectionStart == 0 && this.inputElement.selectionEnd == this.inputElement.value.length)\n {\n const result = this.parser.parse(this.inputElement.value, this.inputElement.selectionStart);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Handles click event inside of input\n */\n @BindThis\n protected handleClick(): void\n {\n this.runWithValue(() =>\n {\n const result = this.parser.parse(this.inputElement.value, this.inputElement.selectionStart ?? 0);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n */\n @BindThis\n protected handleKeypress(event: KeyboardEvent): void\n {\n const selectionStart = this.inputElement.selectionStart ?? 0;\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\n const newRawValueArray = this.inputElement.value.split('');\n newRawValueArray.splice(selectionStart , selectionEnd - selectionStart);\n newRawValueArray.splice(selectionStart, 0, ...event.key);\n const newRawValue = newRawValueArray.join('');\n\n const [parsedValue] = parseRawInput(newRawValue, this.dateApi, this.dateTimeData, this.valueProvider);\n\n this.runWithValue(parsedValue =>\n {\n if(this.minMaxConstraintTest(parsedValue))\n {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n () =>\n {\n //TODO: add support for ranges\n },\n parsedValue);\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n */\n @BindThis\n protected handleKeyboard(event: KeyboardEvent): void\n {\n this.runWithValue(parsedValue =>\n {\n const selectionStart = this.inputElement.selectionStart ?? 0;\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n \n const result = event.key == 'ArrowLeft' ? this.parser.previous(this.inputElement.value, selectionStart) : this.parser.next(this.inputElement.value, selectionStart);\n \n if(result)\n {\n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n \n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n \n let result = this.parser.parse(this.inputElement.value, selectionStart);\n const selectionStartNew = result.positionFrom;\n \n this.stepChangeValue(parsedValue, result.part, event.key == 'ArrowUp');\n \n result = this.parser.parse(this.inputElement.value, selectionStartNew);\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n \n break;\n }\n case 'Tab':\n {\n const result = event.shiftKey ? this.parser.previous(this.inputElement.value, selectionStart) : this.parser.next(this.inputElement.value, selectionStart);\n \n if(result)\n {\n event.preventDefault();\n event.stopPropagation();\n \n this.inputElement.selectionStart = result.positionFrom;\n this.inputElement.selectionEnd = result.positionTo;\n }\n \n break;\n }\n case 'a':\n {\n if(event.ctrlKey)\n {\n event.preventDefault();\n event.stopPropagation();\n }\n \n break;\n }\n case 'Backspace':\n {\n this.input.value = null;\n this.input.valueChange.next();\n \n break;\n }\n case 'Escape':\n {\n this.picker?.hidePicker();\n \n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this.picker?.showPicker();\n }\n \n break;\n }\n }\n },\n () =>\n {\n //TODO: add support for ranges\n });\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n * @param value - Value to be tested\n */\n protected minMaxConstraintTest(value: DateApiObject<TDate>): boolean\n {\n return (!!this.dateTimeData.minDateTime && value.isBefore(this.dateTimeData.minDateTime)) ||\n (!!this.dateTimeData.maxDateTime && value.isAfter(this.dateTimeData.maxDateTime));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param value - Value to be used checked for constrains\n * @param code - Code that should be executed which can change current value\n */\n protected withMinMaxConstraint(value: DateApiObject<TDate>, code: () => void): void\n {\n value.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this.minMaxConstraintTest(value))\n {\n value.resetOriginal();\n }\n\n //value has changed, change input value\n if(!value.isSame(value.originalValue))\n {\n this.input.value = value.value;\n this.input.valueChange.next();\n }\n }\n\n /**\n * Runs code for existing and valid value of date time\n * @param singleValueCode - Code to be run when only single value can be inside of date time\n * @param rangeValueCode - Code to be run when range value can be inside of date time\n * @param parsedValueDefault - Default parsed value to be used\n */\n protected runWithValue(singleValueCode: Action1<DateApiObject<TDate>>, rangeValueCode: Action1<[DateApiObject<TDate> | null, DateApiObject<TDate> | null]>, parsedValueDefault?: DateTimeObjectValue<TDate>|undefined|null): void\n {\n const parsedValue = parsedValueDefault ?? parseDateTime(this.input.value, this.dateApi, null, this.dateTimeData.customFormat);\n\n if(!parsedValue)\n {\n return;\n }\n\n if(Array.isArray(parsedValue))\n {\n rangeValueCode(parsedValue);\n }\n else\n {\n //do nothing for invalid value\n if(!parsedValue.isValid())\n {\n return;\n }\n\n singleValueCode(parsedValue);\n }\n }\n\n /**\n * Changes current value of date for for specified part by single step\n * @param value - Value to be used checked for constrains\n * @param part - Part of date that should be changed\n * @param increment - Indication whether value should be incremented or decremented\n */\n protected stepChangeValue(value: DateApiObject<TDate>, part: string, increment: boolean): void\n {\n switch(part)\n {\n case 'y':\n case 'Y':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addYears(1) : value.subtractYears(1));\n\n break;\n }\n case 'Q':\n {\n break;\n }\n case 'M':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addMonths(1) : value.subtractMonths(1));\n\n break;\n }\n case 'w':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addWeeks(1) : value.subtractWeeks(1));\n\n break;\n }\n case 'd':\n case 'D':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addDays(1) : value.subtractDays(1));\n\n break;\n }\n case 'H':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addHours(1) : value.subtractHours(1));\n\n break;\n }\n case 'm':\n {\n this.withMinMaxConstraint(value, () => increment ? value.addMinutes(1) : value.subtractMinutes(1));\n\n break;\n }\n }\n }\n}\n"]}
@@ -7,11 +7,12 @@ import * as i2 from "../withTime/withTime.directive";
7
7
  /**
8
8
  * Directive that combines date time picker with date time input
9
9
  */
10
- export class DateTimePickerInputSADirective {
10
+ class DateTimePickerInputSADirective {
11
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
12
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: DateTimePickerInputSADirective, isStandalone: true, selector: "input[dateTime][dateTimePickerInput]", hostDirectives: [{ directive: i1.DatePickerInputSADirective }, { directive: i2.WithTimeSADirective }], ngImport: i0 });
11
13
  }
12
- DateTimePickerInputSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
- DateTimePickerInputSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimePickerInputSADirective, isStandalone: true, selector: "input[dateTime][dateTimePickerInput]", hostDirectives: [{ directive: i1.DatePickerInputSADirective }, { directive: i2.WithTimeSADirective }], ngImport: i0 });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerInputSADirective, decorators: [{
14
+ export { DateTimePickerInputSADirective };
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimePickerInputSADirective, decorators: [{
15
16
  type: Directive,
16
17
  args: [{
17
18
  selector: 'input[dateTime][dateTimePickerInput]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePickerInput.directive.js","sourceRoot":"","sources":["../../../../src/directives/dateTimePickerInput/dateTimePickerInput.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,0BAA0B,EAAC,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;;;;AAEnE;;GAEG;AACH,MAca,8BAA8B;uGAA9B,8BAA8B;2FAA9B,8BAA8B;;SAA9B,8BAA8B;2FAA9B,8BAA8B;kBAd1C,SAAS;mBACV;oBACI,QAAQ,EAAE,sCAAsC;oBAChD,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI;4BACI,SAAS,EAAE,0BAA0B;yBACxC;wBACD;4BACI,SAAS,EAAE,mBAAmB;yBACjC;qBACJ;iBACJ","sourcesContent":["import {Directive} from '@angular/core';\n\nimport {DatePickerInputSADirective} from '../datePickerInput/datePickerInput.directive';\nimport {WithTimeSADirective} from '../withTime/withTime.directive';\n\n/**\n * Directive that combines date time picker with date time input\n */\n@Directive(\n{\n selector: 'input[dateTime][dateTimePickerInput]',\n standalone: true,\n hostDirectives:\n [\n {\n directive: DatePickerInputSADirective,\n },\n {\n directive: WithTimeSADirective,\n },\n ],\n})\nexport class DateTimePickerInputSADirective\n{\n}"]}
@@ -8,11 +8,12 @@ import * as i3 from "../simpleDateTimeInputHandler/simpleDateTimeInputHandler.di
8
8
  /**
9
9
  * Directive that combines date picker with simple date input
10
10
  */
11
- export class SimpleDatePickerInputSADirective {
11
+ class SimpleDatePickerInputSADirective {
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDatePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: SimpleDatePickerInputSADirective, isStandalone: true, selector: "input[dateTime][simpleDatePickerInput]", hostDirectives: [{ directive: i1.DateTimePickerSADirective, inputs: ["withPickerOptions", "withPickerOptions", "pickerOptions", "pickerOptions"] }, { directive: i2.DateTimeInputSADirective }, { directive: i3.SimpleDateTimeInputHandlerSADirective }], ngImport: i0 });
12
14
  }
13
- SimpleDatePickerInputSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDatePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
14
- SimpleDatePickerInputSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: SimpleDatePickerInputSADirective, isStandalone: true, selector: "input[dateTime][simpleDatePickerInput]", hostDirectives: [{ directive: i1.DateTimePickerSADirective, inputs: ["withPickerOptions", "withPickerOptions", "pickerOptions", "pickerOptions"] }, { directive: i2.DateTimeInputSADirective }, { directive: i3.SimpleDateTimeInputHandlerSADirective }], ngImport: i0 });
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDatePickerInputSADirective, decorators: [{
15
+ export { SimpleDatePickerInputSADirective };
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDatePickerInputSADirective, decorators: [{
16
17
  type: Directive,
17
18
  args: [{
18
19
  selector: 'input[dateTime][simpleDatePickerInput]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleDatePickerInput.directive.js","sourceRoot":"","sources":["../../../../src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,wBAAwB,EAAE,yBAAyB,EAAC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,qCAAqC,EAAC,MAAM,oEAAoE,CAAC;;;;;AAEzH;;GAEG;AACH,MAsBa,gCAAgC;uGAAhC,gCAAgC;2FAAhC,gCAAgC;;SAAhC,gCAAgC;2FAAhC,gCAAgC;kBAtB5C,SAAS;mBACV;oBACI,QAAQ,EAAE,wCAAwC;oBAClD,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI;4BACI,SAAS,EAAE,yBAAyB;4BACpC,MAAM,EACN;gCACI,mBAAmB;gCACnB,eAAe;6BAClB;yBACJ;wBACD;4BACI,SAAS,EAAE,wBAAwB;yBACtC;wBACD;4BACI,SAAS,EAAE,qCAAqC;yBACnD;qBACJ;iBACJ","sourcesContent":["import {Directive} from '@angular/core';\n\nimport {DateTimeInputSADirective, DateTimePickerSADirective} from '../../modules';\nimport {SimpleDateTimeInputHandlerSADirective} from '../simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive';\n\n/**\n * Directive that combines date picker with simple date input\n */\n@Directive(\n{\n selector: 'input[dateTime][simpleDatePickerInput]',\n standalone: true,\n hostDirectives:\n [\n {\n directive: DateTimePickerSADirective,\n inputs:\n [\n 'withPickerOptions',\n 'pickerOptions',\n ]\n },\n {\n directive: DateTimeInputSADirective,\n },\n {\n directive: SimpleDateTimeInputHandlerSADirective,\n },\n ],\n})\nexport class SimpleDatePickerInputSADirective\n{\n}"]}
@@ -9,7 +9,11 @@ import * as i1 from "../../modules";
9
9
  /**
10
10
  * Directive that adds simple handler for date time input, which allows simple navigation using keyboard
11
11
  */
12
- export class SimpleDateTimeInputHandlerSADirective {
12
+ class SimpleDateTimeInputHandlerSADirective {
13
+ input;
14
+ dateApi;
15
+ dateTimeData;
16
+ picker;
13
17
  //######################### constructor #########################
14
18
  constructor(input, dateApi, dateTimeData, picker) {
15
19
  this.input = input;
@@ -109,16 +113,17 @@ export class SimpleDateTimeInputHandlerSADirective {
109
113
  this.input.valueChange.next();
110
114
  }
111
115
  }
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDateTimeInputHandlerSADirective, deps: [{ token: DATE_TIME_INPUT }, { token: DATE_API }, { token: i1.DateTimeSADirective }, { token: i1.DateTimePickerSADirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
117
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: SimpleDateTimeInputHandlerSADirective, isStandalone: true, selector: "[dateTime][withSimpleHandler]", ngImport: i0 });
112
118
  }
113
- SimpleDateTimeInputHandlerSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDateTimeInputHandlerSADirective, deps: [{ token: DATE_TIME_INPUT }, { token: DATE_API }, { token: i1.DateTimeSADirective }, { token: i1.DateTimePickerSADirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
114
- SimpleDateTimeInputHandlerSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: SimpleDateTimeInputHandlerSADirective, isStandalone: true, selector: "[dateTime][withSimpleHandler]", ngImport: i0 });
115
119
  __decorate([
116
120
  BindThis,
117
121
  __metadata("design:type", Function),
118
122
  __metadata("design:paramtypes", [KeyboardEvent]),
119
123
  __metadata("design:returntype", void 0)
120
124
  ], SimpleDateTimeInputHandlerSADirective.prototype, "handleKeyboard", null);
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDateTimeInputHandlerSADirective, decorators: [{
125
+ export { SimpleDateTimeInputHandlerSADirective };
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDateTimeInputHandlerSADirective, decorators: [{
122
127
  type: Directive,
123
128
  args: [{
124
129
  selector: '[dateTime][withSimpleHandler]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleDateTimeInputHandler.directive.js","sourceRoot":"","sources":["../../../../src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAqB,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,yBAAyB,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;;;AAG7E;;GAEG;AACH,MAKa,qCAAqC;IAGC;IACP;IAClB;IACY;IAJlC,iEAAiE;IACjE,YAA+C,KAA2B,EAClC,OAAuB,EACzC,YAAwC,EAC5B,MAAyC;QAH5B,UAAK,GAAL,KAAK,CAAsB;QAClC,YAAO,GAAP,OAAO,CAAgB;QACzC,iBAAY,GAAZ,YAAY,CAA4B;QAC5B,WAAM,GAAN,MAAM,CAAmC;IAE3E,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAA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ACoB,aAAa;;2EA8DzC;SAnGQ,qCAAqC;2FAArC,qCAAqC;kBALjD,SAAS;mBACV;oBACI,QAAQ,EAAE,+BAA+B;oBACzC,UAAU,EAAE,IAAI;iBACnB;;0BAIgB,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ;;0BAEf,QAAQ;4CA+Bd,cAAc","sourcesContent":["import {Directive, Inject, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {BindThis} from '@jscrpt/common';\n\nimport {DateTimeInput} from '../../interfaces';\nimport {DATE_TIME_INPUT, DATE_API} from '../../misc/tokens';\nimport {parseDateTime} from '../../misc/utils';\nimport {DateTimePickerSADirective, DateTimeSADirective} from '../../modules';\nimport {DateApi, DateApiObject} from '../../services';\n\n/**\n * Directive that adds simple handler for date time input, which allows simple navigation using keyboard\n */\n@Directive(\n{\n selector: '[dateTime][withSimpleHandler]',\n standalone: true,\n})\nexport class SimpleDateTimeInputHandlerSADirective<TDate = unknown> implements OnInit, OnDestroy\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_TIME_INPUT) protected input: DateTimeInput<TDate>,\n @Inject(DATE_API) protected dateApi: DateApi<TDate>,\n protected dateTimeData: DateTimeSADirective<TDate>,\n @Optional() protected picker?: DateTimePickerSADirective<TDate>,)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.input.element.addEventListener('keydown', this.handleKeyboard);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.input.element.removeEventListener('keydown', this.handleKeyboard);\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n */\n @BindThis\n public handleKeyboard(event: KeyboardEvent): void\n {\n const parsedValue = parseDateTime(this.input.value, this.dateApi, null, this.dateTimeData.customFormat);\n \n //no value do nothing\n if(!parsedValue)\n {\n return;\n }\n\n //range value\n if(Array.isArray(parsedValue))\n {\n //TODO: finish range support\n }\n else\n {\n //do nothing for invalid date time\n if(!parsedValue.isValid())\n {\n return;\n }\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n\n this.withMinMaxConstraint(parsedValue, () => event.key == 'ArrowLeft' ? parsedValue.subtractDays(1) : parsedValue.addDays(1));\n\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n\n this.withMinMaxConstraint(parsedValue, () => event.key == 'ArrowUp' ? parsedValue.subtractWeeks(1) : parsedValue.addWeeks(1));\n\n break;\n }\n case 'Escape':\n {\n this.picker?.hidePicker();\n\n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this.picker?.showPicker();\n }\n\n break;\n }\n }\n }\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n * @param value - Value to be tested\n */\n protected minMaxConstraintTest(value: DateApiObject<TDate>): boolean\n {\n return (!!this.dateTimeData.minDateTime && value.isBefore(this.dateTimeData.minDateTime)) ||\n (!!this.dateTimeData.maxDateTime && value.isAfter(this.dateTimeData.maxDateTime));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param value - Value to be used checked for constrains\n * @param code - Code that should be executed which can change current value\n */\n protected withMinMaxConstraint(value: DateApiObject<TDate>, code: () => void): void\n {\n value.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this.minMaxConstraintTest(value))\n {\n value.resetOriginal();\n }\n\n //value has changed, change input value\n if(!value.isSame(value.originalValue))\n {\n this.input.value = value.value;\n this.input.valueChange.next();\n }\n }\n}\n"]}
@@ -7,11 +7,12 @@ import * as i2 from "../withTime/withTime.directive";
7
7
  /**
8
8
  * Directive that combines date time picker with simple date time input
9
9
  */
10
- export class SimpleDateTimePickerInputSADirective {
10
+ class SimpleDateTimePickerInputSADirective {
11
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDateTimePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
12
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: SimpleDateTimePickerInputSADirective, isStandalone: true, selector: "input[dateTime][simpleDateTimePickerInput]", hostDirectives: [{ directive: i1.SimpleDatePickerInputSADirective }, { directive: i2.WithTimeSADirective }], ngImport: i0 });
11
13
  }
12
- SimpleDateTimePickerInputSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDateTimePickerInputSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
- SimpleDateTimePickerInputSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: SimpleDateTimePickerInputSADirective, isStandalone: true, selector: "input[dateTime][simpleDateTimePickerInput]", hostDirectives: [{ directive: i1.SimpleDatePickerInputSADirective }, { directive: i2.WithTimeSADirective }], ngImport: i0 });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SimpleDateTimePickerInputSADirective, decorators: [{
14
+ export { SimpleDateTimePickerInputSADirective };
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SimpleDateTimePickerInputSADirective, decorators: [{
15
16
  type: Directive,
16
17
  args: [{
17
18
  selector: 'input[dateTime][simpleDateTimePickerInput]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleDateTimePickerInput.directive.js","sourceRoot":"","sources":["../../../../src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,gCAAgC,EAAC,MAAM,0DAA0D,CAAC;AAC1G,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;;;;AAEnE;;GAEG;AACH,MAca,oCAAoC;uGAApC,oCAAoC;2FAApC,oCAAoC;;SAApC,oCAAoC;2FAApC,oCAAoC;kBAdhD,SAAS;mBACV;oBACI,QAAQ,EAAE,4CAA4C;oBACtD,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI;4BACI,SAAS,EAAE,gCAAgC;yBAC9C;wBACD;4BACI,SAAS,EAAE,mBAAmB;yBACjC;qBACJ;iBACJ","sourcesContent":["import {Directive} from '@angular/core';\n\nimport {SimpleDatePickerInputSADirective} from '../simpleDatePickerInput/simpleDatePickerInput.directive';\nimport {WithTimeSADirective} from '../withTime/withTime.directive';\n\n/**\n * Directive that combines date time picker with simple date time input\n */\n@Directive(\n{\n selector: 'input[dateTime][simpleDateTimePickerInput]',\n standalone: true,\n hostDirectives:\n [\n {\n directive: SimpleDatePickerInputSADirective,\n },\n {\n directive: WithTimeSADirective,\n },\n ],\n})\nexport class SimpleDateTimePickerInputSADirective\n{\n}"]}
@@ -7,14 +7,14 @@ import * as i1 from "../../modules";
7
7
  /**
8
8
  * Directive that sets current date and time as day and time for empty date time on focus
9
9
  */
10
- export class WithNowSADirective {
10
+ class WithNowSADirective {
11
+ //######################### protected fields #########################
12
+ /**
13
+ * Subscriptions created during initialization
14
+ */
15
+ initSubscriptions = new Subscription();
11
16
  //######################### constructor #########################
12
17
  constructor(input, dateApi) {
13
- //######################### protected fields #########################
14
- /**
15
- * Subscriptions created during initialization
16
- */
17
- this.initSubscriptions = new Subscription();
18
18
  this.initSubscriptions.add(input.focus.subscribe(() => {
19
19
  if (!input.value) {
20
20
  input.value = dateApi.now().value;
@@ -28,10 +28,11 @@ export class WithNowSADirective {
28
28
  ngOnDestroy() {
29
29
  this.initSubscriptions.unsubscribe();
30
30
  }
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithNowSADirective, deps: [{ token: i1.DateTimeInputSADirective }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
32
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: WithNowSADirective, isStandalone: true, selector: "[dateTime][withNow]", ngImport: i0 });
31
33
  }
32
- WithNowSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithNowSADirective, deps: [{ token: i1.DateTimeInputSADirective }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
33
- WithNowSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: WithNowSADirective, isStandalone: true, selector: "[dateTime][withNow]", ngImport: i0 });
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithNowSADirective, decorators: [{
34
+ export { WithNowSADirective };
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithNowSADirective, decorators: [{
35
36
  type: Directive,
36
37
  args: [{
37
38
  selector: '[dateTime][withNow]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withNow.directive.js","sourceRoot":"","sources":["../../../../src/directives/withNow/withNow.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAC,MAAM,eAAe,CAAC;;;AAGvD;;GAEG;AACH,MAKa,kBAAkB;IAE3B,sEAAsE;IAEtE;;OAEG;IACO,iBAAiB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAE/D,iEAAiE;IACjE,YAAY,KAAsC,EACpB,OAAuB;QAEjD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YAElD,IAAG,CAAC,KAAK,CAAC,KAAK,EACf;gBACI,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;aACrC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;uGA9BQ,kBAAkB,0DAWP,QAAQ;2FAXnB,kBAAkB;;SAAlB,kBAAkB;2FAAlB,kBAAkB;kBAL9B,SAAS;mBACV;oBACI,QAAQ,EAAE,qBAAqB;oBAC/B,UAAU,EAAE,IAAI;iBACnB;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, Inject, OnDestroy} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {DATE_API} from '../../misc/tokens';\nimport {DateTimeInputSADirective} from '../../modules';\nimport {DateApi} from '../../services';\n\n/**\n * Directive that sets current date and time as day and time for empty date time on focus\n */\n@Directive(\n{\n selector: '[dateTime][withNow]',\n standalone: true,\n})\nexport class WithNowSADirective<TDate = unknown> implements OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n //######################### constructor #########################\n constructor(input: DateTimeInputSADirective<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>,)\n {\n this.initSubscriptions.add(input.focus.subscribe(() =>\n {\n if(!input.value)\n {\n input.value = dateApi.now().value;\n }\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}"]}
@@ -5,7 +5,7 @@ import * as i1 from "../../modules";
5
5
  /**
6
6
  * Directive that sets up usage of date time picker to use time format and time picker
7
7
  */
8
- export class WithTimeSADirective {
8
+ class WithTimeSADirective {
9
9
  //######################### constructor #########################
10
10
  constructor(picker, dateTime) {
11
11
  picker.pickerOptions =
@@ -19,10 +19,11 @@ export class WithTimeSADirective {
19
19
  };
20
20
  dateTime.format = 'dateTime';
21
21
  }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithTimeSADirective, deps: [{ token: i1.DateTimePickerSADirective }, { token: i1.DateTimeSADirective }], target: i0.ɵɵFactoryTarget.Directive });
23
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: WithTimeSADirective, isStandalone: true, selector: "[dateTime][withPicker][withTime]", ngImport: i0 });
22
24
  }
23
- WithTimeSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithTimeSADirective, deps: [{ token: i1.DateTimePickerSADirective }, { token: i1.DateTimeSADirective }], target: i0.ɵɵFactoryTarget.Directive });
24
- WithTimeSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: WithTimeSADirective, isStandalone: true, selector: "[dateTime][withPicker][withTime]", ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithTimeSADirective, decorators: [{
25
+ export { WithTimeSADirective };
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithTimeSADirective, decorators: [{
26
27
  type: Directive,
27
28
  args: [{
28
29
  selector: '[dateTime][withPicker][withTime]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withTime.directive.js","sourceRoot":"","sources":["../../../../src/directives/withTime/withTime.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,2BAA2B,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;;;AAE/K;;GAEG;AACH,MAKa,mBAAmB;IAE5B,iEAAiE;IACjE,YAAY,MAAwC,EACxC,QAAoC;QAE5C,MAAM,CAAC,aAAa;YACpB;gBACI,iBAAiB,EACjB;oBACI,MAAM,EAAE,2BAA2B;oBACnC,KAAK,EAAE,oBAAoB;oBAC3B,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,qBAAqB;iBAChC;aACJ,CAAC;QAEF,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC;IACjC,CAAC;uGAlBQ,mBAAmB;2FAAnB,mBAAmB;;SAAnB,mBAAmB;2FAAnB,mBAAmB;kBAL/B,SAAS;mBACV;oBACI,QAAQ,EAAE,kCAAkC;oBAC5C,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Directive} from '@angular/core';\n\nimport {RollerTimePickerSAComponent, DateTimePickerSADirective, DayPickerSAComponent, MonthPickerSAComponent, YearPickerSAComponent, DateTimeSADirective} from '../../modules';\n\n/**\n * Directive that sets up usage of date time picker to use time format and time picker\n */\n@Directive(\n{\n selector: '[dateTime][withPicker][withTime]',\n standalone: true,\n})\nexport class WithTimeSADirective<TDate = unknown>\n{\n //######################### constructor #########################\n constructor(picker: DateTimePickerSADirective<TDate>,\n dateTime: DateTimeSADirective<TDate>,)\n {\n picker.pickerOptions = \n {\n periodsDefinition:\n {\n 'time': RollerTimePickerSAComponent,\n 'day': DayPickerSAComponent,\n 'month': MonthPickerSAComponent,\n 'year': YearPickerSAComponent,\n },\n };\n\n dateTime.format = 'dateTime';\n }\n}"]}
@@ -7,14 +7,14 @@ import * as i1 from "../../modules";
7
7
  /**
8
8
  * Directive that sets today (start of a day) as day for empty date time on focus
9
9
  */
10
- export class WithTodaySADirective {
10
+ class WithTodaySADirective {
11
+ //######################### protected fields #########################
12
+ /**
13
+ * Subscriptions created during initialization
14
+ */
15
+ initSubscriptions = new Subscription();
11
16
  //######################### constructor #########################
12
17
  constructor(input, dateApi) {
13
- //######################### protected fields #########################
14
- /**
15
- * Subscriptions created during initialization
16
- */
17
- this.initSubscriptions = new Subscription();
18
18
  this.initSubscriptions.add(input.focus.subscribe(() => {
19
19
  if (!input.value) {
20
20
  input.value = dateApi.now().startOfDay().value;
@@ -28,10 +28,11 @@ export class WithTodaySADirective {
28
28
  ngOnDestroy() {
29
29
  this.initSubscriptions.unsubscribe();
30
30
  }
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithTodaySADirective, deps: [{ token: i1.DateTimeInputSADirective }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
32
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: WithTodaySADirective, isStandalone: true, selector: "[dateTime][withToday]", ngImport: i0 });
31
33
  }
32
- WithTodaySADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithTodaySADirective, deps: [{ token: i1.DateTimeInputSADirective }, { token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
33
- WithTodaySADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: WithTodaySADirective, isStandalone: true, selector: "[dateTime][withToday]", ngImport: i0 });
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WithTodaySADirective, decorators: [{
34
+ export { WithTodaySADirective };
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: WithTodaySADirective, decorators: [{
35
36
  type: Directive,
36
37
  args: [{
37
38
  selector: '[dateTime][withToday]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withToday.directive.js","sourceRoot":"","sources":["../../../../src/directives/withToday/withToday.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAC,MAAM,eAAe,CAAC;;;AAGvD;;GAEG;AACH,MAKa,oBAAoB;IAE7B,sEAAsE;IAEtE;;OAEG;IACO,iBAAiB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAE/D,iEAAiE;IACjE,YAAY,KAAsC,EACpB,OAAuB;QAEjD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YAElD,IAAG,CAAC,KAAK,CAAC,KAAK,EACf;gBACI,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;aAClD;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;uGA9BQ,oBAAoB,0DAWT,QAAQ;2FAXnB,oBAAoB;;SAApB,oBAAoB;2FAApB,oBAAoB;kBALhC,SAAS;mBACV;oBACI,QAAQ,EAAE,uBAAuB;oBACjC,UAAU,EAAE,IAAI;iBACnB;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, Inject, OnDestroy} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {DATE_API} from '../../misc/tokens';\nimport {DateTimeInputSADirective} from '../../modules';\nimport {DateApi} from '../../services';\n\n/**\n * Directive that sets today (start of a day) as day for empty date time on focus\n */\n@Directive(\n{\n selector: '[dateTime][withToday]',\n standalone: true,\n})\nexport class WithTodaySADirective<TDate = unknown> implements OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n //######################### constructor #########################\n constructor(input: DateTimeInputSADirective<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>,)\n {\n this.initSubscriptions.add(input.focus.subscribe(() =>\n {\n if(!input.value)\n {\n input.value = dateApi.now().startOfDay().value;\n }\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}"]}
@@ -74,7 +74,7 @@ export function datetimeMaxValidator(dateApi, maxValue, valueFormat, stringForma
74
74
  if (isBlank(control.value) || isBlank(maxValue)) {
75
75
  return null;
76
76
  }
77
- if (maxValue instanceof (DateTimeBase)) {
77
+ if (maxValue instanceof DateTimeBase) {
78
78
  const value = getSingleDateTimeValue(maxValue.value);
79
79
  //no validation
80
80
  if (isBlank(value)) {
@@ -112,7 +112,7 @@ export function datetimeMinValidator(dateApi, minValue, valueFormat, stringForma
112
112
  if (isBlank(control.value) || isBlank(minValue)) {
113
113
  return null;
114
114
  }
115
- if (minValue instanceof (DateTimeBase)) {
115
+ if (minValue instanceof DateTimeBase) {
116
116
  const value = getSingleDateTimeValue(minValue.value);
117
117
  //no validation
118
118
  if (isBlank(value)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/misc/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAC,sBAAsB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACzE,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AA8BlC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAkB,OAAuB,EACvB,WAA+C,EAC/C,YAAmC;IAElF,OAAO,CAAC,OAAyD,EAAyB,EAAE;QAExF,IAAG,OAAO,CAAC,OAAO,CAAC,KAA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OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,EAC9C;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,QAAQ,YAAY,YAAY,EACnC;YACI,MAAM,KAAK,GAAG,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAErD,eAAe;YACf,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;gBACI,OAAO,IAAI,CAAC;aACf;YAED,QAAQ,GAAG,KAAK,CAAC;SACpB;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAErF,IAAG,CAAC,WAAW,EACf;YACI,OAAO,IAAI,CAAC;SACf;QAED,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,IAAI,SAAS,CAAC,CAAC;QAE1E,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC9B;YACI,IAAG,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EACnE;gBACI,OAAO;oBACH,aAAa,EAAE,WAAW,CAAC,KAAK;iBACnC,CAAC;aACL;SACJ;aAED;YACI,0BAA0B;SAC7B;QAED,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\nimport {ModelPropertyMetadata, ValidatorFnFactory} from '@anglr/common/forms';\nimport {isBlank, isNumber, isString} from '@jscrpt/common';\n\nimport {DateApi, DateValue} from '../services';\nimport {getSingleDateTimeValue, parseDateTime} from './utils';\nimport {DateTimeValueFormat} from './enums';\nimport {DateTimeInputOutputValue} from './types';\nimport {DateTimeBase} from '../modules/dateTime/directives/dateTimeBase';\nimport {DATE_API} from './tokens';\n\n//TODO: add decorators for min and max date time\n\n/**\n * Validations arguments for date time validators for model based forms\n */\nexport interface DateTimeValidationArgs<TDate = unknown>\n{\n /**\n * Format of validated value\n */\n valueFormat?: DateTimeValueFormat|null;\n\n /**\n * Format of string value\n */\n stringFormat?: string|null;\n\n /**\n * Max allowed value\n */\n maxValue?: DateValue|TDate|DateTimeBase<TDate>;\n\n /**\n * Min allowed value\n */\n minValue?: DateValue|TDate|DateTimeBase<TDate>;\n}\n\n/**\n * Date time validator factory function, creates validator for checking validity of datetime\n * @param dateApi - Date api used for parsing date time\n * @param valueFormat - Optional required format\n * @param stringFormat - Optional string format of value\n */\nexport function datetimeValidator<TDate = unknown>(dateApi: DateApi<TDate>,\n valueFormat: DateTimeValueFormat|undefined|null,\n stringFormat: string|undefined|null,): ValidatorFn\n{\n return (control: AbstractControl<DateTimeInputOutputValue<TDate>>): ValidationErrors|null =>\n {\n if(isBlank(control.value))\n {\n return null;\n }\n\n const parsedValue = parseDateTime(control.value, dateApi, valueFormat, stringFormat);\n\n if(!parsedValue)\n {\n return null;\n }\n\n if(!Array.isArray(parsedValue))\n {\n if(!parsedValue.isValid())\n {\n return {\n 'datetime': stringFormat\n };\n }\n }\n else\n {\n //TODO: support for ranges\n }\n\n return null;\n };\n}\n\n/**\n * Factory function that creates validator function factory\n * @param args - Static arguments for date time validator\n */\nexport function dateTimeModelValidatorFactory<TDate = unknown>(args: DateTimeValidationArgs<TDate>): ValidatorFnFactory<DateTimeValidationArgs<TDate>>\n{\n return new ValidatorFnFactory<DateTimeValidationArgs<TDate>>(args =>\n {\n const dateApi = args.injector?.get(DATE_API, null);\n\n if(!dateApi)\n {\n throw new Error('DateTime: missing DateApi! Please provide one.');\n }\n\n return datetimeValidator(dateApi, args.valueFormat, args.stringFormat);\n }, args);\n}\n\n/**\n * Sets date time validator, with default formats\n */\nexport function DateTime(): PropertyDecorator\n/**\n * Sets date time validator, with default string format\n * @param valueFormat - Format of validated value\n */\nexport function DateTime(valueFormat: DateTimeValueFormat): PropertyDecorator\n/**\n * Sets date time validator, with default value format\n * @param stringFormat - Format of string value\n */\nexport function DateTime(stringFormat: string|null): PropertyDecorator\n/**\n * Sets date time validator\n * @param valueFormat - Format of validated value\n * @param stringFormat - Format of string value\n */\nexport function DateTime(valueFormat: DateTimeValueFormat, stringFormat: string): PropertyDecorator\n/**\n * Sets date time validator to property on which is used\n */\nexport function DateTime(valueFormatOrStringFormat?: DateTimeValueFormat|string|null, stringFormat?: string|undefined|null): PropertyDecorator\n{\n let valueFormat: DateTimeValueFormat|undefined|null;\n\n if(isNumber(valueFormatOrStringFormat))\n {\n valueFormat = valueFormatOrStringFormat;\n }\n\n if(isString(valueFormatOrStringFormat))\n {\n stringFormat = valueFormatOrStringFormat;\n }\n\n return ModelPropertyMetadata(\n {\n validators: [dateTimeModelValidatorFactory(\n {\n stringFormat,\n valueFormat,\n })]\n });\n}\n\n/**\n * Date time validator factory function, creates validator for checking validity of datetime max value\n * @param dateApi - Date api used for parsing date time\n * @param maxValue - Maximal date time value that should be used for validation against\n * @param valueFormat - Optional required format\n * @param stringFormat - Optional string format of value\n */\nexport function datetimeMaxValidator<TDate = unknown>(dateApi: DateApi<TDate>,\n maxValue: DateValue|TDate|DateTimeBase<TDate>|undefined|null,\n valueFormat: DateTimeValueFormat|undefined|null,\n stringFormat: string|undefined|null,): ValidatorFn\n{\n return (control: AbstractControl<DateTimeInputOutputValue<TDate>>): ValidationErrors|null =>\n {\n if(isBlank(control.value) || isBlank(maxValue))\n {\n return null;\n }\n\n if(maxValue instanceof DateTimeBase)\n {\n const value = getSingleDateTimeValue(maxValue.value);\n\n //no validation\n if(isBlank(value))\n {\n return null;\n }\n\n maxValue = value;\n }\n\n const parsedValue = parseDateTime(control.value, dateApi, valueFormat, stringFormat);\n\n if(!parsedValue)\n {\n return null;\n }\n\n const maxDateTime = dateApi.getValue(maxValue, stringFormat ?? undefined);\n\n if(!Array.isArray(parsedValue))\n {\n if(parsedValue.isValid() && !parsedValue.isBefore(maxDateTime.value))\n {\n return {\n 'datetimemax': maxDateTime.value\n };\n }\n }\n else\n {\n //TODO: support for ranges\n }\n\n return null;\n };\n}\n\n/**\n * Date time validator factory function, creates validator for checking validity of datetime min value\n * @param dateApi - Date api used for parsing date time\n * @param minValue - Minimal date time value that should be used for validation against\n * @param valueFormat - Optional required format\n * @param stringFormat - Optional string format of value\n */\nexport function datetimeMinValidator<TDate = unknown>(dateApi: DateApi<TDate>,\n minValue: DateValue|TDate|DateTimeBase<TDate>|undefined|null,\n valueFormat: DateTimeValueFormat|undefined|null,\n stringFormat: string|undefined|null,): ValidatorFn\n{\n return (control: AbstractControl<DateTimeInputOutputValue<TDate>>): ValidationErrors|null =>\n {\n if(isBlank(control.value) || isBlank(minValue))\n {\n return null;\n }\n\n if(minValue instanceof DateTimeBase)\n {\n const value = getSingleDateTimeValue(minValue.value);\n\n //no validation\n if(isBlank(value))\n {\n return null;\n }\n\n minValue = value;\n }\n\n const parsedValue = parseDateTime(control.value, dateApi, valueFormat, stringFormat);\n\n if(!parsedValue)\n {\n return null;\n }\n\n const minDateTime = dateApi.getValue(minValue, stringFormat ?? undefined);\n\n if(!Array.isArray(parsedValue))\n {\n if(parsedValue.isValid() && !parsedValue.isAfter(minDateTime.value))\n {\n return {\n 'datetimemin': minDateTime.value\n };\n }\n }\n else\n {\n //TODO: support for ranges\n }\n\n return null;\n };\n}\n"]}