@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,302 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var _a, _b;
17
- import * as React from 'react';
18
- import * as PropTypes from 'prop-types';
19
- import { cloneDate } from '@progress/kendo-date-math';
20
- import { getActiveElement, Keys, noop } from '@progress/kendo-react-common';
21
- import { provideIntlService, registerForIntl } from '@progress/kendo-react-intl';
22
- import { Virtualization } from '../virtualization/Virtualization';
23
- import { TIME_PART } from './models';
24
- import { SecondsService, MinutesService, HoursService, DayPeriodService, DOMService } from './services';
25
- import { debounce, MAX_TIME, MIDNIGHT_DATE } from '../utils';
26
- var SCROLL_THRESHOLD = 2; // < 2px threshold
27
- var SNAP_THRESHOLD = 0.05; // % of the item height
28
- var SCROLL_THROTTLE = 100; // ms
29
- var SKIP = 0;
30
- var MOBILE_MODE_OFFSET = 9;
31
- var getters = (_a = {},
32
- _a[Keys.end] = function (data, _) { return data[data.length - 1]; },
33
- _a[Keys.home] = function (data, _) { return data[0]; },
34
- _a[Keys.up] = function (data, index) { return data[index - 1]; },
35
- _a[Keys.down] = function (data, index) { return data[index + 1]; },
36
- _a);
37
- var services = (_b = {},
38
- _b[TIME_PART.dayperiod] = DayPeriodService,
39
- _b[TIME_PART.hour] = HoursService,
40
- _b[TIME_PART.minute] = MinutesService,
41
- _b[TIME_PART.second] = SecondsService,
42
- _b);
43
- /**
44
- * @hidden
45
- */
46
- var TimeList = /** @class */ (function (_super) {
47
- __extends(TimeList, _super);
48
- function TimeList(props) {
49
- var _this = _super.call(this, props) || this;
50
- _this.intl = null;
51
- _this._element = null;
52
- _this.service = null;
53
- _this.virtualization = null;
54
- _this.topOffset = 0;
55
- _this.bottomOffset = 0;
56
- _this.itemHeight = 0;
57
- _this.listHeight = 0;
58
- _this.topThreshold = 0;
59
- _this.bottomThreshold = 0;
60
- _this.animateToIndex = false;
61
- _this.focus = function (args) {
62
- Promise.resolve().then(function () {
63
- if (!_this.element) {
64
- return;
65
- }
66
- _this.element.focus(args);
67
- });
68
- };
69
- _this.itemOffset = function (scrollTop) {
70
- if (!_this.virtualization || !_this.service) {
71
- return -1;
72
- }
73
- var valueIndex = _this.service.selectedIndex(_this.props.value);
74
- var activeIndex = _this.virtualization.activeIndex();
75
- var offset = _this.virtualization.itemOffset(activeIndex);
76
- var distance = Math.abs(Math.ceil(scrollTop) - offset);
77
- if (valueIndex === activeIndex && distance < SCROLL_THRESHOLD) {
78
- return offset;
79
- }
80
- var scrollUp = valueIndex > activeIndex;
81
- var moveToNext = scrollUp && distance >= _this.bottomThreshold || !scrollUp && distance > _this.topThreshold;
82
- return moveToNext ? _this.virtualization.itemOffset(activeIndex + 1) : offset;
83
- };
84
- _this.calculateHeights = function () {
85
- if (!_this.dom.didCalculate) {
86
- return;
87
- }
88
- _this.itemHeight = _this.dom.itemHeight;
89
- _this.listHeight = _this.dom.timeListHeight;
90
- _this.topOffset = (_this.listHeight - _this.itemHeight) / 2;
91
- _this.bottomOffset = _this.listHeight - _this.itemHeight;
92
- if (_this.props.mobileMode) {
93
- _this.topOffset += MOBILE_MODE_OFFSET;
94
- _this.bottomOffset += MOBILE_MODE_OFFSET * 2;
95
- }
96
- _this.topThreshold = _this.itemHeight * SNAP_THRESHOLD;
97
- _this.bottomThreshold = _this.itemHeight * (1 - SNAP_THRESHOLD);
98
- };
99
- _this.configureServices = function (_a) {
100
- var _b = _a === void 0 ? _this.props : _a, min = _b.min, max = _b.max, value = _b.value;
101
- if (_this.service) {
102
- var _c = _this.service.limitRange(min || _this.min, max || _this.max, value || _this.props.value), newMin = _c[0], newMax = _c[1];
103
- _this.service.configure(_this.serviceSettings({ min: newMin, max: newMax }));
104
- }
105
- };
106
- _this.serviceSettings = function (settings) {
107
- var defaults = {
108
- boundRange: _this.props.boundRange || TimeList.defaultProps.boundRange,
109
- insertUndividedMax: false,
110
- min: cloneDate(_this.min),
111
- max: cloneDate(_this.max),
112
- part: _this.props.part,
113
- step: _this.step
114
- };
115
- var result = Object.assign({}, defaults, settings);
116
- result.boundRange = result.part.type !== 'hour' || _this.props.boundRange || TimeList.defaultProps.boundRange;
117
- return result;
118
- };
119
- _this.handleScrollAction = function (_a) {
120
- var target = _a.target, animationInProgress = _a.animationInProgress;
121
- if (!_this.virtualization || !_this.service) {
122
- return;
123
- }
124
- if (target && !animationInProgress) {
125
- _this.animateToIndex = false;
126
- var index = _this.virtualization.itemIndex(_this.itemOffset(target.scrollTop));
127
- var dataItem = _this.service.data(_this.props.value)[index];
128
- _this.handleChange(dataItem);
129
- }
130
- };
131
- _this.handleFocus = function (event) {
132
- var onFocus = _this.props.onFocus;
133
- if (onFocus) {
134
- onFocus.call(undefined, event);
135
- }
136
- };
137
- _this.handleBlur = function (event) {
138
- var onBlur = _this.props.onBlur;
139
- if (onBlur) {
140
- onBlur.call(undefined, event);
141
- }
142
- };
143
- _this.handleMouseOver = function () {
144
- if (!_this._element) {
145
- return;
146
- }
147
- var activeElement = getActiveElement(document);
148
- if (document && activeElement !== _this._element && _this.props.show) {
149
- _this._element.focus({ preventScroll: true });
150
- }
151
- };
152
- _this.handleKeyDown = function (event) {
153
- if (!_this.service) {
154
- return;
155
- }
156
- var keyCode = event.keyCode;
157
- if (keyCode === Keys.down
158
- || keyCode === Keys.up
159
- || keyCode === Keys.end
160
- || keyCode === Keys.home) {
161
- event.preventDefault();
162
- }
163
- var getter = getters[event.keyCode] || noop;
164
- var dataItem = getter(_this.service.data(_this.props.value), _this.service.selectedIndex(_this.props.value));
165
- if (dataItem) {
166
- _this.handleChange(dataItem);
167
- }
168
- };
169
- _this.handleChange = debounce(function (dataItem) {
170
- if (!_this.service) {
171
- return;
172
- }
173
- var candidate = _this.service.apply(_this.props.value, dataItem.value);
174
- if (_this.props.value.getTime() === candidate.getTime()) {
175
- return;
176
- }
177
- var onChange = _this.props.onChange;
178
- if (onChange) {
179
- onChange.call(undefined, candidate);
180
- }
181
- }, SCROLL_THROTTLE);
182
- _this.dom = new DOMService();
183
- return _this;
184
- }
185
- Object.defineProperty(TimeList.prototype, "element", {
186
- get: function () {
187
- return this._element;
188
- },
189
- enumerable: false,
190
- configurable: true
191
- });
192
- Object.defineProperty(TimeList.prototype, "animate", {
193
- get: function () {
194
- return Boolean(this.props.smoothScroll && this.animateToIndex);
195
- },
196
- enumerable: false,
197
- configurable: true
198
- });
199
- Object.defineProperty(TimeList.prototype, "min", {
200
- get: function () {
201
- return this.props.min || TimeList.defaultProps.min;
202
- },
203
- enumerable: false,
204
- configurable: true
205
- });
206
- Object.defineProperty(TimeList.prototype, "max", {
207
- get: function () {
208
- return this.props.max || TimeList.defaultProps.max;
209
- },
210
- enumerable: false,
211
- configurable: true
212
- });
213
- Object.defineProperty(TimeList.prototype, "step", {
214
- get: function () {
215
- return this.props.step !== undefined && this.props.step !== 0
216
- ? Math.floor(this.props.step)
217
- : TimeList.defaultProps.step;
218
- },
219
- enumerable: false,
220
- configurable: true
221
- });
222
- /**
223
- * @hidden
224
- */
225
- TimeList.prototype.componentDidMount = function () {
226
- var _this = this;
227
- // Async calculation of height to avoid animation cancellation
228
- Promise.resolve().then(function () {
229
- if (!_this._element) {
230
- return;
231
- }
232
- _this.dom.calculateHeights(_this._element);
233
- _this.forceUpdate();
234
- });
235
- };
236
- /**
237
- * @hidden
238
- */
239
- TimeList.prototype.componentDidUpdate = function () {
240
- if (!this.virtualization || !this.service) {
241
- return;
242
- }
243
- var index = this.service.selectedIndex(this.props.value);
244
- this.virtualization[this.animate ? 'animateToIndex' : 'scrollToIndex'](index);
245
- this.animateToIndex = true;
246
- };
247
- /**
248
- * @hidden
249
- */
250
- TimeList.prototype.render = function () {
251
- var _this = this;
252
- if (!this.props.part.type || !services[this.props.part.type]) {
253
- return;
254
- }
255
- this.calculateHeights();
256
- this.intl = provideIntlService(this);
257
- this.service = new services[this.props.part.type](this.intl);
258
- this.configureServices();
259
- var data = this.service.data(this.props.value);
260
- var transform = 'translateY(' + this.topOffset + 'px)';
261
- var total = this.service.total(this.props.value);
262
- var list = (React.createElement("ul", { style: { transform: transform, msTransform: transform }, className: "k-reset" }, data.map(function (item, idx) {
263
- return (React.createElement("li", { key: idx, className: "k-item", onClick: function () { _this.handleChange(item); } },
264
- React.createElement("span", null, item.text)));
265
- })));
266
- return (React.createElement("div", { className: "k-time-list", id: String(this.props.id || ''), tabIndex: this.props.disabled ? -1 : 0, ref: function (el) { _this._element = el; }, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseOver: this.handleMouseOver }, this.dom.didCalculate
267
- ? (React.createElement(Virtualization, { bottomOffset: this.bottomOffset, children: list, className: "k-time-container", itemHeight: this.itemHeight, maxScrollDifference: this.listHeight, onScrollAction: this.handleScrollAction, ref: function (el) { _this.virtualization = el; }, role: "presentation", skip: SKIP, tabIndex: -1, take: total, topOffset: this.topOffset, total: total }))
268
- : (React.createElement("div", { className: "k-time-container" }, list))));
269
- };
270
- TimeList.propTypes = {
271
- id: PropTypes.number,
272
- max: PropTypes.instanceOf(Date),
273
- min: PropTypes.instanceOf(Date),
274
- part: function (props, propName, componentName) {
275
- var prop = props[propName];
276
- if (!prop || !services[prop.type]) {
277
- throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n Supported part types are hour|minute|second|dayperiod.\n "));
278
- }
279
- return null;
280
- },
281
- step: function (props, propName, componentName) {
282
- var prop = props[propName];
283
- if (prop !== undefined && prop <= 0) {
284
- throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n ").concat(propName, " cannot be less than 1.\n "));
285
- }
286
- return null;
287
- },
288
- value: PropTypes.instanceOf(Date),
289
- smoothScroll: PropTypes.bool,
290
- show: PropTypes.bool
291
- };
292
- TimeList.defaultProps = {
293
- boundRange: false,
294
- max: MAX_TIME,
295
- min: MIDNIGHT_DATE,
296
- step: 1,
297
- smoothScroll: true
298
- };
299
- return TimeList;
300
- }(React.Component));
301
- export { TimeList };
302
- registerForIntl(TimeList);
@@ -1,307 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- import * as React from 'react';
28
- import * as PropTypes from 'prop-types';
29
- import { cloneDate } from '@progress/kendo-date-math';
30
- import { classNames, getActiveElement, Keys } from '@progress/kendo-react-common';
31
- import { provideIntlService, provideLocalizationService, registerForIntl, registerForLocalization } from '@progress/kendo-react-intl';
32
- import { messages, now, selectNow } from '../messages';
33
- import { TimeList } from './TimeList';
34
- import { MIDNIGHT_DATE, MIN_TIME, MAX_TIME } from '../utils';
35
- import { TIME_PART } from './models/TimePart';
36
- import { generateSnappers, getNow, isInTimeRange, snapTime, timeInRange } from './utils';
37
- import { Button } from '@progress/kendo-react-buttons';
38
- var formatRegExp = new RegExp("".concat(TIME_PART.hour, "|").concat(TIME_PART.minute, "|").concat(TIME_PART.second, "|").concat(TIME_PART.dayperiod, "|literal"));
39
- /**
40
- * @hidden
41
- */
42
- export var Direction;
43
- (function (Direction) {
44
- Direction[Direction["Left"] = 0] = "Left";
45
- Direction[Direction["Right"] = 1] = "Right";
46
- })(Direction || (Direction = {}));
47
- /**
48
- * @hidden
49
- */
50
- var TimePart = /** @class */ (function (_super) {
51
- __extends(TimePart, _super);
52
- function TimePart(props) {
53
- var _this = _super.call(this, props) || this;
54
- _this._element = null;
55
- _this._nowButton = null;
56
- _this.dateFormatParts = [];
57
- _this.timeLists = [];
58
- _this.focus = function (args) {
59
- Promise.resolve().then(function () {
60
- var timeList = _this.timeLists[0];
61
- if ((_this.state.activeListIndex === -1) && !_this.hasActiveButton() && timeList && timeList.element) {
62
- timeList.focus(args);
63
- }
64
- });
65
- };
66
- _this.timeFormatReducer = function (acc, current) { return acc + current.pattern; };
67
- // Filtering only the time part of the format.
68
- // Literal types are added if the previous part is
69
- // part of a time format.
70
- _this.timeFormatFilter = function (part, index, all) {
71
- var prevItem = index >= 1 && all[index - 1];
72
- if (!prevItem) {
73
- return formatRegExp.test(part.type || '');
74
- }
75
- if (prevItem && part.type === 'literal') {
76
- return formatRegExp.test(prevItem.type || '');
77
- }
78
- return formatRegExp.test(part.type || '');
79
- };
80
- _this.focusList = function (dir) {
81
- if (!_this.timeLists.length) {
82
- return;
83
- }
84
- _this.timeLists.reduce(_this.listReducer, ([]))
85
- .map(function (state) { return dir === Direction.Right ? state.next : state.prev; })
86
- .map(function (list) { return list && list.element && list.element.focus({ preventScroll: true }); });
87
- };
88
- _this.listReducer = function (state, list, idx, all) {
89
- if (state.length || list.props.id !== _this.state.activeListIndex) {
90
- return state;
91
- }
92
- return [{
93
- next: all[idx + 1] || list,
94
- prev: all[idx - 1] || list
95
- }];
96
- };
97
- _this.showNowButton = function () {
98
- return !_this.hasSteps() && _this.props.nowButton && isInTimeRange(getNow(), _this.min, _this.max);
99
- };
100
- _this.handleKeyDown = function (event) {
101
- var keyCode = event.keyCode;
102
- switch (keyCode) {
103
- case Keys.left:
104
- event.preventDefault();
105
- _this.focusList(Direction.Left);
106
- return;
107
- case Keys.right:
108
- event.preventDefault();
109
- _this.focusList(Direction.Right);
110
- return;
111
- default:
112
- return;
113
- }
114
- };
115
- _this.handleListBlur = function () {
116
- _this.nextTick(function () {
117
- _this.setState({ activeListIndex: -1 });
118
- });
119
- };
120
- _this.handleListFocus = function (idx) {
121
- clearTimeout(_this.nextTickId);
122
- _this.setState({
123
- activeListIndex: idx
124
- });
125
- };
126
- _this.handleChange = function (candidate) {
127
- var onChange = _this.props.onChange;
128
- if (onChange) {
129
- onChange.call(undefined, candidate);
130
- }
131
- };
132
- _this.snapTime = snapTime(generateSnappers(_this.props.steps, _this.props.min || TimePart.defaultProps.min));
133
- _this.state = {
134
- activeListIndex: -1
135
- };
136
- _this.hasActiveButton = _this.hasActiveButton.bind(_this);
137
- return _this;
138
- }
139
- Object.defineProperty(TimePart.prototype, "element", {
140
- /**
141
- * @hidden
142
- */
143
- get: function () {
144
- return this._element;
145
- },
146
- enumerable: false,
147
- configurable: true
148
- });
149
- Object.defineProperty(TimePart.prototype, "value", {
150
- get: function () {
151
- return timeInRange(this.snapTime(cloneDate(this.props.value || MIDNIGHT_DATE)), this.min, this.max);
152
- },
153
- enumerable: false,
154
- configurable: true
155
- });
156
- Object.defineProperty(TimePart.prototype, "intl", {
157
- get: function () {
158
- return provideIntlService(this);
159
- },
160
- enumerable: false,
161
- configurable: true
162
- });
163
- Object.defineProperty(TimePart.prototype, "min", {
164
- get: function () {
165
- return this.snapTime(this.props.min || TimePart.defaultProps.min);
166
- },
167
- enumerable: false,
168
- configurable: true
169
- });
170
- Object.defineProperty(TimePart.prototype, "max", {
171
- get: function () {
172
- return this.snapTime(this.props.max || TimePart.defaultProps.max);
173
- },
174
- enumerable: false,
175
- configurable: true
176
- });
177
- Object.defineProperty(TimePart.prototype, "steps", {
178
- get: function () {
179
- return this.props.steps || TimePart.defaultProps.steps;
180
- },
181
- enumerable: false,
182
- configurable: true
183
- });
184
- Object.defineProperty(TimePart.prototype, "boundRange", {
185
- get: function () {
186
- return this.props.boundRange !== undefined
187
- ? this.props.boundRange
188
- : TimePart.defaultProps.boundRange;
189
- },
190
- enumerable: false,
191
- configurable: true
192
- });
193
- /**
194
- * @hidden
195
- */
196
- TimePart.prototype.componentWillUnmount = function () {
197
- clearTimeout(this.nextTickId);
198
- };
199
- TimePart.prototype.componentDidMount = function () {
200
- var onMount = this.props.onMount;
201
- if (onMount) {
202
- onMount.call(undefined, this.value);
203
- }
204
- };
205
- /**
206
- * @hidden
207
- */
208
- TimePart.prototype.render = function () {
209
- var _this = this;
210
- var _a = this.props, format = _a.format, smoothScroll = _a.smoothScroll, onNowClick = _a.onNowClick, className = _a.className, disabled = _a.disabled, mobileMode = _a.mobileMode, show = _a.show;
211
- this.snapTime = snapTime(generateSnappers(this.steps, this.min));
212
- this.dateFormatParts = this.intl
213
- .splitDateFormat(format || TimePart.defaultProps.format)
214
- .filter(this.timeFormatFilter);
215
- var rootClassName = classNames({
216
- 'k-disabled': disabled,
217
- 'k-time-part': mobileMode
218
- }, className);
219
- this.timeLists = [];
220
- var localizationService = provideLocalizationService(this);
221
- var selectNowMessage = localizationService.toLanguageString(selectNow, messages[selectNow]);
222
- return (React.createElement("div", { className: rootClassName },
223
- React.createElement("div", { className: "k-time-header" },
224
- React.createElement("span", { className: "k-title" }, this.intl.formatDate(this.value, this.dateFormatParts.reduce(this.timeFormatReducer, ''))),
225
- this.showNowButton() &&
226
- React.createElement(Button, __assign({ type: "button", ref: function (btn) { _this._nowButton = btn; }, className: "k-time-now", fillMode: "flat", themeColor: 'primary', title: selectNowMessage }, { 'aria-label': selectNowMessage }, { onClick: onNowClick, tabIndex: disabled ? -1 : 0 }), localizationService.toLanguageString(now, messages[now]))),
227
- React.createElement("div", { className: "k-time-list-container", onKeyDown: this.handleKeyDown },
228
- React.createElement("span", { className: "k-time-highlight" }),
229
- this.dateFormatParts.map(function (part, idx) {
230
- return (part.type !== 'literal'
231
- ? React.createElement("div", { key: idx, className: classNames('k-time-list-wrapper', {
232
- 'k-focus': idx === _this.state.activeListIndex
233
- }), role: "presentation", tabIndex: -1 },
234
- React.createElement("span", { className: "k-title", onMouseDown: function (e) { e.preventDefault(); } }, _this.intl.dateFieldName(part)),
235
- React.createElement(TimeList, { min: _this.min, max: _this.max, boundRange: _this.boundRange, part: part, step: part.type ? _this.steps[part.type] : 1, smoothScroll: smoothScroll, ref: function (el) { if (!el) {
236
- return;
237
- } _this.timeLists.push(el); }, id: idx, onFocus: function () { _this.handleListFocus(idx); }, onBlur: _this.handleListBlur, onChange: _this.handleChange, value: _this.value, disabled: disabled, show: show, mobileMode: mobileMode }))
238
- : React.createElement("div", { key: idx, className: "k-time-separator" }, part.pattern));
239
- }))));
240
- };
241
- TimePart.prototype.nextTick = function (f) {
242
- // XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
243
- // XXX: https://github.com/facebook/react/issues/3751
244
- clearTimeout(this.nextTickId);
245
- this.nextTickId = window.setTimeout(function () { return f(); });
246
- };
247
- TimePart.prototype.hasActiveButton = function () {
248
- var activeElement = getActiveElement(document);
249
- return (this._nowButton && activeElement === this._nowButton.element);
250
- };
251
- TimePart.prototype.hasSteps = function () {
252
- var _this = this;
253
- var keys = Object.keys(this.steps);
254
- return keys.length !== keys.reduce(function (acc, k) { return acc + _this.steps[k]; }, 0);
255
- };
256
- TimePart.propTypes = {
257
- cancelButton: PropTypes.bool,
258
- disabled: PropTypes.bool,
259
- format: PropTypes.oneOfType([
260
- PropTypes.string,
261
- PropTypes.shape({
262
- skeleton: PropTypes.string,
263
- pattern: PropTypes.string,
264
- date: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
265
- time: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
266
- datetime: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
267
- era: PropTypes.oneOf(['narrow', 'short', 'long']),
268
- year: PropTypes.oneOf(['numeric', '2-digit']),
269
- month: PropTypes.oneOf(['numeric', '2-digit', 'narrow', 'short', 'long']),
270
- day: PropTypes.oneOf(['numeric', '2-digit']),
271
- weekday: PropTypes.oneOf(['narrow', 'short', 'long']),
272
- hour: PropTypes.oneOf(['numeric', '2-digit']),
273
- hour12: PropTypes.bool,
274
- minute: PropTypes.oneOf(['numeric', '2-digit']),
275
- second: PropTypes.oneOf(['numeric', '2-digit']),
276
- timeZoneName: PropTypes.oneOf(['short', 'long'])
277
- })
278
- ]),
279
- max: PropTypes.instanceOf(Date),
280
- min: PropTypes.instanceOf(Date),
281
- nowButton: PropTypes.bool,
282
- steps: PropTypes.shape({
283
- hour: PropTypes.number,
284
- minute: PropTypes.number,
285
- second: PropTypes.number
286
- }),
287
- smoothScroll: PropTypes.bool,
288
- tabIndex: PropTypes.number,
289
- value: PropTypes.instanceOf(Date),
290
- show: PropTypes.bool
291
- };
292
- TimePart.defaultProps = {
293
- value: null,
294
- disabled: false,
295
- nowButton: true,
296
- cancelButton: true,
297
- format: 'hh:mm a',
298
- min: MIN_TIME,
299
- max: MAX_TIME,
300
- steps: {},
301
- boundRange: false
302
- };
303
- return TimePart;
304
- }(React.Component));
305
- export { TimePart };
306
- registerForIntl(TimePart);
307
- registerForLocalization(TimePart);