@progress/kendo-react-dateinputs 6.1.1 → 7.0.0-develop.1

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 (394) hide show
  1. package/LICENSE.md +1 -1
  2. package/{dist/es/PopupSettings.d.ts → PopupSettings.d.ts} +4 -0
  3. package/{dist/npm/calendar → calendar}/components/Calendar.d.ts +6 -2
  4. package/{dist/es/calendar → calendar}/components/CalendarCell.d.ts +5 -1
  5. package/{dist/npm/calendar → calendar}/components/CalendarHeaderTitle.d.ts +5 -1
  6. package/{dist/npm/calendar → calendar}/components/CalendarNavigationItem.d.ts +5 -1
  7. package/{dist/npm/calendar → calendar}/components/CalendarWeekCell.d.ts +5 -1
  8. package/{dist/npm/calendar → calendar}/components/Header.d.ts +5 -1
  9. package/{dist/npm/calendar → calendar}/components/HorizontalViewList.d.ts +5 -1
  10. package/{dist/npm/calendar → calendar}/components/MultiViewCalendar.d.ts +8 -4
  11. package/{dist/npm/calendar → calendar}/components/Navigation.d.ts +5 -1
  12. package/{dist/npm/calendar → calendar}/components/TodayCommand.d.ts +5 -1
  13. package/{dist/es/calendar → calendar}/components/View.d.ts +6 -2
  14. package/{dist/npm/calendar → calendar}/components/ViewList.d.ts +7 -3
  15. package/calendar/models/ActiveView.d.ts +8 -0
  16. package/{dist/npm/calendar → calendar}/models/CalendarSettings.d.ts +4 -1
  17. package/calendar/models/CalendarViewEnum.d.ts +13 -0
  18. package/{dist/npm/calendar → calendar}/models/CellContext.d.ts +4 -0
  19. package/calendar/models/MultiViewCalendarMode.d.ts +13 -0
  20. package/{dist/es/calendar → calendar}/models/MultiViewCalendarSettings.d.ts +4 -1
  21. package/calendar/models/NavigationAction.d.ts +19 -0
  22. package/calendar/models/SelectionRange.d.ts +21 -0
  23. package/calendar/models/SelectionRangeEnd.d.ts +8 -0
  24. package/{dist/npm/calendar → calendar}/models/ViewService.d.ts +4 -0
  25. package/calendar/models/index.d.ts +15 -0
  26. package/{dist/es/calendar → calendar}/services/BusViewService.d.ts +4 -1
  27. package/{dist/es/calendar → calendar}/services/CenturyViewService.d.ts +4 -0
  28. package/{dist/npm/calendar → calendar}/services/DOMService.d.ts +4 -0
  29. package/{dist/npm/calendar → calendar}/services/DecadeViewService.d.ts +4 -0
  30. package/{dist/npm/calendar → calendar}/services/MonthViewService.d.ts +4 -0
  31. package/{dist/npm/calendar → calendar}/services/NavigationService.d.ts +4 -0
  32. package/{dist/npm/calendar → calendar}/services/ScrollSyncService.d.ts +4 -0
  33. package/calendar/services/WeekNamesService.d.ts +13 -0
  34. package/{dist/es/calendar → calendar}/services/YearViewService.d.ts +4 -0
  35. package/{dist/npm/calendar → calendar}/services/index.d.ts +4 -0
  36. package/{dist/es/common → common}/AdaptiveMode.d.ts +5 -1
  37. package/{dist/es/common → common}/PickerWrap.d.ts +4 -0
  38. package/common/constants.d.ts +8 -0
  39. package/{dist/es/dateinput → dateinput}/DateInput.d.ts +11 -7
  40. package/{dist/es/dateinput → dateinput}/models/DateInputSettings.d.ts +4 -0
  41. package/{dist/es/dateinput → dateinput}/models/format-placeholder.d.ts +5 -1
  42. package/dateinput/models/incremental-steps.d.ts +15 -0
  43. package/dateinput/models/index.d.ts +11 -0
  44. package/{dist/es/dateinput → dateinput}/models/kendo-date.d.ts +4 -0
  45. package/dateinput/models/mask.d.ts +11 -0
  46. package/dateinput/models/selection.d.ts +11 -0
  47. package/{dist/npm/dateinput → dateinput}/utils.d.ts +4 -0
  48. package/{dist/npm/datepicker → datepicker}/DatePicker.d.ts +12 -8
  49. package/{dist/npm/datepicker → datepicker}/ToggleButton.d.ts +4 -0
  50. package/{dist/npm/datepicker → datepicker}/models/DatePickerSettings.d.ts +5 -2
  51. package/datepicker/models/index.d.ts +6 -0
  52. package/{dist/es/daterangepicker → daterangepicker}/DateRangePicker.d.ts +9 -5
  53. package/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +10 -0
  54. package/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +10 -0
  55. package/daterangepicker/models/DateRangePickerPopupSettings.d.ts +10 -0
  56. package/{dist/npm/daterangepicker → daterangepicker}/models/DateRangePickerSettings.d.ts +4 -1
  57. package/{dist/es/daterangepicker → daterangepicker}/models/index.d.ts +4 -0
  58. package/{dist/npm/datetimepicker → datetimepicker}/DateTimePicker.d.ts +12 -8
  59. package/{dist/npm/datetimepicker → datetimepicker}/DateTimeSelector.d.ts +5 -1
  60. package/{dist/es/datetimepicker → datetimepicker}/models/DateTimePickerSettings.d.ts +5 -2
  61. package/datetimepicker/models/index.d.ts +6 -0
  62. package/dist/cdn/js/kendo-react-dateinputs.js +21 -1
  63. package/hooks/usePickerFloatingLabel.d.ts +24 -0
  64. package/index.d.ts +39 -0
  65. package/index.js +21 -0
  66. package/index.mjs +6460 -0
  67. package/{dist/es/messages → messages}/index.d.ts +4 -0
  68. package/package-metadata.d.ts +9 -0
  69. package/package.json +33 -51
  70. package/{dist/npm/timepicker → timepicker}/TimeList.d.ts +5 -1
  71. package/{dist/es/timepicker → timepicker}/TimePart.d.ts +5 -1
  72. package/{dist/es/timepicker → timepicker}/TimePicker.d.ts +12 -8
  73. package/{dist/es/timepicker → timepicker}/TimeSelector.d.ts +5 -1
  74. package/timepicker/models/IncrementalSteps.d.ts +12 -0
  75. package/timepicker/models/ListItem.d.ts +11 -0
  76. package/{dist/es/timepicker → timepicker}/models/ListService.d.ts +4 -0
  77. package/timepicker/models/ListServiceSettings.d.ts +16 -0
  78. package/timepicker/models/TimePart.d.ts +14 -0
  79. package/{dist/es/timepicker → timepicker}/models/TimePickerSettings.d.ts +5 -2
  80. package/timepicker/models/index.d.ts +11 -0
  81. package/timepicker/services/DOMService.d.ts +14 -0
  82. package/{dist/npm/timepicker → timepicker}/services/DayPeriodService.d.ts +4 -0
  83. package/{dist/es/timepicker → timepicker}/services/HoursService.d.ts +4 -0
  84. package/{dist/npm/timepicker → timepicker}/services/MinutesService.d.ts +4 -0
  85. package/{dist/es/timepicker → timepicker}/services/SecondsService.d.ts +4 -0
  86. package/timepicker/services/index.d.ts +10 -0
  87. package/{dist/es/timepicker → timepicker}/utils.d.ts +4 -0
  88. package/{dist/es/utils.d.ts → utils.d.ts} +4 -0
  89. package/{dist/es/virtualization → virtualization}/Virtualization.d.ts +6 -2
  90. package/{dist/es/virtualization → virtualization}/services/RowHeightService.d.ts +4 -0
  91. package/{dist/es/virtualization → virtualization}/services/ScrollerService.d.ts +6 -2
  92. package/virtualization/services/index.d.ts +7 -0
  93. package/about.md +0 -3
  94. package/dist/es/PopupSettings.js +0 -1
  95. package/dist/es/calendar/components/Calendar.d.ts +0 -187
  96. package/dist/es/calendar/components/Calendar.js +0 -388
  97. package/dist/es/calendar/components/CalendarCell.js +0 -128
  98. package/dist/es/calendar/components/CalendarHeaderTitle.d.ts +0 -28
  99. package/dist/es/calendar/components/CalendarHeaderTitle.js +0 -61
  100. package/dist/es/calendar/components/CalendarNavigationItem.d.ts +0 -27
  101. package/dist/es/calendar/components/CalendarNavigationItem.js +0 -66
  102. package/dist/es/calendar/components/CalendarWeekCell.d.ts +0 -25
  103. package/dist/es/calendar/components/CalendarWeekCell.js +0 -61
  104. package/dist/es/calendar/components/Header.d.ts +0 -54
  105. package/dist/es/calendar/components/Header.js +0 -129
  106. package/dist/es/calendar/components/HorizontalViewList.d.ts +0 -67
  107. package/dist/es/calendar/components/HorizontalViewList.js +0 -145
  108. package/dist/es/calendar/components/MultiViewCalendar.d.ts +0 -208
  109. package/dist/es/calendar/components/MultiViewCalendar.js +0 -589
  110. package/dist/es/calendar/components/Navigation.d.ts +0 -76
  111. package/dist/es/calendar/components/Navigation.js +0 -167
  112. package/dist/es/calendar/components/TodayCommand.d.ts +0 -31
  113. package/dist/es/calendar/components/TodayCommand.js +0 -93
  114. package/dist/es/calendar/components/View.js +0 -220
  115. package/dist/es/calendar/components/ViewList.d.ts +0 -111
  116. package/dist/es/calendar/components/ViewList.js +0 -258
  117. package/dist/es/calendar/models/ActiveView.d.ts +0 -4
  118. package/dist/es/calendar/models/ActiveView.js +0 -1
  119. package/dist/es/calendar/models/CalendarSettings.d.ts +0 -103
  120. package/dist/es/calendar/models/CalendarSettings.js +0 -1
  121. package/dist/es/calendar/models/CalendarViewEnum.d.ts +0 -9
  122. package/dist/es/calendar/models/CalendarViewEnum.js +0 -10
  123. package/dist/es/calendar/models/CellContext.d.ts +0 -19
  124. package/dist/es/calendar/models/CellContext.js +0 -1
  125. package/dist/es/calendar/models/MultiViewCalendarMode.d.ts +0 -9
  126. package/dist/es/calendar/models/MultiViewCalendarMode.js +0 -1
  127. package/dist/es/calendar/models/MultiViewCalendarSettings.js +0 -1
  128. package/dist/es/calendar/models/NavigationAction.d.ts +0 -15
  129. package/dist/es/calendar/models/NavigationAction.js +0 -16
  130. package/dist/es/calendar/models/SelectionRange.d.ts +0 -17
  131. package/dist/es/calendar/models/SelectionRange.js +0 -4
  132. package/dist/es/calendar/models/SelectionRangeEnd.d.ts +0 -4
  133. package/dist/es/calendar/models/SelectionRangeEnd.js +0 -1
  134. package/dist/es/calendar/models/ViewService.d.ts +0 -25
  135. package/dist/es/calendar/models/ViewService.js +0 -1
  136. package/dist/es/calendar/models/index.d.ts +0 -11
  137. package/dist/es/calendar/models/index.js +0 -4
  138. package/dist/es/calendar/services/BusViewService.js +0 -69
  139. package/dist/es/calendar/services/CenturyViewService.js +0 -154
  140. package/dist/es/calendar/services/DOMService.d.ts +0 -29
  141. package/dist/es/calendar/services/DOMService.js +0 -184
  142. package/dist/es/calendar/services/DecadeViewService.d.ts +0 -27
  143. package/dist/es/calendar/services/DecadeViewService.js +0 -153
  144. package/dist/es/calendar/services/MonthViewService.d.ts +0 -33
  145. package/dist/es/calendar/services/MonthViewService.js +0 -169
  146. package/dist/es/calendar/services/NavigationService.d.ts +0 -14
  147. package/dist/es/calendar/services/NavigationService.js +0 -41
  148. package/dist/es/calendar/services/ScrollSyncService.d.ts +0 -21
  149. package/dist/es/calendar/services/ScrollSyncService.js +0 -58
  150. package/dist/es/calendar/services/WeekNamesService.d.ts +0 -9
  151. package/dist/es/calendar/services/WeekNamesService.js +0 -16
  152. package/dist/es/calendar/services/YearViewService.js +0 -180
  153. package/dist/es/calendar/services/index.d.ts +0 -10
  154. package/dist/es/calendar/services/index.js +0 -10
  155. package/dist/es/calendar/utils/ScrollSync.d.ts +0 -13
  156. package/dist/es/calendar/utils/ScrollSync.js +0 -30
  157. package/dist/es/common/AdaptiveMode.js +0 -45
  158. package/dist/es/common/PickerWrap.js +0 -14
  159. package/dist/es/common/constants.d.ts +0 -4
  160. package/dist/es/common/constants.js +0 -4
  161. package/dist/es/dateinput/DateInput.js +0 -704
  162. package/dist/es/dateinput/models/DateInputSettings.js +0 -2
  163. package/dist/es/dateinput/models/format-placeholder.js +0 -2
  164. package/dist/es/dateinput/models/incremental-steps.d.ts +0 -11
  165. package/dist/es/dateinput/models/incremental-steps.js +0 -1
  166. package/dist/es/dateinput/models/index.d.ts +0 -7
  167. package/dist/es/dateinput/models/index.js +0 -3
  168. package/dist/es/dateinput/models/kendo-date.js +0 -338
  169. package/dist/es/dateinput/models/mask.d.ts +0 -7
  170. package/dist/es/dateinput/models/mask.js +0 -11
  171. package/dist/es/dateinput/models/selection.d.ts +0 -7
  172. package/dist/es/dateinput/models/selection.js +0 -1
  173. package/dist/es/dateinput/utils.d.ts +0 -30
  174. package/dist/es/dateinput/utils.js +0 -83
  175. package/dist/es/datepicker/DatePicker.d.ts +0 -354
  176. package/dist/es/datepicker/DatePicker.js +0 -636
  177. package/dist/es/datepicker/ToggleButton.d.ts +0 -10
  178. package/dist/es/datepicker/ToggleButton.js +0 -5
  179. package/dist/es/datepicker/models/DatePickerSettings.d.ts +0 -138
  180. package/dist/es/datepicker/models/DatePickerSettings.js +0 -2
  181. package/dist/es/datepicker/models/index.d.ts +0 -2
  182. package/dist/es/datepicker/models/index.js +0 -1
  183. package/dist/es/daterangepicker/DateRangePicker.js +0 -584
  184. package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +0 -6
  185. package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +0 -1
  186. package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +0 -6
  187. package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +0 -1
  188. package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.d.ts +0 -6
  189. package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +0 -1
  190. package/dist/es/daterangepicker/models/DateRangePickerSettings.d.ts +0 -123
  191. package/dist/es/daterangepicker/models/DateRangePickerSettings.js +0 -2
  192. package/dist/es/daterangepicker/models/index.js +0 -1
  193. package/dist/es/datetimepicker/DateTimePicker.d.ts +0 -338
  194. package/dist/es/datetimepicker/DateTimePicker.js +0 -566
  195. package/dist/es/datetimepicker/DateTimeSelector.d.ts +0 -97
  196. package/dist/es/datetimepicker/DateTimeSelector.js +0 -279
  197. package/dist/es/datetimepicker/models/DateTimePickerSettings.js +0 -1
  198. package/dist/es/datetimepicker/models/index.d.ts +0 -2
  199. package/dist/es/datetimepicker/models/index.js +0 -1
  200. package/dist/es/hooks/usePickerFloatingLabel.d.ts +0 -20
  201. package/dist/es/hooks/usePickerFloatingLabel.js +0 -35
  202. package/dist/es/main.d.ts +0 -35
  203. package/dist/es/main.js +0 -29
  204. package/dist/es/messages/index.js +0 -121
  205. package/dist/es/package-metadata.d.ts +0 -5
  206. package/dist/es/package-metadata.js +0 -11
  207. package/dist/es/timepicker/TimeList.d.ts +0 -87
  208. package/dist/es/timepicker/TimeList.js +0 -302
  209. package/dist/es/timepicker/TimePart.js +0 -307
  210. package/dist/es/timepicker/TimePicker.js +0 -618
  211. package/dist/es/timepicker/TimeSelector.js +0 -261
  212. package/dist/es/timepicker/models/IncrementalSteps.d.ts +0 -8
  213. package/dist/es/timepicker/models/IncrementalSteps.js +0 -1
  214. package/dist/es/timepicker/models/ListItem.d.ts +0 -7
  215. package/dist/es/timepicker/models/ListItem.js +0 -1
  216. package/dist/es/timepicker/models/ListService.js +0 -1
  217. package/dist/es/timepicker/models/ListServiceSettings.d.ts +0 -12
  218. package/dist/es/timepicker/models/ListServiceSettings.js +0 -1
  219. package/dist/es/timepicker/models/TimePart.d.ts +0 -10
  220. package/dist/es/timepicker/models/TimePart.js +0 -10
  221. package/dist/es/timepicker/models/TimePickerSettings.js +0 -2
  222. package/dist/es/timepicker/models/index.d.ts +0 -7
  223. package/dist/es/timepicker/models/index.js +0 -2
  224. package/dist/es/timepicker/services/DOMService.d.ts +0 -10
  225. package/dist/es/timepicker/services/DOMService.js +0 -46
  226. package/dist/es/timepicker/services/DayPeriodService.d.ts +0 -47
  227. package/dist/es/timepicker/services/DayPeriodService.js +0 -119
  228. package/dist/es/timepicker/services/HoursService.js +0 -124
  229. package/dist/es/timepicker/services/MinutesService.d.ts +0 -32
  230. package/dist/es/timepicker/services/MinutesService.js +0 -119
  231. package/dist/es/timepicker/services/SecondsService.js +0 -120
  232. package/dist/es/timepicker/services/index.d.ts +0 -6
  233. package/dist/es/timepicker/services/index.js +0 -6
  234. package/dist/es/timepicker/utils.js +0 -149
  235. package/dist/es/utils.js +0 -306
  236. package/dist/es/virtualization/Virtualization.js +0 -317
  237. package/dist/es/virtualization/services/RowHeightService.js +0 -68
  238. package/dist/es/virtualization/services/ScrollerService.js +0 -90
  239. package/dist/es/virtualization/services/index.d.ts +0 -3
  240. package/dist/es/virtualization/services/index.js +0 -3
  241. package/dist/npm/PopupSettings.d.ts +0 -14
  242. package/dist/npm/PopupSettings.js +0 -2
  243. package/dist/npm/calendar/components/Calendar.js +0 -391
  244. package/dist/npm/calendar/components/CalendarCell.d.ts +0 -35
  245. package/dist/npm/calendar/components/CalendarCell.js +0 -131
  246. package/dist/npm/calendar/components/CalendarHeaderTitle.js +0 -64
  247. package/dist/npm/calendar/components/CalendarNavigationItem.js +0 -69
  248. package/dist/npm/calendar/components/CalendarWeekCell.js +0 -64
  249. package/dist/npm/calendar/components/Header.js +0 -132
  250. package/dist/npm/calendar/components/HorizontalViewList.js +0 -148
  251. package/dist/npm/calendar/components/MultiViewCalendar.js +0 -592
  252. package/dist/npm/calendar/components/Navigation.js +0 -170
  253. package/dist/npm/calendar/components/TodayCommand.js +0 -96
  254. package/dist/npm/calendar/components/View.d.ts +0 -85
  255. package/dist/npm/calendar/components/View.js +0 -223
  256. package/dist/npm/calendar/components/ViewList.js +0 -261
  257. package/dist/npm/calendar/models/ActiveView.d.ts +0 -4
  258. package/dist/npm/calendar/models/ActiveView.js +0 -2
  259. package/dist/npm/calendar/models/CalendarSettings.js +0 -2
  260. package/dist/npm/calendar/models/CalendarViewEnum.d.ts +0 -9
  261. package/dist/npm/calendar/models/CalendarViewEnum.js +0 -13
  262. package/dist/npm/calendar/models/CellContext.js +0 -2
  263. package/dist/npm/calendar/models/MultiViewCalendarMode.d.ts +0 -9
  264. package/dist/npm/calendar/models/MultiViewCalendarMode.js +0 -2
  265. package/dist/npm/calendar/models/MultiViewCalendarSettings.d.ts +0 -112
  266. package/dist/npm/calendar/models/MultiViewCalendarSettings.js +0 -2
  267. package/dist/npm/calendar/models/NavigationAction.d.ts +0 -15
  268. package/dist/npm/calendar/models/NavigationAction.js +0 -19
  269. package/dist/npm/calendar/models/SelectionRange.d.ts +0 -17
  270. package/dist/npm/calendar/models/SelectionRange.js +0 -7
  271. package/dist/npm/calendar/models/SelectionRangeEnd.d.ts +0 -4
  272. package/dist/npm/calendar/models/SelectionRangeEnd.js +0 -2
  273. package/dist/npm/calendar/models/ViewService.js +0 -2
  274. package/dist/npm/calendar/models/index.d.ts +0 -11
  275. package/dist/npm/calendar/models/index.js +0 -9
  276. package/dist/npm/calendar/services/BusViewService.d.ts +0 -22
  277. package/dist/npm/calendar/services/BusViewService.js +0 -72
  278. package/dist/npm/calendar/services/CenturyViewService.d.ts +0 -25
  279. package/dist/npm/calendar/services/CenturyViewService.js +0 -157
  280. package/dist/npm/calendar/services/DOMService.js +0 -187
  281. package/dist/npm/calendar/services/DecadeViewService.js +0 -156
  282. package/dist/npm/calendar/services/MonthViewService.js +0 -172
  283. package/dist/npm/calendar/services/NavigationService.js +0 -44
  284. package/dist/npm/calendar/services/ScrollSyncService.js +0 -61
  285. package/dist/npm/calendar/services/WeekNamesService.d.ts +0 -9
  286. package/dist/npm/calendar/services/WeekNamesService.js +0 -19
  287. package/dist/npm/calendar/services/YearViewService.d.ts +0 -31
  288. package/dist/npm/calendar/services/YearViewService.js +0 -183
  289. package/dist/npm/calendar/services/index.js +0 -21
  290. package/dist/npm/calendar/utils/ScrollSync.d.ts +0 -13
  291. package/dist/npm/calendar/utils/ScrollSync.js +0 -32
  292. package/dist/npm/common/AdaptiveMode.d.ts +0 -21
  293. package/dist/npm/common/AdaptiveMode.js +0 -49
  294. package/dist/npm/common/PickerWrap.d.ts +0 -18
  295. package/dist/npm/common/PickerWrap.js +0 -17
  296. package/dist/npm/common/constants.d.ts +0 -4
  297. package/dist/npm/common/constants.js +0 -7
  298. package/dist/npm/dateinput/DateInput.d.ts +0 -351
  299. package/dist/npm/dateinput/DateInput.js +0 -707
  300. package/dist/npm/dateinput/models/DateInputSettings.d.ts +0 -99
  301. package/dist/npm/dateinput/models/DateInputSettings.js +0 -3
  302. package/dist/npm/dateinput/models/format-placeholder.d.ts +0 -39
  303. package/dist/npm/dateinput/models/format-placeholder.js +0 -3
  304. package/dist/npm/dateinput/models/incremental-steps.d.ts +0 -11
  305. package/dist/npm/dateinput/models/incremental-steps.js +0 -2
  306. package/dist/npm/dateinput/models/index.d.ts +0 -7
  307. package/dist/npm/dateinput/models/index.js +0 -7
  308. package/dist/npm/dateinput/models/kendo-date.d.ts +0 -53
  309. package/dist/npm/dateinput/models/kendo-date.js +0 -341
  310. package/dist/npm/dateinput/models/mask.d.ts +0 -7
  311. package/dist/npm/dateinput/models/mask.js +0 -14
  312. package/dist/npm/dateinput/models/selection.d.ts +0 -7
  313. package/dist/npm/dateinput/models/selection.js +0 -2
  314. package/dist/npm/dateinput/utils.js +0 -90
  315. package/dist/npm/datepicker/DatePicker.js +0 -639
  316. package/dist/npm/datepicker/ToggleButton.js +0 -8
  317. package/dist/npm/datepicker/models/DatePickerSettings.js +0 -3
  318. package/dist/npm/datepicker/models/index.d.ts +0 -2
  319. package/dist/npm/datepicker/models/index.js +0 -2
  320. package/dist/npm/daterangepicker/DateRangePicker.d.ts +0 -349
  321. package/dist/npm/daterangepicker/DateRangePicker.js +0 -587
  322. package/dist/npm/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +0 -6
  323. package/dist/npm/daterangepicker/models/DateRangePickerCalendarSettings.js +0 -2
  324. package/dist/npm/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +0 -6
  325. package/dist/npm/daterangepicker/models/DateRangePickerDateInputSettings.js +0 -2
  326. package/dist/npm/daterangepicker/models/DateRangePickerPopupSettings.d.ts +0 -6
  327. package/dist/npm/daterangepicker/models/DateRangePickerPopupSettings.js +0 -2
  328. package/dist/npm/daterangepicker/models/DateRangePickerSettings.js +0 -3
  329. package/dist/npm/daterangepicker/models/index.d.ts +0 -5
  330. package/dist/npm/daterangepicker/models/index.js +0 -2
  331. package/dist/npm/datetimepicker/DateTimePicker.js +0 -569
  332. package/dist/npm/datetimepicker/DateTimeSelector.js +0 -282
  333. package/dist/npm/datetimepicker/models/DateTimePickerSettings.d.ts +0 -141
  334. package/dist/npm/datetimepicker/models/DateTimePickerSettings.js +0 -2
  335. package/dist/npm/datetimepicker/models/index.d.ts +0 -2
  336. package/dist/npm/datetimepicker/models/index.js +0 -2
  337. package/dist/npm/hooks/usePickerFloatingLabel.d.ts +0 -20
  338. package/dist/npm/hooks/usePickerFloatingLabel.js +0 -40
  339. package/dist/npm/main.d.ts +0 -35
  340. package/dist/npm/main.js +0 -102
  341. package/dist/npm/messages/index.d.ts +0 -120
  342. package/dist/npm/messages/index.js +0 -124
  343. package/dist/npm/package-metadata.d.ts +0 -5
  344. package/dist/npm/package-metadata.js +0 -14
  345. package/dist/npm/timepicker/TimeList.js +0 -305
  346. package/dist/npm/timepicker/TimePart.d.ts +0 -136
  347. package/dist/npm/timepicker/TimePart.js +0 -310
  348. package/dist/npm/timepicker/TimePicker.d.ts +0 -351
  349. package/dist/npm/timepicker/TimePicker.js +0 -621
  350. package/dist/npm/timepicker/TimeSelector.d.ts +0 -138
  351. package/dist/npm/timepicker/TimeSelector.js +0 -264
  352. package/dist/npm/timepicker/models/IncrementalSteps.d.ts +0 -8
  353. package/dist/npm/timepicker/models/IncrementalSteps.js +0 -2
  354. package/dist/npm/timepicker/models/ListItem.d.ts +0 -7
  355. package/dist/npm/timepicker/models/ListItem.js +0 -2
  356. package/dist/npm/timepicker/models/ListService.d.ts +0 -15
  357. package/dist/npm/timepicker/models/ListService.js +0 -2
  358. package/dist/npm/timepicker/models/ListServiceSettings.d.ts +0 -12
  359. package/dist/npm/timepicker/models/ListServiceSettings.js +0 -2
  360. package/dist/npm/timepicker/models/TimePart.d.ts +0 -10
  361. package/dist/npm/timepicker/models/TimePart.js +0 -13
  362. package/dist/npm/timepicker/models/TimePickerSettings.d.ts +0 -130
  363. package/dist/npm/timepicker/models/TimePickerSettings.js +0 -3
  364. package/dist/npm/timepicker/models/index.d.ts +0 -7
  365. package/dist/npm/timepicker/models/index.js +0 -5
  366. package/dist/npm/timepicker/services/DOMService.d.ts +0 -10
  367. package/dist/npm/timepicker/services/DOMService.js +0 -49
  368. package/dist/npm/timepicker/services/DayPeriodService.js +0 -122
  369. package/dist/npm/timepicker/services/HoursService.d.ts +0 -33
  370. package/dist/npm/timepicker/services/HoursService.js +0 -127
  371. package/dist/npm/timepicker/services/MinutesService.js +0 -122
  372. package/dist/npm/timepicker/services/SecondsService.d.ts +0 -32
  373. package/dist/npm/timepicker/services/SecondsService.js +0 -123
  374. package/dist/npm/timepicker/services/index.d.ts +0 -6
  375. package/dist/npm/timepicker/services/index.js +0 -13
  376. package/dist/npm/timepicker/utils.d.ts +0 -56
  377. package/dist/npm/timepicker/utils.js +0 -161
  378. package/dist/npm/utils.d.ts +0 -96
  379. package/dist/npm/utils.js +0 -325
  380. package/dist/npm/virtualization/Virtualization.d.ts +0 -116
  381. package/dist/npm/virtualization/Virtualization.js +0 -320
  382. package/dist/npm/virtualization/services/RowHeightService.d.ts +0 -18
  383. package/dist/npm/virtualization/services/RowHeightService.js +0 -71
  384. package/dist/npm/virtualization/services/ScrollerService.d.ts +0 -49
  385. package/dist/npm/virtualization/services/ScrollerService.js +0 -93
  386. package/dist/npm/virtualization/services/index.d.ts +0 -3
  387. package/dist/npm/virtualization/services/index.js +0 -9
  388. package/dist/systemjs/kendo-react-dateinputs.js +0 -1
  389. package/e2e-next/calendar.basic.tests.ts +0 -24
  390. package/e2e-next/dateinput.basic.tests.ts +0 -24
  391. package/e2e-next/datepicker.basic.tests.ts +0 -24
  392. package/e2e-next/daterangepicker.basic.tests.ts +0 -24
  393. package/e2e-next/datetimepicker.basic.tests.ts +0 -24
  394. package/e2e-next/timepicker.basic.tests.ts +0 -24
