@anglr/datetime 6.0.0-beta.20221222085135 → 6.0.0-beta.20221223105933

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 (596) hide show
  1. package/changelog.md +157 -1
  2. package/date-fns/src/services/dateFnsDateApi.service.d.ts +26 -14
  3. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  4. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +37 -6
  5. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  6. package/es2015/moment/src/services/momentDateApi.service.js +35 -3
  7. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -1
  8. package/es2015/src/directives/index.js +3 -0
  9. package/es2015/src/directives/index.js.map +1 -1
  10. package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +37 -0
  11. package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -0
  12. package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +137 -0
  13. package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -0
  14. package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +29 -0
  15. package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -0
  16. package/es2015/src/directives/withTime/withTime.directive.js +5 -5
  17. package/es2015/src/directives/withTime/withTime.directive.js.map +1 -1
  18. package/es2015/src/directives/withToday/withToday.directive.js +5 -5
  19. package/es2015/src/directives/withToday/withToday.directive.js.map +1 -1
  20. package/es2015/src/index.js +0 -8
  21. package/es2015/src/index.js.map +1 -1
  22. package/es2015/src/interfaces/dateTime/datetime.interface.js.map +1 -1
  23. package/es2015/src/legacy/picker/components/picker/picker.component.animations.js +93 -70
  24. package/es2015/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -1
  25. package/es2015/src/legacy/selector/components/inputDateTime/inputDateTime.component.js +487 -436
  26. package/es2015/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -1
  27. package/es2015/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +366 -324
  28. package/es2015/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -1
  29. package/es2015/src/misc/validators.js +0 -57
  30. package/es2015/src/misc/validators.js.map +1 -1
  31. package/es2015/src/modules/calendar/components/index.js +2 -0
  32. package/es2015/src/modules/calendar/components/index.js.map +1 -0
  33. package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +198 -0
  34. package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -0
  35. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +2 -0
  36. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +1 -0
  37. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +27 -0
  38. package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -0
  39. package/es2015/src/modules/calendar/directives/index.js +3 -0
  40. package/es2015/src/modules/calendar/directives/index.js.map +1 -0
  41. package/es2015/src/modules/calendar/index.js +7 -0
  42. package/es2015/src/modules/calendar/index.js.map +1 -0
  43. package/es2015/src/modules/calendar/interfaces/calendarDayData.interface.js +2 -0
  44. package/es2015/src/modules/calendar/interfaces/calendarDayData.interface.js.map +1 -0
  45. package/es2015/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +2 -0
  46. package/es2015/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +1 -0
  47. package/es2015/src/modules/calendar/interfaces/eventData.interface.js +2 -0
  48. package/es2015/src/modules/calendar/interfaces/eventData.interface.js.map +1 -0
  49. package/es2015/src/modules/calendar/interfaces/index.js +4 -0
  50. package/es2015/src/modules/calendar/interfaces/index.js.map +1 -0
  51. package/es2015/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +27 -0
  52. package/es2015/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +1 -0
  53. package/es2015/src/modules/calendar/misc/enums/index.js +3 -0
  54. package/es2015/src/modules/calendar/misc/enums/index.js.map +1 -0
  55. package/es2015/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +19 -0
  56. package/es2015/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +1 -0
  57. package/es2015/src/modules/calendar/misc/index.js +2 -0
  58. package/es2015/src/modules/calendar/misc/index.js.map +1 -0
  59. package/es2015/src/modules/calendar/modules/index.js +2 -0
  60. package/es2015/src/modules/calendar/modules/index.js.map +1 -0
  61. package/es2015/src/modules/calendar/modules/monthCalendar.module.js +32 -0
  62. package/es2015/src/modules/calendar/modules/monthCalendar.module.js.map +1 -0
  63. package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js +75 -0
  64. package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js.map +1 -0
  65. package/es2015/src/modules/calendar/services/index.js +2 -0
  66. package/es2015/src/modules/calendar/services/index.js.map +1 -0
  67. package/es2015/src/modules/datePipes.module.js +4 -4
  68. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js +8 -7
  69. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -1
  70. package/es2015/src/modules/dateTime/directives/dateTimeBase.js +5 -5
  71. package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +1 -1
  72. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +7 -6
  73. package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -1
  74. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +11 -9
  75. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  76. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +7 -6
  77. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  78. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +7 -6
  79. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  80. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +7 -6
  81. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  82. package/es2015/src/modules/dateTime/modules/dateTime.module.js +28 -28
  83. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -1
  84. package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -1
  85. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +5 -5
  86. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  87. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +3 -3
  88. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -1
  89. package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +3 -3
  90. package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -1
  91. package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +6 -7
  92. package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  93. package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -1
  94. package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +3 -3
  95. package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -1
  96. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +8 -7
  97. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -1
  98. package/es2015/src/modules/dateTimePicker/directives/index.js +3 -0
  99. package/es2015/src/modules/dateTimePicker/directives/index.js.map +1 -1
  100. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +222 -0
  101. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  102. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +2 -0
  103. package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  104. package/es2015/src/{legacy/picker → modules/dateTimePicker}/directives/loopScrollData/loopScrollData.directive.js +6 -5
  105. package/es2015/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  106. package/es2015/src/modules/dateTimePicker/interfaces/index.js +1 -0
  107. package/es2015/src/modules/dateTimePicker/interfaces/index.js.map +1 -1
  108. package/es2015/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +2 -0
  109. package/es2015/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +1 -0
  110. package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js +10 -9
  111. package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -1
  112. package/es2015/src/modules/index.js +1 -0
  113. package/es2015/src/modules/index.js.map +1 -1
  114. package/es2015/src/pipes/dateConvert.pipe.js +3 -3
  115. package/es2015/src/pipes/dateConvert.pipe.js.map +1 -1
  116. package/es2015/src/pipes/dateFormat.pipe.js +3 -3
  117. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
  118. package/es2015/src/services/dateApi/dateApi.interface.js.map +1 -1
  119. package/es2015/src/services/datePositionParser/datePositionParser.service.js +5 -3
  120. package/es2015/src/services/datePositionParser/datePositionParser.service.js.map +1 -1
  121. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +3 -3
  122. package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -1
  123. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js +3 -3
  124. package/es2015/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -1
  125. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +37 -6
  126. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  127. package/es2020/moment/src/services/momentDateApi.service.js +35 -3
  128. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -1
  129. package/es2020/src/directives/index.js +3 -0
  130. package/es2020/src/directives/index.js.map +1 -1
  131. package/es2020/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +37 -0
  132. package/es2020/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -0
  133. package/es2020/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +136 -0
  134. package/es2020/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -0
  135. package/es2020/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +29 -0
  136. package/es2020/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -0
  137. package/es2020/src/directives/withTime/withTime.directive.js +5 -5
  138. package/es2020/src/directives/withTime/withTime.directive.js.map +1 -1
  139. package/es2020/src/directives/withToday/withToday.directive.js +5 -5
  140. package/es2020/src/directives/withToday/withToday.directive.js.map +1 -1
  141. package/es2020/src/index.js +0 -8
  142. package/es2020/src/index.js.map +1 -1
  143. package/es2020/src/interfaces/dateTime/datetime.interface.js.map +1 -1
  144. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js +93 -70
  145. package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -1
  146. package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js +487 -432
  147. package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -1
  148. package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +366 -321
  149. package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -1
  150. package/es2020/src/misc/validators.js +0 -57
  151. package/es2020/src/misc/validators.js.map +1 -1
  152. package/es2020/src/modules/calendar/components/index.js +2 -0
  153. package/es2020/src/modules/calendar/components/index.js.map +1 -0
  154. package/es2020/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +195 -0
  155. package/es2020/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -0
  156. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +2 -0
  157. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +1 -0
  158. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +27 -0
  159. package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -0
  160. package/es2020/src/modules/calendar/directives/index.js +3 -0
  161. package/es2020/src/modules/calendar/directives/index.js.map +1 -0
  162. package/es2020/src/modules/calendar/index.js +7 -0
  163. package/es2020/src/modules/calendar/index.js.map +1 -0
  164. package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js +2 -0
  165. package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js.map +1 -0
  166. package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +2 -0
  167. package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +1 -0
  168. package/es2020/src/modules/calendar/interfaces/eventData.interface.js +2 -0
  169. package/es2020/src/modules/calendar/interfaces/eventData.interface.js.map +1 -0
  170. package/es2020/src/modules/calendar/interfaces/index.js +4 -0
  171. package/es2020/src/modules/calendar/interfaces/index.js.map +1 -0
  172. package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +27 -0
  173. package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +1 -0
  174. package/es2020/src/modules/calendar/misc/enums/index.js +3 -0
  175. package/es2020/src/modules/calendar/misc/enums/index.js.map +1 -0
  176. package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +19 -0
  177. package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +1 -0
  178. package/es2020/src/modules/calendar/misc/index.js +2 -0
  179. package/es2020/src/modules/calendar/misc/index.js.map +1 -0
  180. package/es2020/src/modules/calendar/modules/index.js +2 -0
  181. package/es2020/src/modules/calendar/modules/index.js.map +1 -0
  182. package/es2020/src/modules/calendar/modules/monthCalendar.module.js +32 -0
  183. package/es2020/src/modules/calendar/modules/monthCalendar.module.js.map +1 -0
  184. package/es2020/src/modules/calendar/services/eventParser/eventParser.service.js +74 -0
  185. package/es2020/src/modules/calendar/services/eventParser/eventParser.service.js.map +1 -0
  186. package/es2020/src/modules/calendar/services/index.js +2 -0
  187. package/es2020/src/modules/calendar/services/index.js.map +1 -0
  188. package/es2020/src/modules/datePipes.module.js +4 -4
  189. package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js +8 -7
  190. package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -1
  191. package/es2020/src/modules/dateTime/directives/dateTimeBase.js +5 -5
  192. package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +1 -1
  193. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +7 -6
  194. package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -1
  195. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +11 -9
  196. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  197. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +7 -6
  198. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  199. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +7 -6
  200. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  201. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +7 -6
  202. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  203. package/es2020/src/modules/dateTime/modules/dateTime.module.js +28 -28
  204. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -1
  205. package/es2020/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -1
  206. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +5 -5
  207. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  208. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +3 -3
  209. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -1
  210. package/es2020/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +3 -3
  211. package/es2020/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -1
  212. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +6 -7
  213. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  214. package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -1
  215. package/es2020/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +3 -3
  216. package/es2020/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -1
  217. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +9 -8
  218. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -1
  219. package/es2020/src/modules/dateTimePicker/directives/index.js +3 -0
  220. package/es2020/src/modules/dateTimePicker/directives/index.js.map +1 -1
  221. package/es2020/src/{legacy/picker → modules/dateTimePicker}/directives/loopScroll/loopScroll.directive.js +65 -56
  222. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -0
  223. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +2 -0
  224. package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +1 -0
  225. package/es2020/src/{legacy/picker → modules/dateTimePicker}/directives/loopScrollData/loopScrollData.directive.js +6 -5
  226. package/es2020/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
  227. package/es2020/src/modules/dateTimePicker/interfaces/index.js +1 -0
  228. package/es2020/src/modules/dateTimePicker/interfaces/index.js.map +1 -1
  229. package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +2 -0
  230. package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +1 -0
  231. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js +10 -9
  232. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -1
  233. package/es2020/src/modules/index.js +1 -0
  234. package/es2020/src/modules/index.js.map +1 -1
  235. package/es2020/src/pipes/dateConvert.pipe.js +3 -3
  236. package/es2020/src/pipes/dateConvert.pipe.js.map +1 -1
  237. package/es2020/src/pipes/dateFormat.pipe.js +3 -3
  238. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
  239. package/es2020/src/services/dateApi/dateApi.interface.js.map +1 -1
  240. package/es2020/src/services/datePositionParser/datePositionParser.service.js +5 -3
  241. package/es2020/src/services/datePositionParser/datePositionParser.service.js.map +1 -1
  242. package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +3 -3
  243. package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -1
  244. package/es2020/src/services/dateValueProvider/dateValueProvider.service.js +3 -3
  245. package/es2020/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -1
  246. package/moment/src/services/momentDateApi.service.d.ts +25 -12
  247. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  248. package/package.json +27 -36
  249. package/src/directives/index.d.ts +3 -0
  250. package/src/directives/index.d.ts.map +1 -1
  251. package/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.d.ts +12 -0
  252. package/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.d.ts.map +1 -0
  253. package/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.d.ts +42 -0
  254. package/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.d.ts.map +1 -0
  255. package/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.d.ts +11 -0
  256. package/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.d.ts.map +1 -0
  257. package/src/directives/withTime/withTime.directive.d.ts +3 -3
  258. package/src/directives/withTime/withTime.directive.d.ts.map +1 -1
  259. package/src/directives/withToday/withToday.directive.d.ts +3 -3
  260. package/src/directives/withToday/withToday.directive.d.ts.map +1 -1
  261. package/src/index.d.ts +0 -8
  262. package/src/index.d.ts.map +1 -1
  263. package/src/interfaces/dateTime/datetime.interface.d.ts +1 -22
  264. package/src/interfaces/dateTime/datetime.interface.d.ts.map +1 -1
  265. package/src/legacy/picker/components/picker/picker.component.animations.d.ts +0 -4
  266. package/src/legacy/picker/components/picker/picker.component.animations.d.ts.map +1 -1
  267. package/src/legacy/selector/components/inputDateTime/inputDateTime.component.d.ts +0 -185
  268. package/src/legacy/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
  269. package/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +0 -169
  270. package/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
  271. package/src/misc/validators.d.ts +0 -23
  272. package/src/misc/validators.d.ts.map +1 -1
  273. package/src/modules/calendar/components/index.d.ts +2 -0
  274. package/src/modules/calendar/components/index.d.ts.map +1 -0
  275. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts +94 -0
  276. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts.map +1 -0
  277. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.html +15 -0
  278. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.d.ts +11 -0
  279. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.d.ts.map +1 -0
  280. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.d.ts +17 -0
  281. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.d.ts.map +1 -0
  282. package/src/modules/calendar/directives/index.d.ts +3 -0
  283. package/src/modules/calendar/directives/index.d.ts.map +1 -0
  284. package/src/modules/calendar/index.d.ts +7 -0
  285. package/src/modules/calendar/index.d.ts.map +1 -0
  286. package/src/modules/calendar/interfaces/calendarDayData.interface.d.ts +31 -0
  287. package/src/modules/calendar/interfaces/calendarDayData.interface.d.ts.map +1 -0
  288. package/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.d.ts +19 -0
  289. package/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.d.ts.map +1 -0
  290. package/src/modules/calendar/interfaces/eventData.interface.d.ts +37 -0
  291. package/src/modules/calendar/interfaces/eventData.interface.d.ts.map +1 -0
  292. package/src/modules/calendar/interfaces/index.d.ts +4 -0
  293. package/src/modules/calendar/interfaces/index.d.ts.map +1 -0
  294. package/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.d.ts +26 -0
  295. package/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.d.ts.map +1 -0
  296. package/src/modules/calendar/misc/enums/index.d.ts +3 -0
  297. package/src/modules/calendar/misc/enums/index.d.ts.map +1 -0
  298. package/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.d.ts +18 -0
  299. package/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.d.ts.map +1 -0
  300. package/src/modules/calendar/misc/index.d.ts +2 -0
  301. package/src/modules/calendar/misc/index.d.ts.map +1 -0
  302. package/src/modules/calendar/modules/index.d.ts +2 -0
  303. package/src/modules/calendar/modules/index.d.ts.map +1 -0
  304. package/src/modules/calendar/modules/monthCalendar.module.d.ts +13 -0
  305. package/src/modules/calendar/modules/monthCalendar.module.d.ts.map +1 -0
  306. package/src/modules/calendar/services/eventParser/eventParser.service.d.ts +18 -0
  307. package/src/modules/calendar/services/eventParser/eventParser.service.d.ts.map +1 -0
  308. package/src/modules/calendar/services/index.d.ts +2 -0
  309. package/src/modules/calendar/services/index.d.ts.map +1 -0
  310. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts +3 -3
  311. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts.map +1 -1
  312. package/src/modules/dateTime/directives/dateTimeBase.d.ts +3 -3
  313. package/src/modules/dateTime/directives/dateTimeBase.d.ts.map +1 -1
  314. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +3 -3
  315. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -1
  316. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +3 -3
  317. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -1
  318. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts +3 -3
  319. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -1
  320. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts +3 -3
  321. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -1
  322. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +3 -3
  323. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -1
  324. package/src/modules/dateTime/modules/dateTime.module.d.ts +1 -1
  325. package/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.d.ts +1 -2
  326. package/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.d.ts.map +1 -1
  327. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +3 -3
  328. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts.map +1 -1
  329. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts +2 -3
  330. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  331. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.d.ts +2 -3
  332. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  333. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts +6 -7
  334. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  335. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.d.ts +1 -1
  336. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +1 -1
  337. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.d.ts +2 -3
  338. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  339. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts +3 -3
  340. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -1
  341. package/src/modules/dateTimePicker/directives/index.d.ts +3 -0
  342. package/src/modules/dateTimePicker/directives/index.d.ts.map +1 -1
  343. package/src/{legacy/picker → modules/dateTimePicker}/directives/loopScroll/loopScroll.directive.d.ts +18 -18
  344. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts.map +1 -0
  345. package/src/{legacy/picker → modules/dateTimePicker}/directives/loopScroll/loopScroll.interface.d.ts +1 -1
  346. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.d.ts.map +1 -0
  347. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts +20 -0
  348. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts.map +1 -0
  349. package/src/modules/dateTimePicker/interfaces/index.d.ts +1 -0
  350. package/src/modules/dateTimePicker/interfaces/index.d.ts.map +1 -1
  351. package/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.d.ts +62 -0
  352. package/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.d.ts.map +1 -0
  353. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts +1 -1
  354. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts.map +1 -1
  355. package/src/modules/index.d.ts +1 -0
  356. package/src/modules/index.d.ts.map +1 -1
  357. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  358. package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
  359. package/src/pipes/dateFormat.pipe.d.ts +1 -1
  360. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  361. package/src/services/dateApi/dateApi.interface.d.ts +25 -12
  362. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -1
  363. package/src/services/datePositionParser/datePositionParser.service.d.ts.map +1 -1
  364. package/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts +2 -2
  365. package/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.d.ts.map +1 -1
  366. package/src/services/dateValueProvider/dateValueProvider.service.d.ts +1 -1
  367. package/src/services/dateValueProvider/dateValueProvider.service.d.ts.map +1 -1
  368. package/styles/components/_month-calendar.scss +68 -0
  369. package/styles/core/_mixins.scss +4 -0
  370. package/styles/core/_theme.scss +11 -0
  371. package/version.bak +1 -1
  372. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js +0 -14
  373. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  374. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js +0 -2
  375. package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  376. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js +0 -214
  377. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  378. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js +0 -2
  379. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  380. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js +0 -116
  381. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  382. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js +0 -2
  383. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  384. package/es2015/src/legacy/picker/components/picker/picker.component.js +0 -242
  385. package/es2015/src/legacy/picker/components/picker/picker.component.js.map +0 -1
  386. package/es2015/src/legacy/picker/components/pickerBase.component.js +0 -138
  387. package/es2015/src/legacy/picker/components/pickerBase.component.js.map +0 -1
  388. package/es2015/src/legacy/picker/components/pickerImplBase.component.js +0 -145
  389. package/es2015/src/legacy/picker/components/pickerImplBase.component.js.map +0 -1
  390. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js +0 -148
  391. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  392. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js +0 -341
  393. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  394. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js +0 -2
  395. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  396. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js +0 -128
  397. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  398. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js +0 -2
  399. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  400. package/es2015/src/legacy/picker/directives/index.js +0 -4
  401. package/es2015/src/legacy/picker/directives/index.js.map +0 -1
  402. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.directive.js +0 -213
  403. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  404. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.interface.js +0 -3
  405. package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  406. package/es2015/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  407. package/es2015/src/legacy/picker/interfaces.js +0 -6
  408. package/es2015/src/legacy/picker/interfaces.js.map +0 -1
  409. package/es2015/src/legacy/picker/misc/datetimePicker.interface.js +0 -2
  410. package/es2015/src/legacy/picker/misc/datetimePicker.interface.js.map +0 -1
  411. package/es2015/src/legacy/picker/misc/tokens.js +0 -6
  412. package/es2015/src/legacy/picker/misc/tokens.js.map +0 -1
  413. package/es2015/src/legacy/picker/modules/picker.module.js +0 -65
  414. package/es2015/src/legacy/picker/modules/picker.module.js.map +0 -1
  415. package/es2015/src/legacy/picker/types.js +0 -10
  416. package/es2015/src/legacy/picker/types.js.map +0 -1
  417. package/es2015/src/legacy/selector/components/selector/selector.component.animations.js +0 -15
  418. package/es2015/src/legacy/selector/components/selector/selector.component.animations.js.map +0 -1
  419. package/es2015/src/legacy/selector/components/selector/selector.component.js +0 -357
  420. package/es2015/src/legacy/selector/components/selector/selector.component.js.map +0 -1
  421. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +0 -134
  422. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  423. package/es2015/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -51
  424. package/es2015/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  425. package/es2015/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -51
  426. package/es2015/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  427. package/es2015/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -47
  428. package/es2015/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  429. package/es2015/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -119
  430. package/es2015/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  431. package/es2015/src/legacy/selector/interfaces.js +0 -2
  432. package/es2015/src/legacy/selector/interfaces.js.map +0 -1
  433. package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js +0 -2
  434. package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js.map +0 -1
  435. package/es2015/src/legacy/selector/misc/tokens.js +0 -6
  436. package/es2015/src/legacy/selector/misc/tokens.js.map +0 -1
  437. package/es2015/src/legacy/selector/modules/basicSelector.module.js +0 -20
  438. package/es2015/src/legacy/selector/modules/basicSelector.module.js.map +0 -1
  439. package/es2015/src/legacy/selector/modules/selector.module.js +0 -63
  440. package/es2015/src/legacy/selector/modules/selector.module.js.map +0 -1
  441. package/es2015/src/legacy/selector/types.js +0 -11
  442. package/es2015/src/legacy/selector/types.js.map +0 -1
  443. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js +0 -14
  444. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
  445. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js +0 -2
  446. package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
  447. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js +0 -214
  448. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +0 -1
  449. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js +0 -2
  450. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
  451. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js +0 -116
  452. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +0 -1
  453. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js +0 -2
  454. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
  455. package/es2020/src/legacy/picker/components/picker/picker.component.js +0 -237
  456. package/es2020/src/legacy/picker/components/picker/picker.component.js.map +0 -1
  457. package/es2020/src/legacy/picker/components/pickerBase.component.js +0 -138
  458. package/es2020/src/legacy/picker/components/pickerBase.component.js.map +0 -1
  459. package/es2020/src/legacy/picker/components/pickerImplBase.component.js +0 -145
  460. package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +0 -1
  461. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js +0 -142
  462. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
  463. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js +0 -341
  464. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
  465. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js +0 -2
  466. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
  467. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js +0 -128
  468. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +0 -1
  469. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js +0 -2
  470. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
  471. package/es2020/src/legacy/picker/directives/index.js +0 -4
  472. package/es2020/src/legacy/picker/directives/index.js.map +0 -1
  473. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
  474. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js +0 -3
  475. package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
  476. package/es2020/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
  477. package/es2020/src/legacy/picker/interfaces.js +0 -6
  478. package/es2020/src/legacy/picker/interfaces.js.map +0 -1
  479. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js +0 -2
  480. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +0 -1
  481. package/es2020/src/legacy/picker/misc/tokens.js +0 -6
  482. package/es2020/src/legacy/picker/misc/tokens.js.map +0 -1
  483. package/es2020/src/legacy/picker/modules/picker.module.js +0 -65
  484. package/es2020/src/legacy/picker/modules/picker.module.js.map +0 -1
  485. package/es2020/src/legacy/picker/types.js +0 -10
  486. package/es2020/src/legacy/picker/types.js.map +0 -1
  487. package/es2020/src/legacy/selector/components/selector/selector.component.animations.js +0 -15
  488. package/es2020/src/legacy/selector/components/selector/selector.component.animations.js.map +0 -1
  489. package/es2020/src/legacy/selector/components/selector/selector.component.js +0 -345
  490. package/es2020/src/legacy/selector/components/selector/selector.component.js.map +0 -1
  491. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +0 -133
  492. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
  493. package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -51
  494. package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
  495. package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -51
  496. package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
  497. package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -47
  498. package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
  499. package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -118
  500. package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
  501. package/es2020/src/legacy/selector/interfaces.js +0 -2
  502. package/es2020/src/legacy/selector/interfaces.js.map +0 -1
  503. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js +0 -2
  504. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +0 -1
  505. package/es2020/src/legacy/selector/misc/tokens.js +0 -6
  506. package/es2020/src/legacy/selector/misc/tokens.js.map +0 -1
  507. package/es2020/src/legacy/selector/modules/basicSelector.module.js +0 -20
  508. package/es2020/src/legacy/selector/modules/basicSelector.module.js.map +0 -1
  509. package/es2020/src/legacy/selector/modules/selector.module.js +0 -63
  510. package/es2020/src/legacy/selector/modules/selector.module.js.map +0 -1
  511. package/es2020/src/legacy/selector/types.js +0 -11
  512. package/es2020/src/legacy/selector/types.js.map +0 -1
  513. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.css +0 -0
  514. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.d.ts +0 -9
  515. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.d.ts.map +0 -1
  516. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.html +0 -0
  517. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.d.ts +0 -6
  518. package/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.d.ts.map +0 -1
  519. package/src/legacy/picker/components/dayPicker/dayPicker.component.css +0 -22
  520. package/src/legacy/picker/components/dayPicker/dayPicker.component.d.ts +0 -80
  521. package/src/legacy/picker/components/dayPicker/dayPicker.component.d.ts.map +0 -1
  522. package/src/legacy/picker/components/dayPicker/dayPicker.component.html +0 -21
  523. package/src/legacy/picker/components/dayPicker/dayPicker.interfaces.d.ts +0 -11
  524. package/src/legacy/picker/components/dayPicker/dayPicker.interfaces.d.ts.map +0 -1
  525. package/src/legacy/picker/components/monthPicker/monthPicker.component.css +0 -4
  526. package/src/legacy/picker/components/monthPicker/monthPicker.component.d.ts +0 -53
  527. package/src/legacy/picker/components/monthPicker/monthPicker.component.d.ts.map +0 -1
  528. package/src/legacy/picker/components/monthPicker/monthPicker.component.html +0 -13
  529. package/src/legacy/picker/components/monthPicker/monthPicker.interfaces.d.ts +0 -7
  530. package/src/legacy/picker/components/monthPicker/monthPicker.interfaces.d.ts.map +0 -1
  531. package/src/legacy/picker/components/picker/picker.component.css +0 -4
  532. package/src/legacy/picker/components/picker/picker.component.d.ts +0 -105
  533. package/src/legacy/picker/components/picker/picker.component.d.ts.map +0 -1
  534. package/src/legacy/picker/components/picker/picker.component.html +0 -3
  535. package/src/legacy/picker/components/pickerBase.component.d.ts +0 -80
  536. package/src/legacy/picker/components/pickerBase.component.d.ts.map +0 -1
  537. package/src/legacy/picker/components/pickerImplBase.component.d.ts +0 -128
  538. package/src/legacy/picker/components/pickerImplBase.component.d.ts.map +0 -1
  539. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.css +0 -64
  540. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.d.ts +0 -71
  541. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +0 -1
  542. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.html +0 -67
  543. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.d.ts +0 -4
  544. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +0 -1
  545. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.d.ts +0 -6
  546. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.d.ts.map +0 -1
  547. package/src/legacy/picker/components/yearPicker/yearPicker.component.css +0 -4
  548. package/src/legacy/picker/components/yearPicker/yearPicker.component.d.ts +0 -58
  549. package/src/legacy/picker/components/yearPicker/yearPicker.component.d.ts.map +0 -1
  550. package/src/legacy/picker/components/yearPicker/yearPicker.component.html +0 -13
  551. package/src/legacy/picker/components/yearPicker/yearPicker.interfaces.d.ts +0 -7
  552. package/src/legacy/picker/components/yearPicker/yearPicker.interfaces.d.ts.map +0 -1
  553. package/src/legacy/picker/directives/index.d.ts +0 -4
  554. package/src/legacy/picker/directives/index.d.ts.map +0 -1
  555. package/src/legacy/picker/directives/loopScroll/loopScroll.directive.d.ts.map +0 -1
  556. package/src/legacy/picker/directives/loopScroll/loopScroll.interface.d.ts.map +0 -1
  557. package/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.d.ts +0 -20
  558. package/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.d.ts.map +0 -1
  559. package/src/legacy/picker/interfaces.d.ts +0 -6
  560. package/src/legacy/picker/interfaces.d.ts.map +0 -1
  561. package/src/legacy/picker/misc/datetimePicker.interface.d.ts +0 -193
  562. package/src/legacy/picker/misc/datetimePicker.interface.d.ts.map +0 -1
  563. package/src/legacy/picker/misc/tokens.d.ts +0 -7
  564. package/src/legacy/picker/misc/tokens.d.ts.map +0 -1
  565. package/src/legacy/picker/modules/picker.module.d.ts +0 -20
  566. package/src/legacy/picker/modules/picker.module.d.ts.map +0 -1
  567. package/src/legacy/picker/types.d.ts +0 -10
  568. package/src/legacy/picker/types.d.ts.map +0 -1
  569. package/src/legacy/selector/components/selector/selector.component.animations.d.ts +0 -5
  570. package/src/legacy/selector/components/selector/selector.component.animations.d.ts.map +0 -1
  571. package/src/legacy/selector/components/selector/selector.component.css +0 -11
  572. package/src/legacy/selector/components/selector/selector.component.d.ts +0 -157
  573. package/src/legacy/selector/components/selector/selector.component.d.ts.map +0 -1
  574. package/src/legacy/selector/components/selector/selector.component.html +0 -10
  575. package/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +0 -80
  576. package/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +0 -1
  577. package/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +0 -23
  578. package/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +0 -1
  579. package/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +0 -23
  580. package/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +0 -1
  581. package/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts +0 -22
  582. package/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +0 -1
  583. package/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +0 -54
  584. package/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +0 -1
  585. package/src/legacy/selector/interfaces.d.ts +0 -2
  586. package/src/legacy/selector/interfaces.d.ts.map +0 -1
  587. package/src/legacy/selector/misc/datetimeSelector.interface.d.ts +0 -96
  588. package/src/legacy/selector/misc/datetimeSelector.interface.d.ts.map +0 -1
  589. package/src/legacy/selector/misc/tokens.d.ts +0 -7
  590. package/src/legacy/selector/misc/tokens.d.ts.map +0 -1
  591. package/src/legacy/selector/modules/basicSelector.module.d.ts +0 -11
  592. package/src/legacy/selector/modules/basicSelector.module.d.ts.map +0 -1
  593. package/src/legacy/selector/modules/selector.module.d.ts +0 -20
  594. package/src/legacy/selector/modules/selector.module.d.ts.map +0 -1
  595. package/src/legacy/selector/types.d.ts +0 -11
  596. package/src/legacy/selector/types.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"simpleInputDateTime.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.ts","../../../../../../src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB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AAC;QAErC,IAAI,EAAE,CAAC;QAEP,8BAA8B;QAC9B,IAAG,IAAI,CAAC,qBAAqB,EAAE,EAC/B;YACI,MAAA,IAAI,CAAC,aAAa,0CAAE,aAAa,EAAE,CAAC;YAEpC,OAAO;SACV;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,KAAK;;QAEX,IAAG,IAAI,CAAC,QAAQ,EAChB;YACI,IAAI,CAAC,YAAY,GAAG,MAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,IAAI,CAAC;SACxE;IACL,CAAC;;iIAzZQ,oCAAoC,kBAyKzB,QAAQ;qHAzKnB,oCAAoC,4LCnBjD,2TAQyC;2FDW5B,oCAAoC;kBAPhD,SAAS;+BAEI,iCAAiC,mBAG1B,uBAAuB,CAAC,MAAM;;0BA2KlC,MAAM;2BAAC,QAAQ;4GA5BrB,YAAY;sBADlB,SAAS;uBAAC,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject, DateValueProvider} from '../../../../services';\nimport {DateTimeSelector} from '../../misc/datetimeSelector.interface';\n\n/**\n * Component used as datetime selector with simple input\n */\n@Component(\n{\n selector: 'simple-input-date-time-selector',\n templateUrl: 'simpleInputDateTime.component.html',\n styleUrls: ['simpleInputDateTime.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SimpleInputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate>\n{\n //######################### protected fields #########################\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector is touched by user\n */\n protected _touched: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n protected _pickerRequest: Subject<boolean> = new Subject<boolean>();\n\n /**\n * Currently used format for displaying data\n */\n protected _format: string = '';\n\n /**\n * Current value representation as date api wrapper\n */\n protected _dateApiValue: null|DateApiObject<TDate> = null;\n\n /**\n * Indication whether is current value valid value\n */\n protected _isValid: boolean = true;\n\n /**\n * Minimal possible value that can be picked\n */\n protected _minValue: TDate|null = null;\n\n /**\n * Maximal possible value that can be picked\n */\n protected _maxValue: TDate|null = null;\n\n //######################### public properties - implementation of DateTimeSelector #########################\n\n /**\n * Gets or sets currently used format for displaying data\n */\n public get format(): string\n {\n return this._format;\n }\n public set format(value: string)\n {\n if(isPresent(value))\n {\n value = this._dateApi.getFormat(value);\n }\n\n this._format = value;\n }\n\n /**\n * Gets or sets placeholder that is displayed when there is no value selected\n */\n public placeholder: string|null = null;\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n if(!this._dateApiValue || !this._isValid)\n {\n return null;\n }\n\n return this._valueProvider.getValue(this._dateApiValue.value, this._format);\n }\n\n /**\n * Gets formatted value\n */\n public get formattedValue(): string|null\n {\n if(!this._isValid)\n {\n return null;\n }\n\n return this.currentValue;\n }\n\n /**\n * Gets indication whether is current value valid\n */\n public get valid(): boolean\n {\n return this._isValid;\n }\n\n /**\n * Occurs when value changes\n */\n public get valueChange(): Observable<void>\n {\n return this._valueChange.asObservable();\n }\n\n /**\n * Occurs when selector is touched by user\n */\n public get touched(): Observable<void>\n {\n return this._touched.asObservable();\n }\n\n /**\n * Occurs when selector requires picker to be displayed\n */\n public get pickerRequest(): Observable<boolean>\n {\n return this._pickerRequest.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Indication whether is input disabled\n * @internal\n */\n public disabled: boolean = false;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of html input element\n * @internal\n */\n @ViewChild('input', {static: true})\n public inputElement?: ElementRef<HTMLInputElement>;\n\n //######################### protected properties #########################\n\n /**\n * Gets or sets string representation current of value\n */\n protected get currentValue(): string|null\n {\n return this.input.value || null;\n }\n protected set currentValue(value: string|null)\n {\n if(this.input)\n {\n this.input.value = value ?? '';\n }\n }\n\n /**\n * Gets input element used for handling date time value\n */\n protected get input(): HTMLInputElement\n {\n return this.inputElement!.nativeElement;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _valueProvider: DateValueProvider<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of DateTimeSelector #########################\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n public setMinValue(value: TDate|null): void\n {\n this._minValue = value;\n }\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n public setMaxValue(value: TDate|null): void\n {\n this._maxValue = value;\n }\n\n /**\n * Sets value of datetime selector\n * @param value - Value to be set to this selector\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n if(value?.from)\n {\n this._dateApiValue = this._dateApi.getValue(value?.from, this._format);\n this._isValid = this._dateApiValue.isValid();\n\n this._show();\n }\n else\n {\n this._clearValue();\n }\n }\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n public setDisabled(disabled: boolean = true): void\n {\n this.disabled = disabled;\n }\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n public invalidateVisuals(): void\n {\n this._changeDetector.detectChanges();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles gaining of focus\n * @internal\n */\n public handleFocus(): void\n {\n this._pickerRequest.next(true);\n\n //no value\n if(!this._dateApiValue)\n {\n this._dateApiValue = this._dateApi.now();\n this._isValid = this._dateApiValue.isValid();\n\n if(this._minMaxConstraintTest())\n {\n this._clearValue();\n }\n else\n {\n this._valueChange.next();\n }\n }\n\n if(!this._isValid)\n {\n return;\n }\n\n this._show();\n }\n\n /**\n * Handles blur on input\n * @internal\n */\n public handleBlur(): void\n {\n this._pickerRequest.next(false);\n }\n\n /**\n * Handles user input\n * @internal\n */\n public handleInput(): void\n {\n //empty value\n if(!this.currentValue)\n {\n this._clearValue();\n this._valueChange.next();\n\n return;\n }\n\n this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);\n this._isValid = this._dateApiValue.isValid();\n this._valueChange.next();\n }\n\n /**\n * Handles click event inside of input\n * @internal\n */\n public handleClick(): void\n {\n this._pickerRequest.next(true);\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n * @param input - Html input element that holds current value and selection\n * @internal\n */\n public handleKeyboard(event: KeyboardEvent): void\n {\n if(!this._dateApiValue?.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(() => event.key == 'ArrowLeft' ? this._dateApiValue!.subtractDays(1) : this._dateApiValue!.addDays(1));\n this._show();\n\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n\n this._withMinMaxConstraint(() => event.key == 'ArrowUp' ? this._dateApiValue!.subtractWeeks(1) : this._dateApiValue!.addWeeks(1));\n this._show();\n\n break;\n }\n case 'Escape':\n {\n this._pickerRequest.next(false);\n\n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this._pickerRequest.next(true);\n }\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Clears current value\n */\n protected _clearValue(): void\n {\n this._dateApiValue = null;\n this._isValid = true;\n this.currentValue = null;\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n */\n protected _minMaxConstraintTest(): boolean\n {\n return (!!this._minValue && this._dateApiValue!.isBefore(this._minValue)) ||\n (!!this._maxValue && this._dateApiValue!.isAfter(this._maxValue));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param code - Code that should be executed which can change current value\n */\n protected _withMinMaxConstraint(code: () => void): void\n {\n this._dateApiValue!.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this._minMaxConstraintTest())\n {\n this._dateApiValue?.resetOriginal();\n\n return;\n }\n\n this._valueChange.next();\n }\n\n /**\n * Shows current value in input\n */\n protected _show(): void\n {\n if(this._isValid)\n {\n this.currentValue = this._dateApiValue?.format(this._format) ?? null;\n }\n }\n}","<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">"]}
