@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,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.CenturyViewService = void 0;
|
|
5
|
-
/* tslint:disable:object-literal-sort-keys */
|
|
6
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
7
|
-
var models_1 = require("../models");
|
|
8
|
-
var utils_1 = require("../../utils");
|
|
9
|
-
var EMPTY_DATA = [[]];
|
|
10
|
-
var CELLS_LENGTH = 4;
|
|
11
|
-
var ROWS_LENGTH = 3;
|
|
12
|
-
var ACTIONS = (_a = {},
|
|
13
|
-
_a[models_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addDecades)(date, -1); },
|
|
14
|
-
_a[models_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addDecades)(date, -5); },
|
|
15
|
-
_a[models_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addDecades)(date, 1); },
|
|
16
|
-
_a[models_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addDecades)(date, 5); },
|
|
17
|
-
_a[models_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addCenturies)(date, -1); },
|
|
18
|
-
_a[models_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addCenturies)(date, 1); },
|
|
19
|
-
_a[models_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstDecadeOfCentury)(date); },
|
|
20
|
-
_a[models_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastDecadeOfCentury)(date); },
|
|
21
|
-
_a);
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
var CenturyViewService = /** @class */ (function () {
|
|
26
|
-
function CenturyViewService() {
|
|
27
|
-
}
|
|
28
|
-
CenturyViewService.prototype.addToDate = function (min, skip) {
|
|
29
|
-
return (0, kendo_date_math_1.addCenturies)(min, skip);
|
|
30
|
-
};
|
|
31
|
-
CenturyViewService.prototype.datesList = function (start, count) {
|
|
32
|
-
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addCenturies)(start, i); });
|
|
33
|
-
};
|
|
34
|
-
CenturyViewService.prototype.data = function (options) {
|
|
35
|
-
var _this = this;
|
|
36
|
-
var cellUID = options.cellUID, focusedDate = options.focusedDate, isActiveView = options.isActiveView, max = options.max, min = options.min, selectedDate = options.selectedDate, _a = options.selectionRange, selectionRange = _a === void 0 ? models_1.EMPTY_SELECTIONRANGE : _a, viewDate = options.viewDate;
|
|
37
|
-
if (!viewDate) {
|
|
38
|
-
return EMPTY_DATA;
|
|
39
|
-
}
|
|
40
|
-
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
41
|
-
var firstDate = (0, kendo_date_math_1.firstDecadeOfCentury)(viewDate);
|
|
42
|
-
var lastDate = (0, kendo_date_math_1.lastDecadeOfCentury)(viewDate);
|
|
43
|
-
var today = (0, utils_1.getToday)();
|
|
44
|
-
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
45
|
-
var baseDate = (0, kendo_date_math_1.addDecades)(firstDate, rowOffset * CELLS_LENGTH);
|
|
46
|
-
return cells.map(function (cellOffset) {
|
|
47
|
-
var cellDate = _this.normalize((0, kendo_date_math_1.addDecades)(baseDate, cellOffset), min, max);
|
|
48
|
-
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
49
|
-
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
50
|
-
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
51
|
-
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
52
|
-
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
53
|
-
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
54
|
-
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
55
|
-
return (0, utils_1.intersects)(cellDate, firstDate, lastDate) ? ({
|
|
56
|
-
formattedValue: _this.value(cellDate),
|
|
57
|
-
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
58
|
-
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
59
|
-
isSelected: isSelected,
|
|
60
|
-
isWeekend: false,
|
|
61
|
-
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
62
|
-
isRangeStart: isRangeStart,
|
|
63
|
-
isRangeMid: isRangeMid,
|
|
64
|
-
isRangeEnd: isRangeEnd,
|
|
65
|
-
isRangeSplitEnd: isRangeMid && _this.isEqual(cellDate, lastDate),
|
|
66
|
-
isRangeSplitStart: isRangeMid && _this.isEqual(cellDate, firstDate),
|
|
67
|
-
isToday: _this.isEqual(cellDate, today),
|
|
68
|
-
title: _this.cellTitle(cellDate),
|
|
69
|
-
value: cellDate
|
|
70
|
-
}) : null;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
CenturyViewService.prototype.isSelectedFromArray = function (candidate, dates, min, max) {
|
|
75
|
-
var _this = this;
|
|
76
|
-
var result = false;
|
|
77
|
-
dates.forEach(function (date) {
|
|
78
|
-
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
79
|
-
result = true;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
return result;
|
|
83
|
-
};
|
|
84
|
-
CenturyViewService.prototype.isEqual = function (candidate, expected) {
|
|
85
|
-
if (!candidate || !expected) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
// TODO: double-check this!
|
|
89
|
-
return (0, kendo_date_math_1.firstYearOfDecade)(candidate).getFullYear() === (0, kendo_date_math_1.firstYearOfDecade)(expected).getFullYear();
|
|
90
|
-
};
|
|
91
|
-
CenturyViewService.prototype.isInArray = function (date, dates) {
|
|
92
|
-
if (!dates.length) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
var year = date.getFullYear();
|
|
96
|
-
return dates[0].getFullYear() <= year && year <= (dates[dates.length - 1].getFullYear() + 99);
|
|
97
|
-
};
|
|
98
|
-
CenturyViewService.prototype.isInRange = function (candidate, min, max) {
|
|
99
|
-
var year = (0, kendo_date_math_1.firstYearOfDecade)(candidate).getFullYear();
|
|
100
|
-
var aboveMin = !min || (0, kendo_date_math_1.firstYearOfDecade)(min).getFullYear() <= year;
|
|
101
|
-
var belowMax = !max || year <= (0, kendo_date_math_1.firstYearOfDecade)(max).getFullYear();
|
|
102
|
-
return aboveMin && belowMax;
|
|
103
|
-
};
|
|
104
|
-
CenturyViewService.prototype.isInSameView = function (candidate, value) {
|
|
105
|
-
return (0, kendo_date_math_1.durationInCenturies)(candidate, value) === 0;
|
|
106
|
-
};
|
|
107
|
-
CenturyViewService.prototype.isRangeStart = function (value) {
|
|
108
|
-
return value.getFullYear() % 1000 === 0;
|
|
109
|
-
};
|
|
110
|
-
CenturyViewService.prototype.move = function (value, action) {
|
|
111
|
-
var modifier = ACTIONS[action];
|
|
112
|
-
if (!modifier) {
|
|
113
|
-
return value;
|
|
114
|
-
}
|
|
115
|
-
return modifier(value);
|
|
116
|
-
};
|
|
117
|
-
CenturyViewService.prototype.cellTitle = function (value) {
|
|
118
|
-
return (0, kendo_date_math_1.firstYearOfDecade)(value).getFullYear().toString();
|
|
119
|
-
};
|
|
120
|
-
CenturyViewService.prototype.navigationTitle = function (value) {
|
|
121
|
-
return value ? (0, kendo_date_math_1.firstDecadeOfCentury)(value).getFullYear().toString() : '';
|
|
122
|
-
};
|
|
123
|
-
CenturyViewService.prototype.title = function (value) {
|
|
124
|
-
if (!value) {
|
|
125
|
-
return '';
|
|
126
|
-
}
|
|
127
|
-
return "".concat((0, kendo_date_math_1.firstDecadeOfCentury)(value).getFullYear(), " - ").concat((0, kendo_date_math_1.lastDecadeOfCentury)(value).getFullYear());
|
|
128
|
-
};
|
|
129
|
-
CenturyViewService.prototype.rowLength = function (_) {
|
|
130
|
-
return CELLS_LENGTH;
|
|
131
|
-
};
|
|
132
|
-
CenturyViewService.prototype.skip = function (value, min) {
|
|
133
|
-
return (0, kendo_date_math_1.durationInCenturies)(min, value);
|
|
134
|
-
};
|
|
135
|
-
CenturyViewService.prototype.total = function (min, max) {
|
|
136
|
-
return (0, kendo_date_math_1.durationInCenturies)(min, max) + 1;
|
|
137
|
-
};
|
|
138
|
-
CenturyViewService.prototype.value = function (current) {
|
|
139
|
-
return current ? (0, kendo_date_math_1.firstYearOfDecade)(current).getFullYear().toString() : '';
|
|
140
|
-
};
|
|
141
|
-
CenturyViewService.prototype.viewDate = function (date, max, border) {
|
|
142
|
-
if (border === void 0) { border = 1; }
|
|
143
|
-
var renderTwoViews = (0, kendo_date_math_1.durationInCenturies)(date, max) < border;
|
|
144
|
-
return renderTwoViews ? (0, kendo_date_math_1.addCenturies)(date, -1) : date;
|
|
145
|
-
};
|
|
146
|
-
CenturyViewService.prototype.normalize = function (cellDate, min, max) {
|
|
147
|
-
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
148
|
-
return (0, kendo_date_math_1.cloneDate)(min);
|
|
149
|
-
}
|
|
150
|
-
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
151
|
-
return (0, kendo_date_math_1.cloneDate)(max);
|
|
152
|
-
}
|
|
153
|
-
return cellDate;
|
|
154
|
-
};
|
|
155
|
-
return CenturyViewService;
|
|
156
|
-
}());
|
|
157
|
-
exports.CenturyViewService = CenturyViewService;
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DOMService = void 0;
|
|
4
|
-
var CalendarViewEnum_1 = require("../models/CalendarViewEnum");
|
|
5
|
-
var utils_1 = require("../../utils");
|
|
6
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var DOMService = /** @class */ (function () {
|
|
11
|
-
function DOMService() {
|
|
12
|
-
// heights
|
|
13
|
-
this.calendarHeight = 0;
|
|
14
|
-
this.headerHeight = 0;
|
|
15
|
-
this.monthViewHeight = 0;
|
|
16
|
-
this.yearViewHeight = 0;
|
|
17
|
-
this.decadeViewHeight = 0;
|
|
18
|
-
this.centuryViewHeight = 0;
|
|
19
|
-
this.navigationItemHeight = 0;
|
|
20
|
-
this.scrollableContentHeight = 0;
|
|
21
|
-
this.scrollableYearContentHeight = 0;
|
|
22
|
-
// widths
|
|
23
|
-
this.calendarWidth = 0;
|
|
24
|
-
this.monthViewWidth = 0;
|
|
25
|
-
this.yearViewWidth = 0;
|
|
26
|
-
this.decadeViewWidth = 0;
|
|
27
|
-
this.centuryViewWidth = 0;
|
|
28
|
-
this.scrollableContentWidth = 0;
|
|
29
|
-
this.didCalculate = false;
|
|
30
|
-
this.hostContainer = null;
|
|
31
|
-
}
|
|
32
|
-
DOMService.prototype.ensureHeights = function () {
|
|
33
|
-
if (this.calendarHeight !== undefined) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
this.calculateHeights();
|
|
37
|
-
};
|
|
38
|
-
DOMService.prototype.calculateHeights = function (container) {
|
|
39
|
-
var _this = this;
|
|
40
|
-
if (!kendo_react_common_1.canUseDOM) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
var div = (0, utils_1.domContainerFactory)('div');
|
|
44
|
-
var ul = (0, utils_1.domContainerFactory)('ul');
|
|
45
|
-
var li = (0, utils_1.domContainerFactory)('li');
|
|
46
|
-
var td = (0, utils_1.domContainerFactory)('td');
|
|
47
|
-
var th = (0, utils_1.domContainerFactory)('th');
|
|
48
|
-
var tr = (0, utils_1.domContainerFactory)('tr');
|
|
49
|
-
var tbody = (0, utils_1.domContainerFactory)('tbody');
|
|
50
|
-
var thead = (0, utils_1.domContainerFactory)('thead');
|
|
51
|
-
var table = (0, utils_1.domContainerFactory)('table');
|
|
52
|
-
var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-button-rectangle k-button-solid k-button-solid-base k-button-flat k-calendar-title\">\n <span className=\"k-button-text\">March 2017</span>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\"><button class=\"k-calendar-nav-today\">TODAY</button></span>\n ", 'k-calendar-header k-hstack')); };
|
|
53
|
-
var monthWeekHeader = function () { return (table([
|
|
54
|
-
thead([
|
|
55
|
-
tr([th('MO', 'k-calendar-th')], 'k-calendar-tr')
|
|
56
|
-
], 'k-calendar-thead')
|
|
57
|
-
], 'k-calendar-table k-calendar-weekdays')); };
|
|
58
|
-
var repeat = function (count, mapper) { return new Array(count).fill('1').map(mapper); };
|
|
59
|
-
var content = function (rows, cells) {
|
|
60
|
-
if (cells === void 0) { cells = 1; }
|
|
61
|
-
return (table([
|
|
62
|
-
tbody([tr([td('1', 'k-calendar-td k-alt')])].concat(repeat(rows, function () { return tr(repeat(cells, function (c) { return td("<span class=\"k-link\">".concat(c, "</span>"), 'k-calendar-td'); }), 'k-calendar-tr'); })), 'k-calendar-tbody')
|
|
63
|
-
], 'k-calendar-table'));
|
|
64
|
-
};
|
|
65
|
-
var scrollable = function (children) { return div(children, 'k-content k-scrollable'); };
|
|
66
|
-
var view = function (contentElement, className, renderWeekHeader) { return (div(renderWeekHeader
|
|
67
|
-
? [
|
|
68
|
-
monthHeader(),
|
|
69
|
-
monthWeekHeader(),
|
|
70
|
-
scrollable([contentElement, contentElement])
|
|
71
|
-
]
|
|
72
|
-
: [
|
|
73
|
-
monthHeader(),
|
|
74
|
-
scrollable([contentElement, contentElement])
|
|
75
|
-
], className, { left: '-10000px', position: 'absolute' })); };
|
|
76
|
-
var navigationList = (function () {
|
|
77
|
-
var navElement;
|
|
78
|
-
return function () {
|
|
79
|
-
if (!kendo_react_common_1.canUseDOM) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
if (!navElement) {
|
|
83
|
-
navElement = div([scrollable([ul([li('<span>FEB</span>')])])], 'k-calendar-navigation', { left: '0px', position: 'absolute' });
|
|
84
|
-
}
|
|
85
|
-
return navElement;
|
|
86
|
-
};
|
|
87
|
-
})();
|
|
88
|
-
var viewFactory = function (_a, className, renderWeekHeader) {
|
|
89
|
-
var cells = _a.cells, rows = _a.rows;
|
|
90
|
-
var viewElement;
|
|
91
|
-
return function () {
|
|
92
|
-
if (!kendo_react_common_1.canUseDOM) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
if (!viewElement) {
|
|
96
|
-
viewElement = view(content(rows, cells), className, renderWeekHeader);
|
|
97
|
-
}
|
|
98
|
-
return viewElement;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
var getScrollable = function (element) { return element.querySelector('.k-scrollable'); };
|
|
102
|
-
var horizontal = function (element) {
|
|
103
|
-
var scrollableElement = getScrollable(element);
|
|
104
|
-
scrollableElement.className = "".concat(scrollableElement.className, " k-scrollable-horizontal");
|
|
105
|
-
return element;
|
|
106
|
-
};
|
|
107
|
-
var monthView = viewFactory({ cells: 7, rows: 6 }, 'k-calendar-view k-calendar-monthview k-vstack', true);
|
|
108
|
-
var yearView = viewFactory({ cells: 5, rows: 3 }, 'k-calendar-view k-calendar-yearview', false);
|
|
109
|
-
var decadeView = viewFactory({ cells: 5, rows: 2 }, 'k-calendar-view k-calendar-decadeview', false);
|
|
110
|
-
var horzMonthView = function () { return horizontal(monthView()); };
|
|
111
|
-
var horzYearView = function () { return horizontal(yearView()); };
|
|
112
|
-
var horzDecadeView = function () { return horizontal(decadeView()); };
|
|
113
|
-
var height = function (element) { return (parseFloat(window.getComputedStyle(element).height) || element.offsetHeight); };
|
|
114
|
-
var width = function (element) {
|
|
115
|
-
var styles = window.getComputedStyle(element);
|
|
116
|
-
var computed = parseFloat(styles.width)
|
|
117
|
-
+ parseFloat(styles.paddingLeft)
|
|
118
|
-
+ parseFloat(styles.paddingRight);
|
|
119
|
-
return computed || element.offsetWidth;
|
|
120
|
-
};
|
|
121
|
-
var getBody = function (element) { return element.querySelector('tbody'); };
|
|
122
|
-
this.didCalculate = true;
|
|
123
|
-
if (container) {
|
|
124
|
-
this.hostContainer = container;
|
|
125
|
-
}
|
|
126
|
-
this.batch(monthView(), function (contentElement) {
|
|
127
|
-
var viewElement = getBody(contentElement);
|
|
128
|
-
_this.calendarHeight = height(contentElement);
|
|
129
|
-
_this.monthViewHeight = height(viewElement);
|
|
130
|
-
_this.headerHeight = height(viewElement.children[0]);
|
|
131
|
-
_this.scrollableContentHeight = height(getScrollable(contentElement));
|
|
132
|
-
});
|
|
133
|
-
this.batch(horzMonthView(), function (contentElement) {
|
|
134
|
-
var viewElement = getBody(contentElement);
|
|
135
|
-
_this.calendarWidth = width(contentElement);
|
|
136
|
-
_this.monthViewWidth = width(viewElement);
|
|
137
|
-
_this.scrollableContentWidth = width(getScrollable(contentElement));
|
|
138
|
-
});
|
|
139
|
-
this.batch(yearView(), function (contentElement) {
|
|
140
|
-
_this.yearViewHeight = height(getBody(contentElement));
|
|
141
|
-
_this.scrollableYearContentHeight = height(getScrollable(contentElement));
|
|
142
|
-
});
|
|
143
|
-
this.batch(horzYearView(), function (contentElement) {
|
|
144
|
-
_this.yearViewWidth = width(getBody(contentElement));
|
|
145
|
-
});
|
|
146
|
-
this.batch(decadeView(), function (contentElement) {
|
|
147
|
-
_this.decadeViewHeight = height(getBody(contentElement));
|
|
148
|
-
_this.centuryViewHeight = _this.decadeViewHeight;
|
|
149
|
-
});
|
|
150
|
-
this.batch(horzDecadeView(), function (contentElement) {
|
|
151
|
-
_this.decadeViewWidth = width(getBody(contentElement));
|
|
152
|
-
_this.centuryViewWidth = _this.decadeViewWidth;
|
|
153
|
-
});
|
|
154
|
-
this.batch(navigationList(), function (contentElement) {
|
|
155
|
-
_this.navigationItemHeight = height(contentElement.querySelector('li'));
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
DOMService.prototype.viewHeight = function (viewType) {
|
|
159
|
-
return this.viewDimension(viewType, 'height');
|
|
160
|
-
};
|
|
161
|
-
DOMService.prototype.viewWidth = function (viewType) {
|
|
162
|
-
return this.viewDimension(viewType, 'width');
|
|
163
|
-
};
|
|
164
|
-
DOMService.prototype.viewDimension = function (viewType, dimension) {
|
|
165
|
-
var viewProp = dimension === 'height' ? 'ViewHeight' : 'ViewWidth';
|
|
166
|
-
switch (viewType) {
|
|
167
|
-
case CalendarViewEnum_1.CalendarViewEnum.month:
|
|
168
|
-
return this["month".concat(viewProp)];
|
|
169
|
-
case CalendarViewEnum_1.CalendarViewEnum.year:
|
|
170
|
-
return this["year".concat(viewProp)];
|
|
171
|
-
case CalendarViewEnum_1.CalendarViewEnum.decade:
|
|
172
|
-
return this["decade".concat(viewProp)];
|
|
173
|
-
case CalendarViewEnum_1.CalendarViewEnum.century:
|
|
174
|
-
return this["century".concat(viewProp)];
|
|
175
|
-
default:
|
|
176
|
-
return 1;
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
DOMService.prototype.batch = function (contentElement, action) {
|
|
180
|
-
var hostContainer = this.hostContainer || document.body;
|
|
181
|
-
var appendedContent = hostContainer.appendChild(contentElement);
|
|
182
|
-
action(appendedContent);
|
|
183
|
-
hostContainer.removeChild(appendedContent);
|
|
184
|
-
};
|
|
185
|
-
return DOMService;
|
|
186
|
-
}());
|
|
187
|
-
exports.DOMService = DOMService;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DecadeViewService = void 0;
|
|
5
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
6
|
-
var NavigationAction_1 = require("../models/NavigationAction");
|
|
7
|
-
var SelectionRange_1 = require("../models/SelectionRange");
|
|
8
|
-
var utils_1 = require("../../utils");
|
|
9
|
-
var EMPTY_DATA = [[]];
|
|
10
|
-
var CELLS_LENGTH = 4;
|
|
11
|
-
var ROWS_LENGTH = 3;
|
|
12
|
-
var ACTIONS = (_a = {},
|
|
13
|
-
_a[NavigationAction_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addYears)(date, -1); },
|
|
14
|
-
_a[NavigationAction_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addYears)(date, -5); },
|
|
15
|
-
_a[NavigationAction_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addYears)(date, 1); },
|
|
16
|
-
_a[NavigationAction_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addYears)(date, 5); },
|
|
17
|
-
_a[NavigationAction_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addDecades)(date, -1); },
|
|
18
|
-
_a[NavigationAction_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addDecades)(date, 1); },
|
|
19
|
-
_a[NavigationAction_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstYearOfDecade)(date); },
|
|
20
|
-
_a[NavigationAction_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastYearOfDecade)(date); },
|
|
21
|
-
_a);
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
var DecadeViewService = /** @class */ (function () {
|
|
26
|
-
function DecadeViewService() {
|
|
27
|
-
}
|
|
28
|
-
DecadeViewService.prototype.addToDate = function (min, skip) {
|
|
29
|
-
return (0, kendo_date_math_1.addDecades)(min, skip);
|
|
30
|
-
};
|
|
31
|
-
DecadeViewService.prototype.datesList = function (start, count) {
|
|
32
|
-
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addDecades)(start, i); });
|
|
33
|
-
};
|
|
34
|
-
DecadeViewService.prototype.data = function (options) {
|
|
35
|
-
var _this = this;
|
|
36
|
-
var cellUID = options.cellUID, focusedDate = options.focusedDate, isActiveView = options.isActiveView, max = options.max, min = options.min, selectedDate = options.selectedDate, _a = options.selectionRange, selectionRange = _a === void 0 ? SelectionRange_1.EMPTY_SELECTIONRANGE : _a, viewDate = options.viewDate;
|
|
37
|
-
if (!viewDate) {
|
|
38
|
-
return EMPTY_DATA;
|
|
39
|
-
}
|
|
40
|
-
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
41
|
-
var firstDate = (0, kendo_date_math_1.firstYearOfDecade)(viewDate);
|
|
42
|
-
var lastDate = (0, kendo_date_math_1.lastYearOfDecade)(viewDate);
|
|
43
|
-
var today = (0, utils_1.getToday)();
|
|
44
|
-
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
45
|
-
var baseDate = (0, kendo_date_math_1.addYears)(firstDate, rowOffset * CELLS_LENGTH);
|
|
46
|
-
return cells.map(function (cellOffset) {
|
|
47
|
-
var cellDate = _this.normalize((0, kendo_date_math_1.addYears)(baseDate, cellOffset), min, max);
|
|
48
|
-
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
49
|
-
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
50
|
-
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
51
|
-
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
52
|
-
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
53
|
-
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
54
|
-
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
55
|
-
return (0, utils_1.intersects)(cellDate, firstDate, lastDate) ? ({
|
|
56
|
-
formattedValue: _this.value(cellDate),
|
|
57
|
-
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
58
|
-
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
59
|
-
isSelected: isSelected,
|
|
60
|
-
isWeekend: false,
|
|
61
|
-
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
62
|
-
isRangeStart: isRangeStart,
|
|
63
|
-
isRangeMid: isRangeMid,
|
|
64
|
-
isRangeEnd: isRangeEnd,
|
|
65
|
-
isRangeSplitEnd: isRangeMid && _this.isEqual(cellDate, lastDate),
|
|
66
|
-
isRangeSplitStart: isRangeMid && _this.isEqual(cellDate, firstDate),
|
|
67
|
-
isToday: _this.isEqual(cellDate, today),
|
|
68
|
-
title: _this.cellTitle(cellDate),
|
|
69
|
-
value: cellDate
|
|
70
|
-
}) : null;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
DecadeViewService.prototype.isSelectedFromArray = function (candidate, dates, min, max) {
|
|
75
|
-
var _this = this;
|
|
76
|
-
var result = false;
|
|
77
|
-
dates.forEach(function (date) {
|
|
78
|
-
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
79
|
-
result = true;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
return result;
|
|
83
|
-
};
|
|
84
|
-
DecadeViewService.prototype.isEqual = function (candidate, expected) {
|
|
85
|
-
if (!candidate || !expected) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
return candidate.getFullYear() === expected.getFullYear();
|
|
89
|
-
};
|
|
90
|
-
DecadeViewService.prototype.isInArray = function (date, dates) {
|
|
91
|
-
if (!dates.length) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
var year = date.getFullYear();
|
|
95
|
-
return dates[0].getFullYear() <= year && year <= (dates[dates.length - 1].getFullYear() + 9);
|
|
96
|
-
};
|
|
97
|
-
DecadeViewService.prototype.isInRange = function (candidate, min, max) {
|
|
98
|
-
var year = candidate.getFullYear();
|
|
99
|
-
var aboveMin = !min || min.getFullYear() <= year;
|
|
100
|
-
var belowMax = !max || year <= max.getFullYear();
|
|
101
|
-
return aboveMin && belowMax;
|
|
102
|
-
};
|
|
103
|
-
DecadeViewService.prototype.isRangeStart = function (value) {
|
|
104
|
-
return value.getFullYear() % 100 === 0;
|
|
105
|
-
};
|
|
106
|
-
DecadeViewService.prototype.isInSameView = function (candidate, value) {
|
|
107
|
-
return (0, kendo_date_math_1.durationInDecades)(candidate, value) === 0;
|
|
108
|
-
};
|
|
109
|
-
DecadeViewService.prototype.move = function (value, action) {
|
|
110
|
-
var modifier = ACTIONS[action];
|
|
111
|
-
if (!modifier) {
|
|
112
|
-
return value;
|
|
113
|
-
}
|
|
114
|
-
return modifier(value);
|
|
115
|
-
};
|
|
116
|
-
DecadeViewService.prototype.cellTitle = function (value) {
|
|
117
|
-
return value.getFullYear().toString();
|
|
118
|
-
};
|
|
119
|
-
DecadeViewService.prototype.navigationTitle = function (value) {
|
|
120
|
-
return value ? (0, kendo_date_math_1.firstYearOfDecade)(value).getFullYear().toString() : '';
|
|
121
|
-
};
|
|
122
|
-
DecadeViewService.prototype.title = function (value) {
|
|
123
|
-
if (!value) {
|
|
124
|
-
return '';
|
|
125
|
-
}
|
|
126
|
-
return "".concat((0, kendo_date_math_1.firstYearOfDecade)(value).getFullYear(), " - ").concat((0, kendo_date_math_1.lastYearOfDecade)(value).getFullYear());
|
|
127
|
-
};
|
|
128
|
-
DecadeViewService.prototype.rowLength = function (_) {
|
|
129
|
-
return CELLS_LENGTH;
|
|
130
|
-
};
|
|
131
|
-
DecadeViewService.prototype.skip = function (value, min) {
|
|
132
|
-
return (0, kendo_date_math_1.durationInDecades)(min, value);
|
|
133
|
-
};
|
|
134
|
-
DecadeViewService.prototype.total = function (min, max) {
|
|
135
|
-
return (0, kendo_date_math_1.durationInDecades)(min, max) + 1;
|
|
136
|
-
};
|
|
137
|
-
DecadeViewService.prototype.value = function (current) {
|
|
138
|
-
return current ? current.getFullYear().toString() : '';
|
|
139
|
-
};
|
|
140
|
-
DecadeViewService.prototype.viewDate = function (date, max, border) {
|
|
141
|
-
if (border === void 0) { border = 1; }
|
|
142
|
-
var renderTwoViews = (0, kendo_date_math_1.durationInDecades)(date, max) < border;
|
|
143
|
-
return renderTwoViews ? (0, kendo_date_math_1.addDecades)(date, -1) : date;
|
|
144
|
-
};
|
|
145
|
-
DecadeViewService.prototype.normalize = function (cellDate, min, max) {
|
|
146
|
-
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
147
|
-
return (0, kendo_date_math_1.cloneDate)(min);
|
|
148
|
-
}
|
|
149
|
-
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
150
|
-
return (0, kendo_date_math_1.cloneDate)(max);
|
|
151
|
-
}
|
|
152
|
-
return cellDate;
|
|
153
|
-
};
|
|
154
|
-
return DecadeViewService;
|
|
155
|
-
}());
|
|
156
|
-
exports.DecadeViewService = DecadeViewService;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MonthViewService = void 0;
|
|
5
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
6
|
-
var NavigationAction_1 = require("../models/NavigationAction");
|
|
7
|
-
var SelectionRange_1 = require("../models/SelectionRange");
|
|
8
|
-
var utils_1 = require("../../utils");
|
|
9
|
-
var EMPTY_DATA = [[]];
|
|
10
|
-
var CELLS_LENGTH = 7;
|
|
11
|
-
var ROWS_LENGTH = 6;
|
|
12
|
-
var SATURDAY = 6;
|
|
13
|
-
var SUNDAY = 0;
|
|
14
|
-
var ACTIONS = (_a = {},
|
|
15
|
-
_a[NavigationAction_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addDays)(date, -1); },
|
|
16
|
-
_a[NavigationAction_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addWeeks)(date, -1); },
|
|
17
|
-
_a[NavigationAction_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addDays)(date, 1); },
|
|
18
|
-
_a[NavigationAction_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addWeeks)(date, 1); },
|
|
19
|
-
_a[NavigationAction_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addMonths)(date, -1); },
|
|
20
|
-
_a[NavigationAction_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addMonths)(date, 1); },
|
|
21
|
-
_a[NavigationAction_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstDayOfMonth)(date); },
|
|
22
|
-
_a[NavigationAction_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastDayOfMonth)(date); },
|
|
23
|
-
_a);
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
var MonthViewService = /** @class */ (function () {
|
|
28
|
-
function MonthViewService(intl) {
|
|
29
|
-
this.intl = intl;
|
|
30
|
-
}
|
|
31
|
-
MonthViewService.prototype.addToDate = function (min, skip) {
|
|
32
|
-
return (0, kendo_date_math_1.addMonths)(min, skip);
|
|
33
|
-
};
|
|
34
|
-
MonthViewService.prototype.datesList = function (start, count) {
|
|
35
|
-
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addMonths)(start, i); });
|
|
36
|
-
};
|
|
37
|
-
MonthViewService.prototype.data = function (options) {
|
|
38
|
-
var _this = this;
|
|
39
|
-
var cellUID = options.cellUID, focusedDate = options.focusedDate, isActiveView = options.isActiveView, max = options.max, min = options.min, selectedDate = options.selectedDate, _a = options.selectionRange, selectionRange = _a === void 0 ? SelectionRange_1.EMPTY_SELECTIONRANGE : _a, viewDate = options.viewDate;
|
|
40
|
-
if (!viewDate) {
|
|
41
|
-
return EMPTY_DATA;
|
|
42
|
-
}
|
|
43
|
-
var firstMonthDate = (0, kendo_date_math_1.firstDayOfMonth)(viewDate);
|
|
44
|
-
var lastMonthDate = (0, kendo_date_math_1.lastDayOfMonth)(viewDate);
|
|
45
|
-
var backward = -1;
|
|
46
|
-
var date = (0, kendo_date_math_1.dayOfWeek)(firstMonthDate, this.intl.firstDay(), backward);
|
|
47
|
-
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
48
|
-
var today = (0, utils_1.getToday)();
|
|
49
|
-
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
50
|
-
var baseDate = (0, kendo_date_math_1.addDays)(date, rowOffset * CELLS_LENGTH);
|
|
51
|
-
return cells.map(function (cellOffset) {
|
|
52
|
-
var cellDate = _this.normalize((0, kendo_date_math_1.addDays)(baseDate, cellOffset), min, max);
|
|
53
|
-
var otherMonth = cellDate < firstMonthDate || cellDate > lastMonthDate;
|
|
54
|
-
if (otherMonth) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
58
|
-
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
59
|
-
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
60
|
-
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
61
|
-
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
62
|
-
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
63
|
-
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
64
|
-
var cell = {
|
|
65
|
-
formattedValue: _this.value(cellDate),
|
|
66
|
-
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
67
|
-
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
68
|
-
isSelected: isSelected,
|
|
69
|
-
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
70
|
-
isWeekend: _this.isWeekend(cellDate),
|
|
71
|
-
isRangeStart: isRangeStart,
|
|
72
|
-
isRangeMid: isRangeMid,
|
|
73
|
-
isRangeEnd: isRangeEnd,
|
|
74
|
-
isRangeSplitStart: isRangeMid && _this.isEqual(cellDate, firstMonthDate),
|
|
75
|
-
isRangeSplitEnd: isRangeMid && _this.isEqual(cellDate, lastMonthDate),
|
|
76
|
-
isToday: _this.isEqual(cellDate, today),
|
|
77
|
-
title: _this.cellTitle(cellDate),
|
|
78
|
-
value: cellDate
|
|
79
|
-
};
|
|
80
|
-
return cell;
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
MonthViewService.prototype.isEqual = function (candidate, expected) {
|
|
85
|
-
if (!candidate || !expected) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
return (0, kendo_date_math_1.getDate)(candidate).getTime() === (0, kendo_date_math_1.getDate)(expected).getTime();
|
|
89
|
-
};
|
|
90
|
-
MonthViewService.prototype.isSelectedFromArray = function (candidate, dates, min, max) {
|
|
91
|
-
var _this = this;
|
|
92
|
-
var result = false;
|
|
93
|
-
dates.forEach(function (date) {
|
|
94
|
-
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
95
|
-
result = true;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
return result;
|
|
99
|
-
};
|
|
100
|
-
MonthViewService.prototype.isInArray = function (date, dates) {
|
|
101
|
-
return !!dates.length && (0, kendo_date_math_1.firstDayOfMonth)(dates[0]) <= date && date <= (0, kendo_date_math_1.lastDayOfMonth)(dates[dates.length - 1]);
|
|
102
|
-
};
|
|
103
|
-
MonthViewService.prototype.isInRange = function (candidate, min, max) {
|
|
104
|
-
var value = (0, kendo_date_math_1.getDate)(candidate);
|
|
105
|
-
var aboveMin = !min || (0, kendo_date_math_1.getDate)(min) <= value;
|
|
106
|
-
var belowMax = !max || value <= (0, kendo_date_math_1.getDate)(max);
|
|
107
|
-
return aboveMin && belowMax;
|
|
108
|
-
};
|
|
109
|
-
MonthViewService.prototype.isInSameView = function (candidate, value) {
|
|
110
|
-
return (0, kendo_date_math_1.durationInMonths)(candidate, value) === 0;
|
|
111
|
-
};
|
|
112
|
-
MonthViewService.prototype.isRangeStart = function (value) {
|
|
113
|
-
return !value.getMonth();
|
|
114
|
-
};
|
|
115
|
-
MonthViewService.prototype.move = function (value, action) {
|
|
116
|
-
var modifier = ACTIONS[action];
|
|
117
|
-
if (!modifier) {
|
|
118
|
-
return value;
|
|
119
|
-
}
|
|
120
|
-
return modifier(value);
|
|
121
|
-
};
|
|
122
|
-
MonthViewService.prototype.cellTitle = function (value) {
|
|
123
|
-
return this.intl.formatDate(value, 'D');
|
|
124
|
-
};
|
|
125
|
-
MonthViewService.prototype.navigationTitle = function (value) {
|
|
126
|
-
if (!value) {
|
|
127
|
-
return '';
|
|
128
|
-
}
|
|
129
|
-
return this.isRangeStart(value) ? value.getFullYear().toString() : this.abbrMonthNames()[value.getMonth()];
|
|
130
|
-
};
|
|
131
|
-
MonthViewService.prototype.title = function (current) {
|
|
132
|
-
return "".concat(this.wideMonthNames()[current.getMonth()], " ").concat(current.getFullYear());
|
|
133
|
-
};
|
|
134
|
-
MonthViewService.prototype.rowLength = function (prependCell) {
|
|
135
|
-
return CELLS_LENGTH + (prependCell ? 1 : 0);
|
|
136
|
-
};
|
|
137
|
-
MonthViewService.prototype.skip = function (value, min) {
|
|
138
|
-
return (0, kendo_date_math_1.durationInMonths)(min, value);
|
|
139
|
-
};
|
|
140
|
-
MonthViewService.prototype.total = function (min, max) {
|
|
141
|
-
return (0, kendo_date_math_1.durationInMonths)(min, max) + 1;
|
|
142
|
-
};
|
|
143
|
-
MonthViewService.prototype.value = function (current) {
|
|
144
|
-
return current ? current.getDate().toString() : '';
|
|
145
|
-
};
|
|
146
|
-
MonthViewService.prototype.viewDate = function (date, max, border) {
|
|
147
|
-
if (border === void 0) { border = 1; }
|
|
148
|
-
var renderTwoViews = (0, kendo_date_math_1.durationInMonths)(date, max) < border;
|
|
149
|
-
return renderTwoViews ? (0, kendo_date_math_1.addMonths)(date, -1) : date;
|
|
150
|
-
};
|
|
151
|
-
MonthViewService.prototype.isWeekend = function (date) {
|
|
152
|
-
var day = date.getDay();
|
|
153
|
-
return day === SATURDAY || day === SUNDAY;
|
|
154
|
-
};
|
|
155
|
-
MonthViewService.prototype.abbrMonthNames = function () {
|
|
156
|
-
return this.intl.dateFormatNames({ nameType: 'abbreviated', type: 'months' });
|
|
157
|
-
};
|
|
158
|
-
MonthViewService.prototype.normalize = function (cellDate, min, max) {
|
|
159
|
-
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
160
|
-
return (0, kendo_date_math_1.getDate)(min);
|
|
161
|
-
}
|
|
162
|
-
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
163
|
-
return (0, kendo_date_math_1.getDate)(max);
|
|
164
|
-
}
|
|
165
|
-
return cellDate;
|
|
166
|
-
};
|
|
167
|
-
MonthViewService.prototype.wideMonthNames = function () {
|
|
168
|
-
return this.intl.dateFormatNames({ nameType: 'wide', type: 'months', standAlone: true });
|
|
169
|
-
};
|
|
170
|
-
return MonthViewService;
|
|
171
|
-
}());
|
|
172
|
-
exports.MonthViewService = MonthViewService;
|