@progress/kendo-react-dateinputs 6.1.1 → 7.0.0-develop.2
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.
- package/LICENSE.md +1 -1
- package/{dist/es/PopupSettings.d.ts → PopupSettings.d.ts} +4 -0
- package/{dist/npm/calendar → calendar}/components/Calendar.d.ts +6 -2
- package/{dist/es/calendar → calendar}/components/CalendarCell.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/CalendarHeaderTitle.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/CalendarNavigationItem.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/CalendarWeekCell.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/Header.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/HorizontalViewList.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/MultiViewCalendar.d.ts +8 -4
- package/{dist/npm/calendar → calendar}/components/Navigation.d.ts +5 -1
- package/{dist/npm/calendar → calendar}/components/TodayCommand.d.ts +5 -1
- package/{dist/es/calendar → calendar}/components/View.d.ts +6 -2
- package/{dist/npm/calendar → calendar}/components/ViewList.d.ts +7 -3
- package/calendar/models/ActiveView.d.ts +8 -0
- package/{dist/npm/calendar → calendar}/models/CalendarSettings.d.ts +4 -1
- package/calendar/models/CalendarViewEnum.d.ts +13 -0
- package/{dist/npm/calendar → calendar}/models/CellContext.d.ts +4 -0
- package/calendar/models/MultiViewCalendarMode.d.ts +13 -0
- package/{dist/es/calendar → calendar}/models/MultiViewCalendarSettings.d.ts +4 -1
- package/calendar/models/NavigationAction.d.ts +19 -0
- package/calendar/models/SelectionRange.d.ts +21 -0
- package/calendar/models/SelectionRangeEnd.d.ts +8 -0
- package/{dist/npm/calendar → calendar}/models/ViewService.d.ts +4 -0
- package/calendar/models/index.d.ts +15 -0
- package/{dist/es/calendar → calendar}/services/BusViewService.d.ts +4 -1
- package/{dist/es/calendar → calendar}/services/CenturyViewService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/DOMService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/DecadeViewService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/MonthViewService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/NavigationService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/ScrollSyncService.d.ts +4 -0
- package/calendar/services/WeekNamesService.d.ts +13 -0
- package/{dist/es/calendar → calendar}/services/YearViewService.d.ts +4 -0
- package/{dist/npm/calendar → calendar}/services/index.d.ts +4 -0
- package/{dist/es/common → common}/AdaptiveMode.d.ts +5 -1
- package/{dist/es/common → common}/PickerWrap.d.ts +4 -0
- package/common/constants.d.ts +8 -0
- package/{dist/es/dateinput → dateinput}/DateInput.d.ts +11 -7
- package/{dist/es/dateinput → dateinput}/models/DateInputSettings.d.ts +4 -0
- package/{dist/es/dateinput → dateinput}/models/format-placeholder.d.ts +5 -1
- package/dateinput/models/incremental-steps.d.ts +15 -0
- package/dateinput/models/index.d.ts +11 -0
- package/{dist/es/dateinput → dateinput}/models/kendo-date.d.ts +4 -0
- package/dateinput/models/mask.d.ts +11 -0
- package/dateinput/models/selection.d.ts +11 -0
- package/{dist/npm/dateinput → dateinput}/utils.d.ts +4 -0
- package/{dist/npm/datepicker → datepicker}/DatePicker.d.ts +12 -8
- package/{dist/npm/datepicker → datepicker}/ToggleButton.d.ts +4 -0
- package/{dist/npm/datepicker → datepicker}/models/DatePickerSettings.d.ts +5 -2
- package/datepicker/models/index.d.ts +6 -0
- package/{dist/es/daterangepicker → daterangepicker}/DateRangePicker.d.ts +9 -5
- package/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +10 -0
- package/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +10 -0
- package/daterangepicker/models/DateRangePickerPopupSettings.d.ts +10 -0
- package/{dist/npm/daterangepicker → daterangepicker}/models/DateRangePickerSettings.d.ts +4 -1
- package/{dist/es/daterangepicker → daterangepicker}/models/index.d.ts +4 -0
- package/{dist/npm/datetimepicker → datetimepicker}/DateTimePicker.d.ts +12 -8
- package/{dist/npm/datetimepicker → datetimepicker}/DateTimeSelector.d.ts +5 -1
- package/{dist/es/datetimepicker → datetimepicker}/models/DateTimePickerSettings.d.ts +5 -2
- package/datetimepicker/models/index.d.ts +6 -0
- package/dist/cdn/js/kendo-react-dateinputs.js +21 -1
- package/hooks/usePickerFloatingLabel.d.ts +24 -0
- package/index.d.ts +39 -0
- package/index.js +21 -0
- package/index.mjs +6460 -0
- package/{dist/es/messages → messages}/index.d.ts +4 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +33 -51
- package/{dist/npm/timepicker → timepicker}/TimeList.d.ts +5 -1
- package/{dist/es/timepicker → timepicker}/TimePart.d.ts +5 -1
- package/{dist/es/timepicker → timepicker}/TimePicker.d.ts +12 -8
- package/{dist/es/timepicker → timepicker}/TimeSelector.d.ts +5 -1
- package/timepicker/models/IncrementalSteps.d.ts +12 -0
- package/timepicker/models/ListItem.d.ts +11 -0
- package/{dist/es/timepicker → timepicker}/models/ListService.d.ts +4 -0
- package/timepicker/models/ListServiceSettings.d.ts +16 -0
- package/timepicker/models/TimePart.d.ts +14 -0
- package/{dist/es/timepicker → timepicker}/models/TimePickerSettings.d.ts +5 -2
- package/timepicker/models/index.d.ts +11 -0
- package/timepicker/services/DOMService.d.ts +14 -0
- package/{dist/npm/timepicker → timepicker}/services/DayPeriodService.d.ts +4 -0
- package/{dist/es/timepicker → timepicker}/services/HoursService.d.ts +4 -0
- package/{dist/npm/timepicker → timepicker}/services/MinutesService.d.ts +4 -0
- package/{dist/es/timepicker → timepicker}/services/SecondsService.d.ts +4 -0
- package/timepicker/services/index.d.ts +10 -0
- package/{dist/es/timepicker → timepicker}/utils.d.ts +4 -0
- package/{dist/es/utils.d.ts → utils.d.ts} +4 -0
- package/{dist/es/virtualization → virtualization}/Virtualization.d.ts +6 -2
- package/{dist/es/virtualization → virtualization}/services/RowHeightService.d.ts +4 -0
- package/{dist/es/virtualization → virtualization}/services/ScrollerService.d.ts +6 -2
- package/virtualization/services/index.d.ts +7 -0
- package/about.md +0 -3
- package/dist/es/PopupSettings.js +0 -1
- package/dist/es/calendar/components/Calendar.d.ts +0 -187
- package/dist/es/calendar/components/Calendar.js +0 -388
- package/dist/es/calendar/components/CalendarCell.js +0 -128
- package/dist/es/calendar/components/CalendarHeaderTitle.d.ts +0 -28
- package/dist/es/calendar/components/CalendarHeaderTitle.js +0 -61
- package/dist/es/calendar/components/CalendarNavigationItem.d.ts +0 -27
- package/dist/es/calendar/components/CalendarNavigationItem.js +0 -66
- package/dist/es/calendar/components/CalendarWeekCell.d.ts +0 -25
- package/dist/es/calendar/components/CalendarWeekCell.js +0 -61
- package/dist/es/calendar/components/Header.d.ts +0 -54
- package/dist/es/calendar/components/Header.js +0 -129
- package/dist/es/calendar/components/HorizontalViewList.d.ts +0 -67
- package/dist/es/calendar/components/HorizontalViewList.js +0 -145
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +0 -208
- package/dist/es/calendar/components/MultiViewCalendar.js +0 -589
- package/dist/es/calendar/components/Navigation.d.ts +0 -76
- package/dist/es/calendar/components/Navigation.js +0 -167
- package/dist/es/calendar/components/TodayCommand.d.ts +0 -31
- package/dist/es/calendar/components/TodayCommand.js +0 -93
- package/dist/es/calendar/components/View.js +0 -220
- package/dist/es/calendar/components/ViewList.d.ts +0 -111
- package/dist/es/calendar/components/ViewList.js +0 -258
- package/dist/es/calendar/models/ActiveView.d.ts +0 -4
- package/dist/es/calendar/models/ActiveView.js +0 -1
- package/dist/es/calendar/models/CalendarSettings.d.ts +0 -103
- package/dist/es/calendar/models/CalendarSettings.js +0 -1
- package/dist/es/calendar/models/CalendarViewEnum.d.ts +0 -9
- package/dist/es/calendar/models/CalendarViewEnum.js +0 -10
- package/dist/es/calendar/models/CellContext.d.ts +0 -19
- package/dist/es/calendar/models/CellContext.js +0 -1
- package/dist/es/calendar/models/MultiViewCalendarMode.d.ts +0 -9
- package/dist/es/calendar/models/MultiViewCalendarMode.js +0 -1
- package/dist/es/calendar/models/MultiViewCalendarSettings.js +0 -1
- package/dist/es/calendar/models/NavigationAction.d.ts +0 -15
- package/dist/es/calendar/models/NavigationAction.js +0 -16
- package/dist/es/calendar/models/SelectionRange.d.ts +0 -17
- package/dist/es/calendar/models/SelectionRange.js +0 -4
- package/dist/es/calendar/models/SelectionRangeEnd.d.ts +0 -4
- package/dist/es/calendar/models/SelectionRangeEnd.js +0 -1
- package/dist/es/calendar/models/ViewService.d.ts +0 -25
- package/dist/es/calendar/models/ViewService.js +0 -1
- package/dist/es/calendar/models/index.d.ts +0 -11
- package/dist/es/calendar/models/index.js +0 -4
- package/dist/es/calendar/services/BusViewService.js +0 -69
- package/dist/es/calendar/services/CenturyViewService.js +0 -154
- package/dist/es/calendar/services/DOMService.d.ts +0 -29
- package/dist/es/calendar/services/DOMService.js +0 -184
- package/dist/es/calendar/services/DecadeViewService.d.ts +0 -27
- package/dist/es/calendar/services/DecadeViewService.js +0 -153
- package/dist/es/calendar/services/MonthViewService.d.ts +0 -33
- package/dist/es/calendar/services/MonthViewService.js +0 -169
- package/dist/es/calendar/services/NavigationService.d.ts +0 -14
- package/dist/es/calendar/services/NavigationService.js +0 -41
- package/dist/es/calendar/services/ScrollSyncService.d.ts +0 -21
- package/dist/es/calendar/services/ScrollSyncService.js +0 -58
- package/dist/es/calendar/services/WeekNamesService.d.ts +0 -9
- package/dist/es/calendar/services/WeekNamesService.js +0 -16
- package/dist/es/calendar/services/YearViewService.js +0 -180
- package/dist/es/calendar/services/index.d.ts +0 -10
- package/dist/es/calendar/services/index.js +0 -10
- package/dist/es/calendar/utils/ScrollSync.d.ts +0 -13
- package/dist/es/calendar/utils/ScrollSync.js +0 -30
- package/dist/es/common/AdaptiveMode.js +0 -45
- package/dist/es/common/PickerWrap.js +0 -14
- package/dist/es/common/constants.d.ts +0 -4
- package/dist/es/common/constants.js +0 -4
- package/dist/es/dateinput/DateInput.js +0 -704
- package/dist/es/dateinput/models/DateInputSettings.js +0 -2
- package/dist/es/dateinput/models/format-placeholder.js +0 -2
- package/dist/es/dateinput/models/incremental-steps.d.ts +0 -11
- package/dist/es/dateinput/models/incremental-steps.js +0 -1
- package/dist/es/dateinput/models/index.d.ts +0 -7
- package/dist/es/dateinput/models/index.js +0 -3
- package/dist/es/dateinput/models/kendo-date.js +0 -338
- package/dist/es/dateinput/models/mask.d.ts +0 -7
- package/dist/es/dateinput/models/mask.js +0 -11
- package/dist/es/dateinput/models/selection.d.ts +0 -7
- package/dist/es/dateinput/models/selection.js +0 -1
- package/dist/es/dateinput/utils.d.ts +0 -30
- package/dist/es/dateinput/utils.js +0 -83
- package/dist/es/datepicker/DatePicker.d.ts +0 -354
- package/dist/es/datepicker/DatePicker.js +0 -636
- package/dist/es/datepicker/ToggleButton.d.ts +0 -10
- package/dist/es/datepicker/ToggleButton.js +0 -5
- package/dist/es/datepicker/models/DatePickerSettings.d.ts +0 -138
- package/dist/es/datepicker/models/DatePickerSettings.js +0 -2
- package/dist/es/datepicker/models/index.d.ts +0 -2
- package/dist/es/datepicker/models/index.js +0 -1
- package/dist/es/daterangepicker/DateRangePicker.js +0 -584
- package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +0 -6
- package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +0 -1
- package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +0 -6
- package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +0 -1
- package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.d.ts +0 -6
- package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +0 -1
- package/dist/es/daterangepicker/models/DateRangePickerSettings.d.ts +0 -123
- package/dist/es/daterangepicker/models/DateRangePickerSettings.js +0 -2
- package/dist/es/daterangepicker/models/index.js +0 -1
- package/dist/es/datetimepicker/DateTimePicker.d.ts +0 -338
- package/dist/es/datetimepicker/DateTimePicker.js +0 -566
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +0 -97
- package/dist/es/datetimepicker/DateTimeSelector.js +0 -279
- package/dist/es/datetimepicker/models/DateTimePickerSettings.js +0 -1
- package/dist/es/datetimepicker/models/index.d.ts +0 -2
- package/dist/es/datetimepicker/models/index.js +0 -1
- package/dist/es/hooks/usePickerFloatingLabel.d.ts +0 -20
- package/dist/es/hooks/usePickerFloatingLabel.js +0 -35
- package/dist/es/main.d.ts +0 -35
- package/dist/es/main.js +0 -29
- package/dist/es/messages/index.js +0 -121
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/timepicker/TimeList.d.ts +0 -87
- package/dist/es/timepicker/TimeList.js +0 -302
- package/dist/es/timepicker/TimePart.js +0 -307
- package/dist/es/timepicker/TimePicker.js +0 -618
- package/dist/es/timepicker/TimeSelector.js +0 -261
- package/dist/es/timepicker/models/IncrementalSteps.d.ts +0 -8
- package/dist/es/timepicker/models/IncrementalSteps.js +0 -1
- package/dist/es/timepicker/models/ListItem.d.ts +0 -7
- package/dist/es/timepicker/models/ListItem.js +0 -1
- package/dist/es/timepicker/models/ListService.js +0 -1
- package/dist/es/timepicker/models/ListServiceSettings.d.ts +0 -12
- package/dist/es/timepicker/models/ListServiceSettings.js +0 -1
- package/dist/es/timepicker/models/TimePart.d.ts +0 -10
- package/dist/es/timepicker/models/TimePart.js +0 -10
- package/dist/es/timepicker/models/TimePickerSettings.js +0 -2
- package/dist/es/timepicker/models/index.d.ts +0 -7
- package/dist/es/timepicker/models/index.js +0 -2
- package/dist/es/timepicker/services/DOMService.d.ts +0 -10
- package/dist/es/timepicker/services/DOMService.js +0 -46
- package/dist/es/timepicker/services/DayPeriodService.d.ts +0 -47
- package/dist/es/timepicker/services/DayPeriodService.js +0 -119
- package/dist/es/timepicker/services/HoursService.js +0 -124
- package/dist/es/timepicker/services/MinutesService.d.ts +0 -32
- package/dist/es/timepicker/services/MinutesService.js +0 -119
- package/dist/es/timepicker/services/SecondsService.js +0 -120
- package/dist/es/timepicker/services/index.d.ts +0 -6
- package/dist/es/timepicker/services/index.js +0 -6
- package/dist/es/timepicker/utils.js +0 -149
- package/dist/es/utils.js +0 -306
- package/dist/es/virtualization/Virtualization.js +0 -317
- package/dist/es/virtualization/services/RowHeightService.js +0 -68
- package/dist/es/virtualization/services/ScrollerService.js +0 -90
- package/dist/es/virtualization/services/index.d.ts +0 -3
- package/dist/es/virtualization/services/index.js +0 -3
- package/dist/npm/PopupSettings.d.ts +0 -14
- package/dist/npm/PopupSettings.js +0 -2
- package/dist/npm/calendar/components/Calendar.js +0 -391
- package/dist/npm/calendar/components/CalendarCell.d.ts +0 -35
- package/dist/npm/calendar/components/CalendarCell.js +0 -131
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +0 -64
- package/dist/npm/calendar/components/CalendarNavigationItem.js +0 -69
- package/dist/npm/calendar/components/CalendarWeekCell.js +0 -64
- package/dist/npm/calendar/components/Header.js +0 -132
- package/dist/npm/calendar/components/HorizontalViewList.js +0 -148
- package/dist/npm/calendar/components/MultiViewCalendar.js +0 -592
- package/dist/npm/calendar/components/Navigation.js +0 -170
- package/dist/npm/calendar/components/TodayCommand.js +0 -96
- package/dist/npm/calendar/components/View.d.ts +0 -85
- package/dist/npm/calendar/components/View.js +0 -223
- package/dist/npm/calendar/components/ViewList.js +0 -261
- package/dist/npm/calendar/models/ActiveView.d.ts +0 -4
- package/dist/npm/calendar/models/ActiveView.js +0 -2
- package/dist/npm/calendar/models/CalendarSettings.js +0 -2
- package/dist/npm/calendar/models/CalendarViewEnum.d.ts +0 -9
- package/dist/npm/calendar/models/CalendarViewEnum.js +0 -13
- package/dist/npm/calendar/models/CellContext.js +0 -2
- package/dist/npm/calendar/models/MultiViewCalendarMode.d.ts +0 -9
- package/dist/npm/calendar/models/MultiViewCalendarMode.js +0 -2
- package/dist/npm/calendar/models/MultiViewCalendarSettings.d.ts +0 -112
- package/dist/npm/calendar/models/MultiViewCalendarSettings.js +0 -2
- package/dist/npm/calendar/models/NavigationAction.d.ts +0 -15
- package/dist/npm/calendar/models/NavigationAction.js +0 -19
- package/dist/npm/calendar/models/SelectionRange.d.ts +0 -17
- package/dist/npm/calendar/models/SelectionRange.js +0 -7
- package/dist/npm/calendar/models/SelectionRangeEnd.d.ts +0 -4
- package/dist/npm/calendar/models/SelectionRangeEnd.js +0 -2
- package/dist/npm/calendar/models/ViewService.js +0 -2
- package/dist/npm/calendar/models/index.d.ts +0 -11
- package/dist/npm/calendar/models/index.js +0 -9
- package/dist/npm/calendar/services/BusViewService.d.ts +0 -22
- package/dist/npm/calendar/services/BusViewService.js +0 -72
- package/dist/npm/calendar/services/CenturyViewService.d.ts +0 -25
- package/dist/npm/calendar/services/CenturyViewService.js +0 -157
- package/dist/npm/calendar/services/DOMService.js +0 -187
- package/dist/npm/calendar/services/DecadeViewService.js +0 -156
- package/dist/npm/calendar/services/MonthViewService.js +0 -172
- package/dist/npm/calendar/services/NavigationService.js +0 -44
- package/dist/npm/calendar/services/ScrollSyncService.js +0 -61
- package/dist/npm/calendar/services/WeekNamesService.d.ts +0 -9
- package/dist/npm/calendar/services/WeekNamesService.js +0 -19
- package/dist/npm/calendar/services/YearViewService.d.ts +0 -31
- package/dist/npm/calendar/services/YearViewService.js +0 -183
- package/dist/npm/calendar/services/index.js +0 -21
- package/dist/npm/calendar/utils/ScrollSync.d.ts +0 -13
- package/dist/npm/calendar/utils/ScrollSync.js +0 -32
- package/dist/npm/common/AdaptiveMode.d.ts +0 -21
- package/dist/npm/common/AdaptiveMode.js +0 -49
- package/dist/npm/common/PickerWrap.d.ts +0 -18
- package/dist/npm/common/PickerWrap.js +0 -17
- package/dist/npm/common/constants.d.ts +0 -4
- package/dist/npm/common/constants.js +0 -7
- package/dist/npm/dateinput/DateInput.d.ts +0 -351
- package/dist/npm/dateinput/DateInput.js +0 -707
- package/dist/npm/dateinput/models/DateInputSettings.d.ts +0 -99
- package/dist/npm/dateinput/models/DateInputSettings.js +0 -3
- package/dist/npm/dateinput/models/format-placeholder.d.ts +0 -39
- package/dist/npm/dateinput/models/format-placeholder.js +0 -3
- package/dist/npm/dateinput/models/incremental-steps.d.ts +0 -11
- package/dist/npm/dateinput/models/incremental-steps.js +0 -2
- package/dist/npm/dateinput/models/index.d.ts +0 -7
- package/dist/npm/dateinput/models/index.js +0 -7
- package/dist/npm/dateinput/models/kendo-date.d.ts +0 -53
- package/dist/npm/dateinput/models/kendo-date.js +0 -341
- package/dist/npm/dateinput/models/mask.d.ts +0 -7
- package/dist/npm/dateinput/models/mask.js +0 -14
- package/dist/npm/dateinput/models/selection.d.ts +0 -7
- package/dist/npm/dateinput/models/selection.js +0 -2
- package/dist/npm/dateinput/utils.js +0 -90
- package/dist/npm/datepicker/DatePicker.js +0 -639
- package/dist/npm/datepicker/ToggleButton.js +0 -8
- package/dist/npm/datepicker/models/DatePickerSettings.js +0 -3
- package/dist/npm/datepicker/models/index.d.ts +0 -2
- package/dist/npm/datepicker/models/index.js +0 -2
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +0 -349
- package/dist/npm/daterangepicker/DateRangePicker.js +0 -587
- package/dist/npm/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +0 -6
- package/dist/npm/daterangepicker/models/DateRangePickerCalendarSettings.js +0 -2
- package/dist/npm/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +0 -6
- package/dist/npm/daterangepicker/models/DateRangePickerDateInputSettings.js +0 -2
- package/dist/npm/daterangepicker/models/DateRangePickerPopupSettings.d.ts +0 -6
- package/dist/npm/daterangepicker/models/DateRangePickerPopupSettings.js +0 -2
- package/dist/npm/daterangepicker/models/DateRangePickerSettings.js +0 -3
- package/dist/npm/daterangepicker/models/index.d.ts +0 -5
- package/dist/npm/daterangepicker/models/index.js +0 -2
- package/dist/npm/datetimepicker/DateTimePicker.js +0 -569
- package/dist/npm/datetimepicker/DateTimeSelector.js +0 -282
- package/dist/npm/datetimepicker/models/DateTimePickerSettings.d.ts +0 -141
- package/dist/npm/datetimepicker/models/DateTimePickerSettings.js +0 -2
- package/dist/npm/datetimepicker/models/index.d.ts +0 -2
- package/dist/npm/datetimepicker/models/index.js +0 -2
- package/dist/npm/hooks/usePickerFloatingLabel.d.ts +0 -20
- package/dist/npm/hooks/usePickerFloatingLabel.js +0 -40
- package/dist/npm/main.d.ts +0 -35
- package/dist/npm/main.js +0 -102
- package/dist/npm/messages/index.d.ts +0 -120
- package/dist/npm/messages/index.js +0 -124
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/timepicker/TimeList.js +0 -305
- package/dist/npm/timepicker/TimePart.d.ts +0 -136
- package/dist/npm/timepicker/TimePart.js +0 -310
- package/dist/npm/timepicker/TimePicker.d.ts +0 -351
- package/dist/npm/timepicker/TimePicker.js +0 -621
- package/dist/npm/timepicker/TimeSelector.d.ts +0 -138
- package/dist/npm/timepicker/TimeSelector.js +0 -264
- package/dist/npm/timepicker/models/IncrementalSteps.d.ts +0 -8
- package/dist/npm/timepicker/models/IncrementalSteps.js +0 -2
- package/dist/npm/timepicker/models/ListItem.d.ts +0 -7
- package/dist/npm/timepicker/models/ListItem.js +0 -2
- package/dist/npm/timepicker/models/ListService.d.ts +0 -15
- package/dist/npm/timepicker/models/ListService.js +0 -2
- package/dist/npm/timepicker/models/ListServiceSettings.d.ts +0 -12
- package/dist/npm/timepicker/models/ListServiceSettings.js +0 -2
- package/dist/npm/timepicker/models/TimePart.d.ts +0 -10
- package/dist/npm/timepicker/models/TimePart.js +0 -13
- package/dist/npm/timepicker/models/TimePickerSettings.d.ts +0 -130
- package/dist/npm/timepicker/models/TimePickerSettings.js +0 -3
- package/dist/npm/timepicker/models/index.d.ts +0 -7
- package/dist/npm/timepicker/models/index.js +0 -5
- package/dist/npm/timepicker/services/DOMService.d.ts +0 -10
- package/dist/npm/timepicker/services/DOMService.js +0 -49
- package/dist/npm/timepicker/services/DayPeriodService.js +0 -122
- package/dist/npm/timepicker/services/HoursService.d.ts +0 -33
- package/dist/npm/timepicker/services/HoursService.js +0 -127
- package/dist/npm/timepicker/services/MinutesService.js +0 -122
- package/dist/npm/timepicker/services/SecondsService.d.ts +0 -32
- package/dist/npm/timepicker/services/SecondsService.js +0 -123
- package/dist/npm/timepicker/services/index.d.ts +0 -6
- package/dist/npm/timepicker/services/index.js +0 -13
- package/dist/npm/timepicker/utils.d.ts +0 -56
- package/dist/npm/timepicker/utils.js +0 -161
- package/dist/npm/utils.d.ts +0 -96
- package/dist/npm/utils.js +0 -325
- package/dist/npm/virtualization/Virtualization.d.ts +0 -116
- package/dist/npm/virtualization/Virtualization.js +0 -320
- package/dist/npm/virtualization/services/RowHeightService.d.ts +0 -18
- package/dist/npm/virtualization/services/RowHeightService.js +0 -71
- package/dist/npm/virtualization/services/ScrollerService.d.ts +0 -49
- package/dist/npm/virtualization/services/ScrollerService.js +0 -93
- package/dist/npm/virtualization/services/index.d.ts +0 -3
- package/dist/npm/virtualization/services/index.js +0 -9
- package/dist/systemjs/kendo-react-dateinputs.js +0 -1
- package/e2e-next/calendar.basic.tests.ts +0 -24
- package/e2e-next/dateinput.basic.tests.ts +0 -24
- package/e2e-next/datepicker.basic.tests.ts +0 -24
- package/e2e-next/daterangepicker.basic.tests.ts +0 -24
- package/e2e-next/datetimepicker.basic.tests.ts +0 -24
- 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);
|