1
+ {"version":3,"file":"simpleInputDateTime.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.ts"],"names":[],"mappings":";AAAA,sHAAsH;AACtH,4CAA4C;AAC5C,4CAA4C;AAE5C,oFAAoF;AACpF,oDAAoD;AACpD,kFAAkF;AAClF,0EAA0E;AAE1E,MAAM;AACN,2DAA2D;AAC3D,MAAM;AACN,cAAc;AACd,IAAI;AACJ,mDAAmD;AACnD,yDAAyD;AACzD,wDAAwD;AACxD,sDAAsD;AACtD,KAAK;AACL,oGAAoG;AACpG,IAAI;AACJ,6EAA6E;AAE7E,UAAU;AACV,mCAAmC;AACnC,UAAU;AACV,mEAAmE;AAEnE,UAAU;AACV,iDAAiD;AACjD,UAAU;AACV,+DAA+D;AAE/D,UAAU;AACV,wEAAwE;AACxE,UAAU;AACV,2EAA2E;AAE3E,UAAU;AACV,mDAAmD;AACnD,UAAU;AACV,sCAAsC;AAEtC,UAAU;AACV,0DAA0D;AAC1D,UAAU;AACV,iEAAiE;AAEjE,UAAU;AACV,yDAAyD;AACzD,UAAU;AACV,0CAA0C;AAE1C,UAAU;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AAY;AACZ,QAAQ;AAER,8EAA8E;AAE9E,UAAU;AACV,8BAA8B;AAC9B,UAAU;AACV,oCAAoC;AACpC,QAAQ;AACR,qCAAqC;AACrC,gCAAgC;AAChC,oCAAoC;AACpC,QAAQ;AAER,UAAU;AACV,8FAA8F;AAC9F,UAAU;AACV,iDAAiD;AACjD,QAAQ;AACR,uFAAuF;AACvF,oFAAoF;AACpF,QAAQ;AAER,UAAU;AACV,oEAAoE;AACpE,mFAAmF;AACnF,UAAU;AACV,8DAA8D;AAC9D,QAAQ;AACR,gDAAgD;AAEhD,kBAAkB;AAElB,yCAAyC;AACzC,2CAA2C;AAC3C,YAAY;AACZ,mDAAmD;AAEnD,sBAAsB;AACtB,YAAY;AAEZ,oCAAoC;AACpC,QAAQ;AAER,UAAU;AACV,sCAAsC;AACtC,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR,4BAA4B;AAC5B,YAAY;AACZ,oFAAoF;AACpF,YAAY;AACZ,QAAQ;AACR,IAAI","sourcesContent":["// import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';\n// import {isPresent} from '@jscrpt/common';\n// import {Observable, Subject} from 'rxjs';\n\n// import {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\n// import {DATE_API} from '../../../../misc/tokens';\n// import {DateApi, DateApiObject, DateValueProvider} from '../../../../services';\n// import {DateTimeSelector} from '../../misc/datetimeSelector.interface';\n\n// /**\n// * Component used as datetime selector with simple input\n// */\n// @Component(\n// {\n// selector: 'simple-input-date-time-selector',\n// templateUrl: 'simpleInputDateTime.component.html',\n// styleUrls: ['simpleInputDateTime.component.css'],\n// changeDetection: ChangeDetectionStrategy.OnPush\n// })\n// export class SimpleInputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate>\n// {\n// //######################### protected fields #########################\n\n// /**\n// * Occurs when value changes\n// */\n// protected _valueChange: Subject<void> = new Subject<void>();\n\n// /**\n// * Occurs when selector is touched by user\n// */\n// protected _touched: Subject<void> = new Subject<void>();\n\n// /**\n// * Occurs when selector requires picker to be displayed or hidden\n// */\n// protected _pickerRequest: Subject<boolean> = new Subject<boolean>();\n\n// /**\n// * Currently used format for displaying data\n// */\n// protected _format: string = '';\n\n// /**\n// * Current value representation as date api wrapper\n// */\n// protected _dateApiValue: null|DateApiObject<TDate> = null;\n\n// /**\n// * Indication whether is current value valid value\n// */\n// protected _isValid: boolean = true;\n\n// /**\n// * Minimal possible value that can be picked\n// */\n// protected _minValue: TDate|null = null;\n\n// /**\n// * Maximal possible value that can be picked\n// */\n// protected _maxValue: TDate|null = null;\n\n// //######################### public properties - implementation of DateTimeSelector #########################\n\n// /**\n// * Gets or sets currently used format for displaying data\n// */\n// public get format(): string\n// {\n// return this._format;\n// }\n// public set format(value: string)\n// {\n// if(isPresent(value))\n// {\n// value = this._dateApi.getFormat(value);\n// }\n\n// this._format = value;\n// }\n\n// /**\n// * Gets or sets placeholder that is displayed when there is no value selected\n// */\n// public placeholder: string|null = null;\n\n// /**\n// * Gets current value of datetime\n// */\n// public get value(): DateTimeValue<TDate>|null\n// {\n// if(!this._dateApiValue || !this._isValid)\n// {\n// return null;\n// }\n\n// return this._valueProvider.getValue(this._dateApiValue.value, this._format);\n// }\n\n// /**\n// * Gets formatted value\n// */\n// public get formattedValue(): string|null\n// {\n// if(!this._isValid)\n// {\n// return null;\n// }\n\n// return this.currentValue;\n// }\n\n// /**\n// * Gets indication whether is current value valid\n// */\n// public get valid(): boolean\n// {\n// return this._isValid;\n// }\n\n// /**\n// * Occurs when value changes\n// */\n// public get valueChange(): Observable<void>\n// {\n// return this._valueChange.asObservable();\n// }\n\n// /**\n// * Occurs when selector is touched by user\n// */\n// public get touched(): Observable<void>\n// {\n// return this._touched.asObservable();\n// }\n\n// /**\n// * Occurs when selector requires picker to be displayed\n// */\n// public get pickerRequest(): Observable<boolean>\n// {\n// return this._pickerRequest.asObservable();\n// }\n\n// //######################### public properties - template bindings #########################\n\n// /**\n// * Indication whether is input disabled\n// * @internal\n// */\n// public disabled: boolean = false;\n\n// //######################### public properties - children #########################\n\n// /**\n// * Instance of html input element\n// * @internal\n// */\n// @ViewChild('input', {static: true})\n// public inputElement?: ElementRef<HTMLInputElement>;\n\n// //######################### protected properties #########################\n\n// /**\n// * Gets or sets string representation current of value\n// */\n// protected get currentValue(): string|null\n// {\n// return this.input.value || null;\n// }\n// protected set currentValue(value: string|null)\n// {\n// if(this.input)\n// {\n// this.input.value = value ?? '';\n// }\n// }\n\n// /**\n// * Gets input element used for handling date time value\n// */\n// protected get input(): HTMLInputElement\n// {\n// return this.inputElement!.nativeElement;\n// }\n\n// //######################### constructor #########################\n// constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n// protected _valueProvider: DateValueProvider<TDate>,\n// protected _changeDetector: ChangeDetectorRef)\n// {\n// }\n\n// //######################### public methods - implementation of DateTimeSelector #########################\n\n// /**\n// * Sets minimal possible value for picker, that can be picked\n// * @param value - Minimal possible value that can be picked\n// */\n// public setMinValue(value: TDate|null): void\n// {\n// this._minValue = value;\n// }\n\n// /**\n// * Sets maximal possible value for picker, that can be picked\n// * @param value - Maximal possible value that can be picked\n// */\n// public setMaxValue(value: TDate|null): void\n// {\n// this._maxValue = value;\n// }\n\n// /**\n// * Sets value of datetime selector\n// * @param value - Value to be set to this selector\n// */\n// public setValue(value: DateTimeValue<TDate>|null): void\n// {\n// if(value?.from)\n// {\n// this._dateApiValue = this._dateApi.getValue(value?.from, this._format);\n// this._isValid = this._dateApiValue.isValid();\n\n// this._show();\n// }\n// else\n// {\n// this._clearValue();\n// }\n// }\n\n// /**\n// * Sets as 'control' disabled\n// * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n// */\n// public setDisabled(disabled: boolean = true): void\n// {\n// this.disabled = disabled;\n// }\n\n// /**\n// * Explicitly runs invalidation of content (change detection)\n// */\n// public invalidateVisuals(): void\n// {\n// this._changeDetector.detectChanges();\n// }\n\n// //######################### public methods - template bindings #########################\n\n// /**\n// * Handles gaining of focus\n// * @internal\n// */\n// public handleFocus(): void\n// {\n// this._pickerRequest.next(true);\n\n// //no value\n// if(!this._dateApiValue)\n// {\n// this._dateApiValue = this._dateApi.now();\n// this._isValid = this._dateApiValue.isValid();\n\n// if(this._minMaxConstraintTest())\n// {\n// this._clearValue();\n// }\n// else\n// {\n// this._valueChange.next();\n// }\n// }\n\n// if(!this._isValid)\n// {\n// return;\n// }\n\n// this._show();\n// }\n\n// /**\n// * Handles blur on input\n// * @internal\n// */\n// public handleBlur(): void\n// {\n// this._pickerRequest.next(false);\n// }\n\n// /**\n// * Handles user input\n// * @internal\n// */\n// public handleInput(): void\n// {\n// //empty value\n// if(!this.currentValue)\n// {\n// this._clearValue();\n// this._valueChange.next();\n\n// return;\n// }\n\n// this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);\n// this._isValid = this._dateApiValue.isValid();\n// this._valueChange.next();\n// }\n\n// /**\n// * Handles click event inside of input\n// * @internal\n// */\n// public handleClick(): void\n// {\n// this._pickerRequest.next(true);\n// }\n\n// /**\n// * Handles keyboard events\n// * @param event - Keyboard event that occured\n// * @param input - Html input element that holds current value and selection\n// * @internal\n// */\n// public handleKeyboard(event: KeyboardEvent): void\n// {\n// if(!this._dateApiValue?.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(() => event.key == 'ArrowLeft' ? this._dateApiValue!.subtractDays(1) : this._dateApiValue!.addDays(1));\n// this._show();\n\n// break;\n// }\n// case 'ArrowUp':\n// case 'ArrowDown':\n// {\n// event.preventDefault();\n// event.stopPropagation();\n\n// this._withMinMaxConstraint(() => event.key == 'ArrowUp' ? this._dateApiValue!.subtractWeeks(1) : this._dateApiValue!.addWeeks(1));\n// this._show();\n\n// break;\n// }\n// case 'Escape':\n// {\n// this._pickerRequest.next(false);\n\n// break;\n// }\n// case ' ':\n// {\n// if(event.ctrlKey)\n// {\n// this._pickerRequest.next(true);\n// }\n\n// break;\n// }\n// }\n// }\n\n// //######################### protected methods #########################\n\n// /**\n// * Clears current value\n// */\n// protected _clearValue(): void\n// {\n// this._dateApiValue = null;\n// this._isValid = true;\n// this.currentValue = null;\n// }\n\n// /**\n// * Tests whether are min or max constraint broken, returns true if constraint is broken\n// */\n// protected _minMaxConstraintTest(): boolean\n// {\n// return (!!this._minValue && this._dateApiValue!.isBefore(this._minValue)) ||\n// (!!this._maxValue && this._dateApiValue!.isAfter(this._maxValue));\n// }\n\n// /**\n// * Runs code with check whether min max constrains was broken\n// * @param code - Code that should be executed which can change current value\n// */\n// protected _withMinMaxConstraint(code: () => void): void\n// {\n// this._dateApiValue!.updateOriginal();\n\n// code();\n\n// //min value constraint failure\n// if(this._minMaxConstraintTest())\n// {\n// this._dateApiValue?.resetOriginal();\n\n// return;\n// }\n\n// this._valueChange.next();\n// }\n\n// /**\n// * Shows current value in input\n// */\n// protected _show(): void\n// {\n// if(this._isValid)\n// {\n// this.currentValue = this._dateApiValue?.format(this._format) ?? null;\n// }\n// }\n// }"]}
@@ -139,61 +139,4 @@ export function datetimeMinValidator(dateApi, minValue, valueFormat, stringForma
139
139
  return null;
140
140
  };
