@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loopScroll.directive.js","sourceRoot":"","sources":["../../../../../src/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,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;;AAEnF;;GAEG;AAKH,MAAM,OAAO,mBAAmB;IAkF5B,iEAAiE;IACjE,YAAsB,cAAuC;QAAvC,mBAAc,GAAd,cAAc,CAAyB;QAhE7D;;WAEG;QACO,iBAAY,GAAY,KAAK,CAAC;QAExC;;WAEG;QACO,iBAAY,GAAW,CAAC,CAAC;QAEnC;;W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AI,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;AA4KxC;IADC,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}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loopScroll.interface.js","sourceRoot":"","sources":["../../../../../src/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}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loopScrollData.directive.js","sourceRoot":"","sources":["../../../../../src/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}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/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';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetimePicker.interface.js","sourceRoot":"","sources":["../../../../src/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 '../../misc/datetime.interface';\nimport {DateApiObject} from '../../services/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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../src/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');"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.module.js","sourceRoot":"","sources":["../../../../src/picker/modules/picker.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAE1G,OAAO,EAAC,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAC,0BAA0B,EAAC,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAC,4BAA4B,EAAC,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAC,2BAA2B,EAAC,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,iCAAiC,EAAC,MAAM,2DAA2D,CAAC;AAC5G,OAAO,EAAC,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;;AAE3E;;GAEG;AA2BH,MAAM,OAAO,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB,iBAbzB,uBAAuB;QACvB,iCAAiC;QACjC,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,uBAAuB;QACvB,mBAAmB,aAfnB,mBAAmB;QACnB,mBAAmB;QACnB,iBAAiB;QACjB,eAAe;QACf,eAAe;QACf,kBAAkB,aAclB,uBAAuB;kHAGlB,oBAAoB,YAvB7B;YACI,mBAAmB;YACnB,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;YACf,eAAe;YACf,kBAAkB;SACrB;2FAgBQ,oBAAoB;kBA1BhC,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,mBAAmB;wBACnB,mBAAmB;wBACnB,iBAAiB;wBACjB,eAAe;wBACf,eAAe;wBACf,kBAAkB;qBACrB;oBACD,YAAY,EACZ;wBACI,uBAAuB;wBACvB,iCAAiC;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}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/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';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputDateTime.component.js","sourceRoot":"","sources":["../../../../../src/selector/components/inputDateTime/inputDateTime.component.ts","../../../../../src/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,MAA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;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 '../../../misc/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 ?? ''\">"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selector.component.animations.js","sourceRoot":"","sources":["../../../../../src/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]);"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selector.component.js","sourceRoot":"","sources":["../../../../../src/selector/components/selector/selector.component.ts","../../../../../src/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,sBAAsB,CAAC;AAC/D,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,6CAA6C,CAAC;AAE9E,OAAO,EAAC,gCAAgC,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,8BAA8B,EAAC,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;;;;;;AAE9E,6CAA6C;AAE7C;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,iBAAiB,EAAE,8BAA8B;IACjD,wBAAwB,EAAE,KAAK;IAC/B,cAAc,EAA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AM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAEzB,IAAG,IAAI,CAAC,QAAQ,CAAC,wBAAwB,EACzC;YACI,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;SAC9B;IACL,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,WAAW,CAAC,WAAoB,IAAI;;QAEvC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,MAAA,IAAI,CAAC,eAAe,0CAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC5C,MAAA,IAAI,CAAC,eAAe,0CAAE,iBAAiB,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,OAAO;QAEV,IAAG,CAAC,IAAI,CAAC,MAAM,EACf;YACI,OAAO,IAAI,CAAC;SACf;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5B,CAAC;;sHAvZQ,yBAAyB,kBAqRF,gCAAgC,yHAI5C,QAAQ,aACR,eAAe;0GA1R1B,yBAAyB,yMC3DtC,6gBASc,krBD+CE,CAAC,6BAA6B,CAAC;2FAGlC,yBAAyB;kBARrC,SAAS;+BAEI,oBAAoB,cAGlB,CAAC,6BAA6B,CAAC,mBAC1B,uBAAuB,CAAC,MAAM;;0BAuRlC,QAAQ;;0BAAI,MAAM;2BAAC,gCAAgC;;0BAInD,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe;4CA1I5B,MAAM;sBADZ,KAAK;gBAOK,WAAW;sBADrB,KAAK;gBAqBK,OAAO;sBADjB,KAAK;gBAmBK,QAAQ;sBADlB,KAAK;gBA+CK,QAAQ;sBADlB,KAAK","sourcesContent":["import {Component, ChangeDetectionStrategy, Input, Inject, Optional, Type, OnInit, OnDestroy, 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 '../../../misc/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, FormatProvider} 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';\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>"]}
|
package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simpleInputDateTime.component.js","sourceRoot":"","sources":["../../../../../src/selector/components/simpleInputDateTime/simpleInputDateTime.component.ts","../../../../../src/selector/components/simpleInputDateTime/simpleInputDateTime.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,sBAAsB,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,6CAA6C,CAAC;;;AAG9E;;GAEG;AAQH,MAAM,OAAO,oCAAoC;IAwK7C,iEAAiE;IACjE,YAAwC,QAAwB,EAC1C,cAAwC,EACxC,eAAkC;QAFhB,aAAQ,GAAR,QAAQ,CAAgB;QAC1C,mBAAc,GAAd,cAAc,CAA0B;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAzKxD,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,GAAW,EAAE,CAAC;QAE/B;;WAEG;QACO,kBAAa,GAA8B,IAAI,CAAC;QAE1D;;WAEG;QACO,aAAQ,GAAY,IAAI,CAAC;QAEnC;;WAEG;QACO,cAAS,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etectorRef, ElementRef, ViewChild} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../misc/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 ?? ''\">"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimePickerRenderer.directive.js","sourceRoot":"","sources":["../../../../../src/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,UAAU,EA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AuB,CAAC,0CAAE,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACtG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;gBAChD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC;aACnL;iBAED;gBACI,OAAO;aACV;SACJ;IACL,CAAC;;4HA3KQ,+BAA+B,0EAwEpB,QAAQ,6BACR,QAAQ;gHAzEnB,+BAA+B;2FAA/B,+BAA+B;kBAJ3C,SAAS;mBACV;oBACI,QAAQ,EAAE,kBAAkB;iBAC/B;;0BAyEgB,MAAM;2BAAC,QAAQ;;0BAAG,QAAQ;8BACY,QAAQ;0BAA9C,MAAM;2BAAC,QAAQ;4CAtCrB,OAAO;sBADb,KAAK;gBAOC,KAAK;sBADX,KAAK;uBAAC,gBAAgB;gBAOhB,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 '../../../misc/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}"]}
|
package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeMaxValidator.directive.js","sourceRoot":"","sources":["../../../../../src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;;;AAE9C;;GAEG;AACH,MAAM,sBAAsB,GAC5B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,6BAA6B;IAStC,iEAAiE;IACjE,YAAY,gBAAkD,EAChC,OAAuB;QATrD,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAMzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;0HA1BQ,6BAA6B,2DAWlB,QAAQ;8GAXnB,6BAA6B,6NAF3B,CAAC,sBAAsB,CAAC;2FAE1B,6BAA6B;kBALzC,SAAS;mBACV;oBACI,QAAQ,EAAE,oMAAoM;oBAC9M,SAAS,EAAE,CAAC,sBAAsB,CAAC;iBACtC;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {ExistingProvider, forwardRef, Directive, Inject} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\nimport {DateApi} from '../../../services/dateApi.interface';\nimport {DATE_API} from '../../../misc/tokens';\n\n/**\n * Validator that is injected with directive DatetimeMaxValidatorDirective\n */\nconst DATETIME_MIN_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeMaxValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime max validator, validating max datetime value \n */\n@Directive(\n{\n selector: 'date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])',\n providers: [DATETIME_MIN_VALIDATOR]\n})\nexport class DatetimeMaxValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>)\n {\n this._validator = Validators.maxDatetime(datetimeSelector, dateApi);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
|
package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;;;AAE9C;;GAEG;AACH,MAAM,sBAAsB,GAC5B;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;IAC5D,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,6BAA6B;IAStC,iEAAiE;IACjE,YAAY,gBAAkD,EAChC,OAAuB;QATrD,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAMzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;0HA1BQ,6BAA6B,2DAWlB,QAAQ;8GAXnB,6BAA6B,6NAF3B,CAAC,sBAAsB,CAAC;2FAE1B,6BAA6B;kBALzC,SAAS;mBACV;oBACI,QAAQ,EAAE,oMAAoM;oBAC9M,SAAS,EAAE,CAAC,sBAAsB,CAAC;iBACtC;;0BAYgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {ExistingProvider, forwardRef, Directive, Inject} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\nimport {DateApi} from '../../../services/dateApi.interface';\nimport {DATE_API} from '../../../misc/tokens';\n\n/**\n * Validator that is injected with directive DatetimeMinValidatorDirective\n */\nconst DATETIME_MIN_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeMinValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime min validator, validating min datetime value \n */\n@Directive(\n{\n selector: 'date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])',\n providers: [DATETIME_MIN_VALIDATOR]\n})\nexport class DatetimeMinValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>,\n @Inject(DATE_API) dateApi: DateApi<TDate>)\n {\n this._validator = Validators.minDatetime(datetimeSelector, dateApi);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeValidator.directive.js","sourceRoot":"","sources":["../../../../../src/selector/directives/datetimeValidator/datetimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAA4D,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;;;AAEvF;;GAEG;AACH,MAAM,kBAAkB,GACxB;IACI,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;IACzD,KAAK,EAAE,IAAI;CACd,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,0BAA0B;IASnC,iEAAiE;IACjE,YAAY,gBAAkD;QAR9D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;QAKzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;uHAzBQ,0BAA0B;2GAA1B,0BAA0B,+LAFxB,CAAC,kBAAkB,CAAC;2FAEtB,0BAA0B;kBALtC,SAAS;mBACV;oBACI,QAAQ,EAAE,sKAAsK;oBAChL,SAAS,EAAE,CAAC,kBAAkB,CAAC;iBAClC","sourcesContent":["import {ExistingProvider, forwardRef, Directive} from '@angular/core';\nimport {NG_VALIDATORS, AbstractControl, Validator, ValidatorFn, ValidationErrors} from '@angular/forms';\n\nimport {Validators} from '../../../misc/validators';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\n\n/**\n * Validator that is injected with directive DatetimeValidatorDirective\n */\nconst DATETIME_VALIDATOR = <ExistingProvider>\n{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatetimeValidatorDirective),\n multi: true\n};\n\n/**\n * Directive injecting datetime validator, validating datetime\n */\n@Directive(\n{\n selector: 'date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])',\n providers: [DATETIME_VALIDATOR]\n})\nexport class DatetimeValidatorDirective<TDate = any> implements Validator\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(datetimeSelector: DateTimeSelectorComponent<TDate>)\n {\n this._validator = Validators.datetime(datetimeSelector);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectorControlValueAccessor.directive.js","sourceRoot":"","sources":["../../../../../src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AACxF,OAAO,EAAC,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAGlC,OAAO,EA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QAElC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACI,gBAAgB,CAAC,UAAmB;QAEvC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED,uEAAuE;IAEvE;;;OAGG;IACO,UAAU,CAAC,EAA0D;QAE3E,IAAG,IAAI,CAAC,KAAK,EACb;YACI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC5B;aACI,IAAG,IAAI,CAAC,SAAS,EACtB;YACI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;SACrC;aAED;YACI,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;YAEnC,IAAG,CAAC,KAAK,EACT;gBACI,EAAE,CAAC,IAAI,CAAC,CAAC;aACZ;iBAED;gBACI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAClB;SACJ;IACL,CAAC;;iIArHQ,oCAAoC;qHAApC,oCAAoC,8KAFlC,CAAC,iCAAiC,CAAC;2FAErC,oCAAoC;kBALhD,SAAS;mBACV;oBACI,QAAQ,EAAE,iGAAiG;oBAC3G,SAAS,EAAE,CAAC,iCAAiC,CAAC;iBACjD;gHAgBU,KAAK;sBADX,KAAK;gBAOC,SAAS;sBADf,KAAK","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Input, OnDestroy} from '@angular/core';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../misc/datetime.interface';\nimport {DateTimeSelectorComponent} from '../../components/selector/selector.component';\n\n/**\n * Value accessor provider for date time selector\n */\nconst DATE_TIME_SELECTOR_VALUE_ACCESSOR = <ExistingProvider>\n{\n provide: NG_VALUE_ACCESSOR, \n useExisting: forwardRef(() => DateTimeSelectorControlValueAccessor), \n multi: true\n};\n\n/**\n * Value accessor for getting and setting values for date time selector\n */\n@Directive(\n{\n selector: 'date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]',\n providers: [DATE_TIME_SELECTOR_VALUE_ACCESSOR]\n})\nexport class DateTimeSelectorControlValueAccessor<TDate> implements ControlValueAccessor, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions that are destroyed on directive destruction\n */\n protected _subscriptions: Subscription = new Subscription();\n\n //######################### public properties - inputs #########################\n\n /**\n * Indication whether value for selector is represented as range from, to\n */\n @Input()\n public range: boolean = false;\n\n /**\n * Indication whether value for selector is represented as formatted string value, if both 'formatted' and 'range' are set, 'range' takes precedence\n */\n @Input()\n public formatted: boolean = false;\n\n //######################### constructor #########################\n constructor(protected _selector: DateTimeSelectorComponent<TDate>)\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._subscriptions?.unsubscribe();\n }\n\n //######################### public methods - implementation of ControlValueAccessor #########################\n\n /**\n * Sets value to datetime selector\n */\n public writeValue(value: string|DateTimeValue<TDate>|TDate|null): void\n {\n if(this.range)\n {\n this._selector.value = value as DateTimeValue<TDate>;\n }\n else if(this.formatted)\n {\n this._selector.formattedValue = value as string;\n }\n else\n {\n this._selector.value =\n {\n from: value as TDate,\n to: value as TDate\n };\n }\n }\n\n /**\n * Registers callback that is called when value of datetime selector value changes\n */\n public registerOnChange(fn: (data: string|DateTimeValue<TDate>|TDate|null) => any): void\n {\n this._subscriptions.add(this._selector.valueChange.subscribe(() => this._emitValue(fn)));\n }\n\n /**\n * Registers callback that is called when datetime selector was touched by user\n */\n public registerOnTouched(fn: () => any): void\n {\n this._subscriptions.add(this._selector.touched.subscribe(() => fn()));\n }\n\n /**\n * Used for setting control as disabled\n * @param isDisabled - disabled status to set on the element\n */\n public setDisabledState(isDisabled: boolean): void\n {\n this._selector.setDisabled(isDisabled);\n }\n\n //######################### protected methods #########################\n\n /**\n * Used for emitting value that was changed\n * @param fn - Function that is used for emitting changed value\n */\n protected _emitValue(fn: (value: string|DateTimeValue<TDate>|TDate|null) => any): void\n {\n if(this.range)\n {\n fn(this._selector.value);\n }\n else if(this.formatted)\n {\n fn(this._selector.formattedValue);\n }\n else\n {\n const value = this._selector.value;\n\n if(!value)\n {\n fn(null);\n }\n else\n {\n fn(value.from);\n }\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/selector/interfaces.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './misc/datetimeSelector.interface';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeSelector.interface.js","sourceRoot":"","sources":["../../../../src/selector/misc/datetimeSelector.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {PositionOptions} from '@anglr/common';\nimport {Observable} from 'rxjs';\n\nimport {DateTimeValue} from '../../misc/datetime.interface';\nimport {DateTimePickerOptions} from '../../picker/misc/datetimePicker.interface';\n\n/**\n * Defintion of datetime selector component options\n */\nexport interface DateTimeSelectorOptions<TSelector = any, TPicker = any> extends DateTimePickerOptions<TPicker>\n{\n /**\n * Definition of type that is used for selector\n */\n selectorComponent: Type<TSelector>;\n\n /**\n * Indication whether close picker on value selection\n */\n pickerCloseOnValueSelect: boolean;\n\n /**\n * Indication whether picker is disabled\n */\n pickerDisabled: boolean;\n\n /**\n * Indication whether use absolute positioning of picker\n */\n pickerAbsolute: boolean;\n\n /**\n * Position options that are used in case of absolute picker\n */\n positionOptions: Partial<PositionOptions>;\n\n /**\n * Css selector for absolute picker container\n */\n pickerAbsoluteContainer: string;\n}\n\n/**\n * Describes datetime selector component used for displaying and selecting value\n */\nexport interface DateTimeSelector<TDate = any>\n{\n /**\n * Currently used format for displaying data\n */\n format: string;\n\n /**\n * Placeholder that is displayed when there is no value selected\n */\n placeholder: string|null;\n\n /**\n * Gets current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Gets formatted value\n */\n readonly formattedValue: string|null;\n\n /**\n * Gets indication whether is current value valid\n */\n readonly valid: boolean;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: Observable<void>;\n\n /**\n * Occurs when selector is touched by user\n */\n readonly touched: Observable<void>;\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n readonly pickerRequest: Observable<boolean>;\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 selector\n * @param value - Value to be set to this selector\n */\n setValue(value: DateTimeValue<TDate>|null): void;\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 setDisabled(disabled?: boolean): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../src/selector/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAqD,IAAI,cAAc,CAAmC,kCAAkC,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimeSelectorOptions} from './datetimeSelector.interface';\n\n/**\n * Injection token used for obtaining datetime selector configuration\n */\nexport const DATE_TIME_SELECTOR_CONFIGURATION: InjectionToken<Partial<DateTimeSelectorOptions>> = new InjectionToken<Partial<DateTimeSelectorOptions>>('DATE_TIME_SELECTOR_CONFIGURATION');"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicSelector.module.js","sourceRoot":"","sources":["../../../../src/selector/modules/basicSelector.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,oCAAoC,EAAC,MAAM,iEAAiE,CAAC;;AAErH;;GAEG;AAQH,MAAM,OAAO,2BAA2B;;wHAA3B,2BAA2B;yHAA3B,2BAA2B,iBAHhC,oCAAoC;yHAG/B,2BAA2B;2FAA3B,2BAA2B;kBAPvC,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,oCAAoC;qBACvC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {SimpleInputDateTimeSelectorComponent} from '../components/simpleInputDateTime/simpleInputDateTime.component';\n\n/**\n * Angular module for date time basic input selector component\n */\n@NgModule(\n{\n declarations:\n [\n SimpleInputDateTimeSelectorComponent\n ]\n})\nexport class DateTimeBasicSelectorModule\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selector.module.js","sourceRoot":"","sources":["../../../../src/selector/modules/selector.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,yBAAyB,EAAC,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAC,8BAA8B,EAAC,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAC,oCAAoC,EAAC,MAAM,mFAAmF,CAAC;AACvI,OAAO,EAAC,0BAA0B,EAAC,MAAM,6DAA6D,CAAC;AACvG,OAAO,EAAC,6BAA6B,EAAC,MAAM,mEAAmE,CAAC;AAChH,OAAO,EAAC,6BAA6B,EAAC,MAAM,mEAAmE,CAAC;AAChH,OAAO,EAAC,+BAA+B,EAAC,MAAM,uEAAuE,CAAC;;AAEtH;;GAEG;AA6BH,MAAM,OAAO,sBAAsB;;mHAAtB,sBAAsB;oHAAtB,sBAAsB,iBAlB3B,yBAAyB;QACzB,8BAA8B;QAC9B,oCAAoC;QACpC,0BAA0B;QAC1B,6BAA6B;QAC7B,6BAA6B;QAC7B,+BAA+B,aAZ/B,mBAAmB;QACnB,mBAAmB;QACnB,oBAAoB,aAcpB,yBAAyB;QACzB,oCAAoC;QACpC,0BAA0B;QAC1B,6BAA6B;QAC7B,6BAA6B;QAC7B,+BAA+B;oHAG1B,sBAAsB,YAzB/B;YACI,mBAAmB;YACnB,mBAAmB;YACnB,oBAAoB;SACvB;2FAqBQ,sBAAsB;kBA5BlC,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,mBAAmB;wBACnB,mBAAmB;wBACnB,oBAAoB;qBACvB;oBACD,YAAY,EACZ;wBACI,yBAAyB;wBACzB,8BAA8B;wBAC9B,oCAAoC;wBACpC,0BAA0B;wBAC1B,6BAA6B;wBAC7B,6BAA6B;wBAC7B,+BAA+B;qBAClC;oBACD,OAAO,EACP;wBACI,yBAAyB;wBACzB,oCAAoC;wBACpC,0BAA0B;wBAC1B,6BAA6B;wBAC7B,6BAA6B;wBAC7B,+BAA+B;qBAClC;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule as AngularCommonModule} from '@angular/common';\nimport {CommonDynamicModule} from '@anglr/common';\n\nimport {DateTimePickerModule} from '../../picker/modules/picker.module';\nimport {DateTimeSelectorComponent} from '../components/selector/selector.component';\nimport {InputDateTimeSelectorComponent} from '../components/inputDateTime/inputDateTime.component';\nimport {DateTimeSelectorControlValueAccessor} from '../directives/selectorControlValueAccessor/selectorControlValueAccessor.directive';\nimport {DatetimeValidatorDirective} from '../directives/datetimeValidator/datetimeValidator.directive';\nimport {DatetimeMinValidatorDirective} from '../directives/datetimeMinValidator/datetimeMinValidator.directive';\nimport {DatetimeMaxValidatorDirective} from '../directives/datetimeMaxValidator/datetimeMaxValidator.directive';\nimport {DateTimePickerRendererDirective} from '../directives/dateTimePickerRenderer/dateTimePickerRenderer.directive';\n\n/**\n * Angular module for date time selector components\n */\n@NgModule(\n{\n imports:\n [\n AngularCommonModule,\n CommonDynamicModule,\n DateTimePickerModule,\n ],\n declarations:\n [\n DateTimeSelectorComponent,\n InputDateTimeSelectorComponent,\n DateTimeSelectorControlValueAccessor,\n DatetimeValidatorDirective,\n DatetimeMinValidatorDirective,\n DatetimeMaxValidatorDirective,\n DateTimePickerRendererDirective,\n ],\n exports:\n [\n DateTimeSelectorComponent,\n DateTimeSelectorControlValueAccessor,\n DatetimeValidatorDirective,\n DatetimeMinValidatorDirective,\n DatetimeMaxValidatorDirective,\n DateTimePickerRendererDirective,\n ]\n})\nexport class DateTimeSelectorModule\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/selector/types.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC;AACnE,cAAc,0CAA0C,CAAC;AACzD,cAAc,qDAAqD,CAAC;AACpE,cAAc,gEAAgE,CAAC;AAC/E,cAAc,kEAAkE,CAAC;AACjF,cAAc,kEAAkE,CAAC;AACjF,cAAc,4DAA4D,CAAC;AAC3E,cAAc,kFAAkF,CAAC;AACjG,cAAc,sEAAsE,CAAC;AACrF,cAAc,eAAe,CAAC","sourcesContent":["export * from './components/inputDateTime/inputDateTime.component';\nexport * from './components/selector/selector.component';\nexport * from './components/selector/selector.component.animations';\nexport * from './components/simpleInputDateTime/simpleInputDateTime.component';\nexport * from './directives/datetimeMaxValidator/datetimeMaxValidator.directive';\nexport * from './directives/datetimeMinValidator/datetimeMinValidator.directive';\nexport * from './directives/datetimeValidator/datetimeValidator.directive';\nexport * from './directives/selectorControlValueAccessor/selectorControlValueAccessor.directive';\nexport * from './directives/dateTimePickerRenderer/dateTimePickerRenderer.directive';\nexport * from './misc/tokens';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateApi.interface.js","sourceRoot":"","sources":["../../../src/services/dateApi.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Date can be represented as formatted string, timestamp or javascript Date object\n */\nexport type DateValue = Date|string|number;\n\n/**\n * Definition of type, that is used for creating instance of DateApiObject\n */\nexport interface DateApiObjectCtor<TObject extends DateApiObject<TDate> = any, TDate = any>\n{\n new (value: TDate|DateValue, format?: string, ...additionalParams: any[]): TObject;\n}\n\n/**\n * Instance of object wrapping TDate, allowing manipulation with it\n */\nexport interface DateApiObject<TDate = any>\n{\n /**\n * Original value that is not changed unless 'updateOriginal' is called\n */\n readonly originalValue: TDate;\n\n /**\n * Instance of date\n */\n readonly value: TDate;\n\n /**\n * Gets indication whether provided instance of date is valid\n */\n isValid(): boolean;\n\n /**\n * Gets indication whether provided instance of date is weekend day\n */\n isWeekend(): boolean;\n\n /**\n * Formats date value\n * @param format - Format token used for creating formatted string\n */\n format(format: string): string;\n\n /**\n * Updates value to start date and time of current decade\n * @returns Itself for fluent API\n */\n startOfDecade(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current decade\n * @returns Itself for fluent API\n */\n endOfDecade(): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current year\n * @returns Itself for fluent API\n */\n startOfYear(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current year\n * @returns Itself for fluent API\n */\n endOfYear(): DateApiObject<TDate>;\n\n /**\n * Add years, if count not specified adds 1 year\n * @param count - Number of years count\n * @returns Itself for fluent API\n */\n addYears(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract years, if count not specified subtract 1 year\n * @param count - Number of years count\n * @returns Itself for fluent API\n */\n subtractYears(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current month\n * @returns Itself for fluent API\n */\n startOfMonth(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current month\n * @returns Itself for fluent API\n */\n endOfMonth(): DateApiObject<TDate>;\n\n /**\n * Add months, if count not specified adds 1 month\n * @param count - Number of months count\n * @returns Itself for fluent API\n */\n addMonths(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract months, if count not specified subtract 1 month\n * @param count - Number of months count\n * @returns Itself for fluent API\n */\n subtractMonths(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current week\n * @returns Itself for fluent API\n */\n startOfWeek(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current week\n * @returns Itself for fluent API\n */\n endOfWeek(): DateApiObject<TDate>;\n\n /**\n * Add weeks, if count not specified adds 1 week\n * @param count - Number of weeks count\n * @returns Itself for fluent API\n */\n addWeeks(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract weeks, if count not specified subtract 1 week\n * @param count - Number of weeks count\n * @returns Itself for fluent API\n */\n subtractWeeks(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current day\n * @returns Itself for fluent API\n */\n startOfDay(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current day\n * @returns Itself for fluent API\n */\n endOfDay(): DateApiObject<TDate>;\n\n /**\n * Add days, if count not specified adds 1 day\n * @param count - Number of days count\n * @returns Itself for fluent API\n */\n addDays(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract days, if count not specified subtract 1 day\n * @param count - Number of days count\n * @returns Itself for fluent API\n */\n subtractDays(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current hour\n * @returns Itself for fluent API\n */\n startOfHour(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current hour\n * @returns Itself for fluent API\n */\n endOfHour(): DateApiObject<TDate>;\n\n /**\n * Add hours, if count not specified adds 1 hour\n * @param count - Number of hours count\n * @returns Itself for fluent API\n */\n addHours(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract hours, if count not specified subtract 1 hour\n * @param count - Number of hours count\n * @returns Itself for fluent API\n */\n subtractHours(count?: number): DateApiObject<TDate>;\n\n /**\n * Updates value to start date and time of current minute\n * @returns Itself for fluent API\n */\n startOfMinute(): DateApiObject<TDate>;\n\n /**\n * Updates value to end date and time of current minute\n * @returns Itself for fluent API\n */\n endOfMinute(): DateApiObject<TDate>;\n\n /**\n * Add minutes, if count not specified adds 1 minute\n * @param count - Number of minutes count\n * @returns Itself for fluent API\n */\n addMinutes(count?: number): DateApiObject<TDate>;\n\n /**\n * Subtract minutes, if count not specified subtract 1 minute\n * @param count - Number of minutes count\n * @returns Itself for fluent API\n */\n subtractMinutes(count?: number): DateApiObject<TDate>;\n\n /**\n * Gets number of days in month\n */\n daysInMonth(): number;\n\n /**\n * Gets year\n */\n year(): number;\n /**\n * Sets year\n * @param year - Year to be set\n */\n year(year: number): DateApiObject<TDate>;\n /**\n * Gets or sets year\n * @param year - If specified, sets year\n */\n year(year?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets month\n */\n month(): number;\n /**\n * Sets month\n * @param month - Month to be set\n */\n month(month: number): DateApiObject<TDate>;\n /**\n * Gets or sets month\n * @param month - If specified, sets month\n */\n month(month?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets day of month one based\n */\n dayOfMonth(): number;\n /**\n * Sets day of month one based\n * @param day - Day of month to be set\n */\n dayOfMonth(day: number): DateApiObject<TDate>;\n /**\n * Gets or sets day of month one based\n * @param day - If specified, sets day of month\n */\n dayOfMonth(day?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets day of week zero based, first is monday\n */\n dayOfWeek(): number;\n /**\n * Sets day of week zero based, first is monday\n * @param day - Day of week to be set\n */\n dayOfWeek(day: number): DateApiObject<TDate>;\n /**\n * Gets or sets day of week zero based, first is monday\n * @param day - If specified, sets day of week\n */\n dayOfWeek(day?: number): number|DateApiObject<TDate>;\n\n /**\n * Gets hours zero based\n */\n hour(): number;\n /**\n * Sets hours zero\n * @param hour - hour to be set\n */\n hour(hour: number): DateApiObject<TDate>;\n /**\n * Gets or sets hours zero\n * @param hour - If specified, sets hour\n */\n hour(hour?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets minutes zero based\n */\n minute(): number;\n /**\n * Sets minutes zero based\n * @param minute - minutes to be set\n */\n minute(minute: number): DateApiObject<TDate>;\n /**\n * Gets or sets minutes zero based\n * @param minute - If specified, sets minutes\n */\n minute(minute?: number): DateApiObject<TDate>|number;\n\n /**\n * Gets indication whether current value is before 'date'\n * @param date - Date which is this date compared to\n */\n isBefore(date: TDate): boolean;\n\n /**\n * Gets indication whether current value is after 'date'\n * @param date - Date which is this date compared to\n */\n isAfter(date: TDate): boolean;\n\n /**\n * Gets number of days between this and provided date\n * @param date - Date which is used for computation of diff against\n */\n diffDays(date: TDate): number;\n\n /**\n * Compares whether this date is same week as provided date\n * @param date - Date which is used for comparison of same week\n */\n isSameWeek(date: TDate): boolean;\n\n /**\n * Compares whether this date is same decade as provided date\n * @param date - Date which is used for comparison of same decade\n */\n isSameDecade(date: TDate): boolean;\n\n /**\n * Compares whether this date is same year as provided date\n * @param date - Date which is used for comparison of same year\n */\n isSameYear(date: TDate): boolean;\n\n /**\n * Compares whether this date is same month as provided date\n * @param date - Date which is used for comparison of same month\n */\n isSameMonth(date: TDate): boolean;\n\n /**\n * Compares whether this date is same day as provided date\n * @param date - Date which is used for comparison of same day\n */\n isSameDay(date: TDate): boolean;\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from value\n */\n clone(): DateApiObject<TDate>;\n\n /**\n * Creates clone of this instance, value and originalValue have same value and are cloned from originalValue\n */\n cloneOriginal(): DateApiObject<TDate>;\n\n /**\n * Updates originalValue, if value is not provided originalValue is set to value\n * @param value - Value to be set as original, or null (value will be used as value)\n * @returns Itself for fluent API\n */\n updateOriginal(value?: TDate): DateApiObject<TDate>;\n\n /**\n * Changes value to same value as originalValue\n * @returns Itself for fluent API\n */\n resetOriginal(): DateApiObject<TDate>;\n}\n\n/**\n * Date api abstraction, used for obtaining DateApi wrapper object\n */\nexport interface DateApi<TDate = any, TDateApiObject extends DateApiObject<TDate> = DateApiObject<TDate>>\n{\n /**\n * Gets wrapping object used for manipulation\n * @param value - Value to be converted (parsed) and used for manipulation\n * @param format - Format string used for parsing string value\n */\n getValue(value: DateValue|TDate, format?: string): TDateApiObject;\n\n /**\n * Gets wrapping object used for manipulation instantiated to current date and time\n */\n now(): TDateApiObject;\n\n /**\n * Gets format string using pseudo format\n * @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string\n */\n getFormat(pseudoFormat: string): string;\n\n /**\n * Gets information\n */\n weekStartsOnMonday(): boolean;\n\n /**\n * Gets array of weekday names in short format, order of days is dependent on locale\n */\n weekdaysShort(): string[];\n\n /**\n * Tests whether is value TDate\n * @param value - Value to be tested whether is TDate\n */\n isDate(value: unknown): value is TDate;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatProvider.interface.js","sourceRoot":"","sources":["../../../src/services/formatProvider.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Format provider used for obtaining common used format 'tokens'\n */\nexport interface FormatProvider\n{\n /**\n * Format token for displaying date\n */\n readonly date: string;\n\n /**\n * Format token for displaying date and time\n */\n readonly dateTime: string;\n\n /**\n * Format token for displaying time\n */\n readonly time: string;\n\n /**\n * Format token for displaying full year\n */\n readonly year: string;\n\n /**\n * Format token for displaying month double digit number\n */\n readonly month: string;\n\n /**\n * Format token for displaying week double digit number\n */\n readonly week: string;\n\n /**\n * Format token for displaying day double digit number\n */\n readonly day: string;\n\n /**\n * Format token for displaying hour (24h format) double digit number\n */\n readonly hour: string;\n\n /**\n * Format token for displaying minute double digit number\n */\n readonly minute: string;\n\n /**\n * Format token for displaying second double digit number\n */\n readonly second: string;\n\n /**\n * Format token for displaying standalone day full name \n */\n readonly dayName: string;\n\n /**\n * Format token for displaying standalone day short name\n */\n readonly dayNameShort: string;\n\n /**\n * Format token for displaying standalone month full name\n */\n readonly monthName: string;\n\n /**\n * Format token for displaying standalone month short name\n */\n readonly monthNameShort: string;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.interface.js","sourceRoot":"","sources":["../../../src/misc/datetime.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents datetime value as period\n */\nexport interface DateTimeValue<TDate = any>\n{\n /**\n * Starting date and time of period\n */\n from: TDate;\n\n /**\n * Ending date and time of period\n */\n to: TDate;\n}\n\n//TODO: remove when not necessary\n\n/**\n * Represents object that holds data for identification of validity of date time\n */\nexport interface DateTimeValueObject<TDate = any>\n{\n /**\n * Current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Indicaiton whether is current value valid, empty value is valid\n */\n readonly valid: boolean;\n\n /**\n * Minimal possible value, that can be\n */\n readonly minValue: TDate|null;\n\n /**\n * Maximal possible value, that can be\n */\n readonly maxValue: TDate|null;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clockTimePicker.component.js","sourceRoot":"","sources":["../../../../../src/picker/components/clockTimePicker/clockTimePicker.component.ts","../../../../../src/picker/components/clockTimePicker/clockTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;;AAEjE;;GAEG;AAQH,MAAM,OAAO,wBAAwB;;qHAAxB,wBAAwB;yGAAxB,wBAAwB,mECZrC,EAAA;2FDYa,wBAAwB;kBAPpC,SAAS;+BAEI,6BAA6B,mBAGtB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\n/**\n * Component used for displaying clock time picker\n */\n@Component(\n{\n selector: 'date-time-clock-time-picker',\n templateUrl: 'clockTimePicker.component.html',\n styleUrls: ['clockTimePicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ClockTimePickerComponent\n{\n}",""]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clockTimePicker.interface.js","sourceRoot":"","sources":["../../../../../src/picker/components/clockTimePicker/clockTimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Specific css classes for clock time picker\n */\nexport interface ClockTimePickerCssClasses\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../src/picker/components/dayPicker/dayPicker.component.ts","../../../../../src/picker/components/dayPicker/dayPicker.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;AAGtC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,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,EAAE,wBAAwB;IACrC,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAAM,OAAO,0BAAwC,SAAQ,mBAA+D;IAyBxH,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QA3BnC,sEAAsE;QAEtE;;WAEG;QACO,mBAAc,GAAqB,EAAE,CAAC;QAEhD,2FAA2F;QAE3F;;;WAGG;QACI,aAAQ,GAAa,EAAE,CAAC;QAgB3B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;QAClD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AC,EAAE,CAAC,CAAC,EAClH;YACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;IAED,uEAAuE;IAEvE;;;OAGG;IACO,YAAY,CAAC,MAAyB;QAE5C,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC;IAChE,CAAC;IAED;;;OAGG;IACO,wBAAwB,CAAC,GAAyB;QAExD,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACO,aAAa,CAAC,GAAyB,EAAE,MAAa;QAE5D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,GAAyB;QAE9C,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;IACrD,CAAC;;uHAlPQ,0BAA0B,kBA0Bf,QAAQ;2GA1BnB,0BAA0B,mFCnCvC,kxCAoBM;2FDeO,0BAA0B;kBAPtC,SAAS;+BAEI,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM;;0BA4BlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DateTimeValue} from '../../../misc/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../services/dateApi.interface';\nimport {DateTimePicker, DayData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {DayPickerCssClasses} from './dayPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: DayPickerCssClasses =\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 weekdayName: 'weekday',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'date-time-day-picker',\n templateUrl: 'dayPicker.component.html',\n styleUrls: ['dayPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeDayPickerComponent<TDate = any> extends PickerBaseComponent<TDate, DayData<TDate>, DayPickerCssClasses> implements DateTimePicker<TDate, DayPickerCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Stored this picker month data\n */\n protected _thisMonthData: DayData<TDate>[] = [];\n\n //######################### public properties - template bindings #########################\n\n /**\n * Names of days\n * @internal\n */\n public weekdays: string[] = [];\n\n /**\n * Value used for displaying time\n */\n public get timeValue(): DateTimeValue<TDate> | null\n {\n return this._value;\n }\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 this.weekdays = this._dateApi.weekdaysShort();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed period to \"lower\" period\n * @param event - Event that occured\n * @internal\n */\n public goDown(event: Event): void\n {\n event.preventDefault();\n\n if(!this.canGoDown)\n {\n return;\n }\n\n if(this.displayDate)\n {\n this._scaleDown.next(this.displayDate.value);\n }\n }\n\n /**\n * Changes displayed month to next month\n * @param event - Event that occured\n * @internal\n */\n public nextMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.addMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed month to previous month\n * @param event - Event that occured\n * @internal\n */\n public previousMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.subtractMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Selects day\n * @param event - Event that occured\n * @param day - Selects day \n * @internal\n */\n public override select(event: Event, day: DayData<TDate>): void\n {\n event.preventDefault();\n\n if(day.disabled)\n {\n return;\n }\n\n this._setPeriod(day);\n\n //when time picker is enabled\n if(this.canGoDown)\n {\n const from = this._dateApi\n .getValue(day.date)\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n const to = this._dateApi\n .getValue(this._endOfPeriod(day))\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n this._value =\n {\n from: from.value,\n to: to.value\n };\n }\n //no time picker\n else\n {\n this._value =\n {\n from: day.date,\n to: this._endOfPeriod(day)\n };\n }\n \n this._valueChange.next();\n\n if(day.otherMonth)\n {\n this.display(this._dateApi.getValue(day.date));\n }\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 this.periodData = [];\n this._thisMonthData = [];\n const currentMonthDate = this.displayDate.value;\n const today = this._dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n const data = \n {\n active: false,\n disabled: false,\n betweenActive: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this._thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n //can go down set minutes and hours\n if(this.canGoDown)\n {\n this.displayDate\n .minute(this._originalMinute)\n .hour(this._originalHour);\n }\n\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameMonth(this._value.from) || this.displayDate.isSameMonth(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).endOfDay().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.isSameMonth(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.isSameDay(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._thisMonthData[val.dayOfMonth() - 1];\n }\n}","<div [ngClass]=\"cssClasses?.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses?.previousPeriod | asRequired\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div [ngClass]=\"cssClasses?.periodValue | asRequired | mergeCssClasses: [{'clickable': canGoUp}]\" (mousedown)=\"goUp($event)\">{{displayDate?.format('MMMM yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses?.nextPeriod | asRequired\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses?.periodData | asRequired\">\r\n <div [ngClass]=\"cssClasses?.weekdayName | asRequired\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n [ngClass]=\"cssClasses?.periodDatum | asRequired\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"select($event, day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"flex-row\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canGoDown\">\r\n <div [class.clickable]=\"canGoDown\" (mousedown)=\"goDown($event)\">{{timeValue?.from | dateFormat: 'time'}}</div>\r\n</div>"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dayPicker.interfaces.js","sourceRoot":"","sources":["../../../../../src/picker/components/dayPicker/dayPicker.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import {CommonPickerCssClasses} from '../../misc/datetimePicker.interface';\n\n/**\n * Specific css classes for day picker\n */\nexport interface DayPickerCssClasses extends CommonPickerCssClasses\n{\n /**\n * Element displaying weekday name\n */\n weekdayName?: string;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../src/picker/components/monthPicker/monthPicker.component.ts","../../../../../src/picker/components/monthPicker/monthPicker.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,sBAAsB,CAAC;AAG9C,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,EAAE,wBAAwB;IACrC,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAAM,OAAO,4BAA0C,SAAQ,mBAAmE;IAE9H,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAE/B,IAAI,CAAC,UAAU,GAAG,MAAM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,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAChH;YACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;IAED,uEAAuE;IAEvE;;;OAGG;IACO,YAAY,CAAC,MAAyB;QAE5C,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;IAClE,CAAC;IAED;;;OAGG;IACO,wBAAwB,CAAC,GAAyB;QAExD,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACO,aAAa,CAAC,GAAyB,EAAE,MAAa;QAE5D,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,GAAyB;QAE9C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACxC,CAAC;;yHAhHQ,4BAA4B,kBAGjB,QAAQ;6GAHnB,4BAA4B,qFCjCzC,sxBAYM;2FDqBO,4BAA4B;kBAPxC,SAAS;+BAEI,wBAAwB,mBAGjB,uBAAuB,CAAC,MAAM;;0BAKlC,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.interface';\nimport {DateTimePicker, MonthData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {MonthPickerCssClasses} from './monthPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: MonthPickerCssClasses =\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 month picker\n */\n@Component(\n{\n selector: 'date-time-month-picker',\n templateUrl: 'monthPicker.component.html',\n styleUrls: ['monthPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeMonthPickerComponent<TDate = any> extends PickerBaseComponent<TDate, MonthData<TDate>, MonthPickerCssClasses> implements DateTimePicker<TDate, MonthPickerCssClasses>\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 year to next year\n * @param event - Event that occured\n * @internal\n */\n public nextYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed year to previous year\n * @param event - Event that occured\n * @internal\n */\n public previousYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(1);\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 const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n this.periodData = [];\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format('MMM')\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameYear(this._value.from) || this.displayDate.isSameYear(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).endOfMonth().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.isSameYear(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.isSameMonth(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.month()];\n }\n}","<div [ngClass]=\"cssClasses?.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses?.previousPeriod | asRequired\" (mousedown)=\"previousYear($event)\"></div>\r\n <div [ngClass]=\"cssClasses?.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{displayDate?.format('yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses?.nextPeriod | asRequired\" (mousedown)=\"nextYear($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses?.periodData | asRequired\">\r\n <div *ngFor=\"let month of periodData\"\r\n [ngClass]=\"cssClasses?.periodDatum | asRequired\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"select($event, month)\">{{month.name}}</div>\r\n</div>"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monthPicker.interfaces.js","sourceRoot":"","sources":["../../../../../src/picker/components/monthPicker/monthPicker.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import {CommonPickerCssClasses} from '../../misc/datetimePicker.interface';\n\n/**\n * Specific css classes for month picker\n */\nexport interface MonthPickerCssClasses extends CommonPickerCssClasses\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.component.animations.js","sourceRoot":"","sources":["../../../../../src/picker/components/picker/picker.component.animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,aAAa,EACvD;IACI,UAAU,CAAC,QAAQ,EACnB;QACI,KAAK,CACL;YACI,OAAO,EAAE,CAAC;SACb,CAAC;QACF,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;YACI,OAAO,EAAE,CAAC;SACb,CAAC,CAAC;KACN,CAAC;IACF,UAAU,CAAC,QAAQ,EACnB;QACI,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;YACI,OAAO,EAAE,CAAC;SACb,CAAC,CAAC;KACN,CAAC;IACF,UAAU,CAAC,YAAY,EACvB;QACI,KAAK,CACL;YACI,KAAK,CAAC,QAAQ,EACd;gBACI,KAAK,CACL;oBACI,OAAO,EAAE,CAAC;oBACV,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,YAAY;iBAC1B,CAAC;gBACF,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;oBACI,OAAO,EAAE,CAAC;oBACV,SAAS,EAAE,UAAU;iBACxB,CAAC,CAAC;aACN,CAAC;YACF,KAAK,CAAC,QAAQ,EACd;gBACI,KAAK,CACL;oBACI,SAAS,EAAE,UAAU;oBACrB,OAAO,EAAE,CAAC;oBACV,QAAQ,EAAE,UAAU;iBACvB,CAAC;gBACF,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;oBACI,SAAS,EAAE,WAAW;oBACtB,OAAO,EAAE,CAAC;iBACb,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;IACF,UAAU,CAAC,YAAY,EACvB;QACI,KAAK,CACL;YACI,KAAK,CAAC,QAAQ,EACd;gBACI,KAAK,CACL;oBACI,OAAO,EAAE,CAAC;oBACV,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,WAAW;iBACzB,CAAC;gBACF,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;oBACI,OAAO,EAAE,CAAC;oBACV,SAAS,EAAE,UAAU;iBACxB,CAAC,CAAC;aACN,CAAC;YACF,KAAK,CAAC,QAAQ,EACd;gBACI,KAAK,CACL;oBACI,SAAS,EAAE,UAAU;oBACrB,QAAQ,EAAE,UAAU;iBACvB,CAAC;gBACF,OAAO,CAAC,OAAO,EAAE,KAAK,CACtB;oBACI,SAAS,EAAE,YAAY;oBACvB,OAAO,EAAE,CAAC;iBACb,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL,CAAC,CAAC","sourcesContent":["import {animate, group, query, style, transition, trigger} from '@angular/animations';\n\n/**\n * Animation trigger for animating scale up and scale down picker\n */\nexport const scaleUpDownTrigger = trigger('scaleUpDown',\n[\n transition(':enter', \n [\n style(\n {\n opacity: 0\n }),\n animate('220ms', style(\n {\n opacity: 1\n }))\n ]),\n transition(':leave', \n [\n animate('220ms', style(\n {\n opacity: 0\n }))\n ]),\n transition(':increment', \n [\n group(\n [\n query(':enter',\n [\n style(\n {\n opacity: 0,\n position: 'absolute',\n transform: 'scale(1.1)',\n }),\n animate('220ms', style(\n {\n opacity: 1,\n transform: 'scale(1)',\n }))\n ]),\n query(':leave',\n [\n style(\n {\n transform: 'scale(1)',\n opacity: 1,\n position: 'absolute'\n }),\n animate('220ms', style(\n {\n transform: 'scale(.9)',\n opacity: 0\n }))\n ])\n ])\n ]),\n transition(':decrement', \n [\n group(\n [\n query(':enter',\n [\n style(\n {\n opacity: 0,\n position: 'absolute',\n transform: 'scale(.9)'\n }),\n animate('220ms', style(\n {\n opacity: 1,\n transform: 'scale(1)'\n }))\n ]),\n query(':leave',\n [\n style(\n {\n transform: 'scale(1)',\n position: 'absolute'\n }),\n animate('220ms', style(\n {\n transform: 'scale(1.1)',\n opacity: 0\n }))\n ])\n ])\n ])\n]);"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.component.js","sourceRoot":"","sources":["../../../../../src/picker/components/picker/picker.component.ts","../../../../../src/picker/components/picker/picker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAgB,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAY,MAAM,eAAe,CAAC;AAC5J,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAC,8BAA8B,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,0BAA0B,EAAC,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAC,4BAA4B,EAAC,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;;;AAEjE,sBAAsB;AAEtB;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,aAAa,EAAE,KAAK;IACpB,uBAAuB,EACvB;QACI,KAAK,EAAE,0BAA0B;QACjC,OAAO,EAAE,4BAA4B;QACrC,MAAM,EAAE,2BAA2B;KACtC;IACD,kBAAkB,EAAE,IAAI;IACxB,UAAU,EACV,EACC;CACJ,CAAC;AAEF;;GAEG;AASH,MAAM,OAAO,uBAAuB;IAwIhC,iEAAiE;IACjE,YAAgE,aAAoE,EAC5F,QAAwB,EAC1C,eAAkC;QADhB,aAAQ,GAAR,QAAQ,CAAgB;QAC1C,oBAAe,GAAf,eAAe,CAAmB;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AQ,EAAE,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAC7G;YACI,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACrG;IACL,CAAC;;oHA5RQ,uBAAuB,kBAyIA,8BAA8B,6BAC1C,QAAQ;wGA1InB,uBAAuB,6LC7CpC,gMAEM,sUDwCU,CAAC,kBAAkB,CAAC;2FAGvB,uBAAuB;kBARnC,SAAS;+BAEI,kBAAkB,cAGhB,CAAC,kBAAkB,CAAC,mBACf,uBAAuB,CAAC,MAAM;;0BA2IlC,QAAQ;;0BAAI,MAAM;2BAAC,8BAA8B;;0BACjD,MAAM;2BAAC,QAAQ;4EArEjB,OAAO;sBADjB,KAAK;gBAoBK,KAAK;sBADf,KAAK;gBAiBK,QAAQ;sBADlB,KAAK;gBAeK,QAAQ;sBADlB,KAAK;gBAiBC,WAAW;sBADjB,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, Inject, Input, Type, OnInit, EventEmitter, Output, ChangeDetectorRef, OnDestroy} from '@angular/core';\nimport {extend} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../misc/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi} from '../../../services';\nimport {DateTimePicker, DateTimePickerOptions} from '../../misc/datetimePicker.interface';\nimport {DATE_TIME_PICKER_CONFIGURATION} from '../../misc/tokens';\nimport {DateTimeDayPickerComponent} from '../dayPicker/dayPicker.component';\nimport {DateTimeMonthPickerComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimeYearPickerComponent} from '../yearPicker/yearPicker.component';\nimport {scaleUpDownTrigger} from './picker.component.animations';\n\n//TODO - merge options\n\n/**\n * Default configuration for picker\n */\nconst defaultConfiguration: DateTimePickerOptions<DateTimePicker> =\n{\n defaultPeriod: 'day',\n pickerPeriodsDefinition:\n {\n 'day': DateTimeDayPickerComponent,\n 'month': DateTimeMonthPickerComponent,\n 'year': DateTimeYearPickerComponent\n },\n pickerPeriodsOrder: null,\n cssClasses:\n {\n }\n};\n\n/**\n * Component used for displaying date time picker\n */\n@Component(\n{\n selector: 'date-time-picker',\n templateUrl: 'picker.component.html',\n styleUrls: ['picker.component.css'],\n animations: [scaleUpDownTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerComponent<TDate = any> implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of active date time picker\n */\n protected _activePicker?: DateTimePicker<TDate>;\n\n /**\n * Name, id of displayed picker\n */\n protected _activePickerName!: string;\n\n /**\n * Array of available picker names\n */\n protected _pickerNames: string[] = [];\n\n /**\n * Current selected value\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * All subscriptions for active picker\n */\n protected _activePickerSubscriptions: Subscription = new Subscription();\n\n /**\n * Date that should be displayed in picker, used when moving up or down in periods\n */\n protected _display?: TDate;\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 /**\n * Current options used by picker\n */\n protected _options: DateTimePickerOptions<DateTimePicker<TDate>>;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Currently active date time picker component type\n * @internal\n */\n public activePickerComponent?: Type<DateTimePicker<TDate>>;\n\n /**\n * Active picker index\n * @internal\n */\n public activePickerIndex: number = 0;\n\n //######################### public properties - inputs #########################\n\n /**\n * Current options used by picker\n */\n @Input()\n public get options(): Partial<DateTimePickerOptions<DateTimePicker<TDate>>>\n {\n return this._options;\n }\n public set options(value: Partial<DateTimePickerOptions<DateTimePicker<TDate>>>)\n {\n this._options = extend(true, this._options, value);\n\n // without deep-copy for this attribute\n if (value?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = value.pickerPeriodsDefinition;\n }\n }\n\n /**\n * Current selected value\n */\n @Input()\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._activePicker?.setValue(value);\n this._activePicker?.invalidateVisuals();\n }\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n @Input()\n public get minValue(): TDate|null\n {\n return this._minValue;\n }\n public set minValue(value: TDate|null)\n {\n this._minValue = value;\n this._activePicker?.setMinValue(this._minValue);\n }\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n @Input()\n public get maxValue(): TDate|null\n {\n return this._maxValue;\n }\n public set maxValue(value: TDate|null)\n {\n this._maxValue = value;\n this._activePicker?.setMaxValue(this._maxValue);\n }\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(@Optional() @Inject(DATE_TIME_PICKER_CONFIGURATION) configuration: Partial<DateTimePickerOptions<DateTimePicker<TDate>>>,\n @Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\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 if (this._options.pickerPeriodsOrder)\n {\n if (Array.isArray(this._options.pickerPeriodsOrder))\n {\n this._pickerNames = this._options.pickerPeriodsOrder;\n }\n else\n {\n this._pickerNames = this._options.pickerPeriodsOrder.split(',')\n .map(x => x.trim())\n .filter(x => x);\n }\n }\n if (this._pickerNames && this._pickerNames.length > 0)\n {\n this._pickerNames.forEach(x => \n {\n if(!this._options.pickerPeriodsDefinition![x!])\n {\n throw new Error(`There is no period '${x}' in picker options`);\n }\n });\n }\n else\n {\n this._pickerNames = Object.keys(this._options.pickerPeriodsDefinition!);\n }\n\n if(this._pickerNames.findIndex(x => x == this._options.defaultPeriod) < 0)\n {\n throw new Error(`There is no period '${this._options.defaultPeriod}' in picker options`);\n }\n\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._options.defaultPeriod!];\n this._activePickerName = this._options.defaultPeriod!;\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._display = undefined;\n this._activePickerSubscriptions.unsubscribe();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles created or destroyed date time picker instance\n * @param picker - Instance of picker or null\n * @internal\n */\n public pickerCreated(picker: DateTimePicker<TDate>): void\n {\n if(picker == this._activePicker)\n {\n return;\n }\n\n this._activePicker = picker;\n\n this._activePickerSubscriptions.unsubscribe();\n this._activePickerSubscriptions = new Subscription();\n\n if(!this._activePicker)\n {\n return;\n }\n\n this._activePickerSubscriptions.add(picker.valueChange.subscribe(() =>\n {\n this._value = picker.value;\n this.valueChange.emit(this._value!);\n }));\n\n this._activePickerSubscriptions.add(picker.scaleUp.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) + 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n this._activePickerSubscriptions.add(picker.scaleDown.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) - 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n picker.setCanGoDown(this._pickerNames.indexOf(this._activePickerName) > 0);\n picker.setCanGoUp(this._pickerNames.indexOf(this._activePickerName) < this._pickerNames.length - 1);\n\n this._setPickerCssClasses();\n picker.setValue(this._value);\n picker.setMinValue(this._minValue);\n picker.setMaxValue(this._maxValue);\n picker.display(this._display ? this._dateApi.getValue(this._display) : this._dateApi.getValue(this._value?.from ?? this._dateApi.now().value));\n\n picker.invalidateVisuals();\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets picker css classes\n */\n protected _setPickerCssClasses(): void\n {\n if(!this._activePicker)\n {\n return;\n }\n\n //sets shared css\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerShared ?? {});\n\n if(this._options?.cssClasses?.pickerCustom && this._options?.cssClasses?.pickerCustom[this._activePickerName])\n {\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerCustom[this._activePickerName]);\n }\n }\n}\n","<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent\" (ngComponentOutletExCreated)=\"pickerCreated($event)\"></ng-template>\r\n</div>"]}
|