@progress/kendo-react-dateinputs 6.1.1 → 7.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,167 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
import * as React from 'react';
|
|
28
|
-
import * as PropTypes from 'prop-types';
|
|
29
|
-
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
30
|
-
import { CalendarNavigationItem } from './CalendarNavigationItem';
|
|
31
|
-
import { dateInRange } from '../../utils';
|
|
32
|
-
import { Virtualization } from '../../virtualization/Virtualization';
|
|
33
|
-
var ITEMS_COUNT = 30;
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
var Navigation = /** @class */ (function (_super) {
|
|
38
|
-
__extends(Navigation, _super);
|
|
39
|
-
function Navigation(props) {
|
|
40
|
-
var _this = _super.call(this, props) || this;
|
|
41
|
-
_this.virtualization = null;
|
|
42
|
-
_this.list = null;
|
|
43
|
-
_this.itemHeight = 0;
|
|
44
|
-
_this.topOffset = 0;
|
|
45
|
-
_this.maxViewHeight = 0;
|
|
46
|
-
_this.bottomOffset = 0;
|
|
47
|
-
_this.handleVirtualizationMount = function (virtualization) {
|
|
48
|
-
_this.virtualization = virtualization;
|
|
49
|
-
if (_this.virtualization && _this.list) {
|
|
50
|
-
_this.list.style.transform = "translateY(".concat(_this.topOffset, "px)");
|
|
51
|
-
var viewDate = dateInRange(_this.props.focusedDate, _this.props.min, _this.props.max);
|
|
52
|
-
var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
|
|
53
|
-
_this.virtualization.scrollToIndex(indexToScroll);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
_this.buildNavigationItem = function (date) {
|
|
57
|
-
var text = _this.props.service.navigationTitle(date);
|
|
58
|
-
var isRangeStart = _this.props.service.isRangeStart(date);
|
|
59
|
-
var uniqueID = "kendo-react-calendar-nav-item-".concat(date.getTime());
|
|
60
|
-
var navigationItemProps = {
|
|
61
|
-
text: text,
|
|
62
|
-
value: date,
|
|
63
|
-
isRangeStart: isRangeStart,
|
|
64
|
-
view: _this.props.activeView,
|
|
65
|
-
onClick: _this.handleDateChange
|
|
66
|
-
};
|
|
67
|
-
return _this.props.navigationItem
|
|
68
|
-
? (React.createElement(_this.props.navigationItem, __assign({}, navigationItemProps, { key: uniqueID }), text))
|
|
69
|
-
: (React.createElement(CalendarNavigationItem, __assign({}, navigationItemProps, { key: uniqueID }), text));
|
|
70
|
-
};
|
|
71
|
-
_this.calculateHeights = function () {
|
|
72
|
-
var calendarHeight = _this.props.dom.calendarHeight;
|
|
73
|
-
_this.itemHeight = _this.props.dom.navigationItemHeight || 1;
|
|
74
|
-
_this.maxViewHeight = _this.props.dom.monthViewHeight;
|
|
75
|
-
_this.topOffset = (calendarHeight - _this.itemHeight) / 2;
|
|
76
|
-
_this.bottomOffset = calendarHeight - _this.itemHeight;
|
|
77
|
-
};
|
|
78
|
-
_this.handleDateChange = function (value, event) {
|
|
79
|
-
var onChange = _this.props.onChange;
|
|
80
|
-
if (onChange && event) {
|
|
81
|
-
var args = {
|
|
82
|
-
value: cloneDate(value),
|
|
83
|
-
target: _this,
|
|
84
|
-
nativeEvent: event && event.nativeEvent,
|
|
85
|
-
syntheticEvent: event
|
|
86
|
-
};
|
|
87
|
-
onChange.call(undefined, args);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
_this.handleScrollAction = function (_a) {
|
|
91
|
-
var scrollAction = _a.scrollAction, pageAction = _a.pageAction;
|
|
92
|
-
var skip = pageAction ? pageAction.skip : _this.state.skip;
|
|
93
|
-
if (_this.state.skip !== skip) {
|
|
94
|
-
_this.setState({ skip: skip });
|
|
95
|
-
}
|
|
96
|
-
if (_this.list && scrollAction) {
|
|
97
|
-
var translate = "translateY(".concat(scrollAction.offset, "px)");
|
|
98
|
-
_this.list.style.transform = translate;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
_this.lastView = _this.props.activeView;
|
|
102
|
-
_this.lastFocus = _this.props.focusedDate;
|
|
103
|
-
var skip = _this.props.service.skip(_this.props.focusedDate, _this.props.min);
|
|
104
|
-
var total = _this.props.service.total(_this.props.min, _this.props.max);
|
|
105
|
-
_this.state = {
|
|
106
|
-
skip: (skip - _this.getTake(skip, total) > 0) ? skip : 0
|
|
107
|
-
};
|
|
108
|
-
return _this;
|
|
109
|
-
}
|
|
110
|
-
Object.defineProperty(Navigation.prototype, "take", {
|
|
111
|
-
get: function () {
|
|
112
|
-
return this.props.take !== undefined
|
|
113
|
-
? this.props.take
|
|
114
|
-
: Navigation.defaultProps.take;
|
|
115
|
-
},
|
|
116
|
-
enumerable: false,
|
|
117
|
-
configurable: true
|
|
118
|
-
});
|
|
119
|
-
/**
|
|
120
|
-
* @hidden
|
|
121
|
-
*/
|
|
122
|
-
Navigation.prototype.componentDidUpdate = function (_prevProps, _prevState) {
|
|
123
|
-
if (this.indexToScroll !== undefined && this.virtualization) {
|
|
124
|
-
this.virtualization.scrollToIndex(this.indexToScroll);
|
|
125
|
-
}
|
|
126
|
-
this.lastView = this.props.activeView;
|
|
127
|
-
this.lastFocus = this.props.focusedDate;
|
|
128
|
-
this.indexToScroll = undefined;
|
|
129
|
-
};
|
|
130
|
-
Navigation.prototype.render = function () {
|
|
131
|
-
var _this = this;
|
|
132
|
-
this.calculateHeights();
|
|
133
|
-
var didViewChange = this.lastView !== this.props.activeView;
|
|
134
|
-
var focusedDate = dateInRange(this.props.focusedDate, this.props.min, this.props.max);
|
|
135
|
-
var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
|
|
136
|
-
var total = this.props.service.total(this.props.min, this.props.max);
|
|
137
|
-
var take = this.getTake(skip, total);
|
|
138
|
-
var viewDate = this.props.service.addToDate(this.props.min, skip);
|
|
139
|
-
var dates = this.props.service.datesList(viewDate, take);
|
|
140
|
-
if (this.props.activeView !== this.lastView
|
|
141
|
-
|| !isEqual(focusedDate, this.lastFocus)) {
|
|
142
|
-
this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
|
|
143
|
-
}
|
|
144
|
-
var navigationBody = (React.createElement(Virtualization, { skip: skip, take: this.take, total: total, itemHeight: this.itemHeight, topOffset: this.topOffset, bottomOffset: this.bottomOffset, onScroll: this.props.onScroll, maxScrollDifference: this.maxViewHeight, onScrollAction: this.handleScrollAction, onMount: this.handleVirtualizationMount, tabIndex: this.props.tabIndex },
|
|
145
|
-
React.createElement("ul", { ref: function (el) { _this.list = el; }, className: "k-reset" }, dates.map(function (date) { return (_this.buildNavigationItem(date)); }))));
|
|
146
|
-
return (React.createElement("div", { className: "k-calendar-navigation" },
|
|
147
|
-
React.createElement("span", { className: "k-calendar-navigation-highlight" }),
|
|
148
|
-
this.props.dom.didCalculate ? navigationBody : null));
|
|
149
|
-
};
|
|
150
|
-
Navigation.prototype.getTake = function (skip, total) {
|
|
151
|
-
return Math.min(total - skip, this.take);
|
|
152
|
-
};
|
|
153
|
-
Navigation.propTypes = {
|
|
154
|
-
activeView: PropTypes.number.isRequired,
|
|
155
|
-
focusedDate: PropTypes.instanceOf(Date).isRequired,
|
|
156
|
-
max: PropTypes.instanceOf(Date).isRequired,
|
|
157
|
-
min: PropTypes.instanceOf(Date).isRequired,
|
|
158
|
-
onChange: PropTypes.func,
|
|
159
|
-
take: PropTypes.number,
|
|
160
|
-
tabIndex: PropTypes.number
|
|
161
|
-
};
|
|
162
|
-
Navigation.defaultProps = {
|
|
163
|
-
take: ITEMS_COUNT
|
|
164
|
-
};
|
|
165
|
-
return Navigation;
|
|
166
|
-
}(React.Component));
|
|
167
|
-
export { Navigation };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { HeaderEventArguments } from './Header';
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export interface TodayCommandProps {
|
|
8
|
-
min: Date;
|
|
9
|
-
max: Date;
|
|
10
|
-
onClick?: (event: HeaderEventArguments) => void;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
tabIndex?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare class TodayCommand extends React.Component<TodayCommandProps> {
|
|
15
|
-
static propTypes: {
|
|
16
|
-
max: PropTypes.Validator<Date>;
|
|
17
|
-
min: PropTypes.Validator<Date>;
|
|
18
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
20
|
-
};
|
|
21
|
-
static defaultProps: {
|
|
22
|
-
min: Date;
|
|
23
|
-
max: Date;
|
|
24
|
-
};
|
|
25
|
-
protected get min(): Date;
|
|
26
|
-
protected get max(): Date;
|
|
27
|
-
private localization;
|
|
28
|
-
protected get todayIsInRange(): boolean;
|
|
29
|
-
private handleClick;
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
}
|
|
@@ -1,93 +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
|
-
import * as React from 'react';
|
|
17
|
-
import * as PropTypes from 'prop-types';
|
|
18
|
-
import { provideLocalizationService, registerForLocalization } from '@progress/kendo-react-intl';
|
|
19
|
-
import { classNames } from '@progress/kendo-react-common';
|
|
20
|
-
import { Button } from '@progress/kendo-react-buttons';
|
|
21
|
-
import { getDate } from '@progress/kendo-date-math';
|
|
22
|
-
import { messages, today } from '../../messages';
|
|
23
|
-
import { dateInRange, getToday, isInRange } from '../../utils';
|
|
24
|
-
import { MIN_DATE, MAX_DATE } from '../../utils';
|
|
25
|
-
var TodayCommand = /** @class */ (function (_super) {
|
|
26
|
-
__extends(TodayCommand, _super);
|
|
27
|
-
function TodayCommand() {
|
|
28
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
-
_this.localization = null;
|
|
30
|
-
_this.handleClick = function (syntheticEvent) {
|
|
31
|
-
if (!_this.todayIsInRange) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (_this.props.onClick) {
|
|
35
|
-
var event_1 = {
|
|
36
|
-
syntheticEvent: syntheticEvent,
|
|
37
|
-
nativeEvent: syntheticEvent.nativeEvent,
|
|
38
|
-
value: dateInRange(getToday(), _this.min, _this.max),
|
|
39
|
-
target: _this,
|
|
40
|
-
isTodayClick: true
|
|
41
|
-
};
|
|
42
|
-
_this.props.onClick.call(undefined, event_1);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
Object.defineProperty(TodayCommand.prototype, "min", {
|
|
48
|
-
get: function () {
|
|
49
|
-
return this.props.min !== undefined
|
|
50
|
-
? this.props.min
|
|
51
|
-
: TodayCommand.defaultProps.min;
|
|
52
|
-
},
|
|
53
|
-
enumerable: false,
|
|
54
|
-
configurable: true
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(TodayCommand.prototype, "max", {
|
|
57
|
-
get: function () {
|
|
58
|
-
return this.props.max !== undefined
|
|
59
|
-
? this.props.max
|
|
60
|
-
: TodayCommand.defaultProps.max;
|
|
61
|
-
},
|
|
62
|
-
enumerable: false,
|
|
63
|
-
configurable: true
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(TodayCommand.prototype, "todayIsInRange", {
|
|
66
|
-
get: function () {
|
|
67
|
-
return isInRange(getToday(), getDate(this.min), getDate(this.max));
|
|
68
|
-
},
|
|
69
|
-
enumerable: false,
|
|
70
|
-
configurable: true
|
|
71
|
-
});
|
|
72
|
-
TodayCommand.prototype.render = function () {
|
|
73
|
-
this.localization = provideLocalizationService(this);
|
|
74
|
-
var todayMessage = this.localization.toLanguageString(today, messages[today]);
|
|
75
|
-
var todayClassNames = classNames('k-calendar-nav-today', {
|
|
76
|
-
'k-disabled': this.props.disabled
|
|
77
|
-
});
|
|
78
|
-
return (React.createElement(Button, { className: todayClassNames, onClick: this.handleClick, tabIndex: this.props.tabIndex, fillMode: 'flat' }, todayMessage));
|
|
79
|
-
};
|
|
80
|
-
TodayCommand.propTypes = {
|
|
81
|
-
max: PropTypes.instanceOf(Date).isRequired,
|
|
82
|
-
min: PropTypes.instanceOf(Date).isRequired,
|
|
83
|
-
onClick: PropTypes.func,
|
|
84
|
-
disabled: PropTypes.bool
|
|
85
|
-
};
|
|
86
|
-
TodayCommand.defaultProps = {
|
|
87
|
-
min: MIN_DATE,
|
|
88
|
-
max: MAX_DATE
|
|
89
|
-
};
|
|
90
|
-
return TodayCommand;
|
|
91
|
-
}(React.Component));
|
|
92
|
-
export { TodayCommand };
|
|
93
|
-
registerForLocalization(TodayCommand);
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
import * as React from 'react';
|
|
28
|
-
import * as PropTypes from 'prop-types';
|
|
29
|
-
import { weekInYear, cloneDate } from '@progress/kendo-date-math';
|
|
30
|
-
import { registerForIntl, provideIntlService } from '@progress/kendo-react-intl';
|
|
31
|
-
import { CalendarCell } from './CalendarCell';
|
|
32
|
-
import { CalendarWeekCell } from './CalendarWeekCell';
|
|
33
|
-
import { CalendarViewEnum } from '../models';
|
|
34
|
-
import { setTime, getToday } from '../../utils';
|
|
35
|
-
import { WeekNamesService } from '../services';
|
|
36
|
-
// In case we decide to render content for the next month in the empty cells,
|
|
37
|
-
// add k-other-month class to all cells and k-weekend for weekend cells.
|
|
38
|
-
// tslint:disable-next-line jsx-use-translation-function
|
|
39
|
-
var emptyCell = function (idx) { return (React.createElement("td", { key: idx, className: 'k-calendar-td' }, "\u00A0")); };
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
var View = /** @class */ (function (_super) {
|
|
44
|
-
__extends(View, _super);
|
|
45
|
-
function View() {
|
|
46
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
-
_this.intl = null;
|
|
48
|
-
_this.weekService = null;
|
|
49
|
-
_this.buildWeekNumber = function (row, idx) {
|
|
50
|
-
var firstDayOfWeek = _this.firstDate(row);
|
|
51
|
-
if (!firstDayOfWeek) {
|
|
52
|
-
return emptyCell("week-cell-".concat(idx));
|
|
53
|
-
}
|
|
54
|
-
var firstDate = _this.firstDate(row);
|
|
55
|
-
var weekCellValue = _this.getWeekNumber(firstDate);
|
|
56
|
-
var uniqueID = "kendo-react-calendar-week-cell-".concat(weekCellValue);
|
|
57
|
-
var cellProps = {
|
|
58
|
-
className: 'k-alt',
|
|
59
|
-
value: weekCellValue,
|
|
60
|
-
firstDate: firstDate
|
|
61
|
-
};
|
|
62
|
-
return _this.props.weekCell
|
|
63
|
-
? React.createElement(_this.props.weekCell, __assign({}, cellProps, { key: uniqueID }), weekCellValue)
|
|
64
|
-
: React.createElement(CalendarWeekCell, __assign({}, cellProps, { key: uniqueID }), weekCellValue);
|
|
65
|
-
};
|
|
66
|
-
_this.buildRow = function (row) {
|
|
67
|
-
return row.map(function (cell, idx) {
|
|
68
|
-
if (!cell) {
|
|
69
|
-
return emptyCell(idx);
|
|
70
|
-
}
|
|
71
|
-
var aria = { 'aria-selected': cell.isSelected };
|
|
72
|
-
var uniqueID = "kendo-react-calendar-cell-".concat(cell.value.getTime());
|
|
73
|
-
var cellProps = __assign(__assign(__assign({}, aria), cell), { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
|
|
74
|
-
return _this.props.cell
|
|
75
|
-
? (React.createElement(_this.props.cell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue))
|
|
76
|
-
: (React.createElement(CalendarCell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue));
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
_this.firstDate = function (row) {
|
|
80
|
-
var cell = _this.firstWeekDateContext(row);
|
|
81
|
-
return cell ? cell.value : null;
|
|
82
|
-
};
|
|
83
|
-
_this.firstWeekDateContext = function (rowCtx) {
|
|
84
|
-
if (!_this.weekNumber) {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
var idx = 0;
|
|
88
|
-
var ctx = rowCtx[idx];
|
|
89
|
-
while (!ctx && idx < rowCtx.length) {
|
|
90
|
-
ctx = rowCtx[++idx];
|
|
91
|
-
}
|
|
92
|
-
return ctx;
|
|
93
|
-
};
|
|
94
|
-
_this.handleClick = function (value, event) {
|
|
95
|
-
var onChange = _this.props.onChange;
|
|
96
|
-
if (onChange && event) {
|
|
97
|
-
var args = {
|
|
98
|
-
value: cloneDate(value),
|
|
99
|
-
target: _this,
|
|
100
|
-
nativeEvent: event && event.nativeEvent,
|
|
101
|
-
syntheticEvent: event
|
|
102
|
-
};
|
|
103
|
-
onChange.call(undefined, args);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
_this.handleMouseEnter = function (value) {
|
|
107
|
-
var onCellEnter = _this.props.onCellEnter;
|
|
108
|
-
if (onCellEnter) {
|
|
109
|
-
onCellEnter.call(undefined, cloneDate(value));
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
_this.handleMouseLeave = function (value) {
|
|
113
|
-
var onCellLeave = _this.props.onCellLeave;
|
|
114
|
-
if (onCellLeave) {
|
|
115
|
-
onCellLeave.call(undefined, cloneDate(value));
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
return _this;
|
|
119
|
-
}
|
|
120
|
-
Object.defineProperty(View.prototype, "min", {
|
|
121
|
-
get: function () {
|
|
122
|
-
return this.props.min;
|
|
123
|
-
},
|
|
124
|
-
enumerable: false,
|
|
125
|
-
configurable: true
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(View.prototype, "max", {
|
|
128
|
-
get: function () {
|
|
129
|
-
return this.props.max;
|
|
130
|
-
},
|
|
131
|
-
enumerable: false,
|
|
132
|
-
configurable: true
|
|
133
|
-
});
|
|
134
|
-
Object.defineProperty(View.prototype, "isHorizontal", {
|
|
135
|
-
get: function () {
|
|
136
|
-
return this.props.direction === 'horizontal';
|
|
137
|
-
},
|
|
138
|
-
enumerable: false,
|
|
139
|
-
configurable: true
|
|
140
|
-
});
|
|
141
|
-
Object.defineProperty(View.prototype, "isMonthView", {
|
|
142
|
-
get: function () {
|
|
143
|
-
return this.props.activeView === CalendarViewEnum.month;
|
|
144
|
-
},
|
|
145
|
-
enumerable: false,
|
|
146
|
-
configurable: true
|
|
147
|
-
});
|
|
148
|
-
Object.defineProperty(View.prototype, "weekNumber", {
|
|
149
|
-
get: function () {
|
|
150
|
-
return Boolean(this.props.showWeekNumbers && this.props.activeView === CalendarViewEnum.month);
|
|
151
|
-
},
|
|
152
|
-
enumerable: false,
|
|
153
|
-
configurable: true
|
|
154
|
-
});
|
|
155
|
-
Object.defineProperty(View.prototype, "selectedDate", {
|
|
156
|
-
get: function () {
|
|
157
|
-
return this.props.selectedDate !== undefined ? this.props.selectedDate : View.defaultProps.selectedDate;
|
|
158
|
-
},
|
|
159
|
-
enumerable: false,
|
|
160
|
-
configurable: true
|
|
161
|
-
});
|
|
162
|
-
View.prototype.render = function () {
|
|
163
|
-
var _this = this;
|
|
164
|
-
this.intl = provideIntlService(this);
|
|
165
|
-
this.weekService = new WeekNamesService(this.intl);
|
|
166
|
-
var weekNames = this.weekService.getWeekNames(this.weekNumber);
|
|
167
|
-
var colSpan = this.props.service.rowLength(this.weekNumber);
|
|
168
|
-
var title = this.props.service.title(this.props.viewDate);
|
|
169
|
-
var time = getToday();
|
|
170
|
-
var viewDate = setTime(this.props.viewDate, time);
|
|
171
|
-
var data = this.props.service.data({
|
|
172
|
-
cellUID: this.props.cellUID,
|
|
173
|
-
min: this.min,
|
|
174
|
-
max: this.max,
|
|
175
|
-
focusedDate: this.props.focusedDate,
|
|
176
|
-
isActiveView: !this.props.bus.canMoveDown(this.props.activeView),
|
|
177
|
-
selectedDate: this.selectedDate,
|
|
178
|
-
selectionRange: this.props.selectionRange,
|
|
179
|
-
viewDate: viewDate
|
|
180
|
-
});
|
|
181
|
-
return (React.createElement(React.Fragment, null,
|
|
182
|
-
(this.isMonthView && this.isHorizontal) && (React.createElement("thead", { role: "rowgroup", className: "k-calendar-thead" },
|
|
183
|
-
React.createElement("tr", { role: "row", className: "k-calendar-tr" }, weekNames.map(function (name, idx) { return (React.createElement("th", { key: idx, className: "k-calendar-th" }, name)); })))),
|
|
184
|
-
React.createElement("tbody", { role: "rowgroup", className: "k-calendar-tbody" },
|
|
185
|
-
!this.isHorizontal && (React.createElement("tr", { role: "presentation", className: "k-calendar-tr" },
|
|
186
|
-
React.createElement("th", { scope: "col", colSpan: colSpan, className: "k-calendar-caption" }, title))),
|
|
187
|
-
data.map(function (row, idx) {
|
|
188
|
-
return (React.createElement("tr", { role: "row", className: "k-calendar-tr", key: idx },
|
|
189
|
-
_this.weekNumber && _this.buildWeekNumber(row, idx),
|
|
190
|
-
_this.buildRow(row)));
|
|
191
|
-
}))));
|
|
192
|
-
};
|
|
193
|
-
View.prototype.getWeekNumber = function (date) {
|
|
194
|
-
if (!this.weekNumber || !this.intl) {
|
|
195
|
-
return null;
|
|
196
|
-
}
|
|
197
|
-
return weekInYear(date, this.intl.firstDay());
|
|
198
|
-
};
|
|
199
|
-
View.propTypes = {
|
|
200
|
-
activeRangeEnd: PropTypes.oneOf(['start', 'end', null]),
|
|
201
|
-
activeView: PropTypes.number.isRequired,
|
|
202
|
-
cellUID: PropTypes.string.isRequired,
|
|
203
|
-
direction: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
204
|
-
focusedDate: PropTypes.instanceOf(Date).isRequired,
|
|
205
|
-
max: PropTypes.instanceOf(Date).isRequired,
|
|
206
|
-
min: PropTypes.instanceOf(Date).isRequired,
|
|
207
|
-
onChange: PropTypes.func,
|
|
208
|
-
selectedDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.arrayOf(PropTypes.instanceOf(Date))]),
|
|
209
|
-
showWeekNumbers: PropTypes.bool,
|
|
210
|
-
viewDate: PropTypes.instanceOf(Date).isRequired
|
|
211
|
-
};
|
|
212
|
-
View.defaultProps = {
|
|
213
|
-
direction: 'vertical',
|
|
214
|
-
selectedDate: getToday(),
|
|
215
|
-
showWeekNumbers: false
|
|
216
|
-
};
|
|
217
|
-
return View;
|
|
218
|
-
}(React.Component));
|
|
219
|
-
export { View };
|
|
220
|
-
registerForIntl(View);
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { Virtualization } from '../../virtualization/Virtualization';
|
|
4
|
-
import { BusViewService, DOMService } from '../services';
|
|
5
|
-
import { CalendarCellProps } from './CalendarCell';
|
|
6
|
-
import { ViewService, CalendarViewEnum } from '../models';
|
|
7
|
-
import { CalendarWeekCellProps } from './CalendarWeekCell';
|
|
8
|
-
import { CalendarHeaderTitleProps } from './CalendarHeaderTitle';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export interface ViewListEventArguments {
|
|
13
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
14
|
-
nativeEvent?: any;
|
|
15
|
-
value: Date;
|
|
16
|
-
target: ViewList;
|
|
17
|
-
isTodayClick?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export interface ViewListProps {
|
|
23
|
-
activeView: CalendarViewEnum;
|
|
24
|
-
bottomOffset?: number;
|
|
25
|
-
bus: BusViewService;
|
|
26
|
-
cellUID: string;
|
|
27
|
-
dom: DOMService;
|
|
28
|
-
focusedDate: Date;
|
|
29
|
-
max: Date;
|
|
30
|
-
min: Date;
|
|
31
|
-
cell?: React.ComponentType<CalendarCellProps>;
|
|
32
|
-
onScroll?: (event: React.SyntheticEvent) => void;
|
|
33
|
-
onChange?: (event: ViewListEventArguments) => void;
|
|
34
|
-
service: ViewService;
|
|
35
|
-
showWeekNumbers?: boolean;
|
|
36
|
-
smoothScroll?: boolean;
|
|
37
|
-
take?: number;
|
|
38
|
-
value: Date | null;
|
|
39
|
-
viewHeight?: number;
|
|
40
|
-
viewOffset?: number;
|
|
41
|
-
weekCell?: React.ComponentType<CalendarWeekCellProps>;
|
|
42
|
-
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
43
|
-
shouldScroll?: () => boolean;
|
|
44
|
-
tabIndex?: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
export interface ViewListState {
|
|
50
|
-
skip: number;
|
|
51
|
-
index: number;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
export declare class ViewList extends React.Component<ViewListProps, ViewListState> {
|
|
57
|
-
static propTypes: {
|
|
58
|
-
activeView: PropTypes.Validator<number>;
|
|
59
|
-
bottomOffset: PropTypes.Requireable<number>;
|
|
60
|
-
cellUID: PropTypes.Validator<string>;
|
|
61
|
-
focusedDate: PropTypes.Validator<Date>;
|
|
62
|
-
max: PropTypes.Validator<Date>;
|
|
63
|
-
min: PropTypes.Validator<Date>;
|
|
64
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
|
-
showWeekNumbers: PropTypes.Requireable<boolean>;
|
|
66
|
-
smoothScroll: PropTypes.Requireable<boolean>;
|
|
67
|
-
take: PropTypes.Requireable<number>;
|
|
68
|
-
value: PropTypes.Requireable<Date>;
|
|
69
|
-
viewHeight: PropTypes.Requireable<number>;
|
|
70
|
-
viewOffset: PropTypes.Requireable<number>;
|
|
71
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
72
|
-
};
|
|
73
|
-
static defaultProps: {
|
|
74
|
-
take: number;
|
|
75
|
-
showWeekNumbers: boolean;
|
|
76
|
-
smoothScroll: boolean;
|
|
77
|
-
};
|
|
78
|
-
virtualization: Virtualization | null;
|
|
79
|
-
private calendarView;
|
|
80
|
-
private table;
|
|
81
|
-
private intl;
|
|
82
|
-
private bottomOffset;
|
|
83
|
-
private viewOffset;
|
|
84
|
-
private viewHeight;
|
|
85
|
-
private _element;
|
|
86
|
-
private lastView;
|
|
87
|
-
private isActive;
|
|
88
|
-
private animateToIndex;
|
|
89
|
-
private shouldScroll;
|
|
90
|
-
private indexToScroll?;
|
|
91
|
-
private lastFocus;
|
|
92
|
-
get element(): HTMLDivElement | null;
|
|
93
|
-
protected get weekNames(): string[];
|
|
94
|
-
protected get weekNumber(): boolean;
|
|
95
|
-
protected get take(): number;
|
|
96
|
-
protected get animate(): boolean;
|
|
97
|
-
protected get todayIsInRange(): boolean;
|
|
98
|
-
constructor(props: ViewListProps);
|
|
99
|
-
componentDidUpdate(_prevProps: ViewListProps, _prevState: ViewListState): void;
|
|
100
|
-
focusActiveDate: () => void;
|
|
101
|
-
blurActiveDate: () => void;
|
|
102
|
-
render(): JSX.Element;
|
|
103
|
-
protected handleVirtualizationMount: (virtualization: Virtualization) => void;
|
|
104
|
-
protected buildMonthView: (cols: any[], weekNames: any[]) => JSX.Element;
|
|
105
|
-
protected buildDates: (cols: any[], dates: Date[]) => JSX.Element;
|
|
106
|
-
protected calculateHeights: () => void;
|
|
107
|
-
protected getTake: (skip: number, total: number) => number;
|
|
108
|
-
private handleScrollAction;
|
|
109
|
-
private handleTodayClick;
|
|
110
|
-
private handleDateChange;
|
|
111
|
-
}
|