141
141
  }
142
- /**
143
- * Validations functions for datetime
144
- */
145
- export class Validators {
146
- /**
147
- * Creates validator function that validates control if its value is valid datetime value
148
- * @param datetime - Object storing information about datetime value
149
- */
150
- static datetime(datetime) {
151
- return () => {
152
- if (!datetime.valid) {
153
- return {
154
- 'datetime': true
155
- };
156
- }
157
- return null;
158
- };
159
- }
160
- /**
161
- * Creates validator function that validates control if its value is withing range of minimal datetime value
162
- * @param datetime - Object storing information about datetime value
163
- * @param dateApi - Date api object
164
- */
165
- static minDatetime(datetime, dateApi) {
166
- return (control) => {
167
- if (!!control.value &&
168
- datetime.valid &&
169
- datetime.minValue &&
170
- dateApi.getValue(control.value).isBefore(datetime.minValue)) {
171
- return {
172
- 'minDatetime': datetime.minValue,
173
- 'actualValue': control.value
174
- };
175
- }
176
- return null;
177
- };
178
- }
179
- /**
180
- * Creates validator function that validates control if its value is withing range of maximal datetime value
181
- * @param datetime - Object storing information about datetime value
182
- * @param dateApi - Date api object
183
- */
184
- static maxDatetime(datetime, dateApi) {
185
- return (control) => {
186
- if (!!control.value &&
187
- datetime.valid &&
188
- datetime.maxValue &&
189
- dateApi.getValue(control.value).isAfter(datetime.maxValue)) {
190
- return {
191
- 'maxDatetime': datetime.maxValue,
192
- 'actualValue': control.value
193
- };
194
- }
195
- return null;
196
- };
197
- }
198
- }
199
142
  //# sourceMappingURL=validators.js.map
