@progress/kendo-angular-dateinputs 6.0.3 → 7.0.0-dev.202204191043
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/bundles/kendo-angular-dateinputs.umd.js +5 -0
- package/calendar/calendar-common.module.d.ts +24 -0
- package/{dist/es2015/calendar → calendar}/calendar.component.d.ts +46 -21
- package/{dist/es2015/calendar → calendar}/calendar.module.d.ts +16 -0
- package/{dist/es2015/calendar → calendar}/calendars.module.d.ts +6 -0
- package/{dist/es2015/calendar → calendar}/for.directive.d.ts +8 -5
- package/{dist/es2015/calendar → calendar}/header.component.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/horizontal-view-list.component.d.ts +9 -5
- package/{dist/es2015/calendar → calendar}/localization/calendar-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/calendar → calendar}/localization/calendar-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/localization/calendar-messages.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-messages.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/models/cell-context.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/keydown.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/navigation-action.enum.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/row-length-options.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/scrollable.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/selection-range-end.type.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/selection-range.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/selection.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/type.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/view-service.interface.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/view.enum.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/models/view.type.d.ts +0 -0
- package/{dist/es2015/calendar → calendar}/multiview-calendar.component.d.ts +38 -24
- package/{dist/es2015/calendar → calendar}/multiview-calendar.module.d.ts +14 -0
- package/{dist/es2015/calendar → calendar}/navigation.component.d.ts +4 -1
- package/{dist/es2015/calendar → calendar}/services/bus-view.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/century-view.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/decade-view.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/disabled-dates.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/dom.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/month-view.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/navigation.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/scroll-sync.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/selection.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/weeknames.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/services/year-view.service.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/cell-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/century-cell-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/decade-cell-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/header-title-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/month-cell-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/navigation-item-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/weeknumber-cell-template.directive.d.ts +3 -0
- package/{dist/es2015/calendar → calendar}/templates/year-cell-template.directive.d.ts +3 -0
- package/calendar/templates.module.d.ts +33 -0
- package/{dist/es2015/calendar → calendar}/view-list.component.d.ts +9 -5
- package/{dist/es2015/calendar → calendar}/view.component.d.ts +5 -1
- package/{dist/es2015/common → common}/dom-queries.d.ts +0 -0
- package/{dist/es2015/common → common}/models/fillmode.d.ts +5 -5
- package/{dist/es2015/common → common}/models/rounded.d.ts +6 -6
- package/{dist/es2015/common → common}/models/size.d.ts +5 -5
- package/{dist/es2015/common → common}/picker.service.d.ts +0 -0
- package/{dist/es2015/common → common}/utils.d.ts +0 -0
- package/{dist/es2015/dateinput → dateinput}/arrow.enum.d.ts +0 -0
- package/{dist/es2015/dateinput → dateinput}/dateinput.component.d.ts +34 -25
- package/dateinput/dateinput.module.d.ts +20 -0
- package/{dist/es2015/dateinput → dateinput}/localization/dateinput-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/dateinput → dateinput}/localization/dateinput-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/dateinput → dateinput}/localization/messages.d.ts +3 -0
- package/{dist/es2015/dateinput → dateinput}/models/format-placeholder.model.d.ts +0 -0
- package/{dist/es2015/dateinput → dateinput}/models/format-settings.model.d.ts +0 -0
- package/{dist/es2015/dateinput → dateinput}/models/incremental-steps.model.d.ts +0 -0
- package/{dist/es2015/dateinputs.module.d.ts → dateinputs.module.d.ts} +10 -0
- package/{dist/es2015/datepicker → datepicker}/datepicker.component.d.ts +49 -37
- package/datepicker/datepicker.module.d.ts +24 -0
- package/{dist/es2015/datepicker → datepicker}/localization/datepicker-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/datepicker → datepicker}/localization/datepicker-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/datepicker → datepicker}/localization/messages.d.ts +3 -0
- package/{dist/es2015/daterange → daterange}/auto-correct-on.type.d.ts +0 -0
- package/{dist/es2015/daterange → daterange}/date-range-end-input.directive.d.ts +3 -0
- package/{dist/es2015/daterange → daterange}/date-range-input.d.ts +2 -2
- package/{dist/es2015/daterange → daterange}/date-range-popup-template.directive.d.ts +3 -0
- package/{dist/es2015/daterange → daterange}/date-range-popup.component.d.ts +9 -4
- package/{dist/es2015/daterange → daterange}/date-range-selection.directive.d.ts +8 -3
- package/{dist/es2015/daterange → daterange}/date-range-start-input.directive.d.ts +3 -0
- package/{dist/es2015/daterange → daterange}/date-range.component.d.ts +5 -1
- package/{dist/es2015/daterange → daterange}/date-range.module.d.ts +15 -1
- package/{dist/es2015/daterange → daterange}/date-range.service.d.ts +11 -6
- package/{dist/es2015/datetimepicker → datetimepicker}/datetimepicker.component.d.ts +51 -36
- package/datetimepicker/datetimepicker.module.d.ts +25 -0
- package/{dist/es2015/datetimepicker → datetimepicker}/localization/datetimepicker-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/datetimepicker → datetimepicker}/localization/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/datetimepicker → datetimepicker}/localization/messages.d.ts +3 -0
- package/{dist/es2015/datetimepicker → datetimepicker}/models/active-tab.type.d.ts +0 -0
- package/{dist/es2015/defaults.d.ts → defaults.d.ts} +0 -0
- package/esm2015/calendar/calendar-common.module.js +45 -0
- package/{dist/es2015 → esm2015}/calendar/calendar.component.js +283 -246
- package/{dist/es2015 → esm2015}/calendar/calendar.module.js +71 -34
- package/{dist/es2015 → esm2015}/calendar/calendars.module.js +23 -14
- package/{dist/es2015 → esm2015}/calendar/for.directive.js +17 -25
- package/{dist/es2015 → esm2015}/calendar/header.component.js +97 -73
- package/{dist/es2015 → esm2015}/calendar/horizontal-view-list.component.js +155 -130
- package/esm2015/calendar/localization/calendar-custom-messages.component.js +40 -0
- package/esm2015/calendar/localization/calendar-localized-messages.directive.js +36 -0
- package/esm2015/calendar/localization/calendar-messages.js +27 -0
- package/esm2015/calendar/localization/multiview-calendar-custom-messages.component.js +40 -0
- package/esm2015/calendar/localization/multiview-calendar-localized-messages.directive.js +36 -0
- package/esm2015/calendar/localization/multiview-calendar-messages.js +27 -0
- package/{dist/es → esm2015}/calendar/models/cell-context.interface.js +1 -0
- package/{dist/es2015 → esm2015}/calendar/models/keydown.interface.js +1 -0
- package/{dist/es → esm2015}/calendar/models/navigation-action.enum.js +0 -0
- package/{dist/es2015 → esm2015}/calendar/models/row-length-options.interface.js +1 -0
- package/{dist/es/virtualization → esm2015/calendar}/models/scrollable.interface.js +1 -0
- package/{dist/es → esm2015}/calendar/models/selection-range-end.type.js +1 -0
- package/{dist/es2015 → esm2015}/calendar/models/selection-range.interface.js +0 -0
- package/{dist/es → esm2015}/calendar/models/selection.js +1 -0
- package/{dist/es → esm2015}/calendar/models/type.js +1 -0
- package/{dist/es → esm2015}/calendar/models/view-service.interface.js +1 -0
- package/{dist/es → esm2015}/calendar/models/view.enum.js +0 -0
- package/{dist/es → esm2015}/calendar/models/view.type.js +1 -0
- package/{dist/es2015 → esm2015}/calendar/multiview-calendar.component.js +246 -298
- package/{dist/es2015 → esm2015}/calendar/multiview-calendar.module.js +63 -32
- package/{dist/es2015 → esm2015}/calendar/navigation.component.js +71 -62
- package/{dist/es2015 → esm2015}/calendar/services/bus-view.service.js +9 -11
- package/{dist/es2015 → esm2015}/calendar/services/century-view.service.js +8 -11
- package/{dist/es2015 → esm2015}/calendar/services/decade-view.service.js +8 -11
- package/{dist/es2015 → esm2015}/calendar/services/disabled-dates.service.js +8 -12
- package/{dist/es2015 → esm2015}/calendar/services/dom.service.js +10 -26
- package/{dist/es2015 → esm2015}/calendar/services/month-view.service.js +9 -10
- package/{dist/es2015 → esm2015}/calendar/services/navigation.service.js +9 -9
- package/{dist/es2015 → esm2015}/calendar/services/scroll-sync.service.js +10 -13
- package/{dist/es2015 → esm2015}/calendar/services/selection.service.js +9 -9
- package/{dist/es2015 → esm2015}/calendar/services/weeknames.service.js +9 -9
- package/{dist/es2015 → esm2015}/calendar/services/year-view.service.js +9 -13
- package/{dist/es2015 → esm2015}/calendar/templates/cell-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/century-cell-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/decade-cell-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/header-title-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/month-cell-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/navigation-item-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/weeknumber-cell-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/calendar/templates/year-cell-template.directive.js +12 -11
- package/esm2015/calendar/templates.module.js +73 -0
- package/{dist/es2015 → esm2015}/calendar/view-list.component.js +135 -120
- package/{dist/es2015 → esm2015}/calendar/view.component.js +105 -98
- package/{dist/es2015 → esm2015}/common/dom-queries.js +0 -0
- package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
- package/{dist/es → esm2015}/common/models/rounded.js +1 -0
- package/{dist/es → esm2015}/common/models/size.js +1 -0
- package/{dist/es2015 → esm2015}/common/picker.service.js +0 -0
- package/{dist/es2015 → esm2015}/common/utils.js +0 -0
- package/{dist/es → esm2015}/dateinput/arrow.enum.js +0 -0
- package/{dist/es2015 → esm2015}/dateinput/dateinput.component.js +215 -216
- package/esm2015/dateinput/dateinput.module.js +41 -0
- package/esm2015/dateinput/localization/dateinput-custom-messages.component.js +40 -0
- package/esm2015/dateinput/localization/dateinput-localized-messages.directive.js +36 -0
- package/esm2015/dateinput/localization/messages.js +25 -0
- package/{dist/es → esm2015}/dateinput/models/format-placeholder.model.js +1 -0
- package/{dist/es → esm2015}/dateinput/models/format-settings.model.js +1 -0
- package/{dist/es → esm2015}/dateinput/models/incremental-steps.model.js +1 -0
- package/{dist/es2015 → esm2015}/dateinputs.module.js +28 -10
- package/{dist/es2015 → esm2015}/datepicker/datepicker.component.js +320 -317
- package/esm2015/datepicker/datepicker.module.js +72 -0
- package/esm2015/datepicker/localization/datepicker-custom-messages.component.js +40 -0
- package/esm2015/datepicker/localization/datepicker-localized-messages.directive.js +36 -0
- package/esm2015/datepicker/localization/messages.js +29 -0
- package/{dist/es → esm2015}/daterange/auto-correct-on.type.js +1 -0
- package/{dist/es2015 → esm2015}/daterange/date-range-end-input.directive.js +18 -25
- package/{dist/es2015 → esm2015}/daterange/date-range-input.js +0 -0
- package/esm2015/daterange/date-range-popup-template.directive.js +23 -0
- package/{dist/es2015 → esm2015}/daterange/date-range-popup.component.js +71 -89
- package/{dist/es2015 → esm2015}/daterange/date-range-selection.directive.js +26 -39
- package/{dist/es2015 → esm2015}/daterange/date-range-start-input.directive.js +18 -25
- package/esm2015/daterange/date-range.component.js +77 -0
- package/{dist/es2015 → esm2015}/daterange/date-range.module.js +27 -12
- package/{dist/es2015 → esm2015}/daterange/date-range.service.js +9 -14
- package/{dist/es2015 → esm2015}/datetimepicker/datetimepicker.component.js +436 -257
- package/esm2015/datetimepicker/datetimepicker.module.js +80 -0
- package/esm2015/datetimepicker/localization/datetimepicker-custom-messages.component.js +40 -0
- package/esm2015/datetimepicker/localization/localized-messages.directive.js +36 -0
- package/esm2015/datetimepicker/localization/messages.js +49 -0
- package/{dist/es → esm2015}/datetimepicker/models/active-tab.type.js +1 -0
- package/{dist/es2015 → esm2015}/defaults.js +0 -0
- package/esm2015/kendo-angular-dateinputs.js +8 -0
- package/{dist/es → esm2015}/main.js +24 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es → esm2015}/popup-settings.model.js +1 -0
- package/{dist/es2015 → esm2015}/preventable-event.js +1 -0
- package/esm2015/timepicker/localization/messages.js +35 -0
- package/esm2015/timepicker/localization/timepicker-custom-messages.component.js +40 -0
- package/esm2015/timepicker/localization/timepicker-localized-messages.directive.js +36 -0
- package/esm2015/timepicker/localization/timeselector-custom-messages.component.js +42 -0
- package/esm2015/timepicker/localization/timeselector-localized-messages.directive.js +36 -0
- package/{dist/es → esm2015}/timepicker/models/incremental-steps.model.js +1 -0
- package/{dist/es → esm2015}/timepicker/models/list-item.interface.js +1 -0
- package/{dist/es → esm2015}/timepicker/models/list-service-settings.js +1 -0
- package/{dist/es → esm2015}/timepicker/models/list-service.interface.js +1 -0
- package/{dist/es2015 → esm2015}/timepicker/models/time-part.default.js +0 -0
- package/{dist/es2015 → esm2015}/timepicker/services/dayperiod.service.js +9 -15
- package/{dist/es2015 → esm2015}/timepicker/services/dom.service.js +8 -13
- package/{dist/es2015 → esm2015}/timepicker/services/hours.service.js +9 -14
- package/{dist/es2015 → esm2015}/timepicker/services/milliseconds.service.js +9 -14
- package/{dist/es2015 → esm2015}/timepicker/services/minutes.service.js +9 -14
- package/{dist/es2015 → esm2015}/timepicker/services/seconds.service.js +9 -14
- package/{dist/es2015 → esm2015}/timepicker/timelist.component.js +66 -61
- package/{dist/es2015 → esm2015}/timepicker/timepicker.component.js +251 -208
- package/{dist/es2015 → esm2015}/timepicker/timepicker.module.js +32 -15
- package/{dist/es2015 → esm2015}/timepicker/timeselector.component.js +181 -104
- package/{dist/es2015 → esm2015}/timepicker/util.js +8 -20
- package/{dist/es2015 → esm2015}/touch-enabled.js +0 -0
- package/{dist/es2015 → esm2015}/util.js +13 -6
- package/{dist/es2015 → esm2015}/validators/disabled-date.validator.js +0 -0
- package/{dist/es2015 → esm2015}/validators/disabled-dates-range.validator.js +0 -2
- package/{dist/es2015 → esm2015}/validators/incomplete-date.validator.js +0 -0
- package/{dist/es2015 → esm2015}/validators/max.validator.js +0 -0
- package/{dist/es2015 → esm2015}/validators/min.validator.js +0 -0
- package/{dist/es2015 → esm2015}/validators/time-range.validator.js +0 -0
- package/{dist/es2015/calendar → esm2015/virtualization}/models/scrollable.interface.js +1 -0
- package/{dist/es2015 → esm2015}/virtualization/services/row-height.service.js +1 -3
- package/{dist/es2015 → esm2015}/virtualization/services/scroller.service.js +0 -2
- package/{dist/es2015 → esm2015}/virtualization/virtualization.component.js +75 -90
- package/esm2015/virtualization/virtualization.module.js +30 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dateinputs.js} +9763 -9156
- package/{dist/es/calendar/models/selection-range.interface.js → kendo-angular-dateinputs.d.ts} +3 -2
- package/{dist/es2015/main.d.ts → main.d.ts} +24 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +42 -115
- package/{dist/es2015/popup-settings.model.d.ts → popup-settings.model.d.ts} +0 -0
- package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +2 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/timepicker → timepicker}/localization/messages.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/localization/timepicker-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/timepicker → timepicker}/localization/timepicker-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/localization/timeselector-custom-messages.component.d.ts +4 -1
- package/{dist/es2015/timepicker → timepicker}/localization/timeselector-localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/models/incremental-steps.model.d.ts +0 -0
- package/{dist/es2015/timepicker → timepicker}/models/list-item.interface.d.ts +0 -0
- package/{dist/es2015/timepicker → timepicker}/models/list-service-settings.d.ts +0 -0
- package/{dist/es2015/timepicker → timepicker}/models/list-service.interface.d.ts +0 -0
- package/{dist/es2015/timepicker → timepicker}/models/time-part.default.d.ts +0 -0
- package/{dist/es2015/timepicker → timepicker}/services/dayperiod.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/services/dom.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/services/hours.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/services/milliseconds.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/services/minutes.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/services/seconds.service.d.ts +3 -0
- package/{dist/es2015/timepicker → timepicker}/timelist.component.d.ts +4 -1
- package/{dist/es2015/timepicker → timepicker}/timepicker.component.d.ts +45 -31
- package/timepicker/timepicker.module.d.ts +27 -0
- package/{dist/es2015/timepicker → timepicker}/timeselector.component.d.ts +10 -4
- package/{dist/es2015/timepicker → timepicker}/util.d.ts +0 -0
- package/{dist/es2015/touch-enabled.d.ts → touch-enabled.d.ts} +0 -0
- package/{dist/es2015/util.d.ts → util.d.ts} +12 -0
- package/{dist/es2015/validators → validators}/disabled-date.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/disabled-dates-range.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/incomplete-date.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/max.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/min.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/time-range.validator.d.ts +0 -0
- package/{dist/es2015/virtualization → virtualization}/models/scrollable.interface.d.ts +0 -0
- package/{dist/es2015/virtualization → virtualization}/services/row-height.service.d.ts +0 -0
- package/{dist/es2015/virtualization → virtualization}/services/scroller.service.d.ts +0 -0
- package/{dist/es2015/virtualization → virtualization}/virtualization.component.d.ts +8 -5
- package/{dist/es2015/virtualization → virtualization}/virtualization.module.d.ts +6 -0
- package/dist/cdn/js/kendo-angular-dateinputs.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/calendar/calendar-common.module.js +0 -41
- package/dist/es/calendar/calendar.component.js +0 -1189
- package/dist/es/calendar/calendar.module.js +0 -108
- package/dist/es/calendar/calendars.module.js +0 -60
- package/dist/es/calendar/for.directive.js +0 -135
- package/dist/es/calendar/header.component.js +0 -170
- package/dist/es/calendar/horizontal-view-list.component.js +0 -363
- package/dist/es/calendar/localization/calendar-custom-messages.component.js +0 -43
- package/dist/es/calendar/localization/calendar-localized-messages.directive.js +0 -35
- package/dist/es/calendar/localization/calendar-messages.js +0 -30
- package/dist/es/calendar/localization/multiview-calendar-custom-messages.component.js +0 -43
- package/dist/es/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -35
- package/dist/es/calendar/localization/multiview-calendar-messages.js +0 -30
- package/dist/es/calendar/models/keydown.interface.js +0 -4
- package/dist/es/calendar/models/row-length-options.interface.js +0 -4
- package/dist/es/calendar/models/scrollable.interface.js +0 -4
- package/dist/es/calendar/multiview-calendar.component.js +0 -1122
- package/dist/es/calendar/multiview-calendar.module.js +0 -97
- package/dist/es/calendar/navigation.component.js +0 -173
- package/dist/es/calendar/services/bus-view.service.js +0 -83
- package/dist/es/calendar/services/century-view.service.js +0 -180
- package/dist/es/calendar/services/decade-view.service.js +0 -179
- package/dist/es/calendar/services/disabled-dates.service.js +0 -70
- package/dist/es/calendar/services/dom.service.js +0 -195
- package/dist/es/calendar/services/month-view.service.js +0 -203
- package/dist/es/calendar/services/navigation.service.js +0 -53
- package/dist/es/calendar/services/scroll-sync.service.js +0 -85
- package/dist/es/calendar/services/selection.service.js +0 -55
- package/dist/es/calendar/services/weeknames.service.js +0 -27
- package/dist/es/calendar/services/year-view.service.js +0 -204
- package/dist/es/calendar/templates/cell-template.directive.js +0 -46
- package/dist/es/calendar/templates/century-cell-template.directive.js +0 -45
- package/dist/es/calendar/templates/decade-cell-template.directive.js +0 -45
- package/dist/es/calendar/templates/header-title-template.directive.js +0 -44
- package/dist/es/calendar/templates/month-cell-template.directive.js +0 -43
- package/dist/es/calendar/templates/navigation-item-template.directive.js +0 -44
- package/dist/es/calendar/templates/weeknumber-cell-template.directive.js +0 -43
- package/dist/es/calendar/templates/year-cell-template.directive.js +0 -46
- package/dist/es/calendar/templates.module.js +0 -59
- package/dist/es/calendar/view-list.component.js +0 -301
- package/dist/es/calendar/view.component.js +0 -318
- package/dist/es/common/dom-queries.js +0 -24
- package/dist/es/common/picker.service.js +0 -18
- package/dist/es/common/utils.js +0 -35
- package/dist/es/dateinput/dateinput.component.js +0 -1617
- package/dist/es/dateinput/dateinput.module.js +0 -37
- package/dist/es/dateinput/localization/dateinput-custom-messages.component.js +0 -43
- package/dist/es/dateinput/localization/dateinput-localized-messages.directive.js +0 -35
- package/dist/es/dateinput/localization/messages.js +0 -26
- package/dist/es/dateinputs.module.js +0 -63
- package/dist/es/datepicker/datepicker.component.js +0 -1256
- package/dist/es/datepicker/datepicker.module.js +0 -55
- package/dist/es/datepicker/localization/datepicker-custom-messages.component.js +0 -43
- package/dist/es/datepicker/localization/datepicker-localized-messages.directive.js +0 -35
- package/dist/es/datepicker/localization/messages.js +0 -34
- package/dist/es/daterange/date-range-end-input.directive.js +0 -97
- package/dist/es/daterange/date-range-input.js +0 -131
- package/dist/es/daterange/date-range-popup-template.directive.js +0 -23
- package/dist/es/daterange/date-range-popup.component.js +0 -403
- package/dist/es/daterange/date-range-selection.directive.js +0 -230
- package/dist/es/daterange/date-range-start-input.directive.js +0 -97
- package/dist/es/daterange/date-range.component.js +0 -71
- package/dist/es/daterange/date-range.module.js +0 -83
- package/dist/es/daterange/date-range.service.js +0 -208
- package/dist/es/datetimepicker/datetimepicker.component.js +0 -1309
- package/dist/es/datetimepicker/datetimepicker.module.js +0 -57
- package/dist/es/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -43
- package/dist/es/datetimepicker/localization/localized-messages.directive.js +0 -35
- package/dist/es/datetimepicker/localization/messages.js +0 -74
- package/dist/es/defaults.js +0 -24
- package/dist/es/index.js +0 -63
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-event.js +0 -29
- package/dist/es/timepicker/localization/messages.js +0 -46
- package/dist/es/timepicker/localization/timepicker-custom-messages.component.js +0 -43
- package/dist/es/timepicker/localization/timepicker-localized-messages.directive.js +0 -35
- package/dist/es/timepicker/localization/timeselector-custom-messages.component.js +0 -45
- package/dist/es/timepicker/localization/timeselector-localized-messages.directive.js +0 -35
- package/dist/es/timepicker/models/time-part.default.js +0 -14
- package/dist/es/timepicker/services/dayperiod.service.js +0 -130
- package/dist/es/timepicker/services/dom.service.js +0 -64
- package/dist/es/timepicker/services/hours.service.js +0 -129
- package/dist/es/timepicker/services/milliseconds.service.js +0 -130
- package/dist/es/timepicker/services/minutes.service.js +0 -127
- package/dist/es/timepicker/services/seconds.service.js +0 -127
- package/dist/es/timepicker/timelist.component.js +0 -297
- package/dist/es/timepicker/timepicker.component.js +0 -1044
- package/dist/es/timepicker/timepicker.module.js +0 -75
- package/dist/es/timepicker/timeselector.component.js +0 -486
- package/dist/es/timepicker/util.js +0 -82
- package/dist/es/touch-enabled.js +0 -9
- package/dist/es/util.js +0 -395
- package/dist/es/validators/disabled-date.validator.js +0 -18
- package/dist/es/validators/disabled-dates-range.validator.js +0 -28
- package/dist/es/validators/incomplete-date.validator.js +0 -18
- package/dist/es/validators/max.validator.js +0 -21
- package/dist/es/validators/min.validator.js +0 -21
- package/dist/es/validators/time-range.validator.js +0 -23
- package/dist/es/virtualization/services/row-height.service.js +0 -72
- package/dist/es/virtualization/services/scroller.service.js +0 -111
- package/dist/es/virtualization/virtualization.component.js +0 -343
- package/dist/es/virtualization/virtualization.module.js +0 -30
- package/dist/es2015/calendar/calendar-common.module.d.ts +0 -15
- package/dist/es2015/calendar/calendar-common.module.js +0 -38
- package/dist/es2015/calendar/localization/calendar-custom-messages.component.js +0 -35
- package/dist/es2015/calendar/localization/calendar-localized-messages.directive.js +0 -31
- package/dist/es2015/calendar/localization/calendar-messages.js +0 -24
- package/dist/es2015/calendar/localization/multiview-calendar-custom-messages.component.js +0 -35
- package/dist/es2015/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -31
- package/dist/es2015/calendar/localization/multiview-calendar-messages.js +0 -24
- package/dist/es2015/calendar/models/cell-context.interface.js +0 -4
- package/dist/es2015/calendar/models/navigation-action.enum.js +0 -20
- package/dist/es2015/calendar/models/selection-range-end.type.js +0 -4
- package/dist/es2015/calendar/models/selection.js +0 -4
- package/dist/es2015/calendar/models/type.js +0 -4
- package/dist/es2015/calendar/models/view-service.interface.js +0 -4
- package/dist/es2015/calendar/models/view.enum.js +0 -16
- package/dist/es2015/calendar/models/view.type.js +0 -4
- package/dist/es2015/calendar/templates.module.d.ts +0 -21
- package/dist/es2015/calendar/templates.module.js +0 -56
- package/dist/es2015/common/models/fillmode.js +0 -4
- package/dist/es2015/common/models/rounded.js +0 -4
- package/dist/es2015/common/models/size.js +0 -4
- package/dist/es2015/dateinput/arrow.enum.js +0 -13
- package/dist/es2015/dateinput/dateinput.module.d.ts +0 -10
- package/dist/es2015/dateinput/dateinput.module.js +0 -34
- package/dist/es2015/dateinput/localization/dateinput-custom-messages.component.js +0 -35
- package/dist/es2015/dateinput/localization/dateinput-localized-messages.directive.js +0 -31
- package/dist/es2015/dateinput/localization/messages.js +0 -20
- package/dist/es2015/dateinput/models/format-placeholder.model.js +0 -4
- package/dist/es2015/dateinput/models/format-settings.model.js +0 -4
- package/dist/es2015/dateinput/models/incremental-steps.model.js +0 -4
- package/dist/es2015/datepicker/datepicker.module.d.ts +0 -10
- package/dist/es2015/datepicker/datepicker.module.js +0 -52
- package/dist/es2015/datepicker/localization/datepicker-custom-messages.component.js +0 -35
- package/dist/es2015/datepicker/localization/datepicker-localized-messages.directive.js +0 -31
- package/dist/es2015/datepicker/localization/messages.js +0 -28
- package/dist/es2015/daterange/auto-correct-on.type.js +0 -4
- package/dist/es2015/daterange/date-range-popup-template.directive.js +0 -22
- package/dist/es2015/daterange/date-range.component.js +0 -68
- package/dist/es2015/datetimepicker/datetimepicker.module.d.ts +0 -10
- package/dist/es2015/datetimepicker/datetimepicker.module.js +0 -57
- package/dist/es2015/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -35
- package/dist/es2015/datetimepicker/localization/localized-messages.directive.js +0 -31
- package/dist/es2015/datetimepicker/localization/messages.js +0 -68
- package/dist/es2015/datetimepicker/models/active-tab.type.js +0 -4
- package/dist/es2015/index.d.ts +0 -63
- package/dist/es2015/index.js +0 -63
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -35
- package/dist/es2015/popup-settings.model.js +0 -4
- package/dist/es2015/timepicker/localization/messages.js +0 -40
- package/dist/es2015/timepicker/localization/timepicker-custom-messages.component.js +0 -35
- package/dist/es2015/timepicker/localization/timepicker-localized-messages.directive.js +0 -31
- package/dist/es2015/timepicker/localization/timeselector-custom-messages.component.js +0 -37
- package/dist/es2015/timepicker/localization/timeselector-localized-messages.directive.js +0 -31
- package/dist/es2015/timepicker/models/incremental-steps.model.js +0 -4
- package/dist/es2015/timepicker/models/list-item.interface.js +0 -4
- package/dist/es2015/timepicker/models/list-service-settings.js +0 -4
- package/dist/es2015/timepicker/models/list-service.interface.js +0 -4
- package/dist/es2015/timepicker/timepicker.module.d.ts +0 -10
- package/dist/es2015/virtualization/models/scrollable.interface.js +0 -4
- package/dist/es2015/virtualization/virtualization.module.js +0 -27
- package/dist/fesm5/index.js +0 -15216
- package/dist/npm/calendar/calendar-common.module.js +0 -43
- package/dist/npm/calendar/calendar.component.js +0 -1191
- package/dist/npm/calendar/calendar.module.js +0 -110
- package/dist/npm/calendar/calendars.module.js +0 -62
- package/dist/npm/calendar/for.directive.js +0 -138
- package/dist/npm/calendar/header.component.js +0 -172
- package/dist/npm/calendar/horizontal-view-list.component.js +0 -365
- package/dist/npm/calendar/localization/calendar-custom-messages.component.js +0 -45
- package/dist/npm/calendar/localization/calendar-localized-messages.directive.js +0 -37
- package/dist/npm/calendar/localization/calendar-messages.js +0 -32
- package/dist/npm/calendar/localization/multiview-calendar-custom-messages.component.js +0 -45
- package/dist/npm/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -37
- package/dist/npm/calendar/localization/multiview-calendar-messages.js +0 -32
- package/dist/npm/calendar/models/cell-context.interface.js +0 -6
- package/dist/npm/calendar/models/keydown.interface.js +0 -6
- package/dist/npm/calendar/models/navigation-action.enum.js +0 -22
- package/dist/npm/calendar/models/row-length-options.interface.js +0 -6
- package/dist/npm/calendar/models/scrollable.interface.js +0 -6
- package/dist/npm/calendar/models/selection-range-end.type.js +0 -6
- package/dist/npm/calendar/models/selection-range.interface.js +0 -10
- package/dist/npm/calendar/models/selection.js +0 -6
- package/dist/npm/calendar/models/type.js +0 -6
- package/dist/npm/calendar/models/view-service.interface.js +0 -6
- package/dist/npm/calendar/models/view.enum.js +0 -18
- package/dist/npm/calendar/models/view.type.js +0 -6
- package/dist/npm/calendar/multiview-calendar.component.js +0 -1124
- package/dist/npm/calendar/multiview-calendar.module.js +0 -99
- package/dist/npm/calendar/navigation.component.js +0 -175
- package/dist/npm/calendar/services/bus-view.service.js +0 -85
- package/dist/npm/calendar/services/century-view.service.js +0 -182
- package/dist/npm/calendar/services/decade-view.service.js +0 -181
- package/dist/npm/calendar/services/disabled-dates.service.js +0 -72
- package/dist/npm/calendar/services/dom.service.js +0 -212
- package/dist/npm/calendar/services/month-view.service.js +0 -205
- package/dist/npm/calendar/services/navigation.service.js +0 -55
- package/dist/npm/calendar/services/scroll-sync.service.js +0 -88
- package/dist/npm/calendar/services/selection.service.js +0 -57
- package/dist/npm/calendar/services/weeknames.service.js +0 -29
- package/dist/npm/calendar/services/year-view.service.js +0 -207
- package/dist/npm/calendar/templates/cell-template.directive.js +0 -48
- package/dist/npm/calendar/templates/century-cell-template.directive.js +0 -47
- package/dist/npm/calendar/templates/decade-cell-template.directive.js +0 -47
- package/dist/npm/calendar/templates/header-title-template.directive.js +0 -46
- package/dist/npm/calendar/templates/month-cell-template.directive.js +0 -45
- package/dist/npm/calendar/templates/navigation-item-template.directive.js +0 -46
- package/dist/npm/calendar/templates/weeknumber-cell-template.directive.js +0 -45
- package/dist/npm/calendar/templates/year-cell-template.directive.js +0 -48
- package/dist/npm/calendar/templates.module.js +0 -61
- package/dist/npm/calendar/view-list.component.js +0 -303
- package/dist/npm/calendar/view.component.js +0 -320
- package/dist/npm/common/dom-queries.js +0 -26
- package/dist/npm/common/models/fillmode.js +0 -6
- package/dist/npm/common/models/rounded.js +0 -6
- package/dist/npm/common/models/size.js +0 -6
- package/dist/npm/common/picker.service.js +0 -20
- package/dist/npm/common/utils.js +0 -37
- package/dist/npm/dateinput/arrow.enum.js +0 -15
- package/dist/npm/dateinput/dateinput.component.js +0 -1620
- package/dist/npm/dateinput/dateinput.module.js +0 -39
- package/dist/npm/dateinput/localization/dateinput-custom-messages.component.js +0 -45
- package/dist/npm/dateinput/localization/dateinput-localized-messages.directive.js +0 -37
- package/dist/npm/dateinput/localization/messages.js +0 -28
- package/dist/npm/dateinput/models/format-placeholder.model.js +0 -6
- package/dist/npm/dateinput/models/format-settings.model.js +0 -6
- package/dist/npm/dateinput/models/incremental-steps.model.js +0 -6
- package/dist/npm/dateinputs.module.js +0 -65
- package/dist/npm/datepicker/datepicker.component.js +0 -1258
- package/dist/npm/datepicker/datepicker.module.js +0 -57
- package/dist/npm/datepicker/localization/datepicker-custom-messages.component.js +0 -45
- package/dist/npm/datepicker/localization/datepicker-localized-messages.directive.js +0 -37
- package/dist/npm/datepicker/localization/messages.js +0 -36
- package/dist/npm/daterange/auto-correct-on.type.js +0 -6
- package/dist/npm/daterange/date-range-end-input.directive.js +0 -99
- package/dist/npm/daterange/date-range-input.js +0 -133
- package/dist/npm/daterange/date-range-popup-template.directive.js +0 -25
- package/dist/npm/daterange/date-range-popup.component.js +0 -405
- package/dist/npm/daterange/date-range-selection.directive.js +0 -232
- package/dist/npm/daterange/date-range-start-input.directive.js +0 -99
- package/dist/npm/daterange/date-range.component.js +0 -73
- package/dist/npm/daterange/date-range.module.js +0 -85
- package/dist/npm/daterange/date-range.service.js +0 -211
- package/dist/npm/datetimepicker/datetimepicker.component.js +0 -1311
- package/dist/npm/datetimepicker/datetimepicker.module.js +0 -59
- package/dist/npm/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -45
- package/dist/npm/datetimepicker/localization/localized-messages.directive.js +0 -37
- package/dist/npm/datetimepicker/localization/messages.js +0 -76
- package/dist/npm/datetimepicker/models/active-tab.type.js +0 -6
- package/dist/npm/defaults.js +0 -26
- package/dist/npm/index.js +0 -127
- package/dist/npm/main.js +0 -68
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/popup-settings.model.js +0 -6
- package/dist/npm/preventable-event.js +0 -31
- package/dist/npm/timepicker/localization/messages.js +0 -48
- package/dist/npm/timepicker/localization/timepicker-custom-messages.component.js +0 -45
- package/dist/npm/timepicker/localization/timepicker-localized-messages.directive.js +0 -37
- package/dist/npm/timepicker/localization/timeselector-custom-messages.component.js +0 -47
- package/dist/npm/timepicker/localization/timeselector-localized-messages.directive.js +0 -37
- package/dist/npm/timepicker/models/incremental-steps.model.js +0 -6
- package/dist/npm/timepicker/models/list-item.interface.js +0 -6
- package/dist/npm/timepicker/models/list-service-settings.js +0 -6
- package/dist/npm/timepicker/models/list-service.interface.js +0 -6
- package/dist/npm/timepicker/models/time-part.default.js +0 -16
- package/dist/npm/timepicker/services/dayperiod.service.js +0 -136
- package/dist/npm/timepicker/services/dom.service.js +0 -70
- package/dist/npm/timepicker/services/hours.service.js +0 -134
- package/dist/npm/timepicker/services/milliseconds.service.js +0 -135
- package/dist/npm/timepicker/services/minutes.service.js +0 -132
- package/dist/npm/timepicker/services/seconds.service.js +0 -132
- package/dist/npm/timepicker/timelist.component.js +0 -299
- package/dist/npm/timepicker/timepicker.component.js +0 -1046
- package/dist/npm/timepicker/timepicker.module.js +0 -77
- package/dist/npm/timepicker/timeselector.component.js +0 -488
- package/dist/npm/timepicker/util.js +0 -101
- package/dist/npm/touch-enabled.js +0 -11
- package/dist/npm/util.js +0 -399
- package/dist/npm/validators/disabled-date.validator.js +0 -20
- package/dist/npm/validators/disabled-dates-range.validator.js +0 -30
- package/dist/npm/validators/incomplete-date.validator.js +0 -20
- package/dist/npm/validators/max.validator.js +0 -23
- package/dist/npm/validators/min.validator.js +0 -23
- package/dist/npm/validators/time-range.validator.js +0 -25
- package/dist/npm/virtualization/models/scrollable.interface.js +0 -6
- package/dist/npm/virtualization/services/row-height.service.js +0 -74
- package/dist/npm/virtualization/services/scroller.service.js +0 -113
- package/dist/npm/virtualization/virtualization.component.js +0 -346
- package/dist/npm/virtualization/virtualization.module.js +0 -32
- package/dist/systemjs/kendo-angular-dateinputs.js +0 -5
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
var _a;
|
|
7
|
-
/* tslint:disable:object-literal-sort-keys */
|
|
8
|
-
import { Injectable } from '@angular/core';
|
|
9
|
-
import { addDecades, addYears, cloneDate, durationInDecades, firstYearOfDecade, lastYearOfDecade, createDate, lastMonthOfYear, lastDayOfMonth } from '@progress/kendo-date-math';
|
|
10
|
-
import { Action } from '../models/navigation-action.enum';
|
|
11
|
-
import { EMPTY_SELECTIONRANGE } from '../models/selection-range.interface';
|
|
12
|
-
import { getToday, isInSelectionRange, range } from '../../util';
|
|
13
|
-
import { isPresent } from '../../common/utils';
|
|
14
|
-
var EMPTY_DATA = [[]];
|
|
15
|
-
var CELLS_LENGTH = 4;
|
|
16
|
-
var ROWS_LENGTH = 3;
|
|
17
|
-
var ACTIONS = (_a = {},
|
|
18
|
-
_a[Action.Left] = function (date) { return addYears(date, -1); },
|
|
19
|
-
_a[Action.Up] = function (date) { return addYears(date, -5); },
|
|
20
|
-
_a[Action.Right] = function (date) { return addYears(date, 1); },
|
|
21
|
-
_a[Action.Down] = function (date) { return addYears(date, 5); },
|
|
22
|
-
_a[Action.PrevView] = function (date) { return addDecades(date, -1); },
|
|
23
|
-
_a[Action.NextView] = function (date) { return addDecades(date, 1); },
|
|
24
|
-
_a[Action.FirstInView] = function (date) { return firstYearOfDecade(date); },
|
|
25
|
-
_a[Action.LastInView] = function (date) { return lastYearOfDecade(date); },
|
|
26
|
-
_a);
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
*/
|
|
30
|
-
var DecadeViewService = /** @class */ (function () {
|
|
31
|
-
function DecadeViewService() {
|
|
32
|
-
this.dateRange = function (start, end) {
|
|
33
|
-
if (!isPresent(start) || !isPresent(end)) {
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
var result = [];
|
|
37
|
-
var current = start;
|
|
38
|
-
while (current <= end) {
|
|
39
|
-
result.push(current);
|
|
40
|
-
current = addYears(current, 1);
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
DecadeViewService.prototype.addToDate = function (min, skip) {
|
|
46
|
-
return addDecades(min, skip);
|
|
47
|
-
};
|
|
48
|
-
DecadeViewService.prototype.datesList = function (start, count) {
|
|
49
|
-
return range(0, count).map(function (i) { return addDecades(start, i); });
|
|
50
|
-
};
|
|
51
|
-
DecadeViewService.prototype.data = function (options) {
|
|
52
|
-
var _this = this;
|
|
53
|
-
var cellUID = options.cellUID, focusedDate = options.focusedDate, isActiveView = options.isActiveView, max = options.max, min = options.min, selectedDates = options.selectedDates, _a = options.selectionRange, selectionRange = _a === void 0 ? EMPTY_SELECTIONRANGE : _a, viewDate = options.viewDate;
|
|
54
|
-
if (!viewDate) {
|
|
55
|
-
return EMPTY_DATA;
|
|
56
|
-
}
|
|
57
|
-
var cells = range(0, CELLS_LENGTH);
|
|
58
|
-
var firstDate = firstYearOfDecade(viewDate);
|
|
59
|
-
var lastDate = lastYearOfDecade(viewDate);
|
|
60
|
-
var today = getToday();
|
|
61
|
-
return range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
62
|
-
var baseDate = addYears(firstDate, rowOffset * CELLS_LENGTH);
|
|
63
|
-
return cells.map(function (cellOffset) {
|
|
64
|
-
var cellDate = _this.normalize(addYears(baseDate, cellOffset), min, max);
|
|
65
|
-
var nextDecade = cellDate.getFullYear() > lastDate.getFullYear();
|
|
66
|
-
if (!_this.isInRange(cellDate, min, max) || nextDecade) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
70
|
-
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
71
|
-
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
72
|
-
var isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
73
|
-
return {
|
|
74
|
-
formattedValue: _this.value(cellDate),
|
|
75
|
-
id: "" + cellUID + cellDate.getTime(),
|
|
76
|
-
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
77
|
-
isSelected: isActiveView && selectedDates.some(function (date) { return _this.isEqual(cellDate, date); }),
|
|
78
|
-
isWeekend: false,
|
|
79
|
-
isRangeStart: isRangeStart,
|
|
80
|
-
isRangeMid: isRangeMid,
|
|
81
|
-
isRangeEnd: isRangeEnd,
|
|
82
|
-
isRangeSplitEnd: isRangeMid && _this.isEqual(cellDate, lastDate),
|
|
83
|
-
isRangeSplitStart: isRangeMid && _this.isEqual(cellDate, firstDate),
|
|
84
|
-
isToday: _this.isEqual(cellDate, today),
|
|
85
|
-
title: _this.cellTitle(cellDate),
|
|
86
|
-
value: cellDate
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
DecadeViewService.prototype.isEqual = function (candidate, expected) {
|
|
92
|
-
if (!candidate || !expected) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
return candidate.getFullYear() === expected.getFullYear();
|
|
96
|
-
};
|
|
97
|
-
DecadeViewService.prototype.isInArray = function (date, dates) {
|
|
98
|
-
if (!dates.length) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
var year = date.getFullYear();
|
|
102
|
-
return dates[0].getFullYear() <= year && year <= (dates[dates.length - 1].getFullYear() + 9);
|
|
103
|
-
};
|
|
104
|
-
DecadeViewService.prototype.isInRange = function (candidate, min, max) {
|
|
105
|
-
var year = candidate.getFullYear();
|
|
106
|
-
var aboveMin = !min || min.getFullYear() <= year;
|
|
107
|
-
var belowMax = !max || year <= max.getFullYear();
|
|
108
|
-
return aboveMin && belowMax;
|
|
109
|
-
};
|
|
110
|
-
DecadeViewService.prototype.beginningOfPeriod = function (date) {
|
|
111
|
-
if (!date) {
|
|
112
|
-
return date;
|
|
113
|
-
}
|
|
114
|
-
var firstYear = firstYearOfDecade(date);
|
|
115
|
-
return createDate(firstYear.getFullYear(), 0, 1);
|
|
116
|
-
};
|
|
117
|
-
DecadeViewService.prototype.lastDayOfPeriod = function (date) {
|
|
118
|
-
var year = lastYearOfDecade(date);
|
|
119
|
-
var month = lastMonthOfYear(year);
|
|
120
|
-
return lastDayOfMonth(month);
|
|
121
|
-
};
|
|
122
|
-
DecadeViewService.prototype.isRangeStart = function (value) {
|
|
123
|
-
return value.getFullYear() % 100 === 0;
|
|
124
|
-
};
|
|
125
|
-
DecadeViewService.prototype.move = function (value, action) {
|
|
126
|
-
var modifier = ACTIONS[action];
|
|
127
|
-
if (!modifier) {
|
|
128
|
-
return value;
|
|
129
|
-
}
|
|
130
|
-
return modifier(value);
|
|
131
|
-
};
|
|
132
|
-
DecadeViewService.prototype.cellTitle = function (value) {
|
|
133
|
-
return value.getFullYear().toString();
|
|
134
|
-
};
|
|
135
|
-
DecadeViewService.prototype.navigationTitle = function (value) {
|
|
136
|
-
return value ? firstYearOfDecade(value).getFullYear().toString() : '';
|
|
137
|
-
};
|
|
138
|
-
DecadeViewService.prototype.title = function (value) {
|
|
139
|
-
if (!value) {
|
|
140
|
-
return '';
|
|
141
|
-
}
|
|
142
|
-
return firstYearOfDecade(value).getFullYear() + " - " + lastYearOfDecade(value).getFullYear();
|
|
143
|
-
};
|
|
144
|
-
DecadeViewService.prototype.rowLength = function () {
|
|
145
|
-
return CELLS_LENGTH;
|
|
146
|
-
};
|
|
147
|
-
DecadeViewService.prototype.skip = function (value, min) {
|
|
148
|
-
return durationInDecades(min, value);
|
|
149
|
-
};
|
|
150
|
-
DecadeViewService.prototype.total = function (min, max) {
|
|
151
|
-
return durationInDecades(min, max) + 1;
|
|
152
|
-
};
|
|
153
|
-
DecadeViewService.prototype.value = function (current) {
|
|
154
|
-
return current ? current.getFullYear().toString() : '';
|
|
155
|
-
};
|
|
156
|
-
DecadeViewService.prototype.viewDate = function (date, max, viewsCount) {
|
|
157
|
-
if (viewsCount === void 0) { viewsCount = 1; }
|
|
158
|
-
var viewsInRange = this.total(date, max);
|
|
159
|
-
if (viewsInRange < viewsCount) {
|
|
160
|
-
var decadesToSubtract = viewsCount - viewsInRange;
|
|
161
|
-
return addDecades(date, -1 * decadesToSubtract);
|
|
162
|
-
}
|
|
163
|
-
return date;
|
|
164
|
-
};
|
|
165
|
-
DecadeViewService.prototype.normalize = function (cellDate, min, max) {
|
|
166
|
-
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
167
|
-
return cloneDate(min);
|
|
168
|
-
}
|
|
169
|
-
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
170
|
-
return cloneDate(max);
|
|
171
|
-
}
|
|
172
|
-
return cellDate;
|
|
173
|
-
};
|
|
174
|
-
DecadeViewService = tslib_1.__decorate([
|
|
175
|
-
Injectable()
|
|
176
|
-
], DecadeViewService);
|
|
177
|
-
return DecadeViewService;
|
|
178
|
-
}());
|
|
179
|
-
export { DecadeViewService };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Injectable, isDevMode } from '@angular/core';
|
|
7
|
-
import { getDate } from '@progress/kendo-date-math';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { isNumberArray, isDateArray, isPresent } from '../../common/utils';
|
|
10
|
-
var noop = function () { return false; };
|
|
11
|
-
var ɵ0 = noop;
|
|
12
|
-
var DISABLED_DATES_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/calendar/disabled-dates/';
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
var DisabledDatesService = /** @class */ (function () {
|
|
17
|
-
function DisabledDatesService() {
|
|
18
|
-
/**
|
|
19
|
-
* Emits every time the `isDateDisabled` method changes.
|
|
20
|
-
*/
|
|
21
|
-
this.changes = new Subject();
|
|
22
|
-
/**
|
|
23
|
-
* Based on the user-defined `disabledDates` input evaluates if the date is disabled.
|
|
24
|
-
* If not set, returns `false`.
|
|
25
|
-
*/
|
|
26
|
-
this.isDateDisabled = noop;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Configures the `isDateDisabled` function.
|
|
30
|
-
*
|
|
31
|
-
* * If a function is provided, uses it as-is and passes each date to it for evaluation.
|
|
32
|
-
* The time part is set to `midnight`.
|
|
33
|
-
* * If a `Date[]` is provided, creates a function that checks the targeted date against
|
|
34
|
-
* the listed dates and, if the targeted date is listed, marks it as disabled.
|
|
35
|
-
* * If a `Day[]` is provided, creates a function that evaluates the provided days of the
|
|
36
|
-
* week as disabled.
|
|
37
|
-
*/
|
|
38
|
-
DisabledDatesService.prototype.initialize = function (disabledDates) {
|
|
39
|
-
if (typeof disabledDates === 'function') {
|
|
40
|
-
this.isDateDisabled = function (date) { return disabledDates(getDate(date)); };
|
|
41
|
-
}
|
|
42
|
-
else if (isNumberArray(disabledDates)) {
|
|
43
|
-
var disabledWeekDays_1 = new Set(disabledDates);
|
|
44
|
-
this.isDateDisabled = function (date) { return disabledWeekDays_1.has(date.getDay()); };
|
|
45
|
-
}
|
|
46
|
-
else if (isDateArray(disabledDates)) {
|
|
47
|
-
var normalizedDisabledDates_1 = new Set(disabledDates.map(function (date) { return getDate(date).getTime(); }));
|
|
48
|
-
this.isDateDisabled = function (date) { return normalizedDisabledDates_1.has(getDate(date).getTime()); };
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.isDateDisabled = noop;
|
|
52
|
-
this.notifyInvalidInput(disabledDates);
|
|
53
|
-
}
|
|
54
|
-
this.notifyServiceChange();
|
|
55
|
-
};
|
|
56
|
-
DisabledDatesService.prototype.notifyInvalidInput = function (disabledDates) {
|
|
57
|
-
if (isPresent(disabledDates) && isDevMode()) {
|
|
58
|
-
throw new Error("The 'disabledDates' value should be a function, a Day array or a Date array. Check " + DISABLED_DATES_DOC_LINK + " for more information.");
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
DisabledDatesService.prototype.notifyServiceChange = function () {
|
|
62
|
-
this.changes.next();
|
|
63
|
-
};
|
|
64
|
-
DisabledDatesService = tslib_1.__decorate([
|
|
65
|
-
Injectable()
|
|
66
|
-
], DisabledDatesService);
|
|
67
|
-
return DisabledDatesService;
|
|
68
|
-
}());
|
|
69
|
-
export { DisabledDatesService };
|
|
70
|
-
export { ɵ0 };
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Injectable } from '@angular/core';
|
|
7
|
-
import { CalendarViewEnum } from '../models/view.enum';
|
|
8
|
-
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
9
|
-
import { domContainerFactory as containerFactory } from '../../util';
|
|
10
|
-
import { isPresent } from '../../common/utils';
|
|
11
|
-
var div = containerFactory('div');
|
|
12
|
-
var ul = containerFactory('ul');
|
|
13
|
-
var li = containerFactory('li');
|
|
14
|
-
var td = containerFactory('td');
|
|
15
|
-
var th = containerFactory('th');
|
|
16
|
-
var tr = containerFactory('tr');
|
|
17
|
-
var tbody = containerFactory('tbody');
|
|
18
|
-
var thead = containerFactory('thead');
|
|
19
|
-
var table = containerFactory('table');
|
|
20
|
-
var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\">March 2017</span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <span class=\"k-today k-nav-today\">TODAY</span>\n </span>\n ", 'k-calendar-header k-hstack')); };
|
|
21
|
-
var ɵ0 = monthHeader;
|
|
22
|
-
var monthWeekHeader = function () { return (table([
|
|
23
|
-
thead([
|
|
24
|
-
tr([th('MO', 'k-calendar-th')], 'k-calendar-tr')
|
|
25
|
-
], 'k-calendar-thead')
|
|
26
|
-
], 'k-calendar-weekdays k-calendar-table')); };
|
|
27
|
-
var ɵ1 = monthWeekHeader;
|
|
28
|
-
var repeat = function (count, mapper) { return new Array(count).fill('1').map(mapper); };
|
|
29
|
-
var ɵ2 = repeat;
|
|
30
|
-
var content = function (rows, cells) {
|
|
31
|
-
if (cells === void 0) { cells = 1; }
|
|
32
|
-
return (table([
|
|
33
|
-
tbody([tr([th('1', 'k-calendar-th')], 'k-calendar-tr')].concat(repeat(rows, function () { return tr(repeat(cells, function (c) { return td("<span class=\"k-link\">" + c + "</span>", 'k-calendar-td'); }), 'k-calendar-tr'); })), 'k-calendar-tbody')
|
|
34
|
-
], 'k-calendar-table'));
|
|
35
|
-
};
|
|
36
|
-
var ɵ3 = content;
|
|
37
|
-
var scrollable = function (children) { return div(children, 'k-flex k-content k-calendar-content k-scrollable'); };
|
|
38
|
-
var ɵ4 = scrollable;
|
|
39
|
-
var view = function (contentElement, className, renderWeekHeader) { return (div([
|
|
40
|
-
monthHeader(),
|
|
41
|
-
renderWeekHeader ? monthWeekHeader() : null,
|
|
42
|
-
scrollable([contentElement, contentElement])
|
|
43
|
-
], className, { left: '-10000px', position: 'absolute' })); };
|
|
44
|
-
var ɵ5 = view;
|
|
45
|
-
var ɵ6 = function () {
|
|
46
|
-
var navElement;
|
|
47
|
-
return function () {
|
|
48
|
-
if (!isDocumentAvailable) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
if (!navElement) {
|
|
52
|
-
navElement = div([scrollable([ul([li('<span>FEB</span>')])])], 'k-calendar-navigation', { left: '0px', position: 'absolute' });
|
|
53
|
-
}
|
|
54
|
-
return navElement;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
var navigationList = (ɵ6)();
|
|
58
|
-
var viewFactory = function (_a, className, renderWeekHeader) {
|
|
59
|
-
var cells = _a.cells, rows = _a.rows;
|
|
60
|
-
var viewElement;
|
|
61
|
-
return function () {
|
|
62
|
-
if (!isDocumentAvailable) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
if (!viewElement) {
|
|
66
|
-
viewElement = view(content(rows, cells), className, renderWeekHeader);
|
|
67
|
-
}
|
|
68
|
-
return viewElement;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
var ɵ7 = viewFactory;
|
|
72
|
-
var getScrollable = function (element) { return element.querySelector('.k-scrollable'); };
|
|
73
|
-
var ɵ8 = getScrollable;
|
|
74
|
-
var horizontal = function (element) {
|
|
75
|
-
var scrollableElement = getScrollable(element);
|
|
76
|
-
scrollableElement.classList.add('k-scrollable-horizontal');
|
|
77
|
-
return element;
|
|
78
|
-
};
|
|
79
|
-
var ɵ9 = horizontal;
|
|
80
|
-
var monthView = viewFactory({ cells: 7, rows: 6 }, 'k-vstack k-calendar-view k-calendar-monthview', true);
|
|
81
|
-
var yearView = viewFactory({ cells: 4, rows: 3 }, 'k-vstack k-calendar-view k-calendar-yearview', false);
|
|
82
|
-
var decadeView = viewFactory({ cells: 4, rows: 3 }, 'k-vstack k-calendar-view k-calendar-decadeview', false);
|
|
83
|
-
var horzMonthView = function () { return horizontal(monthView()); };
|
|
84
|
-
var ɵ10 = horzMonthView;
|
|
85
|
-
var horzYearView = function () { return horizontal(yearView()); };
|
|
86
|
-
var ɵ11 = horzYearView;
|
|
87
|
-
var horzDecadeView = function () { return horizontal(decadeView()); };
|
|
88
|
-
var ɵ12 = horzDecadeView;
|
|
89
|
-
var height = function (element) { return (parseFloat(window.getComputedStyle(element).height) || element.offsetHeight); };
|
|
90
|
-
var ɵ13 = height;
|
|
91
|
-
var width = function (element) {
|
|
92
|
-
var styles = window.getComputedStyle(element);
|
|
93
|
-
var computed = parseFloat(styles.width)
|
|
94
|
-
+ parseFloat(styles.paddingLeft)
|
|
95
|
-
+ parseFloat(styles.paddingRight);
|
|
96
|
-
return computed || element.offsetWidth;
|
|
97
|
-
};
|
|
98
|
-
var ɵ14 = width;
|
|
99
|
-
var getBody = function (element) { return element.querySelector('tbody'); };
|
|
100
|
-
var ɵ15 = getBody;
|
|
101
|
-
/**
|
|
102
|
-
* @hidden
|
|
103
|
-
*/
|
|
104
|
-
var CalendarDOMService = /** @class */ (function () {
|
|
105
|
-
function CalendarDOMService() {
|
|
106
|
-
}
|
|
107
|
-
CalendarDOMService.prototype.ensureHeights = function () {
|
|
108
|
-
if (this.calendarHeight !== undefined) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.calculateHeights();
|
|
112
|
-
};
|
|
113
|
-
CalendarDOMService.prototype.calculateHeights = function (container) {
|
|
114
|
-
var _this = this;
|
|
115
|
-
if (!isDocumentAvailable()) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
this.hostContainer = container;
|
|
119
|
-
this.batch(monthView(), function (contentElement) {
|
|
120
|
-
var viewElement = getBody(contentElement);
|
|
121
|
-
_this.calendarHeight = height(contentElement);
|
|
122
|
-
_this.monthViewHeight = height(viewElement);
|
|
123
|
-
_this.headerHeight = height(viewElement.children[0]);
|
|
124
|
-
_this.scrollableContentHeight = height(getScrollable(contentElement));
|
|
125
|
-
});
|
|
126
|
-
this.batch(horzMonthView(), function (contentElement) {
|
|
127
|
-
var viewElement = getBody(contentElement);
|
|
128
|
-
_this.calendarWidth = width(contentElement);
|
|
129
|
-
_this.monthViewWidth = width(viewElement);
|
|
130
|
-
_this.scrollableContentWidth = width(getScrollable(contentElement));
|
|
131
|
-
});
|
|
132
|
-
this.batch(yearView(), function (contentElement) {
|
|
133
|
-
_this.yearViewHeight = height(getBody(contentElement));
|
|
134
|
-
_this.scrollableYearContentHeight = height(getScrollable(contentElement));
|
|
135
|
-
});
|
|
136
|
-
this.batch(horzYearView(), function (contentElement) {
|
|
137
|
-
_this.yearViewWidth = width(getBody(contentElement));
|
|
138
|
-
});
|
|
139
|
-
this.batch(decadeView(), function (contentElement) {
|
|
140
|
-
_this.decadeViewHeight = height(getBody(contentElement));
|
|
141
|
-
_this.centuryViewHeight = _this.decadeViewHeight;
|
|
142
|
-
});
|
|
143
|
-
this.batch(horzDecadeView(), function (contentElement) {
|
|
144
|
-
_this.decadeViewWidth = width(getBody(contentElement));
|
|
145
|
-
_this.centuryViewWidth = _this.decadeViewWidth;
|
|
146
|
-
});
|
|
147
|
-
this.batch(navigationList(), function (contentElement) {
|
|
148
|
-
_this.navigationItemHeight = height(contentElement.querySelector('li'));
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
CalendarDOMService.prototype.viewHeight = function (viewType) {
|
|
152
|
-
return this.viewDimension(viewType, 'height');
|
|
153
|
-
};
|
|
154
|
-
CalendarDOMService.prototype.viewWidth = function (viewType) {
|
|
155
|
-
return this.viewDimension(viewType, 'width');
|
|
156
|
-
};
|
|
157
|
-
CalendarDOMService.prototype.viewDimension = function (viewType, dimension) {
|
|
158
|
-
var viewProp = dimension === 'height' ? 'ViewHeight' : 'ViewWidth';
|
|
159
|
-
switch (viewType) {
|
|
160
|
-
case CalendarViewEnum.month:
|
|
161
|
-
return this["month" + viewProp];
|
|
162
|
-
case CalendarViewEnum.year:
|
|
163
|
-
return this["year" + viewProp];
|
|
164
|
-
case CalendarViewEnum.decade:
|
|
165
|
-
return this["decade" + viewProp];
|
|
166
|
-
case CalendarViewEnum.century:
|
|
167
|
-
return this["century" + viewProp];
|
|
168
|
-
default:
|
|
169
|
-
return 1;
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
CalendarDOMService.prototype.batch = function (contentElement, action) {
|
|
173
|
-
if (!isPresent(this.hostContainer)) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
var hostClone = this.hostContainer.cloneNode();
|
|
177
|
-
document.body.appendChild(hostClone);
|
|
178
|
-
try {
|
|
179
|
-
var appendedContent = hostClone.appendChild(contentElement);
|
|
180
|
-
action(appendedContent);
|
|
181
|
-
}
|
|
182
|
-
catch (error) {
|
|
183
|
-
throw error;
|
|
184
|
-
}
|
|
185
|
-
finally {
|
|
186
|
-
document.body.removeChild(hostClone);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
CalendarDOMService = tslib_1.__decorate([
|
|
190
|
-
Injectable()
|
|
191
|
-
], CalendarDOMService);
|
|
192
|
-
return CalendarDOMService;
|
|
193
|
-
}());
|
|
194
|
-
export { CalendarDOMService };
|
|
195
|
-
export { ɵ0, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9, ɵ10, ɵ11, ɵ12, ɵ13, ɵ14, ɵ15 };
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
var _a;
|
|
7
|
-
/* tslint:disable:object-literal-sort-keys */
|
|
8
|
-
import { Injectable } from '@angular/core';
|
|
9
|
-
import { IntlService } from '@progress/kendo-angular-intl';
|
|
10
|
-
import { addDays, addWeeks, addMonths, cloneDate, dayOfWeek, durationInMonths, getDate, firstDayOfMonth, lastDayOfMonth, createDate } from '@progress/kendo-date-math';
|
|
11
|
-
import { Action } from '../models/navigation-action.enum';
|
|
12
|
-
import { EMPTY_SELECTIONRANGE } from '../models/selection-range.interface';
|
|
13
|
-
import { getToday, isInSelectionRange, range } from '../../util';
|
|
14
|
-
import { isPresent } from '../../common/utils';
|
|
15
|
-
var EMPTY_DATA = [[]];
|
|
16
|
-
var CELLS_LENGTH = 7;
|
|
17
|
-
var ROWS_LENGTH = 6;
|
|
18
|
-
var ACTIONS = (_a = {},
|
|
19
|
-
_a[Action.Left] = function (date) { return addDays(date, -1); },
|
|
20
|
-
_a[Action.Up] = function (date) { return addWeeks(date, -1); },
|
|
21
|
-
_a[Action.Right] = function (date) { return addDays(date, 1); },
|
|
22
|
-
_a[Action.Down] = function (date) { return addWeeks(date, 1); },
|
|
23
|
-
_a[Action.PrevView] = function (date) { return addMonths(date, -1); },
|
|
24
|
-
_a[Action.NextView] = function (date) { return addMonths(date, 1); },
|
|
25
|
-
_a[Action.FirstInView] = function (date) { return firstDayOfMonth(date); },
|
|
26
|
-
_a[Action.LastInView] = function (date) { return lastDayOfMonth(date); },
|
|
27
|
-
_a);
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
var MonthViewService = /** @class */ (function () {
|
|
32
|
-
function MonthViewService(_intlService) {
|
|
33
|
-
this._intlService = _intlService;
|
|
34
|
-
this.dateRange = function (start, end) {
|
|
35
|
-
if (!isPresent(start) || !isPresent(end)) {
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
var result = [];
|
|
39
|
-
var current = start;
|
|
40
|
-
while (current <= end) {
|
|
41
|
-
result.push(current);
|
|
42
|
-
current = addDays(current, 1);
|
|
43
|
-
}
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
MonthViewService.prototype.addToDate = function (min, skip) {
|
|
48
|
-
return addMonths(min, skip);
|
|
49
|
-
};
|
|
50
|
-
MonthViewService.prototype.datesList = function (start, count) {
|
|
51
|
-
return range(0, count).map(function (i) { return addMonths(start, i); });
|
|
52
|
-
};
|
|
53
|
-
MonthViewService.prototype.data = function (options) {
|
|
54
|
-
var _this = this;
|
|
55
|
-
var cellUID = options.cellUID, focusedDate = options.focusedDate, isActiveView = options.isActiveView, max = options.max, min = options.min, selectedDates = options.selectedDates, _a = options.selectionRange, selectionRange = _a === void 0 ? EMPTY_SELECTIONRANGE : _a, viewDate = options.viewDate, _b = options.isDateDisabled, isDateDisabled = _b === void 0 ? function () { return false; } : _b;
|
|
56
|
-
if (!viewDate) {
|
|
57
|
-
return EMPTY_DATA;
|
|
58
|
-
}
|
|
59
|
-
var firstMonthDate = firstDayOfMonth(viewDate);
|
|
60
|
-
var firstMonthDay = getDate(firstMonthDate);
|
|
61
|
-
var lastMonthDate = lastDayOfMonth(viewDate);
|
|
62
|
-
var lastMonthDay = getDate(lastMonthDate);
|
|
63
|
-
var backward = -1;
|
|
64
|
-
var date = dayOfWeek(firstMonthDate, this._intlService.firstDay(), backward);
|
|
65
|
-
var cells = range(0, CELLS_LENGTH);
|
|
66
|
-
var today = getToday();
|
|
67
|
-
return range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
68
|
-
var baseDate = addDays(date, rowOffset * CELLS_LENGTH);
|
|
69
|
-
return cells.map(function (cellOffset) {
|
|
70
|
-
var cellDate = _this.normalize(addDays(baseDate, cellOffset), min, max);
|
|
71
|
-
var cellDay = getDate(cellDate);
|
|
72
|
-
var otherMonth = cellDay < firstMonthDay || cellDay > lastMonthDay;
|
|
73
|
-
var outOfRange = cellDate < min || cellDate > max;
|
|
74
|
-
if (outOfRange) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
78
|
-
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
79
|
-
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
80
|
-
var isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
81
|
-
return {
|
|
82
|
-
formattedValue: _this.value(cellDate),
|
|
83
|
-
id: "" + cellUID + cellDate.getTime(),
|
|
84
|
-
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
85
|
-
isSelected: isActiveView && selectedDates.some(function (date) { return _this.isEqual(cellDate, date); }),
|
|
86
|
-
isWeekend: _this.isWeekend(cellDate),
|
|
87
|
-
isRangeStart: isRangeStart,
|
|
88
|
-
isRangeMid: isRangeMid,
|
|
89
|
-
isRangeEnd: isRangeEnd,
|
|
90
|
-
isRangeSplitStart: isRangeMid && _this.isEqual(cellDate, firstMonthDate),
|
|
91
|
-
isRangeSplitEnd: isRangeMid && _this.isEqual(cellDate, lastMonthDate),
|
|
92
|
-
isToday: _this.isEqual(cellDate, today),
|
|
93
|
-
title: _this.cellTitle(cellDate),
|
|
94
|
-
value: cellDate,
|
|
95
|
-
isDisabled: isDateDisabled(cellDate),
|
|
96
|
-
isOtherMonth: otherMonth
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
MonthViewService.prototype.isEqual = function (candidate, expected) {
|
|
102
|
-
if (!candidate || !expected) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
return getDate(candidate).getTime() === getDate(expected).getTime();
|
|
106
|
-
};
|
|
107
|
-
MonthViewService.prototype.isInArray = function (date, dates) {
|
|
108
|
-
if (dates.length === 0) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
var lowerBound = this.beginningOfPeriod(dates[0]);
|
|
112
|
-
var upperBound = this.beginningOfPeriod(addMonths(dates[dates.length - 1], 1));
|
|
113
|
-
return lowerBound <= date && date < upperBound;
|
|
114
|
-
};
|
|
115
|
-
MonthViewService.prototype.isInRange = function (candidate, min, max) {
|
|
116
|
-
var value = getDate(candidate);
|
|
117
|
-
var aboveMin = !min || getDate(min) <= value;
|
|
118
|
-
var belowMax = !max || value <= getDate(max);
|
|
119
|
-
return aboveMin && belowMax;
|
|
120
|
-
};
|
|
121
|
-
MonthViewService.prototype.beginningOfPeriod = function (date) {
|
|
122
|
-
if (!date) {
|
|
123
|
-
return date;
|
|
124
|
-
}
|
|
125
|
-
return createDate(date.getFullYear(), date.getMonth(), 1);
|
|
126
|
-
};
|
|
127
|
-
MonthViewService.prototype.lastDayOfPeriod = function (date) {
|
|
128
|
-
return lastDayOfMonth(date);
|
|
129
|
-
};
|
|
130
|
-
MonthViewService.prototype.isRangeStart = function (value) {
|
|
131
|
-
return !value.getMonth();
|
|
132
|
-
};
|
|
133
|
-
MonthViewService.prototype.move = function (value, action) {
|
|
134
|
-
var modifier = ACTIONS[action];
|
|
135
|
-
if (!modifier) {
|
|
136
|
-
return value;
|
|
137
|
-
}
|
|
138
|
-
return modifier(value);
|
|
139
|
-
};
|
|
140
|
-
MonthViewService.prototype.cellTitle = function (value) {
|
|
141
|
-
return this._intlService.formatDate(value, 'D');
|
|
142
|
-
};
|
|
143
|
-
MonthViewService.prototype.navigationTitle = function (value) {
|
|
144
|
-
if (!value) {
|
|
145
|
-
return '';
|
|
146
|
-
}
|
|
147
|
-
return this.isRangeStart(value) ? value.getFullYear().toString() : this.abbrMonthNames()[value.getMonth()];
|
|
148
|
-
};
|
|
149
|
-
MonthViewService.prototype.title = function (current) {
|
|
150
|
-
return this.wideMonthNames()[current.getMonth()] + " " + current.getFullYear();
|
|
151
|
-
};
|
|
152
|
-
MonthViewService.prototype.rowLength = function (options) {
|
|
153
|
-
if (options === void 0) { options = {}; }
|
|
154
|
-
return CELLS_LENGTH + (options.prependCell ? 1 : 0);
|
|
155
|
-
};
|
|
156
|
-
MonthViewService.prototype.skip = function (value, min) {
|
|
157
|
-
return durationInMonths(min, value);
|
|
158
|
-
};
|
|
159
|
-
MonthViewService.prototype.total = function (min, max) {
|
|
160
|
-
return durationInMonths(min, max) + 1;
|
|
161
|
-
};
|
|
162
|
-
MonthViewService.prototype.value = function (current) {
|
|
163
|
-
return current ? current.getDate().toString() : "";
|
|
164
|
-
};
|
|
165
|
-
MonthViewService.prototype.viewDate = function (date, max, viewsCount) {
|
|
166
|
-
if (viewsCount === void 0) { viewsCount = 1; }
|
|
167
|
-
var viewsInRange = this.total(date, max);
|
|
168
|
-
if (viewsInRange < viewsCount) {
|
|
169
|
-
var monthsToSubtract = viewsCount - viewsInRange;
|
|
170
|
-
return addMonths(date, -1 * monthsToSubtract);
|
|
171
|
-
}
|
|
172
|
-
return date;
|
|
173
|
-
};
|
|
174
|
-
MonthViewService.prototype.isWeekend = function (date) {
|
|
175
|
-
var _a = this._intlService.weekendRange(), start = _a.start, end = _a.end;
|
|
176
|
-
var day = date.getDay();
|
|
177
|
-
if (end < start) {
|
|
178
|
-
return day <= end || start <= day;
|
|
179
|
-
}
|
|
180
|
-
return start <= day && day <= end;
|
|
181
|
-
};
|
|
182
|
-
MonthViewService.prototype.abbrMonthNames = function () {
|
|
183
|
-
return this._intlService.dateFormatNames({ nameType: 'abbreviated', type: 'months' });
|
|
184
|
-
};
|
|
185
|
-
MonthViewService.prototype.normalize = function (cellDate, min, max) {
|
|
186
|
-
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
187
|
-
return cloneDate(min);
|
|
188
|
-
}
|
|
189
|
-
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
190
|
-
return cloneDate(max);
|
|
191
|
-
}
|
|
192
|
-
return cellDate;
|
|
193
|
-
};
|
|
194
|
-
MonthViewService.prototype.wideMonthNames = function () {
|
|
195
|
-
return this._intlService.dateFormatNames({ nameType: 'wide', type: 'months' });
|
|
196
|
-
};
|
|
197
|
-
MonthViewService = tslib_1.__decorate([
|
|
198
|
-
Injectable(),
|
|
199
|
-
tslib_1.__metadata("design:paramtypes", [IntlService])
|
|
200
|
-
], MonthViewService);
|
|
201
|
-
return MonthViewService;
|
|
202
|
-
}());
|
|
203
|
-
export { MonthViewService };
|