@@ -1,592 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.MultiViewCalendar = exports.MultiViewCalendarPropsContext = exports.MultiViewCalendarWithoutContext = void 0;
30
- var React = require("react");
31
- var PropTypes = require("prop-types");
32
- var kendo_react_intl_1 = require("@progress/kendo-react-intl");
33
- var kendo_react_common_1 = require("@progress/kendo-react-common");
34
- var kendo_date_math_1 = require("@progress/kendo-date-math");
35
- var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
36
- var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
37
- var models_1 = require("../models");
38
- var Header_1 = require("./Header");
39
- var utils_1 = require("../../utils");
40
- var messages_1 = require("../../messages");
41
- var services_1 = require("../services");
42
- var utils_2 = require("../../utils");
43
- var HorizontalViewList_1 = require("./HorizontalViewList");
44
- var TodayCommand_1 = require("./TodayCommand");
45
- var extractDateFromValue = function (min, max, value) {
46
- if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
47
- if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
48
- return value instanceof Date && !Array.isArray(value) && (0, utils_2.isInRange)((0, kendo_date_math_1.getDate)(value), min, max)
49
- ? (0, kendo_date_math_1.getDate)(value)
50
- : null;
51
- };
52
- var extractMultipleFromValue = function (min, max, value) {
53
- if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
54
- if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
55
- return Array.isArray(value)
56
- ? value.filter(function (date) { return (0, utils_2.isInRange)(date, min, max); }).map(function (date) { return (0, kendo_date_math_1.getDate)(date); })
57
- : null;
58
- };
59
- var extractRangeFromValue = function (value) {
60
- return typeof value === 'object' && !(value instanceof Date) && value !== null && !Array.isArray(value)
61
- ? value
62
- : models_1.EMPTY_SELECTIONRANGE;
63
- };
64
- var extractFocusedDate = function (single, multiple, range) {
65
- return single || (multiple && multiple[0]) || (range && range.start);
66
- };
67
- var extractActiveRange = function (range, single) {
68
- return range.start === null && single === null
69
- ? 'start'
70
- : range.end === null
71
- ? 'end'
72
- : 'start';
73
- };
74
- /** @hidden */
75
- var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
76
- __extends(MultiViewCalendarWithoutContext, _super);
77
- function MultiViewCalendarWithoutContext(props) {
78
- var _this = _super.call(this, props) || this;
79
- _this.dates = [];
80
- _this.selectedDate = null;
81
- _this.selectedMultiple = null;
82
- _this.selectedRange = models_1.EMPTY_SELECTIONRANGE;
83
- _this._focusedDate = new Date();
84
- _this.cellUID = (0, kendo_react_common_1.guid)();
85
- _this.activeRangeEnd = 'start';
86
- _this._element = null;
87
- _this.intl = null;
88
- _this.localization = null;
89
- _this.service = null;
90
- _this.wrapperID = (0, kendo_react_common_1.guid)();
91
- _this.calendarViewList = null;
92
- _this.isActive = false;
93
- _this.calculateFocusFromValue = true;
94
- /**
95
- * @hidden
96
- */
97
- _this.focus = function () {
98
- if (_this._element) {
99
- _this._element.focus();
100
- }
101
- };
102
- _this.clampRange = function (value) { return ({ start: value, end: null }); };
103
- _this.rangeWithFocused = function (range, focusedDate) {
104
- return {
105
- start: range.start,
106
- end: range.end === null && range.start !== null && _this.isActive ? focusedDate : range.end
107
- };
108
- };
109
- _this.generateRange = function (candidate, value) {
110
- var end = value.end, start = value.start;
111
- var shouldSwap = value.start !== null && candidate.getTime() <= value.start.getTime();
112
- if (!_this.props.allowReverse && shouldSwap) {
113
- return { start: candidate, end: _this.selectedRange.start };
114
- }
115
- return _this.activeRange !== 'end'
116
- ? ({ start: candidate, end: end })
117
- : ({ start: start || _this.selectedDate, end: candidate });
118
- };
119
- _this.canNavigate = function (action) {
120
- if (!_this.service) {
121
- return false;
122
- }
123
- var candidate = _this.service.move(_this.focusedDate, action);
124
- return (_this.min <= candidate && candidate <= _this.max)
125
- || _this.service.isInSameView(candidate, _this.min)
126
- || _this.service.isInSameView(candidate, _this.max);
127
- };
128
- _this.navigate = function (action, date) {
129
- _this.calculateFocusFromValue = false;
130
- var candidate = _this.move(action, date);
131
- _this.setState({ navigateDate: candidate, focusedDate: candidate });
132
- };
133
- _this.move = function (action, date) {
134
- return _this.clampDate(_this.service.move(date, action));
135
- };
136
- _this.clampDate = function (value) {
137
- return (0, utils_2.dateInRange)(value, _this.min, _this.max);
138
- };
139
- _this.shouldAutoCorrect = function (candidate, value) {
140
- var end = value.end, start = value.start;
141
- if (_this.activeRange !== 'end') {
142
- return end !== null && candidate > end;
143
- }
144
- else {
145
- return start !== null && candidate < start;
146
- }
147
- };
148
- _this.handleCellEnter = function (value) {
149
- if (_this.props.mode === 'range') {
150
- _this.calculateFocusFromValue = false;
151
- _this.setState({
152
- focusedDate: value
153
- });
154
- }
155
- };
156
- _this.handleMouseDown = function (event) {
157
- event.preventDefault();
158
- };
159
- _this.handleClick = function (_) {
160
- if (!_this._element) {
161
- return;
162
- }
163
- _this._element.focus({ preventScroll: true });
164
- };
165
- _this.handleFocus = function (event) {
166
- _this.isActive = true;
167
- if (!_this.calendarViewList) {
168
- return;
169
- }
170
- _this.calendarViewList.focusActiveDate();
171
- var onFocus = _this.props.onFocus;
172
- if (onFocus) {
173
- onFocus.call(undefined, event);
174
- }
175
- };
176
- _this.handleBlur = function (event) {
177
- _this.isActive = false;
178
- if (!_this.calendarViewList) {
179
- return;
180
- }
181
- _this.calendarViewList.blurActiveDate();
182
- var onBlur = _this.props.onBlur;
183
- if (onBlur) {
184
- onBlur.call(undefined, event);
185
- }
186
- };
187
- _this.handleTodayClick = function (event) {
188
- if (!_this.todayIsInRange) {
189
- return;
190
- }
191
- _this.handleDateChange(event);
192
- };
193
- _this.handlePrevButtonClick = function () {
194
- var action = models_1.Action.PrevView;
195
- if (_this.state.activeView > 0 && _this.focusedDate.getFullYear() > _this.dates[0].getFullYear()) {
196
- _this.navigate(action, _this.move(action, _this.focusedDate));
197
- }
198
- else {
199
- var inMonthDate = _this.isInMonth(_this.focusedDate, _this.dates[1])
200
- ? _this.move(action, _this.focusedDate)
201
- : _this.focusedDate;
202
- _this.navigate(action, inMonthDate);
203
- }
204
- };
205
- _this.handleNextButtonClick = function () {
206
- _this.navigate(models_1.Action.NextView, _this.focusedDate);
207
- };
208
- _this.handleKeyDown = function (event) {
209
- var keyCode = event.keyCode;
210
- if (keyCode === kendo_react_common_1.Keys.enter) {
211
- var args = {
212
- syntheticEvent: event,
213
- nativeEvent: event.nativeEvent,
214
- value: _this.focusedDate,
215
- target: _this
216
- };
217
- _this.handleDateChange(args);
218
- }
219
- else {
220
- var candidate = (0, utils_2.dateInRange)(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
221
- if ((0, kendo_date_math_1.isEqualDate)(_this.focusedDate, candidate)) {
222
- return;
223
- }
224
- if (_this.dates && _this.service && !_this.service.isInArray(candidate, _this.dates)) {
225
- _this.setState({ navigateDate: candidate });
226
- }
227
- ;
228
- _this.calculateFocusFromValue = false;
229
- _this.setState({ focusedDate: candidate });
230
- }
231
- event.preventDefault();
232
- };
233
- _this.handleViewChange = function (_a) {
234
- var view = _a.view;
235
- _this.calculateFocusFromValue = false;
236
- _this.setState(function (state) { return ({ activeView: view, navigateDate: state.focusedDate }); });
237
- };
238
- _this.handleDateChange = function (event) {
239
- var focusedDate = (0, kendo_date_math_1.cloneDate)(event.value);
240
- var canNavigateDown = _this.bus.canMoveDown(_this.state.activeView);
241
- if (_this.props.disabled) {
242
- return;
243
- }
244
- if (canNavigateDown) {
245
- if (event.isTodayClick) {
246
- _this.bus.moveToBottom(_this.state.activeView);
247
- }
248
- else {
249
- _this.bus.moveDown(_this.state.activeView, event.syntheticEvent);
250
- _this.setState({ focusedDate: focusedDate });
251
- return;
252
- }
253
- }
254
- _this.calculateFocusFromValue = true;
255
- var value;
256
- switch (_this.props.mode) {
257
- case 'single':
258
- value = (0, kendo_date_math_1.cloneDate)(event.value);
259
- break;
260
- case 'multiple':
261
- if (Array.isArray(_this.selectedMultiple)) {
262
- var result = _this.selectedMultiple.slice();
263
- var index_1 = -1;
264
- result.forEach(function (date, idx) {
265
- if ((0, kendo_date_math_1.isEqualDate)(date, event.value)) {
266
- index_1 = idx;
267
- }
268
- });
269
- index_1 !== -1
270
- ? result.splice(index_1, 1)
271
- : result.push((0, kendo_date_math_1.cloneDate)(event.value));
272
- value = result.slice();
273
- }
274
- else {
275
- if (_this.selectedDate) {
276
- value = [(0, kendo_date_math_1.cloneDate)(_this.selectedDate), (0, kendo_date_math_1.cloneDate)(event.value)];
277
- }
278
- else {
279
- value = [(0, kendo_date_math_1.cloneDate)(event.value)];
280
- }
281
- }
282
- break;
283
- case 'range':
284
- var hasSelection = _this.selectedRange.start !== null
285
- && _this.selectedRange.end !== null
286
- && _this.activeRange === 'start';
287
- value = hasSelection
288
- ? _this.clampRange(event.value)
289
- : _this.generateRange(event.value, _this.selectedRange);
290
- _this.activeRangeEnd = _this.activeRange !== 'end' ? 'end' : 'start';
291
- break;
292
- default:
293
- value = (0, kendo_date_math_1.cloneDate)(event.value);
294
- break;
295
- }
296
- _this.valueDuringOnChange = value;
297
- if (event.isTodayClick) {
298
- _this.setState({ navigateDate: focusedDate });
299
- }
300
- _this.setState({ value: value, focusedDate: focusedDate });
301
- _this.valueDuringOnChange = value;
302
- var onChange = _this.props.onChange;
303
- if (onChange) {
304
- var args = {
305
- syntheticEvent: event.syntheticEvent,
306
- nativeEvent: event.nativeEvent,
307
- value: value,
308
- target: _this
309
- };
310
- onChange.call(undefined, args);
311
- }
312
- _this.valueDuringOnChange = undefined;
313
- };
314
- var value = props.value !== undefined
315
- ? props.value
316
- : props.defaultValue || MultiViewCalendarWithoutContext.defaultProps.defaultValue;
317
- var selectedDate = extractDateFromValue(_this.min, _this.max, value);
318
- var selectedMultiple = extractMultipleFromValue(_this.min, _this.max, value);
319
- var selectedRange = extractRangeFromValue(value);
320
- var calculatedFocus = extractFocusedDate(selectedDate, selectedMultiple, selectedRange);
321
- var activeView = (0, utils_2.viewInRange)(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView);
322
- var focusedDate = (0, utils_2.dateInRange)(props.focusedDate || calculatedFocus || (0, utils_2.getToday)(), _this.min, _this.max);
323
- _this.state = {
324
- value: value,
325
- activeView: activeView,
326
- focusedDate: focusedDate,
327
- navigateDate: focusedDate
328
- };
329
- _this.activeRangeEnd = extractActiveRange(selectedRange, selectedDate);
330
- _this.bus = new services_1.BusViewService(_this.handleViewChange);
331
- _this.navigation = new services_1.NavigationService(_this.bus);
332
- _this.calculateFocusFromValue = false;
333
- _this.lastView = activeView;
334
- _this.lastViewsCount = _this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views;
335
- return _this;
336
- }
337
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "isRtl", {
338
- get: function () {
339
- return this.props.dir === 'rtl';
340
- },
341
- enumerable: false,
342
- configurable: true
343
- });
344
- ;
345
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "element", {
346
- /**
347
- * Gets the wrapping element of the MultiViewCalendar component.
348
- */
349
- get: function () {
350
- return this._element;
351
- },
352
- enumerable: false,
353
- configurable: true
354
- });
355
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "value", {
356
- /**
357
- * Gets the value of the MultiViewCalendar.
358
- */
359
- get: function () {
360
- return this.valueDuringOnChange !== undefined
361
- ? this.valueDuringOnChange
362
- : this.props.value !== undefined
363
- ? this.props.value
364
- : this.state.value;
365
- },
366
- enumerable: false,
367
- configurable: true
368
- });
369
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "focusedDate", {
370
- /**
371
- * Gets the current focused date of the MultiViewCalendar.
372
- */
373
- get: function () {
374
- return (0, kendo_date_math_1.cloneDate)(this._focusedDate);
375
- },
376
- enumerable: false,
377
- configurable: true
378
- });
379
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "min", {
380
- get: function () {
381
- return (0, kendo_date_math_1.getDate)(this.props.min !== undefined
382
- ? this.props.min
383
- : MultiViewCalendarWithoutContext.defaultProps.min);
384
- },
385
- enumerable: false,
386
- configurable: true
387
- });
388
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "max", {
389
- get: function () {
390
- return (0, kendo_date_math_1.getDate)(this.props.max !== undefined
391
- ? this.props.max
392
- : MultiViewCalendarWithoutContext.defaultProps.max);
393
- },
394
- enumerable: false,
395
- configurable: true
396
- });
397
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "bottomView", {
398
- get: function () {
399
- return models_1.CalendarViewEnum[this.props.bottomView !== undefined
400
- ? this.props.bottomView
401
- : MultiViewCalendarWithoutContext.defaultProps.bottomView];
402
- },
403
- enumerable: false,
404
- configurable: true
405
- });
406
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "topView", {
407
- get: function () {
408
- return models_1.CalendarViewEnum[this.props.topView !== undefined
409
- ? this.props.topView
410
- : MultiViewCalendarWithoutContext.defaultProps.topView];
411
- },
412
- enumerable: false,
413
- configurable: true
414
- });
415
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "activeRange", {
416
- get: function () {
417
- return this.props.activeRangeEnd !== undefined
418
- ? this.props.activeRangeEnd
419
- : this.activeRangeEnd;
420
- },
421
- enumerable: false,
422
- configurable: true
423
- });
424
- Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "todayIsInRange", {
425
- get: function () {
426
- return (0, utils_2.isInRange)((0, utils_2.getToday)(), (0, kendo_date_math_1.getDate)(this.min), (0, kendo_date_math_1.getDate)(this.max));
427
- },
428
- enumerable: false,
429
- configurable: true
430
- });
431
- /**
432
- * @hidden
433
- */
434
- MultiViewCalendarWithoutContext.prototype.componentDidMount = function () {
435
- this.calculateFocusFromValue = true;
436
- };
437
- /**
438
- * @hidden
439
- */
440
- MultiViewCalendarWithoutContext.prototype.componentDidUpdate = function () {
441
- if (this.calendarViewList) {
442
- (this.isActive ? this.calendarViewList.focusActiveDate : this.calendarViewList.blurActiveDate)();
443
- }
444
- var stateValue = extractDateFromValue(this.min, this.max, this.value);
445
- this.calculateFocusFromValue = Boolean(this.selectedDate
446
- && stateValue
447
- && (this.selectedDate.getTime() && stateValue.getTime()));
448
- this.lastView = this.state.activeView;
449
- this.lastViewsCount = this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views;
450
- };
451
- /**
452
- * @hidden
453
- */
454
- MultiViewCalendarWithoutContext.prototype.render = function () {
455
- var _this = this;
456
- if (this.props._ref) {
457
- this.props._ref(this);
458
- }
459
- this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
460
- this.localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
461
- this.bus.configure(this.bottomView, this.topView);
462
- var activeView = (0, utils_2.viewInRange)(this.state.activeView, this.bottomView, this.topView);
463
- this.service = this.bus.service(activeView, this.intl);
464
- // console.log('this.service', this.service);
465
- this.selectedDate = extractDateFromValue(this.min, this.max, this.value);
466
- this.selectedMultiple = extractMultipleFromValue(this.min, this.max, this.value);
467
- this.selectedRange = extractRangeFromValue(this.value);
468
- var calculatedFocus = extractFocusedDate(this.selectedDate, this.selectedMultiple, this.selectedRange);
469
- this._focusedDate = (0, utils_2.dateInRange)(this.calculateFocusFromValue && calculatedFocus !== null
470
- ? calculatedFocus
471
- : this.state.focusedDate, this.min, this.max);
472
- var wrapperClassName = (0, kendo_react_common_1.classNames)('k-widget k-calendar k-calendar-range', {
473
- 'k-disabled': this.props.disabled
474
- }, this.props.className);
475
- var visualizedRange = this.rangeWithFocused(this.selectedRange, this.focusedDate);
476
- var prevViewTitle = this.localization.toLanguageString(messages_1.prevView, messages_1.messages[messages_1.prevView]);
477
- var nextViewTittle = this.localization.toLanguageString(messages_1.nextView, messages_1.messages[messages_1.nextView]);
478
- var isPrevDisabled = !this.canNavigate(models_1.Action.PrevView);
479
- var isNextDisabled = !this.canNavigate(models_1.Action.NextView);
480
- var prevBtnAria = { 'aria-disabled': isPrevDisabled };
481
- var nextBtnAria = { 'aria-disabled': isNextDisabled };
482
- var didViewChange = this.lastView !== activeView;
483
- var isDateInMonth = this.dates && this.isInMonth(this.state.navigateDate, this.dates[0]);
484
- var didViewsCountChange = this.lastViewsCount !== this.props.views;
485
- if (!isDateInMonth || didViewChange || didViewsCountChange) {
486
- this.dates = this.service.datesList(this.state.navigateDate, this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views);
487
- }
488
- var activeDate = (0, kendo_date_math_1.cloneDate)(this.dates && this.dates[0] ? this.dates[0] : (0, utils_2.getToday)());
489
- return (React.createElement("div", { ref: function (el) { _this._element = el; }, className: wrapperClassName, id: this.props.id || this.wrapperID, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, tabIndex: !this.props.disabled ? this.props.tabIndex : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-disabled": this.props.disabled, dir: this.props.dir },
490
- React.createElement(Header_1.Header, { key: ".kendo.calendar.header.".concat(activeDate.getTime()), activeView: activeView, currentDate: activeDate, min: this.min, max: this.max, rangeLength: this.props.views, bus: this.bus, service: this.service, headerTitle: this.props.headerTitle, verticalView: this.props.mobileMode, commands: (React.createElement(React.Fragment, null,
491
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-calendar-nav-prev", icon: this.isRtl ? 'chevron-right' : 'chevron-left', svgIcon: this.isRtl ? kendo_svg_icons_1.chevronRightIcon : kendo_svg_icons_1.chevronLeftIcon, fillMode: "flat", title: prevViewTitle, disabled: isPrevDisabled, onClick: this.handlePrevButtonClick }, prevBtnAria)),
492
- React.createElement(TodayCommand_1.TodayCommand, { min: this.min, max: this.max, onClick: this.handleTodayClick, disabled: !this.todayIsInRange }),
493
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-calendar-nav-next", icon: this.isRtl ? 'chevron-left' : 'chevron-right', svgIcon: this.isRtl ? kendo_svg_icons_1.chevronLeftIcon : kendo_svg_icons_1.chevronRightIcon, fillMode: "flat", title: nextViewTittle, disabled: isNextDisabled, onClick: this.handleNextButtonClick }, nextBtnAria)))) }),
494
- React.createElement(HorizontalViewList_1.HorizontalViewList, { ref: function (el) { _this.calendarViewList = el; }, dates: this.dates, activeView: activeView, focusedDate: this.focusedDate, min: this.min, max: this.max, bus: this.bus, service: this.service, selectionRange: visualizedRange, value: this.selectedMultiple || this.selectedDate, cellUID: this.cellUID, views: this.props.views, onChange: this.handleDateChange, showWeekNumbers: this.props.weekNumber, onCellEnter: this.handleCellEnter, cell: this.props.cell, weekCell: this.props.weekCell, headerTitle: this.props.headerTitle, verticalView: this.props.mobileMode })));
495
- };
496
- // protected isListInRange = (list: Date[]): boolean => {
497
- // return this.min < list[0]
498
- // && this.max > list[Math.max(0, (this.props.views || MultiViewCalendarWithoutContext.defaultProps.views) - 1)];
499
- // };
500
- MultiViewCalendarWithoutContext.prototype.isInMonth = function (date, month) {
501
- return !!month && (0, kendo_date_math_1.firstDayOfMonth)(month) <= date && date <= (0, kendo_date_math_1.lastDayOfMonth)(month);
502
- };
503
- /**
504
- * @hidden
505
- */
506
- MultiViewCalendarWithoutContext.displayName = 'MultiViewCalendar';
507
- /**
508
- * @hidden
509
- */
510
- MultiViewCalendarWithoutContext.propTypes = {
511
- activeRangeEnd: PropTypes.oneOf(['start', 'end']),
512
- allowReverse: PropTypes.bool,
513
- bottomView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
514
- className: PropTypes.string,
515
- defaultActiveView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
516
- defaultValue: PropTypes.oneOfType([
517
- (0, utils_2.nullable)(PropTypes.instanceOf(Date)),
518
- PropTypes.arrayOf(PropTypes.instanceOf(Date)),
519
- PropTypes.shape({
520
- start: (0, utils_2.nullable)(PropTypes.instanceOf(Date)),
521
- end: (0, utils_2.nullable)(PropTypes.instanceOf(Date))
522
- })
523
- ]),
524
- disabled: PropTypes.bool,
525
- focusedDate: PropTypes.instanceOf(Date),
526
- id: PropTypes.string,
527
- ariaLabelledBy: PropTypes.string,
528
- ariaDescribedBy: PropTypes.string,
529
- max: PropTypes.instanceOf(Date),
530
- min: PropTypes.instanceOf(Date),
531
- mode: PropTypes.oneOf(['single', 'multiple', 'range']),
532
- onBlur: PropTypes.func,
533
- onChange: PropTypes.func,
534
- onFocus: PropTypes.func,
535
- tabIndex: PropTypes.number,
536
- topView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
537
- value: PropTypes.oneOfType([
538
- (0, utils_2.nullable)(PropTypes.instanceOf(Date)),
539
- PropTypes.arrayOf(PropTypes.instanceOf(Date)),
540
- PropTypes.shape({
541
- start: (0, utils_2.nullable)(PropTypes.instanceOf(Date).isRequired),
542
- end: (0, utils_2.nullable)(PropTypes.instanceOf(Date).isRequired)
543
- })
544
- ]),
545
- views: function (props, propName, componentName) {
546
- var views = props[propName];
547
- if (views !== undefined && views < 1) {
548
- return new Error("Invalid prop '".concat(propName, "' supplied to") +
549
- "'".concat(componentName, "'. The '").concat(propName, "' property cannot be less than 1'"));
550
- }
551
- return null;
552
- },
553
- weekNumber: PropTypes.bool,
554
- dir: PropTypes.string
555
- };
556
- /**
557
- * @hidden
558
- */
559
- MultiViewCalendarWithoutContext.defaultProps = {
560
- disabled: false,
561
- min: utils_1.MIN_DATE,
562
- max: utils_1.MAX_DATE,
563
- navigation: true,
564
- defaultActiveView: 'month',
565
- defaultValue: null,
566
- topView: 'century',
567
- tabIndex: 0,
568
- bottomView: 'month',
569
- views: 2,
570
- allowReverse: false
571
- };
572
- return MultiViewCalendarWithoutContext;
573
- }(React.Component));
574
- exports.MultiViewCalendarWithoutContext = MultiViewCalendarWithoutContext;
575
- /**
576
- * Represents the PropsContext of the `MultiViewCalendar` component.
577
- * Used for global configuration of all `MultiViewCalendar` instances.
578
- *
579
- * For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
580
- */
581
- exports.MultiViewCalendarPropsContext = (0, kendo_react_common_1.createPropsContext)();
582
- /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
583
- /**
584
- * Represents the KendoReact MultiViewCalendar Component.
585
- *
586
- * Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
587
- * Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
588
- */
589
- exports.MultiViewCalendar = (0, kendo_react_common_1.withPropsContext)(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
590
- exports.MultiViewCalendar.displayName = 'KendoReactMultiViewCalendar';
591
- (0, kendo_react_intl_1.registerForIntl)(MultiViewCalendarWithoutContext);
592
- (0, kendo_react_intl_1.registerForLocalization)(MultiViewCalendarWithoutContext);