@anglr/datetime 7.0.0-beta.20230815120707 → 7.0.0-beta.20230817095054
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 +40 -9
- package/date-fns/package.json +3 -4
- package/{es2020 → es2022}/date-fns/src/services/dateFnsDateApi.service.js +31 -17
- package/es2022/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
- package/{es2020 → es2022}/moment/src/services/momentDateApi.service.js +20 -8
- package/es2022/moment/src/services/momentDateApi.service.js.map +1 -0
- package/{es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js → es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js} +56 -73
- package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js.map +1 -0
- package/{es2015 → es2022}/src/directives/datePickerInput/datePickerInput.directive.js +5 -4
- package/es2022/src/directives/datePickerInput/datePickerInput.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +29 -18
- package/{es2015 → es2022}/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +1 -1
- package/{es2020 → es2022}/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +5 -4
- package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +5 -4
- package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +9 -4
- package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +5 -4
- package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/withNow/withNow.directive.js +10 -9
- package/es2022/src/directives/withNow/withNow.directive.js.map +1 -0
- package/{es2015 → es2022}/src/directives/withTime/withTime.directive.js +5 -4
- package/es2022/src/directives/withTime/withTime.directive.js.map +1 -0
- package/{es2020 → es2022}/src/directives/withToday/withToday.directive.js +10 -9
- package/es2022/src/directives/withToday/withToday.directive.js.map +1 -0
- package/{es2020 → es2022}/src/misc/validators.js +2 -2
- package/es2022/src/misc/validators.js.map +1 -0
- package/{es2020 → es2022}/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +65 -39
- package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +6 -4
- package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -0
- package/{es2015 → es2022}/src/modules/calendar/modules/monthCalendar.module.js +8 -7
- package/es2022/src/modules/calendar/modules/monthCalendar.module.js.map +1 -0
- package/{es2020 → es2022}/src/modules/calendar/services/eventParser/eventParser.service.js +6 -4
- package/es2022/src/modules/calendar/services/eventParser/eventParser.service.js.map +1 -0
- package/es2022/src/modules/datePipes.module.js +29 -0
- package/es2022/src/modules/datePipes.module.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTime/directives/dateTime/dateTime.directive.js +69 -41
- package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -0
- package/{es2015 → es2022}/src/modules/dateTime/directives/dateTimeBase.js +27 -22
- package/es2022/src/modules/dateTime/directives/dateTimeBase.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +17 -15
- package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +36 -27
- package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -0
- package/{es2015 → es2022}/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +17 -15
- package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +17 -15
- package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +17 -15
- package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -0
- package/{es2015 → es2022}/src/modules/dateTime/modules/dateTime.module.js +16 -15
- package/es2022/src/modules/dateTime/modules/dateTime.module.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +58 -39
- package/es2022/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +61 -24
- package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +15 -14
- package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +6 -4
- package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +24 -27
- package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +10 -12
- package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +52 -21
- package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -0
- package/{es2020 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +1 -1
- package/{es2020 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +57 -41
- package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -0
- package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +37 -0
- package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -0
- package/{es2015 → es2022}/src/modules/dateTimePicker/modules/dateTimePicker.module.js +7 -6
- package/es2022/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -0
- package/{es2015 → es2022}/src/pipes/dateConvert.pipe.js +6 -4
- package/es2022/src/pipes/dateConvert.pipe.js.map +1 -0
- package/{es2015 → es2022}/src/pipes/dateFormat.pipe.js +7 -4
- package/es2022/src/pipes/dateFormat.pipe.js.map +1 -0
- package/{es2020 → es2022}/src/services/datePositionParser/datePositionParser.service.js +19 -17
- package/es2022/src/services/datePositionParser/datePositionParser.service.js.map +1 -0
- package/{es2020 → es2022}/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +11 -4
- package/es2022/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -0
- package/{es2020 → es2022}/src/services/dateValueProvider/dateValueProvider.service.js +6 -4
- package/es2022/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -0
- package/moment/package.json +3 -4
- package/package.json +50 -58
- package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts +67 -0
- package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts.map +1 -0
- package/src/misc/types.d.ts +2 -2
- package/src/misc/types.d.ts.map +1 -1
- package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts +1 -1
- package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts +1 -1
- package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +1 -1
- package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts +1 -1
- package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -1
- package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts +6 -0
- package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts.map +1 -1
- package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts +1 -1
- package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts +1 -1
- package/src/services/dateApi/dateApi.interface.d.ts +2 -2
- package/src/services/dateApi/dateApi.interface.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -590
- package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +0 -1
- package/es2015/moment/src/services/momentDateApi.service.js +0 -547
- package/es2015/moment/src/services/momentDateApi.service.js.map +0 -1
- package/es2015/src/directives/datePickerInput/datePickerInput.directive.js.map +0 -1
- package/es2015/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +0 -325
- package/es2015/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +0 -29
- package/es2015/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +0 -1
- package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +0 -37
- package/es2015/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +0 -1
- package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +0 -137
- package/es2015/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +0 -1
- package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +0 -29
- package/es2015/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +0 -1
- package/es2015/src/directives/withNow/withNow.directive.js +0 -44
- package/es2015/src/directives/withNow/withNow.directive.js.map +0 -1
- package/es2015/src/directives/withTime/withTime.directive.js.map +0 -1
- package/es2015/src/directives/withToday/withToday.directive.js +0 -44
- package/es2015/src/directives/withToday/withToday.directive.js.map +0 -1
- package/es2015/src/misc/utils.js +0 -164
- package/es2015/src/misc/utils.js.map +0 -1
- package/es2015/src/misc/validators.js +0 -142
- package/es2015/src/misc/validators.js.map +0 -1
- package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +0 -198
- package/es2015/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +0 -1
- package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +0 -27
- package/es2015/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +0 -1
- package/es2015/src/modules/calendar/modules/monthCalendar.module.js.map +0 -1
- package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js +0 -75
- package/es2015/src/modules/calendar/services/eventParser/eventParser.service.js.map +0 -1
- package/es2015/src/modules/datePipes.module.js +0 -28
- package/es2015/src/modules/datePipes.module.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js +0 -254
- package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +0 -77
- package/es2015/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +0 -70
- package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +0 -63
- package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +0 -1
- package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +0 -186
- package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +0 -299
- package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +0 -151
- package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +0 -123
- package/es2015/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +0 -137
- package/es2015/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +0 -126
- package/es2015/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +0 -261
- package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +0 -222
- package/es2015/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +0 -30
- package/es2015/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
- package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +0 -1
- package/es2015/src/pipes/dateConvert.pipe.js.map +0 -1
- package/es2015/src/pipes/dateFormat.pipe.js.map +0 -1
- package/es2015/src/services/datePositionParser/datePositionParser.service.js +0 -243
- package/es2015/src/services/datePositionParser/datePositionParser.service.js.map +0 -1
- package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +0 -81
- package/es2015/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +0 -1
- package/es2015/src/services/dateValueProvider/dateValueProvider.service.js +0 -69
- package/es2015/src/services/dateValueProvider/dateValueProvider.service.js.map +0 -1
- package/es2020/date-fns/src/index.js +0 -4
- package/es2020/date-fns/src/index.js.map +0 -1
- package/es2020/date-fns/src/misc/tokens.js +0 -31
- package/es2020/date-fns/src/misc/tokens.js.map +0 -1
- package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +0 -1
- package/es2020/date-fns/src/services/dateFnsLocale.service.js +0 -2
- package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +0 -1
- package/es2020/moment/src/index.js +0 -3
- package/es2020/moment/src/index.js.map +0 -1
- package/es2020/moment/src/misc/tokens.js +0 -26
- package/es2020/moment/src/misc/tokens.js.map +0 -1
- package/es2020/moment/src/services/momentDateApi.service.js.map +0 -1
- package/es2020/src/directives/datePickerInput/datePickerInput.directive.js +0 -37
- package/es2020/src/directives/datePickerInput/datePickerInput.directive.js.map +0 -1
- package/es2020/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +0 -1
- package/es2020/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +0 -1
- package/es2020/src/directives/index.js +0 -10
- package/es2020/src/directives/index.js.map +0 -1
- package/es2020/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +0 -1
- package/es2020/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +0 -1
- package/es2020/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +0 -1
- package/es2020/src/directives/withNow/withNow.directive.js.map +0 -1
- package/es2020/src/directives/withTime/withTime.directive.js +0 -32
- package/es2020/src/directives/withTime/withTime.directive.js.map +0 -1
- package/es2020/src/directives/withToday/withToday.directive.js.map +0 -1
- package/es2020/src/index.js +0 -13
- package/es2020/src/index.js.map +0 -1
- package/es2020/src/interfaces/dateTime/datetime.interface.js +0 -2
- package/es2020/src/interfaces/dateTime/datetime.interface.js.map +0 -1
- package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js +0 -2
- package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +0 -1
- package/es2020/src/interfaces/formatProvider/formatProvider.interface.js +0 -2
- package/es2020/src/interfaces/formatProvider/formatProvider.interface.js.map +0 -1
- package/es2020/src/interfaces/index.js +0 -4
- package/es2020/src/interfaces/index.js.map +0 -1
- package/es2020/src/legacy/picker/components/picker/picker.component.animations.js +0 -94
- package/es2020/src/legacy/picker/components/picker/picker.component.animations.js.map +0 -1
- package/es2020/src/misc/constants.js +0 -33
- package/es2020/src/misc/constants.js.map +0 -1
- package/es2020/src/misc/enums.js +0 -23
- package/es2020/src/misc/enums.js.map +0 -1
- package/es2020/src/misc/tokens.js +0 -38
- package/es2020/src/misc/tokens.js.map +0 -1
- package/es2020/src/misc/types.js +0 -2
- package/es2020/src/misc/types.js.map +0 -1
- package/es2020/src/misc/validators.js.map +0 -1
- package/es2020/src/modules/calendar/components/index.js +0 -2
- package/es2020/src/modules/calendar/components/index.js.map +0 -1
- package/es2020/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +0 -1
- package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +0 -2
- package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +0 -1
- package/es2020/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +0 -1
- package/es2020/src/modules/calendar/directives/index.js +0 -3
- package/es2020/src/modules/calendar/directives/index.js.map +0 -1
- package/es2020/src/modules/calendar/index.js +0 -7
- package/es2020/src/modules/calendar/index.js.map +0 -1
- package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js +0 -2
- package/es2020/src/modules/calendar/interfaces/calendarDayData.interface.js.map +0 -1
- package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +0 -2
- package/es2020/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +0 -1
- package/es2020/src/modules/calendar/interfaces/eventData.interface.js +0 -2
- package/es2020/src/modules/calendar/interfaces/eventData.interface.js.map +0 -1
- package/es2020/src/modules/calendar/interfaces/index.js +0 -4
- package/es2020/src/modules/calendar/interfaces/index.js.map +0 -1
- package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +0 -27
- package/es2020/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +0 -1
- package/es2020/src/modules/calendar/misc/enums/index.js +0 -3
- package/es2020/src/modules/calendar/misc/enums/index.js.map +0 -1
- package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +0 -19
- package/es2020/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +0 -1
- package/es2020/src/modules/calendar/misc/index.js +0 -2
- package/es2020/src/modules/calendar/misc/index.js.map +0 -1
- package/es2020/src/modules/calendar/modules/index.js +0 -2
- package/es2020/src/modules/calendar/modules/index.js.map +0 -1
- package/es2020/src/modules/calendar/modules/monthCalendar.module.js +0 -32
- package/es2020/src/modules/calendar/modules/monthCalendar.module.js.map +0 -1
- package/es2020/src/modules/calendar/services/eventParser/eventParser.service.js.map +0 -1
- package/es2020/src/modules/calendar/services/index.js +0 -2
- package/es2020/src/modules/calendar/services/index.js.map +0 -1
- package/es2020/src/modules/datePipes.module.js +0 -28
- package/es2020/src/modules/datePipes.module.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeBase.js +0 -61
- package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +0 -70
- package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +0 -1
- package/es2020/src/modules/dateTime/directives/index.js +0 -8
- package/es2020/src/modules/dateTime/directives/index.js.map +0 -1
- package/es2020/src/modules/dateTime/index.js +0 -3
- package/es2020/src/modules/dateTime/index.js.map +0 -1
- package/es2020/src/modules/dateTime/modules/dateTime.module.js +0 -43
- package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +0 -1
- package/es2020/src/modules/dateTime/modules/index.js +0 -2
- package/es2020/src/modules/dateTime/modules/index.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +0 -2
- package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/index.js +0 -9
- package/es2020/src/modules/dateTimePicker/components/index.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js +0 -347
- package/es2020/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +0 -2
- package/es2020/src/modules/dateTimePicker/directives/index.js +0 -6
- package/es2020/src/modules/dateTimePicker/directives/index.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +0 -2
- package/es2020/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +0 -30
- package/es2020/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/index.js +0 -6
- package/es2020/src/modules/dateTimePicker/index.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +0 -2
- package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/interfaces/index.js +0 -3
- package/es2020/src/modules/dateTimePicker/interfaces/index.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +0 -2
- package/es2020/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/misc/tokens.js +0 -10
- package/es2020/src/modules/dateTimePicker/misc/tokens.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js +0 -29
- package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +0 -1
- package/es2020/src/modules/dateTimePicker/modules/index.js +0 -2
- package/es2020/src/modules/dateTimePicker/modules/index.js.map +0 -1
- package/es2020/src/modules/index.js +0 -5
- package/es2020/src/modules/index.js.map +0 -1
- package/es2020/src/pipes/dateConvert.pipe.js +0 -35
- package/es2020/src/pipes/dateConvert.pipe.js.map +0 -1
- package/es2020/src/pipes/dateFormat.pipe.js +0 -39
- package/es2020/src/pipes/dateFormat.pipe.js.map +0 -1
- package/es2020/src/services/dateApi/dateApi.interface.js +0 -2
- package/es2020/src/services/dateApi/dateApi.interface.js.map +0 -1
- package/es2020/src/services/datePositionParser/datePositionParser.interface.js +0 -2
- package/es2020/src/services/datePositionParser/datePositionParser.interface.js.map +0 -1
- package/es2020/src/services/datePositionParser/datePositionParser.service.js.map +0 -1
- package/es2020/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +0 -1
- package/es2020/src/services/dateValueProvider/dateValueProvider.service.js.map +0 -1
- package/es2020/src/services/index.js +0 -6
- package/es2020/src/services/index.js.map +0 -1
- package/src/dark.scss +0 -38
- package/src/default.scss +0 -33
- package/src/theme.scss +0 -80
- /package/{es2015 → es2022}/date-fns/src/index.js +0 -0
- /package/{es2015 → es2022}/date-fns/src/index.js.map +0 -0
- /package/{es2015 → es2022}/date-fns/src/misc/tokens.js +0 -0
- /package/{es2015 → es2022}/date-fns/src/misc/tokens.js.map +0 -0
- /package/{es2015 → es2022}/date-fns/src/services/dateFnsLocale.service.js +0 -0
- /package/{es2015 → es2022}/date-fns/src/services/dateFnsLocale.service.js.map +0 -0
- /package/{es2015 → es2022}/moment/src/index.js +0 -0
- /package/{es2015 → es2022}/moment/src/index.js.map +0 -0
- /package/{es2015 → es2022}/moment/src/misc/tokens.js +0 -0
- /package/{es2015 → es2022}/moment/src/misc/tokens.js.map +0 -0
- /package/{es2015 → es2022}/src/directives/index.js +0 -0
- /package/{es2015 → es2022}/src/directives/index.js.map +0 -0
- /package/{es2015 → es2022}/src/index.js +0 -0
- /package/{es2015 → es2022}/src/index.js.map +0 -0
- /package/{es2015 → es2022}/src/interfaces/dateTime/datetime.interface.js +0 -0
- /package/{es2015 → es2022}/src/interfaces/dateTime/datetime.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/interfaces/dateTimeInput/dateTimeInput.interface.js +0 -0
- /package/{es2015 → es2022}/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/interfaces/formatProvider/formatProvider.interface.js +0 -0
- /package/{es2015 → es2022}/src/interfaces/formatProvider/formatProvider.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/interfaces/index.js +0 -0
- /package/{es2015 → es2022}/src/interfaces/index.js.map +0 -0
- /package/{es2015 → es2022}/src/legacy/picker/components/picker/picker.component.animations.js +0 -0
- /package/{es2015 → es2022}/src/legacy/picker/components/picker/picker.component.animations.js.map +0 -0
- /package/{es2015 → es2022}/src/misc/constants.js +0 -0
- /package/{es2015 → es2022}/src/misc/constants.js.map +0 -0
- /package/{es2015 → es2022}/src/misc/enums.js +0 -0
- /package/{es2015 → es2022}/src/misc/enums.js.map +0 -0
- /package/{es2015 → es2022}/src/misc/tokens.js +0 -0
- /package/{es2015 → es2022}/src/misc/tokens.js.map +0 -0
- /package/{es2015 → es2022}/src/misc/types.js +0 -0
- /package/{es2015 → es2022}/src/misc/types.js.map +0 -0
- /package/{es2020 → es2022}/src/misc/utils.js +0 -0
- /package/{es2020 → es2022}/src/misc/utils.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/components/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/components/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.context.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/directives/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/directives/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarDayData.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarDayData.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/calendarEventDayMetadata.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/eventData.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/eventData.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/interfaces/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/calendarDayAspectRatio.enum.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/enums/monthCalendarDayFormat.enum.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/misc/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/modules/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/modules/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/services/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/calendar/services/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/directives/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/directives/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/modules/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTime/modules/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.data.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/directives/loopScroll/loopScroll.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/misc/tokens.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/misc/tokens.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/modules/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/dateTimePicker/modules/index.js.map +0 -0
- /package/{es2015 → es2022}/src/modules/index.js +0 -0
- /package/{es2015 → es2022}/src/modules/index.js.map +0 -0
- /package/{es2015 → es2022}/src/services/dateApi/dateApi.interface.js +0 -0
- /package/{es2015 → es2022}/src/services/dateApi/dateApi.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/services/datePositionParser/datePositionParser.interface.js +0 -0
- /package/{es2015 → es2022}/src/services/datePositionParser/datePositionParser.interface.js.map +0 -0
- /package/{es2015 → es2022}/src/services/index.js +0 -0
- /package/{es2015 → es2022}/src/services/index.js.map +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Directive, forwardRef, Inject } from '@angular/core';
|
|
2
|
-
import { NG_VALIDATORS } from '@angular/forms';
|
|
3
|
-
import { DATE_API } from '../../../../misc/tokens';
|
|
4
|
-
import { datetimeMinValidator } from '../../../../misc/validators';
|
|
5
|
-
import { DateTimeBase } from '../dateTimeBase';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Applies validator for date time min value
|
|
9
|
-
*/
|
|
10
|
-
export class DateTimeMinValidatorSADirective extends DateTimeBase {
|
|
11
|
-
//######################### constructor #########################
|
|
12
|
-
constructor(dateApi) {
|
|
13
|
-
super();
|
|
14
|
-
this.dateApi = dateApi;
|
|
15
|
-
//######################### private fields #########################
|
|
16
|
-
/**
|
|
17
|
-
* Function used for validations
|
|
18
|
-
*/
|
|
19
|
-
this._validator = () => null;
|
|
20
|
-
}
|
|
21
|
-
//######################### public methods - implementation of OnInit #########################
|
|
22
|
-
/**
|
|
23
|
-
* Initialize component
|
|
24
|
-
*/
|
|
25
|
-
ngOnInit() {
|
|
26
|
-
this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);
|
|
27
|
-
}
|
|
28
|
-
//######################### public methods - implementation of Validator #########################
|
|
29
|
-
/**
|
|
30
|
-
* Validates input and returns validation result
|
|
31
|
-
* @param control - Control that is being validated
|
|
32
|
-
* @returns validation results
|
|
33
|
-
*/
|
|
34
|
-
validate(control) {
|
|
35
|
-
return this._validator(control);
|
|
36
|
-
}
|
|
37
|
-
//######################### protected methods - overrides #########################
|
|
38
|
-
/**
|
|
39
|
-
* @inheritdoc
|
|
40
|
-
*/
|
|
41
|
-
onMinDateTimeChange() {
|
|
42
|
-
this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
DateTimeMinValidatorSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeMinValidatorSADirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
|
|
46
|
-
DateTimeMinValidatorSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimeMinValidatorSADirective, isStandalone: true, selector: "[dateTime][minDateTime][validate]", providers: [
|
|
47
|
-
{
|
|
48
|
-
provide: NG_VALIDATORS,
|
|
49
|
-
useExisting: forwardRef(() => DateTimeMinValidatorSADirective),
|
|
50
|
-
multi: true
|
|
51
|
-
},
|
|
52
|
-
], usesInheritance: true, ngImport: i0 });
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeMinValidatorSADirective, decorators: [{
|
|
54
|
-
type: Directive,
|
|
55
|
-
args: [{
|
|
56
|
-
selector: '[dateTime][minDateTime][validate]',
|
|
57
|
-
providers: [
|
|
58
|
-
{
|
|
59
|
-
provide: NG_VALIDATORS,
|
|
60
|
-
useExisting: forwardRef(() => DateTimeMinValidatorSADirective),
|
|
61
|
-
multi: true
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
standalone: true,
|
|
65
|
-
}]
|
|
66
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
67
|
-
type: Inject,
|
|
68
|
-
args: [DATE_API]
|
|
69
|
-
}] }]; } });
|
|
70
|
-
//# sourceMappingURL=dateTimeMinValidator.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,+BAAiD,SAAQ,YAAmB;IASrF,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;QAR/D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAM7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACvJ,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACgB,mBAAmB;QAElC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACvJ,CAAC;;4HA7CQ,+BAA+B,kBAUpB,QAAQ;gHAVnB,+BAA+B,gFAVxC;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;YAC9D,KAAK,EAAE,IAAI;SACd;KACJ;2FAGQ,+BAA+B;kBAd3C,SAAS;mBACV;oBACI,QAAQ,EAAE,mCAAmC;oBAC7C,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,gCAAgC,CAAC;4BAC9D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeMinValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time min value\n */\n@Directive(\n{\n selector: '[dateTime][minDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMinValidatorSADirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeMinValidatorSADirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMinDateTimeChange(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);\n }\n}"]}
|
package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Directive, forwardRef, Inject } from '@angular/core';
|
|
2
|
-
import { NG_VALIDATORS } from '@angular/forms';
|
|
3
|
-
import { DATE_API } from '../../../../misc/tokens';
|
|
4
|
-
import { datetimeValidator } from '../../../../misc/validators';
|
|
5
|
-
import { DateTimeBase } from '../dateTimeBase';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Applies validator for date time
|
|
9
|
-
*/
|
|
10
|
-
export class DateTimeValidatorSADirective extends DateTimeBase {
|
|
11
|
-
//######################### constructor #########################
|
|
12
|
-
constructor(dateApi) {
|
|
13
|
-
super();
|
|
14
|
-
this.dateApi = dateApi;
|
|
15
|
-
//######################### private fields #########################
|
|
16
|
-
/**
|
|
17
|
-
* Function used for validations
|
|
18
|
-
*/
|
|
19
|
-
this._validator = () => null;
|
|
20
|
-
}
|
|
21
|
-
//######################### public methods - implementation of OnInit #########################
|
|
22
|
-
/**
|
|
23
|
-
* Initialize component
|
|
24
|
-
*/
|
|
25
|
-
ngOnInit() {
|
|
26
|
-
this._validator = datetimeValidator(this.dateApi, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);
|
|
27
|
-
}
|
|
28
|
-
//######################### public methods - implementation of Validator #########################
|
|
29
|
-
/**
|
|
30
|
-
* Validates input and returns validation result
|
|
31
|
-
* @param control - Control that is being validated
|
|
32
|
-
* @returns validation results
|
|
33
|
-
*/
|
|
34
|
-
validate(control) {
|
|
35
|
-
return this._validator(control);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
DateTimeValidatorSADirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeValidatorSADirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
-
DateTimeValidatorSADirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DateTimeValidatorSADirective, isStandalone: true, selector: "[dateTime][validate]", providers: [
|
|
40
|
-
{
|
|
41
|
-
provide: NG_VALIDATORS,
|
|
42
|
-
useExisting: forwardRef(() => DateTimeValidatorSADirective),
|
|
43
|
-
multi: true
|
|
44
|
-
},
|
|
45
|
-
], usesInheritance: true, ngImport: i0 });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeValidatorSADirective, decorators: [{
|
|
47
|
-
type: Directive,
|
|
48
|
-
args: [{
|
|
49
|
-
selector: '[dateTime][validate]',
|
|
50
|
-
providers: [
|
|
51
|
-
{
|
|
52
|
-
provide: NG_VALIDATORS,
|
|
53
|
-
useExisting: forwardRef(() => DateTimeValidatorSADirective),
|
|
54
|
-
multi: true
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
standalone: true,
|
|
58
|
-
}]
|
|
59
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
60
|
-
type: Inject,
|
|
61
|
-
args: [DATE_API]
|
|
62
|
-
}] }]; } });
|
|
63
|
-
//# sourceMappingURL=dateTimeValidator.directive.js.map
|
package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimeValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,4BAA8C,SAAQ,YAAmB;IASlF,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;QAR/D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAM7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACrH,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;;yHAnCQ,4BAA4B,kBAUjB,QAAQ;6GAVnB,4BAA4B,mEAVrC;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;YAC3D,KAAK,EAAE,IAAI;SACd;KACJ;2FAGQ,4BAA4B;kBAdxC,SAAS;mBACV;oBACI,QAAQ,EAAE,sBAAsB;oBAChC,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,6BAA6B,CAAC;4BAC3D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time\n */\n@Directive(\n{\n selector: '[dateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeValidatorSADirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeValidatorSADirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeValidator(this.dateApi, this.dateTimeData.valueFormat, this.dateTimeData.customFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTime.module.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/modules/dateTime.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,uCAAuC,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,4BAA4B,EAAC,MAAM,eAAe,CAAC;;AAErN;;GAEG;AAsBH,MAAM,OAAO,cAAc;;2GAAd,cAAc;4GAAd,cAAc,YAjBnB,mBAAmB;QACnB,uCAAuC;QACvC,wBAAwB;QACxB,+BAA+B;QAC/B,+BAA+B;QAC/B,4BAA4B,aAI5B,mBAAmB;QACnB,uCAAuC;QACvC,wBAAwB;QACxB,+BAA+B;QAC/B,+BAA+B;QAC/B,4BAA4B;4GAGvB,cAAc;2FAAd,cAAc;kBArB1B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,mBAAmB;wBACnB,uCAAuC;wBACvC,wBAAwB;wBACxB,+BAA+B;wBAC/B,+BAA+B;wBAC/B,4BAA4B;qBAC/B;oBACD,OAAO,EACP;wBACI,mBAAmB;wBACnB,uCAAuC;wBACvC,wBAAwB;wBACxB,+BAA+B;wBAC/B,+BAA+B;wBAC/B,4BAA4B;qBAC/B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateTimeControlValueAccessorSADirective, DateTimeSADirective, DateTimeInputSADirective, DateTimeMaxValidatorSADirective, DateTimeMinValidatorSADirective, DateTimeValidatorSADirective} from '../directives';\n\n/**\n * Module for basic date time directives, components, pipes\n */\n@NgModule(\n{\n imports:\n [\n DateTimeSADirective,\n DateTimeControlValueAccessorSADirective,\n DateTimeInputSADirective,\n DateTimeMaxValidatorSADirective,\n DateTimeMinValidatorSADirective,\n DateTimeValidatorSADirective,\n ],\n exports:\n [\n DateTimeSADirective,\n DateTimeControlValueAccessorSADirective,\n DateTimeInputSADirective,\n DateTimeMaxValidatorSADirective,\n DateTimeMinValidatorSADirective,\n DateTimeValidatorSADirective,\n ],\n})\nexport class DateTimeModule\n{\n}"]}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, inject } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { DATE_API } from '../../../misc/tokens';
|
|
4
|
-
/**
|
|
5
|
-
* Base abstract class for each date time period picker
|
|
6
|
-
*/
|
|
7
|
-
export class DateTimePeriodPickerBase {
|
|
8
|
-
constructor() {
|
|
9
|
-
//######################### protected properties #########################
|
|
10
|
-
/**
|
|
11
|
-
* Array of period data to be displayed
|
|
12
|
-
*/
|
|
13
|
-
this.periodData = [];
|
|
14
|
-
/**
|
|
15
|
-
* Subject used for emitting of value changes
|
|
16
|
-
*/
|
|
17
|
-
this.valueChangeSubject = new Subject();
|
|
18
|
-
/**
|
|
19
|
-
* Subject used for scaling up
|
|
20
|
-
*/
|
|
21
|
-
this.scaleUpSubject = new Subject();
|
|
22
|
-
/**
|
|
23
|
-
* Subject used for scaling down
|
|
24
|
-
*/
|
|
25
|
-
this.scaleDownSubject = new Subject();
|
|
26
|
-
/**
|
|
27
|
-
* Change detector instance
|
|
28
|
-
*/
|
|
29
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
30
|
-
/**
|
|
31
|
-
* Instance of date api for manipulation with date time
|
|
32
|
-
*/
|
|
33
|
-
this.dateApi = inject(DATE_API);
|
|
34
|
-
/**
|
|
35
|
-
* @inheritdoc
|
|
36
|
-
*/
|
|
37
|
-
this.canScaleUp = false;
|
|
38
|
-
/**
|
|
39
|
-
* @inheritdoc
|
|
40
|
-
*/
|
|
41
|
-
this.canScaleDown = false;
|
|
42
|
-
/**
|
|
43
|
-
* @inheritdoc
|
|
44
|
-
*/
|
|
45
|
-
this.ranged = false;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Gets or sets value as single value
|
|
49
|
-
*/
|
|
50
|
-
get singleValue() {
|
|
51
|
-
if (Array.isArray(this.value)) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return this.value;
|
|
55
|
-
}
|
|
56
|
-
set singleValue(value) {
|
|
57
|
-
this.value = value;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Gets or sets value as single value
|
|
61
|
-
*/
|
|
62
|
-
get rangeValue() {
|
|
63
|
-
if (!Array.isArray(this.value)) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return this.value;
|
|
67
|
-
}
|
|
68
|
-
set rangeValue(value) {
|
|
69
|
-
this.value = value;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @inheritdoc
|
|
73
|
-
*/
|
|
74
|
-
get display() {
|
|
75
|
-
var _a;
|
|
76
|
-
return (_a = this.displayDate) === null || _a === void 0 ? void 0 : _a.value;
|
|
77
|
-
}
|
|
78
|
-
set display(value) {
|
|
79
|
-
if (!value) {
|
|
80
|
-
this.displayDate = null;
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
this.displayDate = this.dateApi.getValue(value);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @inheritdoc
|
|
87
|
-
*/
|
|
88
|
-
get maxDate() {
|
|
89
|
-
var _a;
|
|
90
|
-
return (_a = this.maxDateObj) === null || _a === void 0 ? void 0 : _a.value;
|
|
91
|
-
}
|
|
92
|
-
set maxDate(value) {
|
|
93
|
-
if (!value) {
|
|
94
|
-
this.maxDateObj = null;
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
this.maxDateObj = this.dateApi.getValue(value);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @inheritdoc
|
|
101
|
-
*/
|
|
102
|
-
get minDate() {
|
|
103
|
-
var _a;
|
|
104
|
-
return (_a = this.minDateObj) === null || _a === void 0 ? void 0 : _a.value;
|
|
105
|
-
}
|
|
106
|
-
set minDate(value) {
|
|
107
|
-
if (!value) {
|
|
108
|
-
this.minDateObj = null;
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.minDateObj = this.dateApi.getValue(value);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @inheritdoc
|
|
115
|
-
*/
|
|
116
|
-
get valueChange() {
|
|
117
|
-
return this.valueChangeSubject.asObservable();
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* @inheritdoc
|
|
121
|
-
*/
|
|
122
|
-
get scaleUp() {
|
|
123
|
-
return this.scaleUpSubject.asObservable();
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @inheritdoc
|
|
127
|
-
*/
|
|
128
|
-
get scaleDown() {
|
|
129
|
-
return this.scaleDownSubject.asObservable();
|
|
130
|
-
}
|
|
131
|
-
//######################### public methods - implementation of invalidatable #########################
|
|
132
|
-
/**
|
|
133
|
-
* @inheritdoc
|
|
134
|
-
*/
|
|
135
|
-
invalidateVisuals() {
|
|
136
|
-
this.onRender();
|
|
137
|
-
this.changeDetector.detectChanges();
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Updates minimal and maximal value for picker
|
|
141
|
-
*/
|
|
142
|
-
updateMinMax() {
|
|
143
|
-
var _a, _b;
|
|
144
|
-
if (!this.periodData.length) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
//no min, no max
|
|
148
|
-
if (!this.minDateObj && !this.maxDateObj) {
|
|
149
|
-
this.periodData.forEach(itm => itm.disabled = false);
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
let restAfter = false;
|
|
153
|
-
for (const period of this.periodData) {
|
|
154
|
-
if (((_a = this.minDateObj) === null || _a === void 0 ? void 0 : _a.isValid()) && this.minDateObj.isAfter(period.dateObj.value) && !this.isSamePeriod(this.minDateObj, period.dateObj.value)) {
|
|
155
|
-
period.disabled = true;
|
|
156
|
-
}
|
|
157
|
-
if (restAfter || (((_b = this.maxDateObj) === null || _b === void 0 ? void 0 : _b.isValid()) && this.maxDateObj.isBefore(period.dateObj.value) && !this.isSamePeriod(this.maxDateObj, period.dateObj.value))) {
|
|
158
|
-
restAfter = true;
|
|
159
|
-
period.disabled = true;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Sets active date
|
|
165
|
-
*/
|
|
166
|
-
setActive() {
|
|
167
|
-
var _a;
|
|
168
|
-
this.periodData.forEach(itm => itm.active = false);
|
|
169
|
-
if (!this.value) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (!this.ranged) {
|
|
173
|
-
if ((_a = this.singleValue) === null || _a === void 0 ? void 0 : _a.isValid()) {
|
|
174
|
-
const value = this.singleValue;
|
|
175
|
-
const data = this.periodData.find(itm => this.isSamePeriod(itm.dateObj, value.value));
|
|
176
|
-
if (data) {
|
|
177
|
-
data.active = true;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
//TODO: support range
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
//# sourceMappingURL=dateTimePeriodPickerBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateTimePeriodPickerBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/components/dateTimePeriodPickerBase.ts"],"names":[],"mappings":"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","sourcesContent":["import {ChangeDetectorRef, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateTimeObjectValue} from '../../../misc/types';\nimport {DateApi, DateApiObject} from '../../../services';\nimport {DateTimePicker, PeriodData} from '../interfaces';\n\n/**\n * Base abstract class for each date time period picker\n */\nexport abstract class DateTimePeriodPickerBase<TPeriod extends PeriodData<TDate>, TDate = unknown> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Array of period data to be displayed\n */\n protected periodData: TPeriod[] = [];\n\n /**\n * Subject used for emitting of value changes\n */\n protected valueChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for scaling up\n */\n protected scaleUpSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Subject used for scaling down\n */\n protected scaleDownSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Date api instance for displayed date\n */\n protected displayDate: DateApiObject<TDate>|undefined|null;\n\n /**\n * Currently displayed date\n */\n protected displayedDate: TDate|undefined|null;\n\n /**\n * Date api instance for max date\n */\n protected maxDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Date api instance for min date\n */\n protected minDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Gets or sets value as single value\n */\n protected get singleValue(): DateApiObject<TDate>|undefined|null\n {\n if(Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set singleValue(value: DateApiObject<TDate>|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Gets or sets value as single value\n */\n protected get rangeValue(): [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null\n {\n if(!Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set rangeValue(value: [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Change detector instance\n */\n protected changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Instance of date api for manipulation with date time\n */\n protected dateApi: DateApi<TDate> = inject(DATE_API) as DateApi<TDate>;\n\n //######################### public properties - implementation of DateTimePicker #########################\n\n /**\n * @inheritdoc\n */\n public value: DateTimeObjectValue<TDate>|undefined|null;\n\n /**\n * @inheritdoc\n */\n public get display(): TDate|undefined|null\n {\n return this.displayDate?.value;\n }\n public set display(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.displayDate = null;\n\n return;\n }\n\n this.displayDate = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get maxDate(): TDate|undefined|null\n {\n return this.maxDateObj?.value;\n }\n public set maxDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.maxDateObj = null;\n\n return;\n }\n\n this.maxDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get minDate(): TDate|undefined|null\n {\n return this.minDateObj?.value;\n }\n public set minDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.minDateObj = null;\n\n return;\n }\n\n this.minDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public canScaleUp: boolean = false;\n\n /**\n * @inheritdoc\n */\n public canScaleDown: boolean = false;\n\n /**\n * @inheritdoc\n */\n public ranged: boolean = false;\n\n /**\n * @inheritdoc\n */\n public get valueChange(): Observable<void>\n {\n return this.valueChangeSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleUp(): Observable<TDate>\n {\n return this.scaleUpSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleDown(): Observable<TDate>\n {\n return this.scaleDownSubject.asObservable();\n }\n\n //######################### public methods - implementation of invalidatable #########################\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n this.onRender();\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods #########################\n\n /**\n * Method that is being called to render changes\n */\n protected abstract onRender(): void;\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected abstract isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;\n\n /**\n * Updates minimal and maximal value for picker\n */\n protected updateMinMax(): void\n {\n if(!this.periodData.length)\n {\n return;\n }\n\n //no min, no max\n if(!this.minDateObj && !this.maxDateObj)\n {\n this.periodData.forEach(itm => itm.disabled = false);\n\n return;\n }\n\n let restAfter = false;\n\n for(const period of this.periodData)\n {\n if(this.minDateObj?.isValid() && this.minDateObj.isAfter(period.dateObj.value) && !this.isSamePeriod(this.minDateObj, period.dateObj.value))\n {\n period.disabled = true;\n }\n\n if(restAfter || (this.maxDateObj?.isValid() && this.maxDateObj.isBefore(period.dateObj.value) && !this.isSamePeriod(this.maxDateObj, period.dateObj.value)))\n {\n restAfter = true;\n period.disabled = true;\n }\n }\n }\n\n /**\n * Sets active date\n */\n protected setActive(): void\n {\n this.periodData.forEach(itm => itm.active = false);\n\n if(!this.value)\n {\n return;\n }\n \n if(!this.ranged)\n {\n if(this.singleValue?.isValid())\n {\n const value = this.singleValue;\n const data = this.periodData.find(itm => this.isSamePeriod(itm.dateObj, value.value));\n\n if(data)\n {\n data.active = true;\n }\n }\n }\n else\n {\n //TODO: support range\n }\n }\n}"]}
|
package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js
DELETED
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, EventEmitter, Output, Input, Inject, Optional } from '@angular/core';
|
|
2
|
-
import { POSITION } from '@anglr/common';
|
|
3
|
-
import { extend, isBlank, nameof } from '@jscrpt/common';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
5
|
-
import { DATE_TIME_PICKER_OPTIONS } from '../../misc/tokens';
|
|
6
|
-
import { DayPickerSAComponent } from '../dayPicker/dayPicker.component';
|
|
7
|
-
import { MonthPickerSAComponent } from '../monthPicker/monthPicker.component';
|
|
8
|
-
import { YearPickerSAComponent } from '../yearPicker/yearPicker.component';
|
|
9
|
-
import { formatDateTime, parseDateTime } from '../../../../misc/utils';
|
|
10
|
-
import { DateTimeSADirective } from '../../../dateTime/directives';
|
|
11
|
-
import { DateValueProvider } from '../../../../services';
|
|
12
|
-
import { DateTimeValueFormat } from '../../../../misc/enums';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "../../../../services";
|
|
15
|
-
//TODO: use mixin for set internal
|
|
16
|
-
/**
|
|
17
|
-
* Text to be displayed when configuration, options are corrupted
|
|
18
|
-
*/
|
|
19
|
-
const CORRUPTED_CONFIG_TEXT = 'DateTime: Corrupted configuration for DateTimePicker!';
|
|
20
|
-
/**
|
|
21
|
-
* Default options for date time picker
|
|
22
|
-
*/
|
|
23
|
-
const defaultOptions = {
|
|
24
|
-
defaultPeriod: 'day',
|
|
25
|
-
periodsDefinition: {
|
|
26
|
-
'day': DayPickerSAComponent,
|
|
27
|
-
'month': MonthPickerSAComponent,
|
|
28
|
-
'year': YearPickerSAComponent,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Component used for displaying date time picker
|
|
33
|
-
*/
|
|
34
|
-
export class DateTimePickerComponent extends DateTimeSADirective {
|
|
35
|
-
//######################### constructor #########################
|
|
36
|
-
constructor(position, valueProvider, options) {
|
|
37
|
-
super();
|
|
38
|
-
this.position = position;
|
|
39
|
-
this.valueProvider = valueProvider;
|
|
40
|
-
//######################### public properties - outputs #########################
|
|
41
|
-
/**
|
|
42
|
-
* @inheritdoc
|
|
43
|
-
*/
|
|
44
|
-
this.valueChange = new EventEmitter();
|
|
45
|
-
this.ɵOptions = extend(true, {}, defaultOptions, options);
|
|
46
|
-
this.setOptions(options);
|
|
47
|
-
if (!this.displayedPeriodType) {
|
|
48
|
-
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//######################### public properties - inputs #########################
|
|
52
|
-
/**
|
|
53
|
-
* @inheritdoc
|
|
54
|
-
*/
|
|
55
|
-
get value() {
|
|
56
|
-
return this.ɵValue;
|
|
57
|
-
}
|
|
58
|
-
set value(value) {
|
|
59
|
-
//accepts all available formats
|
|
60
|
-
this.setInternalValue(value);
|
|
61
|
-
this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Options for date time picker
|
|
65
|
-
*/
|
|
66
|
-
get options() {
|
|
67
|
-
return this.ɵOptions;
|
|
68
|
-
}
|
|
69
|
-
set options(value) {
|
|
70
|
-
this.ɵOptions = extend(true, {}, defaultOptions, value);
|
|
71
|
-
this.setOptions(value);
|
|
72
|
-
}
|
|
73
|
-
//######################### public methods - implementation of OnInit #########################
|
|
74
|
-
/**
|
|
75
|
-
* Initialize component
|
|
76
|
-
*/
|
|
77
|
-
ngOnInit() {
|
|
78
|
-
var _a;
|
|
79
|
-
//empty value show now
|
|
80
|
-
if (isBlank(this.value)) {
|
|
81
|
-
const now = this.dateApi.now();
|
|
82
|
-
this.showPicker(this.displayedPeriodType, now.value);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
const val = (_a = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue)) !== null && _a !== void 0 ? _a : this.dateApi.now();
|
|
86
|
-
this.showPicker(this.displayedPeriodType, val.isValid() ? val.value : this.dateApi.now().value);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//######################### public methods - implementation of OnChanges #########################
|
|
90
|
-
/**
|
|
91
|
-
* Called when input value changes
|
|
92
|
-
*/
|
|
93
|
-
ngOnChanges(changes) {
|
|
94
|
-
var _a;
|
|
95
|
-
if (!this.component) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const component = this.component.instance;
|
|
99
|
-
let invalidate = false;
|
|
100
|
-
if (nameof('maxDateTime') in changes) {
|
|
101
|
-
component.maxDate = this.maxDateTime;
|
|
102
|
-
invalidate = true;
|
|
103
|
-
}
|
|
104
|
-
if (nameof('minDateTime') in changes) {
|
|
105
|
-
component.minDate = this.minDateTime;
|
|
106
|
-
invalidate = true;
|
|
107
|
-
}
|
|
108
|
-
if (nameof('value') in changes) {
|
|
109
|
-
const val = (_a = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue)) !== null && _a !== void 0 ? _a : this.dateApi.now();
|
|
110
|
-
component.display = val.isValid() ? val.value : this.dateApi.now().value;
|
|
111
|
-
component.value = this.internalValue;
|
|
112
|
-
invalidate = true;
|
|
113
|
-
}
|
|
114
|
-
if (this.component && invalidate) {
|
|
115
|
-
this.component.instance.invalidateVisuals();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
//######################### public methods - implementation of OnDestroy #########################
|
|
119
|
-
/**
|
|
120
|
-
* Called when component is destroyed
|
|
121
|
-
*/
|
|
122
|
-
ngOnDestroy() {
|
|
123
|
-
var _a, _b;
|
|
124
|
-
super.ngOnDestroy();
|
|
125
|
-
(_a = this.component) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
126
|
-
this.component = null;
|
|
127
|
-
(_b = this.periodChangesSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
128
|
-
this.periodChangesSubscription = null;
|
|
129
|
-
}
|
|
130
|
-
//######################### protected methods #########################
|
|
131
|
-
/**
|
|
132
|
-
* Sets internal value and fix lowest time difference
|
|
133
|
-
* @param value - Value to be set
|
|
134
|
-
*/
|
|
135
|
-
setInternalValue(value) {
|
|
136
|
-
this.internalValue = parseDateTime(value, this.dateApi, null, this.customFormat);
|
|
137
|
-
if (isBlank(this.internalValue)) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
//ranged value
|
|
141
|
-
if (Array.isArray(this.internalValue)) {
|
|
142
|
-
const [from, to] = this.internalValue;
|
|
143
|
-
if (from) {
|
|
144
|
-
const val = this.valueProvider.getValue(from.value, this.customFormat).from;
|
|
145
|
-
if (val) {
|
|
146
|
-
this.internalValue[0] = this.dateApi.getValue(val, this.customFormat);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (to) {
|
|
150
|
-
const val = this.valueProvider.getValue(to.value, this.customFormat).to;
|
|
151
|
-
if (val) {
|
|
152
|
-
this.internalValue[1] = this.dateApi.getValue(val, this.customFormat);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
const val = this.valueProvider.getValue(this.internalValue.value, this.customFormat).from;
|
|
158
|
-
if (val) {
|
|
159
|
-
this.internalValue = this.dateApi.getValue(val, this.customFormat);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Shows picker
|
|
165
|
-
* @param type - Type of period that should be displayed
|
|
166
|
-
* @param displayDate - Display date to be shown
|
|
167
|
-
*/
|
|
168
|
-
showPicker(type, displayDate) {
|
|
169
|
-
var _a, _b;
|
|
170
|
-
if (!this.pickerContainer) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
//create new component and destroy previous one
|
|
174
|
-
if (!this.component || (this.component && type != this.displayedPeriodType)) {
|
|
175
|
-
this.displayedPeriodType = type;
|
|
176
|
-
(_a = this.periodChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
177
|
-
this.periodChangesSubscription = new Subscription();
|
|
178
|
-
(_b = this.component) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
179
|
-
this.component = this.pickerContainer.createComponent(type);
|
|
180
|
-
this.periodChangesSubscription.add(this.component.instance.valueChange.subscribe(() => {
|
|
181
|
-
var _a, _b;
|
|
182
|
-
const component = (_a = this.component) === null || _a === void 0 ? void 0 : _a.instance;
|
|
183
|
-
if (!component) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (!Array.isArray(component.value)) {
|
|
187
|
-
this.setInternalValue((_b = component.value) === null || _b === void 0 ? void 0 : _b.value);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
//TODO: handle ranges
|
|
191
|
-
}
|
|
192
|
-
this.value = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);
|
|
193
|
-
this.valueChange.emit();
|
|
194
|
-
}));
|
|
195
|
-
this.periodChangesSubscription.add(this.component.instance.scaleUp.subscribe(date => this.showPicker(this.getUpperType(), date)));
|
|
196
|
-
this.periodChangesSubscription.add(this.component.instance.scaleDown.subscribe(date => this.showPicker(this.getLowerType(), date)));
|
|
197
|
-
}
|
|
198
|
-
const component = this.component.instance;
|
|
199
|
-
component.ranged = this.valueFormat === DateTimeValueFormat.RangeOfDateInstances;
|
|
200
|
-
component.canScaleDown = this.canScaleDown(),
|
|
201
|
-
component.canScaleUp = this.canScaleUp();
|
|
202
|
-
component.display = displayDate;
|
|
203
|
-
component.maxDate = this.maxDateTime;
|
|
204
|
-
component.minDate = this.minDateTime;
|
|
205
|
-
component.value = this.internalValue;
|
|
206
|
-
component.invalidateVisuals();
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Gets indication whether current period can be scaled down
|
|
210
|
-
* @param periods - Array of defined period names
|
|
211
|
-
* @param index - Index of displayed period
|
|
212
|
-
*/
|
|
213
|
-
canScaleDown(periods, index) {
|
|
214
|
-
periods !== null && periods !== void 0 ? periods : (periods = Object.keys(this.ɵOptions.periodsDefinition));
|
|
215
|
-
index !== null && index !== void 0 ? index : (index = periods.indexOf(this.displayedPeriodName));
|
|
216
|
-
if (index < 0) {
|
|
217
|
-
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
218
|
-
}
|
|
219
|
-
if (index <= 0) {
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
return true;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Gets indication whether current period can be scaled up
|
|
226
|
-
* @param periods - Array of defined period names
|
|
227
|
-
* @param index - Index of displayed period
|
|
228
|
-
*/
|
|
229
|
-
canScaleUp(periods, index) {
|
|
230
|
-
periods !== null && periods !== void 0 ? periods : (periods = Object.keys(this.ɵOptions.periodsDefinition));
|
|
231
|
-
index !== null && index !== void 0 ? index : (index = periods.indexOf(this.displayedPeriodName));
|
|
232
|
-
if (index < 0) {
|
|
233
|
-
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
234
|
-
}
|
|
235
|
-
if (index + 1 >= periods.length) {
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Gets type that is above current period picker
|
|
242
|
-
*/
|
|
243
|
-
getUpperType() {
|
|
244
|
-
const periods = Object.keys(this.ɵOptions.periodsDefinition);
|
|
245
|
-
const index = periods.indexOf(this.displayedPeriodName);
|
|
246
|
-
if (!this.canScaleUp(periods, index)) {
|
|
247
|
-
return this.displayedPeriodType;
|
|
248
|
-
}
|
|
249
|
-
this.displayedPeriodName = periods[index + 1];
|
|
250
|
-
return this.ɵOptions.periodsDefinition[this.displayedPeriodName];
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Gets type that is below current period picker
|
|
254
|
-
*/
|
|
255
|
-
getLowerType() {
|
|
256
|
-
const periods = Object.keys(this.ɵOptions.periodsDefinition);
|
|
257
|
-
const index = periods.indexOf(this.displayedPeriodName);
|
|
258
|
-
if (!this.canScaleDown(periods, index)) {
|
|
259
|
-
return this.displayedPeriodType;
|
|
260
|
-
}
|
|
261
|
-
this.displayedPeriodName = periods[index - 1];
|
|
262
|
-
return this.ɵOptions.periodsDefinition[this.displayedPeriodName];
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Sets options and use them to set parameters of component
|
|
266
|
-
* @param options - Options to be set
|
|
267
|
-
*/
|
|
268
|
-
setOptions(options) {
|
|
269
|
-
if (options === null || options === void 0 ? void 0 : options.periodsDefinition) {
|
|
270
|
-
this.ɵOptions.periodsDefinition = options.periodsDefinition;
|
|
271
|
-
}
|
|
272
|
-
this.displayedPeriodName = this.ɵOptions.defaultPeriod;
|
|
273
|
-
this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: POSITION }, { token: i1.DateValueProvider }, { token: DATE_TIME_PICKER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DateTimePickerComponent, selector: "date-time-picker", inputs: { value: "value", options: "options" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "pickerContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container #container></ng-container>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
279
|
-
type: Component,
|
|
280
|
-
args: [{ selector: 'date-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container></ng-container>" }]
|
|
281
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
282
|
-
type: Inject,
|
|
283
|
-
args: [POSITION]
|
|
284
|
-
}] }, { type: i1.DateValueProvider }, { type: undefined, decorators: [{
|
|
285
|
-
type: Inject,
|
|
286
|
-
args: [DATE_TIME_PICKER_OPTIONS]
|
|
287
|
-
}, {
|
|
288
|
-
type: Optional
|
|
289
|
-
}] }]; }, propDecorators: { pickerContainer: [{
|
|
290
|
-
type: ViewChild,
|
|
291
|
-
args: ['container', { read: ViewContainerRef, static: true }]
|
|
292
|
-
}], value: [{
|
|
293
|
-
type: Input
|
|
294
|
-
}], options: [{
|
|
295
|
-
type: Input
|
|
296
|
-
}], valueChange: [{
|
|
297
|
-
type: Output
|
|
298
|
-
}] } });
|
|
299
|
-
//# sourceMappingURL=dateTimePicker.component.js.map
|