@progress/kendo-react-dateinputs 6.1.1-dev.202311151536 → 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,704 +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
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
28
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
29
- if (ar || !(i in from)) {
30
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
31
- ar[i] = from[i];
32
- }
33
- }
34
- return to.concat(ar || Array.prototype.slice.call(from));
35
- };
36
- import * as React from 'react';
37
- import * as PropTypes from 'prop-types';
38
- import { isEqual, cloneDate } from '@progress/kendo-date-math';
39
- import { Button } from '@progress/kendo-react-buttons';
40
- import { caretAltUpIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
41
- import { registerForIntl, provideIntlService, registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
42
- import { KendoDate } from './models';
43
- import { guid, AsyncFocusBlur, noop, classNames, createPropsContext, withPropsContext, kendoThemeMaps, getActiveElement } from '@progress/kendo-react-common';
44
- import { FloatingLabel } from '@progress/kendo-react-labels';
45
- import { validatePackage } from '@progress/kendo-react-common';
46
- import { packageMetadata } from '../package-metadata';
47
- import { approximateStringMatching, defaultFormat, defaultFormatPlaceholder, isInRange, wrapperClasses } from './utils';
48
- import { MAX_DATE, MIN_DATE } from './../utils';
49
- import { messages, increaseValue, decreaseValue } from './../messages';
50
- import { isInTimeRange } from '../timepicker/utils';
51
- import { MIN_TIME, MAX_TIME } from '../utils';
52
- var VALIDATION_MESSAGE = 'Please enter a valid value!';
53
- // tslint:enable:max-line-length
54
- /** @hidden */
55
- var DateInputWithoutContext = /** @class */ (function (_super) {
56
- __extends(DateInputWithoutContext, _super);
57
- function DateInputWithoutContext(props) {
58
- var _this = _super.call(this, props) || this;
59
- _this.kendoDate = null;
60
- _this.currentFormat = '';
61
- _this.paste = false;
62
- _this._element = null;
63
- _this._wrapper = null;
64
- _this._inputId = guid();
65
- _this._lastSelectedSymbol = '';
66
- /**
67
- * @hidden
68
- */
69
- _this.focus = function () {
70
- if (_this._element) {
71
- _this._element.focus();
72
- }
73
- };
74
- /**
75
- * @hidden
76
- */
77
- _this.setValidity = function () {
78
- if (_this.element && _this.element.setCustomValidity) {
79
- _this.element.setCustomValidity(_this.validity.valid
80
- ? ''
81
- : _this.props.validationMessage || DateInputWithoutContext.defaultProps.validationMessage);
82
- }
83
- };
84
- _this.updateOnPaste = function (event) {
85
- if (!_this.element || !_this.kendoDate) {
86
- return;
87
- }
88
- var value = provideIntlService(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
89
- var oldValue = _this.value;
90
- _this.kendoDate.setValue(value);
91
- _this.triggerChange(event, oldValue);
92
- };
93
- /* Handlers */
94
- _this.spinnersMouseDown = function (event) {
95
- /* do not steal focus from input when changing value with spinners */
96
- event.preventDefault();
97
- var activeElement = getActiveElement(document);
98
- /* manually focus the input in case the user clicks the spinners first */
99
- if (_this.element && activeElement !== _this.element) {
100
- _this.element.focus({ preventScroll: true });
101
- }
102
- };
103
- _this.handlePaste = function () {
104
- _this.paste = true;
105
- };
106
- _this.elementChange = function (event) {
107
- if (!_this.element || !_this.kendoDate) {
108
- return;
109
- }
110
- if (_this.paste) {
111
- _this.updateOnPaste(event);
112
- _this.paste = false;
113
- return;
114
- }
115
- var _a = _this.kendoDate.getTextAndFormat(), text = _a.text, currentFormat = _a.format;
116
- _this.currentFormat = currentFormat;
117
- var dateBeforeChange = _this.value;
118
- var diff = approximateStringMatching(text, _this.currentFormat, _this.element.value, _this.selection.start);
119
- var navigationOnly = (diff.length === 1 && diff[0][1] === '_');
120
- if (!navigationOnly) {
121
- for (var i = 0; i < diff.length; i++) {
122
- _this.kendoDate.parsePart(diff[i][0], diff[i][1]);
123
- }
124
- }
125
- if (diff.length && diff[0][0] !== '_') {
126
- _this.setSelection(_this.selectionBySymbol(diff[0][0]));
127
- }
128
- if (navigationOnly) {
129
- _this.switchDateSegment(1);
130
- }
131
- _this.triggerChange(event, dateBeforeChange);
132
- };
133
- _this.elementClick = function (_) {
134
- _this.setSelection(_this.selectionByIndex(_this.selection.start));
135
- };
136
- _this.nativeWheel = function (event) {
137
- var activeElement = getActiveElement(document);
138
- if (activeElement === _this.element) {
139
- event.preventDefault();
140
- }
141
- };
142
- _this.wheel = function (event) {
143
- var activeElement = getActiveElement(document);
144
- if (activeElement !== _this.element) {
145
- return;
146
- }
147
- if (event.nativeEvent.deltaY < 0) {
148
- _this.increasePart(event);
149
- }
150
- if (event.nativeEvent.deltaY > 0) {
151
- _this.decreasePart(event);
152
- }
153
- };
154
- _this.increasePart = function (event) {
155
- _this.modifyDateSegmentValue(1, event);
156
- };
157
- _this.decreasePart = function (event) {
158
- _this.modifyDateSegmentValue(-1, event);
159
- };
160
- _this.elementKeyDown = function (event) {
161
- if (event.altKey) {
162
- return;
163
- }
164
- switch (event.keyCode) {
165
- case 37:
166
- /*
167
- * Key: `Left Arrow`
168
- * Action: Switches to previous logical* segment.
169
- * (*) https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
170
- */
171
- _this.switchDateSegment(-1);
172
- break;
173
- case (38):
174
- /*
175
- * Key: `Up Arrow`
176
- * Action: Increases the currently selected segment value.
177
- */
178
- _this.modifyDateSegmentValue(1, event);
179
- break;
180
- case 39:
181
- /*
182
- * Key: `Right Arrow`
183
- * Action: Switches to the next logical segment.
184
- */
185
- _this.switchDateSegment(1);
186
- break;
187
- case 40:
188
- /*
189
- * Key: `Down Arrow`
190
- * Action: Decreases the currently selected segment value.
191
- */
192
- _this.modifyDateSegmentValue(-1, event);
193
- break;
194
- default:
195
- /*
196
- * Key: any
197
- * Action: Does not prevent the default behavior.
198
- */
199
- return;
200
- }
201
- event.preventDefault();
202
- };
203
- _this.elementOnFocus = function (_) {
204
- if (_this.wrapper) {
205
- _this.wrapper.classList.add('k-focus');
206
- }
207
- _this.setState({ focused: true });
208
- };
209
- _this.elementOnBlur = function (_) {
210
- if (_this.wrapper) {
211
- _this.wrapper.classList.remove('k-focus');
212
- }
213
- _this.setState({ focused: false });
214
- };
215
- validatePackage(packageMetadata);
216
- _this.state = {
217
- focused: false
218
- };
219
- return _this;
220
- }
221
- /**
222
- * @hidden
223
- */
224
- DateInputWithoutContext.prototype.componentDidMount = function () {
225
- this.setValidity();
226
- if (this.wrapper) {
227
- this.wrapper.addEventListener('wheel', this.nativeWheel, { passive: false });
228
- }
229
- };
230
- /**
231
- * @hidden
232
- */
233
- DateInputWithoutContext.prototype.componentDidUpdate = function (_, prevState) {
234
- if (this._lastSelectedSymbol && prevState.focused === this.state.focused) {
235
- this.setSelection(this.selectionBySymbol(this._lastSelectedSymbol));
236
- }
237
- else if (this.props.placeholder !== undefined && this.selection.start === this.selection.end) {
238
- this.setSelection({ start: 0, end: this.currentFormat.length });
239
- }
240
- this.setValidity();
241
- };
242
- /**
243
- * @hidden
244
- */
245
- DateInputWithoutContext.prototype.componentWillUnmount = function () {
246
- if (this.wrapper) {
247
- this.wrapper.removeEventListener('wheel', this.nativeWheel);
248
- }
249
- };
250
- /**
251
- * @hidden
252
- */
253
- DateInputWithoutContext.prototype.render = function () {
254
- var _this = this;
255
- var _a = this.props, _b = _a.size, size = _b === void 0 ? DateInputWithoutContext.defaultProps.size : _b, _c = _a.fillMode, fillMode = _c === void 0 ? DateInputWithoutContext.defaultProps.fillMode : _c, _d = _a.rounded, rounded = _d === void 0 ? DateInputWithoutContext.defaultProps.rounded : _d;
256
- if (this.props._ref) {
257
- this.props._ref.current = this;
258
- }
259
- var localizationService = provideLocalizationService(this);
260
- var props = __assign(__assign({}, DateInputWithoutContext.defaultProps), this.props);
261
- var name = props.name, label = props.label, id = props.id;
262
- var currentText = this.text;
263
- var text = currentText === this.props.placeholder ? '' : currentText;
264
- var placeholder = currentText === this.props.placeholder ? currentText : undefined;
265
- var inputId = id || this._inputId;
266
- var isValid = !this.validityStyles || this.validity.valid;
267
- var wrapperClassesInstance = __spreadArray([], wrapperClasses, true);
268
- if (this.props.className) {
269
- wrapperClassesInstance.push(this.props.className);
270
- }
271
- var dateinput = (React.createElement(AsyncFocusBlur, { onFocus: this.elementOnFocus, onBlur: this.elementOnBlur }, function (_a) {
272
- var _b;
273
- var onFocus = _a.onFocus, onBlur = _a.onBlur;
274
- return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
275
- ? { width: _this.props.width }
276
- : undefined, dir: _this.props.dir, className: classNames('k-dateinput', 'k-input', (_b = {},
277
- _b["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
278
- _b["k-input-".concat(fillMode)] = fillMode,
279
- _b["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
280
- _b['k-invalid'] = !isValid,
281
- _b['k-required'] = _this.required,
282
- _b['k-disabled'] = _this.props.disabled,
283
- _b), _this.props.className), onFocus: onFocus, onBlur: onBlur },
284
- React.createElement("input", { role: _this.props.ariaRole || 'textbox', readOnly: _this.props.readonly, tabIndex: _this.props.tabIndex, disabled: _this.props.disabled, title: _this.props.title !== undefined ? _this.props.title : currentText, type: "text", spellCheck: false, autoComplete: "off", autoCorrect: "off", className: "k-input-inner", id: inputId, "aria-label": _this.props.ariaLabel, "aria-labelledby": _this.props.ariaLabelledBy, "aria-describedby": _this.props.ariaDescribedBy, "aria-haspopup": _this.props.ariaHasPopup, "aria-disabled": _this.props.disabled, "aria-expanded": _this.props.ariaExpanded, "aria-controls": _this.props.ariaControls, onWheel: _this.wheel, onClick: _this.elementClick, onInput: _this.elementChange, onPaste: _this.handlePaste, onKeyDown: _this.elementKeyDown, onChange: noop, value: text, placeholder: placeholder, name: name, ref: function (input) { return _this._element = input; } }),
285
- _this.props.children,
286
- _this.props.spinners && (React.createElement("span", { className: "k-input-spinner k-spin-button", onMouseDown: _this.spinnersMouseDown },
287
- React.createElement(Button, { tabIndex: -1, type: "button", rounded: null, className: "k-spinner-increase", icon: 'caret-alt-up', svgIcon: caretAltUpIcon, "aria-label": localizationService.toLanguageString(increaseValue, messages[increaseValue]), title: localizationService.toLanguageString(increaseValue, messages[increaseValue]), onClick: _this.increasePart }),
288
- React.createElement(Button, { tabIndex: -1, type: "button", rounded: null, className: "k-spinner-decrease", icon: 'caret-alt-down', svgIcon: caretAltDownIcon, "aria-label": localizationService.toLanguageString(decreaseValue, messages[decreaseValue]), title: localizationService.toLanguageString(decreaseValue, messages[decreaseValue]), onClick: _this.decreasePart })))));
289
- }));
290
- return label
291
- ? (React.createElement(FloatingLabel, { label: label, editorId: inputId, editorValue: currentText, editorValid: isValid, editorDisabled: this.props.disabled, children: dateinput, style: { width: this.props.width } }))
292
- : dateinput;
293
- };
294
- Object.defineProperty(DateInputWithoutContext.prototype, "value", {
295
- /* Public Getters */
296
- /**
297
- * Gets the value of the DateInput.
298
- */
299
- get: function () {
300
- if (this.valueDuringOnChange !== undefined) {
301
- return this.valueDuringOnChange;
302
- }
303
- return this.kendoDate && this.kendoDate.getDateObject();
304
- },
305
- enumerable: false,
306
- configurable: true
307
- });
308
- Object.defineProperty(DateInputWithoutContext.prototype, "name", {
309
- /**
310
- * Gets the `name` property of the DateInput.
311
- */
312
- get: function () {
313
- return this.props.name;
314
- },
315
- enumerable: false,
316
- configurable: true
317
- });
318
- Object.defineProperty(DateInputWithoutContext.prototype, "min", {
319
- get: function () {
320
- return this.props.min !== undefined
321
- ? this.props.min
322
- : DateInputWithoutContext.defaultProps.min;
323
- },
324
- enumerable: false,
325
- configurable: true
326
- });
327
- Object.defineProperty(DateInputWithoutContext.prototype, "max", {
328
- get: function () {
329
- return this.props.max !== undefined
330
- ? this.props.max
331
- : DateInputWithoutContext.defaultProps.max;
332
- },
333
- enumerable: false,
334
- configurable: true
335
- });
336
- Object.defineProperty(DateInputWithoutContext.prototype, "text", {
337
- /**
338
- * @hidden
339
- */
340
- get: function () {
341
- var props = __assign(__assign({}, DateInput.defaultProps), this.props);
342
- var _a = props.formatPlaceholder, formatPlaceholder = _a === void 0 ? DateInputWithoutContext.defaultProps.formatPlaceholder : _a, _b = props.format, format = _b === void 0 ? DateInputWithoutContext.defaultProps.format : _b, value = props.value, defaultValue = props.defaultValue;
343
- if (this.kendoDate === null) {
344
- this.kendoDate = new KendoDate(this.intl.bind(this), formatPlaceholder, format);
345
- this.kendoDate.setValue(value || defaultValue || null);
346
- }
347
- else {
348
- this.kendoDate.format = format;
349
- this.kendoDate.formatPlaceholder = formatPlaceholder;
350
- }
351
- if (value !== undefined && this.value !== value) {
352
- this.kendoDate.setValue(value);
353
- }
354
- var _c = this.kendoDate.getTextAndFormat(), currentText = _c.text, currentFormat = _c.format;
355
- this.currentFormat = currentFormat;
356
- return props.placeholder !== null && props.placeholder !== undefined
357
- && !this.state.focused
358
- && !this.kendoDate.hasValue()
359
- ? props.placeholder
360
- : currentText;
361
- },
362
- enumerable: false,
363
- configurable: true
364
- });
365
- Object.defineProperty(DateInputWithoutContext.prototype, "validity", {
366
- /**
367
- * Represents the validity state into which the DateInput is set.
368
- */
369
- get: function () {
370
- var inRange = isInRange(this.value, this.min, this.max)
371
- && isInTimeRange(this.value, this.props.minTime, this.props.maxTime);
372
- var customError = this.props.validationMessage !== undefined;
373
- var isValid = (!this.required || this.value !== null) && inRange;
374
- var valid = this.props.valid !== undefined ? this.props.valid : isValid;
375
- return {
376
- customError: customError,
377
- rangeOverflow: (this.value && this.max.getTime() < this.value.getTime()) || false,
378
- rangeUnderflow: (this.value && this.value.getTime() < this.min.getTime()) || false,
379
- valid: valid,
380
- valueMissing: this.value === null
381
- };
382
- },
383
- enumerable: false,
384
- configurable: true
385
- });
386
- Object.defineProperty(DateInputWithoutContext.prototype, "element", {
387
- /**
388
- * Gets the element of the DateInput.
389
- *
390
- * @return - An `HTMLInputElement`.
391
- *
392
- * @example
393
- * ```jsx
394
- * class App extends React.Component {
395
- * constructor(props) {
396
- * super(props);
397
- * }
398
- * element = null;
399
- * render() {
400
- * return (
401
- * <div>
402
- * <DateInput
403
- * ref={(dateInput) =>
404
- * this.element = dateInput ? dateInput.element : null}
405
- * />
406
- * <button onClick={() => console.log(this.element)}>console.log the element</button>
407
- * </div>
408
- * );
409
- * }
410
- * }
411
- *
412
- * ReactDOM.render(
413
- * <App />,
414
- * document.getElementsByTagName('my-app')[0]
415
- * );
416
- * ```
417
- */
418
- get: function () {
419
- return this._element;
420
- },
421
- enumerable: false,
422
- configurable: true
423
- });
424
- Object.defineProperty(DateInputWithoutContext.prototype, "validityStyles", {
425
- /**
426
- * @hidden
427
- */
428
- get: function () {
429
- return this.props.validityStyles !== undefined
430
- ? this.props.validityStyles
431
- : DateInputWithoutContext.defaultProps.validityStyles;
432
- },
433
- enumerable: false,
434
- configurable: true
435
- });
436
- Object.defineProperty(DateInputWithoutContext.prototype, "required", {
437
- /**
438
- * @hidden
439
- */
440
- get: function () {
441
- return this.props.required !== undefined
442
- ? this.props.required
443
- : DateInputWithoutContext.defaultProps.required;
444
- },
445
- enumerable: false,
446
- configurable: true
447
- });
448
- Object.defineProperty(DateInputWithoutContext.prototype, "wrapper", {
449
- /**
450
- * @hidden
451
- */
452
- get: function () {
453
- return this._wrapper;
454
- },
455
- enumerable: false,
456
- configurable: true
457
- });
458
- /**
459
- * @hidden
460
- */
461
- DateInputWithoutContext.prototype.intl = function () {
462
- return provideIntlService(this);
463
- };
464
- Object.defineProperty(DateInputWithoutContext.prototype, "selection", {
465
- /* end handlers */
466
- get: function () {
467
- var returnValue = { start: 0, end: 0 };
468
- if (this.element !== null && this.element.selectionStart !== undefined) {
469
- returnValue = { start: this.element.selectionStart, end: this.element.selectionEnd };
470
- }
471
- return returnValue;
472
- },
473
- enumerable: false,
474
- configurable: true
475
- });
476
- DateInputWithoutContext.prototype.setSelection = function (selection) {
477
- var _this = this;
478
- this._lastSelectedSymbol = this.currentFormat[selection.start];
479
- window.requestAnimationFrame(function () {
480
- var activeElement = getActiveElement(document);
481
- if (_this.element && activeElement === _this.element && !_this.props.disableSelection) {
482
- _this.element.setSelectionRange(selection.start, selection.end);
483
- }
484
- });
485
- };
486
- DateInputWithoutContext.prototype.triggerChange = function (event, oldValue) {
487
- this.valueDuringOnChange = this.value;
488
- this.forceUpdate();
489
- if (this.props.onChange
490
- && !isEqual(oldValue, this.value)) {
491
- // isEqual works with null
492
- this.props.onChange.call(undefined, {
493
- syntheticEvent: event,
494
- nativeEvent: event.nativeEvent,
495
- value: this.value,
496
- target: this
497
- // inRange: this.props.min && this.props.max ? isInRange(value, this.props.min, this.props.max) : true
498
- });
499
- }
500
- this.valueDuringOnChange = undefined;
501
- };
502
- DateInputWithoutContext.prototype.selectionBySymbol = function (symbol) {
503
- var start = -1;
504
- var end = 0;
505
- for (var i = 0; i < this.currentFormat.length; i++) {
506
- if (this.currentFormat[i] === symbol) {
507
- end = i + 1;
508
- if (start === -1) {
509
- start = i;
510
- }
511
- }
512
- }
513
- if (start < 0) {
514
- start = 0;
515
- }
516
- return { start: start, end: end };
517
- };
518
- DateInputWithoutContext.prototype.selectionByIndex = function (index) {
519
- // console.log(42, index);
520
- var selection = { start: index, end: index };
521
- for (var i = index, j = index - 1; i < this.currentFormat.length || j >= 0; i++, j--) {
522
- if (i < this.currentFormat.length && this.currentFormat[i] !== '_') {
523
- selection = this.selectionBySymbol(this.currentFormat[i]);
524
- break;
525
- }
526
- if (j >= 0 && this.currentFormat[j] !== '_') {
527
- selection = this.selectionBySymbol(this.currentFormat[j]);
528
- break;
529
- }
530
- }
531
- return selection;
532
- };
533
- DateInputWithoutContext.prototype.switchDateSegment = function (offset) {
534
- var _a = this.selection, selectionStart = _a.start, selectionEnd = _a.end;
535
- if (selectionStart < selectionEnd &&
536
- this.currentFormat[selectionStart] !== this.currentFormat[selectionEnd - 1]) {
537
- this.setSelection(this.selectionByIndex(offset > 0 ? selectionStart : selectionEnd - 1));
538
- return;
539
- }
540
- var previousFormatSymbol = this.currentFormat[selectionStart];
541
- var a = selectionStart + offset;
542
- while (a > 0 && a < this.currentFormat.length) {
543
- if (this.currentFormat[a] !== previousFormatSymbol &&
544
- this.currentFormat[a] !== '_') {
545
- break;
546
- }
547
- a += offset;
548
- }
549
- if (this.currentFormat[a] === '_') {
550
- // no known symbol is found
551
- return;
552
- }
553
- var b = a;
554
- while (b >= 0 && b < this.currentFormat.length) {
555
- if (this.currentFormat[b] !== this.currentFormat[a]) {
556
- break;
557
- }
558
- b += offset;
559
- }
560
- if (a > b && (b + 1 !== selectionStart || a + 1 !== selectionEnd)) {
561
- this.setSelection({ start: b + 1, end: a + 1 });
562
- }
563
- else if (a < b && (a !== selectionStart || b !== selectionEnd)) {
564
- this.setSelection({ start: a, end: b });
565
- }
566
- };
567
- DateInputWithoutContext.prototype.modifyDateSegmentValue = function (offset, event) {
568
- if (!this.kendoDate) {
569
- return;
570
- }
571
- var oldValue = this.value;
572
- var symbol = this.currentFormat[this.selection.start];
573
- var currentStepSymbol = this.kendoDate.symbolMap(symbol);
574
- var step = ((this.props.steps || {})[currentStepSymbol] || 1) * offset;
575
- this.kendoDate.modifyPart(symbol, step);
576
- this.triggerChange(event, oldValue);
577
- };
578
- /**
579
- * @hidden
580
- */
581
- DateInputWithoutContext.displayName = 'DateInput';
582
- /**
583
- * @hidden
584
- */
585
- DateInputWithoutContext.propTypes = {
586
- value: PropTypes.instanceOf(Date),
587
- format: PropTypes.oneOfType([
588
- PropTypes.string,
589
- PropTypes.shape({
590
- skeleton: PropTypes.string,
591
- pattern: PropTypes.string,
592
- date: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
593
- time: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
594
- datetime: PropTypes.oneOf(['short', 'medium', 'long', 'full']),
595
- era: PropTypes.oneOf(['narrow', 'short', 'long']),
596
- year: PropTypes.oneOf(['numeric', '2-digit']),
597
- month: PropTypes.oneOf(['numeric', '2-digit', 'narrow', 'short', 'long']),
598
- day: PropTypes.oneOf(['numeric', '2-digit']),
599
- weekday: PropTypes.oneOf(['narrow', 'short', 'long']),
600
- hour: PropTypes.oneOf(['numeric', '2-digit']),
601
- hour12: PropTypes.bool,
602
- minute: PropTypes.oneOf(['numeric', '2-digit']),
603
- second: PropTypes.oneOf(['numeric', '2-digit']),
604
- timeZoneName: PropTypes.oneOf(['short', 'long'])
605
- })
606
- ]),
607
- formatPlaceholder: PropTypes.oneOfType([
608
- PropTypes.oneOf(['wide', 'narrow', 'short', 'formatPattern']),
609
- PropTypes.shape({
610
- year: PropTypes.string,
611
- month: PropTypes.string,
612
- day: PropTypes.string,
613
- hour: PropTypes.string,
614
- minute: PropTypes.string,
615
- second: PropTypes.string
616
- })
617
- ]),
618
- width: PropTypes.oneOfType([
619
- PropTypes.string,
620
- PropTypes.number
621
- ]),
622
- tabIndex: PropTypes.number,
623
- title: PropTypes.string,
624
- steps: PropTypes.shape({
625
- year: PropTypes.number,
626
- month: PropTypes.number,
627
- day: PropTypes.number,
628
- hour: PropTypes.number,
629
- minute: PropTypes.number,
630
- second: PropTypes.number
631
- }),
632
- min: PropTypes.instanceOf(Date),
633
- max: PropTypes.instanceOf(Date),
634
- disabled: PropTypes.bool,
635
- spinners: PropTypes.bool,
636
- name: PropTypes.string,
637
- dir: PropTypes.string,
638
- label: PropTypes.string,
639
- id: PropTypes.string,
640
- ariaLabelledBy: PropTypes.string,
641
- ariaDescribedBy: PropTypes.string,
642
- ariaLabel: PropTypes.string,
643
- ariaRole: PropTypes.string,
644
- ariaHasPopup: PropTypes.oneOfType([
645
- PropTypes.bool,
646
- PropTypes.string
647
- ]),
648
- ariaExpanded: PropTypes.oneOfType([
649
- PropTypes.bool
650
- ]),
651
- onChange: PropTypes.func,
652
- validationMessage: PropTypes.string,
653
- required: PropTypes.bool,
654
- validate: PropTypes.bool,
655
- valid: PropTypes.bool,
656
- size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
657
- rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
658
- fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
659
- };
660
- /**
661
- * @hidden
662
- */
663
- DateInputWithoutContext.defaultProps = {
664
- format: defaultFormat,
665
- size: 'medium',
666
- rounded: 'medium',
667
- fillMode: 'solid',
668
- formatPlaceholder: defaultFormatPlaceholder,
669
- // defaultValue: null as Date | null,
670
- spinners: false,
671
- disabled: false,
672
- max: cloneDate(MAX_DATE),
673
- min: cloneDate(MIN_DATE),
674
- minTime: cloneDate(MIN_TIME),
675
- maxTime: cloneDate(MAX_TIME),
676
- required: false,
677
- validityStyles: true,
678
- validationMessage: VALIDATION_MESSAGE,
679
- placeholder: null,
680
- // the rest of the properties are undefined by default
681
- ariaHasPopup: 'grid'
682
- };
683
- return DateInputWithoutContext;
684
- }(React.Component));
685
- export { DateInputWithoutContext };
686
- /**
687
- * Represents the PropsContext of the `DateInput` component.
688
- * Used for global configuration of all `DateInput` instances.
689
- *
690
- * For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
691
- */
692
- export var DateInputPropsContext = createPropsContext();
693
- ;
694
- /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
695
- /**
696
- * Represents the KendoReact DateInput Component.
697
- *
698
- * Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
699
- * Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
700
- */
701
- export var DateInput = withPropsContext(DateInputPropsContext, DateInputWithoutContext);
702
- DateInput.displayName = 'KendoReactDateInput';
703
- registerForIntl(DateInputWithoutContext);
704
- registerForLocalization(DateInputWithoutContext);