@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.
- 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,124 +0,0 @@
|
|
|
1
|
-
import { getDate, isEqual } from '@progress/kendo-date-math';
|
|
2
|
-
import { MIDNIGHT_DATE } from '../../utils';
|
|
3
|
-
import { range, setHours } from '../utils';
|
|
4
|
-
var HOURS_IN_DAY = 24;
|
|
5
|
-
var clampToRange = function (rangeValue) { return function (value) { return value % rangeValue; }; };
|
|
6
|
-
var clamp = clampToRange(HOURS_IN_DAY);
|
|
7
|
-
var stepper = function (start, step) { return function (idx) { return clamp(start + (idx * step)); }; };
|
|
8
|
-
var distanceFromMin = function (value, min) { return clamp(HOURS_IN_DAY + value - min); };
|
|
9
|
-
var limit = function (borderValue) { return function (barrier, value) {
|
|
10
|
-
var useBarrier = !value || getDate(barrier).getTime() === getDate(value).getTime();
|
|
11
|
-
return useBarrier ? barrier : setHours(barrier, borderValue);
|
|
12
|
-
}; };
|
|
13
|
-
var limitDown = limit(0);
|
|
14
|
-
var limitUp = limit(HOURS_IN_DAY - 1);
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
var HoursService = /** @class */ (function () {
|
|
19
|
-
function HoursService(intl) {
|
|
20
|
-
this.intl = intl;
|
|
21
|
-
this.boundRange = false;
|
|
22
|
-
this.insertUndividedMax = false;
|
|
23
|
-
this.min = null;
|
|
24
|
-
this.max = null;
|
|
25
|
-
this.step = 0;
|
|
26
|
-
this.toListItem = null;
|
|
27
|
-
}
|
|
28
|
-
HoursService.prototype.apply = function (value, candidate) {
|
|
29
|
-
return setHours(value, candidate.getHours());
|
|
30
|
-
};
|
|
31
|
-
HoursService.prototype.configure = function (settings) {
|
|
32
|
-
var _this = this;
|
|
33
|
-
var _a = settings.boundRange, boundRange = _a === void 0 ? this.boundRange : _a, _b = settings.insertUndividedMax, insertUndividedMax = _b === void 0 ? this.insertUndividedMax : _b, _c = settings.min, min = _c === void 0 ? this.min : _c, _d = settings.max, max = _d === void 0 ? this.max : _d, part = settings.part, _e = settings.step, step = _e === void 0 ? this.step : _e;
|
|
34
|
-
this.boundRange = boundRange;
|
|
35
|
-
this.insertUndividedMax = insertUndividedMax;
|
|
36
|
-
this.toListItem = function (hour) {
|
|
37
|
-
var date = setHours(MIDNIGHT_DATE, hour);
|
|
38
|
-
return {
|
|
39
|
-
text: _this.intl.formatDate(date, part.pattern),
|
|
40
|
-
value: date
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
this.min = min;
|
|
44
|
-
this.max = max;
|
|
45
|
-
this.step = step;
|
|
46
|
-
};
|
|
47
|
-
HoursService.prototype.data = function (selectedValue) {
|
|
48
|
-
var _this = this;
|
|
49
|
-
var min = this.range(selectedValue)[0];
|
|
50
|
-
var getHour = stepper(min, this.step);
|
|
51
|
-
var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getHour(idx))); };
|
|
52
|
-
var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
|
|
53
|
-
this.addLast(data);
|
|
54
|
-
if (selectedValue) {
|
|
55
|
-
this.addMissing(data, selectedValue);
|
|
56
|
-
}
|
|
57
|
-
return data;
|
|
58
|
-
};
|
|
59
|
-
HoursService.prototype.isRangeChanged = function (min, max) {
|
|
60
|
-
if (!this.min || !this.max) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
return !isEqual(this.min, min) || !isEqual(this.max, max);
|
|
64
|
-
};
|
|
65
|
-
HoursService.prototype.limitRange = function (min, max, value) {
|
|
66
|
-
return this.boundRange ? [limitDown(min, value), limitUp(max, value)] : [min, max];
|
|
67
|
-
};
|
|
68
|
-
HoursService.prototype.total = function (value) {
|
|
69
|
-
var last = this.insertUndividedMax && this.isLastMissing(value) ? 1 : 0;
|
|
70
|
-
var missing = this.isMissing(value) ? 1 : 0;
|
|
71
|
-
return this.countFromMin(value) + missing + last;
|
|
72
|
-
};
|
|
73
|
-
HoursService.prototype.selectedIndex = function (value) {
|
|
74
|
-
return Math.ceil(this.divideByStep(value));
|
|
75
|
-
};
|
|
76
|
-
HoursService.prototype.valueInList = function (value) {
|
|
77
|
-
if (!value) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
var matchMax = this.insertUndividedMax && this.lastHour(value) === value.getHours();
|
|
81
|
-
return matchMax || !this.isMissing(value);
|
|
82
|
-
};
|
|
83
|
-
HoursService.prototype.addLast = function (data, value) {
|
|
84
|
-
if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
|
|
85
|
-
data.push(this.toListItem(this.lastHour(value)));
|
|
86
|
-
}
|
|
87
|
-
return data;
|
|
88
|
-
};
|
|
89
|
-
HoursService.prototype.addMissing = function (data, value) {
|
|
90
|
-
if (this.valueInList(value)) {
|
|
91
|
-
return data;
|
|
92
|
-
}
|
|
93
|
-
if (this.toListItem) {
|
|
94
|
-
var missingItem = this.toListItem(value.getHours());
|
|
95
|
-
data.splice(this.selectedIndex(value), 0, missingItem);
|
|
96
|
-
}
|
|
97
|
-
return data;
|
|
98
|
-
};
|
|
99
|
-
HoursService.prototype.countFromMin = function (value) {
|
|
100
|
-
var _a = this.range(value), min = _a[0], max = _a[1];
|
|
101
|
-
return Math.floor(distanceFromMin(max, min) / this.step) + 1; /* include min */
|
|
102
|
-
};
|
|
103
|
-
HoursService.prototype.isMissing = function (value) {
|
|
104
|
-
if (!value) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
return this.selectedIndex(value) !== this.divideByStep(value);
|
|
108
|
-
};
|
|
109
|
-
HoursService.prototype.isLastMissing = function (value) {
|
|
110
|
-
return this.max !== null && this.isMissing(setHours(this.max, this.lastHour(value)));
|
|
111
|
-
};
|
|
112
|
-
HoursService.prototype.divideByStep = function (value) {
|
|
113
|
-
return distanceFromMin(value.getHours(), this.min.getHours()) / this.step;
|
|
114
|
-
};
|
|
115
|
-
HoursService.prototype.lastHour = function (value) {
|
|
116
|
-
return this.range(value)[1];
|
|
117
|
-
};
|
|
118
|
-
HoursService.prototype.range = function (value) {
|
|
119
|
-
var _a = this.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
120
|
-
return [min.getHours(), max.getHours()];
|
|
121
|
-
};
|
|
122
|
-
return HoursService;
|
|
123
|
-
}());
|
|
124
|
-
export { HoursService };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IntlService } from '@progress/kendo-react-intl';
|
|
2
|
-
import { ListServiceSettings } from '../models/ListServiceSettings';
|
|
3
|
-
import { ListService } from '../models/ListService';
|
|
4
|
-
import { ListItem } from '../models/ListItem';
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare class MinutesService implements ListService {
|
|
9
|
-
private intl;
|
|
10
|
-
private toListItem;
|
|
11
|
-
private min;
|
|
12
|
-
private max;
|
|
13
|
-
private step;
|
|
14
|
-
private insertUndividedMax;
|
|
15
|
-
constructor(intl: IntlService);
|
|
16
|
-
apply(value: Date, candidate: Date): Date;
|
|
17
|
-
configure(settings: ListServiceSettings): void;
|
|
18
|
-
data(selectedValue?: Date): ListItem[];
|
|
19
|
-
isRangeChanged(min: Date, max: Date): boolean;
|
|
20
|
-
limitRange(min: Date, max: Date, value?: Date): Date[];
|
|
21
|
-
total(value?: Date): number;
|
|
22
|
-
selectedIndex(value: Date): number;
|
|
23
|
-
valueInList(value: Date): boolean;
|
|
24
|
-
private addLast;
|
|
25
|
-
private addMissing;
|
|
26
|
-
private countFromMin;
|
|
27
|
-
private isMissing;
|
|
28
|
-
private isLastMissing;
|
|
29
|
-
private divideByStep;
|
|
30
|
-
private lastMinute;
|
|
31
|
-
private range;
|
|
32
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { isEqual } from '@progress/kendo-date-math';
|
|
2
|
-
import { MIDNIGHT_DATE } from '../../utils';
|
|
3
|
-
import { range, setMinutes } from '../utils';
|
|
4
|
-
var MINUTES_IN_HOUR = 60;
|
|
5
|
-
var clampToRange = function (rangeValue) { return function (value) { return value % rangeValue; }; };
|
|
6
|
-
var clamp = clampToRange(MINUTES_IN_HOUR);
|
|
7
|
-
var stepper = function (start, step) { return function (idx) { return clamp(start + (idx * step)); }; };
|
|
8
|
-
var distanceFromMin = function (value, min) { return clamp(MINUTES_IN_HOUR + value - min); };
|
|
9
|
-
var limit = function (borderValue) { return function (barrier, value) {
|
|
10
|
-
var useBarrier = !value || barrier.getHours() === value.getHours();
|
|
11
|
-
return useBarrier ? barrier : setMinutes(barrier, borderValue);
|
|
12
|
-
}; };
|
|
13
|
-
var limitDown = limit(0);
|
|
14
|
-
var limitUp = limit(MINUTES_IN_HOUR - 1);
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
var MinutesService = /** @class */ (function () {
|
|
19
|
-
function MinutesService(intl) {
|
|
20
|
-
this.intl = intl;
|
|
21
|
-
this.toListItem = null;
|
|
22
|
-
this.min = null;
|
|
23
|
-
this.max = null;
|
|
24
|
-
this.step = 0;
|
|
25
|
-
this.insertUndividedMax = false;
|
|
26
|
-
}
|
|
27
|
-
MinutesService.prototype.apply = function (value, candidate) {
|
|
28
|
-
return setMinutes(value, candidate.getMinutes());
|
|
29
|
-
};
|
|
30
|
-
MinutesService.prototype.configure = function (settings) {
|
|
31
|
-
var _this = this;
|
|
32
|
-
var _a = settings.insertUndividedMax, insertUndividedMax = _a === void 0 ? this.insertUndividedMax : _a, _b = settings.min, min = _b === void 0 ? this.min : _b, _c = settings.max, max = _c === void 0 ? this.max : _c, part = settings.part, _d = settings.step, step = _d === void 0 ? this.step : _d;
|
|
33
|
-
this.insertUndividedMax = insertUndividedMax;
|
|
34
|
-
this.toListItem = function (minute) {
|
|
35
|
-
var date = setMinutes(MIDNIGHT_DATE, minute);
|
|
36
|
-
return {
|
|
37
|
-
text: _this.intl.formatDate(date, part.pattern),
|
|
38
|
-
value: date
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
this.min = min;
|
|
42
|
-
this.max = max;
|
|
43
|
-
this.step = step;
|
|
44
|
-
};
|
|
45
|
-
MinutesService.prototype.data = function (selectedValue) {
|
|
46
|
-
var _this = this;
|
|
47
|
-
var min = this.range(selectedValue)[0];
|
|
48
|
-
var getMinute = stepper(min, this.step);
|
|
49
|
-
var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getMinute(idx))); };
|
|
50
|
-
var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
|
|
51
|
-
this.addLast(data);
|
|
52
|
-
if (selectedValue) {
|
|
53
|
-
this.addMissing(data, selectedValue);
|
|
54
|
-
}
|
|
55
|
-
return data;
|
|
56
|
-
};
|
|
57
|
-
MinutesService.prototype.isRangeChanged = function (min, max) {
|
|
58
|
-
return (this.min !== null && this.max !== null) && (!isEqual(this.min, min) || !isEqual(this.max, max));
|
|
59
|
-
};
|
|
60
|
-
MinutesService.prototype.limitRange = function (min, max, value) {
|
|
61
|
-
return [limitDown(min, value), limitUp(max, value)];
|
|
62
|
-
};
|
|
63
|
-
MinutesService.prototype.total = function (value) {
|
|
64
|
-
var last = this.insertUndividedMax && this.isLastMissing(value) ? 1 : 0;
|
|
65
|
-
var missing = this.isMissing(value) ? 1 : 0;
|
|
66
|
-
return this.countFromMin(value) + missing + last;
|
|
67
|
-
};
|
|
68
|
-
MinutesService.prototype.selectedIndex = function (value) {
|
|
69
|
-
return Math.ceil(this.divideByStep(value));
|
|
70
|
-
};
|
|
71
|
-
MinutesService.prototype.valueInList = function (value) {
|
|
72
|
-
if (!value) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
var matchMax = this.insertUndividedMax && this.lastMinute(value) === value.getMinutes();
|
|
76
|
-
return matchMax || !this.isMissing(value);
|
|
77
|
-
};
|
|
78
|
-
MinutesService.prototype.addLast = function (data, value) {
|
|
79
|
-
if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
|
|
80
|
-
data.push(this.toListItem(this.lastMinute(value)));
|
|
81
|
-
}
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
MinutesService.prototype.addMissing = function (data, value) {
|
|
85
|
-
if (this.valueInList(value)) {
|
|
86
|
-
return data;
|
|
87
|
-
}
|
|
88
|
-
if (this.toListItem) {
|
|
89
|
-
var missingItem = this.toListItem(value.getMinutes());
|
|
90
|
-
data.splice(this.selectedIndex(value), 0, missingItem);
|
|
91
|
-
}
|
|
92
|
-
return data;
|
|
93
|
-
};
|
|
94
|
-
MinutesService.prototype.countFromMin = function (value) {
|
|
95
|
-
var _a = this.range(value), min = _a[0], max = _a[1];
|
|
96
|
-
return Math.floor(distanceFromMin(max, min) / this.step) + 1; /* include min */
|
|
97
|
-
};
|
|
98
|
-
MinutesService.prototype.isMissing = function (value) {
|
|
99
|
-
if (!value) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
return this.selectedIndex(value) !== this.divideByStep(value);
|
|
103
|
-
};
|
|
104
|
-
MinutesService.prototype.isLastMissing = function (value) {
|
|
105
|
-
return this.max !== null && this.isMissing(setMinutes(this.max, this.lastMinute(value)));
|
|
106
|
-
};
|
|
107
|
-
MinutesService.prototype.divideByStep = function (value) {
|
|
108
|
-
return distanceFromMin(value.getMinutes(), this.min.getMinutes()) / this.step;
|
|
109
|
-
};
|
|
110
|
-
MinutesService.prototype.lastMinute = function (value) {
|
|
111
|
-
return this.range(value)[1];
|
|
112
|
-
};
|
|
113
|
-
MinutesService.prototype.range = function (value) {
|
|
114
|
-
var _a = this.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
115
|
-
return [min.getMinutes(), max.getMinutes()];
|
|
116
|
-
};
|
|
117
|
-
return MinutesService;
|
|
118
|
-
}());
|
|
119
|
-
export { MinutesService };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { isEqual } from '@progress/kendo-date-math';
|
|
2
|
-
import { MIDNIGHT_DATE } from '../../utils';
|
|
3
|
-
import { range, setSeconds } from '../utils';
|
|
4
|
-
var SECONDS_IN_HOUR = 60;
|
|
5
|
-
var clampToRange = function (rangeValue) { return function (value) { return value % rangeValue; }; };
|
|
6
|
-
var clamp = clampToRange(SECONDS_IN_HOUR);
|
|
7
|
-
var stepper = function (start, step) { return function (idx) { return clamp(start + (idx * step)); }; };
|
|
8
|
-
var distanceFromMin = function (value, min) { return clamp(SECONDS_IN_HOUR + value - min); };
|
|
9
|
-
var limit = function (borderValue) { return function (barrier, value) {
|
|
10
|
-
var useBarrier = !value ||
|
|
11
|
-
(barrier.getMinutes() === value.getMinutes() && barrier.getHours() === value.getHours());
|
|
12
|
-
return useBarrier ? barrier : setSeconds(barrier, borderValue);
|
|
13
|
-
}; };
|
|
14
|
-
var limitDown = limit(0);
|
|
15
|
-
var limitUp = limit(SECONDS_IN_HOUR - 1);
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
var SecondsService = /** @class */ (function () {
|
|
20
|
-
function SecondsService(intl) {
|
|
21
|
-
this.intl = intl;
|
|
22
|
-
this.toListItem = null;
|
|
23
|
-
this.min = null;
|
|
24
|
-
this.max = null;
|
|
25
|
-
this.step = 0;
|
|
26
|
-
this.insertUndividedMax = false;
|
|
27
|
-
}
|
|
28
|
-
SecondsService.prototype.apply = function (value, candidate) {
|
|
29
|
-
return setSeconds(value, candidate.getSeconds());
|
|
30
|
-
};
|
|
31
|
-
SecondsService.prototype.configure = function (settings) {
|
|
32
|
-
var _this = this;
|
|
33
|
-
var _a = settings.insertUndividedMax, insertUndividedMax = _a === void 0 ? this.insertUndividedMax : _a, _b = settings.min, min = _b === void 0 ? this.min : _b, _c = settings.max, max = _c === void 0 ? this.max : _c, part = settings.part, _d = settings.step, step = _d === void 0 ? this.step : _d;
|
|
34
|
-
this.insertUndividedMax = insertUndividedMax;
|
|
35
|
-
this.toListItem = function (minute) {
|
|
36
|
-
var date = setSeconds(MIDNIGHT_DATE, minute);
|
|
37
|
-
return {
|
|
38
|
-
text: _this.intl.formatDate(date, part.pattern),
|
|
39
|
-
value: date
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
this.min = min;
|
|
43
|
-
this.max = max;
|
|
44
|
-
this.step = step;
|
|
45
|
-
};
|
|
46
|
-
SecondsService.prototype.data = function (selectedValue) {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var min = this.range(selectedValue)[0];
|
|
49
|
-
var getSecond = stepper(min, this.step);
|
|
50
|
-
var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getSecond(idx))); };
|
|
51
|
-
var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
|
|
52
|
-
this.addLast(data);
|
|
53
|
-
if (selectedValue) {
|
|
54
|
-
this.addMissing(data, selectedValue);
|
|
55
|
-
}
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
SecondsService.prototype.isRangeChanged = function (min, max) {
|
|
59
|
-
return this.min !== null && this.max !== null && (!isEqual(this.min, min) || !isEqual(this.max, max));
|
|
60
|
-
};
|
|
61
|
-
SecondsService.prototype.limitRange = function (min, max, value) {
|
|
62
|
-
return [limitDown(min, value), limitUp(max, value)];
|
|
63
|
-
};
|
|
64
|
-
SecondsService.prototype.total = function (value) {
|
|
65
|
-
var last = this.insertUndividedMax && this.isLastMissing(value) ? 1 : 0;
|
|
66
|
-
var missing = this.isMissing(value) ? 1 : 0;
|
|
67
|
-
return this.countFromMin(value) + missing + last;
|
|
68
|
-
};
|
|
69
|
-
SecondsService.prototype.selectedIndex = function (value) {
|
|
70
|
-
return Math.ceil(this.divideByStep(value));
|
|
71
|
-
};
|
|
72
|
-
SecondsService.prototype.valueInList = function (value) {
|
|
73
|
-
if (!value) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
var matchMax = this.insertUndividedMax && this.lastSecond(value) === value.getSeconds();
|
|
77
|
-
return matchMax || !this.isMissing(value);
|
|
78
|
-
};
|
|
79
|
-
SecondsService.prototype.divideByStep = function (value) {
|
|
80
|
-
return distanceFromMin(value.getSeconds(), this.min.getSeconds()) / this.step;
|
|
81
|
-
};
|
|
82
|
-
SecondsService.prototype.addLast = function (data, value) {
|
|
83
|
-
if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
|
|
84
|
-
data.push(this.toListItem(this.lastSecond(value)));
|
|
85
|
-
}
|
|
86
|
-
return data;
|
|
87
|
-
};
|
|
88
|
-
SecondsService.prototype.addMissing = function (data, value) {
|
|
89
|
-
if (this.valueInList(value)) {
|
|
90
|
-
return data;
|
|
91
|
-
}
|
|
92
|
-
if (this.toListItem) {
|
|
93
|
-
var missingItem = this.toListItem(value.getSeconds());
|
|
94
|
-
data.splice(this.selectedIndex(value), 0, missingItem);
|
|
95
|
-
}
|
|
96
|
-
return data;
|
|
97
|
-
};
|
|
98
|
-
SecondsService.prototype.countFromMin = function (value) {
|
|
99
|
-
var _a = this.range(value), min = _a[0], max = _a[1];
|
|
100
|
-
return Math.floor(distanceFromMin(max, min) / this.step) + 1; /* include min */
|
|
101
|
-
};
|
|
102
|
-
SecondsService.prototype.isMissing = function (value) {
|
|
103
|
-
if (!value) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
return this.selectedIndex(value) !== this.divideByStep(value);
|
|
107
|
-
};
|
|
108
|
-
SecondsService.prototype.isLastMissing = function (value) {
|
|
109
|
-
return this.max !== null && this.isMissing(setSeconds(this.max, this.lastSecond(value)));
|
|
110
|
-
};
|
|
111
|
-
SecondsService.prototype.lastSecond = function (value) {
|
|
112
|
-
return this.range(value)[1];
|
|
113
|
-
};
|
|
114
|
-
SecondsService.prototype.range = function (value) {
|
|
115
|
-
var _a = this.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
116
|
-
return [min.getSeconds(), max.getSeconds()];
|
|
117
|
-
};
|
|
118
|
-
return SecondsService;
|
|
119
|
-
}());
|
|
120
|
-
export { SecondsService };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DayPeriodService } from './DayPeriodService';
|
|
2
|
-
import { DOMService } from './DOMService';
|
|
3
|
-
import { HoursService } from './HoursService';
|
|
4
|
-
import { MinutesService } from './MinutesService';
|
|
5
|
-
import { SecondsService } from './SecondsService';
|
|
6
|
-
export { DayPeriodService, DOMService, HoursService, MinutesService, SecondsService };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DayPeriodService } from './DayPeriodService';
|
|
2
|
-
import { DOMService } from './DOMService';
|
|
3
|
-
import { HoursService } from './HoursService';
|
|
4
|
-
import { MinutesService } from './MinutesService';
|
|
5
|
-
import { SecondsService } from './SecondsService';
|
|
6
|
-
export { DayPeriodService, DOMService, HoursService, MinutesService, SecondsService };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { cloneDate, addDays } from '@progress/kendo-date-math';
|
|
2
|
-
import { TIME_PART } from './models/TimePart';
|
|
3
|
-
import { MIDNIGHT_DATE, setTime } from '../utils';
|
|
4
|
-
var setter = function (method) { return function (date, value) {
|
|
5
|
-
var clone = cloneDate(date);
|
|
6
|
-
clone[method](value);
|
|
7
|
-
return clone;
|
|
8
|
-
}; };
|
|
9
|
-
var defaultGetters = [
|
|
10
|
-
{ type: TIME_PART.hour, getter: function (value) { return value.getHours(); } },
|
|
11
|
-
{ type: TIME_PART.minute, getter: function (value) { return value.getMinutes(); } },
|
|
12
|
-
{ type: TIME_PART.second, getter: function (value) { return value.getSeconds(); } },
|
|
13
|
-
{ type: TIME_PART.millisecond, getter: function (value) { return value.getMilliseconds(); } }
|
|
14
|
-
];
|
|
15
|
-
var left = function (getter) { return function (origin, _) { return getter(origin); }; };
|
|
16
|
-
var right = function (getter) { return function (_, candidate) { return getter(candidate); }; };
|
|
17
|
-
var convertToObject = function (parts) { return parts.reduce(function (obj, p) { obj[p.type] = p.type; return obj; }, {}); };
|
|
18
|
-
var getterByPart = function (parts) { return function (g) { return parts[g.type] ? right(g.getter) : left(g.getter); }; };
|
|
19
|
-
var gettersFactory = function (getters) { return function (parts) { return (getters.map(getterByPart(convertToObject(parts)))); }; };
|
|
20
|
-
var snapValue = function (getter, step, min, type) { return function (date) {
|
|
21
|
-
var value = getter(date);
|
|
22
|
-
var minValue = getter(min);
|
|
23
|
-
if (type === 'hour') {
|
|
24
|
-
return value - ((value - minValue) % step);
|
|
25
|
-
}
|
|
26
|
-
if (date.getTime() <= min.getTime()
|
|
27
|
-
&& value !== 0
|
|
28
|
-
&& value <= minValue) {
|
|
29
|
-
return (Math.ceil(value / step)) * step;
|
|
30
|
-
}
|
|
31
|
-
return value - (value % step);
|
|
32
|
-
}; };
|
|
33
|
-
var snappersFactory = function (getters) { return function (steps, min) { return (getters.map(function (g) {
|
|
34
|
-
var step = Math.floor(steps[g.type]);
|
|
35
|
-
return step ? snapValue(g.getter, step, min, g.type) : g.getter;
|
|
36
|
-
})); }; };
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export var generateGetters = gettersFactory(defaultGetters);
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
export var generateSnappers = snappersFactory(defaultGetters);
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export var valueMerger = function (getters) { return function (origin, candidate) {
|
|
49
|
-
origin.setHours.apply(origin, getters.map(function (g) { return g(origin, candidate); }));
|
|
50
|
-
return origin;
|
|
51
|
-
}; };
|
|
52
|
-
/**
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
export var snapTime = function (snappers) { return function (candidate) {
|
|
56
|
-
var date = cloneDate(candidate);
|
|
57
|
-
date.setHours.apply(date, snappers.map(function (s) { return s(date); }));
|
|
58
|
-
return date;
|
|
59
|
-
}; };
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
export var setHours = setter('setHours');
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
export var setMinutes = setter('setMinutes');
|
|
68
|
-
/**
|
|
69
|
-
* @hidden
|
|
70
|
-
*/
|
|
71
|
-
export var setSeconds = setter('setSeconds');
|
|
72
|
-
/**
|
|
73
|
-
* @hidden
|
|
74
|
-
*/
|
|
75
|
-
export var getNow = function () { return new Date(); };
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
*/
|
|
79
|
-
export var range = function (start, end, step) {
|
|
80
|
-
if (step === void 0) { step = 1; }
|
|
81
|
-
var result = [];
|
|
82
|
-
for (var i = start; i < end; i = i + step) {
|
|
83
|
-
result.push(i);
|
|
84
|
-
}
|
|
85
|
-
return result;
|
|
86
|
-
};
|
|
87
|
-
var normalizeTimes = function (candidate, min, max) { return ({
|
|
88
|
-
candidateValue: setTime(MIDNIGHT_DATE, candidate),
|
|
89
|
-
maxValue: addDays(setTime(MIDNIGHT_DATE, max), min.getHours() < max.getHours() ? 0 : 1),
|
|
90
|
-
minValue: setTime(MIDNIGHT_DATE, min)
|
|
91
|
-
}); };
|
|
92
|
-
/**
|
|
93
|
-
* @hidden
|
|
94
|
-
*/
|
|
95
|
-
export var timeInRange = function (candidate, min, max) {
|
|
96
|
-
if (!candidate || !min || !max) {
|
|
97
|
-
return candidate;
|
|
98
|
-
}
|
|
99
|
-
var _a = normalizeTimes(candidate, min, max), candidateValue = _a.candidateValue, minValue = _a.minValue, maxValue = _a.maxValue;
|
|
100
|
-
if (candidateValue < minValue) {
|
|
101
|
-
return setTime(candidate, min);
|
|
102
|
-
}
|
|
103
|
-
if (candidateValue > maxValue) {
|
|
104
|
-
return setTime(candidate, max);
|
|
105
|
-
}
|
|
106
|
-
return candidate;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
export var isInTimeRange = function (candidate, min, max) {
|
|
112
|
-
if (!candidate || !min || !max) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
var _a = normalizeTimes(candidate, min, max), candidateValue = _a.candidateValue, minValue = _a.minValue, maxValue = _a.maxValue;
|
|
116
|
-
return minValue <= candidateValue && candidateValue <= maxValue;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* @hidden
|
|
120
|
-
*/
|
|
121
|
-
export var isInRange = function (candidate, min, max) {
|
|
122
|
-
if (candidate === null) {
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
var _a = normalizeTimes(candidate, min, max), candidateValue = _a.candidateValue, minValue = _a.minValue, maxValue = _a.maxValue;
|
|
126
|
-
return minValue <= candidateValue && candidateValue <= maxValue;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* @hidden
|
|
130
|
-
*/
|
|
131
|
-
export var isSmallerThanMin = function (val, min) {
|
|
132
|
-
if (val === null || min === null) {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
var normalizedValue = setTime(MIDNIGHT_DATE, val);
|
|
136
|
-
var normalizedMin = setTime(MIDNIGHT_DATE, min);
|
|
137
|
-
return normalizedValue.getTime() < normalizedMin.getHours();
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* @hidden
|
|
141
|
-
*/
|
|
142
|
-
export var isBiggerThanMax = function (val, max) {
|
|
143
|
-
if (val === null || max === null) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
var normalizedValue = setTime(MIDNIGHT_DATE, val);
|
|
147
|
-
var normalizedMax = setTime(MIDNIGHT_DATE, max);
|
|
148
|
-
return normalizedMax.getTime() < normalizedValue.getHours();
|
|
149
|
-
};
|