@@ -1 +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;AAI3D,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,KAAK,CAAC,EACzB;YACI,OAAO,IAAI,CAAC;SACf;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAErF,IAAG,CAAC,WAAW,EACf;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC9B;YACI,IAAG,CAAC,WAA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CAAC,EAC9D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAc,QAAoC,EAAE,OAAuB;QAEhG,OAAO,CAAC,OAAwB,EAAyB,EAAE;YAEvD,IAAG,CAAC,CAAC,OAAO,CAAC,KAAK;gBACf,QAAQ,CAAC,KAAK;gBACd,QAAQ,CAAC,QAAQ;gBACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC7D;gBACI,OAAO;oBACH,aAAa,EAAE,QAAQ,CAAC,QAAQ;oBAChC,aAAa,EAAE,OAAO,CAAC,KAAK;iBAC/B,CAAC;aACL;YAED,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\nimport {ModelPropertyMetadata, ValidatorFnFactory} from '@anglr/common/forms';\nimport {isBlank, isNumber, isString} from '@jscrpt/common';\n\nimport {DateApi, DateValue} from '../services';\nimport {DateTimeValueObject} from '../interfaces/dateTime/datetime.interface';\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<TDate>)\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<TDate>)\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\n/**\n * Validations functions for datetime\n */\nexport class Validators\n{\n /**\n * Creates validator function that validates control if its value is valid datetime value\n * @param datetime - Object storing information about datetime value\n */\n public static datetime<TDate = any>(datetime: DateTimeValueObject<TDate>): ValidatorFn\n {\n return (): ValidationErrors|null =>\n {\n if(!datetime.valid)\n {\n return {\n 'datetime': true\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of minimal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static minDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.minValue &&\n dateApi.getValue(control.value).isBefore(datetime.minValue))\n {\n return {\n 'minDatetime': datetime.minValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n\n /**\n * Creates validator function that validates control if its value is withing range of maximal datetime value\n * @param datetime - Object storing information about datetime value\n * @param dateApi - Date api object\n */\n public static maxDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn\n {\n return (control: AbstractControl): ValidationErrors|null =>\n {\n if(!!control.value &&\n datetime.valid &&\n datetime.maxValue &&\n dateApi.getValue(control.value).isAfter(datetime.maxValue))\n {\n return {\n 'maxDatetime': datetime.maxValue,\n 'actualValue': control.value\n };\n }\n\n return null;\n };\n }\n}"]}
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/misc/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,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,KAAK,CAAC,EACzB;YACI,OAAO,IAAI,CAAC;SACf;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAErF,IAAG,CAAC,WAAW,EACf;YACI,OAAO,IAAI,CAAC;SACf;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC9B;YACI,IAAG,CAAC,WAAW,CAAC,OAAO,EAAE,EACzB;gBACI,OAAO;oBACH,UAAU,EAAE,YAAY;iBAC3B,CAAC;aACL;SACJ;aAED;YACI,0BAA0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AG,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,aAAZ,YAAY,cAAZ,YAAY,GAAI,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<TDate>)\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<TDate>)\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"]}
@@ -0,0 +1,2 @@
1
+ export * from './monthCalendar/monthCalendar.component';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC","sourcesContent":["export * from './monthCalendar/monthCalendar.component';\n"]}
@@ -0,0 +1,198 @@
1
+ import { Component, ChangeDetectionStrategy, Input, Inject, ViewChild, TemplateRef, ContentChild } from '@angular/core';
2
+ import { isString, nameof } from '@jscrpt/common';
3
+ import { CalendarDayTemplateDirective } from '../../directives';
4
+ import { MonthCalendarDayFormat, CalendarDayAspectRatio } from '../../misc';
5
+ import { EventParser } from '../../services';
6
+ import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "../../services";
9
+ import * as i2 from "@angular/common";
10
+ import * as i3 from "../../directives/calendarDayTemplate/calendarDayTemplate.directive";
11
+ /**
12
+ * Component used for displaying month calendar
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
+ }
47
+ /**
48
+ * Calendar day template to be used
49
+ */
50
+ get calendarDayTemplate() {
51
+ var _a;
52
+ return (_a = this.customCalendarDayTemplate) !== null && _a !== void 0 ? _a : this.defaultCalendarDayTemplate;
53
+ }
54
+ /**
55
+ * Aspect ratio for displayed calendar day cell
56
+ */
57
+ get dayAspectRatio() {
58
+ return this.dayAspectRatioValue;
59
+ }
60
+ set dayAspectRatio(value) {
61
+ if (isString(value)) {
62
+ this.dayAspectRatioValue = CalendarDayAspectRatio[value];
63
+ return;
64
+ }
65
+ this.dayAspectRatioValue = value;
66
+ }
67
+ //######################### public methods - implementation of OnInit #########################
68
+ /**
69
+ * Initialize component
70
+ */
71
+ ngOnInit() {
72
+ this.initWeekdayNames();
73
+ this.initializeDisplayCalendar();
74
+ }
75
+ //######################### public methods - implementation of OnChanges #########################
76
+ /**
77
+ * Called when input value changes
78
+ */
79
+ ngOnChanges(changes) {
80
+ if (nameof('weekDayName') in changes) {
81
+ this.initWeekdayNames();
82
+ }
83
+ if (nameof('display') in changes) {
84
+ this.initializeDisplayCalendar();
85
+ }
86
+ if (nameof('events') in changes && !(nameof('display') in changes)) {
87
+ this.initAndAttachEventData();
88
+ }
89
+ }
90
+ //######################### protected methods #########################
91
+ /**
92
+ * Initialize weekday names
93
+ */
94
+ initWeekdayNames() {
95
+ this.weekDayNames = [];
96
+ const dateApi = this.dateApi.now().startOfWeek();
97
+ switch (this.weekDayName) {
98
+ default:
99
+ // case MonthCalendarDayFormat.None:
100
+ {
101
+ for (let x = 0; x < 7; x++) {
102
+ this.weekDayNames.push('');
103
+ }
104
+ break;
105
+ }
106
+ case MonthCalendarDayFormat.Short:
107
+ {
108
+ for (let x = 0; x < 7; x++) {
109
+ this.weekDayNames.push(dateApi.format(this.formatProvider.dayNameShort));
110
+ dateApi.addDays(1);
111
+ }
112
+ break;
113
+ }
114
+ case MonthCalendarDayFormat.Full:
115
+ {
116
+ for (let x = 0; x < 7; x++) {
117
+ this.weekDayNames.push(dateApi.format(this.formatProvider.dayName));
118
+ dateApi.addDays(1);
119
+ }
120
+ break;
121
+ }
122
+ }
123
+ }
124
+ /**
125
+ * Initialize date for calendar that should be displayed
126
+ */
127
+ initializeDisplayCalendar() {
128
+ var _a;
129
+ (_a = this.display) !== null && _a !== void 0 ? _a : (this.display = this.dateApi.now().value);
130
+ const workDate = this.dateApi.getValue(this.display);
131
+ workDate.startOfMonth()
132
+ .startOfWeek();
133
+ this.calendarData = {};
134
+ do {
135
+ const weekData = this.calendarData[workDate.format(this.formatProvider.week)] = [];
136
+ for (let x = 0; x < 7; x++) {
137
+ weekData.push({
138
+ date: workDate.value,
139
+ day: workDate.dayOfMonth(),
140
+ events: [],
141
+ isCurrentMonth: workDate.isSameMonth(this.display),
142
+ isWeekend: workDate.isWeekend(),
143
+ week: +workDate.format(this.formatProvider.week),
144
+ });
145
+ workDate.addDays(1);
146
+ }
147
+ workDate.startOfWeek();
148
+ } while (workDate.isSameMonth(this.display));
149
+ this.initAndAttachEventData();
150
+ }
151
+ /**
152
+ * Initialize and attaches event data
153
+ */
154
+ initAndAttachEventData() {
155
+ var _a;
156
+ const events = this.eventParser.getEventsPerDay(this.events);
157
+ for (const week in this.calendarData) {
158
+ const weekData = this.calendarData[week];
159
+ for (const day of weekData) {
160
+ const found = events.find(itm => this.dateApi.getValue(itm[0]).isSame(day.date));
161
+ day.events = (_a = found === null || found === void 0 ? void 0 : found[1]) !== null && _a !== void 0 ? _a : [];
162
+ }
163
+ }
164
+ }
165
+ }
166
+ 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 });
167
+ 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: [
168
+ EventParser,
169
+ ], 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 });
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthCalendarComponent, decorators: [{
171
+ type: Component,
172
+ args: [{ selector: 'month-calendar', providers: [
173
+ EventParser,
174
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
175
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
176
+ type: Inject,
177
+ args: [DATE_API]
178
+ }] }, { type: undefined, decorators: [{
179
+ type: Inject,
180
+ args: [FORMAT_PROVIDER]
181
+ }] }, { type: i1.EventParser }]; }, propDecorators: { defaultCalendarDayTemplate: [{
182
+ type: ViewChild,
183
+ args: [CalendarDayTemplateDirective, { static: true, read: TemplateRef }]
184
+ }], customCalendarDayTemplate: [{
185
+ type: ContentChild,
186
+ args: [CalendarDayTemplateDirective, { static: true, read: TemplateRef }]
187
+ }], showWeekNumber: [{
188
+ type: Input
189
+ }], display: [{
190
+ type: Input
191
+ }], weekDayName: [{
192
+ type: Input
193
+ }], dayAspectRatio: [{
194
+ type: Input
195
+ }], events: [{
196
+ type: Input
197
+ }] } });
198
+ //# sourceMappingURL=monthCalendar.component.js.map
@@ -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,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;;;;;AAIlE;;GAEG;AAWH,MAAM,OAAO,sBAAsB;IAuF/B,iEAAiE;IACjE,YAAwC,OAAuB,EAChB,cAA8B,EACvD,WAAuC;QAFrB,YAAO,GAAP,OAAO,CAAgB;QAChB,mBAAc,GAAd,cAAc,CAAgB;QACvD,gBAAW,GAAX,WAAW,CAA4B;QAxF7D,8FAA8F;QAE9F;;WAEG;QACO,wBAAmB,GAAW,sBAAsB,CAAC,UAAU,CAAC;QAE1E;;WAEG;QACO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KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;gBACjF,GAAG,CAAC,MAAM,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,mCAAI,EAAE,CAAC;aACjC;SACJ;IACL,CAAC;;mHAtOQ,sBAAsB,kBAwFX,QAAQ,aACR,eAAe;uGAzF1B,sBAAsB,2LAL/B;QACI,WAAW;KACd,iFAyCa,4BAA4B,2BAAuB,WAAW,uGANjE,4BAA4B,2BAAuB,WAAW,gECxD7E,qxBAeA;2FDSa,sBAAsB;kBAVlC,SAAS;+BAEI,gBAAgB,aAG1B;wBACI,WAAW;qBACd,mBACgB,uBAAuB,CAAC,MAAM;;0BA0FlC,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe;sEAxDzB,0BAA0B;sBADnC,SAAS;uBAAC,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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendarDayTemplate.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarDayTemplate.context.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.ts"],"names":[],"mappings":"","sourcesContent":["import {CalendarDayData} from '../../interfaces';\n\n/**\n * Context passed to template of calendar day\n */\nexport interface CalendarDayTemplateContext<TDate = unknown, TEvent = unknown>\n{\n /**\n * Data that are used for displaying calendar day\n */\n $implicit: CalendarDayData<TDate, TEvent>;\n}"]}
@@ -0,0 +1,27 @@
1
+ import { Directive, TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Directive used for obtaining custom calendar day template
5
+ */
6
+ export class CalendarDayTemplateDirective {
7
+ //######################### constructor #########################
8
+ constructor(template) {
9
+ this.template = template;
10
+ }
11
+ //######################### ng language server #########################
12
+ /**
13
+ * Allows typechecking for template
14
+ */
15
+ static ngTemplateContextGuard(_dir, _ctx) {
16
+ return true;
17
+ }
18
+ }
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
+ type: Directive,
23
+ args: [{
24
+ selector: '[calendarDayTemplate]'
25
+ }]
26
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
27
+ //# sourceMappingURL=calendarDayTemplate.directive.js.map
@@ -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;AAKH,MAAM,OAAO,4BAA4B;IAErC,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;;yHAfQ,4BAA4B;6GAA5B,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}"]}
@@ -0,0 +1,3 @@
1
+ export * from './calendarDayTemplate/calendarDayTemplate.context';
2
+ export * from './calendarDayTemplate/calendarDayTemplate.directive';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC;AAClE,cAAc,qDAAqD,CAAC","sourcesContent":["export * from './calendarDayTemplate/calendarDayTemplate.context';\nexport * from './calendarDayTemplate/calendarDayTemplate.directive';\n"]}
@@ -0,0 +1,7 @@
1
+ export * from './components';
2
+ export * from './directives';
3
+ export * from './interfaces';
4
+ export * from './misc';
5
+ export * from './modules';
6
+ export * from './services';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/calendar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC","sourcesContent":["export * from './components';\nexport * from './directives';\nexport * from './interfaces';\nexport * from './misc';\nexport * from './modules';\nexport * from './services';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendarDayData.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarDayData.interface.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/interfaces/calendarDayData.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {CalendarEventDayMetadata} from './calendarEventDayMetadata.interface';\n\n/**\n * Data for day for calendar\n */\nexport interface CalendarDayData<TDate = unknown, TEvent = unknown>\n{\n /**\n * Thin array of events array for day\n */\n events: CalendarEventDayMetadata<TDate, TEvent>[];\n\n /**\n * Date of day\n */\n date: TDate;\n\n /**\n * Number of day of month\n */\n day: number;\n\n /**\n * Indication whether is this day weekend day\n */\n isWeekend: boolean;\n\n /**\n * Indication whether is this day for currently displayed month\n */\n isCurrentMonth: boolean;\n\n /**\n * Week number of year for day\n */\n week: number;\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendarEventDayMetadata.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarEventDayMetadata.interface.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/interfaces/calendarEventDayMetadata.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {EventData, WithDateApiFromTo} from './eventData.interface';\n\n/**\n * Event metadata for day\n */\nexport interface CalendarEventDayMetadata<TDate = unknown, TEvent = unknown> extends EventData<TDate, TEvent>, WithDateApiFromTo<TDate>\n{\n /**\n * Indication whether is event all day event\n */\n allDay: boolean;\n\n /**\n * Indication that event is ongoing from previous date\n */\n onGoingFrom: boolean;\n\n /**\n * Indication that event is ongoing to next date\n */\n onGoingTo: boolean;\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=eventData.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventData.interface.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/interfaces/eventData.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {DateApiObject} from '../../../services';\n\n/**\n * Data for event that are passed to calendar\n */\nexport interface EventData<TDate = unknown, TEvent = unknown>\n{\n /**\n * Data for event\n */\n data: TEvent;\n\n /**\n * Date when event starts\n */\n dateFrom: TDate;\n\n /**\n * Date when event ends\n */\n dateTo: TDate|undefined|null;\n}\n\n/**\n * Represents object that holds date api object for dateFrom and dateTo\n */\nexport interface WithDateApiFromTo<TDate = unknown>\n{\n /**\n * Date api for date when event starts\n */\n dateApiFrom: DateApiObject<TDate>;\n\n /**\n * Date api for date when event ends\n */\n dateApiTo: DateApiObject<TDate>|undefined|null;\n}\n\n/**\n * Internal representation of event data\n */\nexport interface ɵEventData<TDate = unknown, TEvent = unknown> extends EventData<TDate, TEvent>, WithDateApiFromTo<TDate>\n{\n}"]}
@@ -0,0 +1,4 @@
1
+ export * from './calendarDayData.interface';
2
+ export * from './calendarEventDayMetadata.interface';
3
+ export * from './eventData.interface';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './calendarDayData.interface';\nexport * from './calendarEventDayMetadata.interface';\nexport * from './eventData.interface';\n"]}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Available aspect ratios for displaying calendar days
3
+ */
4
+ export var CalendarDayAspectRatio;
5
+ (function (CalendarDayAspectRatio) {
6
+ /**
7
+ * Aspect ratio of width to height is 1:1 (square)
8
+ */
9
+ CalendarDayAspectRatio[CalendarDayAspectRatio["OneToOne"] = 100] = "OneToOne";
10
+ /**
11
+ * Aspect ratio of width to height is 3:2
12
+ */
13
+ CalendarDayAspectRatio[CalendarDayAspectRatio["ThreeToTwo"] = 66.66] = "ThreeToTwo";
14
+ /**
15
+ * Aspect ratio of width to height is 4:3
16
+ */
17
+ CalendarDayAspectRatio[CalendarDayAspectRatio["FourToThree"] = 75] = "FourToThree";
18
+ /**
19
+ * Aspect ratio of width to height is 16:10
20
+ */
21
+ CalendarDayAspectRatio[CalendarDayAspectRatio["SixteenToTen"] = 62.5] = "SixteenToTen";
22
+ /**
23
+ * Aspect ratio of width to height is 16:9
24
+ */
25
+ CalendarDayAspectRatio[CalendarDayAspectRatio["SixteenToNine"] = 56.25] = "SixteenToNine";
26
+ })(CalendarDayAspectRatio || (CalendarDayAspectRatio = {}));
27
+ //# sourceMappingURL=calendarDayAspectRatio.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarDayAspectRatio.enum.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,sBA0BX;AA1BD,WAAY,sBAAsB;IAE9B;;OAEG;IACH,6EAAc,CAAA;IAEd;;OAEG;IACH,mFAAkB,CAAA;IAElB;;OAEG;IACH,kFAAgB,CAAA;IAEhB;;OAEG;IACH,sFAAmB,CAAA;IAEnB;;OAEG;IACH,yFAAqB,CAAA;AACzB,CAAC,EA1BW,sBAAsB,KAAtB,sBAAsB,QA0BjC","sourcesContent":["/**\n * Available aspect ratios for displaying calendar days\n */\nexport enum CalendarDayAspectRatio\n{\n /**\n * Aspect ratio of width to height is 1:1 (square)\n */\n OneToOne = 100,\n\n /**\n * Aspect ratio of width to height is 3:2\n */\n ThreeToTwo = 66.66,\n\n /**\n * Aspect ratio of width to height is 4:3\n */\n FourToThree = 75,\n\n /**\n * Aspect ratio of width to height is 16:10\n */\n SixteenToTen = 62.5,\n\n /**\n * Aspect ratio of width to height is 16:9\n */\n SixteenToNine = 56.25,\n}"]}
@@ -0,0 +1,3 @@
1
+ export * from './calendarDayAspectRatio.enum';
2
+ export * from './monthCalendarDayFormat.enum';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/misc/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './calendarDayAspectRatio.enum';\nexport * from './monthCalendarDayFormat.enum';\n"]}