@anglr/datetime 7.0.0-beta.20230815120707 → 7.0.0-beta.20230817115956

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
@@ -11,45 +11,51 @@ import * as i3 from "../../directives/calendarDayTemplate/calendarDayTemplate.di
11
11
  /**
12
12
  * Component used for displaying month calendar
13
13
  */
14
- export class MonthCalendarComponent {
15
- //######################### constructor #########################
16
- constructor(dateApi, formatProvider, eventParser) {
17
- this.dateApi = dateApi;
18
- this.formatProvider = formatProvider;
19
- this.eventParser = eventParser;
20
- //######################### protected properties - template bindings #########################
21
- /**
22
- * Aspect ratio for displayed calendar day cell
23
- */
24
- this.dayAspectRatioValue = CalendarDayAspectRatio.ThreeToTwo;
25
- /**
26
- * Data that represents calendar data
27
- */
28
- this.calendarData = {};
29
- /**
30
- * Array of weekday names
31
- */
32
- this.weekDayNames = [];
33
- //######################### public properties - inputs #########################
34
- /**
35
- * Indication that week number should be displayed
36
- */
37
- this.showWeekNumber = false;
38
- /**
39
- * Format for displaying week day names
40
- */
41
- this.weekDayName = MonthCalendarDayFormat.Short;
42
- /**
43
- * Array of events that should be displayed
44
- */
45
- this.events = [];
46
- }
14
+ class MonthCalendarComponent {
15
+ dateApi;
16
+ formatProvider;
17
+ eventParser;
18
+ //######################### protected properties - template bindings #########################
19
+ /**
20
+ * Aspect ratio for displayed calendar day cell
21
+ */
22
+ dayAspectRatioValue = CalendarDayAspectRatio.ThreeToTwo;
23
+ /**
24
+ * Data that represents calendar data
25
+ */
26
+ calendarData = {};
47
27
  /**
48
28
  * Calendar day template to be used
49
29
  */
50
30
  get calendarDayTemplate() {
51
31
  return this.customCalendarDayTemplate ?? this.defaultCalendarDayTemplate;
52
32
  }
33
+ /**
34
+ * Array of weekday names
35
+ */
36
+ weekDayNames = [];
37
+ //######################### protected properties - children #########################
38
+ /**
39
+ * Default calendar day template
40
+ */
41
+ defaultCalendarDayTemplate;
42
+ /**
43
+ * Custom calendar day template
44
+ */
45
+ customCalendarDayTemplate;
46
+ //######################### public properties - inputs #########################
47
+ /**
48
+ * Indication that week number should be displayed
49
+ */
50
+ showWeekNumber = false;
51
+ /**
52
+ * Date that should be displayed in month calendar
53
+ */
54
+ display;
55
+ /**
56
+ * Format for displaying week day names
57
+ */
58
+ weekDayName = MonthCalendarDayFormat.Short;
53
59
  /**
54
60
  * Aspect ratio for displayed calendar day cell
55
61
  */
@@ -63,6 +69,16 @@ export class MonthCalendarComponent {
63
69
  }
64
70
  this.dayAspectRatioValue = value;
65
71
  }
72
+ /**
73
+ * Array of events that should be displayed
74
+ */
75
+ events = [];
76
+ //######################### constructor #########################
77
+ constructor(dateApi, formatProvider, eventParser) {
78
+ this.dateApi = dateApi;
79
+ this.formatProvider = formatProvider;
80
+ this.eventParser = eventParser;
81
+ }
66
82
  //######################### public methods - implementation of OnInit #########################
67
83
  /**
68
84
  * Initialize component
@@ -124,7 +140,7 @@ export class MonthCalendarComponent {
124
140
  * Initialize date for calendar that should be displayed
125
141
  */
126
142
  initializeDisplayCalendar() {
127
- this.display ?? (this.display = this.dateApi.now().value);
143
+ this.display ??= this.dateApi.now().value;
128
144
  const workDate = this.dateApi.getValue(this.display);
129
145
  workDate.startOfMonth()
130
146
  .startOfWeek();
@@ -159,12 +175,22 @@ export class MonthCalendarComponent {
159
175
  }
160
176
  }
161
177
  }
