@anglr/datetime 1.0.0-beta.20220217103425 → 2.0.0
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 +12 -0
- package/date-fns/datetime-date-fns.d.ts +64 -0
- package/date-fns/datetime-date-fns.internal.d.ts +64 -0
- package/date-fns/package.json +7 -7
- package/date-fns/src/{date-fns.d.ts → index.d.ts} +4 -4
- package/date-fns/src/index.d.ts.map +1 -0
- package/date-fns/src/misc/tokens.d.ts +10 -10
- package/date-fns/src/services/dateFnsDateApi.service.d.ts +36 -33
- package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
- package/date-fns/src/services/dateFnsLocale.service.d.ts +10 -10
- package/date-fns/temp/datetime-date-fns.api.md +47 -0
- package/datetime.d.ts +1913 -5
- package/datetime.internal.d.ts +2090 -0
- package/es2015/date-fns/src/index.js +4 -0
- package/es2015/date-fns/src/index.js.map +1 -0
- package/es2015/date-fns/src/misc/tokens.js +20 -0
- package/es2015/date-fns/src/misc/tokens.js.map +1 -0
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js +438 -0
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
- package/es2015/date-fns/src/services/dateFnsLocale.service.js +2 -0
- package/es2015/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
- package/es2015/karma.conf.js +57 -0
- package/es2015/karma.conf.js.map +1 -0
- package/{moment/src/moment.d.ts → es2015/moment/src/index.js} +3 -3
- package/es2015/moment/src/index.js.map +1 -0
- package/es2015/moment/src/misc/tokens.js +15 -0
- package/es2015/moment/src/misc/tokens.js.map +1 -0
- package/es2015/moment/src/services/momentDateApi.service.js +398 -0
- package/es2015/moment/src/services/momentDateApi.service.js.map +1 -0
- package/{src/datetime.d.ts → es2015/src/index.js} +19 -19
- package/es2015/src/index.js.map +1 -0
- package/es2015/src/misc/constants.js +33 -0
- package/es2015/src/misc/constants.js.map +1 -0
- package/es2015/src/misc/datetime.interface.js +2 -0
- package/es2015/src/misc/datetime.interface.js.map +1 -0
- package/es2015/src/misc/tokens.js +19 -0
- package/es2015/src/misc/tokens.js.map +1 -0
- package/es2015/src/misc/validators.js +58 -0
- package/es2015/src/misc/validators.js.map +1 -0
- package/es2015/src/modules/datePipes.module.js +33 -0
- package/es2015/src/modules/datePipes.module.js.map +1 -0
- package/es2015/src/picker/components/dayPicker/dayPicker.component.js +172 -0
- package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
- package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
- package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
- package/es2015/src/picker/components/monthPicker/monthPicker.component.js +114 -0
- package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
- package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
- package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
- package/es2015/src/picker/components/picker/picker.component.animations.js +71 -0
- package/es2015/src/picker/components/picker/picker.component.animations.js.map +1 -0
- package/es2015/src/picker/components/picker/picker.component.js +241 -0
- package/es2015/src/picker/components/picker/picker.component.js.map +1 -0
- package/es2015/src/picker/components/pickerBase.component.js +243 -0
- package/es2015/src/picker/components/pickerBase.component.js.map +1 -0
- package/es2015/src/picker/components/yearPicker/yearPicker.component.js +126 -0
- package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
- package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
- package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
- package/es2015/src/picker/interfaces.js +5 -0
- package/es2015/src/picker/interfaces.js.map +1 -0
- package/es2015/src/picker/misc/datetimePicker.interface.js +2 -0
- package/es2015/src/picker/misc/datetimePicker.interface.js.map +1 -0
- package/es2015/src/picker/misc/tokens.js +6 -0
- package/es2015/src/picker/misc/tokens.js.map +1 -0
- package/es2015/src/picker/modules/picker.module.js +46 -0
- package/es2015/src/picker/modules/picker.module.js.map +1 -0
- package/es2015/src/picker/types.js +8 -0
- package/es2015/src/picker/types.js.map +1 -0
- package/es2015/src/pipes/asRequiredType.js +22 -0
- package/es2015/src/pipes/asRequiredType.js.map +1 -0
- package/es2015/src/pipes/dateConvert.pipe.js +35 -0
- package/es2015/src/pipes/dateConvert.pipe.js.map +1 -0
- package/es2015/src/pipes/dateFormat.pipe.js +45 -0
- package/es2015/src/pipes/dateFormat.pipe.js.map +1 -0
- package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +421 -0
- package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
- package/es2015/src/selector/components/selector/selector.component.animations.js +15 -0
- package/es2015/src/selector/components/selector/selector.component.animations.js.map +1 -0
- package/es2015/src/selector/components/selector/selector.component.js +344 -0
- package/es2015/src/selector/components/selector/selector.component.js.map +1 -0
- package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +317 -0
- package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
- package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
- package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
- package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
- package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
- package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
- package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
- package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +119 -0
- package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
- package/es2015/src/selector/interfaces.js +2 -0
- package/es2015/src/selector/interfaces.js.map +1 -0
- package/es2015/src/selector/misc/datetimeSelector.interface.js +2 -0
- package/es2015/src/selector/misc/datetimeSelector.interface.js.map +1 -0
- package/es2015/src/selector/misc/tokens.js +6 -0
- package/es2015/src/selector/misc/tokens.js.map +1 -0
- package/es2015/src/selector/modules/basicSelector.module.js +20 -0
- package/es2015/src/selector/modules/basicSelector.module.js.map +1 -0
- package/es2015/src/selector/modules/selector.module.js +60 -0
- package/es2015/src/selector/modules/selector.module.js.map +1 -0
- package/es2015/src/selector/types.js +10 -0
- package/es2015/src/selector/types.js.map +1 -0
- package/es2015/src/services/dateApi.interface.js +2 -0
- package/es2015/src/services/dateApi.interface.js.map +1 -0
- package/es2015/src/services/datePositionParser.interface.js +2 -0
- package/es2015/src/services/datePositionParser.interface.js.map +1 -0
- package/es2015/src/services/datePositionParser.service.js +227 -0
- package/es2015/src/services/datePositionParser.service.js.map +1 -0
- package/es2015/src/services/dateTimeRelativeParser.service.js +66 -0
- package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -0
- package/es2015/src/services/dateValueProvider.service.js +58 -0
- package/es2015/src/services/dateValueProvider.service.js.map +1 -0
- package/es2015/src/services/formatProvider.interface.js +2 -0
- package/es2015/src/services/formatProvider.interface.js.map +1 -0
- package/es2015/src/services/index.js +4 -0
- package/es2015/src/services/index.js.map +1 -0
- package/es2020/date-fns/src/index.js +4 -0
- package/es2020/date-fns/src/index.js.map +1 -0
- package/es2020/date-fns/src/misc/tokens.js +20 -0
- package/es2020/date-fns/src/misc/tokens.js.map +1 -0
- package/es2020/date-fns/src/services/dateFnsDateApi.service.js +437 -0
- package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
- package/es2020/date-fns/src/services/dateFnsLocale.service.js +2 -0
- package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
- package/es2020/karma.conf.js +57 -0
- package/es2020/karma.conf.js.map +1 -0
- package/es2020/moment/src/index.js +3 -0
- package/es2020/moment/src/index.js.map +1 -0
- package/es2020/moment/src/misc/tokens.js +15 -0
- package/es2020/moment/src/misc/tokens.js.map +1 -0
- package/es2020/moment/src/services/momentDateApi.service.js +398 -0
- package/es2020/moment/src/services/momentDateApi.service.js.map +1 -0
- package/es2020/src/index.js +19 -0
- package/es2020/src/index.js.map +1 -0
- package/es2020/src/misc/constants.js +33 -0
- package/es2020/src/misc/constants.js.map +1 -0
- package/es2020/src/misc/datetime.interface.js +2 -0
- package/es2020/src/misc/datetime.interface.js.map +1 -0
- package/es2020/src/misc/tokens.js +19 -0
- package/es2020/src/misc/tokens.js.map +1 -0
- package/es2020/src/misc/validators.js +58 -0
- package/es2020/src/misc/validators.js.map +1 -0
- package/es2020/src/modules/datePipes.module.js +33 -0
- package/es2020/src/modules/datePipes.module.js.map +1 -0
- package/es2020/src/picker/components/dayPicker/dayPicker.component.js +172 -0
- package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
- package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
- package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
- package/es2020/src/picker/components/monthPicker/monthPicker.component.js +114 -0
- package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
- package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
- package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
- package/es2020/src/picker/components/picker/picker.component.animations.js +71 -0
- package/es2020/src/picker/components/picker/picker.component.animations.js.map +1 -0
- package/es2020/src/picker/components/picker/picker.component.js +236 -0
- package/es2020/src/picker/components/picker/picker.component.js.map +1 -0
- package/es2020/src/picker/components/pickerBase.component.js +243 -0
- package/es2020/src/picker/components/pickerBase.component.js.map +1 -0
- package/es2020/src/picker/components/yearPicker/yearPicker.component.js +126 -0
- package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
- package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
- package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
- package/es2020/src/picker/interfaces.js +5 -0
- package/es2020/src/picker/interfaces.js.map +1 -0
- package/es2020/src/picker/misc/datetimePicker.interface.js +2 -0
- package/es2020/src/picker/misc/datetimePicker.interface.js.map +1 -0
- package/es2020/src/picker/misc/tokens.js +6 -0
- package/es2020/src/picker/misc/tokens.js.map +1 -0
- package/es2020/src/picker/modules/picker.module.js +46 -0
- package/es2020/src/picker/modules/picker.module.js.map +1 -0
- package/es2020/src/picker/types.js +8 -0
- package/es2020/src/picker/types.js.map +1 -0
- package/es2020/src/pipes/asRequiredType.js +22 -0
- package/es2020/src/pipes/asRequiredType.js.map +1 -0
- package/es2020/src/pipes/dateConvert.pipe.js +35 -0
- package/es2020/src/pipes/dateConvert.pipe.js.map +1 -0
- package/es2020/src/pipes/dateFormat.pipe.js +45 -0
- package/es2020/src/pipes/dateFormat.pipe.js.map +1 -0
- package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js +417 -0
- package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
- package/es2020/src/selector/components/selector/selector.component.animations.js +15 -0
- package/es2020/src/selector/components/selector/selector.component.animations.js.map +1 -0
- package/es2020/src/selector/components/selector/selector.component.js +334 -0
- package/es2020/src/selector/components/selector/selector.component.js.map +1 -0
- package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +314 -0
- package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
- package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
- package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
- package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
- package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
- package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
- package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
- package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +118 -0
- package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
- package/es2020/src/selector/interfaces.js +2 -0
- package/es2020/src/selector/interfaces.js.map +1 -0
- package/es2020/src/selector/misc/datetimeSelector.interface.js +2 -0
- package/es2020/src/selector/misc/datetimeSelector.interface.js.map +1 -0
- package/es2020/src/selector/misc/tokens.js +6 -0
- package/es2020/src/selector/misc/tokens.js.map +1 -0
- package/es2020/src/selector/modules/basicSelector.module.js +20 -0
- package/es2020/src/selector/modules/basicSelector.module.js.map +1 -0
- package/es2020/src/selector/modules/selector.module.js +60 -0
- package/es2020/src/selector/modules/selector.module.js.map +1 -0
- package/es2020/src/selector/types.js +10 -0
- package/es2020/src/selector/types.js.map +1 -0
- package/es2020/src/services/dateApi.interface.js +2 -0
- package/es2020/src/services/dateApi.interface.js.map +1 -0
- package/es2020/src/services/datePositionParser.interface.js +2 -0
- package/es2020/src/services/datePositionParser.interface.js.map +1 -0
- package/es2020/src/services/datePositionParser.service.js +227 -0
- package/es2020/src/services/datePositionParser.service.js.map +1 -0
- package/es2020/src/services/dateTimeRelativeParser.service.js +65 -0
- package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -0
- package/es2020/src/services/dateValueProvider.service.js +58 -0
- package/es2020/src/services/dateValueProvider.service.js.map +1 -0
- package/es2020/src/services/formatProvider.interface.js +2 -0
- package/es2020/src/services/formatProvider.interface.js.map +1 -0
- package/es2020/src/services/index.js +4 -0
- package/es2020/src/services/index.js.map +1 -0
- package/karma.conf.d.ts +2 -0
- package/karma.conf.d.ts.map +1 -0
- package/moment/datetime-moment.d.ts +47 -0
- package/moment/datetime-moment.internal.d.ts +47 -0
- package/moment/package.json +7 -7
- package/moment/src/index.d.ts +3 -0
- package/moment/src/index.d.ts.map +1 -0
- package/moment/src/misc/tokens.d.ts +5 -5
- package/moment/src/services/momentDateApi.service.d.ts +35 -32
- package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
- package/moment/temp/datetime-moment.api.md +36 -0
- package/package.json +91 -48
- package/src/index.d.ts +19 -0
- package/src/index.d.ts.map +1 -0
- package/src/misc/constants.d.ts +32 -32
- package/src/misc/datetime.interface.d.ts +34 -34
- package/src/misc/tokens.d.ts +10 -10
- package/src/misc/validators.d.ts +25 -25
- package/src/modules/datePipes.module.d.ts +12 -5
- package/src/modules/datePipes.module.d.ts.map +1 -1
- package/src/picker/components/dayPicker/dayPicker.component.d.ts +68 -65
- package/src/picker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
- package/src/picker/components/dayPicker/dayPicker.component.html +7 -7
- package/src/picker/components/dayPicker/dayPicker.interfaces.d.ts +10 -10
- package/src/picker/components/monthPicker/monthPicker.component.d.ts +52 -49
- package/src/picker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
- package/src/picker/components/monthPicker/monthPicker.component.html +6 -6
- package/src/picker/components/monthPicker/monthPicker.interfaces.d.ts +6 -6
- package/src/picker/components/picker/picker.component.animations.d.ts +4 -4
- package/src/picker/components/picker/picker.component.d.ts +104 -101
- package/src/picker/components/picker/picker.component.d.ts.map +1 -1
- package/src/picker/components/pickerBase.component.d.ts +169 -166
- package/src/picker/components/pickerBase.component.d.ts.map +1 -1
- package/src/picker/components/yearPicker/yearPicker.component.d.ts +57 -54
- package/src/picker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
- package/src/picker/components/yearPicker/yearPicker.component.html +6 -6
- package/src/picker/components/yearPicker/yearPicker.interfaces.d.ts +6 -6
- package/src/picker/interfaces.d.ts +4 -4
- package/src/picker/misc/datetimePicker.interface.d.ts +188 -188
- package/src/picker/misc/tokens.d.ts +6 -6
- package/src/picker/modules/picker.module.d.ts +16 -5
- package/src/picker/modules/picker.module.d.ts.map +1 -1
- package/src/picker/types.d.ts +7 -7
- package/src/pipes/asRequiredType.d.ts +21 -0
- package/src/pipes/asRequiredType.d.ts.map +1 -0
- package/src/pipes/dateConvert.pipe.d.ts +18 -15
- package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
- package/src/pipes/dateFormat.pipe.d.ts +20 -17
- package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
- package/src/selector/components/inputDateTime/inputDateTime.component.d.ts +187 -184
- package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
- package/src/selector/components/selector/selector.component.animations.d.ts +4 -4
- package/src/selector/components/selector/selector.component.d.ts +155 -152
- package/src/selector/components/selector/selector.component.d.ts.map +1 -1
- package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +170 -167
- package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
- package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +22 -19
- package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
- package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +22 -19
- package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
- package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts +21 -18
- package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +1 -1
- package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +53 -50
- package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
- package/src/selector/interfaces.d.ts +1 -1
- package/src/selector/misc/datetimeSelector.interface.d.ts +82 -82
- package/src/selector/misc/tokens.d.ts +6 -6
- package/src/selector/modules/basicSelector.module.d.ts +10 -5
- package/src/selector/modules/basicSelector.module.d.ts.map +1 -1
- package/src/selector/modules/selector.module.d.ts +18 -5
- package/src/selector/modules/selector.module.d.ts.map +1 -1
- package/src/selector/types.d.ts +9 -9
- package/src/services/dateApi.interface.d.ts +275 -275
- package/src/services/datePositionParser.interface.d.ts +40 -40
- package/src/services/datePositionParser.service.d.ts +60 -57
- package/src/services/datePositionParser.service.d.ts.map +1 -1
- package/src/services/dateTimeRelativeParser.service.d.ts +21 -18
- package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
- package/src/services/dateValueProvider.service.d.ts +18 -15
- package/src/services/dateValueProvider.service.d.ts.map +1 -1
- package/src/services/formatProvider.interface.d.ts +17 -17
- package/src/services/index.d.ts +3 -3
- package/tsconfig.karma.json +5 -6
- package/version.bak +1 -1
- package/appveyor.yml +0 -70
- package/date-fns/dist/es2015/date-fns/index.js +0 -10
- package/date-fns/dist/es2015/date-fns/public_api.js +0 -7
- package/date-fns/dist/es2015/date-fns/src/date-fns.js +0 -9
- package/date-fns/dist/es2015/date-fns/src/misc/tokens.js +0 -32
- package/date-fns/dist/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -512
- package/date-fns/dist/es2015/date-fns/src/services/dateFnsLocale.service.js +0 -18
- package/date-fns/dist/es5/date-fns/index.js +0 -10
- package/date-fns/dist/es5/date-fns/public_api.js +0 -7
- package/date-fns/dist/es5/date-fns/src/date-fns.js +0 -9
- package/date-fns/dist/es5/date-fns/src/misc/tokens.js +0 -32
- package/date-fns/dist/es5/date-fns/src/services/dateFnsDateApi.service.js +0 -902
- package/date-fns/dist/es5/date-fns/src/services/dateFnsLocale.service.js +0 -18
- package/date-fns/index.d.ts +0 -5
- package/date-fns/index.d.ts.map +0 -1
- package/date-fns/index.metadata.json +0 -1
- package/date-fns/public_api.d.ts +0 -2
- package/date-fns/public_api.d.ts.map +0 -1
- package/date-fns/src/date-fns.d.ts.map +0 -1
- package/date-fns/src/services/dateFnsDateApi.service.ngfactory.d.ts.map +0 -1
- package/datetime.d.ts.map +0 -1
- package/datetime.metadata.json +0 -1
- package/dist/es2015/datetime.js +0 -10
- package/dist/es2015/public_api.js +0 -7
- package/dist/es2015/src/datetime.js +0 -24
- package/dist/es2015/src/misc/constants.js +0 -46
- package/dist/es2015/src/misc/datetime.interface.js +0 -52
- package/dist/es2015/src/misc/tokens.js +0 -29
- package/dist/es2015/src/misc/validators.js +0 -80
- package/dist/es2015/src/modules/datePipes.module.js +0 -26
- package/dist/es2015/src/picker/components/dayPicker/dayPicker.component.js +0 -215
- package/dist/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
- package/dist/es2015/src/picker/components/monthPicker/monthPicker.component.js +0 -138
- package/dist/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
- package/dist/es2015/src/picker/components/picker/picker.component.animations.js +0 -77
- package/dist/es2015/src/picker/components/picker/picker.component.js +0 -386
- package/dist/es2015/src/picker/components/pickerBase.component.js +0 -406
- package/dist/es2015/src/picker/components/yearPicker/yearPicker.component.js +0 -158
- package/dist/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
- package/dist/es2015/src/picker/interfaces.js +0 -10
- package/dist/es2015/src/picker/misc/datetimePicker.interface.js +0 -245
- package/dist/es2015/src/picker/misc/tokens.js +0 -12
- package/dist/es2015/src/picker/modules/picker.module.js +0 -35
- package/dist/es2015/src/picker/types.js +0 -13
- package/dist/es2015/src/pipes/dateConvert.pipe.js +0 -50
- package/dist/es2015/src/pipes/dateFormat.pipe.js +0 -64
- package/dist/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +0 -588
- package/dist/es2015/src/selector/components/selector/selector.component.animations.js +0 -21
- package/dist/es2015/src/selector/components/selector/selector.component.js +0 -514
- package/dist/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -456
- package/dist/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -73
- package/dist/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -73
- package/dist/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -70
- package/dist/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -171
- package/dist/es2015/src/selector/interfaces.js +0 -7
- package/dist/es2015/src/selector/misc/datetimeSelector.interface.js +0 -106
- package/dist/es2015/src/selector/misc/tokens.js +0 -12
- package/dist/es2015/src/selector/modules/basicSelector.module.js +0 -20
- package/dist/es2015/src/selector/modules/selector.module.js +0 -45
- package/dist/es2015/src/selector/types.js +0 -15
- package/dist/es2015/src/services/dateApi.interface.js +0 -316
- package/dist/es2015/src/services/datePositionParser.interface.js +0 -56
- package/dist/es2015/src/services/datePositionParser.service.js +0 -297
- package/dist/es2015/src/services/dateTimeRelativeParser.service.js +0 -97
- package/dist/es2015/src/services/dateValueProvider.service.js +0 -79
- package/dist/es2015/src/services/formatProvider.interface.js +0 -28
- package/dist/es2015/src/services/index.js +0 -9
- package/dist/es5/datetime.js +0 -10
- package/dist/es5/public_api.js +0 -7
- package/dist/es5/src/datetime.js +0 -24
- package/dist/es5/src/misc/constants.js +0 -46
- package/dist/es5/src/misc/datetime.interface.js +0 -52
- package/dist/es5/src/misc/tokens.js +0 -29
- package/dist/es5/src/misc/validators.js +0 -124
- package/dist/es5/src/modules/datePipes.module.js +0 -30
- package/dist/es5/src/picker/components/dayPicker/dayPicker.component.js +0 -323
- package/dist/es5/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
- package/dist/es5/src/picker/components/monthPicker/monthPicker.component.js +0 -233
- package/dist/es5/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
- package/dist/es5/src/picker/components/picker/picker.component.animations.js +0 -77
- package/dist/es5/src/picker/components/picker/picker.component.js +0 -460
- package/dist/es5/src/picker/components/pickerBase.component.js +0 -561
- package/dist/es5/src/picker/components/yearPicker/yearPicker.component.js +0 -253
- package/dist/es5/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
- package/dist/es5/src/picker/interfaces.js +0 -10
- package/dist/es5/src/picker/misc/datetimePicker.interface.js +0 -245
- package/dist/es5/src/picker/misc/tokens.js +0 -12
- package/dist/es5/src/picker/modules/picker.module.js +0 -39
- package/dist/es5/src/picker/types.js +0 -13
- package/dist/es5/src/pipes/dateConvert.pipe.js +0 -63
- package/dist/es5/src/pipes/dateFormat.pipe.js +0 -79
- package/dist/es5/src/selector/components/inputDateTime/inputDateTime.component.js +0 -808
- package/dist/es5/src/selector/components/selector/selector.component.animations.js +0 -21
- package/dist/es5/src/selector/components/selector/selector.component.js +0 -653
- package/dist/es5/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -656
- package/dist/es5/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -84
- package/dist/es5/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -84
- package/dist/es5/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -82
- package/dist/es5/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -230
- package/dist/es5/src/selector/interfaces.js +0 -7
- package/dist/es5/src/selector/misc/datetimeSelector.interface.js +0 -106
- package/dist/es5/src/selector/misc/tokens.js +0 -12
- package/dist/es5/src/selector/modules/basicSelector.module.js +0 -24
- package/dist/es5/src/selector/modules/selector.module.js +0 -49
- package/dist/es5/src/selector/types.js +0 -15
- package/dist/es5/src/services/dateApi.interface.js +0 -316
- package/dist/es5/src/services/datePositionParser.interface.js +0 -56
- package/dist/es5/src/services/datePositionParser.service.js +0 -366
- package/dist/es5/src/services/dateTimeRelativeParser.service.js +0 -108
- package/dist/es5/src/services/dateValueProvider.service.js +0 -92
- package/dist/es5/src/services/formatProvider.interface.js +0 -28
- package/dist/es5/src/services/index.js +0 -9
- package/moment/dist/es2015/moment/index.js +0 -10
- package/moment/dist/es2015/moment/public_api.js +0 -7
- package/moment/dist/es2015/moment/src/misc/tokens.js +0 -26
- package/moment/dist/es2015/moment/src/moment.js +0 -8
- package/moment/dist/es2015/moment/src/services/momentDateApi.service.js +0 -466
- package/moment/dist/es5/moment/index.js +0 -10
- package/moment/dist/es5/moment/public_api.js +0 -7
- package/moment/dist/es5/moment/src/misc/tokens.js +0 -26
- package/moment/dist/es5/moment/src/moment.js +0 -8
- package/moment/dist/es5/moment/src/services/momentDateApi.service.js +0 -858
- package/moment/index.d.ts +0 -5
- package/moment/index.d.ts.map +0 -1
- package/moment/index.metadata.json +0 -1
- package/moment/public_api.d.ts +0 -2
- package/moment/public_api.d.ts.map +0 -1
- package/moment/src/moment.d.ts.map +0 -1
- package/moment/src/services/momentDateApi.service.ngfactory.d.ts.map +0 -1
- package/public_api.d.ts +0 -2
- package/public_api.d.ts.map +0 -1
- package/src/datetime.d.ts.map +0 -1
- package/src/modules/datePipes.module.ngfactory.d.ts.map +0 -1
- package/src/picker/components/dayPicker/dayPicker.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/picker/components/dayPicker/dayPicker.component.ngfactory.d.ts.map +0 -1
- package/src/picker/components/monthPicker/monthPicker.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/picker/components/monthPicker/monthPicker.component.ngfactory.d.ts.map +0 -1
- package/src/picker/components/picker/picker.component.ngfactory.d.ts.map +0 -1
- package/src/picker/components/yearPicker/yearPicker.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/picker/components/yearPicker/yearPicker.component.ngfactory.d.ts.map +0 -1
- package/src/picker/modules/picker.module.ngfactory.d.ts.map +0 -1
- package/src/pipes/dateConvert.pipe.ngfactory.d.ts.map +0 -1
- package/src/pipes/dateFormat.pipe.ngfactory.d.ts.map +0 -1
- package/src/selector/components/inputDateTime/inputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/selector/components/inputDateTime/inputDateTime.component.ngfactory.d.ts.map +0 -1
- package/src/selector/components/selector/selector.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/selector/components/selector/selector.component.ngfactory.d.ts.map +0 -1
- package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
- package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.ngfactory.d.ts.map +0 -1
- package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ngfactory.d.ts.map +0 -1
- package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ngfactory.d.ts.map +0 -1
- package/src/selector/directives/datetimeValidator/datetimeValidator.directive.ngfactory.d.ts.map +0 -1
- package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ngfactory.d.ts.map +0 -1
- package/src/selector/modules/basicSelector.module.ngfactory.d.ts.map +0 -1
- package/src/selector/modules/selector.module.ngfactory.d.ts.map +0 -1
- package/src/services/datePositionParser.service.ngfactory.d.ts.map +0 -1
- package/src/services/dateTimeRelativeParser.service.ngfactory.d.ts.map +0 -1
- package/src/services/dateValueProvider.service.ngfactory.d.ts.map +0 -1
|
@@ -0,0 +1,2090 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
3
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import { Dictionary } from '@jscrpt/common';
|
|
6
|
+
import { ElementRef } from '@angular/core';
|
|
7
|
+
import { EventEmitter } from '@angular/core';
|
|
8
|
+
import * as i0 from '@angular/core';
|
|
9
|
+
import * as i7 from '@angular/common';
|
|
10
|
+
import * as i8 from '@anglr/common';
|
|
11
|
+
import { InjectionToken } from '@angular/core';
|
|
12
|
+
import { Injector } from '@angular/core';
|
|
13
|
+
import { Observable } from 'rxjs';
|
|
14
|
+
import { OnChanges } from '@angular/core';
|
|
15
|
+
import { OnDestroy } from '@angular/core';
|
|
16
|
+
import { OnInit } from '@angular/core';
|
|
17
|
+
import { PipeTransform } from '@angular/core';
|
|
18
|
+
import { SimpleChanges } from '@angular/core';
|
|
19
|
+
import { Subject } from 'rxjs';
|
|
20
|
+
import { Subscription } from 'rxjs';
|
|
21
|
+
import { Type } from '@angular/core';
|
|
22
|
+
import { ValidationErrors } from '@angular/forms';
|
|
23
|
+
import { Validator } from '@angular/forms';
|
|
24
|
+
import { ValidatorFn } from '@angular/forms';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Transforms type to required from nullable or undefined type
|
|
28
|
+
*/
|
|
29
|
+
declare class AsRequiredTypePipe implements PipeTransform {
|
|
30
|
+
/**
|
|
31
|
+
* Transforms type to required from nullable or undefined type
|
|
32
|
+
* @param value - Value to be transformed
|
|
33
|
+
* @param defaultValue - Default value to be used if undefined or null
|
|
34
|
+
*/
|
|
35
|
+
transform(value: NgClassType, defaultValue?: string): Exclude<NgClassType, undefined | null>;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsRequiredTypePipe, never>;
|
|
37
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AsRequiredTypePipe, "asRequiredType">;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Shared css classes for all pickers
|
|
42
|
+
*/
|
|
43
|
+
export declare interface CommonPickerCssClasses {
|
|
44
|
+
/**
|
|
45
|
+
* Period selection element wrapping displayed period and previous, next buttons
|
|
46
|
+
*/
|
|
47
|
+
periodSelection?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Element used for switching period to previous one
|
|
50
|
+
*/
|
|
51
|
+
previousPeriod?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Element used for switching period to next one
|
|
54
|
+
*/
|
|
55
|
+
nextPeriod?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Element representing currently displayed period
|
|
58
|
+
*/
|
|
59
|
+
periodValue?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Element wrapping displayed period data
|
|
62
|
+
*/
|
|
63
|
+
periodData?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Element representing single datum for period item
|
|
66
|
+
*/
|
|
67
|
+
periodDatum?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Injection token used for obtaining DateApi implementation
|
|
72
|
+
*/
|
|
73
|
+
export declare const DATE_API: InjectionToken<DateApi>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Injection token used for obtaining datetime picker configuration
|
|
77
|
+
*/
|
|
78
|
+
export declare const DATE_TIME_PICKER_CONFIGURATION: InjectionToken<DateTimePickerOptions<any>>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Injection token used for obtaining datetime selector configuration
|
|
82
|
+
*/
|
|
83
|
+
export declare const DATE_TIME_SELECTOR_CONFIGURATION: InjectionToken<DateTimeSelectorOptions<any>>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Date api abstraction, used for obtaining DateApi wrapper object
|
|
87
|
+
*/
|
|
88
|
+
export declare interface DateApi<TDate = any> {
|
|
89
|
+
/**
|
|
90
|
+
* Gets wrapping object used for manipulation
|
|
91
|
+
* @param value - Value to be converted (parsed) and used for manipulation
|
|
92
|
+
* @param format - Format string used for parsing string value
|
|
93
|
+
*/
|
|
94
|
+
getValue(value: DateValue | TDate, format?: string): DateApiObject<TDate>;
|
|
95
|
+
/**
|
|
96
|
+
* Gets wrapping object used for manipulation instantiated to current date and time
|
|
97
|
+
*/
|
|
98
|
+
now(): DateApiObject<TDate>;
|
|
99
|
+
/**
|
|
100
|
+
* Gets format string using pseudo format
|
|
101
|
+
* @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string
|
|
102
|
+
*/
|
|
103
|
+
getFormat(pseudoFormat: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* Gets information
|
|
106
|
+
*/
|
|
107
|
+
weekStartsOnMonday(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Gets array of weekday names in short format, order of days is dependent on locale
|
|
110
|
+
*/
|
|
111
|
+
weekdaysShort(): string[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Instance of object wrapping TDate, allowing manipulation with it
|
|
116
|
+
*/
|
|
117
|
+
export declare interface DateApiObject<TDate = any> {
|
|
118
|
+
/**
|
|
119
|
+
* Original value that is not changed unless 'updateOriginal' is called
|
|
120
|
+
*/
|
|
121
|
+
readonly originalValue: TDate;
|
|
122
|
+
/**
|
|
123
|
+
* Instance of date
|
|
124
|
+
*/
|
|
125
|
+
readonly value: TDate;
|
|
126
|
+
/**
|
|
127
|
+
* Gets indication whether provided instance of date is valid
|
|
128
|
+
*/
|
|
129
|
+
isValid(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Gets indication whether provided instance of date is weekend day
|
|
132
|
+
*/
|
|
133
|
+
isWeekend(): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Formats date value
|
|
136
|
+
* @param format - Format token used for creating formatted string
|
|
137
|
+
*/
|
|
138
|
+
format(format: string): string;
|
|
139
|
+
/**
|
|
140
|
+
* Updates value to start date and time of current decade
|
|
141
|
+
* @returns Itself for fluent API
|
|
142
|
+
*/
|
|
143
|
+
startOfDecade(): DateApiObject<TDate>;
|
|
144
|
+
/**
|
|
145
|
+
* Updates value to end date and time of current decade
|
|
146
|
+
* @returns Itself for fluent API
|
|
147
|
+
*/
|
|
148
|
+
endOfDecade(): DateApiObject<TDate>;
|
|
149
|
+
/**
|
|
150
|
+
* Updates value to start date and time of current year
|
|
151
|
+
* @returns Itself for fluent API
|
|
152
|
+
*/
|
|
153
|
+
startOfYear(): DateApiObject<TDate>;
|
|
154
|
+
/**
|
|
155
|
+
* Updates value to end date and time of current year
|
|
156
|
+
* @returns Itself for fluent API
|
|
157
|
+
*/
|
|
158
|
+
endOfYear(): DateApiObject<TDate>;
|
|
159
|
+
/**
|
|
160
|
+
* Add years, if count not specified adds 1 year
|
|
161
|
+
* @param count - Number of years count
|
|
162
|
+
* @returns Itself for fluent API
|
|
163
|
+
*/
|
|
164
|
+
addYears(count?: number): DateApiObject<TDate>;
|
|
165
|
+
/**
|
|
166
|
+
* Subtract years, if count not specified subtract 1 year
|
|
167
|
+
* @param count - Number of years count
|
|
168
|
+
* @returns Itself for fluent API
|
|
169
|
+
*/
|
|
170
|
+
subtractYears(count?: number): DateApiObject<TDate>;
|
|
171
|
+
/**
|
|
172
|
+
* Updates value to start date and time of current month
|
|
173
|
+
* @returns Itself for fluent API
|
|
174
|
+
*/
|
|
175
|
+
startOfMonth(): DateApiObject<TDate>;
|
|
176
|
+
/**
|
|
177
|
+
* Updates value to end date and time of current month
|
|
178
|
+
* @returns Itself for fluent API
|
|
179
|
+
*/
|
|
180
|
+
endOfMonth(): DateApiObject<TDate>;
|
|
181
|
+
/**
|
|
182
|
+
* Add months, if count not specified adds 1 month
|
|
183
|
+
* @param count - Number of months count
|
|
184
|
+
* @returns Itself for fluent API
|
|
185
|
+
*/
|
|
186
|
+
addMonths(count?: number): DateApiObject<TDate>;
|
|
187
|
+
/**
|
|
188
|
+
* Subtract months, if count not specified subtract 1 month
|
|
189
|
+
* @param count - Number of months count
|
|
190
|
+
* @returns Itself for fluent API
|
|
191
|
+
*/
|
|
192
|
+
subtractMonths(count?: number): DateApiObject<TDate>;
|
|
193
|
+
/**
|
|
194
|
+
* Updates value to start date and time of current week
|
|
195
|
+
* @returns Itself for fluent API
|
|
196
|
+
*/
|
|
197
|
+
startOfWeek(): DateApiObject<TDate>;
|
|
198
|
+
/**
|
|
199
|
+
* Updates value to end date and time of current week
|
|
200
|
+
* @returns Itself for fluent API
|
|
201
|
+
*/
|
|
202
|
+
endOfWeek(): DateApiObject<TDate>;
|
|
203
|
+
/**
|
|
204
|
+
* Add weeks, if count not specified adds 1 week
|
|
205
|
+
* @param count - Number of weeks count
|
|
206
|
+
* @returns Itself for fluent API
|
|
207
|
+
*/
|
|
208
|
+
addWeeks(count?: number): DateApiObject<TDate>;
|
|
209
|
+
/**
|
|
210
|
+
* Subtract weeks, if count not specified subtract 1 week
|
|
211
|
+
* @param count - Number of weeks count
|
|
212
|
+
* @returns Itself for fluent API
|
|
213
|
+
*/
|
|
214
|
+
subtractWeeks(count?: number): DateApiObject<TDate>;
|
|
215
|
+
/**
|
|
216
|
+
* Updates value to start date and time of current day
|
|
217
|
+
* @returns Itself for fluent API
|
|
218
|
+
*/
|
|
219
|
+
startOfDay(): DateApiObject<TDate>;
|
|
220
|
+
/**
|
|
221
|
+
* Updates value to end date and time of current day
|
|
222
|
+
* @returns Itself for fluent API
|
|
223
|
+
*/
|
|
224
|
+
endOfDay(): DateApiObject<TDate>;
|
|
225
|
+
/**
|
|
226
|
+
* Add days, if count not specified adds 1 day
|
|
227
|
+
* @param count - Number of days count
|
|
228
|
+
* @returns Itself for fluent API
|
|
229
|
+
*/
|
|
230
|
+
addDays(count?: number): DateApiObject<TDate>;
|
|
231
|
+
/**
|
|
232
|
+
* Subtract days, if count not specified subtract 1 day
|
|
233
|
+
* @param count - Number of days count
|
|
234
|
+
* @returns Itself for fluent API
|
|
235
|
+
*/
|
|
236
|
+
subtractDays(count?: number): DateApiObject<TDate>;
|
|
237
|
+
/**
|
|
238
|
+
* Gets number of days in month
|
|
239
|
+
*/
|
|
240
|
+
daysInMonth(): number;
|
|
241
|
+
/**
|
|
242
|
+
* Gets year
|
|
243
|
+
*/
|
|
244
|
+
year(): number;
|
|
245
|
+
/**
|
|
246
|
+
* Sets year
|
|
247
|
+
* @param year - Year to be set
|
|
248
|
+
*/
|
|
249
|
+
year(year: number): DateApiObject<TDate>;
|
|
250
|
+
/**
|
|
251
|
+
* Gets or sets year
|
|
252
|
+
* @param year - If specified, sets year
|
|
253
|
+
*/
|
|
254
|
+
year(year?: number): DateApiObject<TDate> | number;
|
|
255
|
+
/**
|
|
256
|
+
* Gets month
|
|
257
|
+
*/
|
|
258
|
+
month(): number;
|
|
259
|
+
/**
|
|
260
|
+
* Sets month
|
|
261
|
+
* @param month - Month to be set
|
|
262
|
+
*/
|
|
263
|
+
month(month: number): DateApiObject<TDate>;
|
|
264
|
+
/**
|
|
265
|
+
* Gets or sets month
|
|
266
|
+
* @param month - If specified, sets month
|
|
267
|
+
*/
|
|
268
|
+
month(month?: number): DateApiObject<TDate> | number;
|
|
269
|
+
/**
|
|
270
|
+
* Gets day of month one based
|
|
271
|
+
*/
|
|
272
|
+
dayOfMonth(): number;
|
|
273
|
+
/**
|
|
274
|
+
* Sets day of month one based
|
|
275
|
+
* @param day - Day of month to be set
|
|
276
|
+
*/
|
|
277
|
+
dayOfMonth(day: number): DateApiObject<TDate>;
|
|
278
|
+
/**
|
|
279
|
+
* Gets or sets day of month one based
|
|
280
|
+
* @param day - If specified, sets day of month
|
|
281
|
+
*/
|
|
282
|
+
dayOfMonth(day?: number): DateApiObject<TDate> | number;
|
|
283
|
+
/**
|
|
284
|
+
* Gets day of week zero based, first is monday
|
|
285
|
+
*/
|
|
286
|
+
dayOfWeek(): number;
|
|
287
|
+
/**
|
|
288
|
+
* Sets day of week zero based, first is monday
|
|
289
|
+
* @param day - Day of week to be set
|
|
290
|
+
*/
|
|
291
|
+
dayOfWeek(day: number): DateApiObject<TDate>;
|
|
292
|
+
/**
|
|
293
|
+
* Gets or sets day of week zero based, first is monday
|
|
294
|
+
* @param day - If specified, sets day of week
|
|
295
|
+
*/
|
|
296
|
+
dayOfWeek(day?: number): number | DateApiObject<TDate>;
|
|
297
|
+
/**
|
|
298
|
+
* Gets indication whether current value is before 'date'
|
|
299
|
+
* @param date - Date which is this date compared to
|
|
300
|
+
*/
|
|
301
|
+
isBefore(date: TDate): boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Gets indication whether current value is after 'date'
|
|
304
|
+
* @param date - Date which is this date compared to
|
|
305
|
+
*/
|
|
306
|
+
isAfter(date: TDate): boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Gets number of days between this and provided date
|
|
309
|
+
* @param date - Date which is used for computation of diff against
|
|
310
|
+
*/
|
|
311
|
+
diffDays(date: TDate): number;
|
|
312
|
+
/**
|
|
313
|
+
* Compares whether this date is same week as provided date
|
|
314
|
+
* @param date - Date which is used for comparison of same week
|
|
315
|
+
*/
|
|
316
|
+
isSameWeek(date: TDate): boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Compares whether this date is same decade as provided date
|
|
319
|
+
* @param date - Date which is used for comparison of same decade
|
|
320
|
+
*/
|
|
321
|
+
isSameDecade(date: TDate): boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Compares whether this date is same year as provided date
|
|
324
|
+
* @param date - Date which is used for comparison of same year
|
|
325
|
+
*/
|
|
326
|
+
isSameYear(date: TDate): boolean;
|
|
327
|
+
/**
|
|
328
|
+
* Compares whether this date is same month as provided date
|
|
329
|
+
* @param date - Date which is used for comparison of same month
|
|
330
|
+
*/
|
|
331
|
+
isSameMonth(date: TDate): boolean;
|
|
332
|
+
/**
|
|
333
|
+
* Compares whether this date is same day as provided date
|
|
334
|
+
* @param date - Date which is used for comparison of same day
|
|
335
|
+
*/
|
|
336
|
+
isSameDay(date: TDate): boolean;
|
|
337
|
+
/**
|
|
338
|
+
* Creates clone of this instance, value and originalValue have same value and are cloned from value
|
|
339
|
+
*/
|
|
340
|
+
clone(): DateApiObject<TDate>;
|
|
341
|
+
/**
|
|
342
|
+
* Creates clone of this instance, value and originalValue have same value and are cloned from originalValue
|
|
343
|
+
*/
|
|
344
|
+
cloneOriginal(): DateApiObject<TDate>;
|
|
345
|
+
/**
|
|
346
|
+
* Updates originalValue, if value is not provided originalValue is set to value
|
|
347
|
+
* @param value - Value to be set as original, or null (value will be used as value)
|
|
348
|
+
* @returns Itself for fluent API
|
|
349
|
+
*/
|
|
350
|
+
updateOriginal(value?: TDate): DateApiObject<TDate>;
|
|
351
|
+
/**
|
|
352
|
+
* Changes value to same value as originalValue
|
|
353
|
+
* @returns Itself for fluent API
|
|
354
|
+
*/
|
|
355
|
+
resetOriginal(): DateApiObject<TDate>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Pipe that is used for converting date
|
|
360
|
+
*/
|
|
361
|
+
export declare class DateConvertPipe<TDate = any> implements PipeTransform {
|
|
362
|
+
private _dateApi;
|
|
363
|
+
constructor(_dateApi: DateApi<TDate>);
|
|
364
|
+
/**
|
|
365
|
+
* Transforms value into date object
|
|
366
|
+
* @param value - value to be transformed
|
|
367
|
+
* @param parseFormat - format used for parsing string date
|
|
368
|
+
*/
|
|
369
|
+
transform(value: TDate | DateValue, parseFormat?: string): TDate | null;
|
|
370
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateConvertPipe<any>, never>;
|
|
371
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateConvertPipe<any>, "dateConvert">;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Pipe that is used for formatting date
|
|
376
|
+
*/
|
|
377
|
+
export declare class DateFormatPipe<TDate = any> implements PipeTransform {
|
|
378
|
+
private _formatProvider;
|
|
379
|
+
private _dateApi;
|
|
380
|
+
constructor(_formatProvider: FormatProvider, _dateApi: DateApi<TDate>);
|
|
381
|
+
/**
|
|
382
|
+
* Formats provided date into formatted string
|
|
383
|
+
* @param value - value to be transformed
|
|
384
|
+
* @param format - Format that is used for formatting, can be also 'FormatProvider' key
|
|
385
|
+
* @param parseFormat - format used for parsing string date
|
|
386
|
+
*/
|
|
387
|
+
transform(value: TDate | DateValue, format?: string | keyof FormatProvider, parseFormat?: string): string;
|
|
388
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe<any>, never>;
|
|
389
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe<any>, "dateFormat">;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Module used for exporting date pipes
|
|
394
|
+
*/
|
|
395
|
+
export declare class DatePipesModule {
|
|
396
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePipesModule, never>;
|
|
397
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DatePipesModule, [typeof i1_4.AsRequiredTypePipe, typeof i2_3.DateFormatPipe, typeof i3_3.DateConvertPipe], never, [typeof i1_4.AsRequiredTypePipe, typeof i2_3.DateFormatPipe, typeof i3_3.DateConvertPipe]>;
|
|
398
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DatePipesModule>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Parser used for parsing date using provided format and returning positions and selected date part
|
|
403
|
+
*/
|
|
404
|
+
export declare interface DatePositionParser {
|
|
405
|
+
/**
|
|
406
|
+
* Parse date as string and returns information about positions and selected part of date
|
|
407
|
+
* @param date - String date to be parsed
|
|
408
|
+
* @param cursorPosition - Current cursor position
|
|
409
|
+
*/
|
|
410
|
+
parse(date: string, cursorPosition: number): DatePositionParserResult;
|
|
411
|
+
/**
|
|
412
|
+
* Parse date as string and returns information about position and selected part of date, while moving it to next part, if it was last part returns null
|
|
413
|
+
* @param date - String date to be parsed
|
|
414
|
+
* @param cursorPosition - Current cursor position
|
|
415
|
+
*/
|
|
416
|
+
next(date: string, cursorPosition: number): null | DatePositionParserResult;
|
|
417
|
+
/**
|
|
418
|
+
* Parse date as string and returns information about position and selected part of date, while moving it to previous part, if it was first part returns null
|
|
419
|
+
* @param date - String date to be parsed
|
|
420
|
+
* @param cursorPosition - Current cursor position
|
|
421
|
+
*/
|
|
422
|
+
previous(date: string, cursorPosition: number): null | DatePositionParserResult;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Result of date position parsing
|
|
427
|
+
*/
|
|
428
|
+
export declare interface DatePositionParserResult {
|
|
429
|
+
/**
|
|
430
|
+
* Index of charater where returned part of date starts
|
|
431
|
+
*/
|
|
432
|
+
positionFrom: number;
|
|
433
|
+
/**
|
|
434
|
+
* Index of charater where returned part of date ends
|
|
435
|
+
*/
|
|
436
|
+
positionTo: number;
|
|
437
|
+
/**
|
|
438
|
+
* Type of part that is selected
|
|
439
|
+
*/
|
|
440
|
+
part: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Service used for parsing date
|
|
445
|
+
*/
|
|
446
|
+
export declare class DatePositionParserService {
|
|
447
|
+
/**
|
|
448
|
+
* Creates parser instance for specified format
|
|
449
|
+
* @param format - Format to be used for parsing date string
|
|
450
|
+
*/
|
|
451
|
+
createParser(format: string): DatePositionParser;
|
|
452
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePositionParserService, never>;
|
|
453
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DatePositionParserService>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Angular module for date time basic input selector component
|
|
458
|
+
*/
|
|
459
|
+
export declare class DateTimeBasicSelectorModule {
|
|
460
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeBasicSelectorModule, never>;
|
|
461
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeBasicSelectorModule, [typeof i1.SimpleInputDateTimeSelectorComponent], never, never>;
|
|
462
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeBasicSelectorModule>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Component used for displaying day picker
|
|
467
|
+
*/
|
|
468
|
+
export declare class DateTimeDayPickerComponent<TDate = any> extends PickerBaseComponent<TDate, DayData<TDate>, DayPickerCssClasses> implements DateTimePicker<TDate, DayPickerCssClasses> {
|
|
469
|
+
/**
|
|
470
|
+
* Stored this picker month data
|
|
471
|
+
*/
|
|
472
|
+
protected _thisMonthData: DayData<TDate>[];
|
|
473
|
+
/**
|
|
474
|
+
* Names of days
|
|
475
|
+
* @internal
|
|
476
|
+
*/
|
|
477
|
+
weekdays: string[];
|
|
478
|
+
constructor(dateApi: DateApi<TDate>, changeDetector: ChangeDetectorRef);
|
|
479
|
+
/**
|
|
480
|
+
* Changes displayed month to next month
|
|
481
|
+
* @param event - Event that occured
|
|
482
|
+
* @internal
|
|
483
|
+
*/
|
|
484
|
+
nextMonth(event: Event): void;
|
|
485
|
+
/**
|
|
486
|
+
* Changes displayed month to previous month
|
|
487
|
+
* @param event - Event that occured
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
490
|
+
previousMonth(event: Event): void;
|
|
491
|
+
/**
|
|
492
|
+
* Selects day
|
|
493
|
+
* @param event - Event that occured
|
|
494
|
+
* @param day - Selects day
|
|
495
|
+
* @internal
|
|
496
|
+
*/
|
|
497
|
+
select(event: Event, day: DayData<TDate>): void;
|
|
498
|
+
/**
|
|
499
|
+
* Set displays date to be displayed
|
|
500
|
+
* @param value - Value that identifies period that is going to be displayed
|
|
501
|
+
*/
|
|
502
|
+
display(value: DateApiObject<TDate>): void;
|
|
503
|
+
/**
|
|
504
|
+
* Obtains end of period
|
|
505
|
+
* @param period - Period for which should be end obtained
|
|
506
|
+
*/
|
|
507
|
+
protected _endOfPeriod(period: PeriodData<TDate>): TDate;
|
|
508
|
+
/**
|
|
509
|
+
* Tests whether provided value is in same period as displayed picker
|
|
510
|
+
* @param val - Tested value for same period as displayed picker
|
|
511
|
+
*/
|
|
512
|
+
protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Tests whether provided value is in same period target value
|
|
515
|
+
* @param val - Tested value
|
|
516
|
+
* @param target - Target value to be tested against
|
|
517
|
+
*/
|
|
518
|
+
protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;
|
|
519
|
+
/**
|
|
520
|
+
* Gets period data for specified value
|
|
521
|
+
* @param val - Value for which is period data obtained
|
|
522
|
+
*/
|
|
523
|
+
protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;
|
|
524
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeDayPickerComponent<any>, never>;
|
|
525
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeDayPickerComponent<any>, "date-time-day-picker", never, {}, {}, never, never>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Directive injecting datetime max validator, validating max datetime value
|
|
530
|
+
*/
|
|
531
|
+
export declare class DatetimeMaxValidatorDirective<TDate = any> implements Validator {
|
|
532
|
+
/**
|
|
533
|
+
* Function used for validations
|
|
534
|
+
*/
|
|
535
|
+
private _validator;
|
|
536
|
+
constructor(datetimeSelector: DateTimeSelectorComponent<TDate>, dateApi: DateApi<TDate>);
|
|
537
|
+
/**
|
|
538
|
+
* Validates input and returns validation result
|
|
539
|
+
* @param control - Control that is being validated
|
|
540
|
+
* @returns validation results
|
|
541
|
+
*/
|
|
542
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
543
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimeMaxValidatorDirective<any>, never>;
|
|
544
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatetimeMaxValidatorDirective<any>, "date-time-selector[validate][maxValue][formControlName]:not([range]),date-time-selector[validate][maxValue][formControl]:not([range]),date-time-selector[validate][maxValue][ngModel]:not([range])", never, {}, {}, never>;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Directive injecting datetime min validator, validating min datetime value
|
|
549
|
+
*/
|
|
550
|
+
export declare class DatetimeMinValidatorDirective<TDate = any> implements Validator {
|
|
551
|
+
/**
|
|
552
|
+
* Function used for validations
|
|
553
|
+
*/
|
|
554
|
+
private _validator;
|
|
555
|
+
constructor(datetimeSelector: DateTimeSelectorComponent<TDate>, dateApi: DateApi<TDate>);
|
|
556
|
+
/**
|
|
557
|
+
* Validates input and returns validation result
|
|
558
|
+
* @param control - Control that is being validated
|
|
559
|
+
* @returns validation results
|
|
560
|
+
*/
|
|
561
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
562
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimeMinValidatorDirective<any>, never>;
|
|
563
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatetimeMinValidatorDirective<any>, "date-time-selector[validate][minValue][formControlName]:not([range]),date-time-selector[validate][minValue][formControl]:not([range]),date-time-selector[validate][minValue][ngModel]:not([range])", never, {}, {}, never>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Component used for displaying month picker
|
|
568
|
+
*/
|
|
569
|
+
export declare class DateTimeMonthPickerComponent<TDate = any> extends PickerBaseComponent<TDate, MonthData<TDate>, MonthPickerCssClasses> implements DateTimePicker<TDate, MonthPickerCssClasses> {
|
|
570
|
+
constructor(dateApi: DateApi<TDate>, changeDetector: ChangeDetectorRef);
|
|
571
|
+
/**
|
|
572
|
+
* Changes displayed year to next year
|
|
573
|
+
* @param event - Event that occured
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
nextYear(event: Event): void;
|
|
577
|
+
/**
|
|
578
|
+
* Changes displayed year to previous year
|
|
579
|
+
* @param event - Event that occured
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
previousYear(event: Event): void;
|
|
583
|
+
/**
|
|
584
|
+
* Set displays date to be displayed
|
|
585
|
+
* @param value - Value that identifies period that is going to be displayed
|
|
586
|
+
*/
|
|
587
|
+
display(value: DateApiObject<TDate>): void;
|
|
588
|
+
/**
|
|
589
|
+
* Obtains end of period
|
|
590
|
+
* @param period - Period for which should be end obtained
|
|
591
|
+
*/
|
|
592
|
+
protected _endOfPeriod(period: PeriodData<TDate>): TDate;
|
|
593
|
+
/**
|
|
594
|
+
* Tests whether provided value is in same period as displayed picker
|
|
595
|
+
* @param val - Tested value for same period as displayed picker
|
|
596
|
+
*/
|
|
597
|
+
protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Tests whether provided value is in same period target value
|
|
600
|
+
* @param val - Tested value
|
|
601
|
+
* @param target - Target value to be tested against
|
|
602
|
+
*/
|
|
603
|
+
protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;
|
|
604
|
+
/**
|
|
605
|
+
* Gets period data for specified value
|
|
606
|
+
* @param val - Value for which is period data obtained
|
|
607
|
+
*/
|
|
608
|
+
protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;
|
|
609
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeMonthPickerComponent<any>, never>;
|
|
610
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeMonthPickerComponent<any>, "date-time-month-picker", never, {}, {}, never, never>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Describes datetime picker component used for displaying and selecting value
|
|
615
|
+
*/
|
|
616
|
+
export declare interface DateTimePicker<TDate = any, TCssClasses = object> {
|
|
617
|
+
/**
|
|
618
|
+
* Gets current value of datetime
|
|
619
|
+
*/
|
|
620
|
+
readonly value: DateTimeValue<TDate> | null;
|
|
621
|
+
/**
|
|
622
|
+
* Occurs when value changes
|
|
623
|
+
*/
|
|
624
|
+
readonly valueChange: Observable<void>;
|
|
625
|
+
/**
|
|
626
|
+
* Occurs when user scales up
|
|
627
|
+
*/
|
|
628
|
+
readonly scaleUp: Observable<TDate>;
|
|
629
|
+
/**
|
|
630
|
+
* Occurs when user scales down
|
|
631
|
+
*/
|
|
632
|
+
readonly scaleDown: Observable<TDate>;
|
|
633
|
+
/**
|
|
634
|
+
* Sets css classes for picker, allowing to override defaults
|
|
635
|
+
* @param cssClasses - Css classes to be set for picker
|
|
636
|
+
*/
|
|
637
|
+
setCssClasses(cssClasses: TCssClasses): void;
|
|
638
|
+
/**
|
|
639
|
+
* Sets minimal possible value for picker, that can be picked
|
|
640
|
+
* @param value - Minimal possible value that can be picked
|
|
641
|
+
*/
|
|
642
|
+
setMinValue(value: TDate | null): void;
|
|
643
|
+
/**
|
|
644
|
+
* Sets maximal possible value for picker, that can be picked
|
|
645
|
+
* @param value - Maximal possible value that can be picked
|
|
646
|
+
*/
|
|
647
|
+
setMaxValue(value: TDate | null): void;
|
|
648
|
+
/**
|
|
649
|
+
* Sets value of datetime picker
|
|
650
|
+
* @param value - Value to be set to this picker
|
|
651
|
+
*/
|
|
652
|
+
setValue(value: DateTimeValue<TDate> | null): void;
|
|
653
|
+
/**
|
|
654
|
+
* Set displays date to be displayed
|
|
655
|
+
* @param value - Value that identifies period that is going to be displayed
|
|
656
|
+
*/
|
|
657
|
+
display(value: DateApiObject<TDate>): void;
|
|
658
|
+
/**
|
|
659
|
+
* Sets indication whether can go down
|
|
660
|
+
* @param value - Indication whether can go down in period
|
|
661
|
+
*/
|
|
662
|
+
setCanGoDown(value: boolean): void;
|
|
663
|
+
/**
|
|
664
|
+
* Sets indication whether can go up
|
|
665
|
+
* @param value - Indication whether can go up in period
|
|
666
|
+
*/
|
|
667
|
+
setCanGoUp(value: boolean): void;
|
|
668
|
+
/**
|
|
669
|
+
* Explicitly runs invalidation of content (change detection)
|
|
670
|
+
*/
|
|
671
|
+
invalidateVisuals(): void;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Component used for displaying date time picker
|
|
676
|
+
*/
|
|
677
|
+
export declare class DateTimePickerComponent<TDate = any> implements OnInit, OnDestroy {
|
|
678
|
+
protected _dateApi: DateApi<TDate>;
|
|
679
|
+
protected _changeDetector: ChangeDetectorRef;
|
|
680
|
+
/**
|
|
681
|
+
* Instance of active date time picker
|
|
682
|
+
*/
|
|
683
|
+
protected _activePicker?: DateTimePicker<TDate>;
|
|
684
|
+
/**
|
|
685
|
+
* Name, id of displayed picker
|
|
686
|
+
*/
|
|
687
|
+
protected _activePickerName: string;
|
|
688
|
+
/**
|
|
689
|
+
* Array of available picker names
|
|
690
|
+
*/
|
|
691
|
+
protected _pickerNames: string[];
|
|
692
|
+
/**
|
|
693
|
+
* Current selected value
|
|
694
|
+
*/
|
|
695
|
+
protected _value: DateTimeValue<TDate> | null;
|
|
696
|
+
/**
|
|
697
|
+
* All subscriptions for active picker
|
|
698
|
+
*/
|
|
699
|
+
protected _activePickerSubscriptions: Subscription;
|
|
700
|
+
/**
|
|
701
|
+
* Date that should be displayed in picker, used when moving up or down in periods
|
|
702
|
+
*/
|
|
703
|
+
protected _display?: TDate;
|
|
704
|
+
/**
|
|
705
|
+
* Minimal possible value that can be picked
|
|
706
|
+
*/
|
|
707
|
+
protected _minValue: TDate | null;
|
|
708
|
+
/**
|
|
709
|
+
* Maximal possible value that can be picked
|
|
710
|
+
*/
|
|
711
|
+
protected _maxValue: TDate | null;
|
|
712
|
+
/**
|
|
713
|
+
* Current options used by picker
|
|
714
|
+
*/
|
|
715
|
+
protected _options: DateTimePickerOptions<DateTimePicker<TDate>>;
|
|
716
|
+
/**
|
|
717
|
+
* Currently active date time picker component type
|
|
718
|
+
* @internal
|
|
719
|
+
*/
|
|
720
|
+
activePickerComponent?: Type<DateTimePicker<TDate>>;
|
|
721
|
+
/**
|
|
722
|
+
* Active picker index
|
|
723
|
+
* @internal
|
|
724
|
+
*/
|
|
725
|
+
activePickerIndex: number;
|
|
726
|
+
/**
|
|
727
|
+
* Current options used by picker
|
|
728
|
+
*/
|
|
729
|
+
get options(): DateTimePickerOptions<DateTimePicker<TDate>>;
|
|
730
|
+
set options(value: DateTimePickerOptions<DateTimePicker<TDate>>);
|
|
731
|
+
/**
|
|
732
|
+
* Current selected value
|
|
733
|
+
*/
|
|
734
|
+
get value(): DateTimeValue<TDate> | null;
|
|
735
|
+
set value(value: DateTimeValue<TDate> | null);
|
|
736
|
+
/**
|
|
737
|
+
* Gets or sets minimal possible value for picker, that can be picked
|
|
738
|
+
*/
|
|
739
|
+
get minValue(): TDate | null;
|
|
740
|
+
set minValue(value: TDate | null);
|
|
741
|
+
/**
|
|
742
|
+
* Gets or sets maximal possible value for picker, that can be picked
|
|
743
|
+
*/
|
|
744
|
+
get maxValue(): TDate | null;
|
|
745
|
+
set maxValue(value: TDate | null);
|
|
746
|
+
/**
|
|
747
|
+
* Occurs when value changes
|
|
748
|
+
*/
|
|
749
|
+
valueChange: EventEmitter<DateTimeValue<TDate>>;
|
|
750
|
+
constructor(configuration: DateTimePickerOptions<DateTimePicker<TDate>>, _dateApi: DateApi<TDate>, _changeDetector: ChangeDetectorRef);
|
|
751
|
+
/**
|
|
752
|
+
* Initialize component
|
|
753
|
+
*/
|
|
754
|
+
ngOnInit(): void;
|
|
755
|
+
/**
|
|
756
|
+
* Called when component is destroyed
|
|
757
|
+
*/
|
|
758
|
+
ngOnDestroy(): void;
|
|
759
|
+
/**
|
|
760
|
+
* Handles created or destroyed date time picker instance
|
|
761
|
+
* @param picker - Instance of picker or null
|
|
762
|
+
* @internal
|
|
763
|
+
*/
|
|
764
|
+
pickerCreated(picker: DateTimePicker<TDate>): void;
|
|
765
|
+
/**
|
|
766
|
+
* Sets picker css classes
|
|
767
|
+
*/
|
|
768
|
+
protected _setPickerCssClasses(): void;
|
|
769
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent<any>, [{ optional: true; }, null, null]>;
|
|
770
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent<any>, "date-time-picker", never, { "options": "options"; "value": "value"; "minValue": "minValue"; "maxValue": "maxValue"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Css classes applied to datetime picker
|
|
775
|
+
*/
|
|
776
|
+
export declare interface DateTimePickerCssClasses {
|
|
777
|
+
/**
|
|
778
|
+
* Shared css classes for all pickers
|
|
779
|
+
*/
|
|
780
|
+
pickerShared?: CommonPickerCssClasses;
|
|
781
|
+
/**
|
|
782
|
+
* Custom css classes specific for each picker type
|
|
783
|
+
*/
|
|
784
|
+
pickerCustom?: Dictionary<object>;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Angular module for date time picker components
|
|
789
|
+
*/
|
|
790
|
+
export declare class DateTimePickerModule {
|
|
791
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerModule, never>;
|
|
792
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimePickerModule, [typeof i1_3.DateTimePickerComponent, typeof i2_2.DateTimeDayPickerComponent, typeof i3_2.DateTimeMonthPickerComponent, typeof i4_2.DateTimeYearPickerComponent], [typeof i7.CommonModule, typeof i8.CommonDynamicModule, typeof i7_2.DatePipesModule], [typeof i1_3.DateTimePickerComponent]>;
|
|
793
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DateTimePickerModule>;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Defintion of datetime picker component options
|
|
798
|
+
*/
|
|
799
|
+
export declare interface DateTimePickerOptions<TPicker = any> {
|
|
800
|
+
/**
|
|
801
|
+
* Order of pickers, it's possible use less pickers as is defined in pickerPeriodsDefinition for example 'month,year'
|
|
802
|
+
*/
|
|
803
|
+
pickerPeriodsOrder?: string[] | string;
|
|
804
|
+
/**
|
|
805
|
+
* Definition of types for each period type for picker
|
|
806
|
+
*/
|
|
807
|
+
pickerPeriodsDefinition?: Dictionary<Type<TPicker>>;
|
|
808
|
+
/**
|
|
809
|
+
* Name of default period for picker that is displayed
|
|
810
|
+
*/
|
|
811
|
+
defaultPeriod?: string;
|
|
812
|
+
/**
|
|
813
|
+
* Css classes for date time picker
|
|
814
|
+
*/
|
|
815
|
+
cssClasses?: DateTimePickerCssClasses;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Service used for parsing relative date time strings
|
|
820
|
+
*/
|
|
821
|
+
export declare class DateTimeRelativeParser<TDate = any> {
|
|
822
|
+
protected _injector: Injector;
|
|
823
|
+
/**
|
|
824
|
+
* Date api for handling
|
|
825
|
+
*/
|
|
826
|
+
protected _dateApi?: DateApi<TDate>;
|
|
827
|
+
constructor(_injector: Injector);
|
|
828
|
+
/**
|
|
829
|
+
* Tries to parse relative value and returns parsed TDate, otherwise returns input value
|
|
830
|
+
* @param value - Value to be parsed
|
|
831
|
+
*/
|
|
832
|
+
parse(value: TDate | DateValue): TDate | DateValue;
|
|
833
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeRelativeParser<any>, never>;
|
|
834
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeRelativeParser<any>>;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Describes datetime selector component used for displaying and selecting value
|
|
839
|
+
*/
|
|
840
|
+
export declare interface DateTimeSelector<TDate = any> {
|
|
841
|
+
/**
|
|
842
|
+
* Currently used format for displaying data
|
|
843
|
+
*/
|
|
844
|
+
format: string;
|
|
845
|
+
/**
|
|
846
|
+
* Placeholder that is displayed when there is no value selected
|
|
847
|
+
*/
|
|
848
|
+
placeholder?: string;
|
|
849
|
+
/**
|
|
850
|
+
* Gets current value of datetime
|
|
851
|
+
*/
|
|
852
|
+
readonly value: DateTimeValue<TDate> | null;
|
|
853
|
+
/**
|
|
854
|
+
* Gets formatted value
|
|
855
|
+
*/
|
|
856
|
+
readonly formattedValue: string | null;
|
|
857
|
+
/**
|
|
858
|
+
* Gets indication whether is current value valid
|
|
859
|
+
*/
|
|
860
|
+
readonly valid: boolean;
|
|
861
|
+
/**
|
|
862
|
+
* Occurs when value changes
|
|
863
|
+
*/
|
|
864
|
+
readonly valueChange: Observable<void>;
|
|
865
|
+
/**
|
|
866
|
+
* Occurs when selector is touched by user
|
|
867
|
+
*/
|
|
868
|
+
readonly touched: Observable<void>;
|
|
869
|
+
/**
|
|
870
|
+
* Occurs when selector requires picker to be displayed or hidden
|
|
871
|
+
*/
|
|
872
|
+
readonly pickerRequest: Observable<boolean>;
|
|
873
|
+
/**
|
|
874
|
+
* Sets minimal possible value for picker, that can be picked
|
|
875
|
+
* @param value - Minimal possible value that can be picked
|
|
876
|
+
*/
|
|
877
|
+
setMinValue(value: TDate | null): void;
|
|
878
|
+
/**
|
|
879
|
+
* Sets maximal possible value for picker, that can be picked
|
|
880
|
+
* @param value - Maximal possible value that can be picked
|
|
881
|
+
*/
|
|
882
|
+
setMaxValue(value: TDate | null): void;
|
|
883
|
+
/**
|
|
884
|
+
* Sets value of datetime selector
|
|
885
|
+
* @param value - Value to be set to this selector
|
|
886
|
+
*/
|
|
887
|
+
setValue(value: DateTimeValue<TDate> | null): void;
|
|
888
|
+
/**
|
|
889
|
+
* Sets as 'control' disabled
|
|
890
|
+
* @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true
|
|
891
|
+
*/
|
|
892
|
+
setDisabled(disabled?: boolean): void;
|
|
893
|
+
/**
|
|
894
|
+
* Explicitly runs invalidation of content (change detection)
|
|
895
|
+
*/
|
|
896
|
+
invalidateVisuals(): void;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Component used for displaying and selecting date time
|
|
901
|
+
*/
|
|
902
|
+
export declare class DateTimeSelectorComponent<TDate = any> implements OnInit, OnChanges, OnDestroy {
|
|
903
|
+
protected _valueProvider: DateValueProvider<TDate>;
|
|
904
|
+
protected _changeDetector: ChangeDetectorRef;
|
|
905
|
+
protected _dateApi: DateApi<TDate>;
|
|
906
|
+
/**
|
|
907
|
+
* Current value of datetime
|
|
908
|
+
*/
|
|
909
|
+
protected _value: DateTimeValue<TDate> | null;
|
|
910
|
+
/**
|
|
911
|
+
* Occurs when selector is touched by user
|
|
912
|
+
*/
|
|
913
|
+
protected _touched: Subject<void>;
|
|
914
|
+
/**
|
|
915
|
+
* Occurs when value changes
|
|
916
|
+
*/
|
|
917
|
+
protected _valueChange: Subject<void>;
|
|
918
|
+
/**
|
|
919
|
+
* Indication whether is control disabled
|
|
920
|
+
*/
|
|
921
|
+
protected _disabled: boolean;
|
|
922
|
+
/**
|
|
923
|
+
* Instance of active date time selector
|
|
924
|
+
*/
|
|
925
|
+
protected _activeSelector?: DateTimeSelector<TDate>;
|
|
926
|
+
/**
|
|
927
|
+
* All subscriptions for active selector
|
|
928
|
+
*/
|
|
929
|
+
protected _activeSelectorSubscriptions: Subscription;
|
|
930
|
+
/**
|
|
931
|
+
* Subscription for changes of min value selector
|
|
932
|
+
*/
|
|
933
|
+
protected _minValueChangeSubscription: Subscription | null;
|
|
934
|
+
/**
|
|
935
|
+
* Subscription for changes of max value selector
|
|
936
|
+
*/
|
|
937
|
+
protected _maxValueChangeSubscription: Subscription | null;
|
|
938
|
+
/**
|
|
939
|
+
* Current options used by selector
|
|
940
|
+
*/
|
|
941
|
+
protected _options: DateTimeSelectorOptions<DateTimeSelector<TDate>>;
|
|
942
|
+
/**
|
|
943
|
+
* Placeholder that is displayed when there is no value selected
|
|
944
|
+
*/
|
|
945
|
+
protected _placeholder?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Gets or sets current value of datetime
|
|
948
|
+
*/
|
|
949
|
+
get value(): DateTimeValue<TDate> | null;
|
|
950
|
+
set value(value: DateTimeValue<TDate> | null);
|
|
951
|
+
/**
|
|
952
|
+
* Gets indication whether is current value valid
|
|
953
|
+
*/
|
|
954
|
+
get valid(): boolean;
|
|
955
|
+
/**
|
|
956
|
+
* Gets or sets formatted value
|
|
957
|
+
*/
|
|
958
|
+
get formattedValue(): string | null;
|
|
959
|
+
set formattedValue(value: string | null);
|
|
960
|
+
/**
|
|
961
|
+
* Occurs when selector is touched by user
|
|
962
|
+
*/
|
|
963
|
+
get touched(): Observable<void>;
|
|
964
|
+
/**
|
|
965
|
+
* Occurs when value changes
|
|
966
|
+
*/
|
|
967
|
+
get valueChange(): Observable<void>;
|
|
968
|
+
/**
|
|
969
|
+
* Currently active date time selector component type
|
|
970
|
+
* @internal
|
|
971
|
+
*/
|
|
972
|
+
activeSelectorComponent?: Type<DateTimeSelector<TDate>>;
|
|
973
|
+
/**
|
|
974
|
+
* Indication whether is picker visible or not
|
|
975
|
+
* @internal
|
|
976
|
+
*/
|
|
977
|
+
pickerVisible: boolean;
|
|
978
|
+
/**
|
|
979
|
+
* Gets or sets minimal possible value for picker, that can be picked
|
|
980
|
+
*/
|
|
981
|
+
min: TDate | null;
|
|
982
|
+
/**
|
|
983
|
+
* Gets or sets maximal possible value for picker, that can be picked
|
|
984
|
+
*/
|
|
985
|
+
max: TDate | null;
|
|
986
|
+
/**
|
|
987
|
+
* Format of displayed
|
|
988
|
+
*/
|
|
989
|
+
format: string;
|
|
990
|
+
/**
|
|
991
|
+
* Gets or sets placeholder that is displayed when there is no value selected
|
|
992
|
+
*/
|
|
993
|
+
get placeholder(): string | undefined;
|
|
994
|
+
set placeholder(value: string | undefined);
|
|
995
|
+
/**
|
|
996
|
+
* Current options used by selector
|
|
997
|
+
*/
|
|
998
|
+
get options(): DateTimeSelectorOptions<DateTimeSelector<TDate>>;
|
|
999
|
+
set options(value: DateTimeSelectorOptions<DateTimeSelector<TDate>>);
|
|
1000
|
+
/**
|
|
1001
|
+
* Gets or sets minimal possible value for picker, that can be picked
|
|
1002
|
+
*/
|
|
1003
|
+
get minValue(): TDate | string | null | DateTimeSelectorComponent<TDate>;
|
|
1004
|
+
set minValue(value: TDate | string | null | DateTimeSelectorComponent<TDate>);
|
|
1005
|
+
/**
|
|
1006
|
+
* Gets or sets maximal possible value for picker, that can be picked
|
|
1007
|
+
*/
|
|
1008
|
+
get maxValue(): TDate | string | null | DateTimeSelectorComponent<TDate>;
|
|
1009
|
+
set maxValue(value: TDate | string | null | DateTimeSelectorComponent<TDate>);
|
|
1010
|
+
constructor(configuration: DateTimeSelectorOptions<DateTimeSelector<TDate>>, _valueProvider: DateValueProvider<TDate>, _changeDetector: ChangeDetectorRef, _dateApi: DateApi<TDate>, formatProvider: FormatProvider);
|
|
1011
|
+
/**
|
|
1012
|
+
* Initialize component
|
|
1013
|
+
*/
|
|
1014
|
+
ngOnInit(): void;
|
|
1015
|
+
/**
|
|
1016
|
+
* Called when input value changes
|
|
1017
|
+
*/
|
|
1018
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1019
|
+
/**
|
|
1020
|
+
* Called when component is destroyed
|
|
1021
|
+
*/
|
|
1022
|
+
ngOnDestroy(): void;
|
|
1023
|
+
/**
|
|
1024
|
+
* Handles created or destroyed date time selector instance
|
|
1025
|
+
* @param selector - Instance of selector or null
|
|
1026
|
+
* @internal
|
|
1027
|
+
*/
|
|
1028
|
+
selectorCreated(selector: DateTimeSelector<TDate>): void;
|
|
1029
|
+
/**
|
|
1030
|
+
* Handles changed value by picker
|
|
1031
|
+
* @param value - Value that was changed
|
|
1032
|
+
* @internal
|
|
1033
|
+
*/
|
|
1034
|
+
pickerChangedValue(value: DateTimeValue<TDate>): void;
|
|
1035
|
+
/**
|
|
1036
|
+
* Sets as 'control' disabled
|
|
1037
|
+
* @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true
|
|
1038
|
+
*/
|
|
1039
|
+
setDisabled(disabled?: boolean): void;
|
|
1040
|
+
/**
|
|
1041
|
+
* Gets simple value of selector
|
|
1042
|
+
*/
|
|
1043
|
+
valueOf(): TDate | null;
|
|
1044
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeSelectorComponent<any>, [{ optional: true; }, null, null, null, null]>;
|
|
1045
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeSelectorComponent<any>, "date-time-selector", never, { "format": "format"; "placeholder": "placeholder"; "options": "options"; "minValue": "minValue"; "maxValue": "maxValue"; }, {}, never, never>;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Value accessor for getting and setting values for date time selector
|
|
1050
|
+
*/
|
|
1051
|
+
export declare class DateTimeSelectorControlValueAccessor<TDate> implements ControlValueAccessor, OnDestroy {
|
|
1052
|
+
protected _selector: DateTimeSelectorComponent<TDate>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Subscriptions that are destroyed on directive destruction
|
|
1055
|
+
*/
|
|
1056
|
+
protected _subscriptions: Subscription;
|
|
1057
|
+
/**
|
|
1058
|
+
* Indication whether value for selector is represented as range from, to
|
|
1059
|
+
*/
|
|
1060
|
+
range: boolean;
|
|
1061
|
+
/**
|
|
1062
|
+
* Indication whether value for selector is represented as formatted string value, if both 'formatted' and 'range' are set, 'range' takes precedence
|
|
1063
|
+
*/
|
|
1064
|
+
formatted: boolean;
|
|
1065
|
+
constructor(_selector: DateTimeSelectorComponent<TDate>);
|
|
1066
|
+
/**
|
|
1067
|
+
* Called when component is destroyed
|
|
1068
|
+
*/
|
|
1069
|
+
ngOnDestroy(): void;
|
|
1070
|
+
/**
|
|
1071
|
+
* Sets value to datetime selector
|
|
1072
|
+
*/
|
|
1073
|
+
writeValue(value: string | DateTimeValue<TDate> | TDate | null): void;
|
|
1074
|
+
/**
|
|
1075
|
+
* Registers callback that is called when value of datetime selector value changes
|
|
1076
|
+
*/
|
|
1077
|
+
registerOnChange(fn: (data: string | DateTimeValue<TDate> | TDate | null) => any): void;
|
|
1078
|
+
/**
|
|
1079
|
+
* Registers callback that is called when datetime selector was touched by user
|
|
1080
|
+
*/
|
|
1081
|
+
registerOnTouched(fn: () => any): void;
|
|
1082
|
+
/**
|
|
1083
|
+
* Used for setting control as disabled
|
|
1084
|
+
* @param isDisabled - disabled status to set on the element
|
|
1085
|
+
*/
|
|
1086
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1087
|
+
/**
|
|
1088
|
+
* Used for emitting value that was changed
|
|
1089
|
+
* @param fn - Function that is used for emitting changed value
|
|
1090
|
+
*/
|
|
1091
|
+
protected _emitValue(fn: (value: string | DateTimeValue<TDate> | TDate | null) => any): void;
|
|
1092
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeSelectorControlValueAccessor<any>, never>;
|
|
1093
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeSelectorControlValueAccessor<any>, "date-time-selector[formControlName],date-time-selector[formControl],date-time-selector[ngModel]", never, { "range": "range"; "formatted": "formatted"; }, {}, never>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Angular module for date time selector components
|
|
1098
|
+
*/
|
|
1099
|
+
export declare class DateTimeSelectorModule {
|
|
1100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeSelectorModule, never>;
|
|
1101
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeSelectorModule, [typeof i1_2.DateTimeSelectorComponent, typeof i2.InputDateTimeSelectorComponent, typeof i3.DateTimeSelectorControlValueAccessor, typeof i4.DatetimeValidatorDirective, typeof i5.DatetimeMinValidatorDirective, typeof i6.DatetimeMaxValidatorDirective], [typeof i7.CommonModule, typeof i8.CommonDynamicModule, typeof i9.DateTimePickerModule], [typeof i1_2.DateTimeSelectorComponent, typeof i3.DateTimeSelectorControlValueAccessor, typeof i4.DatetimeValidatorDirective, typeof i5.DatetimeMinValidatorDirective, typeof i6.DatetimeMaxValidatorDirective]>;
|
|
1102
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeSelectorModule>;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Defintion of datetime selector component options
|
|
1107
|
+
*/
|
|
1108
|
+
export declare interface DateTimeSelectorOptions<TSelector = any, TPicker = any> extends DateTimePickerOptions<TPicker> {
|
|
1109
|
+
/**
|
|
1110
|
+
* Definition of type that is used for selector
|
|
1111
|
+
*/
|
|
1112
|
+
selectorComponent: Type<TSelector>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Indication whether close picker on value selection
|
|
1115
|
+
*/
|
|
1116
|
+
pickerCloseOnValueSelect?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* Indication whether picker is disabled
|
|
1119
|
+
*/
|
|
1120
|
+
pickerDisabled?: boolean;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Directive injecting datetime validator, validating datetime
|
|
1125
|
+
*/
|
|
1126
|
+
export declare class DatetimeValidatorDirective<TDate = any> implements Validator {
|
|
1127
|
+
/**
|
|
1128
|
+
* Function used for validations
|
|
1129
|
+
*/
|
|
1130
|
+
private _validator;
|
|
1131
|
+
constructor(datetimeSelector: DateTimeSelectorComponent<TDate>);
|
|
1132
|
+
/**
|
|
1133
|
+
* Validates input and returns validation result
|
|
1134
|
+
* @param control - Control that is being validated
|
|
1135
|
+
* @returns validation results
|
|
1136
|
+
*/
|
|
1137
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
1138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimeValidatorDirective<any>, never>;
|
|
1139
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatetimeValidatorDirective<any>, "date-time-selector[validate][formControlName]:not([range]),date-time-selector[validate][formControl]:not([range]),date-time-selector[validate][ngModel]:not([range])", never, {}, {}, never>;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* Represents datetime value as period
|
|
1144
|
+
*/
|
|
1145
|
+
export declare interface DateTimeValue<TDate = any> {
|
|
1146
|
+
/**
|
|
1147
|
+
* Starting date and time of period
|
|
1148
|
+
*/
|
|
1149
|
+
from: TDate;
|
|
1150
|
+
/**
|
|
1151
|
+
* Ending date and time of period
|
|
1152
|
+
*/
|
|
1153
|
+
to: TDate;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Represents object that holds data for indentification of validity of date time
|
|
1158
|
+
*/
|
|
1159
|
+
export declare interface DateTimeValueObject<TDate = any> {
|
|
1160
|
+
/**
|
|
1161
|
+
* Current value of datetime
|
|
1162
|
+
*/
|
|
1163
|
+
readonly value: DateTimeValue<TDate> | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* Indicaiton whether is current value valid, empty value is valid
|
|
1166
|
+
*/
|
|
1167
|
+
readonly valid: boolean;
|
|
1168
|
+
/**
|
|
1169
|
+
* Minimal possible value, that can be
|
|
1170
|
+
*/
|
|
1171
|
+
readonly minValue: TDate | null;
|
|
1172
|
+
/**
|
|
1173
|
+
* Maximal possible value, that can be
|
|
1174
|
+
*/
|
|
1175
|
+
readonly maxValue: TDate | null;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Component used for displaying year picker
|
|
1180
|
+
*/
|
|
1181
|
+
export declare class DateTimeYearPickerComponent<TDate = any> extends PickerBaseComponent<TDate, YearData<TDate>, YearPickerCssClasses> implements DateTimePicker<TDate, YearPickerCssClasses> {
|
|
1182
|
+
/**
|
|
1183
|
+
* Displayed decade period
|
|
1184
|
+
* @internal
|
|
1185
|
+
*/
|
|
1186
|
+
period: string;
|
|
1187
|
+
constructor(dateApi: DateApi<TDate>, changeDetector: ChangeDetectorRef);
|
|
1188
|
+
/**
|
|
1189
|
+
* Changes displayed decade to next decade
|
|
1190
|
+
* @param event - Event that occured
|
|
1191
|
+
* @internal
|
|
1192
|
+
*/
|
|
1193
|
+
nextDecade(event: Event): void;
|
|
1194
|
+
/**
|
|
1195
|
+
* Changes displayed decade to previous decade
|
|
1196
|
+
* @param event - Event that occured
|
|
1197
|
+
* @internal
|
|
1198
|
+
*/
|
|
1199
|
+
previousDecade(event: Event): void;
|
|
1200
|
+
/**
|
|
1201
|
+
* Set displays date to be displayed
|
|
1202
|
+
* @param value - Value that identifies period that is going to be displayed
|
|
1203
|
+
*/
|
|
1204
|
+
display(value: DateApiObject<TDate>): void;
|
|
1205
|
+
/**
|
|
1206
|
+
* Obtains end of period
|
|
1207
|
+
* @param period - Period for which should be end obtained
|
|
1208
|
+
*/
|
|
1209
|
+
protected _endOfPeriod(period: PeriodData<TDate>): TDate;
|
|
1210
|
+
/**
|
|
1211
|
+
* Tests whether provided value is in same period as displayed picker
|
|
1212
|
+
* @param val - Tested value for same period as displayed picker
|
|
1213
|
+
*/
|
|
1214
|
+
protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;
|
|
1215
|
+
/**
|
|
1216
|
+
* Tests whether provided value is in same period target value
|
|
1217
|
+
* @param val - Tested value
|
|
1218
|
+
* @param target - Target value to be tested against
|
|
1219
|
+
*/
|
|
1220
|
+
protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;
|
|
1221
|
+
/**
|
|
1222
|
+
* Gets period data for specified value
|
|
1223
|
+
* @param val - Value for which is period data obtained
|
|
1224
|
+
*/
|
|
1225
|
+
protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;
|
|
1226
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeYearPickerComponent<any>, never>;
|
|
1227
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeYearPickerComponent<any>, "date-time-year-picker", never, {}, {}, never, never>;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Date can be represented as formatted string, timestamp or javascript Date object
|
|
1232
|
+
*/
|
|
1233
|
+
export declare type DateValue = Date | string | number;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* Class used for obtaining DateTimeValue for various formats
|
|
1237
|
+
*/
|
|
1238
|
+
export declare class DateValueProvider<TDate = any> {
|
|
1239
|
+
protected _dateApi: DateApi<TDate>;
|
|
1240
|
+
constructor(_dateApi: DateApi<TDate>);
|
|
1241
|
+
/**
|
|
1242
|
+
* Gets DateTimeValue from single value based on format
|
|
1243
|
+
* @param value - Current value to be converted to ranged value
|
|
1244
|
+
* @param format - Format that is requested to be displayed, it tells what range should be created
|
|
1245
|
+
*/
|
|
1246
|
+
getValue(value: TDate, format: string): DateTimeValue<TDate>;
|
|
1247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateValueProvider<any>, never>;
|
|
1248
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DateValueProvider<any>>;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* Represents day component of datetime
|
|
1253
|
+
*/
|
|
1254
|
+
export declare const DAY = "day";
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Data that represents day in date picker
|
|
1258
|
+
*/
|
|
1259
|
+
export declare interface DayData<TDate = any> extends PeriodData<TDate> {
|
|
1260
|
+
/**
|
|
1261
|
+
* Indication that range is selected and this day is between selected dates
|
|
1262
|
+
*/
|
|
1263
|
+
betweenActive: boolean;
|
|
1264
|
+
/**
|
|
1265
|
+
* Indication that this day is out of currently selected month
|
|
1266
|
+
*/
|
|
1267
|
+
otherMonth: boolean;
|
|
1268
|
+
/**
|
|
1269
|
+
* Indication that this day is today
|
|
1270
|
+
*/
|
|
1271
|
+
today: boolean;
|
|
1272
|
+
/**
|
|
1273
|
+
* Indication that this day is weekend day
|
|
1274
|
+
*/
|
|
1275
|
+
weekend: boolean;
|
|
1276
|
+
/**
|
|
1277
|
+
* Day number of month
|
|
1278
|
+
*/
|
|
1279
|
+
day: number;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Specific css classes for day picker
|
|
1284
|
+
*/
|
|
1285
|
+
export declare interface DayPickerCssClasses extends CommonPickerCssClasses {
|
|
1286
|
+
/**
|
|
1287
|
+
* Element displaying weekday name
|
|
1288
|
+
*/
|
|
1289
|
+
weekdayName?: string;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Represents decade component of datetime
|
|
1294
|
+
*/
|
|
1295
|
+
export declare const DECADE = "decade";
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Default implementation of DatePositionParser
|
|
1299
|
+
*/
|
|
1300
|
+
export declare class DefaultDatePositionParser implements DatePositionParser {
|
|
1301
|
+
protected _format: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* Indication whether format contains separators
|
|
1304
|
+
*/
|
|
1305
|
+
protected _hasSeparator: boolean;
|
|
1306
|
+
/**
|
|
1307
|
+
* Array of date parts of parsed date format
|
|
1308
|
+
*/
|
|
1309
|
+
protected _datePartsIndexes: string[];
|
|
1310
|
+
/**
|
|
1311
|
+
* Object storing indexes for strict date parts of parsed date format
|
|
1312
|
+
*/
|
|
1313
|
+
protected _strictDatePartsIndexes: {
|
|
1314
|
+
[index: number]: {
|
|
1315
|
+
part: string;
|
|
1316
|
+
length: number;
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
constructor(_format: string);
|
|
1320
|
+
/**
|
|
1321
|
+
* Parse date as string and returns information about position and selected part of date, while moving it to next part, if it was last part returns null
|
|
1322
|
+
* @param date - String date to be parsed
|
|
1323
|
+
* @param cursorPosition - Current cursor position
|
|
1324
|
+
*/
|
|
1325
|
+
next(date: string, cursorPosition: number): null | DatePositionParserResult;
|
|
1326
|
+
/**
|
|
1327
|
+
* Parse date as string and returns information about position and selected part of date, while moving it to previous part, if it was first part returns null
|
|
1328
|
+
* @param date - String date to be parsed
|
|
1329
|
+
* @param cursorPosition - Current cursor position
|
|
1330
|
+
*/
|
|
1331
|
+
previous(date: string, cursorPosition: number): null | DatePositionParserResult;
|
|
1332
|
+
/**
|
|
1333
|
+
* Parse date as string and returns information about positions and selected part of date
|
|
1334
|
+
* @param date - String date to be parsed
|
|
1335
|
+
* @param cursorPosition - Current cursor position
|
|
1336
|
+
*/
|
|
1337
|
+
parse(date: string, cursorPosition: number): DatePositionParserResult;
|
|
1338
|
+
/**
|
|
1339
|
+
* Initialize parser, process format
|
|
1340
|
+
*/
|
|
1341
|
+
protected _initialize(): void;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Animation trigger for animating children on enter leave
|
|
1346
|
+
*/
|
|
1347
|
+
export declare const enterLeaveAnimateChildTrigger: AnimationTriggerMetadata;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Injection token used for obtaining FormatProvider implementation
|
|
1351
|
+
*/
|
|
1352
|
+
export declare const FORMAT_PROVIDER: InjectionToken<FormatProvider>;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Format provider used for obtaining some special formats 'placeholders'
|
|
1356
|
+
*/
|
|
1357
|
+
export declare interface FormatProvider {
|
|
1358
|
+
/**
|
|
1359
|
+
* Format placeholder for displaying date
|
|
1360
|
+
*/
|
|
1361
|
+
readonly date: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* Format placeholder for displaying date and time
|
|
1364
|
+
*/
|
|
1365
|
+
readonly dateTime: string;
|
|
1366
|
+
/**
|
|
1367
|
+
* Format placeholder for displaying time
|
|
1368
|
+
*/
|
|
1369
|
+
readonly time: string;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Represents hour component of datetime
|
|
1374
|
+
*/
|
|
1375
|
+
export declare const HOUR = "hour";
|
|
1376
|
+
|
|
1377
|
+
declare namespace i1 {
|
|
1378
|
+
export {
|
|
1379
|
+
SimpleInputDateTimeSelectorComponent
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
declare namespace i1_2 {
|
|
1384
|
+
export {
|
|
1385
|
+
DateTimeSelectorComponent
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
declare namespace i1_3 {
|
|
1390
|
+
export {
|
|
1391
|
+
DateTimePickerComponent
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
declare namespace i1_4 {
|
|
1396
|
+
export {
|
|
1397
|
+
NgClassType,
|
|
1398
|
+
AsRequiredTypePipe
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
declare namespace i2 {
|
|
1403
|
+
export {
|
|
1404
|
+
InputDateTimeSelectorComponent
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
declare namespace i2_2 {
|
|
1409
|
+
export {
|
|
1410
|
+
DateTimeDayPickerComponent
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
declare namespace i2_3 {
|
|
1415
|
+
export {
|
|
1416
|
+
DateFormatPipe
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
declare namespace i3 {
|
|
1421
|
+
export {
|
|
1422
|
+
DateTimeSelectorControlValueAccessor
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
declare namespace i3_2 {
|
|
1427
|
+
export {
|
|
1428
|
+
DateTimeMonthPickerComponent
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
declare namespace i3_3 {
|
|
1433
|
+
export {
|
|
1434
|
+
DateConvertPipe
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
declare namespace i4 {
|
|
1439
|
+
export {
|
|
1440
|
+
DatetimeValidatorDirective
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
declare namespace i4_2 {
|
|
1445
|
+
export {
|
|
1446
|
+
DateTimeYearPickerComponent
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
declare namespace i5 {
|
|
1451
|
+
export {
|
|
1452
|
+
DatetimeMinValidatorDirective
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
declare namespace i6 {
|
|
1457
|
+
export {
|
|
1458
|
+
DatetimeMaxValidatorDirective
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
declare namespace i7_2 {
|
|
1463
|
+
export {
|
|
1464
|
+
DatePipesModule
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
declare namespace i9 {
|
|
1469
|
+
export {
|
|
1470
|
+
DateTimePickerModule
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Component used as datetime selector with input
|
|
1476
|
+
*/
|
|
1477
|
+
export declare class InputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate> {
|
|
1478
|
+
protected _dateApi: DateApi<TDate>;
|
|
1479
|
+
protected _parserSvc: DatePositionParserService;
|
|
1480
|
+
protected _valueProvider: DateValueProvider<TDate>;
|
|
1481
|
+
protected _changeDetector: ChangeDetectorRef;
|
|
1482
|
+
/**
|
|
1483
|
+
* Occurs when value changes
|
|
1484
|
+
*/
|
|
1485
|
+
protected _valueChange: Subject<void>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Occurs when selector is touched by user
|
|
1488
|
+
*/
|
|
1489
|
+
protected _touched: Subject<void>;
|
|
1490
|
+
/**
|
|
1491
|
+
* Occurs when selector requires picker to be displayed or hidden
|
|
1492
|
+
*/
|
|
1493
|
+
protected _pickerRequest: Subject<boolean>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Instance of parser created for specific format
|
|
1496
|
+
*/
|
|
1497
|
+
protected _parser: DatePositionParser | null;
|
|
1498
|
+
/**
|
|
1499
|
+
* Currently used format for displaying data
|
|
1500
|
+
*/
|
|
1501
|
+
protected _format: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Current value representation as date api wrapper
|
|
1504
|
+
*/
|
|
1505
|
+
protected _dateApiValue: null | DateApiObject<TDate>;
|
|
1506
|
+
/**
|
|
1507
|
+
* Indication whether is current value valid value
|
|
1508
|
+
*/
|
|
1509
|
+
protected _isValid: boolean;
|
|
1510
|
+
/**
|
|
1511
|
+
* Minimal possible value that can be picked
|
|
1512
|
+
*/
|
|
1513
|
+
protected _minValue: TDate | null;
|
|
1514
|
+
/**
|
|
1515
|
+
* Maximal possible value that can be picked
|
|
1516
|
+
*/
|
|
1517
|
+
protected _maxValue: TDate | null;
|
|
1518
|
+
/**
|
|
1519
|
+
* Gets or sets currently used format for displaying data
|
|
1520
|
+
*/
|
|
1521
|
+
get format(): string;
|
|
1522
|
+
set format(value: string);
|
|
1523
|
+
/**
|
|
1524
|
+
* Gets or sets placeholder that is displayed when there is no value selected
|
|
1525
|
+
*/
|
|
1526
|
+
placeholder: string | undefined;
|
|
1527
|
+
/**
|
|
1528
|
+
* Gets current value of datetime
|
|
1529
|
+
*/
|
|
1530
|
+
get value(): DateTimeValue<TDate> | null;
|
|
1531
|
+
/**
|
|
1532
|
+
* Gets formatted value
|
|
1533
|
+
*/
|
|
1534
|
+
get formattedValue(): string | null;
|
|
1535
|
+
/**
|
|
1536
|
+
* Gets indication whether is current value valid
|
|
1537
|
+
*/
|
|
1538
|
+
get valid(): boolean;
|
|
1539
|
+
/**
|
|
1540
|
+
* Occurs when value changes
|
|
1541
|
+
*/
|
|
1542
|
+
get valueChange(): Observable<void>;
|
|
1543
|
+
/**
|
|
1544
|
+
* Occurs when selector is touched by user
|
|
1545
|
+
*/
|
|
1546
|
+
get touched(): Observable<void>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Occurs when selector requires picker to be displayed
|
|
1549
|
+
*/
|
|
1550
|
+
get pickerRequest(): Observable<boolean>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Indication whether is input disabled
|
|
1553
|
+
* @internal
|
|
1554
|
+
*/
|
|
1555
|
+
disabled: boolean;
|
|
1556
|
+
/**
|
|
1557
|
+
* Instance of html input element
|
|
1558
|
+
* @internal
|
|
1559
|
+
*/
|
|
1560
|
+
inputElement?: ElementRef<HTMLInputElement>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Gets or sets string representation current of value
|
|
1563
|
+
*/
|
|
1564
|
+
protected get currentValue(): string | null;
|
|
1565
|
+
protected set currentValue(value: string | null);
|
|
1566
|
+
/**
|
|
1567
|
+
* Gets input element used for handling date time value
|
|
1568
|
+
*/
|
|
1569
|
+
protected get input(): HTMLInputElement;
|
|
1570
|
+
constructor(_dateApi: DateApi<TDate>, _parserSvc: DatePositionParserService, _valueProvider: DateValueProvider<TDate>, _changeDetector: ChangeDetectorRef);
|
|
1571
|
+
/**
|
|
1572
|
+
* Sets minimal possible value for picker, that can be picked
|
|
1573
|
+
* @param value - Minimal possible value that can be picked
|
|
1574
|
+
*/
|
|
1575
|
+
setMinValue(value: TDate | null): void;
|
|
1576
|
+
/**
|
|
1577
|
+
* Sets maximal possible value for picker, that can be picked
|
|
1578
|
+
* @param value - Maximal possible value that can be picked
|
|
1579
|
+
*/
|
|
1580
|
+
setMaxValue(value: TDate | null): void;
|
|
1581
|
+
/**
|
|
1582
|
+
* Sets value of datetime selector
|
|
1583
|
+
* @param value - Value to be set to this selector
|
|
1584
|
+
*/
|
|
1585
|
+
setValue(value: DateTimeValue<TDate> | null): void;
|
|
1586
|
+
/**
|
|
1587
|
+
* Sets as 'control' disabled
|
|
1588
|
+
* @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true
|
|
1589
|
+
*/
|
|
1590
|
+
setDisabled(disabled?: boolean): void;
|
|
1591
|
+
/**
|
|
1592
|
+
* Explicitly runs invalidation of content (change detection)
|
|
1593
|
+
*/
|
|
1594
|
+
invalidateVisuals(): void;
|
|
1595
|
+
/**
|
|
1596
|
+
* Handles gaining of focus
|
|
1597
|
+
* @internal
|
|
1598
|
+
*/
|
|
1599
|
+
handleFocus(): void;
|
|
1600
|
+
/**
|
|
1601
|
+
* Handles blur on input
|
|
1602
|
+
* @internal
|
|
1603
|
+
*/
|
|
1604
|
+
handleBlur(): void;
|
|
1605
|
+
/**
|
|
1606
|
+
* Handles user input
|
|
1607
|
+
* @internal
|
|
1608
|
+
*/
|
|
1609
|
+
handleInput(): void;
|
|
1610
|
+
/**
|
|
1611
|
+
* Handles selection of text inside of input
|
|
1612
|
+
* @internal
|
|
1613
|
+
*/
|
|
1614
|
+
handleSelect(): void;
|
|
1615
|
+
/**
|
|
1616
|
+
* Handles click event inside of input
|
|
1617
|
+
* @internal
|
|
1618
|
+
*/
|
|
1619
|
+
handleClick(): void;
|
|
1620
|
+
/**
|
|
1621
|
+
* Handles keyboard events
|
|
1622
|
+
* @param event - Keyboard event that occured
|
|
1623
|
+
* @param input - Html input element that holds current value and selection
|
|
1624
|
+
* @internal
|
|
1625
|
+
*/
|
|
1626
|
+
handleKeyboard(event: KeyboardEvent): void;
|
|
1627
|
+
/**
|
|
1628
|
+
* Shows current value in input
|
|
1629
|
+
*/
|
|
1630
|
+
protected _show(): void;
|
|
1631
|
+
/**
|
|
1632
|
+
* Tests whether are min or max constraint broken, returns true if constraint is broken
|
|
1633
|
+
*/
|
|
1634
|
+
protected _minMaxConstraintTest(): boolean;
|
|
1635
|
+
/**
|
|
1636
|
+
* Runs code with check whether min max constrains was broken
|
|
1637
|
+
* @param code - Code that should be executed which can change current value
|
|
1638
|
+
*/
|
|
1639
|
+
protected _withMinMaxConstraint(code: () => void): void;
|
|
1640
|
+
/**
|
|
1641
|
+
* Clears current value
|
|
1642
|
+
*/
|
|
1643
|
+
protected _clearValue(): void;
|
|
1644
|
+
/**
|
|
1645
|
+
* Changes current value of date for for specified part by single step
|
|
1646
|
+
* @param part - Part of date that should be changed
|
|
1647
|
+
* @param increment - Indication whether value should be incremented or decremented
|
|
1648
|
+
*/
|
|
1649
|
+
protected _stepChangeValue(part: string, increment: boolean): void;
|
|
1650
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputDateTimeSelectorComponent<any>, never>;
|
|
1651
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputDateTimeSelectorComponent<any>, "input-date-time-selector", never, {}, {}, never, never>;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Represents minute component of datetime
|
|
1656
|
+
*/
|
|
1657
|
+
export declare const MINUTE = "minute";
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Represents month component of datetime
|
|
1661
|
+
*/
|
|
1662
|
+
export declare const MONTH = "month";
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* Data that represents month in date picker
|
|
1666
|
+
*/
|
|
1667
|
+
export declare interface MonthData<TDate = any> extends PeriodData<TDate> {
|
|
1668
|
+
/**
|
|
1669
|
+
* Name of month
|
|
1670
|
+
*/
|
|
1671
|
+
name: string;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* Specific css classes for month picker
|
|
1676
|
+
*/
|
|
1677
|
+
export declare interface MonthPickerCssClasses extends CommonPickerCssClasses {
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Type that represents ngClass
|
|
1682
|
+
*/
|
|
1683
|
+
declare type NgClassType = string | string[] | Set<string> | Dictionary<any> | undefined | null;
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Data that represents data for any picker type
|
|
1687
|
+
*/
|
|
1688
|
+
export declare interface PeriodData<TDate = any> {
|
|
1689
|
+
/**
|
|
1690
|
+
* Indication that this period item is active and selected
|
|
1691
|
+
*/
|
|
1692
|
+
active: boolean;
|
|
1693
|
+
/**
|
|
1694
|
+
* Indication that this period item is disabled
|
|
1695
|
+
*/
|
|
1696
|
+
disabled: boolean;
|
|
1697
|
+
/**
|
|
1698
|
+
* Date for this period item
|
|
1699
|
+
*/
|
|
1700
|
+
date: TDate;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* Base class used as base for picker
|
|
1705
|
+
*/
|
|
1706
|
+
export declare abstract class PickerBaseComponent<TDate = any, TDateData extends PeriodData<TDate> = any, TCssClasses = object> implements DateTimePicker<TDate, TCssClasses> {
|
|
1707
|
+
protected _dateApi: DateApi<TDate>;
|
|
1708
|
+
protected _changeDetector: ChangeDetectorRef;
|
|
1709
|
+
/**
|
|
1710
|
+
* Current value of datetime
|
|
1711
|
+
*/
|
|
1712
|
+
protected _value: DateTimeValue<TDate> | null;
|
|
1713
|
+
/**
|
|
1714
|
+
* Occurs when value changes
|
|
1715
|
+
*/
|
|
1716
|
+
protected _valueChange: Subject<void>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Occurs when user scales up
|
|
1719
|
+
*/
|
|
1720
|
+
protected _scaleUp: Subject<TDate>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Occurs when user scales down
|
|
1723
|
+
*/
|
|
1724
|
+
protected _scaleDown: Subject<TDate>;
|
|
1725
|
+
/**
|
|
1726
|
+
* Minimal possible value that can be picked
|
|
1727
|
+
*/
|
|
1728
|
+
protected _minValue: TDate | null;
|
|
1729
|
+
/**
|
|
1730
|
+
* Maximal possible value that can be picked
|
|
1731
|
+
*/
|
|
1732
|
+
protected _maxValue: TDate | null;
|
|
1733
|
+
/**
|
|
1734
|
+
* Gets current value of datetime
|
|
1735
|
+
*/
|
|
1736
|
+
get value(): DateTimeValue<TDate> | null;
|
|
1737
|
+
/**
|
|
1738
|
+
* Occurs when value changes
|
|
1739
|
+
*/
|
|
1740
|
+
get valueChange(): Observable<void>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Occurs when user scales up
|
|
1743
|
+
*/
|
|
1744
|
+
get scaleUp(): Observable<TDate>;
|
|
1745
|
+
/**
|
|
1746
|
+
* Occurs when user scales down
|
|
1747
|
+
*/
|
|
1748
|
+
get scaleDown(): Observable<TDate>;
|
|
1749
|
+
/**
|
|
1750
|
+
* Date api instance for displayed date
|
|
1751
|
+
* @internal
|
|
1752
|
+
*/
|
|
1753
|
+
displayDate: DateApiObject<TDate> | null;
|
|
1754
|
+
/**
|
|
1755
|
+
* Indication whether can go up in period
|
|
1756
|
+
* @internal
|
|
1757
|
+
*/
|
|
1758
|
+
canGoUp: boolean;
|
|
1759
|
+
/**
|
|
1760
|
+
* Indication whether can go down in period
|
|
1761
|
+
* @internal
|
|
1762
|
+
*/
|
|
1763
|
+
canGoDown: boolean;
|
|
1764
|
+
/**
|
|
1765
|
+
* Array of period data to be displayed
|
|
1766
|
+
* @internal
|
|
1767
|
+
*/
|
|
1768
|
+
periodData: TDateData[];
|
|
1769
|
+
/**
|
|
1770
|
+
* Css classes that are used within picker
|
|
1771
|
+
* @internal
|
|
1772
|
+
*/
|
|
1773
|
+
cssClasses: TCssClasses;
|
|
1774
|
+
constructor(_dateApi: DateApi<TDate>, _changeDetector: ChangeDetectorRef);
|
|
1775
|
+
/**
|
|
1776
|
+
* Changes displayed period to "higher" period
|
|
1777
|
+
* @param event - Event that occured
|
|
1778
|
+
* @internal
|
|
1779
|
+
*/
|
|
1780
|
+
goUp(event: Event): void;
|
|
1781
|
+
/**
|
|
1782
|
+
* Selects period
|
|
1783
|
+
* @param event - Event that occured
|
|
1784
|
+
* @param period - Selected period
|
|
1785
|
+
* @internal
|
|
1786
|
+
*/
|
|
1787
|
+
select(event: Event, period: PeriodData<TDate>): void;
|
|
1788
|
+
/**
|
|
1789
|
+
* Sets css classes for picker, allowing to override defaults
|
|
1790
|
+
* @param cssClasses - Css classes to be set for picker
|
|
1791
|
+
*/
|
|
1792
|
+
setCssClasses(cssClasses: TCssClasses): void;
|
|
1793
|
+
/**
|
|
1794
|
+
* Sets minimal possible value for picker, that can be picked
|
|
1795
|
+
* @param value - Minimal possible value that can be picked
|
|
1796
|
+
*/
|
|
1797
|
+
setMinValue(value: TDate | null): void;
|
|
1798
|
+
/**
|
|
1799
|
+
* Sets maximal possible value for picker, that can be picked
|
|
1800
|
+
* @param value - Maximal possible value that can be picked
|
|
1801
|
+
*/
|
|
1802
|
+
setMaxValue(value: TDate | null): void;
|
|
1803
|
+
/**
|
|
1804
|
+
* Sets value of datetime picker
|
|
1805
|
+
* @param value - Value to be set to this picker
|
|
1806
|
+
*/
|
|
1807
|
+
setValue(value: DateTimeValue<TDate> | null): void;
|
|
1808
|
+
/**
|
|
1809
|
+
* Set displays date to be displayed
|
|
1810
|
+
* @param value - Value that identifies period that is going to be displayed
|
|
1811
|
+
*/
|
|
1812
|
+
abstract display(value: DateApiObject<TDate>): void;
|
|
1813
|
+
/**
|
|
1814
|
+
* Sets indication whether can go down
|
|
1815
|
+
* @param value - Indication whether can go down in period
|
|
1816
|
+
*/
|
|
1817
|
+
setCanGoDown(value: boolean): void;
|
|
1818
|
+
/**
|
|
1819
|
+
* Sets indication whether can go up
|
|
1820
|
+
* @param value - Indication whether can go up in period
|
|
1821
|
+
*/
|
|
1822
|
+
setCanGoUp(value: boolean): void;
|
|
1823
|
+
/**
|
|
1824
|
+
* Explicitly runs invalidation of content (change detection)
|
|
1825
|
+
*/
|
|
1826
|
+
invalidateVisuals(): void;
|
|
1827
|
+
/**
|
|
1828
|
+
* Handles click anyway in picker, that blocks blur
|
|
1829
|
+
* @param event - Event that occured
|
|
1830
|
+
* @internal
|
|
1831
|
+
*/
|
|
1832
|
+
handleClick(event: Event): void;
|
|
1833
|
+
/**
|
|
1834
|
+
* Sets period as active
|
|
1835
|
+
* @param period - Period to be set as active
|
|
1836
|
+
*/
|
|
1837
|
+
protected _setPeriod(period: PeriodData<TDate>): void;
|
|
1838
|
+
/**
|
|
1839
|
+
* Updates minimal and maximal value for picker
|
|
1840
|
+
*/
|
|
1841
|
+
protected _updateMinMax(): void;
|
|
1842
|
+
/**
|
|
1843
|
+
* Obtains end of period
|
|
1844
|
+
* @param period - Period for which should be end obtained
|
|
1845
|
+
*/
|
|
1846
|
+
protected abstract _endOfPeriod(period: PeriodData<TDate>): TDate;
|
|
1847
|
+
/**
|
|
1848
|
+
* Tests whether provided value is in same period as displayed picker
|
|
1849
|
+
* @param val - Tested value for same period as displayed picker
|
|
1850
|
+
*/
|
|
1851
|
+
protected abstract _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;
|
|
1852
|
+
/**
|
|
1853
|
+
* Tests whether provided value is in same period target value
|
|
1854
|
+
* @param val - Tested value
|
|
1855
|
+
* @param target - Target value to be tested against
|
|
1856
|
+
*/
|
|
1857
|
+
protected abstract _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;
|
|
1858
|
+
/**
|
|
1859
|
+
* Gets period data for specified value
|
|
1860
|
+
* @param val - Value for which is period data obtained
|
|
1861
|
+
*/
|
|
1862
|
+
protected abstract _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;
|
|
1863
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PickerBaseComponent<any, any, any>, never>;
|
|
1864
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PickerBaseComponent<any, any, any>, never, never, {}, {}, never>;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* Represents quarter component of datetime
|
|
1869
|
+
*/
|
|
1870
|
+
export declare const QUARTER = "quarter";
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* Animation trigger for animating scale up and scale down picker
|
|
1874
|
+
*/
|
|
1875
|
+
export declare const scaleUpDownTrigger: AnimationTriggerMetadata;
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Component used as datetime selector with simple input
|
|
1879
|
+
*/
|
|
1880
|
+
export declare class SimpleInputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate> {
|
|
1881
|
+
protected _dateApi: DateApi<TDate>;
|
|
1882
|
+
protected _valueProvider: DateValueProvider<TDate>;
|
|
1883
|
+
protected _changeDetector: ChangeDetectorRef;
|
|
1884
|
+
/**
|
|
1885
|
+
* Occurs when value changes
|
|
1886
|
+
*/
|
|
1887
|
+
protected _valueChange: Subject<void>;
|
|
1888
|
+
/**
|
|
1889
|
+
* Occurs when selector is touched by user
|
|
1890
|
+
*/
|
|
1891
|
+
protected _touched: Subject<void>;
|
|
1892
|
+
/**
|
|
1893
|
+
* Occurs when selector requires picker to be displayed or hidden
|
|
1894
|
+
*/
|
|
1895
|
+
protected _pickerRequest: Subject<boolean>;
|
|
1896
|
+
/**
|
|
1897
|
+
* Currently used format for displaying data
|
|
1898
|
+
*/
|
|
1899
|
+
protected _format: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Current value representation as date api wrapper
|
|
1902
|
+
*/
|
|
1903
|
+
protected _dateApiValue: null | DateApiObject<TDate>;
|
|
1904
|
+
/**
|
|
1905
|
+
* Indication whether is current value valid value
|
|
1906
|
+
*/
|
|
1907
|
+
protected _isValid: boolean;
|
|
1908
|
+
/**
|
|
1909
|
+
* Minimal possible value that can be picked
|
|
1910
|
+
*/
|
|
1911
|
+
protected _minValue: TDate | null;
|
|
1912
|
+
/**
|
|
1913
|
+
* Maximal possible value that can be picked
|
|
1914
|
+
*/
|
|
1915
|
+
protected _maxValue: TDate | null;
|
|
1916
|
+
/**
|
|
1917
|
+
* Gets or sets currently used format for displaying data
|
|
1918
|
+
*/
|
|
1919
|
+
get format(): string;
|
|
1920
|
+
set format(value: string);
|
|
1921
|
+
/**
|
|
1922
|
+
* Gets or sets placeholder that is displayed when there is no value selected
|
|
1923
|
+
*/
|
|
1924
|
+
placeholder: string | undefined;
|
|
1925
|
+
/**
|
|
1926
|
+
* Gets current value of datetime
|
|
1927
|
+
*/
|
|
1928
|
+
get value(): DateTimeValue<TDate> | null;
|
|
1929
|
+
/**
|
|
1930
|
+
* Gets formatted value
|
|
1931
|
+
*/
|
|
1932
|
+
get formattedValue(): string | null;
|
|
1933
|
+
/**
|
|
1934
|
+
* Gets indication whether is current value valid
|
|
1935
|
+
*/
|
|
1936
|
+
get valid(): boolean;
|
|
1937
|
+
/**
|
|
1938
|
+
* Occurs when value changes
|
|
1939
|
+
*/
|
|
1940
|
+
get valueChange(): Observable<void>;
|
|
1941
|
+
/**
|
|
1942
|
+
* Occurs when selector is touched by user
|
|
1943
|
+
*/
|
|
1944
|
+
get touched(): Observable<void>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Occurs when selector requires picker to be displayed
|
|
1947
|
+
*/
|
|
1948
|
+
get pickerRequest(): Observable<boolean>;
|
|
1949
|
+
/**
|
|
1950
|
+
* Indication whether is input disabled
|
|
1951
|
+
* @internal
|
|
1952
|
+
*/
|
|
1953
|
+
disabled: boolean;
|
|
1954
|
+
/**
|
|
1955
|
+
* Instance of html input element
|
|
1956
|
+
* @internal
|
|
1957
|
+
*/
|
|
1958
|
+
inputElement?: ElementRef<HTMLInputElement>;
|
|
1959
|
+
/**
|
|
1960
|
+
* Gets or sets string representation current of value
|
|
1961
|
+
*/
|
|
1962
|
+
protected get currentValue(): string | null;
|
|
1963
|
+
protected set currentValue(value: string | null);
|
|
1964
|
+
/**
|
|
1965
|
+
* Gets input element used for handling date time value
|
|
1966
|
+
*/
|
|
1967
|
+
protected get input(): HTMLInputElement;
|
|
1968
|
+
constructor(_dateApi: DateApi<TDate>, _valueProvider: DateValueProvider<TDate>, _changeDetector: ChangeDetectorRef);
|
|
1969
|
+
/**
|
|
1970
|
+
* Sets minimal possible value for picker, that can be picked
|
|
1971
|
+
* @param value - Minimal possible value that can be picked
|
|
1972
|
+
*/
|
|
1973
|
+
setMinValue(value: TDate | null): void;
|
|
1974
|
+
/**
|
|
1975
|
+
* Sets maximal possible value for picker, that can be picked
|
|
1976
|
+
* @param value - Maximal possible value that can be picked
|
|
1977
|
+
*/
|
|
1978
|
+
setMaxValue(value: TDate | null): void;
|
|
1979
|
+
/**
|
|
1980
|
+
* Sets value of datetime selector
|
|
1981
|
+
* @param value - Value to be set to this selector
|
|
1982
|
+
*/
|
|
1983
|
+
setValue(value: DateTimeValue<TDate> | null): void;
|
|
1984
|
+
/**
|
|
1985
|
+
* Sets as 'control' disabled
|
|
1986
|
+
* @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true
|
|
1987
|
+
*/
|
|
1988
|
+
setDisabled(disabled?: boolean): void;
|
|
1989
|
+
/**
|
|
1990
|
+
* Explicitly runs invalidation of content (change detection)
|
|
1991
|
+
*/
|
|
1992
|
+
invalidateVisuals(): void;
|
|
1993
|
+
/**
|
|
1994
|
+
* Handles gaining of focus
|
|
1995
|
+
* @internal
|
|
1996
|
+
*/
|
|
1997
|
+
handleFocus(): void;
|
|
1998
|
+
/**
|
|
1999
|
+
* Handles blur on input
|
|
2000
|
+
* @internal
|
|
2001
|
+
*/
|
|
2002
|
+
handleBlur(): void;
|
|
2003
|
+
/**
|
|
2004
|
+
* Handles user input
|
|
2005
|
+
* @internal
|
|
2006
|
+
*/
|
|
2007
|
+
handleInput(): void;
|
|
2008
|
+
/**
|
|
2009
|
+
* Handles click event inside of input
|
|
2010
|
+
* @internal
|
|
2011
|
+
*/
|
|
2012
|
+
handleClick(): void;
|
|
2013
|
+
/**
|
|
2014
|
+
* Handles keyboard events
|
|
2015
|
+
* @param event - Keyboard event that occured
|
|
2016
|
+
* @param input - Html input element that holds current value and selection
|
|
2017
|
+
* @internal
|
|
2018
|
+
*/
|
|
2019
|
+
handleKeyboard(event: KeyboardEvent): void;
|
|
2020
|
+
/**
|
|
2021
|
+
* Clears current value
|
|
2022
|
+
*/
|
|
2023
|
+
protected _clearValue(): void;
|
|
2024
|
+
/**
|
|
2025
|
+
* Tests whether are min or max constraint broken, returns true if constraint is broken
|
|
2026
|
+
*/
|
|
2027
|
+
protected _minMaxConstraintTest(): boolean;
|
|
2028
|
+
/**
|
|
2029
|
+
* Runs code with check whether min max constrains was broken
|
|
2030
|
+
* @param code - Code that should be executed which can change current value
|
|
2031
|
+
*/
|
|
2032
|
+
protected _withMinMaxConstraint(code: () => void): void;
|
|
2033
|
+
/**
|
|
2034
|
+
* Shows current value in input
|
|
2035
|
+
*/
|
|
2036
|
+
protected _show(): void;
|
|
2037
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleInputDateTimeSelectorComponent<any>, never>;
|
|
2038
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleInputDateTimeSelectorComponent<any>, "simple-input-date-time-selector", never, {}, {}, never, never>;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* Validations functions for datetime
|
|
2043
|
+
*/
|
|
2044
|
+
export declare class Validators {
|
|
2045
|
+
/**
|
|
2046
|
+
* Creates validator function that validates control if its value is valid datetime value
|
|
2047
|
+
* @param datetime - Object storing information about datetime value
|
|
2048
|
+
*/
|
|
2049
|
+
static datetime<TDate = any>(datetime: DateTimeValueObject<TDate>): ValidatorFn;
|
|
2050
|
+
/**
|
|
2051
|
+
* Creates validator function that validates control if its value is withing range of minimal datetime value
|
|
2052
|
+
* @param datetime - Object storing information about datetime value
|
|
2053
|
+
* @param dateApi - Date api object
|
|
2054
|
+
*/
|
|
2055
|
+
static minDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn;
|
|
2056
|
+
/**
|
|
2057
|
+
* Creates validator function that validates control if its value is withing range of maximal datetime value
|
|
2058
|
+
* @param datetime - Object storing information about datetime value
|
|
2059
|
+
* @param dateApi - Date api object
|
|
2060
|
+
*/
|
|
2061
|
+
static maxDatetime<TDate = any>(datetime: DateTimeValueObject<TDate>, dateApi: DateApi<TDate>): ValidatorFn;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* Represents week component of datetime
|
|
2066
|
+
*/
|
|
2067
|
+
export declare const WEEK = "week";
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* Represents year component of datetime
|
|
2071
|
+
*/
|
|
2072
|
+
export declare const YEAR = "year";
|
|
2073
|
+
|
|
2074
|
+
/**
|
|
2075
|
+
* Data that represents year in date picker
|
|
2076
|
+
*/
|
|
2077
|
+
export declare interface YearData<TDate = any> extends PeriodData<TDate> {
|
|
2078
|
+
/**
|
|
2079
|
+
* Value of year
|
|
2080
|
+
*/
|
|
2081
|
+
value: number;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Specific css classes for year picker
|
|
2086
|
+
*/
|
|
2087
|
+
export declare interface YearPickerCssClasses extends CommonPickerCssClasses {
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
export { }
|