@progress/kendo-angular-dateinputs 6.0.3 → 7.0.0-next.202203231050
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 +40 -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 +0 -0
- package/{dist/es2015/common → common}/models/rounded.d.ts +0 -0
- package/{dist/es2015/common → common}/models/size.d.ts +0 -0
- 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 +21 -12
- 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 +36 -24
- 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 +5 -1
- package/{dist/es2015/daterange → daterange}/date-range-input.d.ts +5 -3
- 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 +12 -5
- package/daterange/date-range-popup.service.d.ts +52 -0
- 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 +5 -1
- package/{dist/es2015/daterange → daterange}/date-range.component.d.ts +4 -1
- package/{dist/es2015/daterange → daterange}/date-range.module.d.ts +15 -1
- package/{dist/es2015/daterange → daterange}/date-range.service.d.ts +8 -38
- package/{dist/es2015/datetimepicker → datetimepicker}/datetimepicker.component.d.ts +38 -23
- 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 +277 -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 +16 -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 +26 -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 +26 -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 +104 -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 +179 -183
- 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 +24 -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 +285 -285
- 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 +28 -0
- package/{dist/es → esm2015}/daterange/auto-correct-on.type.js +1 -0
- package/{dist/es2015 → esm2015}/daterange/date-range-end-input.directive.js +21 -27
- package/{dist/es2015 → esm2015}/daterange/date-range-input.js +11 -8
- package/esm2015/daterange/date-range-popup-template.directive.js +23 -0
- package/{dist/es2015 → esm2015}/daterange/date-range-popup.component.js +75 -91
- package/esm2015/daterange/date-range-popup.service.js +87 -0
- package/{dist/es2015 → esm2015}/daterange/date-range-selection.directive.js +26 -39
- package/{dist/es2015 → esm2015}/daterange/date-range-start-input.directive.js +21 -27
- package/esm2015/daterange/date-range.component.js +74 -0
- package/{dist/es2015 → esm2015}/daterange/date-range.module.js +27 -12
- package/{dist/es2015 → esm2015}/daterange/date-range.service.js +8 -75
- package/{dist/es2015 → esm2015}/datetimepicker/datetimepicker.component.js +398 -227
- 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 +48 -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 +25 -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 +0 -0
- package/esm2015/timepicker/localization/messages.js +34 -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 +219 -179
- 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 +1 -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} +9630 -9048
- 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} +25 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +44 -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} +0 -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 +32 -18
- 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} +0 -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,132 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
10
|
-
var kendo_angular_intl_1 = require("@progress/kendo-angular-intl");
|
|
11
|
-
var defaults_1 = require("../../defaults");
|
|
12
|
-
var util_1 = require("../../util");
|
|
13
|
-
var MINUTES_IN_HOUR = 60;
|
|
14
|
-
var clampToRange = function (rangeValue) { return function (value) { return value % rangeValue; }; };
|
|
15
|
-
var ɵ0 = clampToRange;
|
|
16
|
-
exports.ɵ0 = ɵ0;
|
|
17
|
-
var clamp = clampToRange(MINUTES_IN_HOUR);
|
|
18
|
-
var stepper = function (start, step) { return function (idx) { return clamp(start + (idx * step)); }; };
|
|
19
|
-
var ɵ1 = stepper;
|
|
20
|
-
exports.ɵ1 = ɵ1;
|
|
21
|
-
var distanceFromMin = function (value, min) { return clamp(MINUTES_IN_HOUR + value - min); };
|
|
22
|
-
var ɵ2 = distanceFromMin;
|
|
23
|
-
exports.ɵ2 = ɵ2;
|
|
24
|
-
var limit = function (borderValue) { return function (barrier, value) {
|
|
25
|
-
var useBarrier = !value || barrier.getHours() === value.getHours();
|
|
26
|
-
return useBarrier ? barrier : util_1.setMinutes(barrier, borderValue);
|
|
27
|
-
}; };
|
|
28
|
-
var ɵ3 = limit;
|
|
29
|
-
exports.ɵ3 = ɵ3;
|
|
30
|
-
var limitDown = limit(0);
|
|
31
|
-
var limitUp = limit(MINUTES_IN_HOUR - 1);
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
var MinutesService = /** @class */ (function () {
|
|
36
|
-
function MinutesService(intl) {
|
|
37
|
-
this.intl = intl;
|
|
38
|
-
this.insertUndividedMax = false;
|
|
39
|
-
}
|
|
40
|
-
MinutesService.prototype.apply = function (value, candidate) {
|
|
41
|
-
return util_1.setMinutes(value, candidate.getMinutes());
|
|
42
|
-
};
|
|
43
|
-
MinutesService.prototype.configure = function (settings) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
var _a = settings.insertUndividedMax, insertUndividedMax = _a === void 0 ? this.insertUndividedMax : _a, _b = settings.min, min = _b === void 0 ? this.min : _b, _c = settings.max, max = _c === void 0 ? this.max : _c, part = settings.part, _d = settings.step, step = _d === void 0 ? this.step : _d;
|
|
46
|
-
this.insertUndividedMax = insertUndividedMax;
|
|
47
|
-
this.toListItem = function (minute) {
|
|
48
|
-
var date = util_1.setMinutes(defaults_1.MIDNIGHT_DATE, minute);
|
|
49
|
-
return {
|
|
50
|
-
text: _this.intl.formatDate(date, part.pattern),
|
|
51
|
-
value: date
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
this.min = min;
|
|
55
|
-
this.max = max;
|
|
56
|
-
this.step = step;
|
|
57
|
-
};
|
|
58
|
-
MinutesService.prototype.data = function (selectedValue) {
|
|
59
|
-
var _this = this;
|
|
60
|
-
var min = this.range(selectedValue)[0];
|
|
61
|
-
var getMinute = stepper(min, this.step);
|
|
62
|
-
var convertToItem = function (idx) { return (_this.toListItem(getMinute(idx))); };
|
|
63
|
-
var data = util_1.range(0, this.countFromMin(selectedValue)).map(convertToItem);
|
|
64
|
-
this.addLast(data);
|
|
65
|
-
this.addMissing(data, selectedValue);
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
MinutesService.prototype.isRangeChanged = function (min, max) {
|
|
69
|
-
return !kendo_date_math_1.isEqual(this.min, min) || !kendo_date_math_1.isEqual(this.max, max);
|
|
70
|
-
};
|
|
71
|
-
MinutesService.prototype.limitRange = function (min, max, value) {
|
|
72
|
-
return [limitDown(min, value), limitUp(max, value)];
|
|
73
|
-
};
|
|
74
|
-
MinutesService.prototype.total = function (value) {
|
|
75
|
-
var last = this.insertUndividedMax && this.isLastMissing(value) ? 1 : 0;
|
|
76
|
-
var missing = this.isMissing(value) ? 1 : 0;
|
|
77
|
-
return this.countFromMin(value) + missing + last;
|
|
78
|
-
};
|
|
79
|
-
MinutesService.prototype.selectedIndex = function (value) {
|
|
80
|
-
return Math.ceil(this.divideByStep(value));
|
|
81
|
-
};
|
|
82
|
-
MinutesService.prototype.valueInList = function (value) {
|
|
83
|
-
if (!value) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
var matchMax = this.insertUndividedMax && this.lastMinute(value) === value.getMinutes();
|
|
87
|
-
return matchMax || !this.isMissing(value);
|
|
88
|
-
};
|
|
89
|
-
MinutesService.prototype.addLast = function (data, value) {
|
|
90
|
-
if (this.insertUndividedMax && this.isLastMissing(value)) {
|
|
91
|
-
data.push(this.toListItem(this.lastMinute(value)));
|
|
92
|
-
}
|
|
93
|
-
return data;
|
|
94
|
-
};
|
|
95
|
-
MinutesService.prototype.addMissing = function (data, value) {
|
|
96
|
-
if (this.valueInList(value)) {
|
|
97
|
-
return data;
|
|
98
|
-
}
|
|
99
|
-
var missingItem = this.toListItem(value.getMinutes());
|
|
100
|
-
data.splice(this.selectedIndex(value), 0, missingItem);
|
|
101
|
-
return data;
|
|
102
|
-
};
|
|
103
|
-
MinutesService.prototype.countFromMin = function (value) {
|
|
104
|
-
var _a = this.range(value), min = _a[0], max = _a[1];
|
|
105
|
-
return Math.floor(distanceFromMin(max, min) / this.step) + 1; /* include min */
|
|
106
|
-
};
|
|
107
|
-
MinutesService.prototype.isMissing = function (value) {
|
|
108
|
-
if (!value) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
return this.selectedIndex(value) !== this.divideByStep(value);
|
|
112
|
-
};
|
|
113
|
-
MinutesService.prototype.isLastMissing = function (value) {
|
|
114
|
-
return this.isMissing(util_1.setMinutes(this.max, this.lastMinute(value)));
|
|
115
|
-
};
|
|
116
|
-
MinutesService.prototype.divideByStep = function (value) {
|
|
117
|
-
return distanceFromMin(value.getMinutes(), this.min.getMinutes()) / this.step;
|
|
118
|
-
};
|
|
119
|
-
MinutesService.prototype.lastMinute = function (value) {
|
|
120
|
-
return this.range(value)[1];
|
|
121
|
-
};
|
|
122
|
-
MinutesService.prototype.range = function (value) {
|
|
123
|
-
var _a = this.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
124
|
-
return [min.getMinutes(), max.getMinutes()];
|
|
125
|
-
};
|
|
126
|
-
MinutesService = tslib_1.__decorate([
|
|
127
|
-
core_1.Injectable(),
|
|
128
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_intl_1.IntlService])
|
|
129
|
-
], MinutesService);
|
|
130
|
-
return MinutesService;
|
|
131
|
-
}());
|
|
132
|
-
exports.MinutesService = MinutesService;
|
|
@@ -1,132 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
10
|
-
var kendo_angular_intl_1 = require("@progress/kendo-angular-intl");
|
|
11
|
-
var defaults_1 = require("../../defaults");
|
|
12
|
-
var util_1 = require("../../util");
|
|
13
|
-
var SECONDS_IN_HOUR = 60;
|
|
14
|
-
var clampToRange = function (rangeValue) { return function (value) { return value % rangeValue; }; };
|
|
15
|
-
var ɵ0 = clampToRange;
|
|
16
|
-
exports.ɵ0 = ɵ0;
|
|
17
|
-
var clamp = clampToRange(SECONDS_IN_HOUR);
|
|
18
|
-
var stepper = function (start, step) { return function (idx) { return clamp(start + (idx * step)); }; };
|
|
19
|
-
var ɵ1 = stepper;
|
|
20
|
-
exports.ɵ1 = ɵ1;
|
|
21
|
-
var distanceFromMin = function (value, min) { return clamp(SECONDS_IN_HOUR + value - min); };
|
|
22
|
-
var ɵ2 = distanceFromMin;
|
|
23
|
-
exports.ɵ2 = ɵ2;
|
|
24
|
-
var limit = function (borderValue) { return function (barrier, value) {
|
|
25
|
-
var useBarrier = !value || barrier.getHours() === value.getHours() && barrier.getMinutes() === value.getMinutes();
|
|
26
|
-
return useBarrier ? barrier : util_1.setSeconds(barrier, borderValue);
|
|
27
|
-
}; };
|
|
28
|
-
var ɵ3 = limit;
|
|
29
|
-
exports.ɵ3 = ɵ3;
|
|
30
|
-
var limitDown = limit(0);
|
|
31
|
-
var limitUp = limit(SECONDS_IN_HOUR - 1);
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
var SecondsService = /** @class */ (function () {
|
|
36
|
-
function SecondsService(intl) {
|
|
37
|
-
this.intl = intl;
|
|
38
|
-
this.insertUndividedMax = false;
|
|
39
|
-
}
|
|
40
|
-
SecondsService.prototype.apply = function (value, candidate) {
|
|
41
|
-
return util_1.setSeconds(value, candidate.getSeconds());
|
|
42
|
-
};
|
|
43
|
-
SecondsService.prototype.configure = function (settings) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
var _a = settings.insertUndividedMax, insertUndividedMax = _a === void 0 ? this.insertUndividedMax : _a, _b = settings.min, min = _b === void 0 ? this.min : _b, _c = settings.max, max = _c === void 0 ? this.max : _c, part = settings.part, _d = settings.step, step = _d === void 0 ? this.step : _d;
|
|
46
|
-
this.insertUndividedMax = insertUndividedMax;
|
|
47
|
-
this.toListItem = function (second) {
|
|
48
|
-
var date = util_1.setSeconds(defaults_1.MIDNIGHT_DATE, second);
|
|
49
|
-
return {
|
|
50
|
-
text: _this.intl.formatDate(date, part.pattern),
|
|
51
|
-
value: date
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
this.min = min;
|
|
55
|
-
this.max = max;
|
|
56
|
-
this.step = step;
|
|
57
|
-
};
|
|
58
|
-
SecondsService.prototype.data = function (selectedValue) {
|
|
59
|
-
var _this = this;
|
|
60
|
-
var min = this.range(selectedValue)[0];
|
|
61
|
-
var getSecond = stepper(min, this.step);
|
|
62
|
-
var convertToItem = function (idx) { return (_this.toListItem(getSecond(idx))); };
|
|
63
|
-
var data = util_1.range(0, this.countFromMin(selectedValue)).map(convertToItem);
|
|
64
|
-
this.addLast(data);
|
|
65
|
-
this.addMissing(data, selectedValue);
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
SecondsService.prototype.isRangeChanged = function (min, max) {
|
|
69
|
-
return !kendo_date_math_1.isEqual(this.min, min) || !kendo_date_math_1.isEqual(this.max, max);
|
|
70
|
-
};
|
|
71
|
-
SecondsService.prototype.limitRange = function (min, max, value) {
|
|
72
|
-
return [limitDown(min, value), limitUp(max, value)];
|
|
73
|
-
};
|
|
74
|
-
SecondsService.prototype.total = function (value) {
|
|
75
|
-
var last = this.insertUndividedMax && this.isLastMissing(value) ? 1 : 0;
|
|
76
|
-
var missing = this.isMissing(value) ? 1 : 0;
|
|
77
|
-
return this.countFromMin(value) + missing + last;
|
|
78
|
-
};
|
|
79
|
-
SecondsService.prototype.selectedIndex = function (value) {
|
|
80
|
-
return Math.ceil(this.divideByStep(value));
|
|
81
|
-
};
|
|
82
|
-
SecondsService.prototype.valueInList = function (value) {
|
|
83
|
-
if (!value) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
var matchMax = this.insertUndividedMax && this.lastSecond(value) === value.getSeconds();
|
|
87
|
-
return matchMax || !this.isMissing(value);
|
|
88
|
-
};
|
|
89
|
-
SecondsService.prototype.divideByStep = function (value) {
|
|
90
|
-
return distanceFromMin(value.getSeconds(), this.min.getSeconds()) / this.step;
|
|
91
|
-
};
|
|
92
|
-
SecondsService.prototype.addLast = function (data, value) {
|
|
93
|
-
if (this.insertUndividedMax && this.isLastMissing(value)) {
|
|
94
|
-
data.push(this.toListItem(this.lastSecond(value)));
|
|
95
|
-
}
|
|
96
|
-
return data;
|
|
97
|
-
};
|
|
98
|
-
SecondsService.prototype.addMissing = function (data, value) {
|
|
99
|
-
if (this.valueInList(value)) {
|
|
100
|
-
return data;
|
|
101
|
-
}
|
|
102
|
-
var missingItem = this.toListItem(value.getSeconds());
|
|
103
|
-
data.splice(this.selectedIndex(value), 0, missingItem);
|
|
104
|
-
return data;
|
|
105
|
-
};
|
|
106
|
-
SecondsService.prototype.countFromMin = function (value) {
|
|
107
|
-
var _a = this.range(value), min = _a[0], max = _a[1];
|
|
108
|
-
return Math.floor(distanceFromMin(max, min) / this.step) + 1; /* include min */
|
|
109
|
-
};
|
|
110
|
-
SecondsService.prototype.isMissing = function (value) {
|
|
111
|
-
if (!value) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
return this.selectedIndex(value) !== this.divideByStep(value);
|
|
115
|
-
};
|
|
116
|
-
SecondsService.prototype.isLastMissing = function (value) {
|
|
117
|
-
return this.isMissing(util_1.setSeconds(this.max, this.lastSecond(value)));
|
|
118
|
-
};
|
|
119
|
-
SecondsService.prototype.lastSecond = function (value) {
|
|
120
|
-
return this.range(value)[1];
|
|
121
|
-
};
|
|
122
|
-
SecondsService.prototype.range = function (value) {
|
|
123
|
-
var _a = this.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
124
|
-
return [min.getSeconds(), max.getSeconds()];
|
|
125
|
-
};
|
|
126
|
-
SecondsService = tslib_1.__decorate([
|
|
127
|
-
core_1.Injectable(),
|
|
128
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_intl_1.IntlService])
|
|
129
|
-
], SecondsService);
|
|
130
|
-
return SecondsService;
|
|
131
|
-
}());
|
|
132
|
-
exports.SecondsService = SecondsService;
|
|
@@ -1,299 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var _a;
|
|
9
|
-
/* tslint:disable:component-selector-name component-selector-type */
|
|
10
|
-
var core_1 = require("@angular/core");
|
|
11
|
-
var operators_1 = require("rxjs/operators");
|
|
12
|
-
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
13
|
-
var virtualization_component_1 = require("../virtualization/virtualization.component");
|
|
14
|
-
var defaults_1 = require("../defaults");
|
|
15
|
-
var time_part_default_1 = require("./models/time-part.default");
|
|
16
|
-
var dom_service_1 = require("./services/dom.service");
|
|
17
|
-
var hours_service_1 = require("./services/hours.service");
|
|
18
|
-
var minutes_service_1 = require("./services/minutes.service");
|
|
19
|
-
var seconds_service_1 = require("./services/seconds.service");
|
|
20
|
-
var milliseconds_service_1 = require("./services/milliseconds.service");
|
|
21
|
-
var dayperiod_service_1 = require("./services/dayperiod.service");
|
|
22
|
-
var dom_queries_1 = require("../common/dom-queries");
|
|
23
|
-
var SNAP_THRESHOLD = 0.05; //% of the item height
|
|
24
|
-
var SCROLL_THRESHOLD = 2; //< 2px threshold
|
|
25
|
-
var nil = function () { return (null); };
|
|
26
|
-
var ɵ0 = nil;
|
|
27
|
-
exports.ɵ0 = ɵ0;
|
|
28
|
-
var getters = {
|
|
29
|
-
35: function (data, _) { return data[data.length - 1]; },
|
|
30
|
-
36: function (data, _) { return data[0]; },
|
|
31
|
-
38: function (data, index) { return data[index - 1]; },
|
|
32
|
-
40: function (data, index) { return data[index + 1]; }
|
|
33
|
-
};
|
|
34
|
-
var services = (_a = {},
|
|
35
|
-
_a[time_part_default_1.TIME_PART.dayperiod] = dayperiod_service_1.DayPeriodService,
|
|
36
|
-
_a[time_part_default_1.TIME_PART.hour] = hours_service_1.HoursService,
|
|
37
|
-
_a[time_part_default_1.TIME_PART.minute] = minutes_service_1.MinutesService,
|
|
38
|
-
_a[time_part_default_1.TIME_PART.second] = seconds_service_1.SecondsService,
|
|
39
|
-
_a[time_part_default_1.TIME_PART.millisecond] = milliseconds_service_1.MillisecondsService,
|
|
40
|
-
_a);
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
var TimeListComponent = /** @class */ (function () {
|
|
45
|
-
function TimeListComponent(element, injector, dom, renderer, zone) {
|
|
46
|
-
this.element = element;
|
|
47
|
-
this.injector = injector;
|
|
48
|
-
this.dom = dom;
|
|
49
|
-
this.renderer = renderer;
|
|
50
|
-
this.zone = zone;
|
|
51
|
-
this.min = kendo_date_math_1.cloneDate(defaults_1.MIDNIGHT_DATE);
|
|
52
|
-
this.max = kendo_date_math_1.cloneDate(defaults_1.MAX_TIME);
|
|
53
|
-
this.step = 1;
|
|
54
|
-
this.disabled = false;
|
|
55
|
-
this.valueChange = new core_1.EventEmitter();
|
|
56
|
-
this.componentClass = true;
|
|
57
|
-
this.animateToIndex = true;
|
|
58
|
-
this.isActive = false;
|
|
59
|
-
this.skip = 0;
|
|
60
|
-
this.total = 60;
|
|
61
|
-
this.data = [];
|
|
62
|
-
this.indexToScroll = -1;
|
|
63
|
-
this.domEvents = [];
|
|
64
|
-
}
|
|
65
|
-
Object.defineProperty(TimeListComponent.prototype, "tabIndex", {
|
|
66
|
-
get: function () {
|
|
67
|
-
return this.disabled ? undefined : 0;
|
|
68
|
-
},
|
|
69
|
-
enumerable: true,
|
|
70
|
-
configurable: true
|
|
71
|
-
});
|
|
72
|
-
TimeListComponent.prototype.ngOnChanges = function (changes) {
|
|
73
|
-
if (changes.part) {
|
|
74
|
-
this.service = this.injector.get(services[this.part.type]);
|
|
75
|
-
this.service.configure(this.serviceSettings());
|
|
76
|
-
}
|
|
77
|
-
var value = this.value;
|
|
78
|
-
var valueChanges = changes.value || {};
|
|
79
|
-
var _a = this.service.limitRange(this.min, this.max, value), min = _a[0], max = _a[1];
|
|
80
|
-
if (this.service.isRangeChanged(min, max) || changes.min || changes.max || changes.step) {
|
|
81
|
-
this.data = [];
|
|
82
|
-
this.service.configure(this.serviceSettings({ min: min, max: max }));
|
|
83
|
-
}
|
|
84
|
-
// Skip the rendering of the list whenever possible
|
|
85
|
-
if (!this.data.length || this.hasMissingValue(valueChanges)) {
|
|
86
|
-
this.animateToIndex = false;
|
|
87
|
-
this.data = this.service.data(value);
|
|
88
|
-
}
|
|
89
|
-
this.animateToIndex = this.animateToIndex && this.textHasChanged(valueChanges);
|
|
90
|
-
this.total = this.service.total(value);
|
|
91
|
-
this.indexToScroll = this.selectedIndex(value);
|
|
92
|
-
};
|
|
93
|
-
TimeListComponent.prototype.ngOnInit = function () {
|
|
94
|
-
var _this = this;
|
|
95
|
-
this.animateToIndex = true;
|
|
96
|
-
this.dom.ensureHeights();
|
|
97
|
-
this.itemHeight = this.dom.itemHeight;
|
|
98
|
-
this.listHeight = this.dom.timeListHeight;
|
|
99
|
-
this.topOffset = (this.listHeight - this.itemHeight) / 2;
|
|
100
|
-
this.bottomOffset = this.listHeight - this.itemHeight;
|
|
101
|
-
this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
|
|
102
|
-
this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
|
|
103
|
-
var translate = "translateY(" + this.topOffset + "px)";
|
|
104
|
-
this.style = { transform: translate, '-ms-transform': translate };
|
|
105
|
-
if (this.element) {
|
|
106
|
-
this.zone.runOutsideAngular(function () {
|
|
107
|
-
_this.bindEvents();
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
TimeListComponent.prototype.ngOnDestroy = function () {
|
|
112
|
-
this.scrollSubscription.unsubscribe();
|
|
113
|
-
this.domEvents.forEach(function (unbindCallback) { return unbindCallback(); });
|
|
114
|
-
};
|
|
115
|
-
TimeListComponent.prototype.ngAfterViewInit = function () {
|
|
116
|
-
var _this = this;
|
|
117
|
-
this.scrollOnce(function (index) { return _this.virtualization.scrollToIndex(index); });
|
|
118
|
-
};
|
|
119
|
-
TimeListComponent.prototype.ngAfterViewChecked = function () {
|
|
120
|
-
var _this = this;
|
|
121
|
-
this.scrollOnce(function (index) {
|
|
122
|
-
var action = _this.animateToIndex ? 'animateToIndex' : 'scrollToIndex';
|
|
123
|
-
_this.virtualization[action](index);
|
|
124
|
-
_this.animateToIndex = true;
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
TimeListComponent.prototype.handleChange = function (dataItem) {
|
|
128
|
-
var candidate = this.service.apply(this.value, dataItem.value);
|
|
129
|
-
if (this.value.getTime() === candidate.getTime()) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
this.indexToScroll = this.data.indexOf(dataItem);
|
|
133
|
-
this.value = candidate;
|
|
134
|
-
this.valueChange.emit(candidate);
|
|
135
|
-
};
|
|
136
|
-
TimeListComponent.prototype.handleItemClick = function (args) {
|
|
137
|
-
var item = dom_queries_1.closestInScope(args.target, function (node) { return node.hasAttribute('data-timelist-item-index'); }, this.element.nativeElement);
|
|
138
|
-
if (item) {
|
|
139
|
-
var index = item.getAttribute('data-timelist-item-index');
|
|
140
|
-
this.handleChange(this.data[index]);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Focuses the host element of the TimeList.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```ts
|
|
148
|
-
* _@Component({
|
|
149
|
-
* selector: 'my-app',
|
|
150
|
-
* template: `
|
|
151
|
-
* <button (click)="timelist.focus()">Focus TimeList</button>
|
|
152
|
-
* <kendo-timelist #timelist></kendo-timelist>
|
|
153
|
-
* `
|
|
154
|
-
* })
|
|
155
|
-
* export class AppComponent { }
|
|
156
|
-
* ```
|
|
157
|
-
*/
|
|
158
|
-
TimeListComponent.prototype.focus = function () {
|
|
159
|
-
if (!this.element) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
this.element.nativeElement.focus();
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Blurs the TimeList component.
|
|
166
|
-
*/
|
|
167
|
-
TimeListComponent.prototype.blur = function () {
|
|
168
|
-
if (!this.element) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
this.element.nativeElement.blur();
|
|
172
|
-
};
|
|
173
|
-
TimeListComponent.prototype.itemOffset = function (scrollTop) {
|
|
174
|
-
var valueIndex = this.selectedIndex(this.value);
|
|
175
|
-
var activeIndex = this.virtualization.activeIndex();
|
|
176
|
-
var offset = this.virtualization.itemOffset(activeIndex);
|
|
177
|
-
var distance = Math.abs(Math.ceil(scrollTop) - offset);
|
|
178
|
-
if (valueIndex === activeIndex && distance < SCROLL_THRESHOLD) {
|
|
179
|
-
return offset;
|
|
180
|
-
}
|
|
181
|
-
var scrollUp = valueIndex > activeIndex;
|
|
182
|
-
var moveToNext = scrollUp && distance >= this.bottomThreshold || !scrollUp && distance > this.topThreshold;
|
|
183
|
-
return moveToNext ? this.virtualization.itemOffset(activeIndex + 1) : offset;
|
|
184
|
-
};
|
|
185
|
-
TimeListComponent.prototype.hasMissingValue = function (_a) {
|
|
186
|
-
var previousValue = _a.previousValue, currentValue = _a.currentValue;
|
|
187
|
-
var isPreviousMissing = previousValue && !this.service.valueInList(previousValue);
|
|
188
|
-
var isCurrentMissing = currentValue && !this.service.valueInList(currentValue);
|
|
189
|
-
return isPreviousMissing || isCurrentMissing;
|
|
190
|
-
};
|
|
191
|
-
TimeListComponent.prototype.scrollOnce = function (action) {
|
|
192
|
-
if (this.indexToScroll !== -1) {
|
|
193
|
-
action(this.indexToScroll);
|
|
194
|
-
this.indexToScroll = -1;
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
TimeListComponent.prototype.serviceSettings = function (settings) {
|
|
198
|
-
var defaults = {
|
|
199
|
-
boundRange: false,
|
|
200
|
-
insertUndividedMax: false,
|
|
201
|
-
max: this.max,
|
|
202
|
-
min: this.min,
|
|
203
|
-
part: this.part,
|
|
204
|
-
step: this.step
|
|
205
|
-
};
|
|
206
|
-
var result = Object.assign({}, defaults, settings);
|
|
207
|
-
result.boundRange = result.part.type !== 'hour';
|
|
208
|
-
return result;
|
|
209
|
-
};
|
|
210
|
-
TimeListComponent.prototype.selectedIndex = function (value) {
|
|
211
|
-
if (!value) {
|
|
212
|
-
return -1;
|
|
213
|
-
}
|
|
214
|
-
return this.service.selectedIndex(value);
|
|
215
|
-
};
|
|
216
|
-
TimeListComponent.prototype.textHasChanged = function (_a) {
|
|
217
|
-
var previousValue = _a.previousValue, currentValue = _a.currentValue;
|
|
218
|
-
if (!previousValue || !currentValue) {
|
|
219
|
-
return false;
|
|
220
|
-
}
|
|
221
|
-
var oldData = this.data[this.selectedIndex(previousValue)];
|
|
222
|
-
var newData = this.data[this.selectedIndex(currentValue)];
|
|
223
|
-
return oldData && newData && oldData.text !== newData.text;
|
|
224
|
-
};
|
|
225
|
-
TimeListComponent.prototype.handleKeyDown = function (e) {
|
|
226
|
-
var getter = getters[e.keyCode] || nil;
|
|
227
|
-
var dataItem = getter(this.data, this.service.selectedIndex(this.value));
|
|
228
|
-
if (dataItem) {
|
|
229
|
-
this.handleChange(dataItem);
|
|
230
|
-
e.preventDefault();
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
TimeListComponent.prototype.bindEvents = function () {
|
|
234
|
-
var _this = this;
|
|
235
|
-
this.scrollSubscription = this.virtualization
|
|
236
|
-
.scroll$()
|
|
237
|
-
.pipe(operators_1.debounceTime(100), operators_1.map(function (e) { return e.target.scrollTop; }), operators_1.map(function (top) { return _this.itemOffset(top); }), operators_1.map(function (itemOffset) { return _this.virtualization.itemIndex(itemOffset); }))
|
|
238
|
-
.subscribe(function (index) {
|
|
239
|
-
_this.virtualization.scrollToIndex(index);
|
|
240
|
-
_this.handleChange(_this.data[index]);
|
|
241
|
-
});
|
|
242
|
-
var element = this.element.nativeElement;
|
|
243
|
-
this.domEvents.push(this.renderer.listen(element, 'mouseover', function () { return !_this.isActive && _this.focus(); }), this.renderer.listen(element, 'click', function () { return _this.focus(); }), this.renderer.listen(element, 'blur', function () { return _this.isActive = false; }), this.renderer.listen(element, 'focus', function () { return _this.isActive = true; }), this.renderer.listen(element, 'keydown', this.handleKeyDown.bind(this)));
|
|
244
|
-
};
|
|
245
|
-
tslib_1.__decorate([
|
|
246
|
-
core_1.Input(),
|
|
247
|
-
tslib_1.__metadata("design:type", Date)
|
|
248
|
-
], TimeListComponent.prototype, "min", void 0);
|
|
249
|
-
tslib_1.__decorate([
|
|
250
|
-
core_1.Input(),
|
|
251
|
-
tslib_1.__metadata("design:type", Date)
|
|
252
|
-
], TimeListComponent.prototype, "max", void 0);
|
|
253
|
-
tslib_1.__decorate([
|
|
254
|
-
core_1.Input(),
|
|
255
|
-
tslib_1.__metadata("design:type", Object)
|
|
256
|
-
], TimeListComponent.prototype, "part", void 0);
|
|
257
|
-
tslib_1.__decorate([
|
|
258
|
-
core_1.Input(),
|
|
259
|
-
tslib_1.__metadata("design:type", Number)
|
|
260
|
-
], TimeListComponent.prototype, "step", void 0);
|
|
261
|
-
tslib_1.__decorate([
|
|
262
|
-
core_1.Input(),
|
|
263
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
264
|
-
], TimeListComponent.prototype, "disabled", void 0);
|
|
265
|
-
tslib_1.__decorate([
|
|
266
|
-
core_1.Input(),
|
|
267
|
-
tslib_1.__metadata("design:type", Date)
|
|
268
|
-
], TimeListComponent.prototype, "value", void 0);
|
|
269
|
-
tslib_1.__decorate([
|
|
270
|
-
core_1.Output(),
|
|
271
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
272
|
-
], TimeListComponent.prototype, "valueChange", void 0);
|
|
273
|
-
tslib_1.__decorate([
|
|
274
|
-
core_1.ViewChild(virtualization_component_1.VirtualizationComponent, { static: true }),
|
|
275
|
-
tslib_1.__metadata("design:type", virtualization_component_1.VirtualizationComponent)
|
|
276
|
-
], TimeListComponent.prototype, "virtualization", void 0);
|
|
277
|
-
tslib_1.__decorate([
|
|
278
|
-
core_1.HostBinding("attr.tabindex"),
|
|
279
|
-
tslib_1.__metadata("design:type", Number),
|
|
280
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
281
|
-
], TimeListComponent.prototype, "tabIndex", null);
|
|
282
|
-
tslib_1.__decorate([
|
|
283
|
-
core_1.HostBinding("class.k-time-list"),
|
|
284
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
285
|
-
], TimeListComponent.prototype, "componentClass", void 0);
|
|
286
|
-
TimeListComponent = tslib_1.__decorate([
|
|
287
|
-
core_1.Component({
|
|
288
|
-
selector: 'kendo-timelist',
|
|
289
|
-
template: "\n <kendo-virtualization\n [skip]=\"skip\"\n [take]=\"total\"\n [total]=\"total\"\n [itemHeight]=\"itemHeight\"\n [maxScrollDifference]=\"listHeight\"\n [topOffset]=\"topOffset\"\n [bottomOffset]=\"bottomOffset\"\n class=\"k-time-container\"\n role=\"presentation\"\n tabindex=\"-1\"\n >\n <ul [ngStyle]=\"style\" class=\"k-reset\"\n [kendoEventsOutsideAngular]=\"{\n click: handleItemClick\n }\"\n [scope]=\"this\"\n >\n <li *ngFor=\"let item of data; let index = index;\" class=\"k-item\"\n [attr.data-timelist-item-index]=\"index\">\n <span>{{item.text}}</span>\n </li>\n </ul>\n </kendo-virtualization>\n "
|
|
290
|
-
}),
|
|
291
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
292
|
-
core_1.Injector,
|
|
293
|
-
dom_service_1.TimePickerDOMService,
|
|
294
|
-
core_1.Renderer2,
|
|
295
|
-
core_1.NgZone])
|
|
296
|
-
], TimeListComponent);
|
|
297
|
-
return TimeListComponent;
|
|
298
|
-
}());
|
|
299
|
-
exports.TimeListComponent = TimeListComponent;
|