@anglr/datetime 6.1.0 → 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
|
@@ -31,23 +31,43 @@ const defaultOptions = {
|
|
|
31
31
|
/**
|
|
32
32
|
* Component used for displaying date time picker
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
class DateTimePickerComponent extends DateTimeSADirective {
|
|
35
|
+
position;
|
|
36
|
+
valueProvider;
|
|
37
|
+
//######################### protected properties #########################
|
|
38
|
+
/**
|
|
39
|
+
* Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue
|
|
40
|
+
*/
|
|
41
|
+
ɵValue;
|
|
42
|
+
/**
|
|
43
|
+
* Internal representation of current date time value
|
|
44
|
+
*/
|
|
45
|
+
internalValue;
|
|
46
|
+
/**
|
|
47
|
+
* Subscription for changes in date time period picker
|
|
48
|
+
*/
|
|
49
|
+
periodChangesSubscription;
|
|
50
|
+
/**
|
|
51
|
+
* Options for date time picker
|
|
52
|
+
*/
|
|
53
|
+
ɵOptions;
|
|
54
|
+
/**
|
|
55
|
+
* Currently displayed period type
|
|
56
|
+
*/
|
|
57
|
+
displayedPeriodType;
|
|
58
|
+
/**
|
|
59
|
+
* Name of period which is currently displayed
|
|
60
|
+
*/
|
|
61
|
+
displayedPeriodName;
|
|
62
|
+
/**
|
|
63
|
+
* Instance of created date time period picker
|
|
64
|
+
*/
|
|
65
|
+
component;
|
|
66
|
+
//######################### protected properties - children #########################
|
|
67
|
+
/**
|
|
68
|
+
* Container used for displaying pickers for specific date time part
|
|
69
|
+
*/
|
|
70
|
+
pickerContainer;
|
|
51
71
|
//######################### public properties - inputs #########################
|
|
52
72
|
/**
|
|
53
73
|
* @inheritdoc
|
|
@@ -70,6 +90,22 @@ export class DateTimePickerComponent extends DateTimeSADirective {
|
|
|
70
90
|
this.ɵOptions = extend(true, {}, defaultOptions, value);
|
|
71
91
|
this.setOptions(value);
|
|
72
92
|
}
|
|
93
|
+
//######################### public properties - outputs #########################
|
|
94
|
+
/**
|
|
95
|
+
* @inheritdoc
|
|
96
|
+
*/
|
|
97
|
+
valueChange = new EventEmitter();
|
|
98
|
+
//######################### constructor #########################
|
|
99
|
+
constructor(position, valueProvider, options) {
|
|
100
|
+
super();
|
|
101
|
+
this.position = position;
|
|
102
|
+
this.valueProvider = valueProvider;
|
|
103
|
+
this.ɵOptions = extend(true, {}, defaultOptions, options);
|
|
104
|
+
this.setOptions(options);
|
|
105
|
+
if (!this.displayedPeriodType) {
|
|
106
|
+
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
73
109
|
//######################### public methods - implementation of OnInit #########################
|
|
74
110
|
/**
|
|
75
111
|
* Initialize component
|
|
@@ -206,8 +242,8 @@ export class DateTimePickerComponent extends DateTimeSADirective {
|
|
|
206
242
|
* @param index - Index of displayed period
|
|
207
243
|
*/
|
|
208
244
|
canScaleDown(periods, index) {
|
|
209
|
-
periods
|
|
210
|
-
index
|
|
245
|
+
periods ??= Object.keys(this.ɵOptions.periodsDefinition);
|
|
246
|
+
index ??= periods.indexOf(this.displayedPeriodName);
|
|
211
247
|
if (index < 0) {
|
|
212
248
|
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
213
249
|
}
|
|
@@ -222,8 +258,8 @@ export class DateTimePickerComponent extends DateTimeSADirective {
|
|
|
222
258
|
* @param index - Index of displayed period
|
|
223
259
|
*/
|
|
224
260
|
canScaleUp(periods, index) {
|
|
225
|
-
periods
|
|
226
|
-
index
|
|
261
|
+
periods ??= Object.keys(this.ɵOptions.periodsDefinition);
|
|
262
|
+
index ??= periods.indexOf(this.displayedPeriodName);
|
|
227
263
|
if (index < 0) {
|
|
228
264
|
throw new Error(CORRUPTED_CONFIG_TEXT);
|
|
229
265
|
}
|
|
@@ -267,10 +303,11 @@ export class DateTimePickerComponent extends DateTimeSADirective {
|
|
|
267
303
|
this.displayedPeriodName = this.ɵOptions.defaultPeriod;
|
|
268
304
|
this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];
|
|
269
305
|
}
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: POSITION }, { token: i1.DateValueProvider }, { token: DATE_TIME_PICKER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", 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 });
|
|
270
308
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
309
|
+
export { DateTimePickerComponent };
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
274
311
|
type: Component,
|
|
275
312
|
args: [{ selector: 'date-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container></ng-container>" }]
|
|
276
313
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,SAAS,EAAE,gBAAgB,EAAQ,YAAY,EAAE,MAAM,EAAE,KAAK,EAA4B,MAAM,EAAE,QAAQ,EAAkC,MAAM,eAAe,CAAC;AAC9M,OAAO,EAAW,QAAQ,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAIlC,OAAO,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAC,sBAAsB,EAAC,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAC,qBAAqB,EAAC,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BAAC,QAAQ;;0BAEf,MAAM;2BAAC,wBAAwB;;0BAAG,QAAQ;4CA7C7C,eAAe;sBADxB,SAAS;uBAAC,WAAW,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;gBASnD,KAAK;sBADf,KAAK;gBAgBK,OAAO;sBADjB,KAAK;gBAkBC,WAAW;sBADjB,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, Type, EventEmitter, Output, Input, OnChanges, SimpleChanges, Inject, Optional, OnDestroy, ComponentRef, OnInit} from '@angular/core';\nimport {Position, POSITION} from '@anglr/common';\nimport {extend, isBlank, nameof} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputValue} from '../../../../interfaces';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from '../../../../misc/types';\nimport {DATE_TIME_PICKER_OPTIONS} from '../../misc/tokens';\nimport {DayPickerSAComponent} from '../dayPicker/dayPicker.component';\nimport {MonthPickerSAComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimePickerOptions} from './dateTimePicker.interface';\nimport {YearPickerSAComponent} from '../yearPicker/yearPicker.component';\nimport {DateTimePicker} from '../../interfaces';\nimport {formatDateTime, parseDateTime} from '../../../../misc/utils';\nimport {DateTimeSADirective} from '../../../dateTime/directives';\nimport {DateValueProvider} from '../../../../services';\nimport {DateTimeValueFormat} from '../../../../misc/enums';\n\n//TODO: use mixin for set internal\n\n/**\n * Text to be displayed when configuration, options are corrupted\n */\nconst CORRUPTED_CONFIG_TEXT = 'DateTime: Corrupted configuration for DateTimePicker!';\n\n/**\n * Default options for date time picker\n */\nconst defaultOptions: DateTimePickerOptions = \n{\n defaultPeriod: 'day',\n periodsDefinition:\n {\n 'day': DayPickerSAComponent,\n 'month': MonthPickerSAComponent,\n 'year': YearPickerSAComponent,\n },\n};\n\n/**\n * Component used for displaying date time picker\n */\n@Component(\n{\n selector: 'date-time-picker',\n templateUrl: 'dateTimePicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerComponent<TDate = unknown> extends DateTimeSADirective<TDate> implements DateTimeInputValue<TDate>, OnInit, OnChanges, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue\n */\n protected ɵValue: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Internal representation of current date time value\n */\n protected internalValue: DateTimeObjectValue<TDate>|undefined|null;\n \n /**\n * Subscription for changes in date time period picker\n */\n protected periodChangesSubscription: Subscription|undefined|null;\n\n /**\n * Options for date time picker\n */\n protected ɵOptions: DateTimePickerOptions<TDate>;\n\n /**\n * Currently displayed period type\n */\n protected displayedPeriodType!: Type<DateTimePicker<TDate>>;\n\n /**\n * Name of period which is currently displayed\n */\n protected displayedPeriodName!: string;\n\n /**\n * Instance of created date time period picker\n */\n protected component: ComponentRef<DateTimePicker<TDate>>|undefined|null;\n \n //######################### protected properties - children #########################\n\n /**\n * Container used for displaying pickers for specific date time part\n */\n @ViewChild('container', {read: ViewContainerRef, static: true})\n protected pickerContainer: ViewContainerRef|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * @inheritdoc\n */\n @Input()\n public get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n //accepts all available formats\n this.setInternalValue(value);\n this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);\n }\n\n /**\n * Options for date time picker\n */\n @Input()\n public get options(): Partial<DateTimePickerOptions<TDate>>\n {\n return this.ɵOptions;\n }\n public set options(value: Partial<DateTimePickerOptions<TDate>>)\n {\n this.ɵOptions = extend(true, {}, defaultOptions, value);\n\n this.setOptions(value);\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * @inheritdoc\n */\n @Output()\n public valueChange: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor(@Inject(POSITION) protected position: Position,\n protected valueProvider: DateValueProvider<TDate>,\n @Inject(DATE_TIME_PICKER_OPTIONS) @Optional() options?: Partial<DateTimePickerOptions<TDate>>,)\n {\n super();\n\n this.ɵOptions = extend(true, {}, defaultOptions, options);\n \n this.setOptions(options);\n\n if(!this.displayedPeriodType)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n //empty value show now\n if(isBlank(this.value))\n {\n const now = this.dateApi.now();\n\n this.showPicker(this.displayedPeriodType, now.value);\n }\n else\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n this.showPicker(this.displayedPeriodType, val.isValid() ? val.value : this.dateApi.now().value);\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(!this.component)\n {\n return;\n }\n\n const component = this.component.instance;\n let invalidate: boolean = false;\n\n if(nameof<DateTimePickerComponent>('maxDateTime') in changes)\n {\n component.maxDate = this.maxDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('minDateTime') in changes)\n {\n component.minDate = this.minDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('value') in changes)\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n component.display = val.isValid() ? val.value : this.dateApi.now().value;\n component.value = this.internalValue;\n invalidate = true;\n }\n\n if(this.component && invalidate)\n {\n this.component.instance.invalidateVisuals();\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public override ngOnDestroy(): void\n {\n super.ngOnDestroy();\n\n this.component?.destroy();\n this.component = null;\n\n this.periodChangesSubscription?.unsubscribe();\n this.periodChangesSubscription = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets internal value and fix lowest time difference\n * @param value - Value to be set\n */\n protected setInternalValue(value: DateTimeInputOutputValue<TDate>|undefined|null): void\n {\n this.internalValue = parseDateTime(value, this.dateApi, null, this.customFormat);\n\n if(isBlank(this.internalValue))\n {\n return;\n }\n\n //ranged value\n if(Array.isArray(this.internalValue))\n {\n const [from, to] = this.internalValue;\n\n if(from)\n {\n const val = this.valueProvider.getValue(from.value, this.customFormat).from;\n\n if(val)\n {\n this.internalValue[0] = this.dateApi.getValue(val, this.customFormat);\n }\n }\n\n if(to)\n {\n const val = this.valueProvider.getValue(to.value, this.customFormat).to;\n\n if(val)\n {\n this.internalValue[1] = this.dateApi.getValue(val, this.customFormat);\n }\n }\n }\n else\n {\n const val = this.valueProvider.getValue(this.internalValue.value, this.customFormat).from;\n\n if(val)\n {\n this.internalValue = this.dateApi.getValue(val, this.customFormat);\n }\n }\n }\n\n /**\n * Shows picker\n * @param type - Type of period that should be displayed\n * @param displayDate - Display date to be shown\n */\n protected showPicker(type: Type<DateTimePicker<TDate>>, displayDate: TDate): void\n {\n if(!this.pickerContainer)\n {\n return;\n }\n\n //create new component and destroy previous one\n if(!this.component || (this.component && type != this.displayedPeriodType))\n {\n this.displayedPeriodType = type;\n this.periodChangesSubscription?.unsubscribe();\n this.periodChangesSubscription = new Subscription();\n this.component?.destroy();\n this.component = this.pickerContainer.createComponent(type);\n\n this.periodChangesSubscription.add(this.component.instance.valueChange.subscribe(() =>\n {\n const component = this.component?.instance;\n\n if(!component)\n {\n return;\n }\n\n if(!Array.isArray(component.value))\n {\n this.setInternalValue(component.value?.value);\n }\n else\n {\n //TODO: handle ranges\n }\n\n this.value = formatDateTime(this.internalValue, this.valueFormat, this.customFormat);\n this.valueChange.emit();\n }));\n\n this.periodChangesSubscription.add(this.component.instance.scaleUp.subscribe(date => this.showPicker(this.getUpperType(), date)));\n this.periodChangesSubscription.add(this.component.instance.scaleDown.subscribe(date => this.showPicker(this.getLowerType(), date)));\n }\n\n const component = this.component.instance;\n\n component.ranged = this.valueFormat === DateTimeValueFormat.RangeOfDateInstances;\n component.canScaleDown = this.canScaleDown(),\n component.canScaleUp = this.canScaleUp();\n component.display = displayDate;\n component.maxDate = this.maxDateTime;\n component.minDate = this.minDateTime;\n component.value = this.internalValue;\n component.invalidateVisuals();\n }\n\n /**\n * Gets indication whether current period can be scaled down\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleDown(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n index ??= periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index <= 0)\n {\n return false;\n }\n\n return true;\n }\n\n /**\n * Gets indication whether current period can be scaled up\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleUp(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n index ??= periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index + 1 >= periods.length)\n {\n return false;\n }\n\n return true;\n }\n\n /**\n * Gets type that is above current period picker\n */\n protected getUpperType(): Type<DateTimePicker<TDate>>\n {\n const periods = Object.keys(this.ɵOptions.periodsDefinition);\n const index = periods.indexOf(this.displayedPeriodName);\n\n if(!this.canScaleUp(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index + 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n }\n\n /**\n * Gets type that is below current period picker\n */\n protected getLowerType(): Type<DateTimePicker<TDate>>\n {\n const periods = Object.keys(this.ɵOptions.periodsDefinition);\n const index = periods.indexOf(this.displayedPeriodName);\n\n if(!this.canScaleDown(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index - 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n }\n\n /**\n * Sets options and use them to set parameters of component\n * @param options - Options to be set\n */\n protected setOptions(options: Partial<DateTimePickerOptions<TDate>> | undefined): void\n {\n if(options?.periodsDefinition)\n {\n this.ɵOptions.periodsDefinition = options.periodsDefinition;\n }\n\n this.displayedPeriodName = this.ɵOptions.defaultPeriod;\n this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n }\n}","<ng-container #container></ng-container>"]}
|
package/{es2020 → es2022}/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js
RENAMED
|
@@ -8,20 +8,20 @@ import * as i2 from "../../../../pipes/dateFormat.pipe";
|
|
|
8
8
|
/**
|
|
9
9
|
* Component used for displaying day picker
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
class DayPickerSAComponent extends DateTimePeriodPickerBase {
|
|
12
|
+
//######################### protected properties #########################
|
|
13
|
+
/**
|
|
14
|
+
* Stored this picker month data
|
|
15
|
+
*/
|
|
16
|
+
thisMonthData = [];
|
|
17
|
+
//######################### protected properties - template bindings #########################
|
|
18
|
+
/**
|
|
19
|
+
* Names of days
|
|
20
|
+
*/
|
|
21
|
+
weekdays = [];
|
|
12
22
|
//######################### constructor #########################
|
|
13
23
|
constructor() {
|
|
14
24
|
super();
|
|
15
|
-
//######################### protected properties #########################
|
|
16
|
-
/**
|
|
17
|
-
* Stored this picker month data
|
|
18
|
-
*/
|
|
19
|
-
this.thisMonthData = [];
|
|
20
|
-
//######################### protected properties - template bindings #########################
|
|
21
|
-
/**
|
|
22
|
-
* Names of days
|
|
23
|
-
*/
|
|
24
|
-
this.weekdays = [];
|
|
25
25
|
this.weekdays = this.dateApi.weekdaysShort();
|
|
26
26
|
}
|
|
27
27
|
//######################### protected methods - template bindings #########################
|
|
@@ -132,10 +132,11 @@ export class DayPickerSAComponent extends DateTimePeriodPickerBase {
|
|
|
132
132
|
isSamePeriod(val, target) {
|
|
133
133
|
return val.isSameDay(target);
|
|
134
134
|
}
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DayPickerSAComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: DayPickerSAComponent, isStandalone: true, selector: "day-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div class=\"weekday\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"go-down-button\" *ngIf=\"canScaleDown\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i2.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
135
137
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DayPickerSAComponent, decorators: [{
|
|
138
|
+
export { DayPickerSAComponent };
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: DayPickerSAComponent, decorators: [{
|
|
139
140
|
type: Component,
|
|
140
141
|
args: [{ selector: 'day-picker', host: {
|
|
141
142
|
'[class.date-time-period]': 'true',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;;;;AAG1D;;GAEG;AACH,MAgBa,oBAAsC,SAAQ,wBAA+C;IAEtG,0EAA0E;IAE1E;;OAEG;IACO,aAAa,GAAqB,EAAE,CAAC;IAE/C,8FAA8F;IAE9F;;OAEG;IACO,QAAQ,GAAa,EAAE,CAAC;IAElC,iEAAiE;IACjE;QAEI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACjD,CAAC;IAED,2FAA2F;IAE3F;;;OAGG;IACO,SAAS,CAAC,OAAuB;QAEvC,IAAG,OAAO,CAAC,QAAQ,EACnB;YACI,OAAO;SACV;QAED,cAAc;QACd,IAAG,CAAC,IAAI,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I,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAE3B,IAAG,CAAC,UAAU,EACd;oBACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACjC;gBAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;aAC/B;SACJ,QACK,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAEtD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;uGAhLQ,oBAAoB;2FAApB,oBAAoB,yJC3BjC,4uCAoBM,2CDEE,YAAY,+PACZ,eAAe;;SAIV,oBAAoB;2FAApB,oBAAoB;kBAhBhC,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,YAAY;wBACZ,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {DateTimePicker, DayData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'day-picker',\n templateUrl: 'dayPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n CommonModule,\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerSAComponent<TDate = unknown> extends DateTimePeriodPickerBase<DayData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Stored this picker month data\n */\n protected thisMonthData: DayData<TDate>[] = [];\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n //######################### constructor #########################\n constructor()\n {\n super();\n\n this.weekdays = this.dateApi.weekdaysShort();\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects day as value of date time picker\n * @param dayData - Day data that were selected\n */\n protected selectDay(dayData: DayData<TDate>): void\n {\n if(dayData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(dayData.dateObj.year());\n this.singleValue.month(dayData.dateObj.month());\n this.singleValue.dayOfMonth(dayData.day);\n\n //other month was selected\n if(dayData.otherMonth)\n {\n this.displayDate?.month(dayData.dateObj.month());\n }\n\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed month to next month\n */\n protected nextMonth(): void\n {\n this.displayDate?.addMonths(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed month to previous month\n */\n protected previousMonth(): void\n {\n this.displayDate?.subtractMonths(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same month only data change\n if(this.displayedDate && this.displayDate?.isSameMonth(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n this.thisMonthData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const currentMonthDate = this.displayDate.value;\n const today = this.dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n\n const data: DayData<TDate> =\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day,\n dateObj: this.displayDate.clone(),\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this.thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div class=\"weekday\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"go-down-button\" *ngIf=\"canScaleDown\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n</div>"]}
|
package/{es2020 → es2022}/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js
RENAMED
|
@@ -9,7 +9,8 @@ import * as i2 from "../../../../pipes/dateFormat.pipe";
|
|
|
9
9
|
/**
|
|
10
10
|
* Component used for displaying month picker
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
class MonthPickerSAComponent extends DateTimePeriodPickerBase {
|
|
13
|
+
formatProvider;
|
|
13
14
|
//######################### constructor #########################
|
|
14
15
|
constructor(formatProvider) {
|
|
15
16
|
super();
|
|
@@ -101,10 +102,11 @@ export class MonthPickerSAComponent extends DateTimePeriodPickerBase {
|
|
|
101
102
|
isSamePeriod(val, target) {
|
|
102
103
|
return val.isSameMonth(target);
|
|
103
104
|
}
|
|
105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthPickerSAComponent, deps: [{ token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: MonthPickerSAComponent, isStandalone: true, selector: "month-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div *ngFor=\"let month of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i2.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
104
107
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MonthPickerSAComponent, decorators: [{
|
|
108
|
+
export { MonthPickerSAComponent };
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: MonthPickerSAComponent, decorators: [{
|
|
108
110
|
type: Component,
|
|
109
111
|
args: [{ selector: 'month-picker', host: {
|
|
110
112
|
'[class.date-time-period]': 'true',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;;;;AAGxD;;GAE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AO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;uGAhIQ,sBAAsB,kBAGX,eAAe;2FAH1B,sBAAsB,2JC7BnC,wxBAYM,2CDYE,YAAY,2JACZ,eAAe;;SAIV,sBAAsB;2FAAtB,sBAAsB;kBAhBlC,SAAS;+BAEI,cAAc,QAGxB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,YAAY;wBACZ,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,eAAe","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {DateTimePicker, MonthData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\nimport {FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'month-picker',\n templateUrl: 'monthPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n CommonModule,\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthPickerSAComponent<TDate = unknown> extends DateTimePeriodPickerBase<MonthData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### constructor #########################\n constructor(@Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,)\n {\n super();\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects month as value of day time picker\n * @param monthData - Month data that were selected\n */\n protected selectMonth(monthData: MonthData<TDate>): void\n {\n if(monthData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(monthData.dateObj.year());\n this.singleValue.month(monthData.dateObj.month());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed year to next year\n */\n protected nextYear(): void\n {\n this.displayDate?.addYears(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed year to previous year\n */\n protected previousYear(): void\n {\n this.displayDate?.subtractYears(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same year only data change\n if(this.displayedDate && this.displayDate?.isSameYear(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format(this.dateApi.getFormat(this.formatProvider.monthNameShort)),\n dateObj: monthOfYear.clone(),\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div *ngFor=\"let month of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n</div>"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
3
|
+
import { ClickOutsideSADirective } from '@anglr/common';
|
|
4
4
|
import { DatePipesModule } from '../../../datePipes.module';
|
|
5
5
|
import { hours, minutes } from './rollerTimePicker.data';
|
|
6
6
|
import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
|
|
@@ -8,31 +8,27 @@ import { LoopScrollDataSADirective, LoopScrollSADirective } from '../../directiv
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@angular/common";
|
|
10
10
|
import * as i2 from "../../../../pipes/dateFormat.pipe";
|
|
11
|
-
import * as i3 from "@anglr/common";
|
|
12
11
|
/**
|
|
13
12
|
* Component used for rendering roller time picker
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
this.hoursOpen = false;
|
|
35
|
-
}
|
|
14
|
+
class RollerTimePickerSAComponent extends DateTimePeriodPickerBase {
|
|
15
|
+
//######################### protected properties - template bindings #########################
|
|
16
|
+
/**
|
|
17
|
+
* Array of available hours
|
|
18
|
+
*/
|
|
19
|
+
hours = hours;
|
|
20
|
+
/**
|
|
21
|
+
* Array of available minutes
|
|
22
|
+
*/
|
|
23
|
+
minutes = minutes;
|
|
24
|
+
/**
|
|
25
|
+
* Indication whether are minutes open
|
|
26
|
+
*/
|
|
27
|
+
minutesOpen = false;
|
|
28
|
+
/**
|
|
29
|
+
* Indication whether are hours open
|
|
30
|
+
*/
|
|
31
|
+
hoursOpen = false;
|
|
36
32
|
/**
|
|
37
33
|
* Current value of hour
|
|
38
34
|
*/
|
|
@@ -113,17 +109,18 @@ export class RollerTimePickerSAComponent extends DateTimePeriodPickerBase {
|
|
|
113
109
|
isSamePeriod() {
|
|
114
110
|
return false;
|
|
115
111
|
}
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: RollerTimePickerSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: RollerTimePickerSAComponent, isStandalone: true, selector: "roller-time-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n <div *ngFor=\"let hour of hours | slice: -14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours\"\n [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours | slice: 0: 14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n <div *ngFor=\"let minute of minutes | slice: -14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes\"\n [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes | slice: 0: 14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i2.DateFormatPipe, name: "dateFormat" }, { kind: "directive", type: ClickOutsideSADirective, selector: "[clickOutside]", inputs: ["clickOutside", "clickOutsideElement"], outputs: ["clickOutsideChange"] }, { kind: "directive", type: LoopScrollDataSADirective, selector: "[loopScrollData]", inputs: ["loopScrollData", "clone"] }, { kind: "directive", type: LoopScrollSADirective, selector: "[loopScroll]", inputs: ["loopScroll", "open"], outputs: ["loopScrollChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
116
114
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RollerTimePickerSAComponent, decorators: [{
|
|
115
|
+
export { RollerTimePickerSAComponent };
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: RollerTimePickerSAComponent, decorators: [{
|
|
120
117
|
type: Component,
|
|
121
118
|
args: [{ selector: 'roller-time-picker', host: {
|
|
122
119
|
'[class.date-time-period]': 'true',
|
|
123
120
|
}, standalone: true, imports: [
|
|
124
121
|
CommonModule,
|
|
125
122
|
DatePipesModule,
|
|
126
|
-
|
|
123
|
+
ClickOutsideSADirective,
|
|
127
124
|
LoopScrollDataSADirective,
|
|
128
125
|
LoopScrollSADirective,
|
|
129
126
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n <div *ngFor=\"let hour of hours | slice: -14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours\"\n [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours | slice: 0: 14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n <div *ngFor=\"let minute of minutes | slice: -14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes\"\n [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes | slice: 0: 14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n </div>\n </div>\n</div>\n" }]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,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AC;IACjB,CAAC;uGAzIQ,2BAA2B;2FAA3B,2BAA2B,iKChCxC,y4FAmEA,2CD3CQ,YAAY,gNACZ,eAAe,8FACf,uBAAuB,6IACvB,yBAAyB,kGACzB,qBAAqB;;SAIhB,2BAA2B;2FAA3B,2BAA2B;kBAnBvC,SAAS;+BAEI,oBAAoB,QAG9B;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,YAAY;wBACZ,eAAe;wBACf,uBAAuB;wBACvB,yBAAyB;wBACzB,qBAAqB;qBACxB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ClickOutsideSADirective} from '@anglr/common';\n\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {DateTimePicker, PeriodData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {LoopScrollData, LoopScrollDataSADirective, LoopScrollSADirective} from '../../directives';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n CommonModule,\n DatePipesModule,\n ClickOutsideSADirective,\n LoopScrollDataSADirective,\n LoopScrollSADirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RollerTimePickerSAComponent<TDate = unknown> extends DateTimePeriodPickerBase<PeriodData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n protected hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n protected minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n protected minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n protected hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n protected get hour(): number\n {\n return this.singleValue?.hour() ?? 0;\n }\n protected set hour(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n protected get minute(): number\n {\n return this.singleValue?.minute() ?? 0;\n }\n protected set minute(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.minute(value);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n * @returns \n */\n protected setHour<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n \n if(event)\n {\n this.hoursOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns \n */\n protected setMinute<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n \n if(event)\n {\n this.minutesOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n }\n\n /**\n * Tests whether provided value is in same period target value\n */\n protected isSamePeriod(): boolean\n {\n return false;\n }\n}","<div class=\"flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n <div *ngFor=\"let hour of hours | slice: -14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours\"\n [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours | slice: 0: 14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n <div *ngFor=\"let minute of minutes | slice: -14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes\"\n [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes | slice: 0: 14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n </div>\n </div>\n</div>\n"]}
|
package/{es2020 → es2022}/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js
RENAMED
|
@@ -7,15 +7,12 @@ import * as i1 from "@angular/common";
|
|
|
7
7
|
/**
|
|
8
8
|
* Component used for displaying year picker
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
this.period = '';
|
|
18
|
-
}
|
|
10
|
+
class YearPickerSAComponent extends DateTimePeriodPickerBase {
|
|
11
|
+
//######################### protected properties - template bindings #########################
|
|
12
|
+
/**
|
|
13
|
+
* Displayed decade period
|
|
14
|
+
*/
|
|
15
|
+
period = '';
|
|
19
16
|
//######################### protected methods - template bindings #########################
|
|
20
17
|
/**
|
|
21
18
|
* Selects year as value of day time picker
|
|
@@ -107,10 +104,11 @@ export class YearPickerSAComponent extends DateTimePeriodPickerBase {
|
|
|
107
104
|
isSamePeriod(val, target) {
|
|
108
105
|
return val.isSameYear(target);
|
|
109
106
|
}
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: YearPickerSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: YearPickerSAComponent, isStandalone: true, selector: "year-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div *ngFor=\"let year of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DatePipesModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
109
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: YearPickerSAComponent, decorators: [{
|
|
110
|
+
export { YearPickerSAComponent };
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: YearPickerSAComponent, decorators: [{
|
|
114
112
|
type: Component,
|
|
115
113
|
args: [{ selector: 'year-picker', host: {
|
|
116
114
|
'[class.date-time-period]': 'true',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;;;AAG1D;;GAEG;AACH,MAgBa,qBAAuC,SAAQ,wBAAgD;IAExG,8FAA8F;IAE9F;;OA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G;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;uGAzIQ,qBAAqB;2FAArB,qBAAqB,0JC3BlC,qvBAYM,2CDUE,YAAY,2JACZ,eAAe;;SAIV,qBAAqB;2FAArB,qBAAqB;kBAhBjC,SAAS;+BAEI,aAAa,QAGvB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,YAAY;wBACZ,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {DateTimePicker, YearData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\n\n/**\n * Component used for displaying year picker\n */\n@Component(\n{\n selector: 'year-picker',\n templateUrl: 'yearPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n CommonModule,\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YearPickerSAComponent<TDate = unknown> extends DateTimePeriodPickerBase<YearData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Displayed decade period\n */\n protected period: string = '';\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects year as value of day time picker\n * @param yearData - Year data that were selected\n */\n protected selectYear(yearData: YearData<TDate>): void\n {\n if(yearData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(yearData.dateObj.year());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n \n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed decade to next decade\n */\n public nextDecade(): void\n {\n this.displayDate?.addYears(10).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed decade to previous decade\n */\n public previousDecade(): void\n {\n this.displayDate?.subtractYears(10).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same decade only data change\n if(this.displayedDate && this.displayDate?.isSameDecade(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n let year = this.displayDate.startOfYear().year();\n\n while(year % 10 !== 0)\n {\n year--;\n }\n\n this.displayDate.year(year).updateOriginal();\n\n for(let x = 0; x < 10; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n value: year,\n dateObj: this.displayDate.clone(),\n });\n\n year++;\n this.displayDate.addYears(1);\n }\n\n this.displayDate.resetOriginal();\n this.period = `${this.displayDate.year()} - ${this.displayDate.year() + 10}`;\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameYear(target);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div *ngFor=\"let year of periodData\"\r\n class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n</div>"]}
|