@anglr/datetime 4.0.0 → 5.0.0-beta.20221017112052
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/changelog.md +75 -0
- package/date-fns/src/services/dateFnsDateApi.service.d.ts +4 -0
- package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js +11 -5
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
- package/es2015/moment/src/services/momentDateApi.service.js +9 -3
- package/es2015/moment/src/services/momentDateApi.service.js.map +1 -1
- package/es2015/src/index.js +13 -10
- package/es2015/src/index.js.map +1 -1
- package/es2015/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
- package/es2015/src/interfaces/dateTime/datetime.interface.js.map +1 -0
- package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
- package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
- package/es2015/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
- package/es2015/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
- package/es2015/src/interfaces/index.js +4 -0
- package/es2015/src/interfaces/index.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
- package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
- package/es2015/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
- package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
- package/es2015/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
- package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
- package/es2015/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
- package/es2015/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
- package/es2015/src/legacy/picker/components/picker/picker.component.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/components/pickerBase.component.js +4 -4
- package/es2015/src/legacy/picker/components/pickerBase.component.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
- package/es2015/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
- package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
- package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
- package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
- package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
- package/es2015/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/directives/index.js +0 -0
- package/es2015/src/legacy/picker/directives/index.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
- package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
- package/es2015/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
- package/es2015/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/interfaces.js +0 -0
- package/es2015/src/legacy/picker/interfaces.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
- package/es2015/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/misc/tokens.js +0 -0
- package/es2015/src/legacy/picker/misc/tokens.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/picker/modules/picker.module.js +10 -12
- package/es2015/src/legacy/picker/modules/picker.module.js.map +1 -0
- package/es2015/src/{picker → legacy/picker}/types.js +0 -0
- package/es2015/src/legacy/picker/types.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +8 -8
- package/es2015/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
- package/es2015/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
- package/es2015/src/legacy/selector/components/selector/selector.component.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
- package/es2015/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
- package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
- package/es2015/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
- package/es2015/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
- package/es2015/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
- package/es2015/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/interfaces.js +0 -0
- package/es2015/src/legacy/selector/interfaces.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
- package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/misc/tokens.js +0 -0
- package/es2015/src/legacy/selector/misc/tokens.js.map +1 -0
- package/{es2020/src → es2015/src/legacy}/selector/modules/basicSelector.module.js +4 -4
- package/es2015/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
- package/es2015/src/legacy/selector/modules/selector.module.js.map +1 -0
- package/es2015/src/{selector → legacy/selector}/types.js +0 -0
- package/es2015/src/legacy/selector/types.js.map +1 -0
- package/es2015/src/misc/enums.js +23 -0
- package/es2015/src/misc/enums.js.map +1 -0
- package/es2015/src/misc/tokens.js +4 -0
- package/es2015/src/misc/tokens.js.map +1 -1
- package/es2015/src/misc/types.js +2 -0
- package/es2015/src/misc/types.js.map +1 -0
- package/es2015/src/misc/utils.js +102 -0
- package/es2015/src/misc/utils.js.map +1 -0
- package/es2015/src/misc/validators.js +30 -0
- package/es2015/src/misc/validators.js.map +1 -1
- package/es2015/src/modules/datePipes.module.js +4 -4
- package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
- package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
- package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +191 -0
- package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
- package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +53 -0
- package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
- package/es2015/src/modules/dateTime/directives/index.js +4 -0
- package/es2015/src/modules/dateTime/directives/index.js.map +1 -0
- package/es2015/src/modules/dateTime/index.js +3 -0
- package/es2015/src/modules/dateTime/index.js.map +1 -0
- package/es2015/src/modules/dateTime/modules/dateTime.module.js +31 -0
- package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
- package/es2015/src/modules/dateTime/modules/index.js +2 -0
- package/es2015/src/modules/dateTime/modules/index.js.map +1 -0
- package/es2015/src/modules/index.js +3 -0
- package/es2015/src/modules/index.js.map +1 -0
- package/es2015/src/pipes/dateConvert.pipe.js +3 -3
- package/es2015/src/pipes/dateFormat.pipe.js +3 -3
- package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
- package/es2015/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
- package/es2015/src/services/dateApi/dateApi.interface.js.map +1 -0
- package/es2015/src/services/datePositionParser.service.js +3 -3
- package/es2015/src/services/dateTimeRelativeParser.service.js +3 -3
- package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -1
- package/es2015/src/services/dateValueProvider.service.js +3 -3
- package/es2015/src/services/dateValueProvider.service.js.map +1 -1
- package/es2015/src/services/index.js +1 -2
- package/es2015/src/services/index.js.map +1 -1
- package/es2020/date-fns/src/services/dateFnsDateApi.service.js +11 -5
- package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
- package/es2020/moment/src/services/momentDateApi.service.js +9 -3
- package/es2020/moment/src/services/momentDateApi.service.js.map +1 -1
- package/es2020/src/index.js +13 -10
- package/es2020/src/index.js.map +1 -1
- package/es2020/src/{misc → interfaces/dateTime}/datetime.interface.js +0 -0
- package/es2020/src/interfaces/dateTime/datetime.interface.js.map +1 -0
- package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +2 -0
- package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -0
- package/es2020/src/{services → interfaces/formatProvider}/formatProvider.interface.js +0 -0
- package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +1 -0
- package/es2020/src/interfaces/index.js +4 -0
- package/es2020/src/interfaces/index.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/components/clockTimePicker/clockTimePicker.component.js +4 -4
- package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.js +0 -0
- package/es2020/src/legacy/picker/components/clockTimePicker/clockTimePicker.interface.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.js +6 -6
- package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.js +0 -0
- package/es2020/src/legacy/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/components/monthPicker/monthPicker.component.js +5 -5
- package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.js +0 -0
- package/es2020/src/legacy/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.animations.js +0 -0
- package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/picker/picker.component.js +5 -5
- package/es2020/src/legacy/picker/components/picker/picker.component.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/components/pickerBase.component.js +4 -4
- package/es2020/src/legacy/picker/components/pickerBase.component.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/components/pickerImplBase.component.js +4 -4
- package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.js +8 -8
- package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
- package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.js +0 -0
- package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/components/yearPicker/yearPicker.component.js +5 -5
- package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.js +0 -0
- package/es2020/src/legacy/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/directives/index.js +0 -0
- package/es2020/src/legacy/picker/directives/index.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.js +3 -3
- package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.directive.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.js +0 -0
- package/es2020/src/legacy/picker/directives/loopScroll/loopScroll.interface.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js +3 -3
- package/es2020/src/legacy/picker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/interfaces.js +0 -0
- package/es2020/src/legacy/picker/interfaces.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/misc/datetimePicker.interface.js +0 -0
- package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/misc/tokens.js +0 -0
- package/es2020/src/legacy/picker/misc/tokens.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/picker/modules/picker.module.js +10 -12
- package/es2020/src/legacy/picker/modules/picker.module.js.map +1 -0
- package/es2020/src/{picker → legacy/picker}/types.js +0 -0
- package/es2020/src/legacy/picker/types.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js +8 -8
- package/es2020/src/legacy/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.animations.js +0 -0
- package/es2020/src/legacy/selector/components/selector/selector.component.animations.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/components/selector/selector.component.js +9 -9
- package/es2020/src/legacy/selector/components/selector/selector.component.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.js +6 -6
- package/es2020/src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +3 -3
- package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +5 -5
- package/es2020/src/legacy/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.js +5 -5
- package/es2020/src/legacy/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/selector/directives/datetimeValidator/datetimeValidator.directive.js +4 -4
- package/es2020/src/legacy/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +3 -3
- package/es2020/src/legacy/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/interfaces.js +0 -0
- package/es2020/src/legacy/selector/interfaces.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/misc/datetimeSelector.interface.js +0 -0
- package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/misc/tokens.js +0 -0
- package/es2020/src/legacy/selector/misc/tokens.js.map +1 -0
- package/{es2015/src → es2020/src/legacy}/selector/modules/basicSelector.module.js +4 -4
- package/es2020/src/legacy/selector/modules/basicSelector.module.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/modules/selector.module.js +6 -8
- package/es2020/src/legacy/selector/modules/selector.module.js.map +1 -0
- package/es2020/src/{selector → legacy/selector}/types.js +0 -0
- package/es2020/src/legacy/selector/types.js.map +1 -0
- package/es2020/src/misc/enums.js +23 -0
- package/es2020/src/misc/enums.js.map +1 -0
- package/es2020/src/misc/tokens.js +4 -0
- package/es2020/src/misc/tokens.js.map +1 -1
- package/es2020/src/misc/types.js +2 -0
- package/es2020/src/misc/types.js.map +1 -0
- package/es2020/src/misc/utils.js +101 -0
- package/es2020/src/misc/utils.js.map +1 -0
- package/es2020/src/misc/validators.js +30 -0
- package/es2020/src/misc/validators.js.map +1 -1
- package/es2020/src/modules/datePipes.module.js +4 -4
- package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +76 -0
- package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
- package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +190 -0
- package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
- package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +53 -0
- package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
- package/es2020/src/modules/dateTime/directives/index.js +4 -0
- package/es2020/src/modules/dateTime/directives/index.js.map +1 -0
- package/es2020/src/modules/dateTime/index.js +3 -0
- package/es2020/src/modules/dateTime/index.js.map +1 -0
- package/es2020/src/modules/dateTime/modules/dateTime.module.js +31 -0
- package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
- package/es2020/src/modules/dateTime/modules/index.js +2 -0
- package/es2020/src/modules/dateTime/modules/index.js.map +1 -0
- package/es2020/src/modules/index.js +3 -0
- package/es2020/src/modules/index.js.map +1 -0
- package/es2020/src/pipes/dateConvert.pipe.js +3 -3
- package/es2020/src/pipes/dateFormat.pipe.js +3 -3
- package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
- package/es2020/src/services/{dateApi.interface.js → dateApi/dateApi.interface.js} +0 -0
- package/es2020/src/services/dateApi/dateApi.interface.js.map +1 -0
- package/es2020/src/services/datePositionParser.service.js +3 -3
- package/es2020/src/services/dateTimeRelativeParser.service.js +3 -3
- package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -1
- package/es2020/src/services/dateValueProvider.service.js +3 -3
- package/es2020/src/services/dateValueProvider.service.js.map +1 -1
- package/es2020/src/services/index.js +1 -2
- package/es2020/src/services/index.js.map +1 -1
- package/moment/src/services/momentDateApi.service.d.ts +4 -0
- package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/index.d.ts +13 -10
- package/src/index.d.ts.map +1 -1
- package/src/{misc → interfaces/dateTime}/datetime.interface.d.ts +2 -2
- package/src/interfaces/dateTime/datetime.interface.d.ts.map +1 -0
- package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +32 -0
- package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts.map +1 -0
- package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts +0 -0
- package/src/{services → interfaces/formatProvider}/formatProvider.interface.d.ts.map +0 -0
- package/src/interfaces/index.d.ts +4 -0
- package/src/interfaces/index.d.ts.map +1 -0
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts +1 -1
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.component.html +0 -0
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/clockTimePicker/clockTimePicker.interface.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts +3 -3
- package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.component.d.ts.map +1 -1
- package/src/legacy/picker/components/dayPicker/dayPicker.component.html +21 -0
- package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/dayPicker/dayPicker.interfaces.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts +2 -2
- package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.component.d.ts.map +1 -1
- package/src/legacy/picker/components/monthPicker/monthPicker.component.html +13 -0
- package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/monthPicker/monthPicker.interfaces.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/picker/picker.component.animations.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/picker/picker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts +3 -3
- package/src/{picker → legacy/picker}/components/picker/picker.component.d.ts.map +1 -1
- package/src/legacy/picker/components/picker/picker.component.html +3 -0
- package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts +3 -3
- package/src/{picker → legacy/picker}/components/pickerBase.component.d.ts.map +1 -1
- package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts +3 -3
- package/src/{picker → legacy/picker}/components/pickerImplBase.component.d.ts.map +1 -1
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts +3 -3
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.component.html +0 -0
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.data.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/rollerTimePicker/rollerTimePicker.interface.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.css +0 -0
- package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts +2 -2
- package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.component.d.ts.map +1 -1
- package/src/legacy/picker/components/yearPicker/yearPicker.component.html +13 -0
- package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts +0 -0
- package/src/{picker → legacy/picker}/components/yearPicker/yearPicker.interfaces.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/directives/index.d.ts +0 -0
- package/src/{picker → legacy/picker}/directives/index.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts +1 -1
- package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.directive.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts +0 -0
- package/src/{picker → legacy/picker}/directives/loopScroll/loopScroll.interface.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
- package/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/interfaces.d.ts +0 -0
- package/src/{picker → legacy/picker}/interfaces.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts +2 -2
- package/src/{picker → legacy/picker}/misc/datetimePicker.interface.d.ts.map +1 -1
- package/src/{picker → legacy/picker}/misc/tokens.d.ts +0 -0
- package/src/{picker → legacy/picker}/misc/tokens.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/modules/picker.module.d.ts +1 -1
- package/src/{picker → legacy/picker}/modules/picker.module.d.ts.map +0 -0
- package/src/{picker → legacy/picker}/types.d.ts +0 -0
- package/src/{picker → legacy/picker}/types.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.css +0 -0
- package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts +5 -5
- package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.html +0 -0
- package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts +0 -0
- package/src/{selector → legacy/selector}/components/selector/selector.component.animations.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/components/selector/selector.component.css +0 -0
- package/src/{selector → legacy/selector}/components/selector/selector.component.d.ts +5 -4
- package/src/legacy/selector/components/selector/selector.component.d.ts.map +1 -0
- package/src/{selector → legacy/selector}/components/selector/selector.component.html +2 -2
- package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.css +0 -0
- package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +4 -4
- package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/components/simpleInputDateTime/simpleInputDateTime.component.html +0 -0
- package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +2 -2
- package/src/{selector → legacy/selector}/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +2 -2
- package/src/{selector → legacy/selector}/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +2 -2
- package/src/{selector → legacy/selector}/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts +1 -1
- package/src/{selector → legacy/selector}/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +2 -2
- package/src/{selector → legacy/selector}/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/interfaces.d.ts +0 -0
- package/src/{selector → legacy/selector}/interfaces.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts +1 -1
- package/src/{selector → legacy/selector}/misc/datetimeSelector.interface.d.ts.map +1 -1
- package/src/{selector → legacy/selector}/misc/tokens.d.ts +0 -0
- package/src/{selector → legacy/selector}/misc/tokens.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts +0 -0
- package/src/{selector → legacy/selector}/modules/basicSelector.module.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/modules/selector.module.d.ts +0 -0
- package/src/{selector → legacy/selector}/modules/selector.module.d.ts.map +0 -0
- package/src/{selector → legacy/selector}/types.d.ts +0 -0
- package/src/{selector → legacy/selector}/types.d.ts.map +0 -0
- package/src/misc/enums.d.ts +22 -0
- package/src/misc/enums.d.ts.map +1 -0
- package/src/misc/tokens.d.ts +6 -1
- package/src/misc/tokens.d.ts.map +1 -1
- package/src/misc/types.d.ts +11 -0
- package/src/misc/types.d.ts.map +1 -0
- package/src/misc/utils.d.ts +25 -0
- package/src/misc/utils.d.ts.map +1 -0
- package/src/misc/validators.d.ts +9 -1
- package/src/misc/validators.d.ts.map +1 -1
- package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +40 -0
- package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -0
- package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +97 -0
- package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -0
- package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +22 -0
- package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -0
- package/src/modules/dateTime/directives/index.d.ts +4 -0
- package/src/modules/dateTime/directives/index.d.ts.map +1 -0
- package/src/modules/dateTime/index.d.ts +3 -0
- package/src/modules/dateTime/index.d.ts.map +1 -0
- package/src/modules/dateTime/modules/dateTime.module.d.ts +13 -0
- package/src/modules/dateTime/modules/dateTime.module.d.ts.map +1 -0
- package/src/modules/dateTime/modules/index.d.ts +2 -0
- package/src/modules/dateTime/modules/index.d.ts.map +1 -0
- package/src/modules/index.d.ts +3 -0
- package/src/modules/index.d.ts.map +1 -0
- package/src/pipes/dateConvert.pipe.d.ts +1 -1
- package/src/pipes/dateFormat.pipe.d.ts +3 -2
- package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
- package/src/services/{dateApi.interface.d.ts → dateApi/dateApi.interface.d.ts} +4 -0
- package/src/services/dateApi/dateApi.interface.d.ts.map +1 -0
- package/src/services/dateTimeRelativeParser.service.d.ts +1 -1
- package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
- package/src/services/dateValueProvider.service.d.ts +2 -2
- package/src/services/dateValueProvider.service.d.ts.map +1 -1
- package/src/services/index.d.ts +1 -2
- package/src/services/index.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2015/src/misc/datetime.interface.js.map +0 -1
- package/es2015/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
- package/es2015/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
- package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
- package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
- package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
- package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
- package/es2015/src/picker/components/picker/picker.component.animations.js.map +0 -1
- package/es2015/src/picker/components/picker/picker.component.js.map +0 -1
- package/es2015/src/picker/components/pickerBase.component.js.map +0 -1
- package/es2015/src/picker/components/pickerImplBase.component.js.map +0 -1
- package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
- package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
- package/es2015/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
- package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
- package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
- package/es2015/src/picker/directives/index.js.map +0 -1
- package/es2015/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
- package/es2015/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
- package/es2015/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
- package/es2015/src/picker/interfaces.js.map +0 -1
- package/es2015/src/picker/misc/datetimePicker.interface.js.map +0 -1
- package/es2015/src/picker/misc/tokens.js.map +0 -1
- package/es2015/src/picker/modules/picker.module.js.map +0 -1
- package/es2015/src/picker/types.js.map +0 -1
- package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
- package/es2015/src/selector/components/selector/selector.component.animations.js.map +0 -1
- package/es2015/src/selector/components/selector/selector.component.js.map +0 -1
- package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
- package/es2015/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
- package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
- package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
- package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
- package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
- package/es2015/src/selector/interfaces.js.map +0 -1
- package/es2015/src/selector/misc/datetimeSelector.interface.js.map +0 -1
- package/es2015/src/selector/misc/tokens.js.map +0 -1
- package/es2015/src/selector/modules/basicSelector.module.js.map +0 -1
- package/es2015/src/selector/modules/selector.module.js.map +0 -1
- package/es2015/src/selector/types.js.map +0 -1
- package/es2015/src/services/dateApi.interface.js.map +0 -1
- package/es2015/src/services/formatProvider.interface.js.map +0 -1
- package/es2020/src/misc/datetime.interface.js.map +0 -1
- package/es2020/src/picker/components/clockTimePicker/clockTimePicker.component.js.map +0 -1
- package/es2020/src/picker/components/clockTimePicker/clockTimePicker.interface.js.map +0 -1
- package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +0 -1
- package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +0 -1
- package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +0 -1
- package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +0 -1
- package/es2020/src/picker/components/picker/picker.component.animations.js.map +0 -1
- package/es2020/src/picker/components/picker/picker.component.js.map +0 -1
- package/es2020/src/picker/components/pickerBase.component.js.map +0 -1
- package/es2020/src/picker/components/pickerImplBase.component.js.map +0 -1
- package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
- package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
- package/es2020/src/picker/components/rollerTimePicker/rollerTimePicker.interface.js.map +0 -1
- package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +0 -1
- package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +0 -1
- package/es2020/src/picker/directives/index.js.map +0 -1
- package/es2020/src/picker/directives/loopScroll/loopScroll.directive.js.map +0 -1
- package/es2020/src/picker/directives/loopScroll/loopScroll.interface.js.map +0 -1
- package/es2020/src/picker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
- package/es2020/src/picker/interfaces.js.map +0 -1
- package/es2020/src/picker/misc/datetimePicker.interface.js.map +0 -1
- package/es2020/src/picker/misc/tokens.js.map +0 -1
- package/es2020/src/picker/modules/picker.module.js.map +0 -1
- package/es2020/src/picker/types.js.map +0 -1
- package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +0 -1
- package/es2020/src/selector/components/selector/selector.component.animations.js.map +0 -1
- package/es2020/src/selector/components/selector/selector.component.js.map +0 -1
- package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +0 -1
- package/es2020/src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +0 -1
- package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +0 -1
- package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +0 -1
- package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +0 -1
- package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +0 -1
- package/es2020/src/selector/interfaces.js.map +0 -1
- package/es2020/src/selector/misc/datetimeSelector.interface.js.map +0 -1
- package/es2020/src/selector/misc/tokens.js.map +0 -1
- package/es2020/src/selector/modules/basicSelector.module.js.map +0 -1
- package/es2020/src/selector/modules/selector.module.js.map +0 -1
- package/es2020/src/selector/types.js.map +0 -1
- package/es2020/src/services/dateApi.interface.js.map +0 -1
- package/es2020/src/services/formatProvider.interface.js.map +0 -1
- package/src/misc/datetime.interface.d.ts.map +0 -1
- package/src/picker/components/dayPicker/dayPicker.component.html +0 -21
- package/src/picker/components/monthPicker/monthPicker.component.html +0 -13
- package/src/picker/components/picker/picker.component.html +0 -3
- package/src/picker/components/yearPicker/yearPicker.component.html +0 -13
- package/src/selector/components/selector/selector.component.d.ts.map +0 -1
- package/src/services/dateApi.interface.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.ts","../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAA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,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,GAAyB;QAE9C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,CAAC;;wHAlIQ,2BAA2B,kBAWhB,QAAQ;4GAXnB,2BAA2B,oFCjCxC,2vBAYM;2FDqBO,2BAA2B;kBAPvC,SAAS;+BAEI,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM;;0BAalC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker, PeriodData, YearData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {YearPickerCssClasses} from './yearPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: YearPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying year picker\n */\n@Component(\n{\n selector: 'date-time-year-picker',\n templateUrl: 'yearPicker.component.html',\n styleUrls: ['yearPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeYearPickerComponent<TDate = any> extends PickerBaseComponent<TDate, YearData<TDate>, YearPickerCssClasses> implements DateTimePicker<TDate, YearPickerCssClasses>\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Displayed decade period\n * @internal\n */\n public period: string = '';\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed decade to next decade\n * @param event - Event that occured\n * @internal\n */\n public nextDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(10);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed decade to previous decade\n * @param event - Event that occured\n * @internal\n */\n public previousDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(10);\n\n this.display(this.displayDate!);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n\n let year = this.displayDate.startOfYear().year();\n\n while(year % 10 !== 0)\n {\n year--;\n }\n\n this.displayDate.year(year).updateOriginal();\n\n this.periodData = [];\n\n for(let x = 0; x < 10; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n value: year\n });\n\n year++;\n this.displayDate.addYears(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n this.period = `${this.displayDate.year()} - ${this.displayDate.year() + 10}`;\n\n //set value if exists\n if(this._value && (this.displayDate.isSameDecade(this._value.from!) || this.displayDate.isSameDecade(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfYear().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameDecade(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameYear(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this.periodData[val.year() % 10];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousDecade($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{period}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextDecade($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div *ngFor=\"let year of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"select($event, year)\">{{year.value}}</div>\r\n</div>"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yearPicker.interfaces.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/yearPicker/yearPicker.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import {CommonPickerCssClasses} from '../../misc/datetimePicker.interface';\n\n/**\n * Specific css classes for year picker\n */\nexport interface YearPickerCssClasses extends CommonPickerCssClasses\n{\n}"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC","sourcesContent":["export * from './loopScroll/loopScroll.directive';\nexport * from './loopScroll/loopScroll.interface';\nexport * from './loopScrollData/loopScrollData.directive';\n"]}
|
|
@@ -182,15 +182,15 @@ export class LoopScrollDirective {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
LoopScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
186
|
-
LoopScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
185
|
+
LoopScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: LoopScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
186
|
+
LoopScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: LoopScrollDirective, selector: "[loopScroll]", inputs: { value: ["loopScroll", "value"], open: "open" }, outputs: { valueChange: "loopScrollChange" }, host: { listeners: { "scroll": "_handleScroll()" } }, queries: [{ propertyName: "items", predicate: LoopScrollDataDirective }], usesOnChanges: true, ngImport: i0 });
|
|
187
187
|
__decorate([
|
|
188
188
|
DebounceCall(18),
|
|
189
189
|
__metadata("design:type", Function),
|
|
190
190
|
__metadata("design:paramtypes", [Number, Boolean, Number, Number]),
|
|
191
191
|
__metadata("design:returntype", void 0)
|
|
192
192
|
], LoopScrollDirective.prototype, "_updateScroll", null);
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: LoopScrollDirective, decorators: [{
|
|
194
194
|
type: Directive,
|
|
195
195
|
args: [{
|
|
196
196
|
selector: '[loopScroll]'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopScroll.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/directives/loopScroll/loopScroll.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAa,MAAM,EAAE,SAAS,EAAgB,MAAM,eAAe,CAAC;AACvK,OAAO,EAAC,YAAY,EAAE,OAAO,E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,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAC;QAE5J,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACO,UAAU,CAAC,KAAa;QAE9B,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,UAAW,CAAC,MAAM,CAAC;QAEpD,IAAG,KAAK,GAAG,CAAC,EACZ;YACI,KAAK,GAAG,IAAI,CAAC,UAAW,CAAC,MAAM,GAAG,KAAK,CAAC;SAC3C;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,UAAW,CAAC,KAAK,CAAC,CAAC;QAErC,IAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,EAC1B;YACI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACrC;IACL,CAAC;;gHAtRQ,mBAAmB;oGAAnB,mBAAmB,wOA+EX,uBAAuB;;IA2KvC,YAAY,CAAC,EAAE,CAAC;;;;wDAMhB;2FAhQQ,mBAAmB;kBAJ/B,SAAS;mBACV;oBACI,QAAQ,EAAE,cAAc;iBAC3B;iGAmDc,KAAK;sBADf,KAAK;uBAAC,YAAY;gBAeZ,IAAI;sBADV,KAAK;gBASC,WAAW;sBADjB,MAAM;uBAAC,kBAAkB;gBAShB,KAAK;sBADd,eAAe;uBAAC,uBAAuB;gBA8H9B,aAAa;sBADtB,YAAY;uBAAC,QAAQ;gBA+CZ,aAAa","sourcesContent":["import {AfterContentInit, ContentChildren, Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, QueryList, SimpleChanges} from '@angular/core';\nimport {DebounceCall, isBlank, nameof} from '@jscrpt/common';\n\nimport {LoopScrollDataDirective} from '../loopScrollData/loopScrollData.directive';\n\n/**\n * Renders loop scroll for array of elements\n */\n@Directive(\n{\n selector: '[loopScroll]'\n})\nexport class LoopScrollDirective<TData = any> implements OnChanges, AfterContentInit\n{\n //######################### protected fields #########################\n\n /**\n * Item height that obtained\n */\n protected _itemHeight?: number;\n\n /**\n * Array of elements for scrolled stuff\n */\n protected _items?: LoopScrollDataDirective[];\n\n /**\n * Array of elements and data for scrolled stuff\n */ \n protected _dataItems?: LoopScrollDataDirective[];\n\n /**\n * Indication whether is loop scroll initialized\n */\n protected _initialized: boolean = false;\n\n /**\n * Count of cloned elements before or after\n */\n protected _clonedCount: number = 0;\n\n /**\n * Indication whether ignore scroll handle\n */\n protected _ignoreScrollHandle: boolean = false;\n\n /**\n * Indication whether skip value change\n */\n protected _skipValueChange: boolean = false;\n\n /**\n * Value that is being set in loop scroll\n */\n protected _value?: TData;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets value that is being set in loop scroll\n */\n @Input('loopScroll')\n public get value(): TData\n {\n return this._value!;\n }\n public set value(value: TData)\n {\n this._skipValueChange = this._value == value;\n this._value = value;\n }\n\n /**\n * Indication whether is currently selection scroll open\n */\n @Input()\n public open: boolean = false;\n\n //######################### public properties - outputs #########################\n\n /**\n * Occurs when current value of loop scroll changes\n */\n @Output('loopScrollChange')\n public valueChange: EventEmitter<TData> = new EventEmitter<TData>();\n\n //######################### protected properties - children #########################\n\n /**\n * Array of items that are loop scrolled\n */\n @ContentChildren(LoopScrollDataDirective)\n protected items?: QueryList<LoopScrollDataDirective>;\n\n //######################### constructor #########################\n constructor(protected _scrollElement: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(!this._initialized)\n {\n return;\n }\n\n const itemHeight = this._itemHeight ?? 1;\n\n if(nameof<LoopScrollDirective>('open') in changes)\n {\n if(this.open)\n {\n this._scrollElement.nativeElement.scrollTo({top: this._scrollElement.nativeElement.scrollTop - (2 * itemHeight), behavior: 'auto'});\n\n return;\n }\n\n if(nameof<LoopScrollDirective>('value') in changes)\n {\n const selectedItem = this._dataItems?.find(itm => itm.data == this.value);\n\n if(!selectedItem)\n {\n throw new Error('No item selected in loop scroll');\n }\n\n const selectedIndex = this._dataItems!.indexOf(selectedItem);\n\n this._scrollElement.nativeElement.scrollTo({top: (selectedIndex + this._clonedCount) * itemHeight, behavior: 'auto'});\n }\n else\n {\n this._scrollElement.nativeElement.scrollTo({top: this._scrollElement.nativeElement.scrollTop + (2 * itemHeight), behavior: 'auto'});\n }\n }\n else if(nameof<LoopScrollDirective>('value') in changes)\n {\n if(!this._skipValueChange)\n {\n this._ignoreScrollHandle = true;\n this._scrollElement.nativeElement.scrollTo({top: this._itemHeight! * (this._clonedCount + this._dataItems!.findIndex(itm => itm.data == this.value) + (this.open ? -2 : 0)), behavior: 'auto'});\n this._ignoreScrollHandle = false;\n }\n }\n\n this._skipValueChange = false;\n }\n\n //######################### public methods - implementation of AfterContentInit #########################\n \n /**\n * Called when content was initialized\n */\n public ngAfterContentInit(): void\n {\n this._items = this.items?.toArray();\n this._dataItems = this._items?.filter(itm => !itm.clone);\n\n if(!this._dataItems?.length)\n {\n this.items?.changes.subscribe(() =>\n {\n this._items = this.items?.toArray();\n this._dataItems = this._items?.filter(itm => !itm.clone);\n\n this._initialize();\n });\n\n return;\n }\n\n this._initialize();\n }\n\n //######################### protected methods #########################\n\n /**\n * Intialize default value\n */\n protected _initialize(): void\n {\n const cloned = this._items?.filter(itm => itm.clone) ?? [];\n this._clonedCount = cloned.length / 2;\n\n if(!this._dataItems?.length)\n {\n return;\n }\n\n this._dataItems.forEach(itm =>\n {\n if(isBlank(this._itemHeight))\n {\n this._itemHeight = itm.element.nativeElement.offsetHeight;\n\n return;\n }\n\n if(this._itemHeight != itm.element.nativeElement.offsetHeight)\n {\n throw new Error('All items inside of loop scroll should have same height');\n }\n });\n\n this._scrollElement.nativeElement.scrollTo({top: this._itemHeight! * (this._clonedCount + this._dataItems!.findIndex(itm => itm.data == this.value)), behavior: 'auto'});\n this._initialized = true;\n }\n\n /**\n * Handles scroll event\n */\n @HostListener('scroll')\n protected _handleScroll(): void\n {\n if(this._ignoreScrollHandle)\n {\n return;\n }\n\n requestAnimationFrame(() =>\n {\n if(!this._dataItems)\n {\n return;\n }\n\n const index = this._scrollElement.nativeElement.scrollTop / (this._itemHeight ?? 1);\n const dataIndex = index + (this.open ? 2 : 0) - this._clonedCount;\n const dataLength = (this._itemHeight ?? 1) * this._dataItems.length;\n\n if(index % 1 <= .2 || index % 1 >= .8)\n {\n this._scrollElement.nativeElement.querySelector('.selected')?.classList?.remove('selected');\n\n const roundIndex = Math.round(index);\n this._items![roundIndex + (this.open ? 2 : 0)].element.nativeElement.classList.add('selected');\n this._emitValue(dataIndex);\n }\n\n if(dataIndex <= -1)\n {\n this._updateScroll(dataLength, true, index, dataIndex);\n }\n else if(dataIndex >= (this._dataItems.length ?? 0))\n {\n this._updateScroll(dataLength, false, index, dataIndex);\n }\n });\n }\n\n /**\n * Updates scroll to be at full value of item\n * @param dataLength - Length of all data\n * @param add - Indication whether add or subtract length\n * @param index - Current index\n * @param dataIndex - Current index of data \n */\n @DebounceCall(18)\n protected _updateScroll(dataLength: number, add: boolean, index: number, dataIndex: number): void\n {\n this._scrollElement.nativeElement.scrollTo({top: (Math.round(index) * (this._itemHeight ?? 1)) + (add ? dataLength : (dataLength * -1)), behavior: 'auto'});\n\n this._emitValue(dataIndex);\n }\n\n /**\n * Emits value after scroll\n * @param index - Index of currently selected data item\n */\n protected _emitValue(index: number): void\n {\n index = Math.round(index) % this._dataItems!.length;\n \n if(index < 0)\n {\n index = this._dataItems!.length + index;\n }\n\n const item = this._dataItems![index];\n\n if(this.value != item.data)\n {\n this.value = item.data;\n this.valueChange.next(this.value);\n }\n }\n}"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopScroll.interface.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/directives/loopScroll/loopScroll.interface.ts"],"names":[],"mappings":"AAAA,gDAAgD","sourcesContent":["//FIXME: not used for now, maybe will be removed\n\n/**\n * Represents data for LoopScrollDirective\n */\nexport interface LoopScrollData<TData = any>\n{\n /**\n * Text to be displayed for item\n */\n displayText?: string;\n\n /**\n * Data that are stored per value\n */\n data?: TData;\n}"]}
|
package/es2015/src/{picker → legacy/picker}/directives/loopScrollData/loopScrollData.directive.js
RENAMED
|
@@ -13,9 +13,9 @@ export class LoopScrollDataDirective {
|
|
|
13
13
|
this.clone = false;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
LoopScrollDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
LoopScrollDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
LoopScrollDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: LoopScrollDataDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
17
|
+
LoopScrollDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: LoopScrollDataDirective, selector: "[loopScrollData]", inputs: { data: ["loopScrollData", "data"], clone: "clone" }, ngImport: i0 });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: LoopScrollDataDirective, decorators: [{
|
|
19
19
|
type: Directive,
|
|
20
20
|
args: [{
|
|
21
21
|
selector: '[loopScrollData]'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopScrollData.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/directives/loopScrollData/loopScrollData.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;;AAE3D;;GAEG;AAKH,MAAM,OAAO,uBAAuB;IAgBhC,iEAAiE;IACjE,YAAmB,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;QAPnD;;WAEG;QAEI,UAAK,GAAY,KAAK,CAAC;IAK9B,CAAC;;oHAnBQ,uBAAuB;wGAAvB,uBAAuB;2FAAvB,uBAAuB;kBAJnC,SAAS;mBACV;oBACI,QAAQ,EAAE,kBAAkB;iBAC/B;iGASU,IAAI;sBADV,KAAK;uBAAC,gBAAgB;gBAOhB,KAAK;sBADX,KAAK","sourcesContent":["import {Directive, ElementRef, Input} from '@angular/core';\n\n/**\n * Loop scroll data that are used inside LoopScrollDirective\n */\n@Directive(\n{\n selector: '[loopScrollData]'\n})\nexport class LoopScrollDataDirective<TData = any>\n{\n //######################### public properties - inputs #########################\n\n /**\n * Data for loop\n */\n @Input('loopScrollData')\n public data!: TData;\n\n /**\n * Indication that this node is clone\n */\n @Input()\n public clone: boolean = false;\n\n //######################### constructor #########################\n constructor(public element: ElementRef<HTMLElement>)\n {\n }\n}"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/legacy/picker/interfaces.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/dayPicker/dayPicker.interfaces';\nexport * from './components/monthPicker/monthPicker.interfaces';\nexport * from './components/yearPicker/yearPicker.interfaces';\nexport * from './components/rollerTimePicker/rollerTimePicker.interface';\nexport * from './misc/datetimePicker.interface';"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datetimePicker.interface.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/datetimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Dictionary} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DateApiObject} from '../../../services/dateApi/dateApi.interface';\n\n/**\n * Shared css classes for all pickers\n */\nexport interface CommonPickerCssClasses\n{\n /**\n * Period selection element wrapping displayed period and previous, next buttons\n */\n periodSelection: string;\n\n /**\n * Element used for switching period to previous one\n */\n previousPeriod: string;\n\n /**\n * Element used for switching period to next one\n */\n nextPeriod: string;\n\n /**\n * Element representing currently displayed period\n */\n periodValue: string;\n\n /**\n * Element wrapping displayed period data\n */\n periodData: string;\n\n /**\n * Element representing single datum for period item\n */\n periodDatum: string;\n\n /**\n * Name of css class that represents clickable items in picker\n */\n clickable: string;\n}\n\n/**\n * Css classes applied to datetime picker\n */\nexport interface DateTimePickerCssClasses\n{\n /**\n * Shared css classes for all pickers\n */\n pickerShared?: CommonPickerCssClasses;\n\n /**\n * Custom css classes specific for each picker type\n */\n pickerCustom?: Dictionary<object>;\n}\n\n/**\n * Defintion of datetime picker component options\n */\nexport interface DateTimePickerOptions<TPicker = any>\n{\n /**\n * Order of pickers, it's possible use less pickers as is defined in pickerPeriodsDefinition for example 'month,year'\n */\n pickerPeriodsOrder: string[]|string|null;\n\n /**\n * Definition of types for each period type for picker\n */\n pickerPeriodsDefinition: Dictionary<Type<TPicker>>;\n\n /**\n * Name of default period for picker that is displayed\n */\n defaultPeriod: string;\n\n /**\n * Css classes for date time picker\n */\n cssClasses: DateTimePickerCssClasses;\n}\n\n/**\n * Describes datetime picker component used for displaying and selecting value\n */\nexport interface DateTimePicker<TDate = any, TCssClasses = object>\n{\n /**\n * Gets current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: Observable<void>;\n\n /**\n * Occurs when user scales up\n */\n readonly scaleUp: Observable<TDate>;\n\n /**\n * Occurs when user scales down\n */\n readonly scaleDown: Observable<TDate>;\n\n /**\n * Sets css classes for picker, allowing to override defaults\n * @param cssClasses - Css classes to be set for picker\n */\n setCssClasses(cssClasses: TCssClasses): void;\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n setMinValue(value: TDate|null): void;\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n display(value: DateApiObject<TDate>): void;\n\n /**\n * Sets indication whether can go down\n * @param value - Indication whether can go down in period\n */\n setCanGoDown(value: boolean): void;\n\n /**\n * Sets indication whether can go up\n * @param value - Indication whether can go up in period\n */\n setCanGoUp(value: boolean): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}\n\n/**\n * Data that represents data for any picker type\n */\nexport interface PeriodData<TDate = any>\n{\n /**\n * Indication that this period item is active and selected\n */\n active: boolean;\n\n /**\n * Indication that this period item is disabled\n */\n disabled: boolean;\n\n /**\n * Date for this period item\n */\n date: TDate;\n}\n\n/**\n * Data that represents day in date picker\n */\nexport interface DayData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Indication that range is selected and this day is between selected dates\n */\n betweenActive: boolean;\n\n /**\n * Indication that this day is out of currently selected month\n */\n otherMonth: boolean;\n\n /**\n * Indication that this day is today\n */\n today: boolean;\n\n /**\n * Indication that this day is weekend day\n */\n weekend: boolean;\n\n /**\n * Day number of month\n */\n day: number;\n}\n\n/**\n * Data that represents month in date picker\n */\nexport interface MonthData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Name of month\n */\n name: string;\n}\n\n/**\n * Data that represents year in date picker\n */\nexport interface YearData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Value of year\n */\n value: number;\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAA+C,IAAI,cAAc,CAA6B,gCAAgC,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimePickerOptions} from './datetimePicker.interface';\n\n/**\n * Injection token used for obtaining datetime picker configuration\n */\nexport const DATE_TIME_PICKER_CONFIGURATION: InjectionToken<DateTimePickerOptions<any>> = new InjectionToken<DateTimePickerOptions<any>>('DATE_TIME_PICKER_CONFIGURATION');"]}
|
|
@@ -5,7 +5,7 @@ import { DateTimePickerComponent } from '../components/picker/picker.component';
|
|
|
5
5
|
import { DateTimeDayPickerComponent } from '../components/dayPicker/dayPicker.component';
|
|
6
6
|
import { DateTimeMonthPickerComponent } from '../components/monthPicker/monthPicker.component';
|
|
7
7
|
import { DateTimeYearPickerComponent } from '../components/yearPicker/yearPicker.component';
|
|
8
|
-
import { DatePipesModule } from '
|
|
8
|
+
import { DatePipesModule } from '../../../modules/datePipes.module';
|
|
9
9
|
import { DateTimeRollerTimePickerComponent } from '../components/rollerTimePicker/rollerTimePicker.component';
|
|
10
10
|
import { LoopScrollDataDirective, LoopScrollDirective } from '../directives';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
@@ -14,8 +14,8 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
*/
|
|
15
15
|
export class DateTimePickerModule {
|
|
16
16
|
}
|
|
17
|
-
DateTimePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
DateTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
17
|
+
DateTimePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
18
|
+
DateTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, declarations: [DateTimePickerComponent,
|
|
19
19
|
DateTimeRollerTimePickerComponent,
|
|
20
20
|
DateTimeDayPickerComponent,
|
|
21
21
|
DateTimeMonthPickerComponent,
|
|
@@ -27,15 +27,13 @@ DateTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
|
|
|
27
27
|
DatePipesModule,
|
|
28
28
|
CastPipesModule,
|
|
29
29
|
ClickOutsideModule], exports: [DateTimePickerComponent] });
|
|
30
|
-
DateTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
]] });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateTimePickerModule, decorators: [{
|
|
30
|
+
DateTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, imports: [AngularCommonModule,
|
|
31
|
+
CommonDynamicModule,
|
|
32
|
+
CommonUtilsModule,
|
|
33
|
+
DatePipesModule,
|
|
34
|
+
CastPipesModule,
|
|
35
|
+
ClickOutsideModule] });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, decorators: [{
|
|
39
37
|
type: NgModule,
|
|
40
38
|
args: [{
|
|
41
39
|
imports: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker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wBACjC,0BAA0B;wBAC1B,4BAA4B;wBAC5B,2BAA2B;wBAC3B,uBAAuB;wBACvB,mBAAmB;qBACtB;oBACD,OAAO,EACP;wBACI,uBAAuB;qBAC1B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule as AngularCommonModule} from '@angular/common';\nimport {CommonDynamicModule, CastPipesModule, ClickOutsideModule, CommonUtilsModule} from '@anglr/common';\n\nimport {DateTimePickerComponent} from '../components/picker/picker.component';\nimport {DateTimeDayPickerComponent} from '../components/dayPicker/dayPicker.component';\nimport {DateTimeMonthPickerComponent} from '../components/monthPicker/monthPicker.component';\nimport {DateTimeYearPickerComponent} from '../components/yearPicker/yearPicker.component';\nimport {DatePipesModule} from '../../../modules/datePipes.module';\nimport {DateTimeRollerTimePickerComponent} from '../components/rollerTimePicker/rollerTimePicker.component';\nimport {LoopScrollDataDirective, LoopScrollDirective} from '../directives';\n\n/**\n * Angular module for date time picker components\n */\n@NgModule(\n{\n imports:\n [\n AngularCommonModule,\n CommonDynamicModule,\n CommonUtilsModule,\n DatePipesModule,\n CastPipesModule,\n ClickOutsideModule,\n ],\n declarations:\n [\n DateTimePickerComponent,\n DateTimeRollerTimePickerComponent,\n DateTimeDayPickerComponent,\n DateTimeMonthPickerComponent,\n DateTimeYearPickerComponent,\n LoopScrollDataDirective,\n LoopScrollDirective,\n ],\n exports:\n [\n DateTimePickerComponent\n ]\n})\nexport class DateTimePickerModule\n{\n}"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/legacy/picker/types.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,eAAe,CAAC","sourcesContent":["export * from './components/picker/picker.component';\nexport * from './components/picker/picker.component.animations';\nexport * from './components/dayPicker/dayPicker.component';\nexport * from './components/monthPicker/monthPicker.component';\nexport * from './components/yearPicker/yearPicker.component';\nexport * from './components/rollerTimePicker/rollerTimePicker.component';\nexport * from './components/pickerBase.component';\nexport * from './components/pickerImplBase.component';\nexport * from './misc/tokens';"]}
|
package/es2015/src/{selector → legacy/selector}/components/inputDateTime/inputDateTime.component.js
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild } from '@angular/core';
|
|
2
2
|
import { isPresent } from '@jscrpt/common';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import { DATE_API } from '
|
|
5
|
-
import { DatePositionParserService } from '
|
|
6
|
-
import { DateValueProvider } from '
|
|
4
|
+
import { DATE_API } from '../../../../misc/tokens';
|
|
5
|
+
import { DatePositionParserService } from '../../../../services/datePositionParser.service';
|
|
6
|
+
import { DateValueProvider } from '../../../../services/dateValueProvider.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "
|
|
9
|
-
import * as i2 from "
|
|
8
|
+
import * as i1 from "../../../../services/datePositionParser.service";
|
|
9
|
+
import * as i2 from "../../../../services/dateValueProvider.service";
|
|
10
10
|
/**
|
|
11
11
|
* Component used as datetime selector with input
|
|
12
12
|
*/
|
|
@@ -424,9 +424,9 @@ export class InputDateTimeSelectorComponent {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
InputDateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
428
|
-
InputDateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
427
|
+
InputDateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: InputDateTimeSelectorComponent, deps: [{ token: DATE_API }, { token: i1.DatePositionParserService }, { token: i2.DateValueProvider }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
428
|
+
InputDateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: InputDateTimeSelectorComponent, selector: "input-date-time-selector", viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: InputDateTimeSelectorComponent, decorators: [{
|
|
430
430
|
type: Component,
|
|
431
431
|
args: [{ selector: 'input-date-time-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"] }]
|
|
432
432
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDateTime.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/inputDateTime/inputDateTime.component.ts","../../../../../../src/legacy/selector/components/inputDateTime/inputDateTime.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAAC,yBAAyB,EAAC,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAC,iBAAiB,EAAC,MAAM,gDAAgD,CAAC;;;;AAGjF;;GAEG;AAQH,MAAM,OAAO,8BAA8B;IAmLvC,iEAAiE;IACjE,YAAwC,QAAwB,EAC1C,UAAqC,EACrC,cAAwC,EACxC,eAAkC;QAHhB,aAAQ,GAAR,QAAQ,CAAgB;QAC1C,eAAU,GAAV,UAAU,CAA2B;QACrC,mBAAc,GAAd,cAAc,CAA0B;QACxC,oBAAe,GAAf,eAAe,CAAmB;QArLxD,sEAAsE;QAEtE;;WAEG;QACO,iBAAY,GAAkB,IAAI,OAAO,EAAQ,CAAC;QAE5D;;WAEG;QACO,aAAQ,GAAkB,IAAI,OAAO,EAAQ,CAAC;QAExD;;WAEG;QACO,mBAAc,GAAqB,IAAI,OAAO,EAAW,CAAC;QAEpE;;WAEG;QACO,YAAO,GAA4B,IAAI,CAAC;QAElD;;WAEG;QACO,YAAO,GAAW,EAAE,CAAC;QAE/B;;WAEG;QACO,kBAAa,GAA8B,IAAI,CAAC;QAE1D;;WAEG;QACO,aAAQ,GAAY,IAAI,CAAC;QAEnC;;WAEG;QACO,cAAS,GAAe,IAAI,CAAC;QAEvC;;WAEG;QACO,cAAS,GAAe,IAAI,CA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AAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;oBAErH,MAAM;iBACT;YACD,KAAK,GAAG;gBACR;oBACI,IAAI,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;oBAEzH,MAAM;iBACT;SACJ;IACL,CAAC;;2HA5iBQ,8BAA8B,kBAoLnB,QAAQ;+GApLnB,8BAA8B,qLCrB3C,iWASyC;2FDY5B,8BAA8B;kBAP1C,SAAS;+BAEI,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM;;0BAsLlC,MAAM;2BAAC,QAAQ;oJA5BrB,YAAY;sBADlB,SAAS;uBAAC,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject, DatePositionParser} from '../../../../services';\nimport {DatePositionParserService} from '../../../../services/datePositionParser.service';\nimport {DateValueProvider} from '../../../../services/dateValueProvider.service';\nimport {DateTimeSelector} from '../../misc/datetimeSelector.interface';\n\n/**\n * Component used as datetime selector with input\n */\n@Component(\n{\n selector: 'input-date-time-selector',\n templateUrl: 'inputDateTime.component.html',\n styleUrls: ['inputDateTime.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate>\n{\n //######################### protected fields #########################\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector is touched by user\n */\n protected _touched: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n protected _pickerRequest: Subject<boolean> = new Subject<boolean>();\n\n /**\n * Instance of parser created for specific format\n */\n protected _parser: DatePositionParser|null = null;\n\n /**\n * Currently used format for displaying data\n */\n protected _format: string = '';\n\n /**\n * Current value representation as date api wrapper\n */\n protected _dateApiValue: null|DateApiObject<TDate> = null;\n\n /**\n * Indication whether is current value valid value\n */\n protected _isValid: boolean = true;\n\n /**\n * Minimal possible value that can be picked\n */\n protected _minValue: TDate|null = null;\n\n /**\n * Maximal possible value that can be picked\n */\n protected _maxValue: TDate|null = null;\n\n //######################### public properties - implementation of DateTimeSelector #########################\n\n /**\n * Gets or sets currently used format for displaying data\n */\n public get format(): string\n {\n return this._format;\n }\n public set format(value: string)\n {\n if(isPresent(value))\n {\n value = this._dateApi.getFormat(value);\n }\n\n //only if format changes\n if(this._format != value)\n {\n this._parser = this._parserSvc.createParser(this._dateApi.getFormat(value));\n }\n\n this._format = value;\n }\n\n /**\n * Gets or sets placeholder that is displayed when there is no value selected\n */\n public placeholder: string|null = null;\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n if(!this._dateApiValue || !this._isValid)\n {\n return null;\n }\n\n return this._valueProvider.getValue(this._dateApiValue.value, this._format);\n }\n\n /**\n * Gets formatted value\n */\n public get formattedValue(): string|null\n {\n if(!this._isValid)\n {\n return null;\n }\n\n return this.currentValue;\n }\n\n /**\n * Gets indication whether is current value valid\n */\n public get valid(): boolean\n {\n return this._isValid;\n }\n\n /**\n * Occurs when value changes\n */\n public get valueChange(): Observable<void>\n {\n return this._valueChange.asObservable();\n }\n\n /**\n * Occurs when selector is touched by user\n */\n public get touched(): Observable<void>\n {\n return this._touched.asObservable();\n }\n\n /**\n * Occurs when selector requires picker to be displayed\n */\n public get pickerRequest(): Observable<boolean>\n {\n return this._pickerRequest.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Indication whether is input disabled\n * @internal\n */\n public disabled: boolean = false;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of html input element\n * @internal\n */\n @ViewChild('input', {static: true})\n public inputElement!: ElementRef<HTMLInputElement>;\n\n //######################### protected properties #########################\n\n /**\n * Gets or sets string representation current of value\n */\n protected get currentValue(): string|null\n {\n return this.input.value || null;\n }\n protected set currentValue(value: string|null)\n {\n if(this.input)\n {\n this.input.value = value ?? '';\n }\n }\n\n /**\n * Gets input element used for handling date time value\n */\n protected get input(): HTMLInputElement\n {\n return this.inputElement.nativeElement;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _parserSvc: DatePositionParserService,\n protected _valueProvider: DateValueProvider<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of DateTimeSelector #########################\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n public setMinValue(value: TDate|null): void\n {\n this._minValue = value;\n }\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n public setMaxValue(value: TDate|null): void\n {\n this._maxValue = value;\n }\n\n /**\n * Sets value of datetime selector\n * @param value - Value to be set to this selector\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n if(value?.from)\n {\n this._dateApiValue = this._dateApi.getValue(value?.from, this._format);\n this._isValid = this._dateApiValue.isValid();\n \n this._show();\n }\n else\n {\n this._clearValue();\n }\n }\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n public setDisabled(disabled: boolean = true): void\n {\n this.disabled = disabled;\n }\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n public invalidateVisuals(): void\n {\n this._changeDetector.detectChanges();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles gaining of focus\n * @internal\n */\n public handleFocus(): void\n {\n this._pickerRequest.next(true);\n\n //no value\n if(!this._dateApiValue)\n {\n this._dateApiValue = this._dateApi.now();\n this._isValid = this._dateApiValue.isValid();\n\n if(this._minMaxConstraintTest())\n {\n this._clearValue();\n }\n else\n {\n this._valueChange.next();\n }\n }\n\n if(!this._isValid)\n {\n return;\n }\n\n this._show();\n\n const result = this._parser!.parse(this.currentValue!, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n /**\n * Handles blur on input\n * @internal\n */\n public handleBlur(): void\n {\n this._pickerRequest.next(false);\n }\n\n /**\n * Handles user input\n * @internal\n */\n public handleInput(): void\n {\n //empty value\n if(!this.currentValue)\n {\n this._clearValue();\n this._valueChange.next();\n\n return;\n }\n\n this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);\n this._isValid = this._dateApiValue.isValid();\n this._valueChange.next();\n }\n\n /**\n * Handles selection of text inside of input\n * @internal\n */\n public handleSelect(): void\n {\n //handles when all text is selected\n if(this.currentValue && this.input.selectionStart == 0 && this.input.selectionEnd == this.input.value.length)\n {\n const result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n }\n\n /**\n * Handles click event inside of input\n * @internal\n */\n public handleClick(): void\n {\n this._pickerRequest.next(true);\n\n if(!this._dateApiValue)\n {\n return;\n }\n\n const result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n * @param input - Html input element that holds current value and selection\n * @internal\n */\n public handleKeyboard(event: KeyboardEvent): void\n {\n if(!this._dateApiValue?.isValid())\n {\n return;\n }\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n\n const result = event.key == 'ArrowLeft' ? this._parser!.previous(this.input.value, this.input.selectionStart!) : this._parser!.next(this.input.value, this.input.selectionStart!);\n\n if(result)\n {\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n\n let result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n const selectionStart = result.positionFrom;\n\n this._stepChangeValue(result.part, event.key == 'ArrowUp');\n this._show();\n\n result = this._parser!.parse(this.input.value, selectionStart);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n\n break;\n }\n case 'Tab':\n {\n const result = event.shiftKey ? this._parser!.previous(this.input.value, this.input.selectionStart!) : this._parser!.next(this.input.value, this.input.selectionStart!);\n\n if(result)\n {\n event.preventDefault();\n event.stopPropagation();\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n break;\n }\n case 'a':\n {\n if(event.ctrlKey)\n {\n event.preventDefault();\n event.stopPropagation();\n }\n\n break;\n }\n case 'Backspace':\n {\n this._clearValue();\n this._valueChange.next();\n\n break;\n }\n case 'Escape':\n {\n this._pickerRequest.next(false);\n\n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this._pickerRequest.next(true);\n }\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows current value in input\n */\n protected _show(): void\n {\n if(this._isValid)\n {\n this.currentValue = this._dateApiValue?.format(this._format) ?? null;\n }\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n */\n protected _minMaxConstraintTest(): boolean\n {\n return (!!this._minValue && this._dateApiValue!.isBefore(this._minValue)) ||\n (!!this._maxValue && this._dateApiValue!.isAfter(this._maxValue));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param code - Code that should be executed which can change current value\n */\n protected _withMinMaxConstraint(code: () => void): void\n {\n this._dateApiValue!.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this._minMaxConstraintTest())\n {\n this._dateApiValue?.resetOriginal();\n\n return;\n }\n\n this._valueChange.next();\n }\n\n /**\n * Clears current value\n */\n protected _clearValue(): void\n {\n this._dateApiValue = null;\n this._isValid = true;\n this.currentValue = null;\n }\n\n /**\n * Changes current value of date for for specified part by single step\n * @param part - Part of date that should be changed\n * @param increment - Indication whether value should be incremented or decremented\n */\n protected _stepChangeValue(part: string, increment: boolean): void\n {\n if(!this._dateApiValue?.isValid())\n {\n return;\n }\n\n switch(part)\n {\n case 'y':\n case 'Y':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addYears(1) : this._dateApiValue!.subtractYears(1));\n\n break;\n }\n case 'Q':\n {\n break;\n }\n case 'M':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addMonths(1) : this._dateApiValue!.subtractMonths(1));\n\n break;\n }\n case 'w':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addWeeks(1) : this._dateApiValue!.subtractWeeks(1));\n\n break;\n }\n case 'd':\n case 'D':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addDays(1) : this._dateApiValue!.subtractDays(1));\n\n break;\n }\n case 'H':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addHours(1) : this._dateApiValue!.subtractHours(1));\n\n break;\n }\n case 'm':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addMinutes(1) : this._dateApiValue!.subtractMinutes(1));\n\n break;\n }\n }\n }\n}","<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">"]}
|
package/es2015/src/{selector → legacy/selector}/components/selector/selector.component.animations.js
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.component.animations.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/selector/selector.component.animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC,wBAAwB,EAC7E;IACI,UAAU,CAAC,QAAQ,EACnB;QACI,YAAY,EAAE;QACd,kCAAkC;KACrC,CAAC;IACF,UAAU,CAAC,QAAQ,EACnB;QACI,YAAY,EAAE;QACd,kCAAkC;KACrC,CAAC;CACL,CAAC,CAAC","sourcesContent":["import {animateChild, transition, trigger} from '@angular/animations';\n\n/**\n * Animation trigger for animating children on enter leave\n */\nexport const enterLeaveAnimateChildTrigger = trigger('enterLeaveAnimateChild',\n[\n transition(':enter', \n [\n animateChild()\n // query(':enter', animateChild())\n ]),\n transition(':leave', \n [\n animateChild()\n // query(':leave', animateChild())\n ])\n]);"]}
|
|
@@ -2,18 +2,18 @@ import { Component, ChangeDetectionStrategy, Input, Inject, Optional, ChangeDete
|
|
|
2
2
|
import { PositionPlacement } from '@anglr/common';
|
|
3
3
|
import { extend, isBlank, isString, nameof } from '@jscrpt/common';
|
|
4
4
|
import { Subject, Subscription } from 'rxjs';
|
|
5
|
-
import { DATE_API, FORMAT_PROVIDER } from '
|
|
5
|
+
import { DATE_API, FORMAT_PROVIDER } from '../../../../misc/tokens';
|
|
6
6
|
import { DateTimeDayPickerComponent } from '../../../picker/components/dayPicker/dayPicker.component';
|
|
7
7
|
import { DateTimeMonthPickerComponent } from '../../../picker/components/monthPicker/monthPicker.component';
|
|
8
8
|
import { DateTimeYearPickerComponent } from '../../../picker/components/yearPicker/yearPicker.component';
|
|
9
|
-
import { DateValueProvider } from '
|
|
9
|
+
import { DateValueProvider } from '../../../../services/dateValueProvider.service';
|
|
10
10
|
import { DATE_TIME_SELECTOR_CONFIGURATION } from '../../misc/tokens';
|
|
11
11
|
import { InputDateTimeSelectorComponent } from '../inputDateTime/inputDateTime.component';
|
|
12
12
|
import { enterLeaveAnimateChildTrigger } from './selector.component.animations';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "
|
|
15
|
-
import * as i2 from "@
|
|
16
|
-
import * as i3 from "@
|
|
14
|
+
import * as i1 from "../../../../services/dateValueProvider.service";
|
|
15
|
+
import * as i2 from "@angular/common";
|
|
16
|
+
import * as i3 from "@anglr/common";
|
|
17
17
|
import * as i4 from "../../directives/dateTimePickerRenderer/dateTimePickerRenderer.directive";
|
|
18
18
|
//TODO - add support for body absolute picker
|
|
19
19
|
/**
|
|
@@ -327,11 +327,11 @@ export class DateTimeSelectorComponent {
|
|
|
327
327
|
return this._value.from;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
DateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
331
|
-
DateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
330
|
+
DateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorComponent, deps: [{ token: DATE_TIME_SELECTOR_CONFIGURATION, optional: true }, { token: i1.DateValueProvider }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: DATE_API }, { token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Component });
|
|
331
|
+
DateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeSelectorComponent, selector: "date-time-selector", inputs: { format: "format", placeholder: "placeholder", options: "options", minValue: "minValue", maxValue: "maxValue" }, usesOnChanges: true, ngImport: i0, template: "<ng-template [ngComponentOutletEx]=\"activeSelectorComponent!\" (ngComponentOutletExCreated)=\"selectorCreated($event!)\"></ng-template>\r\n\r\n<ng-template [ngIf]=\"!options.pickerDisabled && pickerVisible\">\r\n <ng-template [dateTimePicker]=\"value\"\r\n [minValue]=\"min\"\r\n [maxValue]=\"max\"\r\n [options]=\"options\"\r\n [selectorElement]=\"element\"\r\n (valueChange)=\"pickerChangedValue($event)\"></ng-template>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: relative;\r\n}\r\n\r\ndate-time-picker\r\n{\r\n position: absolute;\r\n top: 100%;\r\n}"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgComponentOutletEx, selector: "[ngComponentOutletEx]", inputs: ["ngComponentOutletEx", "ngComponentOutletExInjector", "ngComponentOutletExContent"], outputs: ["ngComponentOutletExCreated"], exportAs: ["ngComponentOutletEx"] }, { kind: "directive", type: i4.DateTimePickerRendererDirective, selector: "[dateTimePicker]", inputs: ["options", "dateTimePicker", "minValue", "maxValue", "selectorElement"], outputs: ["valueChange"] }], animations: [enterLeaveAnimateChildTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeSelectorComponent, decorators: [{
|
|
333
333
|
type: Component,
|
|
334
|
-
args: [{ selector: 'date-time-selector', animations: [enterLeaveAnimateChildTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngComponentOutletEx]=\"activeSelectorComponent
|
|
334
|
+
args: [{ selector: 'date-time-selector', animations: [enterLeaveAnimateChildTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngComponentOutletEx]=\"activeSelectorComponent!\" (ngComponentOutletExCreated)=\"selectorCreated($event!)\"></ng-template>\r\n\r\n<ng-template [ngIf]=\"!options.pickerDisabled && pickerVisible\">\r\n <ng-template [dateTimePicker]=\"value\"\r\n [minValue]=\"min\"\r\n [maxValue]=\"max\"\r\n [options]=\"options\"\r\n [selectorElement]=\"element\"\r\n (valueChange)=\"pickerChangedValue($event)\"></ng-template>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: relative;\r\n}\r\n\r\ndate-time-picker\r\n{\r\n position: absolute;\r\n top: 100%;\r\n}"] }]
|
|
335
335
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
336
336
|
type: Optional
|
|
337
337
|
}, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/selector/selector.component.ts","../../../../../../src/legacy/selector/components/selector/selector.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAqD,iBAAiB,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAC5K,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAa,OAAO,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAGvD,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAC,0BAA0B,EAAC,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAC,4BAA4B,EAAC,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAC,2BAA2B,EAAC,MAAM,4DAA4D,CAAC;AAEvG,OAAO,EAAC,iBAAiB,EAAC,MAAM,gDAAgD,CAAC;AAEjF,OAAO,EAAC,gCAAgC,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,8BAA8B,EAAC,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;;;;;;AAG9E,6CAA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OnChanges, SimpleChanges, ChangeDetectorRef, ElementRef} from '@angular/core';\nimport {PositionPlacement} from '@anglr/common';\nimport {extend, isBlank, isString, nameof} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateTimeDayPickerComponent} from '../../../picker/components/dayPicker/dayPicker.component';\nimport {DateTimeMonthPickerComponent} from '../../../picker/components/monthPicker/monthPicker.component';\nimport {DateTimeYearPickerComponent} from '../../../picker/components/yearPicker/yearPicker.component';\nimport {DateApi} from '../../../../services';\nimport {DateValueProvider} from '../../../../services/dateValueProvider.service';\nimport {DateTimeSelector, DateTimeSelectorOptions} from '../../misc/datetimeSelector.interface';\nimport {DATE_TIME_SELECTOR_CONFIGURATION} from '../../misc/tokens';\nimport {InputDateTimeSelectorComponent} from '../inputDateTime/inputDateTime.component';\nimport {enterLeaveAnimateChildTrigger} from './selector.component.animations';\nimport {FormatProvider} from '../../../../interfaces';\n\n//TODO - add support for body absolute picker\n\n/**\n * Default configuration for selector\n */\nconst defaultConfiguration: DateTimeSelectorOptions<DateTimeSelector> =\n{\n selectorComponent: InputDateTimeSelectorComponent,\n pickerCloseOnValueSelect: false,\n pickerDisabled: false,\n pickerAbsolute: true,\n pickerAbsoluteContainer: 'body',\n positionOptions:\n {\n flip: true,\n placement: PositionPlacement.BottomStart,\n autoUpdate: true\n },\n defaultPeriod: 'day',\n pickerPeriodsOrder: null,\n pickerPeriodsDefinition:\n {\n 'day': DateTimeDayPickerComponent,\n 'month': DateTimeMonthPickerComponent,\n 'year': DateTimeYearPickerComponent\n },\n cssClasses:\n {\n }\n};\n\n/**\n * Component used for displaying and selecting date time\n */\n@Component(\n{\n selector: 'date-time-selector',\n templateUrl: 'selector.component.html',\n styleUrls: ['selector.component.css'],\n animations: [enterLeaveAnimateChildTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeSelectorComponent<TDate = any> implements OnInit, OnChanges ,OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Current value of datetime\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * Occurs when selector is touched by user\n */\n protected _touched: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n\n /**\n * Indication whether is control disabled\n */\n protected _disabled: boolean = false;\n\n /**\n * Instance of active date time selector\n */\n protected _activeSelector?: DateTimeSelector<TDate>;\n\n /**\n * All subscriptions for active selector\n */\n protected _activeSelectorSubscriptions: Subscription = new Subscription();\n\n /**\n * Subscription for changes of min value selector\n */\n protected _minValueChangeSubscription: Subscription|null = null;\n\n /**\n * Subscription for changes of max value selector\n */\n protected _maxValueChangeSubscription: Subscription|null = null;\n\n /**\n * Current options used by selector\n */\n protected _options: DateTimeSelectorOptions<DateTimeSelector<TDate>>;\n\n /**\n * Placeholder that is displayed when there is no value selected\n */\n protected _placeholder?: string;\n\n //######################### public properties #########################\n\n /**\n * Gets or sets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n return this._value;\n }\n public set value(value: DateTimeValue<TDate>|null)\n {\n this._value = value;\n\n this._activeSelector?.setValue(this._value);\n }\n\n /**\n * Gets indication whether is current value valid\n */\n public get valid(): boolean\n {\n return this._activeSelector?.valid ?? true;\n }\n\n /**\n * Gets or sets formatted value\n */\n public get formattedValue(): string|null\n {\n return this._activeSelector?.formattedValue ?? null;\n }\n public set formattedValue(value: string|null)\n {\n if(value)\n {\n const val = this._dateApi.getValue(value, this.format);\n this.value = this._valueProvider.getValue(val.value, this.format);\n }\n else\n {\n this.value = null;\n }\n }\n\n /**\n * Occurs when selector is touched by user\n */\n public get touched(): Observable<void>\n {\n return this._touched.asObservable();\n }\n\n /**\n * Occurs when value changes\n */\n public get valueChange(): Observable<void>\n {\n return this._valueChange.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Currently active date time selector component type\n * @internal\n */\n public activeSelectorComponent!: Type<DateTimeSelector<TDate>>;\n\n /**\n * Indication whether is picker visible or not\n * @internal\n */\n public pickerVisible: boolean = false;\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n public min: TDate|null = null;\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n public max: TDate|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Format of displayed\n */\n @Input()\n public format: string;\n\n /**\n * Gets or sets placeholder that is displayed when there is no value selected\n */\n @Input()\n public get placeholder(): string|undefined\n {\n return this._placeholder;\n }\n public set placeholder(value: string|undefined)\n {\n this._placeholder = value;\n\n if(this._activeSelector)\n {\n this._activeSelector.placeholder = this._placeholder ?? null;\n\n this._activeSelector.invalidateVisuals();\n }\n }\n\n /**\n * Current options used by selector\n */\n @Input()\n public get options(): Partial<DateTimeSelectorOptions<DateTimeSelector<TDate>>>\n {\n return this._options;\n }\n public set options(value: Partial<DateTimeSelectorOptions<DateTimeSelector<TDate>>>)\n {\n this._options = extend(true, this._options, value);\n // without deep-copy for this attribute\n if (value?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = value.pickerPeriodsDefinition;\n }\n }\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n @Input()\n public get minValue(): TDate|string|null|DateTimeSelectorComponent<TDate>\n {\n return this.min;\n }\n public set minValue(value: TDate|string|null|DateTimeSelectorComponent<TDate>)\n {\n this._minValueChangeSubscription?.unsubscribe();\n this._minValueChangeSubscription = null;\n\n if(isBlank(value))\n {\n this.min = null;\n }\n else if(isString(value))\n {\n const date = this._dateApi.getValue(value);\n\n if(date.isValid())\n {\n this.min = date.value;\n }\n }\n else if(value instanceof DateTimeSelectorComponent)\n {\n this.min = value.valueOf();\n\n this._minValueChangeSubscription = value.valueChange.subscribe(() =>\n {\n this.min = value.valueOf();\n this._activeSelector?.setMinValue(this.min);\n\n this._changeDetector.detectChanges();\n });\n }\n else\n {\n this.min = value;\n }\n\n this._activeSelector?.setMinValue(this.min);\n }\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n @Input()\n public get maxValue(): TDate|string|null|DateTimeSelectorComponent<TDate>\n {\n return this.max;\n }\n public set maxValue(value: TDate|string|null|DateTimeSelectorComponent<TDate>)\n {\n this._maxValueChangeSubscription?.unsubscribe();\n this._maxValueChangeSubscription = null;\n\n if(isBlank(value))\n {\n this.max = null;\n }\n else if(isString(value))\n {\n const date = this._dateApi.getValue(value);\n\n if(date.isValid())\n {\n this.max = date.value;\n }\n }\n else if(value instanceof DateTimeSelectorComponent)\n {\n this.max = value.valueOf();\n\n this._maxValueChangeSubscription = value.valueChange.subscribe(() =>\n {\n this.max = value.valueOf();\n this._activeSelector?.setMaxValue(this.max);\n\n this._changeDetector.detectChanges();\n });\n }\n else\n {\n this.max = value;\n }\n\n this._activeSelector?.setMaxValue(this.max);\n }\n\n //######################### constructor #########################\n constructor(@Optional() @Inject(DATE_TIME_SELECTOR_CONFIGURATION) configuration: Partial<DateTimeSelectorOptions<DateTimeSelector<TDate>>>,\n protected _valueProvider: DateValueProvider<TDate>,\n protected _changeDetector: ChangeDetectorRef,\n public element: ElementRef<HTMLElement>,\n @Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider)\n {\n this.format = formatProvider.date;\n this._options = extend(true, {}, defaultConfiguration, configuration);\n // without deep-copy for this attribute\n if (configuration?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = configuration.pickerPeriodsDefinition;\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.activeSelectorComponent = this._options.selectorComponent;\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<DateTimeSelectorComponent>('format') in changes && this._activeSelector)\n {\n this._activeSelector.format = this.format;\n this._activeSelector.invalidateVisuals();\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._activeSelectorSubscriptions.unsubscribe();\n\n this._minValueChangeSubscription?.unsubscribe();\n this._minValueChangeSubscription = null;\n\n this._maxValueChangeSubscription?.unsubscribe();\n this._maxValueChangeSubscription = null;\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles created or destroyed date time selector instance\n * @param selector - Instance of selector or null\n * @internal\n */\n public selectorCreated(selector: DateTimeSelector<TDate>): void\n {\n this._activeSelector = selector;\n\n this._activeSelectorSubscriptions.unsubscribe();\n this._activeSelectorSubscriptions = new Subscription();\n\n this._activeSelectorSubscriptions.add(selector.touched.subscribe(() => this._touched.next()));\n this._activeSelectorSubscriptions.add(selector.pickerRequest.subscribe(visible => this.pickerVisible = visible));\n\n this._activeSelectorSubscriptions.add(selector.valueChange.subscribe(() =>\n {\n this._value = selector.value;\n this._valueChange.next();\n }));\n\n selector.format = this.format;\n selector.setMaxValue(this.max);\n selector.setMinValue(this.min);\n selector.setValue(this._value);\n selector.setDisabled(this._disabled);\n selector.placeholder = this._placeholder ?? null;\n\n selector.invalidateVisuals();\n }\n\n /**\n * Handles changed value by picker\n * @param value - Value that was changed\n * @internal\n */\n public pickerChangedValue(value: DateTimeValue<TDate>): void\n {\n this._activeSelector?.setValue(value);\n this._value = value;\n this._valueChange.next();\n\n if(this._options.pickerCloseOnValueSelect)\n {\n this.pickerVisible = false;\n }\n }\n\n //######################### public methods #########################\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n public setDisabled(disabled: boolean = true): void\n {\n this._disabled = disabled;\n this._activeSelector?.setDisabled(disabled);\n this._activeSelector?.invalidateVisuals();\n }\n\n /**\n * Gets simple value of selector\n */\n public valueOf(): TDate|null\n {\n if(!this._value)\n {\n return null;\n }\n\n return this._value.from!;\n }\n}\n","<ng-template [ngComponentOutletEx]=\"activeSelectorComponent!\" (ngComponentOutletExCreated)=\"selectorCreated($event!)\"></ng-template>\r\n\r\n<ng-template [ngIf]=\"!options.pickerDisabled && pickerVisible\">\r\n <ng-template [dateTimePicker]=\"value\"\r\n [minValue]=\"min\"\r\n [maxValue]=\"max\"\r\n [options]=\"options\"\r\n [selectorElement]=\"element\"\r\n (valueChange)=\"pickerChangedValue($event)\"></ng-template>\r\n</ng-template>"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild } from '@angular/core';
|
|
2
2
|
import { isPresent } from '@jscrpt/common';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import { DATE_API } from '
|
|
5
|
-
import { DateValueProvider } from '
|
|
4
|
+
import { DATE_API } from '../../../../misc/tokens';
|
|
5
|
+
import { DateValueProvider } from '../../../../services/dateValueProvider.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "
|
|
7
|
+
import * as i1 from "../../../../services/dateValueProvider.service";
|
|
8
8
|
/**
|
|
9
9
|
* Component used as datetime selector with simple input
|
|
10
10
|
*/
|
|
@@ -310,9 +310,9 @@ export class SimpleInputDateTimeSelectorComponent {
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
SimpleInputDateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
314
|
-
SimpleInputDateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
313
|
+
SimpleInputDateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: SimpleInputDateTimeSelectorComponent, deps: [{ token: DATE_API }, { token: i1.DateValueProvider }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
314
|
+
SimpleInputDateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: SimpleInputDateTimeSelectorComponent, selector: "simple-input-date-time-selector", viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: SimpleInputDateTimeSelectorComponent, decorators: [{
|
|
316
316
|
type: Component,
|
|
317
317
|
args: [{ selector: 'simple-input-date-time-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"] }]
|
|
318
318
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleInputDateTime.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.ts","../../../../../../src/legacy/selector/components/simpleInputDateTime/simpleInputDateTime.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,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AC,SAAS,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACO,qBAAqB,CAAC,IAAgB;;QAE5C,IAAI,CAAC,aAAc,CAAC,cAAc,EAAE,CAAC;QAErC,IAAI,EAAE,CAAC;QAEP,8BAA8B;QAC9B,IAAG,IAAI,CAAC,qBAAqB,EAAE,EAC/B;YACI,MAAA,IAAI,CAAC,aAAa,0CAAE,aAAa,EAAE,CAAC;YAEpC,OAAO;SACV;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,KAAK;;QAEX,IAAG,IAAI,CAAC,QAAQ,EAChB;YACI,IAAI,CAAC,YAAY,GAAG,MAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,IAAI,CAAC;SACxE;IACL,CAAC;;iIAzZQ,oCAAoC,kBAyKzB,QAAQ;qHAzKnB,oCAAoC,4LCpBjD,2TAQyC;2FDY5B,oCAAoC;kBAPhD,SAAS;+BAEI,iCAAiC,mBAG1B,uBAAuB,CAAC,MAAM;;0BA2KlC,MAAM;2BAAC,QAAQ;4GA5BrB,YAAY;sBADlB,SAAS;uBAAC,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services';\nimport {DateValueProvider} from '../../../../services/dateValueProvider.service';\nimport {DateTimeSelector} from '../../misc/datetimeSelector.interface';\n\n/**\n * Component used as datetime selector with simple input\n */\n@Component(\n{\n selector: 'simple-input-date-time-selector',\n templateUrl: 'simpleInputDateTime.component.html',\n styleUrls: ['simpleInputDateTime.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SimpleInputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate>\n{\n //######################### protected fields #########################\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector is touched by user\n */\n protected _touched: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n protected _pickerRequest: Subject<boolean> = new Subject<boolean>();\n\n /**\n * Currently used format for displaying data\n */\n protected _format: string = '';\n\n /**\n * Current value representation as date api wrapper\n */\n protected _dateApiValue: null|DateApiObject<TDate> = null;\n\n /**\n * Indication whether is current value valid value\n */\n protected _isValid: boolean = true;\n\n /**\n * Minimal possible value that can be picked\n */\n protected _minValue: TDate|null = null;\n\n /**\n * Maximal possible value that can be picked\n */\n protected _maxValue: TDate|null = null;\n\n //######################### public properties - implementation of DateTimeSelector #########################\n\n /**\n * Gets or sets currently used format for displaying data\n */\n public get format(): string\n {\n return this._format;\n }\n public set format(value: string)\n {\n if(isPresent(value))\n {\n value = this._dateApi.getFormat(value);\n }\n\n this._format = value;\n }\n\n /**\n * Gets or sets placeholder that is displayed when there is no value selected\n */\n public placeholder: string|null = null;\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n if(!this._dateApiValue || !this._isValid)\n {\n return null;\n }\n\n return this._valueProvider.getValue(this._dateApiValue.value, this._format);\n }\n\n /**\n * Gets formatted value\n */\n public get formattedValue(): string|null\n {\n if(!this._isValid)\n {\n return null;\n }\n\n return this.currentValue;\n }\n\n /**\n * Gets indication whether is current value valid\n */\n public get valid(): boolean\n {\n return this._isValid;\n }\n\n /**\n * Occurs when value changes\n */\n public get valueChange(): Observable<void>\n {\n return this._valueChange.asObservable();\n }\n\n /**\n * Occurs when selector is touched by user\n */\n public get touched(): Observable<void>\n {\n return this._touched.asObservable();\n }\n\n /**\n * Occurs when selector requires picker to be displayed\n */\n public get pickerRequest(): Observable<boolean>\n {\n return this._pickerRequest.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Indication whether is input disabled\n * @internal\n */\n public disabled: boolean = false;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of html input element\n * @internal\n */\n @ViewChild('input', {static: true})\n public inputElement?: ElementRef<HTMLInputElement>;\n\n //######################### protected properties #########################\n\n /**\n * Gets or sets string representation current of value\n */\n protected get currentValue(): string|null\n {\n return this.input.value || null;\n }\n protected set currentValue(value: string|null)\n {\n if(this.input)\n {\n this.input.value = value ?? '';\n }\n }\n\n /**\n * Gets input element used for handling date time value\n */\n protected get input(): HTMLInputElement\n {\n return this.inputElement!.nativeElement;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _valueProvider: DateValueProvider<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of DateTimeSelector #########################\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n public setMinValue(value: TDate|null): void\n {\n this._minValue = value;\n }\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n public setMaxValue(value: TDate|null): void\n {\n this._maxValue = value;\n }\n\n /**\n * Sets value of datetime selector\n * @param value - Value to be set to this selector\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n if(value?.from)\n {\n this._dateApiValue = this._dateApi.getValue(value?.from, this._format);\n this._isValid = this._dateApiValue.isValid();\n\n this._show();\n }\n else\n {\n this._clearValue();\n }\n }\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n public setDisabled(disabled: boolean = true): void\n {\n this.disabled = disabled;\n }\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n public invalidateVisuals(): void\n {\n this._changeDetector.detectChanges();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles gaining of focus\n * @internal\n */\n public handleFocus(): void\n {\n this._pickerRequest.next(true);\n\n //no value\n if(!this._dateApiValue)\n {\n this._dateApiValue = this._dateApi.now();\n this._isValid = this._dateApiValue.isValid();\n\n if(this._minMaxConstraintTest())\n {\n this._clearValue();\n }\n else\n {\n this._valueChange.next();\n }\n }\n\n if(!this._isValid)\n {\n return;\n }\n\n this._show();\n }\n\n /**\n * Handles blur on input\n * @internal\n */\n public handleBlur(): void\n {\n this._pickerRequest.next(false);\n }\n\n /**\n * Handles user input\n * @internal\n */\n public handleInput(): void\n {\n //empty value\n if(!this.currentValue)\n {\n this._clearValue();\n this._valueChange.next();\n\n return;\n }\n\n this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);\n this._isValid = this._dateApiValue.isValid();\n this._valueChange.next();\n }\n\n /**\n * Handles click event inside of input\n * @internal\n */\n public handleClick(): void\n {\n this._pickerRequest.next(true);\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n * @param input - Html input element that holds current value and selection\n * @internal\n */\n public handleKeyboard(event: KeyboardEvent): void\n {\n if(!this._dateApiValue?.isValid())\n {\n return;\n }\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n\n this._withMinMaxConstraint(() => event.key == 'ArrowLeft' ? this._dateApiValue!.subtractDays(1) : this._dateApiValue!.addDays(1));\n this._show();\n\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n\n this._withMinMaxConstraint(() => event.key == 'ArrowUp' ? this._dateApiValue!.subtractWeeks(1) : this._dateApiValue!.addWeeks(1));\n this._show();\n\n break;\n }\n case 'Escape':\n {\n this._pickerRequest.next(false);\n\n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this._pickerRequest.next(true);\n }\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Clears current value\n */\n protected _clearValue(): void\n {\n this._dateApiValue = null;\n this._isValid = true;\n this.currentValue = null;\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n */\n protected _minMaxConstraintTest(): boolean\n {\n return (!!this._minValue && this._dateApiValue!.isBefore(this._minValue)) ||\n (!!this._maxValue && this._dateApiValue!.isAfter(this._maxValue));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param code - Code that should be executed which can change current value\n */\n protected _withMinMaxConstraint(code: () => void): void\n {\n this._dateApiValue!.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this._minMaxConstraintTest())\n {\n this._dateApiValue?.resetOriginal();\n\n return;\n }\n\n this._valueChange.next();\n }\n\n /**\n * Shows current value in input\n */\n protected _show(): void\n {\n if(this._isValid)\n {\n this.currentValue = this._dateApiValue?.format(this._format) ?? null;\n }\n }\n}","<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder ?? ''\">"]}
|
|
@@ -102,9 +102,9 @@ export class DateTimePickerRendererDirective {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
DateTimePickerRendererDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
106
|
-
DateTimePickerRendererDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
105
|
+
DateTimePickerRendererDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerRendererDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: POSITION, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
106
|
+
DateTimePickerRendererDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimePickerRendererDirective, selector: "[dateTimePicker]", inputs: { options: "options", value: ["dateTimePicker", "value"], minValue: "minValue", maxValue: "maxValue", selectorElement: "selectorElement" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0 });
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerRendererDirective, decorators: [{
|
|
108
108
|
type: Directive,
|
|
109
109
|
args: [{
|
|
110
110
|
selector: '[dateTimePicker]'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateTimePickerRenderer.directive.js","sourceRoot":"","sources":["../../../../../../src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAgC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC5L,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAY,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAIlC,OAAO,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAC;;AAE9D;;GAEG;AAKH,MAAM,OAAO,+BAA+B;IAqExC,iEAAiE;IACjE,YAAsB,cAAgC,EAChC,SAAmB,EACW,SAAmB,EAC/B,SAAmB;QAHrC,mBAAc,GAAd,cAAc,CAAkB;QAChC,cAAS,GAAT,SAAS,CAAU;QACW,cAAS,GAAT,SAAS,CAAU;QAC/B,cAAS,GAAT,SAAS,CAAU;QA3D3D;;WAEG;QACO,uBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;QA4ChE,iFAAiF;QAEjF;;WAEG;QAEI,gBAAW,GAAuC,IAAI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hB,QAAQ;sBADd,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBASC,WAAW;sBADjB,MAAM","sourcesContent":["import {ComponentRef, Directive, ElementRef, EmbeddedViewRef, EventEmitter, Inject, Injector, Input, OnChanges, OnDestroy, OnInit, Optional, Output, ViewContainerRef} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {POSITION, Position, applyPositionResult} from '@anglr/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DateTimeSelector, DateTimeSelectorOptions} from '../../interfaces';\nimport {DateTimePickerComponent} from '../../../picker/types';\n\n/**\n * Directive for rendering datetime picker in selector\n */\n@Directive(\n{\n selector: '[dateTimePicker]'\n})\nexport class DateTimePickerRendererDirective<TDate = any> implements OnInit, OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering picker\n */\n protected _pickerComponent?: ComponentRef<DateTimePickerComponent>;\n\n /**\n * Instance of HTML element for picker\n */\n protected _pickerElement?: HTMLElement;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n //######################### protected properties #########################\n\n /**\n * Current options used by selector\n */\n protected get _options(): DateTimeSelectorOptions<DateTimeSelector<TDate>>\n {\n return this.options as DateTimeSelectorOptions<DateTimeSelector<TDate>>;\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Current options used by selector\n */\n @Input()\n public options!: Partial<DateTimeSelectorOptions<DateTimeSelector<TDate>>>;\n\n /**\n * Current selected value\n */\n @Input('dateTimePicker')\n public value!: DateTimeValue<TDate>|null;\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n @Input()\n public minValue!: TDate|null;\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n @Input()\n public maxValue!: TDate|null;\n\n /**\n * Selector element which is used during absolute positioning of picker\n */\n @Input()\n public selectorElement!: ElementRef<HTMLElement>;\n\n //######################### public properties - outputs #########################\n\n /**\n * Occurs when value changes\n */\n @Output()\n public valueChange: EventEmitter<DateTimeValue<TDate>> = new EventEmitter<DateTimeValue<TDate>>();\n\n //######################### constructor #########################\n constructor(protected _viewContainer: ViewContainerRef,\n protected _injector: Injector,\n @Inject(POSITION) @Optional() protected _position: Position,\n @Inject(DOCUMENT) protected _document: Document)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._createPicker();\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(): void\n {\n this._createPicker();\n\n if(this._pickerComponent)\n {\n const picker = this._pickerComponent.instance;\n\n picker.value = this.value;\n picker.minValue = this.minValue;\n picker.maxValue = this.maxValue;\n picker.options = this.options;\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._destroyPicker();\n this._initSubscriptions.unsubscribe();\n }\n\n //######################### protected methods #########################\n\n /**\n * Destroys picker component\n */\n protected _destroyPicker(): void\n {\n if(this._pickerComponent)\n {\n this._pickerComponent.destroy();\n this._pickerComponent = undefined;\n this._pickerElement = undefined;\n }\n }\n\n /**\n * Creates picker component\n */\n protected _createPicker(): void\n {\n if(this._pickerComponent)\n {\n return;\n }\n\n // 1. Create a component reference from the component\n this._pickerComponent = this._viewContainer\n .createComponent(DateTimePickerComponent,\n {\n injector: this._injector\n });\n\n if(this._pickerComponent)\n {\n this._initSubscriptions.add(this._pickerComponent.instance.valueChange.subscribe(itm => this.valueChange.next(itm)));\n\n //absolutely position\n if(this._options.pickerAbsolute && this._position)\n {\n // 3. Get DOM element from component\n this._pickerElement = (this._pickerComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n this._document.querySelector(this._options.pickerAbsoluteContainer)?.appendChild(this._pickerElement);\n this._pickerElement.style.position = 'absolute';\n this._initSubscriptions.add(this._position.placeElement(this._pickerElement, this.selectorElement.nativeElement, this._options.positionOptions).subscribe(applyPositionResult));\n }\n else\n {\n return;\n }\n }\n }\n}"]}
|