178
+ //######################### ng language server #########################
179
+ /**
180
+ * Custom input type for `weekDayName` input
181
+ */
182
+ static ngAcceptInputType_weekDayName;
183
+ /**
184
+ * Custom input type for `dayAspectRatio` input
185
+ */
186
+ static ngAcceptInputType_dayAspectRatio;
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarComponent, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }, { token: i1.EventParser }], target: i0.ɵɵFactoryTarget.Component });
188
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: MonthCalendarComponent, selector: "month-calendar", inputs: { showWeekNumber: "showWeekNumber", display: "display", weekDayName: "weekDayName", dayAspectRatio: "dayAspectRatio", events: "events" }, providers: [
189
+ EventParser,
190
+ ], queries: [{ propertyName: "customCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "defaultCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n<div *ngFor=\"let dayName of weekDayNames\" [class.week-day-name]=\"dayName\">{{dayName}}</div>\n\n<ng-container *ngFor=\"let weekData of calendarData | keyvalue\">\n <div class=\"week-number\">\n <ng-container *ngIf=\"showWeekNumber\">{{weekData.key}}</ng-container>\n </div>\n \n <div *ngFor=\"let dayData of weekData.value\" [style.padding-bottom.%]=\"dayAspectRatioValue\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate; context: {$implicit: dayData}\"></ng-container></div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.CalendarDayTemplateDirective, selector: "[calendarDayTemplate]" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
162
191
  }
163
- MonthCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarComponent, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }, { token: i1.EventParser }], target: i0.ɵɵFactoryTarget.Component });
164
- MonthCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: MonthCalendarComponent, selector: "month-calendar", inputs: { showWeekNumber: "showWeekNumber", display: "display", weekDayName: "weekDayName", dayAspectRatio: "dayAspectRatio", events: "events" }, providers: [
165
- EventParser,
166
- ], queries: [{ propertyName: "customCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "defaultCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n<div *ngFor=\"let dayName of weekDayNames\" [class.week-day-name]=\"dayName\">{{dayName}}</div>\n\n<ng-container *ngFor=\"let weekData of calendarData | keyvalue\">\n <div class=\"week-number\">\n <ng-container *ngIf=\"showWeekNumber\">{{weekData.key}}</ng-container>\n </div>\n \n <div *ngFor=\"let dayData of weekData.value\" [style.padding-bottom.%]=\"dayAspectRatioValue\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate; context: {$implicit: dayData}\"></ng-container></div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.CalendarDayTemplateDirective, selector: "[calendarDayTemplate]" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarComponent, decorators: [{
192
+ export { MonthCalendarComponent };
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarComponent, decorators: [{
168
194
  type: Component,
169
195
  args: [{ selector: 'month-calendar', providers: [
170
196
  EventParser,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthCalendar.component.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.ts","../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAU,SAAS,EAAE,WAAW,EAAE,YAAY,EAA2B,MAAM,eAAe,CAAC;AACxJ,OAAO,EAAa,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAC,4BAA4B,EAA6B,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAC,sBAAsB,EAAE,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAC,WAAW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,4BAA4B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAC;gBAOhE,yBAAyB;sBADlC,YAAY;uBAAC,4BAA4B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAC;gBAStE,cAAc;sBADpB,KAAK;gBAOC,OAAO;sBADb,KAAK;gBAOC,WAAW;sBADjB,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAqBC,MAAM;sBADZ,KAAK","sourcesContent":["import {Component, ChangeDetectionStrategy, Input, Inject, OnInit, ViewChild, TemplateRef, ContentChild, OnChanges, SimpleChanges} from '@angular/core';\nimport {Dictionary, isString, nameof} from '@jscrpt/common';\n\nimport {CalendarDayData, EventData} from '../../interfaces';\nimport {CalendarDayTemplateDirective, CalendarDayTemplateContext} from '../../directives';\nimport {MonthCalendarDayFormat, CalendarDayAspectRatio} from '../../misc';\nimport {EventParser} from '../../services';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Component used for displaying month calendar\n */\n@Component(\n{\n selector: 'month-calendar',\n templateUrl: 'monthCalendar.component.html',\n providers:\n [\n EventParser,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthCalendarComponent<TDate = unknown, TEvent = unknown> implements OnInit, OnChanges\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Aspect ratio for displayed calendar day cell\n */\n protected dayAspectRatioValue: number = CalendarDayAspectRatio.ThreeToTwo;\n\n /**\n * Data that represents calendar data\n */\n protected calendarData: Dictionary<CalendarDayData<TDate, TEvent>[]> = {};\n\n /**\n * Calendar day template to be used\n */\n protected get calendarDayTemplate(): TemplateRef<CalendarDayTemplateContext>\n {\n return this.customCalendarDayTemplate ?? this.defaultCalendarDayTemplate;\n }\n\n /**\n * Array of weekday names\n */\n protected weekDayNames: string[] = [];\n\n //######################### protected properties - children #########################\n\n /**\n * Default calendar day template\n */\n @ViewChild(CalendarDayTemplateDirective, {static: true, read: TemplateRef})\n protected defaultCalendarDayTemplate!: TemplateRef<CalendarDayTemplateContext>;\n\n /**\n * Custom calendar day template\n */\n @ContentChild(CalendarDayTemplateDirective, {static: true, read: TemplateRef})\n protected customCalendarDayTemplate: TemplateRef<CalendarDayTemplateContext>|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Indication that week number should be displayed\n */\n @Input()\n public showWeekNumber: boolean = false;\n\n /**\n * Date that should be displayed in month calendar\n */\n @Input()\n public display: TDate|undefined|null;\n\n /**\n * Format for displaying week day names\n */\n @Input()\n public weekDayName: MonthCalendarDayFormat = MonthCalendarDayFormat.Short;\n\n /**\n * Aspect ratio for displayed calendar day cell\n */\n @Input()\n public get dayAspectRatio(): number\n {\n return this.dayAspectRatioValue;\n }\n public set dayAspectRatio(value: number)\n {\n if(isString(value))\n {\n this.dayAspectRatioValue = CalendarDayAspectRatio[value] as unknown as number;\n\n return;\n }\n\n this.dayAspectRatioValue = value;\n }\n\n /**\n * Array of events that should be displayed\n */\n @Input()\n public events: EventData<TDate, TEvent>[] = [];\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,\n protected eventParser: EventParser<TDate, TEvent>,)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.initWeekdayNames();\n this.initializeDisplayCalendar();\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<MonthCalendarComponent>('weekDayName') in changes)\n {\n this.initWeekdayNames();\n }\n\n if(nameof<MonthCalendarComponent>('display') in changes)\n {\n this.initializeDisplayCalendar();\n }\n\n if(nameof<MonthCalendarComponent>('events') in changes && !(nameof<MonthCalendarComponent>('display') in changes))\n {\n this.initAndAttachEventData();\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Initialize weekday names\n */\n protected initWeekdayNames(): void\n {\n this.weekDayNames = [];\n const dateApi = this.dateApi.now().startOfWeek();\n\n switch(this.weekDayName)\n {\n default:\n // case MonthCalendarDayFormat.None:\n {\n for(let x = 0; x < 7; x++)\n {\n this.weekDayNames.push('');\n }\n\n break;\n }\n case MonthCalendarDayFormat.Short:\n {\n for(let x = 0; x < 7; x++)\n {\n this.weekDayNames.push(dateApi.format(this.formatProvider.dayNameShort));\n dateApi.addDays(1);\n }\n\n break;\n }\n case MonthCalendarDayFormat.Full:\n {\n for(let x = 0; x < 7; x++)\n {\n this.weekDayNames.push(dateApi.format(this.formatProvider.dayName));\n dateApi.addDays(1);\n }\n\n break;\n }\n }\n }\n\n /**\n * Initialize date for calendar that should be displayed\n */\n protected initializeDisplayCalendar(): void\n {\n this.display ??= this.dateApi.now().value;\n\n const workDate = this.dateApi.getValue(this.display);\n\n workDate.startOfMonth()\n .startOfWeek();\n\n this.calendarData = {};\n\n do\n {\n const weekData: CalendarDayData<TDate, TEvent>[] = this.calendarData[workDate.format(this.formatProvider.week)] = [];\n\n for(let x = 0; x < 7; x++)\n {\n weekData.push(\n {\n date: workDate.value,\n day: workDate.dayOfMonth(),\n events: [],\n isCurrentMonth: workDate.isSameMonth(this.display),\n isWeekend: workDate.isWeekend(),\n week: +workDate.format(this.formatProvider.week),\n });\n\n workDate.addDays(1);\n }\n\n workDate.startOfWeek();\n }\n while(workDate.isSameMonth(this.display));\n\n this.initAndAttachEventData();\n }\n\n /**\n * Initialize and attaches event data\n */\n protected initAndAttachEventData(): void\n {\n const events = this.eventParser.getEventsPerDay(this.events);\n\n for(const week in this.calendarData)\n {\n const weekData = this.calendarData[week];\n\n for(const day of weekData)\n {\n const found = events.find(itm => this.dateApi.getValue(itm[0]).isSame(day.date));\n day.events = found?.[1] ?? [];\n }\n }\n }\n\n //######################### ng language server #########################\n\n /**\n * Custom input type for `weekDayName` input\n */\n public static ngAcceptInputType_weekDayName: keyof typeof MonthCalendarDayFormat;\n\n /**\n * Custom input type for `dayAspectRatio` input\n */\n public static ngAcceptInputType_dayAspectRatio: keyof typeof CalendarDayAspectRatio|number;\n}","<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n<div *ngFor=\"let dayName of weekDayNames\" [class.week-day-name]=\"dayName\">{{dayName}}</div>\n\n<ng-container *ngFor=\"let weekData of calendarData | keyvalue\">\n <div class=\"week-number\">\n <ng-container *ngIf=\"showWeekNumber\">{{weekData.key}}</ng-container>\n </div>\n \n <div *ngFor=\"let dayData of weekData.value\" [style.padding-bottom.%]=\"dayAspectRatioValue\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate; context: {$implicit: dayData}\"></ng-container></div>\n </div>\n</ng-container>\n"]}
@@ -3,7 +3,8 @@ import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Directive used for obtaining custom calendar day template
5
5
  */
6
- export class CalendarDayTemplateDirective {
6
+ class CalendarDayTemplateDirective {
7
+ template;
7
8
  //######################### constructor #########################
8
9
  constructor(template) {
9
10
  this.template = template;
@@ -15,10 +16,11 @@ export class CalendarDayTemplateDirective {
15
16
  static ngTemplateContextGuard(_dir, _ctx) {
16
17
  return true;
17
18
  }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: CalendarDayTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: CalendarDayTemplateDirective, selector: "[calendarDayTemplate]", ngImport: i0 });
18
21
  }
19
- CalendarDayTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarDayTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
- CalendarDayTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: CalendarDayTemplateDirective, selector: "[calendarDayTemplate]", ngImport: i0 });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarDayTemplateDirective, decorators: [{
22
+ export { CalendarDayTemplateDirective };
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: CalendarDayTemplateDirective, decorators: [{
22
24
  type: Directive,
23
25
  args: [{
24
26
  selector: '[calendarDayTemplate]'
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarDayTemplate.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AACH,MAIa,4BAA4B;IAGlB;IADnB,iEAAiE;IACjE,YAAmB,QAAgE;QAAhE,aAAQ,GAAR,QAAQ,CAAwD;IAEnF,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAkC,EAAE,IAAa;QAE3E,OAAO,IAAI,CAAC;IAChB,CAAC;uGAfQ,4BAA4B;2FAA5B,4BAA4B;;SAA5B,4BAA4B;2FAA5B,4BAA4B;kBAJxC,SAAS;mBACV;oBACI,QAAQ,EAAE,uBAAuB;iBACpC","sourcesContent":["import {Directive, TemplateRef} from '@angular/core';\n\nimport {CalendarDayTemplateContext} from './calendarDayTemplate.context';\n\n/**\n * Directive used for obtaining custom calendar day template\n */\n@Directive(\n{\n selector: '[calendarDayTemplate]'\n})\nexport class CalendarDayTemplateDirective<TDate = unknown, TEvent = unknown>\n{\n //######################### constructor #########################\n constructor(public template: TemplateRef<CalendarDayTemplateContext<TDate, TEvent>>)\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Allows typechecking for template\n */\n static ngTemplateContextGuard(_dir: CalendarDayTemplateDirective, _ctx: unknown): _ctx is CalendarDayTemplateContext\n {\n return true;\n }\n}"]}
@@ -6,14 +6,15 @@ import * as i0 from "@angular/core";
6
6
  /**
7
7
  * Module used for calendar displaying month
8
8
  */
9
- export class MonthCalendarModule {
9
+ class MonthCalendarModule {
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarModule, declarations: [MonthCalendarComponent,
12
+ CalendarDayTemplateDirective], imports: [CommonModule], exports: [MonthCalendarComponent,
13
+ CalendarDayTemplateDirective] });
14
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarModule, imports: [CommonModule] });
10
15
  }
11
- MonthCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
- MonthCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarModule, declarations: [MonthCalendarComponent,
13
- CalendarDayTemplateDirective], imports: [CommonModule], exports: [MonthCalendarComponent,
14
- CalendarDayTemplateDirective] });
15
- MonthCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarModule, imports: [CommonModule] });
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarModule, decorators: [{
16
+ export { MonthCalendarModule };
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthCalendarModule, decorators: [{
17
18
  type: NgModule,
18
19
  args: [{
19
20
  imports: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthCalendar.module.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/modules/monthCalendar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,sBAAsB,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;;AAE3D;;GAEG;AACH,MAiBa,mBAAmB;uGAAnB,mBAAmB;wGAAnB,mBAAmB,iBATxB,sBAAsB;YACtB,4BAA4B,aAL5B,YAAY,aASZ,sBAAsB;YACtB,4BAA4B;wGAGvB,mBAAmB,YAbxB,YAAY;;SAaP,mBAAmB;2FAAnB,mBAAmB;kBAjB/B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;qBACf;oBACD,YAAY,EACZ;wBACI,sBAAsB;wBACtB,4BAA4B;qBAC/B;oBACD,OAAO,EACP;wBACI,sBAAsB;wBACtB,4BAA4B;qBAC/B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {MonthCalendarComponent} from '../components';\nimport {CalendarDayTemplateDirective} from '../directives';\n\n/**\n * Module used for calendar displaying month\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n ],\n declarations:\n [\n MonthCalendarComponent,\n CalendarDayTemplateDirective,\n ],\n exports:\n [\n MonthCalendarComponent,\n CalendarDayTemplateDirective,\n ],\n})\nexport class MonthCalendarModule\n{\n}"]}
@@ -4,7 +4,8 @@ import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Service used for parsing events into events to requested period
6
6
  */
7
- export class EventParser {
7
+ class EventParser {
8
+ dateApi;
8
9
  //######################### constructor #########################
9
10
  constructor(dateApi) {
10
11
  this.dateApi = dateApi;
@@ -62,10 +63,11 @@ export class EventParser {
62
63
  }
63
64
  return result;
64
65
  }
66
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: EventParser, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Injectable });
67
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: EventParser });
65
68
  }
66
- EventParser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EventParser, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Injectable });
67
- EventParser.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EventParser });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EventParser, decorators: [{
69
+ export { EventParser };
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: EventParser, decorators: [{
69
71
  type: Injectable
70
72
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
71
73
  type: Inject,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventParser.service.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/services/eventParser/eventParser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;;AAIjD;;GAEG;AACH,MACa,WAAW;IAGoB;IADxC,iEAAiE;IACjE,YAAwC,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAE/D,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,eAAe,CAAC,MAAkC;QAErD,MAAM,WAAW,GA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C,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE;SAC3G;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;uGAhFQ,WAAW,kBAGA,QAAQ;2GAHnB,WAAW;;SAAX,WAAW;2FAAX,WAAW;kBADvB,UAAU;;0BAIM,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Injectable} from '@angular/core';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {CalendarEventDayMetadata, EventData, ɵEventData} from '../../interfaces';\n\n/**\n * Service used for parsing events into events to requested period\n */\n@Injectable()\nexport class EventParser<TDate = unknown, TEvent = unknown>\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets events parsed per day\n * @param events - Array of events to be parsed\n */\n public getEventsPerDay(events: EventData<TDate, TEvent>[]): [TDate, CalendarEventDayMetadata<TDate, TEvent>[]][]\n {\n const eventsLocal = events.map(itm =>\n {\n return <ɵEventData<TDate, TEvent>>\n {\n data: itm.data,\n dateFrom: itm.dateFrom,\n dateTo: itm.dateTo,\n dateApiFrom: this.dateApi.getValue(itm.dateFrom),\n dateApiTo: itm.dateTo ? this.dateApi.getValue(itm.dateTo) : null,\n };\n });\n\n eventsLocal.sort((a, b) =>\n {\n if(a.dateApiFrom.isAfter(b.dateApiFrom.value))\n {\n return 1;\n }\n\n if(a.dateApiFrom.isBefore(b.dateApiFrom.value))\n {\n return -1;\n }\n\n return 0;\n });\n\n const result: [TDate, CalendarEventDayMetadata<TDate, TEvent>[]][] = [];\n\n for(const event of eventsLocal)\n {\n const workDate = event.dateApiFrom.clone().startOfDay();\n const data: CalendarEventDayMetadata<TDate, TEvent>[] = result.find(itm => workDate.isSameDay(itm[0]))?.[1] ?? [];\n const index = data.length;\n\n do\n {\n let data: [TDate, CalendarEventDayMetadata<TDate, TEvent>[]]|undefined = result.find(itm => workDate.isSameDay(itm[0]));\n\n if(!data)\n {\n data = [workDate.value, []];\n result.push(data);\n }\n\n const evnts: CalendarEventDayMetadata<TDate, TEvent>[] = data[1];\n evnts[index] =\n {\n data: event.data,\n dateApiFrom: event.dateApiFrom,\n dateApiTo: event.dateApiTo,\n dateFrom: event.dateFrom,\n dateTo: event.dateTo,\n onGoingFrom: workDate.startOfDay().isAfter(event.dateApiFrom),\n allDay: (workDate.isSame(event.dateApiFrom) || workDate.isAfter(event.dateApiFrom)) &&\n !!event.dateApiTo && (workDate.endOfDay().isSame(event.dateApiTo) || workDate.isBefore(event.dateApiTo)),\n onGoingTo: !!event.dateApiTo && workDate.isBefore(event.dateApiTo),\n };\n \n workDate.addDays(1).startOfDay();\n }\n while(!!event.dateApiTo && (workDate.isBefore(event.dateApiTo) || workDate.isSameDay(event.dateApiTo)));\n }\n\n return result;\n }\n}"]}
@@ -0,0 +1,29 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { DateConvertPipe } from '../pipes/dateConvert.pipe';
3
+ import { DateFormatPipe } from '../pipes/dateFormat.pipe';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Module used for exporting date pipes
7
+ */
8
+ class DatePipesModule {
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DatePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: DatePipesModule, declarations: [DateFormatPipe,
11
+ DateConvertPipe], exports: [DateFormatPipe,
12
+ DateConvertPipe] });
13
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DatePipesModule });
14
+ }
15
+ export { DatePipesModule };
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DatePipesModule, decorators: [{
17
+ type: NgModule,
18
+ args: [{
19
+ declarations: [
20
+ DateFormatPipe,
21
+ DateConvertPipe,
22
+ ],
23
+ exports: [
24
+ DateFormatPipe,
25
+ DateConvertPipe,
26
+ ]
27
+ }]
28
+ }] });
29
+ //# sourceMappingURL=datePipes.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePipes.module.js","sourceRoot":"","sources":["../../../src/modules/datePipes.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;;AAExD;;GAEG;AACH,MAaa,eAAe;uGAAf,eAAe;wGAAf,eAAe,iBATpB,cAAc;YACd,eAAe,aAIf,cAAc;YACd,eAAe;wGAGV,eAAe;;SAAf,eAAe;2FAAf,eAAe;kBAb3B,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,cAAc;wBACd,eAAe;qBAClB;oBACD,OAAO,EACP;wBACI,cAAc;wBACd,eAAe;qBAClB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateConvertPipe} from '../pipes/dateConvert.pipe';\nimport {DateFormatPipe} from '../pipes/dateFormat.pipe';\n\n/**\n * Module used for exporting date pipes\n */\n@NgModule(\n{\n declarations:\n [\n DateFormatPipe,\n DateConvertPipe,\n ],\n exports:\n [\n DateFormatPipe,\n DateConvertPipe,\n ]\n})\nexport class DatePipesModule\n{\n}"]}
@@ -10,42 +10,56 @@ import * as i0 from "@angular/core";
10
10
  /**
11
11
  * Directive that holds shared data for date time, like formats, restrictions
12
12
  */
13
- export class DateTimeSADirective {
14
- constructor() {
15
- //######################### protected properties #########################
16
- /**
17
- * Subject used for emitting changes in max date time value
18
- */
19
- this.maxDateTimeChangesSubject = new Subject();
20
- /**
21
- * Subject used for emitting changes in min date time value
22
- */
23
- this.minDateTimeChangesSubject = new Subject();
24
- /**
25
- * Subject used for emitting changes in custom format value
26
- */
27
- this.customFormatChangesSubject = new Subject();
28
- /**
29
- * Date time value format which is being worked with in this date time
30
- */
31
- this.ɵvalueFormat = DateTimeValueFormat.DateInstance;
32
- /**
33
- * Format of string representation of date
34
- */
35
- this.ɵformat = 'date';
36
- /**
37
- * Date api instance, used for date time manipulation
38
- */
39
- this.dateApi = inject(DATE_API);
40
- /**
41
- * Provider for available formats
42
- */
43
- this.formatProvider = inject(FORMAT_PROVIDER);
44
- /**
45
- * Custom format string representation of date
46
- */
47
- this.ɵcustomFormat = this.dateApi.getFormat(this.formatProvider[this.ɵformat]);
48
- }
13
+ class DateTimeSADirective {
14
+ //######################### protected properties #########################
15
+ /**
16
+ * Subject used for emitting changes in max date time value
17
+ */
18
+ maxDateTimeChangesSubject = new Subject();
19
+ /**
20
+ * Subject used for emitting changes in min date time value
21
+ */
22
+ minDateTimeChangesSubject = new Subject();
23
+ /**
24
+ * Subject used for emitting changes in custom format value
25
+ */
26
+ customFormatChangesSubject = new Subject();
27
+ /**
28
+ * Subscription for max date instance value changes
29
+ */
30
+ maxDateInstanceChange;
31
+ /**
32
+ * Subscription for min date instance value changes
33
+ */
34
+ minDateInstanceChange;
35
+ /**
36
+ * Max allowed value of date time
37
+ */
38
+ ɵmaxDateTime;
39
+ /**
40
+ * Min allowed value of date time
41
+ */
42
+ ɵminDateTime;
43
+ /**
44
+ * Date time value format which is being worked with in this date time
45
+ */
46
+ ɵvalueFormat = DateTimeValueFormat.DateInstance;
47
+ /**
48
+ * Format of string representation of date
49
+ */
50
+ ɵformat = 'date';
51
+ /**
52
+ * Date api instance, used for date time manipulation
53
+ */
54
+ dateApi = inject(DATE_API);
55
+ /**
56
+ * Provider for available formats
57
+ */
58
+ formatProvider = inject(FORMAT_PROVIDER);
59
+ /**
60
+ * Custom format string representation of date
61
+ */
62
+ ɵcustomFormat = this.dateApi.getFormat(this.formatProvider[this.ɵformat]);
49
63
  //######################### public properties #########################
50
64
  /**
51
65
  * Occurs when there are changes in max date time value
@@ -113,7 +127,7 @@ export class DateTimeSADirective {
113
127
  return;
114
128
  }
115
129
  let val = value;
116
- if (value instanceof (DateTimeBase)) {
130
+ if (value instanceof DateTimeBase) {
117
131
  this.maxDateInstanceChange = value.valueChange.subscribe(() => {
118
132
  const val = getSingleDateTimeValue(value.value);
119
133
  if (isBlank(val)) {
@@ -145,7 +159,7 @@ export class DateTimeSADirective {
145
159
  return;
146
160
  }
147
161
  let val = value;
148
- if (value instanceof (DateTimeBase)) {
162
+ if (value instanceof DateTimeBase) {
149
163
  this.minDateInstanceChange = value.valueChange.subscribe(() => {
150
164
  const val = getSingleDateTimeValue(value.value);
151
165
  if (isBlank(val)) {
@@ -216,9 +230,22 @@ export class DateTimeSADirective {
216
230
  */
217
231
  onMinDateTimeChange() {
218
232
  }
233
+ //######################### ng language server #########################
234
+ /**
235
+ * Custom input type for `valueFormat` input
236
+ */
237
+ static ngAcceptInputType_valueFormat;
238
+ /**
239
+ * Custom input type for `maxDateTime` input
240
+ */
241
+ static ngAcceptInputType_maxDateTime;
242
+ /**
243
+ * Custom input type for `minDateTime` input
244
+ */
245
+ static ngAcceptInputType_minDateTime;
246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
247
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: DateTimeSADirective, isStandalone: true, selector: "[dateTime]", inputs: { valueFormat: "valueFormat", format: "format", customFormat: "customFormat", maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, ngImport: i0 });
219
248
  }
220
- DateTimeSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
221
- DateTimeSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimeSADirective, isStandalone: true, selector: "[dateTime]", inputs: { valueFormat: "valueFormat", format: "format", customFormat: "customFormat", maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, ngImport: i0 });
222
249
  __decorate([
223
250
  BindThis,
224
251
  __metadata("design:type", Function),
@@ -231,7 +258,8 @@ __decorate([
231
258
  __metadata("design:paramtypes", [Object]),
232
259
  __metadata("design:returntype", void 0)
233
260
  ], DateTimeSADirective.prototype, "maxDateSet", null);
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeSADirective, decorators: [{
261
+ export { DateTimeSADirective };
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeSADirective, decorators: [{
235
263
  type: Directive,
236
264
  args: [{
237
265
  selector: '[dateTime]',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTime.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTime/dateTime.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAClE,OAAO,EAAU,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAa,OAAO,EAAe,MAAM,MAAM,CAAC;AAGvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAC,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AACH,MAKa,mBAAmB;IAE5B,0EAA0E;IAE1E;;OAEG;IACO,yBAAyB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEzE;;OAEG;IACO,yBAAyB,GAAkB,IAAI,OAAO,EAAQ,C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U3D,mBAAmB;2FAAnB,mBAAmB;;AA2QlB;IADT,QAAQ;;;;qDAMR;AAOS;IADT,QAAQ;;;;qDAMR;SA5RQ,mBAAmB;2FAAnB,mBAAmB;kBAL/B,SAAS;mBACV;oBACI,QAAQ,EAAE,YAAY;oBACtB,UAAU,EAAE,IAAI;iBACnB;8BAiGc,WAAW;sBADrB,KAAK;gBAqBK,MAAM;sBADhB,KAAK;gBAeK,YAAY;sBADtB,KAAK;gBAeK,WAAW;sBADrB,KAAK;gBAsDK,WAAW;sBADrB,KAAK;gBAuEI,UAAU,MAYV,UAAU","sourcesContent":["import {Directive, inject, Input, OnDestroy} from '@angular/core';\nimport {Action1, BindThis, isBlank, isString} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {FormatProvider} from '../../../../interfaces';\nimport {DateTimeValueFormat} from '../../../../misc/enums';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateTimeInputOutputValue} from '../../../../misc/types';\nimport {getSingleDateTimeValue} from '../../../../misc/utils';\nimport {DateApi, DateValue} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Directive that holds shared data for date time, like formats, restrictions\n */\n@Directive(\n{\n selector: '[dateTime]',\n standalone: true,\n})\nexport class DateTimeSADirective<TDate = unknown> implements OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subject used for emitting changes in max date time value\n */\n protected maxDateTimeChangesSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting changes in min date time value\n */\n protected minDateTimeChangesSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting changes in custom format value\n */\n protected customFormatChangesSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subscription for max date instance value changes\n */\n protected maxDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Subscription for min date instance value changes\n */\n protected minDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Max allowed value of date time\n */\n protected ɵmaxDateTime: TDate|undefined|null;\n\n /**\n * Min allowed value of date time\n */\n protected ɵminDateTime: TDate|undefined|null;\n\n /**\n * Date time value format which is being worked with in this date time\n */\n protected ɵvalueFormat: DateTimeValueFormat = DateTimeValueFormat.DateInstance;\n\n /**\n * Format of string representation of date\n */\n protected ɵformat: keyof FormatProvider = 'date';\n\n /**\n * Date api instance, used for date time manipulation\n */\n protected dateApi: DateApi<TDate> = inject(DATE_API) as DateApi<TDate>;\n\n /**\n * Provider for available formats\n */\n protected formatProvider: FormatProvider = inject(FORMAT_PROVIDER);\n\n /**\n * Custom format string representation of date\n */\n protected ɵcustomFormat: string = this.dateApi.getFormat(this.formatProvider[this.ɵformat]);\n\n //######################### public properties #########################\n\n /**\n * Occurs when there are changes in max date time value\n */\n public get maxDateTimeChanges(): Observable<void>\n {\n return this.maxDateTimeChangesSubject.asObservable();\n }\n\n /**\n * Occurs when there are changes in min date time value\n */\n public get minDateTimeChanges(): Observable<void>\n {\n return this.minDateTimeChangesSubject.asObservable();\n }\n\n /**\n * Occurs when there are changes in custom format value\n */\n public get customFormatChanges(): Observable<void>\n {\n return this.customFormatChangesSubject.asObservable();\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets date time value format which is being worked with in this date time\n */\n @Input()\n public get valueFormat(): DateTimeValueFormat\n {\n return this.ɵvalueFormat;\n }\n public set valueFormat(value: DateTimeValueFormat)\n {\n if(isString(value))\n {\n this.ɵvalueFormat = DateTimeValueFormat[value] as unknown as DateTimeValueFormat;\n\n return;\n }\n\n this.ɵvalueFormat = value;\n }\n\n /**\n * Gets or sets format of string representation of date\n */\n @Input()\n public get format(): keyof FormatProvider\n {\n return this.ɵformat;\n }\n public set format(value: keyof FormatProvider)\n {\n this.ɵformat = value;\n this.customFormat = this.dateApi.getFormat(this.formatProvider[value]);\n }\n\n /**\n * Gets or sets custom format string representation of date\n */\n @Input()\n public get customFormat(): string\n {\n return this.ɵcustomFormat;\n }\n public set customFormat(value: string)\n {\n this.ɵcustomFormat = value;\n this.customFormatChangesSubject.next();\n }\n\n /**\n * Gets or sets max allowed date for date time\n */\n @Input()\n public get maxDateTime(): TDate|undefined|null\n {\n return this.ɵmaxDateTime;\n }\n public set maxDateTime(value: TDate|undefined|null)\n {\n this.maxDateInstanceChange?.unsubscribe();\n this.maxDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.maxDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase)\n {\n this.maxDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.maxDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n val = v;\n }\n \n this.setMinMaxValue(val, this.maxDateSet);\n }\n\n /**\n * Gets or sets min allowed date for date time\n */\n @Input()\n public get minDateTime(): TDate|undefined|null\n {\n return this.ɵminDateTime;\n }\n public set minDateTime(value: TDate|undefined|null)\n {\n this.minDateInstanceChange?.unsubscribe();\n this.minDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.minDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase)\n {\n this.minDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.minDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.minDateSet(null);\n\n return;\n }\n\n val = v;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.maxDateInstanceChange?.unsubscribe();\n this.maxDateInstanceChange = null;\n\n this.minDateInstanceChange?.unsubscribe();\n this.minDateInstanceChange = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets min date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected minDateSet(value: TDate|undefined|null): void\n {\n this.ɵminDateTime = value;\n this.minDateTimeChangesSubject.next();\n this.onMinDateTimeChange();\n }\n\n /**\n * Sets max date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected maxDateSet(value: TDate|undefined|null): void\n {\n this.ɵmaxDateTime = value;\n this.maxDateTimeChangesSubject.next();\n this.onMaxDateTimeChange();\n }\n\n /**\n * Sets min or max date time value\n * @param value - Value to be set\n * @param setter - Action used for setting value\n */\n protected setMinMaxValue(value: DateValue|TDate, setter: Action1<TDate|undefined|null>): void\n {\n const val = this.dateApi.getValue(value, this.customFormat);\n\n if(val.isValid())\n {\n setter(val.value);\n }\n else\n {\n setter(null);\n }\n }\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `valueFormat` input\n */\n public static ngAcceptInputType_valueFormat: keyof typeof DateTimeValueFormat|DateTimeValueFormat;\n\n /**\n * Custom input type for `maxDateTime` input\n */\n public static ngAcceptInputType_maxDateTime: DateValue|DateTimeBase;\n\n /**\n * Custom input type for `minDateTime` input\n */\n public static ngAcceptInputType_minDateTime: DateValue|DateTimeBase;\n}"]}
@@ -5,25 +5,20 @@ import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Base class for date time directives, contains basic shared data
7
7
  */
8
- export class DateTimeBase {
9
- //######################### constructor #########################
10
- constructor() {
11
- //######################### protected properties #########################
12
- /**
13
- * Subscriptions created during initialization
14
- */
15
- this.initSubscriptions = new Subscription();
16
- /**
17
- * Instance of date time shared data, like formats and restrictions
18
- */
19
- this.dateTimeData = inject((DateTimeSADirective));
20
- /**
21
- * @inheritdoc
22
- */
23
- this.valueChange = new EventEmitter();
24
- this.initSubscriptions.add(this.dateTimeData.maxDateTimeChanges.subscribe(() => this.onMaxDateTimeChange()));
25
- this.initSubscriptions.add(this.dateTimeData.minDateTimeChanges.subscribe(() => this.onMinDateTimeChange()));
26
- }
8
+ class DateTimeBase {
9
+ //######################### protected properties #########################
10
+ /**
11
+ * Subscriptions created during initialization
12
+ */
13
+ initSubscriptions = new Subscription();
14
+ /**
15
+ * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue
16
+ */
17
+ ɵValue;
18
+ /**
19
+ * Instance of date time shared data, like formats and restrictions
20
+ */
21
+ dateTimeData = inject((DateTimeSADirective));
27
22
  //######################### public properties - implementation of DateTimeInputValue #########################
28
23
  /**
29
24
  * @inheritdoc
@@ -34,6 +29,15 @@ export class DateTimeBase {
34
29
  set value(value) {
35
30
  this.ɵValue = value;
36
31
  }
32
+ /**
33
+ * @inheritdoc
34
+ */
35
+ valueChange = new EventEmitter();
36
+ //######################### constructor #########################
37
+ constructor() {
38
+ this.initSubscriptions.add(this.dateTimeData.maxDateTimeChanges.subscribe(() => this.onMaxDateTimeChange()));
39
+ this.initSubscriptions.add(this.dateTimeData.minDateTimeChanges.subscribe(() => this.onMinDateTimeChange()));
40
+ }
37
41
  //######################### public methods - implementation of OnDestroy #########################
38
42
  /**
39
43
  * Called when component is destroyed
@@ -52,10 +56,11 @@ export class DateTimeBase {
52
56
  */
53
57
  onMinDateTimeChange() {
54
58
  }
59
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
60
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: DateTimeBase, ngImport: i0 });
55
61
  }
56
- DateTimeBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
57
- DateTimeBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimeBase, ngImport: i0 });
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeBase, decorators: [{
62
+ export { DateTimeBase };
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimeBase, decorators: [{
59
64
  type: Directive
60
65
  }], ctorParameters: function () { return []; } });
61
66
  //# sourceMappingURL=dateTimeBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimeBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/dateTimeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAIlC,OAAO,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;;AAElE;;GAEG;AACH,MACa,YAAY;IAErB,0EAA0E;IAE1E;;OAEG;IACO,iBAAiB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAE/D;;OAEG;IACO,MAAM,CAAiD;IAEjE;;OAEG;IACO,YAAY,GAA+B,MAAM,CAAC,CAAA,mBAA0B,CAAA,CAAC,CAAC;IAExF,8GAA8G;IAE9G;;OAEG;IACH,IAAW,KAAK;QAEZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IACD,IAAW,KAAK,CAAC,KAAqD;QAElE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,WAAW,GAAuB,IAAI,YAAY,EAAQ,CAAC;IAElE,iEAAiE;IACjE;QAEI,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;QAC7G,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACjH,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,mBAAmB;IAE7B,CAAC;IAED;;OAEG;IACO,mBAAmB;IAE7B,CAAC;uGArEQ,YAAY;2FAAZ,YAAY;;SAAZ,YAAY;2FAAZ,YAAY;kBADxB,SAAS","sourcesContent":["import {Directive, EventEmitter, inject, OnDestroy} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputValue} from '../../../interfaces';\nimport {DateTimeInputOutputValue} from '../../../misc/types';\nimport {DateTimeSADirective} from './dateTime/dateTime.directive';\n\n/**\n * Base class for date time directives, contains basic shared data\n */\n@Directive()\nexport class DateTimeBase<TDate = unknown> implements DateTimeInputValue<TDate>, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n /**\n * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue\n */\n protected ɵValue: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Instance of date time shared data, like formats and restrictions\n */\n protected dateTimeData: DateTimeSADirective<TDate> = inject(DateTimeSADirective<TDate>);\n\n //######################### public properties - implementation of DateTimeInputValue #########################\n\n /**\n * @inheritdoc\n */\n public get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n this.ɵValue = value;\n }\n\n /**\n * @inheritdoc\n */\n public valueChange: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor()\n {\n this.initSubscriptions.add(this.dateTimeData.maxDateTimeChanges.subscribe(() => this.onMaxDateTimeChange()));\n this.initSubscriptions.add(this.dateTimeData.minDateTimeChanges.subscribe(() => this.onMinDateTimeChange()));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.initSubscriptions.unsubscribe();\n }\n\n //######################### protected methods #########################\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n}\n"]}