cmat 0.0.74 → 0.0.76
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/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +20 -16
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +93 -93
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +3 -3
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-masonry.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -3
- package/fesm2022/cmat-components-material-datetimepicker.mjs +42 -42
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +40 -40
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +3 -3
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-pagination.mjs +13 -13
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs +9 -9
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +9 -9
- package/fesm2022/cmat-components-select-table.mjs +5 -5
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +4 -4
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +9 -9
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-transfer-picker.mjs +18 -18
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +11 -11
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-arrow-cursor.mjs +4 -4
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +25 -21
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +5 -5
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +4 -4
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +6 -6
- package/fesm2022/cmat-services-data.mjs +5 -5
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +4 -4
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs +4 -4
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +4 -4
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cmat-components-carousel.d.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-material-datetimepicker.mjs","sources":["../../../projects/cmat/components/material-datetimepicker/datetimepicker-filtertype.ts","../../../projects/cmat/components/material-datetimepicker/clock.ts","../../../projects/cmat/components/material-datetimepicker/clock.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker-errors.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-intl.ts","../../../projects/cmat/components/material-datetimepicker/calendar-body.ts","../../../projects/cmat/components/material-datetimepicker/calendar-body.html","../../../projects/cmat/components/material-datetimepicker/month-view.ts","../../../projects/cmat/components/material-datetimepicker/month-view.html","../../../projects/cmat/components/material-datetimepicker/multi-year-view.ts","../../../projects/cmat/components/material-datetimepicker/multi-year-view.html","../../../projects/cmat/components/material-datetimepicker/time.ts","../../../projects/cmat/components/material-datetimepicker/time.html","../../../projects/cmat/components/material-datetimepicker/year-view.ts","../../../projects/cmat/components/material-datetimepicker/year-view.html","../../../projects/cmat/components/material-datetimepicker/calendar.ts","../../../projects/cmat/components/material-datetimepicker/calendar.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-content.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker-input.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-toggle.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-toggle.html","../../../projects/cmat/components/material-datetimepicker/cmat-components-material-datetimepicker.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nexport enum CmatDatetimepickerFilterType {\r\n DATE, HOUR, MINUTE\r\n}\r\n","import { NgStyle } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatClockView } from './datetimepicker-types';\r\n\r\nexport const CLOCK_RADIUS = 50;\r\nexport const CLOCK_INNER_RADIUS = 27.5;\r\nexport const CLOCK_OUTER_RADIUS = 41.25;\r\nexport const CLOCK_TICK_RADIUS = 7.0833;\r\n\r\n/**\r\n * A clock that is used as part of the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-clock',\r\n templateUrl: 'clock.html',\r\n styleUrls: ['clock.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerClock',\r\n imports: [NgStyle]\r\n})\r\nexport class CmatDatetimepickerClockComponent<D> implements AfterContentInit {\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n @Input() interval: number = 1;\r\n @Input() twelvehour: boolean = false;\r\n /** Emits when the currently selected date changes. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n @Output() activeDateChange = new EventEmitter<D>();\r\n @HostBinding('role') role = 'clock';\r\n @HostBinding('class') class = 'cmat-datetimepicker-clock';\r\n\r\n /** Hours and Minutes representing the clock view. */\r\n hours: any[] = [];\r\n minutes: any[] = [];\r\n /** Whether the clock is in hour view. */\r\n hourView: boolean = true;\r\n selectedHour: number;\r\n selectedMinute: number;\r\n\r\n private _element = inject(ElementRef);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter);\r\n\r\n private _timeChanged = false;\r\n private _mouseMoveListener: any;\r\n private _mouseUpListener: any;\r\n private _activeDate: D;\r\n private _selected: D | null;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n\r\n\r\n constructor() {\r\n this._mouseMoveListener = (event: any): void => {\r\n this.handleMousemove(event);\r\n };\r\n this._mouseUpListener = (): void => {\r\n this.handleMouseup();\r\n };\r\n }\r\n\r\n /**\r\n * The date to display in this clock view.\r\n */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n if (!this._adapter.sameMinute(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n }\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n if (this._selected) {\r\n this.activeDate = this._selected;\r\n }\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n /** Whether the clock should be started in hour or minute view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n set startView(value: CmatClockView) {\r\n this.hourView = value !== 'minute';\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hand(): any {\r\n let hour = this._adapter.getHour(this.activeDate);\r\n if (this.twelvehour) {\r\n if (hour === 0) {\r\n hour = 24;\r\n }\r\n this.selectedHour = hour > 12 ? (hour - 12) : hour;\r\n } else {\r\n this.selectedHour = hour;\r\n }\r\n this.selectedMinute = this._adapter.getMinute(this.activeDate);\r\n let deg;\r\n let radius = CLOCK_OUTER_RADIUS;\r\n if (this.hourView) {\r\n const outer = this.selectedHour > 0 && this.selectedHour < 13;\r\n radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;\r\n if (this.twelvehour) {\r\n radius = CLOCK_OUTER_RADIUS;\r\n }\r\n deg = Math.round(this.selectedHour * (360 / (24 / 2)));\r\n } else {\r\n deg = Math.round(this.selectedMinute * (360 / 60));\r\n }\r\n return {\r\n 'transform': `rotate(${deg}deg)`,\r\n 'height': `${radius}%`,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n 'margin-top': `${50 - radius}%`\r\n };\r\n }\r\n\r\n @HostListener('mousedown', ['$event'])\r\n /** Handles mousedown events on the clock body. */\r\n handleMousedown(event: MouseEvent): void {\r\n this._timeChanged = false;\r\n this._setTime(event);\r\n\r\n document.addEventListener('mousemove', this._mouseMoveListener);\r\n document.addEventListener('touchmove', this._mouseMoveListener);\r\n document.addEventListener('mouseup', this._mouseUpListener);\r\n document.addEventListener('touchend', this._mouseUpListener);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this.activeDate = this._activeDate || this._adapter.today();\r\n this._init();\r\n }\r\n\r\n handleMousemove(event: any): void {\r\n event.preventDefault();\r\n this._setTime(event);\r\n }\r\n\r\n handleMouseup(): void {\r\n document.removeEventListener('mousemove', this._mouseMoveListener);\r\n document.removeEventListener('touchmove', this._mouseMoveListener);\r\n document.removeEventListener('mouseup', this._mouseUpListener);\r\n document.removeEventListener('touchend', this._mouseUpListener);\r\n if (this._timeChanged) {\r\n this.selectedChange.emit(this.activeDate);\r\n if (!this.hourView) {\r\n this.userSelection.emit();\r\n }\r\n }\r\n }\r\n\r\n /** Initializes this clock view. */\r\n private _init(): void {\r\n this.hours.length = 0;\r\n this.minutes.length = 0;\r\n\r\n const hourNames = this._adapter.getHourNames();\r\n const minuteNames = this._adapter.getMinuteNames();\r\n\r\n if (this.twelvehour) {\r\n for (let i = 1; i < (hourNames.length / 2) + 1; i++) {\r\n const radian = i / 6 * Math.PI;\r\n const radius = CLOCK_OUTER_RADIUS;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), i + 1, 0);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate) as number) <= 0);\r\n this.hours.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : hourNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS\r\n });\r\n }\r\n } else {\r\n for (let i = 0; i < hourNames.length; i++) {\r\n const radian = i / 6 * Math.PI;\r\n const outer = i > 0 && i < 13;\r\n const radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), i, 0);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate, false) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate, false) as number) <= 0) &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.HOUR));\r\n this.hours.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : hourNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS,\r\n fontSize: i > 0 && i < 13 ? '' : '80%'\r\n });\r\n }\r\n }\r\n\r\n for (let i = 0; i < minuteNames.length; i += 5) {\r\n const radian = i / 30 * Math.PI;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), i);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate) as number) <= 0) &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.MINUTE));\r\n this.minutes.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : minuteNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Set Time\r\n *\r\n * @param event\r\n */\r\n private _setTime(event: any): void {\r\n const trigger = this._element.nativeElement;\r\n const triggerRect = trigger.getBoundingClientRect();\r\n const width = trigger.offsetWidth;\r\n const height = trigger.offsetHeight;\r\n const pageX = event.pageX !== undefined ? event.pageX : event.touches[0].pageX;\r\n const pageY = event.pageY !== undefined ? event.pageY : event.touches[0].pageY;\r\n const x = (width / 2) - (pageX - triggerRect.left - window.scrollX);\r\n const y = (height / 2) - (pageY - triggerRect.top - window.scrollY); let radian = Math.atan2(-x, y);\r\n const unit = Math.PI / (this.hourView ? 6 : (this.interval ? (30 / this.interval) : 30));\r\n const z = Math.sqrt(x * x + y * y);\r\n const outer = this.hourView && z > ((width * (CLOCK_OUTER_RADIUS / 100)) +\r\n (width * (CLOCK_INNER_RADIUS / 100))) / 2;\r\n\r\n if (radian < 0) {\r\n radian = Math.PI * 2 + radian;\r\n }\r\n let value = Math.round(radian / unit);\r\n\r\n let date: D;\r\n if (this.hourView) {\r\n if (this.twelvehour) {\r\n value = value === 0 ? 12 : value;\r\n } else {\r\n if (value === 12) {\r\n value = 0;\r\n }\r\n value = outer ? (value === 0 ? 12 : value) : value === 0 ? 0 : value + 12;\r\n }\r\n date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), value, this._adapter.getMinute(this.activeDate));\r\n } else {\r\n if (this.interval) {\r\n value *= this.interval;\r\n }\r\n if (value === 60) {\r\n value = 0;\r\n }\r\n date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);\r\n }\r\n\r\n this._timeChanged = true;\r\n this.activeDate = date;\r\n this.activeDateChange.emit(this.activeDate);\r\n }\r\n\r\n}\r\n\r\n","<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>","\r\nexport function createMissingDateImplError(provider: string): Error {\r\n return Error(\r\n `CmatDatetimepickerComponent: No provider found for ${provider}. You must import one of the following ` +\r\n 'modules at your application root: CMatNativeDatetimeModule or provide a ' +\r\n 'custom implementation.');\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CmatDatetimepickerIntl {\r\n /**\r\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\r\n * changed after initialization.\r\n */\r\n readonly changes = new Subject<void>();\r\n\r\n /** A label for the calendar popup (used by screen readers). */\r\n calendarLabel = '日历';\r\n\r\n /** A label for the button used to open the calendar popup (used by screen readers). */\r\n openCalendarLabel = '打开日历';\r\n\r\n /** Label for the button used to close the calendar popup. */\r\n closeCalendarLabel = '关闭日历';\r\n\r\n /** A label for the previous month button (used by screen readers). */\r\n prevMonthLabel = '上个月';\r\n\r\n /** A label for the next month button (used by screen readers). */\r\n nextMonthLabel = '下个月';\r\n\r\n /** A label for the previous year button (used by screen readers). */\r\n prevYearLabel = '去年';\r\n\r\n /** A label for the next year button (used by screen readers). */\r\n nextYearLabel = '明年';\r\n\r\n /** A label for the previous multi-year button (used by screen readers). */\r\n prevMultiYearLabel = '过去24年';\r\n\r\n /** A label for the next multi-year button (used by screen readers). */\r\n nextMultiYearLabel = '未来24年';\r\n\r\n /** A label for the 'switch to month view' button (used by screen readers). */\r\n switchToMonthViewLabel = '选择日期';\r\n\r\n /** A label for the 'switch to year view' button (used by screen readers). */\r\n switchToYearViewLabel = '选择月份';\r\n\r\n /** A label for the 'switch to multi-year view' button (used by screen readers). */\r\n switchToMultiYearViewLabel = '选择年月';\r\n\r\n /** A label for the first date of a range of dates (used by screen readers). */\r\n startDateLabel = '开始日期';\r\n\r\n /** A label for the last date of a range of dates (used by screen readers). */\r\n endDateLabel = '结束日期';\r\n\r\n /** A label for the 'switch to clock hour view' button (used by screen readers). */\r\n switchToClockHourViewLabel = '选择小时';\r\n\r\n /** A label for the 'switch to clock minute view' button (used by screen readers). */\r\n switchToClockMinuteViewLabel = '选择分钟';\r\n\r\n /** Label used for ok button within the manual time input. */\r\n okLabel = '确认';\r\n\r\n /** Label used for cancel button within the manual time input. */\r\n cancelLabel = '取消';\r\n /** Formats a range of years (used for visuals). */\r\n formatYearRange(start: string, end: string): string {\r\n return `${start} \\u2013 ${end}`;\r\n }\r\n\r\n /** Formats a label for a range of years (used by screen readers). */\r\n formatYearRangeLabel(start: string, end: string): string {\r\n return `${start} to ${end}`;\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';\r\n\r\n\r\n/**\r\n * An internal class that represents the data corresponding to a single calendar cell.\r\n */\r\nexport class CmatDatetimepickerCalendarCellComponent {\r\n constructor(public value: number,\r\n public displayValue: string,\r\n public ariaLabel: string,\r\n public enabled: boolean) {\r\n }\r\n}\r\n\r\n/**\r\n * An internal component used to display calendar data in a table.\r\n */\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: '[cmat-datetimepicker-calendar-body]',\r\n templateUrl: 'calendar-body.html',\r\n styleUrls: ['calendar-body.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerCalendarBody',\r\n imports: []\r\n})\r\nexport class CmatDatetimepickerCalendarBodyComponent {\r\n /** The label for the table. (e.g. \"Jan 2017\"). */\r\n @Input() label: string;\r\n\r\n /** The cells to display in the table. */\r\n @Input() rows: CmatDatetimepickerCalendarCellComponent[][];\r\n\r\n /** The value in the table that corresponds to today. */\r\n @Input() todayValue: number | null;\r\n\r\n /** The value in the table that is currently selected. */\r\n @Input() selectedValue: number | null;\r\n\r\n /** The minimum number of free cells needed to fit the label in the first row. */\r\n @Input() labelMinRequiredCells: number;\r\n\r\n /** The number of columns in the table. */\r\n @Input() numCols = 7;\r\n\r\n /** Whether to allow selection of disabled cells. */\r\n @Input() allowDisabledSelection = false;\r\n\r\n /** The cell number of the active cell in the table. */\r\n @Input() activeCell = 0;\r\n\r\n /** Emits when a new value is selected. */\r\n @Output() selectedValueChange = new EventEmitter<number>();\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-calendar-body';\r\n\r\n /** The number of blank cells to put at the beginning for the first row. */\r\n get _firstRowOffset(): number {\r\n return this.rows?.length && this.rows[0].length ?\r\n this.numCols - this.rows[0].length : 0;\r\n }\r\n\r\n cellClicked(cell: CmatDatetimepickerCalendarCellComponent): void {\r\n if (!this.allowDisabledSelection && !cell.enabled) {\r\n return;\r\n }\r\n this.selectedValueChange.emit(cell.value);\r\n }\r\n\r\n isActiveCell(rowIndex: number, colIndex: number): boolean {\r\n let cellNumber = rowIndex * this.numCols + colIndex;\r\n\r\n // Account for the fact that the first row may not have as many cells.\r\n if (rowIndex) {\r\n cellNumber -= this._firstRowOffset;\r\n }\r\n\r\n return cellNumber === this.activeCell;\r\n }\r\n}\r\n","<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}","import { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\n\r\nconst DAYS_PER_WEEK = 7;\r\n\r\n/**\r\n * An internal component used to display a single month in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-month-view',\r\n templateUrl: 'month-view.html',\r\n styleUrls:['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerMonthView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent,NgClass]\r\n})\r\nexport class CmatDatetimepickerMonthViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new date is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n\r\n /** Grid of calendar cells representing the dates of the month. */\r\n weeks: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The number of blank cells in the first row before the 1st of the month. */\r\n firstWeekOffset: number;\r\n /**\r\n * The date of the month that the currently selected Date falls on.\r\n * Null if the currently selected Date is in another month.\r\n */\r\n selectedDate: number | null;\r\n /** The date of the month that today falls on. Null if today is in another month. */\r\n todayDate: number | null;\r\n /** The names of the weekdays. */\r\n weekdays: { long: string; narrow: string }[];\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _elementRef = inject(ElementRef);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n const firstDayOfWeek = this.adapter.getFirstDayOfWeek();\r\n const narrowWeekdays = this.adapter.getDayOfWeekNames('narrow');\r\n const longWeekdays = this.adapter.getDayOfWeekNames('long');\r\n\r\n // Rotate the labels for days of the week based on the configured first day of the week.\r\n const weekdays = longWeekdays.map((long, i) => ({ long, narrow: narrowWeekdays[i] }));\r\n this.weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n\r\n /**\r\n * The date to display in this month view (everything other than the month and year is ignored).\r\n */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !this.adapter.sameMonthAndYear(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedDate = this._getDateInCurrentMonth(this.selected);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new date is selected. */\r\n dateSelected(date: number): void {\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), this.adapter.getMonth(this.activeDate),\r\n date, this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n if (this.type === 'date') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n /** Initializes this month view. */\r\n private _init(): void {\r\n this.selectedDate = this._getDateInCurrentMonth(this.selected);\r\n this.todayDate = this._getDateInCurrentMonth(this.adapter.today());\r\n\r\n const firstOfMonth = this.adapter.createDatetime(this.adapter.getYear(this.activeDate),\r\n this.adapter.getMonth(this.activeDate), 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n this.firstWeekOffset =\r\n (DAYS_PER_WEEK + this.adapter.getDayOfWeek(firstOfMonth) -\r\n this.adapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;\r\n\r\n this._createWeekCells();\r\n }\r\n\r\n /** Creates MdCalendarCells for the dates in this month. */\r\n private _createWeekCells(): void {\r\n const daysInMonth = this.adapter.getNumDaysInMonth(this.activeDate);\r\n const dateNames = this.adapter.getDateNames();\r\n this.weeks = [[]];\r\n for (let i = 0, cell = this.firstWeekOffset; i < daysInMonth; i++, cell++) {\r\n if (cell === DAYS_PER_WEEK) {\r\n this.weeks.push([]);\r\n cell = 0;\r\n }\r\n const date = this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate),\r\n this.adapter.getMonth(this.activeDate), i + 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n const enabled = !this.dateFilter ||\r\n this.dateFilter(date);\r\n const ariaLabel = this.adapter.format(date, this._dateFormats.display.dateA11yLabel);\r\n this.weeks[this.weeks.length - 1]\r\n .push(new CmatDatetimepickerCalendarCellComponent(i + 1, dateNames[i], ariaLabel, enabled));\r\n }\r\n }\r\n\r\n /**\r\n * Gets the date in this month that the given Date falls on.\r\n * Returns null if the given Date is in another month.\r\n */\r\n private _getDateInCurrentMonth(date: D): number | null {\r\n return this.adapter.sameMonthAndYear(date, this.activeDate) ?\r\n this.adapter.getDate(date) : null;\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>","\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\nexport const yearsPerPage = 24;\r\n\r\nexport const yearsPerRow = 4;\r\n\r\n/**\r\n * An internal component used to display multiple years in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-multi-year-view',\r\n templateUrl: 'multi-year-view.html',\r\n styleUrls: ['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerMultiYearView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerMultiYearViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new month is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n /** Grid of calendar cells representing the years in the range. */\r\n years: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The label for this year range (e.g. \"2000-2020\"). */\r\n yearLabel: string;\r\n /** The year in this range that today falls on. Null if today is in a different range. */\r\n todayYear: number;\r\n /**\r\n * The year in this range that the selected Date falls on.\r\n * Null if the selected Date is in a different range.\r\n */\r\n selectedYear: number | null;\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _elementRef = inject(ElementRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** The date to display in this multi year view*/\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !isSameMultiYearView(this.adapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\r\n this._init();\r\n\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedYear = this._selected && this.adapter.getYear(this._selected);\r\n }\r\n\r\n\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._getValidDateOrNull(this.adapter.deserialize(value));\r\n }\r\n\r\n\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._getValidDateOrNull(this.adapter.deserialize(value));\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new year is selected. */\r\n yearSelected(year: number): void {\r\n const month = this.adapter.getMonth(this.activeDate);\r\n const normalizedDate = this.adapter.createDatetime(year, month, 1, 0, 0);\r\n\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n year,\r\n month,\r\n Math.min(this.adapter.getDate(this.activeDate),\r\n this.adapter.getNumDaysInMonth(normalizedDate)),\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n\r\n if (this.type === 'year') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n getActiveCell(): number {\r\n return getActiveOffset(this.adapter, this.activeDate, this.minDate, this.maxDate);\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n /** Initializes this year view. */\r\n private _init(): void {\r\n\r\n this.todayYear = this.adapter.getYear(this.adapter.today());\r\n this.yearLabel = this.adapter.getYearName(this.activeDate);\r\n\r\n\r\n const activeYear = this.adapter.getYear(this.activeDate);\r\n\r\n const minYearOfPage = activeYear - getActiveOffset(\r\n this.adapter, this.activeDate, this.minDate, this.maxDate);\r\n\r\n this.years = [];\r\n for (let i = 0, row: number[] = []; i < yearsPerPage; i++) {\r\n row.push(minYearOfPage + i);\r\n if (row.length === yearsPerRow) {\r\n this.years.push(row.map(year => this._createCellForYear(year)));\r\n row = [];\r\n }\r\n }\r\n }\r\n\r\n /** Creates an MatDatetimepickerCalendarCell for the given year. */\r\n private _createCellForYear(year: number): CmatDatetimepickerCalendarCellComponent {\r\n const yearName = this.adapter.getYearName(this.adapter.createDate(year, 0, 1));\r\n return new CmatDatetimepickerCalendarCellComponent(year, yearName, yearName, this._shouldEnableYear(year));\r\n }\r\n\r\n /** Whether the given year is enabled. */\r\n private _shouldEnableYear(year: number): boolean {\r\n // disable if the year is greater than maxDate lower than minDate\r\n if (year === undefined || year === null ||\r\n (this.maxDate && year > this.adapter.getYear(this.maxDate)) ||\r\n (this.minDate && year < this.adapter.getYear(this.minDate))) {\r\n return false;\r\n }\r\n\r\n // enable if it reaches here and there's no filter defined\r\n if (!this.dateFilter) {\r\n return true;\r\n }\r\n\r\n const firstOfYear = this.adapter.createDate(year, 0, 1);\r\n\r\n // If any date in the year is enabled count the year as enabled.\r\n for (let date = firstOfYear; this.adapter.getYear(date) === year;\r\n date = this.adapter.addCalendarDays(date, 1)) {\r\n if (this.dateFilter(date)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * @param obj The object to check.\r\n * @returns The given object if it is both a date instance and valid, otherwise null.\r\n */\r\n private _getValidDateOrNull(obj: any): D | null {\r\n return (this.adapter.isDateInstance(obj) && this.adapter.isValid(obj)) ? obj : null;\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n}\r\n\r\nexport function isSameMultiYearView<D>(\r\n dateAdapter: DatetimeAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean {\r\n const year1 = dateAdapter.getYear(date1);\r\n const year2 = dateAdapter.getYear(date2);\r\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\r\n return Math.floor((year1 - startingYear) / yearsPerPage) ===\r\n Math.floor((year2 - startingYear) / yearsPerPage);\r\n}\r\n\r\n/**\r\n * When the multi-year view is first opened, the active year will be in view.\r\n * So we compute how many years are between the active year and the *slot* where our\r\n * \"startingYear\" will render when paged into view.\r\n */\r\nexport function getActiveOffset<D>(\r\n dateAdapter: DatetimeAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number {\r\n const activeYear = dateAdapter.getYear(activeDate);\r\n return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)),\r\n yearsPerPage);\r\n}\r\n\r\n/**\r\n * We pick a \"starting\" year such that either the maximum year would be at the end\r\n * or the minimum year would be at the beginning of a page.\r\n */\r\nfunction getStartingYear<D>(\r\n dateAdapter: DatetimeAdapter<D>, minDate: D | null, maxDate: D | null): number {\r\n let startingYear = 0;\r\n if (maxDate) {\r\n const maxYear = dateAdapter.getYear(maxDate);\r\n startingYear = maxYear - yearsPerPage + 1;\r\n } else if (minDate) {\r\n startingYear = dateAdapter.getYear(minDate);\r\n }\r\n return startingYear;\r\n}\r\n\r\n/** Gets remainder that is non-negative, even if first number is negative */\r\nfunction euclideanModulo(a: number, b: number): number {\r\n return (a % b + b) % b;\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>","import {\r\n coerceBooleanProperty,\r\n coerceNumberProperty,\r\n NumberInput,\r\n} from '@angular/cdk/coercion';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, Output, SimpleChanges, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SubscriptionLike } from 'rxjs';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerClockComponent } from './clock';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\nimport { CmatAMPM, CmatClockView } from './datetimepicker-types';\r\n\r\n\r\n\r\nfunction pad(num: NumberInput, size: number): string {\r\n num = String(num);\r\n while (num.length < size) { num = '0' + num; }\r\n return num;\r\n}\r\n\r\n@Directive({\r\n // eslint-disable-next-line @angular-eslint/directive-selector\r\n selector: 'input.cmat-datetimepicker-time-input',\r\n exportAs: 'cmatDatetimepickerTimeInput'\r\n})\r\nexport class CmatDatetimepickerTimeInputDirective implements OnDestroy {\r\n @Input() timeInterval: number = 1;\r\n @Input() timeMin: number = 0;\r\n @Input() timeMax: number = Infinity;\r\n\r\n @Output() timeValueChanged = new EventEmitter<NumberInput>();\r\n\r\n private _element = inject(ElementRef);\r\n private _cdr = inject(ChangeDetectorRef);\r\n\r\n private _value: NumberInput;\r\n\r\n private _keyDownListener = this.keyDownHandler.bind(this);\r\n private _keyPressListener = this.keyPressHandler.bind(this);\r\n private _inputEventListener = this.inputChangedHandler.bind(this);\r\n\r\n\r\n\r\n constructor() {\r\n this.inputElement.addEventListener('keydown', this._keyDownListener, {\r\n passive: true,\r\n });\r\n\r\n // Do not passive since we want to be able to preventDefault()\r\n this.inputElement.addEventListener('keypress', this._keyPressListener);\r\n this.inputElement.addEventListener('input', this._inputEventListener, {\r\n passive: true,\r\n });\r\n }\r\n\r\n get hasFocus(): boolean {\r\n return this._element.nativeElement && this._element?.nativeElement === document?.activeElement;\r\n }\r\n\r\n get inputElement(): HTMLInputElement {\r\n return this._element.nativeElement as HTMLInputElement;\r\n }\r\n\r\n // We look here at the placeholder value, because we write '' into the value on focus\r\n // placeholder should always be up to date with \"currentValue\"\r\n get valid(): boolean {\r\n // At the start _value is undefined therefore this would result in not valid and\r\n // make a ugly warning border afterwards we can safely check\r\n if (this._value) {\r\n const currentValue = String(this.inputElement.value);\r\n\r\n // It can be that currentValue is empty due to we removing the value on focus,\r\n // if that is the case we should check previous value which should be in the placeholder\r\n if (currentValue.length) {\r\n return pad(this._value, 2) === this.inputElement.value;\r\n } else {\r\n return pad(this._value, 2) === this.inputElement.placeholder;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n get invalid(): boolean {\r\n return !this.valid;\r\n }\r\n\r\n @Input()\r\n set timeValue(value: NumberInput) {\r\n this._value = coerceNumberProperty(value);\r\n if (!this.hasFocus) {\r\n this.writeValue(this._value);\r\n }\r\n this.writePlaceholder(this._value);\r\n }\r\n\r\n @HostListener('blur', ['$event'])\r\n blur(): void {\r\n this.writeValue(this._value);\r\n this.writePlaceholder(this._value);\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n @HostListener('focus', ['$event'])\r\n focus(): void {\r\n this.writeValue('');\r\n }\r\n\r\n /**\r\n * Write value to inputElement\r\n *\r\n * @param value NumberInput\r\n */\r\n writeValue(value: NumberInput): void {\r\n if (value !== '') {\r\n this.inputElement.value = pad(value, 2);\r\n } else {\r\n this.inputElement.value = '';\r\n }\r\n this._cdr.markForCheck();\r\n }\r\n\r\n /**\r\n * Writes value to placeholder\r\n *\r\n * @param value NumberInput\r\n */\r\n writePlaceholder(value: NumberInput): void {\r\n this.inputElement.placeholder = pad(value, 2);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n keyDownHandler(event: KeyboardEvent): void {\r\n if (String(this.inputElement.value).length > 0) {\r\n let value: number | null = null;\r\n if (event.code === 'ArrowUp') {\r\n value = coerceNumberProperty(this._value);\r\n value += this.timeInterval;\r\n event.stopPropagation();\r\n } else if (event.code === 'ArrowDown') {\r\n value = coerceNumberProperty(this._value);\r\n value -= this.timeInterval;\r\n event.stopPropagation();\r\n }\r\n\r\n // if value has changed\r\n if (typeof value === 'number') {\r\n this.writeValue(value);\r\n this.writePlaceholder(value);\r\n this.clampInputValue();\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Prevent non number inputs in the inputElement with the exception of Enter/BackSpace\r\n *\r\n * @param event KeyboardEvent\r\n */\r\n keyPressHandler(event: KeyboardEvent): void {\r\n const key = event?.key ?? null;\r\n if (isNaN(Number(key)) && key !== 'Enter') {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n inputChangedHandler(): void {\r\n this.clampInputValue();\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n\r\n clampInputValue(): void {\r\n if (this.inputElement?.value === '') {\r\n return;\r\n }\r\n\r\n const value = coerceNumberProperty(this.inputElement?.value ?? null);\r\n if (value) {\r\n const clampedValue = Math.min(Math.max(value, this.timeMin), this.timeMax);\r\n if (clampedValue !== value) {\r\n this.writeValue(clampedValue);\r\n this.writePlaceholder(clampedValue);\r\n }\r\n this._value = clampedValue;\r\n }\r\n }\r\n\r\n /**\r\n * Remove event listeners on destruction\r\n */\r\n ngOnDestroy(): void {\r\n this.inputElement.removeEventListener('keydown', this._keyDownListener);\r\n this.inputElement.removeEventListener('keypress', this._keyPressListener);\r\n this.inputElement.removeEventListener('input', this._inputEventListener);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-time',\r\n templateUrl: './time.html',\r\n styleUrls: ['time.scss'],\r\n exportAs: 'cmatDatetimepickerTime',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CmatDatetimepickerTimeInputDirective, MatButtonModule, CmatDatetimepickerClockComponent]\r\n})\r\nexport class CmatDatetimepickerTimeComponent<D> implements OnChanges, AfterViewInit, OnDestroy {\r\n /** Emits when the currently selected date changes. */\r\n @Output() readonly selectedChange = new EventEmitter<D>();\r\n\r\n /** Emits when any date changes. */\r\n @Output() readonly activeDateChange = new EventEmitter<D>();\r\n\r\n /** Emits when any date is selected. */\r\n @Output() readonly userSelection = new EventEmitter<void>();\r\n\r\n /** Emits when AM/PM button are clicked. */\r\n @Output() readonly ampmChange = new EventEmitter<CmatAMPM>();\r\n\r\n /** Emits when AM/PM button are clicked. */\r\n @Output() readonly clockViewChange = new EventEmitter<CmatClockView>();\r\n\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter!: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Step over minutes. */\r\n @Input() interval: number = 1;\r\n /** Whether the time is now in AM or PM. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n @Input() AMPM: CmatAMPM = 'AM';\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-time';\r\n\r\n @ViewChild('hourInput', { read: ElementRef<HTMLInputElement> })\r\n protected hourInputElement: ElementRef<HTMLInputElement> | void;\r\n\r\n @ViewChild('hourInput', { read: CmatDatetimepickerTimeInputDirective })\r\n protected hourInputDirective: CmatDatetimepickerTimeInputDirective | void;\r\n\r\n @ViewChild('minuteInput', { read: ElementRef<HTMLInputElement> })\r\n protected minuteInputElement: ElementRef<HTMLInputElement> | void;\r\n\r\n @ViewChild('minuteInput', { read: CmatDatetimepickerTimeInputDirective })\r\n protected minuteInputDirective: CmatDatetimepickerTimeInputDirective | void;\r\n\r\n datetimepickerIntlChangesSubscription: SubscriptionLike;\r\n\r\n protected datetimepickerIntl = inject(CmatDatetimepickerIntl);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n private _twelvehour = false;\r\n private _activeDate!: D;\r\n private _selected!: D | null;\r\n private _minDate!: D | null;\r\n private _maxDate!: D | null;\r\n /** Whether the clock is in hour view. */\r\n private _clockView: CmatClockView = 'hour';\r\n\r\n\r\n\r\n constructor() {\r\n this.datetimepickerIntlChangesSubscription = this.datetimepickerIntl.changes.subscribe(() => {\r\n this._changeDetectorRef.detectChanges();\r\n });\r\n }\r\n\r\n get isHourView(): boolean {\r\n return this._clockView === 'hour';\r\n }\r\n\r\n get isMinuteView(): boolean {\r\n return this._clockView === 'hour';\r\n }\r\n\r\n get hour(): string {\r\n if (!this.activeDate) {\r\n if (this.twelvehour) {\r\n return '12';\r\n } else {\r\n return '00';\r\n }\r\n }\r\n\r\n const hour = Number(this._adapter.getHour(this.activeDate));\r\n if (!this.twelvehour) {\r\n return this.prefixWithZero(hour);\r\n }\r\n\r\n if (hour === 0) {\r\n return '12';\r\n } else {\r\n return this.prefixWithZero(hour > 12 ? hour - 12 : hour);\r\n }\r\n }\r\n\r\n get minute(): string {\r\n if (this.activeDate) {\r\n return this.prefixWithZero(this._adapter.getMinute(this.activeDate));\r\n }\r\n\r\n return '00';\r\n }\r\n\r\n /** Whether the clock uses 12 hour format. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get twelvehour(): boolean {\r\n return this._twelvehour;\r\n }\r\n set twelvehour(value: boolean) {\r\n this._twelvehour = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * The date to display in this clock view.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n set activeDate(value: D) {\r\n this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n }\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n if (this._selected) {\r\n this.activeDate = this._selected;\r\n }\r\n }\r\n\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n\r\n /** Whether the clock should be started in hour or minute view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get clockView(): CmatClockView {\r\n return this._clockView;\r\n }\r\n set clockView(value: CmatClockView) {\r\n this._clockView = value;\r\n }\r\n\r\n prefixWithZero(value: number): string {\r\n if (value < 10) {\r\n return '0' + String(value);\r\n }\r\n\r\n return String(value);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // when clockView changes by input we should focus the correct input\r\n if (changes['clockView']) {\r\n if (changes['clockView'].currentValue !== changes['clockView'].previousValue) {\r\n this.focusInputElement();\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.focusInputElement();\r\n }\r\n\r\n focusInputElement(): void {\r\n if (this.clockView === 'hour') {\r\n if (this.hourInputElement) {\r\n (this.hourInputElement.nativeElement).focus();\r\n }\r\n } else {\r\n if (this.minuteInputElement) {\r\n (this.minuteInputElement.nativeElement).focus();\r\n }\r\n }\r\n }\r\n\r\n handleHourInputChange(value: NumberInput): void {\r\n const hour = coerceNumberProperty(value);\r\n if (hour || hour === 0) {\r\n const newValue = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n this.updateHourForAmPm(hour),\r\n this._adapter.getMinute(this.activeDate)\r\n );\r\n\r\n this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);\r\n this.activeDateChange.emit(this.activeDate);\r\n\r\n // If previously we did set [cmatValue]=\"13\" and the input changed to 6, and the clamping will make it \"13\" again\r\n // then the hourInputDirective will not have been updated since \"13\" === \"13\" same reference so no change detected\r\n // by directly setting it within this handler, we handle this usecase\r\n if (this.hourInputDirective) {\r\n this.hourInputDirective.timeValue = this.hour;\r\n }\r\n }\r\n }\r\n\r\n updateHourForAmPm(value: number): number {\r\n if (!this.twelvehour) {\r\n return value;\r\n }\r\n\r\n // value should be between 1-12\r\n if (this.AMPM === 'AM') {\r\n if (value === 0 || value === 12) {\r\n return 0;\r\n }\r\n return value;\r\n }\r\n // PM\r\n else {\r\n if (value === 0 || value === 12) {\r\n return 12;\r\n }\r\n\r\n // other cases, we should add 12 to the value aka 3:00 PM = 3 + 12 = 15:00\r\n return value + 12;\r\n }\r\n }\r\n\r\n handleMinuteInputChange(value: NumberInput): void {\r\n const minute = coerceNumberProperty(value);\r\n if (minute || minute === 0) {\r\n const newValue = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n this._adapter.getHour(this._activeDate),\r\n minute\r\n );\r\n this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);\r\n this.activeDateChange.emit(this.activeDate);\r\n\r\n // If previously we did set [cmatValue]=\"40\" and the input changed to 30, and the clamping will make it \"40\" again\r\n // then the minuteInputDirective will not have been updated since \"40\" === \"40\" same reference so no change detected\r\n // by directly setting it within this handler, we handle this usecase\r\n if (this.minuteInputDirective) {\r\n this.minuteInputDirective.timeValue = this.minute;\r\n }\r\n }\r\n }\r\n\r\n handleFocus(clockView: CmatClockView): void {\r\n this.clockView = clockView;\r\n this.clockViewChange.emit(clockView);\r\n }\r\n\r\n timeSelected(date: D): void {\r\n if (this.clockView === 'hour') {\r\n this.clockView = 'minute';\r\n }\r\n this._activeDate = this.selected = date;\r\n }\r\n\r\n onActiveDateChange(date: D): void {\r\n this._activeDate = date;\r\n this.activeDateChange.emit(date);\r\n }\r\n\r\n handleOk(): void {\r\n if (this._selected) {\r\n this.selectedChange.emit(this._selected);\r\n }\r\n this.userSelection.emit();\r\n }\r\n\r\n handleCancel(): void {\r\n this.userSelection.emit();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.datetimepickerIntlChangesSubscription) {\r\n this.datetimepickerIntlChangesSubscription.unsubscribe();\r\n }\r\n }\r\n}\r\n","<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>","import { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\n/**\r\n * An internal component used to display a single year in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-year-view',\r\n templateUrl: 'year-view.html',\r\n styleUrls: ['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerYearView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerYearViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new month is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n\r\n /** Grid of calendar cells representing the months of the year. */\r\n months: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The label for this year (e.g. \"2017\"). */\r\n yearLabel: string;\r\n /** The month in this year that today falls on. Null if today is in a different year. */\r\n todayMonth: number | null;\r\n /**\r\n * The month in this year that the selected Date falls on.\r\n * Null if the selected Date is in a different year.\r\n */\r\n selectedMonth: number | null;\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _elementRef = inject(ElementRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n\r\n /** The date to display in this year view (everything other than the year is ignored). */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !this.adapter.sameYear(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedMonth = this._getMonthInCurrentYear(this.selected);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new month is selected. */\r\n monthSelected(month: number): void {\r\n const normalizedDate = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, 0, 0);\r\n\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), month,\r\n Math.min(this.adapter.getDate(this.activeDate), this.adapter.getNumDaysInMonth(normalizedDate)),\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n if (this.type === 'month') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n\r\n /** Initializes this month view. */\r\n private _init(): void {\r\n this.selectedMonth = this._getMonthInCurrentYear(this.selected);\r\n this.todayMonth = this._getMonthInCurrentYear(this.adapter.today());\r\n this.yearLabel = this.adapter.getYearName(this.activeDate);\r\n\r\n const monthNames = this.adapter.getMonthNames('short');\r\n // First row of months only contains 5 elements so we can fit the year label on the same row.\r\n this.months = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11]].map(row => row.map(\r\n month => this._createCellForMonth(month, monthNames[month])));\r\n }\r\n\r\n /**\r\n * Gets the month in this year that the given Date falls on.\r\n * Returns null if the given Date is in another year.\r\n */\r\n private _getMonthInCurrentYear(date: D): number | null {\r\n return this.adapter.sameYear(date, this.activeDate) ?\r\n this.adapter.getMonth(date) : null;\r\n }\r\n\r\n /** Creates an MdCalendarCell for the given month. */\r\n private _createCellForMonth(month: number, monthName: string): CmatDatetimepickerCalendarCellComponent {\r\n const ariaLabel = this.adapter.format(\r\n this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)),\r\n this._dateFormats.display.monthYearA11yLabel);\r\n return new CmatDatetimepickerCalendarCellComponent(\r\n month, monthName.toLocaleUpperCase(), ariaLabel, this._isMonthEnabled(month));\r\n }\r\n\r\n /** Whether the given month is enabled. */\r\n private _isMonthEnabled(month: number): boolean {\r\n if (!this.dateFilter) {\r\n return true;\r\n }\r\n\r\n const firstOfMonth = this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), month, 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n\r\n // If any date in the month is enabled count the month as enabled.\r\n for (let date = firstOfMonth; this.adapter.getMonth(date) === month;\r\n date = this.adapter.addCalendarDays(date, 1)) {\r\n if (this.dateFilter(date)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { Subscription } from 'rxjs';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerClockComponent } from './clock';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\nimport { CmatAMPM, CmatCalendarView, CmatClockView, CmatDatetimepickerType } from './datetimepicker-types';\r\nimport { CmatDatetimepickerMonthViewComponent } from './month-view';\r\nimport { getActiveOffset, isSameMultiYearView, yearsPerPage, yearsPerRow, CmatDatetimepickerMultiYearViewComponent } from './multi-year-view';\r\nimport { CmatDatetimepickerTimeComponent } from './time';\r\nimport { CmatDatetimepickerYearViewComponent } from './year-view';\r\n\r\n/**\r\n * A calendar that is used as part of the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-calendar',\r\n templateUrl: 'calendar.html',\r\n styleUrls: ['calendar.scss', 'datetimepicker-base.scss'],\r\n host: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.cmat-datetimepicker-calendar-with-time-input]': 'timeInput',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerCalendar',\r\n imports: [MatButtonModule, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerYearViewComponent,\r\n CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerCalendarComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** Active multi year view when click on year. */\r\n @Input() multiYearSelector: boolean = false;\r\n /** Whether the calendar should be started in month or year view. */\r\n @Input() startView: CmatCalendarView = 'month';\r\n @Input() twelvehour: boolean = false;\r\n @Input() timeInterval: number = 1;\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Prevent user to select same date time */\r\n @Input() preventSameDateTimeSelection = false;\r\n /** Emits when the currently selected date changes. */\r\n @Output() selectedChange: EventEmitter<D> = new EventEmitter<D>();\r\n /** Emits when the view has been changed. **/\r\n @Output() viewChanged: EventEmitter<CmatCalendarView> = new EventEmitter<CmatCalendarView>();\r\n @HostBinding('class') class = 'cmat-datetimepicker-calendar';\r\n @HostBinding('attr.aria-label') label = 'ariaLabel';\r\n @HostBinding('role') role = 'dialog';\r\n @HostBinding('tabindex') tabindex = 0;\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AMPM: CmatAMPM;\r\n clockView: CmatClockView = 'hour';\r\n calendarState: string;\r\n\r\n /** Whether the calendar is in month view. */\r\n private _elementRef = inject(ElementRef);\r\n private _intl = inject(CmatDatetimepickerIntl);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _currentView: CmatCalendarView;\r\n private _intlChanges: Subscription;\r\n private _clampedActiveDate: D;\r\n private _type: CmatDatetimepickerType = 'date';\r\n private _startAt: D | null;\r\n private _selected: D | null;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n private _timeInput = false;\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n const _intl = this._intl;\r\n const changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n if (!this._adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._intlChanges = _intl.changes\r\n .subscribe(() => changeDetectorRef.markForCheck());\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n @Input()\r\n get type(): CmatDatetimepickerType {\r\n return this._type;\r\n }\r\n\r\n set type(value: CmatDatetimepickerType) {\r\n this._type = value || 'date';\r\n if (this.type === 'year') {\r\n this.multiYearSelector = true;\r\n }\r\n }\r\n\r\n /** A date representing the period (month or year) to start the calendar in. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get startAt(): D | null {\r\n return this._startAt;\r\n }\r\n\r\n set startAt(value: D | null) {\r\n this._startAt = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /**\r\n * Whether the calendar is in time mode. In time mode the calendar clock gets time input elements rather then just clock\r\n *\r\n * When touchUi is enabled this will be disabled\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get timeInput(): boolean {\r\n return this._timeInput;\r\n }\r\n set timeInput(value: boolean) {\r\n this._timeInput = coerceBooleanProperty(value);\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /**\r\n * The current active date. This determines which time period is shown and which date is\r\n * highlighted when using keyboard navigation.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get activeDate(): D {\r\n return this._clampedActiveDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._clampedActiveDate;\r\n this._clampedActiveDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n if (oldActiveDate && this._clampedActiveDate &&\r\n !this._adapter.sameMonthAndYear(oldActiveDate, this._clampedActiveDate)) {\r\n if (this._adapter.isInNextMonth(oldActiveDate, this._clampedActiveDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get currentView(): CmatCalendarView {\r\n return this._currentView;\r\n }\r\n\r\n set currentView(view: CmatCalendarView) {\r\n this._currentView = view;\r\n this.viewChanged.emit(view);\r\n }\r\n\r\n /** The label for the current calendar view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearButtonText(): string {\r\n return this._adapter.getYearName(this.activeDate);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearPeriodText(): string {\r\n\r\n if (this.currentView === 'multi-year') {\r\n // The offset from the active year to the \"slot\" for the starting year is the\r\n // *actual* first rendered year in the multi-year view, and the last year is\r\n // just yearsPerPage - 1 away.\r\n const activeYear = this._adapter.getYear(this.activeDate);\r\n const minYearOfPage = activeYear - getActiveOffset(\r\n this._adapter, this.activeDate, this.minDate, this.maxDate);\r\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\r\n const minYearName =\r\n this._adapter.getYearName(this._adapter.createDate(minYearOfPage, 0, 1));\r\n const maxYearName =\r\n this._adapter.getYearName(this._adapter.createDate(maxYearOfPage, 0, 1));\r\n return this._intl.formatYearRange(minYearName, maxYearName);\r\n }\r\n\r\n return this.currentView === 'month' ? this._adapter.getMonthNames('long')[this._adapter.getMonth(this.activeDate)] :\r\n this._adapter.getYearName(this.activeDate);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearButtonLabel(): string {\r\n return this.multiYearSelector\r\n ? this._intl.switchToMultiYearViewLabel\r\n : this._intl.switchToYearViewLabel;\r\n }\r\n\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateButtonText(): string {\r\n switch (this.type) {\r\n case 'month':\r\n return this._adapter.getMonthNames('long')[this._adapter.getMonth(this.activeDate)];\r\n default:\r\n return this._adapter.format(this.activeDate, this._dateFormats.display.popupHeaderDateLabel);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateButtonLabel(): string {\r\n return this._intl.switchToMonthViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hoursButtonText(): string {\r\n let hour = this._adapter.getHour(this.activeDate);\r\n if (this.twelvehour) {\r\n if (hour === 0) {\r\n hour = 24;\r\n }\r\n hour = hour > 12 ? (hour - 12) : hour;\r\n }\r\n return this._2digit(hour);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hourButtonLabel(): string {\r\n return this._intl.switchToClockHourViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minutesButtonText(): string {\r\n return this._2digit(this._adapter.getMinute(this.activeDate));\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minuteButtonLabel(): string {\r\n return this._intl.switchToClockMinuteViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get prevButtonLabel(): string {\r\n switch (this._currentView) {\r\n case 'month':\r\n return this._intl.prevMonthLabel;\r\n case 'year':\r\n return this._intl.prevYearLabel;\r\n case 'multi-year':\r\n return this._intl.prevMultiYearLabel;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get nextButtonLabel(): string {\r\n switch (this._currentView) {\r\n case 'month':\r\n return this._intl.nextMonthLabel;\r\n case 'year':\r\n return this._intl.nextYearLabel;\r\n case 'multi-year':\r\n return this._intl.nextMultiYearLabel;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n handleCalendarBodyKeydown(event: KeyboardEvent): void {\r\n if (this.currentView === 'month') {\r\n this._handleCalendarBodyKeydownInMonthView(event);\r\n } else if (this.currentView === 'year') {\r\n this._handleCalendarBodyKeydownInYearView(event);\r\n } else if (this.currentView === 'multi-year') {\r\n this._handleCalendarBodyKeydownInMultiYearView(event);\r\n } else {\r\n this._handleCalendarBodyKeydownInClockView(event);\r\n }\r\n }\r\n\r\n /** Date filter for the month and year views. */\r\n dateFilterForViews = (date: D): boolean => !!date &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.DATE)) &&\r\n (!this.minDate || this._adapter.compareDate(date, this.minDate) >= 0) &&\r\n (!this.maxDate || this._adapter.compareDate(date, this.maxDate) <= 0);\r\n\r\n userSelected(): void {\r\n this.userSelection.emit();\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this.activeDate = this.startAt ?? this._adapter.today();\r\n this.selectAMPM(this.activeDate);\r\n this.focusActiveCell();\r\n if (this.type === 'year') {\r\n this.currentView = 'multi-year';\r\n } else if (this.type === 'month') {\r\n this.currentView = 'year';\r\n } else if (this.type === 'time') {\r\n this.currentView = 'clock';\r\n } else {\r\n this.currentView = this.startView || 'month';\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n\r\n this._intlChanges.unsubscribe();\r\n }\r\n\r\n /** Handles date selection in the month view. */\r\n dateSelected(date: D): void {\r\n if (this.type === 'date') {\r\n if (!this._adapter.sameDate(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n } else {\r\n this.activeDate = date;\r\n this.currentView = 'clock';\r\n }\r\n }\r\n\r\n /** Handles month selection in the year view. */\r\n monthSelected(month: D): void {\r\n if (this.type === 'month') {\r\n if (!this._adapter.sameMonthAndYear(month, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(this._adapter.getFirstDateOfMonth(month));\r\n }\r\n } else {\r\n this.activeDate = month;\r\n this.currentView = 'month';\r\n this.clockView = 'hour';\r\n }\r\n }\r\n\r\n /** Handles year selection in the multi year view. */\r\n yearSelected(year: D): void {\r\n if (this.type === 'year') {\r\n if ((this.selected && !this._adapter.sameYear(year, this.selected)) || !this.preventSameDateTimeSelection) {\r\n const normalizedDate = this._adapter.createDatetime(this._adapter.getYear(year), 0, 1, 0, 0);\r\n this.selectedChange.emit(normalizedDate);\r\n }\r\n } else {\r\n this.activeDate = year;\r\n this.currentView = 'year';\r\n }\r\n }\r\n\r\n timeSelected(date: D): void {\r\n this.activeDate = this.updateDate(date);\r\n if (!this._adapter.sameDatetime(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n }\r\n\r\n dialTimeSelected(date: D): void {\r\n if (this.clockView !== 'minute') {\r\n this.activeDate = this.updateDate(date);\r\n this.clockView = 'minute';\r\n } else {\r\n if (!this._adapter.sameDatetime(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n }\r\n }\r\n\r\n onActiveDateChange(date: D): void {\r\n this.activeDate = date;\r\n }\r\n\r\n updateDate(date: D): D {\r\n if (this.twelvehour) {\r\n const HOUR = this._adapter.getHour(date);\r\n if (HOUR === 12) {\r\n if (this.AMPM === 'AM') {\r\n return this._adapter.addCalendarHours(date, -12);\r\n }\r\n } else if (this.AMPM === 'PM') {\r\n return this._adapter.addCalendarHours(date, 12);\r\n }\r\n }\r\n return date;\r\n }\r\n\r\n selectAMPM(date: D): void {\r\n if (this._adapter.getHour(date) > 11) {\r\n this.AMPM = 'PM';\r\n } else {\r\n this.AMPM = 'AM';\r\n }\r\n }\r\n\r\n ampmClicked(source: CmatAMPM): void {\r\n this._currentView = 'clock';\r\n\r\n if (source === this.AMPM) {\r\n return;\r\n }\r\n this.AMPM = source;\r\n\r\n // if AMPM changed from PM to AM substract 12 hours\r\n const currentHour = this._adapter.getHour(this.activeDate);\r\n let newHourValue: number;\r\n if (this.AMPM === 'AM') {\r\n newHourValue = currentHour >= 12 ? this._adapter.getHour(this.activeDate) - 12 : 12;\r\n }\r\n // otherwise add 12 hours\r\n else {\r\n newHourValue = (currentHour + 12) % 24;\r\n }\r\n\r\n this.activeDate = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n newHourValue,\r\n this._adapter.getMinute(this.activeDate)\r\n );\r\n }\r\n\r\n yearClicked(): void {\r\n if (this.type === 'year' || this.multiYearSelector) {\r\n this.currentView = 'multi-year';\r\n return;\r\n }\r\n this.currentView = 'year';\r\n }\r\n\r\n dateClicked(): void {\r\n if (this.type !== 'month') {\r\n this.currentView = 'month';\r\n }\r\n }\r\n\r\n hoursClicked(): void {\r\n this.currentView = 'clock';\r\n this.clockView = 'hour';\r\n }\r\n\r\n minutesClicked(): void {\r\n this.currentView = 'clock';\r\n this.clockView = 'minute';\r\n }\r\n\r\n /** Handles user clicks on the previous button. */\r\n previousClicked(): void {\r\n this.activeDate = this.currentView === 'month' ?\r\n this._adapter.addCalendarMonths(this.activeDate, -1) :\r\n this._adapter.addCalendarYears(\r\n this.activeDate, this.currentView === 'year' ? -1 : -yearsPerPage\r\n );\r\n }\r\n\r\n /** Handles user clicks on the next button. */\r\n nextClicked(): void {\r\n this.activeDate = this.currentView === 'month' ?\r\n this._adapter.addCalendarMonths(this.activeDate, 1) :\r\n this._adapter.addCalendarYears(\r\n this.activeDate, this.currentView === 'year' ? 1 : yearsPerPage\r\n );\r\n }\r\n\r\n /** Whether the previous period button is enabled. */\r\n previousEnabled(): boolean {\r\n if (!this.minDate) {\r\n return true;\r\n }\r\n return !this.minDate || !this._isSameView(this.activeDate, this.minDate);\r\n }\r\n\r\n /** Whether the next period button is enabled. */\r\n nextEnabled(): boolean {\r\n return !this.maxDate || !this._isSameView(this.activeDate, this.maxDate);\r\n }\r\n\r\n\r\n focusActiveCell(): void {\r\n this._elementRef.nativeElement.focus();\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n\r\n /** Whether the two dates represent the same view in the current view mode (month or year). */\r\n private _isSameView(date1: D, date2: D): boolean {\r\n if (this.currentView === 'month') {\r\n return this._adapter.getYear(date1) === this._adapter.getYear(date2) &&\r\n this._adapter.getMonth(date1) === this._adapter.getMonth(date2);\r\n }\r\n if (this.currentView === 'year') {\r\n return this._adapter.getYear(date1) === this._adapter.getYear(date2);\r\n }\r\n // Otherwise we are in 'multi-year' view.\r\n return isSameMultiYearView(\r\n this._adapter, date1, date2, this.minDate, this.maxDate);\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in month view. */\r\n private _handleCalendarBodyKeydownInMonthView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, -7);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, 7);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate,\r\n 1 - this._adapter.getDate(this.activeDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate,\r\n (this._adapter.getNumDaysInMonth(this.activeDate) -\r\n this._adapter.getDate(this.activeDate)));\r\n break;\r\n case 'PageUp':\r\n this.activeDate = event.altKey ?\r\n this._adapter.addCalendarYears(this.activeDate, -1) :\r\n this._adapter.addCalendarMonths(this.activeDate, -1);\r\n break;\r\n case 'PageDown':\r\n this.activeDate = event.altKey ?\r\n this._adapter.addCalendarYears(this.activeDate, 1) :\r\n this._adapter.addCalendarMonths(this.activeDate, 1);\r\n break;\r\n case 'Enter':\r\n if (this.dateFilterForViews(this.activeDate)) {\r\n this.dateSelected(this.activeDate);\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n return;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in year view. */\r\n private _handleCalendarBodyKeydownInYearView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._prevMonthInSameCol(this.activeDate);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._nextMonthInSameCol(this.activeDate);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate,\r\n -this._adapter.getMonth(this.activeDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate,\r\n 11 - this._adapter.getMonth(this.activeDate));\r\n break;\r\n case 'PageUp':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(this.activeDate, event.altKey ? -10 : -1);\r\n break;\r\n case 'PageDown':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(this.activeDate, event.altKey ? 10 : 1);\r\n break;\r\n case 'Enter':\r\n this.monthSelected(this.activeDate);\r\n break;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\r\n private _handleCalendarBodyKeydownInMultiYearView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, -yearsPerRow);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, yearsPerRow);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate,\r\n -getActiveOffset(this._adapter, this.activeDate, this.minDate, this.maxDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate,\r\n yearsPerPage - getActiveOffset(\r\n this._adapter, this.activeDate, this.minDate, this.maxDate) - 1);\r\n break;\r\n case 'PageUp':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(\r\n this.activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\r\n break;\r\n case 'PageDown':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(\r\n this.activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\r\n break;\r\n case 'Enter':\r\n this.yearSelected(this.activeDate);\r\n break;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in month view. */\r\n private _handleCalendarBodyKeydownInClockView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowUp':\r\n this.activeDate = this.clockView === 'hour' ?\r\n this._adapter.addCalendarHours(this.activeDate, 1) :\r\n this._adapter.addCalendarMinutes(this.activeDate, this.timeInterval);\r\n // if the hours changed the am/pm we should update the AM/PM\r\n this.selectAMPM(this.activeDate);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this.clockView === 'hour' ?\r\n this._adapter.addCalendarHours(this.activeDate, -1) :\r\n this._adapter.addCalendarMinutes(this.activeDate, -this.timeInterval);\r\n // if the hours changed the am/pm we should update the AM/PM\r\n this.selectAMPM(this.activeDate);\r\n break;\r\n case 'Enter':\r\n if (!this.timeInput) {\r\n this.dialTimeSelected(this.activeDate);\r\n }\r\n return;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /**\r\n * Determine the date for the month that comes before the given month in the same column in the\r\n * calendar table.\r\n */\r\n private _prevMonthInSameCol(date: D): D {\r\n // Determine how many months to jump forward given that there are 2 empty slots at the beginning\r\n // of each year.\r\n const increment = this._adapter.getMonth(date) <= 4 ? -5 :\r\n (this._adapter.getMonth(date) >= 7 ? -7 : -12);\r\n return this._adapter.addCalendarMonths(date, increment);\r\n }\r\n\r\n /**\r\n * Determine the date for the month that comes after the given month in the same column in the\r\n * calendar table.\r\n */\r\n private _nextMonthInSameCol(date: D): D {\r\n // Determine how many months to jump forward given that there are 2 empty slots at the beginning\r\n // of each year.\r\n const increment = this._adapter.getMonth(date) <= 4 ? 7 :\r\n (this._adapter.getMonth(date) >= 7 ? 5 : 12);\r\n return this._adapter.addCalendarMonths(date, increment);\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n\r\n private _2digit(n: number): string {\r\n return ('00' + n).slice(-2);\r\n }\r\n}\r\n","<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';\r\nimport { hasModifierKey } from '@angular/cdk/keycodes';\r\nimport { FlexibleConnectedPositionStrategy, GlobalPositionStrategy, Overlay, OverlayConfig, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\r\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, afterNextRender, ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, InjectionToken, Injector, Input, OnDestroy, OnInit, Output, ViewChild, ViewContainerRef, ViewEncapsulation, DOCUMENT, inject } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { Subject, Subscription, merge } from 'rxjs';\r\nimport { filter, take } from 'rxjs/operators';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarComponent } from './calendar';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerInputDirective } from './datetimepicker-input';\r\nimport { CmatCalendarView, CmatDatetimepickerMode, CmatDatetimepickerType, DatetimepickerDropdownPositionX, DatetimepickerDropdownPositionY } from './datetimepicker-types';\r\n\r\n/** Used to generate a unique ID for each datepicker instance. */\r\nlet datetimepickerUid = 0;\r\n\r\n/** Injection token that determines the scroll handling while the calendar is open. */\r\nexport const CMAT_DATETIMEPICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\r\n 'cmat-datetimepicker-scroll-strategy'\r\n);\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\r\n return () => overlay.scrollStrategies.reposition();\r\n}\r\n\r\nexport const CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\r\n provide: CMAT_DATETIMEPICKER_SCROLL_STRATEGY,\r\n deps: [Overlay],\r\n useFactory: CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY\r\n};\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-content',\r\n templateUrl: 'datetimepicker-content.html',\r\n host: {\r\n 'class': 'cmat-datetimepicker-content cmat-datetimepicker-transform-panel',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class]': 'color ? \"mat-\" + color : \"\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.enter-dropdown]': 'animationState === \"enter-dropdown\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.enter-dialog]': 'animationState === \"enter-dialog\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.leave]': 'animationState === \"leave\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.cmat-datetimepicker-content-touch]': 'datetimepicker?.touchUi',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[attr.mode]': 'datetimepicker.mode'\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerContent',\r\n imports: [A11yModule, CmatDatetimepickerCalendarComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerContentComponent<D> implements OnInit, AfterContentInit, OnDestroy {\r\n @ViewChild(CmatDatetimepickerCalendarComponent, { static: true }) _calendar!: CmatDatetimepickerCalendarComponent<D>;\r\n @Input() color: ThemePalette;\r\n\r\n datetimepicker!: CmatDatetimepickerComponent<D>;\r\n\r\n /** Whether the datetimepicker is above or below the input. */\r\n isAbove!: boolean;\r\n\r\n /** Current state of the animation. */\r\n animationState!: 'enter-dropdown' | 'enter-dialog' | 'leave';\r\n\r\n /** Emits when an animation has finished. */\r\n readonly animationDone = new Subject<void>();\r\n\r\n /** Id of the label for the `role=\"dialog\"` element. */\r\n dialogLabelId: string | null = null;\r\n\r\n protected _elementRef = inject(ElementRef);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _animationEndListener: ((event: AnimationEvent) => void) | null = null;\r\n\r\n ngOnInit(): void {\r\n this.animationState = this.datetimepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';\r\n\r\n this._animationEndListener = (event: AnimationEvent): void => {\r\n if (event.animationName === 'panel-dropdown-enter' || event.animationName === 'panel-dialog-enter' || event.animationName === 'panel-leave') {\r\n this.animationDone.next();\r\n }\r\n };\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._animationEndListener);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._calendar.focusActiveCell();\r\n }\r\n\r\n startExitAnimation(): void {\r\n this.animationState = 'leave';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.animationDone.complete();\r\n\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._animationEndListener);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker',\r\n exportAs: 'cmatDatetimepicker',\r\n template: '',\r\n styleUrls: ['datetimepicker.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false\r\n})\r\nexport class CmatDatetimepickerComponent<D> implements OnDestroy {\r\n /** The view that the calendar should start in. */\r\n @Input() startView: CmatCalendarView = 'month';\r\n @Input() mode: CmatDatetimepickerMode = 'auto';\r\n @Input() timeInterval: number = 1;\r\n /** Prevent user to select same date time */\r\n @Input() preventSameDateTimeSelection = false;\r\n\r\n /** Preferred position of the datetimepicker in the X axis. */\r\n @Input()\r\n xPosition: DatetimepickerDropdownPositionX = 'start';\r\n\r\n /** Preferred position of the datetimepicker in the Y axis. */\r\n @Input()\r\n yPosition: DatetimepickerDropdownPositionY = 'below';\r\n\r\n @Output() selectedChanged = new EventEmitter<D>();\r\n /** Emits when the datepicker has been opened. */\r\n @Output() openedStream: EventEmitter<void> = new EventEmitter<void>();\r\n /** Emits when the datepicker has been closed. */\r\n @Output() closedStream: EventEmitter<void> = new EventEmitter<void>();\r\n /** Emits when the view has been changed. **/\r\n @Output() viewChanged: EventEmitter<CmatCalendarView> = new EventEmitter<CmatCalendarView>();\r\n /** Whether the calendar is open. */\r\n\r\n /** The id for the datepicker calendar. */\r\n id = `cmat-datetimepicker-${datetimepickerUid++}`;\r\n /** The input element this datepicker is associated with. */\r\n datetimepickerInput: CmatDatetimepickerInputDirective<D>;\r\n /** Emits when the datepicker is disabled. */\r\n disabledChange = new Subject<boolean>();\r\n\r\n private _overlay = inject(Overlay);\r\n private _injector = inject(Injector);\r\n private _viewContainerRef = inject(ViewContainerRef);\r\n private _scrollStrategy = inject(CMAT_DATETIMEPICKER_SCROLL_STRATEGY);\r\n private _dateAdapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dir = inject(Directionality, { optional: true })!;\r\n private _document = inject(DOCUMENT, { optional: true })!;\r\n\r\n\r\n private _validSelected: D | null = null;\r\n\r\n /** A reference to the overlay into which we've rendered the calendar. */\r\n private _overlayRef!: OverlayRef | null;\r\n\r\n /** Reference to the component instance rendered in the overlay. */\r\n private _componentRef!: ComponentRef<CmatDatetimepickerContentComponent<D>> | null;\r\n\r\n /** The element that was focused before the datetimepicker was opened. */\r\n private _focusedElementBeforeOpen: HTMLElement | null = null;\r\n\r\n /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\r\n private _backdropHarnessClass = `${this.id}-backdrop`;\r\n\r\n private _inputStateChanges = Subscription.EMPTY;\r\n\r\n private _multiYearSelector = false;\r\n private _twelvehour = false;\r\n private _panelClass!: string[];\r\n private _opened = false;\r\n private _color: ThemePalette;\r\n private _startAt: D | null;\r\n private _type: CmatDatetimepickerType = 'datetime';\r\n private _touchUi = false;\r\n private _disabled: boolean;\r\n private _timeInput = true;\r\n private _restoreFocus = true;\r\n\r\n\r\n\r\n constructor() {\r\n if (!this._dateAdapter) {\r\n throw createMissingDateImplError('DatetimeAdapter');\r\n }\r\n }\r\n\r\n /** Whether to show multi-year view. */\r\n @Input()\r\n get multiYearSelector(): boolean {\r\n return this._multiYearSelector;\r\n }\r\n set multiYearSelector(value: boolean) {\r\n this._multiYearSelector = coerceBooleanProperty(value);\r\n }\r\n\r\n /** Whether the clock uses 12 hour format. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get twelvehour(): boolean {\r\n return this._twelvehour;\r\n }\r\n set twelvehour(value: boolean) {\r\n this._twelvehour = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * Classes to be passed to the date picker panel.\r\n * Supports string and string array values, similar to `ngClass`.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get panelClass(): string | string[] {\r\n return this._panelClass;\r\n }\r\n set panelClass(value: string | string[]) {\r\n this._panelClass = coerceStringArray(value);\r\n }\r\n\r\n /** Whether the calendar is open. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get opened(): boolean {\r\n return this._opened;\r\n }\r\n set opened(value: boolean) {\r\n coerceBooleanProperty(value) ? this.open() : this.close();\r\n }\r\n\r\n /** Color palette to use on the datetimepicker's calendar. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get color(): ThemePalette {\r\n return (\r\n this._color ??\r\n (this.datetimepickerInput ? this.datetimepickerInput.getThemePalette() : undefined)\r\n );\r\n }\r\n set color(value: ThemePalette) {\r\n this._color = value;\r\n }\r\n\r\n /** The date to open the calendar to initially. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get startAt(): D | null {\r\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\r\n // selected value is.\r\n return this._startAt ?? (this.datetimepickerInput ? this.datetimepickerInput.value : null);\r\n }\r\n\r\n set startAt(date: D | null) {\r\n this._startAt = this._dateAdapter.getValidDateOrNull(date);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get type(): CmatDatetimepickerType {\r\n return this._type;\r\n }\r\n\r\n set type(value: CmatDatetimepickerType) {\r\n this._type = value || 'datetime';\r\n }\r\n\r\n /**\r\n * Whether the calendar is in time mode. In time mode the calendar clock gets time input\r\n * elements rather then just clock. When `touchUi` is enabled this will be disabled.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get timeInput(): boolean {\r\n return this._timeInput && !this.touchUi;\r\n }\r\n set timeInput(value: boolean) {\r\n this._timeInput = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\r\n * than a popup and elements have more padding to allow for bigger touch targets.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get touchUi(): boolean {\r\n return this._touchUi;\r\n }\r\n\r\n set touchUi(value: boolean) {\r\n this._touchUi = coerceBooleanProperty(value);\r\n }\r\n\r\n /** Whether the datepicker pop-up should be disabled. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled === undefined && this.datetimepickerInput ?\r\n this.datetimepickerInput.disabled : !!this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n const newValue = coerceBooleanProperty(value);\r\n\r\n if (newValue !== this._disabled) {\r\n this._disabled = newValue;\r\n this.disabledChange.next(newValue);\r\n }\r\n }\r\n\r\n /**\r\n * Whether to restore focus to the previously-focused element when the panel is closed.\r\n * Note that automatic focus restoration is an accessibility feature and it is recommended that\r\n * you provide your own equivalent, if you decide to turn it off.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get restoreFocus(): boolean {\r\n return this._restoreFocus;\r\n }\r\n set restoreFocus(value: boolean) {\r\n this._restoreFocus = coerceBooleanProperty(value);\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get selected(): D | null {\r\n return this._validSelected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._validSelected = value;\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minDate(): D | null {\r\n return this.datetimepickerInput?.min;\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get maxDate(): D | null {\r\n return this.datetimepickerInput?.max;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateFilter(): (date: D | null, type: CmatDatetimepickerFilterType) => boolean {\r\n return this.datetimepickerInput?.dateFilter;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._destroyOverlay();\r\n this.close();\r\n this._inputStateChanges.unsubscribe();\r\n this.disabledChange.complete();\r\n }\r\n\r\n /**\r\n * Register an input with this datepicker.\r\n *\r\n * @param input The datepicker input to register with this datepicker.\r\n */\r\n registerInput(input: CmatDatetimepickerInputDirective<D>): void {\r\n if (this.datetimepickerInput) {\r\n throw Error('A MatDatepicker can only be associated with a single input.');\r\n }\r\n this.datetimepickerInput = input;\r\n this._inputStateChanges =\r\n this.datetimepickerInput.valueChange.subscribe((value: D | null) => this.selected = value);\r\n }\r\n\r\n\r\n /** Open the calendar. */\r\n open(): void {\r\n if (this.opened || this.disabled) {\r\n return;\r\n }\r\n if (!this.datetimepickerInput) {\r\n throw Error('Attempted to open an MatDatepicker with no associated input.');\r\n }\r\n\r\n this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();\r\n this._openOverlay();\r\n this._opened = true;\r\n this.openedStream.emit();\r\n }\r\n\r\n /** Close the calendar. */\r\n close(): void {\r\n if (!this._opened) {\r\n return;\r\n }\r\n\r\n const canRestoreFocus =\r\n this._restoreFocus &&\r\n this._focusedElementBeforeOpen &&\r\n typeof this._focusedElementBeforeOpen.focus === 'function';\r\n\r\n const completeClose = (): void => {\r\n // The `_opened` could've been reset already if\r\n // we got two events in quick succession.\r\n if (this._opened) {\r\n this._opened = false;\r\n this.closedStream.emit();\r\n }\r\n };\r\n\r\n if (this._componentRef) {\r\n const { instance, location } = this._componentRef;\r\n instance.startExitAnimation();\r\n instance.animationDone.pipe(take(1)).subscribe(() => {\r\n const activeElement = this._document.activeElement;\r\n\r\n // Since we restore focus after the exit animation, we have to check that\r\n // the user didn't move focus themselves inside the `close` handler.\r\n if (\r\n canRestoreFocus &&\r\n (!activeElement ||\r\n activeElement === this._document.activeElement ||\r\n location.nativeElement.contains(activeElement))\r\n ) {\r\n this._focusedElementBeforeOpen?.focus();\r\n }\r\n\r\n this._focusedElementBeforeOpen = null;\r\n this._destroyOverlay();\r\n });\r\n }\r\n\r\n if (canRestoreFocus) {\r\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\r\n // marked the datepicker as closed. If the event fires out of sequence and the element that\r\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\r\n // able to close the calendar at all. We work around it by making the logic, that marks\r\n // the datepicker as closed, async as well.\r\n setTimeout(completeClose);\r\n } else {\r\n completeClose();\r\n }\r\n }\r\n /** Selects the given date */\r\n select(date: D): void {\r\n const oldValue = this.selected;\r\n this.selected = date;\r\n if (!this._dateAdapter.sameDatetime(oldValue, this.selected)) {\r\n this.selectedChanged.emit(date);\r\n }\r\n }\r\n\r\n viewChange(type: CmatCalendarView): void {\r\n this.viewChanged.emit(type);\r\n }\r\n\r\n /**\r\n * relevant values from the datetimepicker to the\r\n * datetimepicker content inside the overlay.\r\n */\r\n private _forwardContentValues(instance: CmatDatetimepickerContentComponent<D>): void {\r\n instance.datetimepicker = this;\r\n instance.color = this.color;\r\n instance.dialogLabelId = this.datetimepickerInput.getOverlayLabelId();\r\n }\r\n\r\n /** Opens the overlay with the calendar. */\r\n private _openOverlay(): void {\r\n this._destroyOverlay();\r\n\r\n const isDialog = this.touchUi;\r\n const labelId = this.datetimepickerInput.getOverlayLabelId();\r\n\r\n const portal = new ComponentPortal<CmatDatetimepickerContentComponent<D>>(\r\n CmatDatetimepickerContentComponent,\r\n this._viewContainerRef\r\n );\r\n const overlayRef = (this._overlayRef = this._overlay.create(\r\n new OverlayConfig({\r\n positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),\r\n hasBackdrop: true,\r\n backdropClass: [\r\n isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',\r\n this._backdropHarnessClass,\r\n ],\r\n direction: this._dir,\r\n scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),\r\n panelClass: `cmat-datetimepicker-${isDialog ? 'dialog' : 'popup'}`,\r\n })\r\n ));\r\n\r\n const overlayElement = overlayRef.overlayElement;\r\n overlayElement.setAttribute('role', 'dialog');\r\n\r\n if (labelId) {\r\n overlayElement.setAttribute('aria-labelledby', labelId);\r\n }\r\n\r\n if (isDialog) {\r\n overlayElement.setAttribute('aria-modal', 'true');\r\n }\r\n\r\n this._getCloseStream(overlayRef).subscribe((event: { preventDefault: VoidFunction }) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n this.close();\r\n });\r\n\r\n this._componentRef = overlayRef.attach(portal);\r\n this._forwardContentValues(this._componentRef.instance);\r\n\r\n // Update the position once the calendar has rendered. Only relevant in dropdown mode.\r\n if (!isDialog) {\r\n afterNextRender(\r\n () => {\r\n overlayRef.updatePosition();\r\n },\r\n { injector: this._injector }\r\n );\r\n\r\n }\r\n }\r\n\r\n /** Destroys the current overlay. */\r\n private _destroyOverlay(): void {\r\n if (this._overlayRef) {\r\n this._overlayRef.dispose();\r\n this._overlayRef = this._componentRef = null;\r\n }\r\n }\r\n\r\n /** Gets a position strategy that will open the calendar as a dropdown. */\r\n private _getDialogStrategy(): GlobalPositionStrategy {\r\n return this._overlay.position().global().centerHorizontally().centerVertically();\r\n }\r\n\r\n /** Gets a position strategy that will open the calendar as a dropdown. */\r\n private _getDropdownStrategy(): FlexibleConnectedPositionStrategy {\r\n const strategy = this._overlay\r\n .position()\r\n .flexibleConnectedTo(this.datetimepickerInput.getConnectedOverlayOrigin())\r\n .withTransformOriginOn('.cmat-datetimepicker-content')\r\n .withFlexibleDimensions(false)\r\n .withViewportMargin(8)\r\n .withLockedPosition();\r\n\r\n return this._setConnectedPositions(strategy);\r\n }\r\n\r\n /**\r\n * Sets the positions of the datetimepicker in dropdown mode based on the current configuration.\r\n */\r\n private _setConnectedPositions(strategy: FlexibleConnectedPositionStrategy): FlexibleConnectedPositionStrategy {\r\n const primaryX = this.xPosition === 'end' ? 'end' : 'start';\r\n const secondaryX = primaryX === 'start' ? 'end' : 'start';\r\n const primaryY = this.yPosition === 'above' ? 'bottom' : 'top';\r\n const secondaryY = primaryY === 'top' ? 'bottom' : 'top';\r\n\r\n return strategy.withPositions([\r\n {\r\n originX: primaryX,\r\n originY: secondaryY,\r\n overlayX: primaryX,\r\n overlayY: primaryY,\r\n },\r\n {\r\n originX: primaryX,\r\n originY: primaryY,\r\n overlayX: primaryX,\r\n overlayY: secondaryY,\r\n },\r\n {\r\n originX: secondaryX,\r\n originY: secondaryY,\r\n overlayX: secondaryX,\r\n overlayY: primaryY,\r\n },\r\n {\r\n originX: secondaryX,\r\n originY: primaryY,\r\n overlayX: secondaryX,\r\n overlayY: secondaryY,\r\n },\r\n ]);\r\n }\r\n\r\n /** Gets an observable that will emit when the overlay is supposed to be closed. */\r\n private _getCloseStream(overlayRef: OverlayRef): any {\r\n return merge(\r\n overlayRef.backdropClick(),\r\n overlayRef.detachments(),\r\n overlayRef.keydownEvents().pipe(\r\n filter(event =>\r\n // Closing on alt + up is only valid when there's an input associated with the datetimepicker.\r\n (\r\n (event.code === 'Escape' && !hasModifierKey(event)) ||\r\n (this.datetimepickerInput &&\r\n hasModifierKey(event, 'altKey') &&\r\n event.code === 'ArrowUp')\r\n )\r\n )\r\n )\r\n );\r\n }\r\n}\r\n","<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { AfterContentInit, Directive, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, Output, inject } from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n ControlValueAccessor,\r\n NG_VALIDATORS,\r\n NG_VALUE_ACCESSOR,\r\n ValidationErrors,\r\n Validator,\r\n ValidatorFn,\r\n Validators\r\n} from '@angular/forms';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\r\nimport { Subscription } from 'rxjs';\r\nimport { DatetimeAdapter, CMAT_DATETIME_FORMATS, CmatDatetimeFormats } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerComponent } from './datetimepicker';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\n\r\nexport const CMAT_DATETIMEPICKER_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDatetimepickerInputDirective),\r\n multi: true\r\n};\r\n\r\nexport const CMAT_DATETIMEPICKER_VALIDATORS: any = {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => CmatDatetimepickerInputDirective),\r\n multi: true\r\n};\r\n\r\n/**\r\n * An event used for datepicker input and change events. We don't always have access to a native\r\n * input or change event because the event may have been triggered by the user clicking on the\r\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\r\n */\r\nexport class CmatDatetimepickerInputEvent<D> {\r\n /** The new value for the target datepicker input. */\r\n value: D | null;\r\n\r\n constructor(public target: CmatDatetimepickerInputDirective<D>, public targetElement: HTMLElement) {\r\n this.value = this.target.value;\r\n }\r\n}\r\n\r\n/** Directive used to connect an input to a MatDatepicker. */\r\n@Directive({\r\n selector: 'input[cmatDatetimepicker]',\r\n providers: [\r\n CMAT_DATETIMEPICKER_VALUE_ACCESSOR,\r\n CMAT_DATETIMEPICKER_VALIDATORS,\r\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CmatDatetimepickerInputDirective },\r\n ],\r\n \r\n host: {\r\n '[attr.aria-haspopup]': 'true',\r\n '[attr.aria-owns]': '(datetimepicker?.opened && datetimepicker.id) || null',\r\n '[attr.min]': 'min ? datetimepicker.toIso8601(min) : null',\r\n '[attr.max]': 'max ? datetimepicker.toIso8601(max) : null',\r\n '[disabled]': 'disabled',\r\n '(input)': 'onInput($event.target.value)',\r\n '(change)': 'onChange()',\r\n '(blur)': 'onBlur()',\r\n '(keydown)': 'onKeydown($event)'\r\n },\r\n exportAs: 'cmatDatepickerInput'\r\n})\r\nexport class CmatDatetimepickerInputDirective<D> implements AfterContentInit, ControlValueAccessor, OnDestroy,\r\n Validator { \r\n /** Emits when a `change` event is fired on this `<input>`. */\r\n @Output() dateChange = new EventEmitter<CmatDatetimepickerInputEvent<D>>();\r\n /** Emits when an `input` event is fired on this `<input>`. */\r\n @Output() dateInput = new EventEmitter<CmatDatetimepickerInputEvent<D>>();\r\n\r\n datetimepicker: CmatDatetimepickerComponent<D>;\r\n dateFilter: (date: D | null, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Emits when the value changes (either due to user input or programmatic change). */\r\n valueChange = new EventEmitter<D | null>();\r\n /** Emits when the disabled state has changed */\r\n disabledChange = new EventEmitter<boolean>();\r\n\r\n private _elementRef = inject(ElementRef);\r\n private _dateAdapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _formField = inject(MatFormField, { optional: true })!;\r\n\r\n private _datepickerSubscription = Subscription.EMPTY;\r\n private _localeSubscription = Subscription.EMPTY;\r\n /** Whether the last value set on the input was valid. */\r\n private _lastValueValid = false;\r\n private _value: D | null;\r\n private _min: D | null;\r\n private _max: D | null;\r\n private _disabled: boolean;\r\n\r\n \r\n\r\n constructor() {\r\n const _dateAdapter = this._dateAdapter;\r\n\r\n if (!this._dateAdapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n // Update the displayed date when the locale changes.\r\n this._localeSubscription = _dateAdapter.localeChanges.subscribe();\r\n }\r\n\r\n /** The datepicker that this input is associated with. */\r\n @Input()\r\n set cmatDatetimepicker(value: CmatDatetimepickerComponent<D>) {\r\n this._registerDatetimepicker(value);\r\n }\r\n\r\n @Input() set cmatDatepickerFilter(filter: (date: D | null, type: CmatDatetimepickerFilterType) => boolean) {\r\n this.dateFilter = filter;\r\n this._validatorOnChange();\r\n }\r\n\r\n\r\n\r\n /** The value of the input. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get value(): D | null {\r\n return this._value;\r\n }\r\n\r\n set value(value: D | null) {\r\n value = this._dateAdapter.deserialize(value);\r\n this._lastValueValid = !value || this._dateAdapter.isValid(value);\r\n value = this._dateAdapter.getValidDateOrNull(value);\r\n const oldDate = this.value;\r\n this._value = value;\r\n this._formatValue(value);\r\n\r\n // use timeout to ensure the datetimepicker is instantiated and we get the correct format\r\n setTimeout(() => {\r\n if (!this._dateAdapter.sameDatetime(oldDate, value)) {\r\n this.valueChange.emit(value);\r\n }\r\n });\r\n }\r\n\r\n /** The minimum valid date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get min(): D | null {\r\n return this._min;\r\n }\r\n\r\n set min(value: D | null) {\r\n this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\r\n this._validatorOnChange();\r\n }\r\n\r\n /** The maximum valid date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get max(): D | null {\r\n return this._max;\r\n }\r\n\r\n set max(value: D | null) {\r\n this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\r\n this._validatorOnChange();\r\n }\r\n\r\n /** Whether the datepicker-input is disabled. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get disabled(): boolean {\r\n return !!this._disabled;\r\n }\r\n\r\n set disabled(value: any) {\r\n const newValue = coerceBooleanProperty(value);\r\n\r\n if (this._disabled !== newValue) {\r\n this._disabled = newValue;\r\n this.disabledChange.emit(newValue);\r\n }\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (this.datetimepicker) {\r\n this._datepickerSubscription = this.datetimepicker.selectedChanged.subscribe((selected: D) => {\r\n this.value = selected;\r\n this._cvaOnChange(selected);\r\n this._onTouched();\r\n this.dateInput.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n });\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._datepickerSubscription.unsubscribe();\r\n this._localeSubscription.unsubscribe();\r\n this.valueChange.complete();\r\n this.disabledChange.complete();\r\n }\r\n\r\n registerOnValidatorChange(fn:VoidFunction): void {\r\n this._validatorOnChange = fn;\r\n }\r\n\r\n validate(c: AbstractControl): ValidationErrors | null {\r\n return this._validator ? this._validator(c) : null;\r\n }\r\n\r\n /**\r\n * Gets the element that the datepicker popup should be connected to.\r\n *\r\n * @return The element to connect the popup to.\r\n */\r\n getConnectedOverlayOrigin(): ElementRef {\r\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\r\n }\r\n\r\n /** Gets the ID of an element that should be used a description for the calendar overlay. */\r\n getOverlayLabelId(): string | null {\r\n if (this._formField) {\r\n return this._formField.getLabelId();\r\n }\r\n\r\n return this._elementRef.nativeElement.getAttribute('aria-labelledby');\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n writeValue(value: D): void {\r\n this.value = value;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n registerOnChange(fn: (value: any) => void): void {\r\n this._cvaOnChange = fn;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n registerOnTouched(fn: VoidFunction): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n setDisabledState(disabled: boolean): void {\r\n this.disabled = disabled;\r\n }\r\n\r\n onKeydown(event: KeyboardEvent): void {\r\n if (event.altKey && event.code === 'ArrowDown') {\r\n this.datetimepicker.open();\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n onInput(value: string): void {\r\n let date = this._dateAdapter.parse(value, this._getParseFormat());\r\n this._lastValueValid = !date || this._dateAdapter.isValid(date);\r\n date = this._dateAdapter.getValidDateOrNull(date);\r\n this._value = date;\r\n this._cvaOnChange(date);\r\n this.valueChange.emit(date);\r\n this.dateInput.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n }\r\n\r\n onChange(): void {\r\n this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n }\r\n\r\n /** Handles blur events on the input. */\r\n onBlur(): void {\r\n // Reformat the input only if we have a valid value.\r\n if (this.value) {\r\n this._formatValue(this.value);\r\n }\r\n\r\n this._onTouched();\r\n }\r\n\r\n /** Returns the palette used by the input's form field, if any. */\r\n getThemePalette(): ThemePalette {\r\n return this._formField ? this._formField.color : undefined;\r\n }\r\n\r\n private _registerDatetimepicker(value: CmatDatetimepickerComponent<D>): void {\r\n if (value) {\r\n this.datetimepicker = value;\r\n this.datetimepicker.registerInput(this);\r\n }\r\n }\r\n\r\n private _getDisplayFormat(): any {\r\n switch (this.datetimepicker.type) {\r\n case 'date':\r\n return this._dateFormats.display.dateInput;\r\n case 'datetime':\r\n return this._dateFormats.display.datetimeInput;\r\n case 'time':\r\n return this._dateFormats.display.timeInput;\r\n case 'month':\r\n return this._dateFormats.display.monthInput;\r\n case 'year':\r\n return this._dateFormats.display.yearInput;\r\n }\r\n }\r\n\r\n private _getParseFormat(): any {\r\n let parseFormat: any;\r\n\r\n switch (this.datetimepicker.type) {\r\n case 'date':\r\n parseFormat = this._dateFormats.parse.dateInput;\r\n break;\r\n case 'datetime':\r\n parseFormat = this._dateFormats.parse.datetimeInput;\r\n break;\r\n case 'time':\r\n parseFormat = this._dateFormats.parse.timeInput;\r\n break;\r\n case 'month':\r\n parseFormat = this._dateFormats.parse.monthInput;\r\n break;\r\n case 'year':\r\n parseFormat = this._dateFormats.parse.yearInput;\r\n break;\r\n }\r\n parseFormat ??= this._dateFormats.parse.dateInput;\r\n\r\n return parseFormat;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onTouched = (): void => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _cvaOnChange: (value: any) => void = () => {};\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _validatorOnChange = (): void => { };\r\n\r\n /** The form control validator for whether the input parses. */\r\n private _parseValidator: ValidatorFn = (): ValidationErrors | null => this._lastValueValid ?\r\n null : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };\r\n\r\n /** The form control validator for the min date. */\r\n private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return (!this.min || !controlValue ||\r\n (this._dateAdapter.compareDatetime(this.min, controlValue) as number) <= 0) ?\r\n null : { 'matDatepickerMin': { 'min': this.min, 'actual': controlValue } };\r\n };\r\n\r\n /** The form control validator for the max date. */\r\n private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return (!this.max || !controlValue ||\r\n (this._dateAdapter.compareDatetime(this.max, controlValue) as number) >= 0) ?\r\n null : { 'matDatepickerMax': { 'max': this.max, 'actual': controlValue } };\r\n };\r\n\r\n /** The form control validator for the date filter. */\r\n private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return !this.dateFilter || !controlValue || this.dateFilter(controlValue, CmatDatetimepickerFilterType.DATE) ?\r\n null : { 'matDatepickerFilter': true };\r\n };\r\n\r\n /** The combined form control validator for this input. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n private _validator: ValidatorFn | null =\r\n Validators.compose(\r\n [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);\r\n\r\n /** Formats a value and sets it on the input element. */\r\n private _formatValue(value: D | null): void {\r\n this._elementRef.nativeElement.value =\r\n value ? this._dateAdapter.format(value, this._getDisplayFormat()) : '';\r\n }\r\n}\r\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Directive, HostBinding, Input, OnChanges, OnDestroy, SimpleChanges, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButton, MatButtonModule } from '@angular/material/button';\r\nimport { merge, of as observableOf, Subscription } from 'rxjs';\r\nimport { CmatDatetimepickerComponent } from './datetimepicker';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\n\r\n\r\n/** Can be used to override the icon of a `cmatDatetimepickerToggle`. */\r\n@Directive({\r\n selector: '[cmatDatetimepickerToggleIcon]'\r\n})\r\nexport class CmatDatetimepickerToggleIconDirective { }\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-toggle',\r\n templateUrl: 'datetimepicker-toggle.html',\r\n exportAs: 'cmatDatetimepickerToggle',\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [MatButtonModule]\r\n})\r\nexport class CmatDatetimepickerToggleComponent<D> implements AfterContentInit, OnChanges, OnDestroy {\r\n /** Datepicker instance that the button will toggle. */\r\n // eslint-disable-next-line @angular-eslint/no-input-rename\r\n @Input('for') datetimepicker: CmatDatetimepickerComponent<D>;\r\n /** Tabindex for the toggle. */\r\n @Input() tabIndex!: number;\r\n\r\n /** Screen-reader label for the button. */\r\n @Input('aria-label') ariaLabel?: string;\r\n\r\n /** Whether ripples on the toggle should be disabled. */\r\n @Input() disableRipple!: boolean;\r\n\r\n /** Custom icon set by the consumer. */\r\n @ContentChild(CmatDatetimepickerToggleIconDirective) customIcon!: CmatDatetimepickerToggleIconDirective;\r\n\r\n /** Underlying button element. */\r\n @ViewChild('button') button!: MatButton;\r\n\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-toggle';\r\n\r\n protected intl = inject(CmatDatetimepickerIntl);\r\n\r\n private _stateChanges = Subscription.EMPTY;\r\n private _disabled: boolean;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n\r\n /** Whether the toggle button is disabled. */\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled === undefined ? this.datetimepicker.disabled : !!this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['datepicker']) {\r\n this._watchStateChanges();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._stateChanges.unsubscribe();\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._watchStateChanges();\r\n }\r\n\r\n open(event: Event): void {\r\n if (this.datetimepicker && !this.disabled) {\r\n this.datetimepicker.open();\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n private _watchStateChanges(): void {\r\n const datepickerDisabled = this.datetimepicker ? this.datetimepicker.disabledChange : observableOf();\r\n const inputDisabled = this.datetimepicker?.datetimepickerInput ?\r\n this.datetimepicker.datetimepickerInput.disabledChange : observableOf();\r\n\r\n this._stateChanges.unsubscribe();\r\n this._stateChanges = merge([this.intl.changes, datepickerDisabled, inputDisabled])\r\n .subscribe(() => this._changeDetectorRef.markForCheck());\r\n }\r\n}\r\n","<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;IACY;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AAAE,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AAAE,IAAA,4BAAA,CAAA,4BAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACtB,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,GAAA,EAAA,CAAA,CAAA;;ACKjC,MAAM,YAAY,GAAG;AACrB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,iBAAiB,GAAG;AAEjC;;AAEG;MAUU,gCAAgC,CAAA;AAgC3C,IAAA,WAAA,GAAA;AA/BU,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAQ;QAGzC,IAAA,CAAA,QAAQ,GAAW,CAAC;QACpB,IAAA,CAAA,UAAU,GAAY,KAAK;;AAE1B,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAK;AACtC,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,YAAY,EAAK;QAC7B,IAAA,CAAA,IAAI,GAAG,OAAO;QACb,IAAA,CAAA,KAAK,GAAG,2BAA2B;;QAGzD,IAAA,CAAA,KAAK,GAAU,EAAE;QACjB,IAAA,CAAA,OAAO,GAAU,EAAE;;QAEnB,IAAA,CAAA,QAAQ,GAAY,IAAI;AAIhB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAqB,eAAe,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-components-material-datetimepicker.mjs","sources":["../../../projects/cmat/components/material-datetimepicker/datetimepicker-filtertype.ts","../../../projects/cmat/components/material-datetimepicker/clock.ts","../../../projects/cmat/components/material-datetimepicker/clock.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker-errors.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-intl.ts","../../../projects/cmat/components/material-datetimepicker/calendar-body.ts","../../../projects/cmat/components/material-datetimepicker/calendar-body.html","../../../projects/cmat/components/material-datetimepicker/month-view.ts","../../../projects/cmat/components/material-datetimepicker/month-view.html","../../../projects/cmat/components/material-datetimepicker/multi-year-view.ts","../../../projects/cmat/components/material-datetimepicker/multi-year-view.html","../../../projects/cmat/components/material-datetimepicker/time.ts","../../../projects/cmat/components/material-datetimepicker/time.html","../../../projects/cmat/components/material-datetimepicker/year-view.ts","../../../projects/cmat/components/material-datetimepicker/year-view.html","../../../projects/cmat/components/material-datetimepicker/calendar.ts","../../../projects/cmat/components/material-datetimepicker/calendar.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-content.html","../../../projects/cmat/components/material-datetimepicker/datetimepicker-input.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-toggle.ts","../../../projects/cmat/components/material-datetimepicker/datetimepicker-toggle.html","../../../projects/cmat/components/material-datetimepicker/cmat-components-material-datetimepicker.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nexport enum CmatDatetimepickerFilterType {\r\n DATE, HOUR, MINUTE\r\n}\r\n","import { NgStyle } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatClockView } from './datetimepicker-types';\r\n\r\nexport const CLOCK_RADIUS = 50;\r\nexport const CLOCK_INNER_RADIUS = 27.5;\r\nexport const CLOCK_OUTER_RADIUS = 41.25;\r\nexport const CLOCK_TICK_RADIUS = 7.0833;\r\n\r\n/**\r\n * A clock that is used as part of the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-clock',\r\n templateUrl: 'clock.html',\r\n styleUrls: ['clock.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerClock',\r\n imports: [NgStyle]\r\n})\r\nexport class CmatDatetimepickerClockComponent<D> implements AfterContentInit {\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n @Input() interval: number = 1;\r\n @Input() twelvehour: boolean = false;\r\n /** Emits when the currently selected date changes. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n @Output() activeDateChange = new EventEmitter<D>();\r\n @HostBinding('role') role = 'clock';\r\n @HostBinding('class') class = 'cmat-datetimepicker-clock';\r\n\r\n /** Hours and Minutes representing the clock view. */\r\n hours: any[] = [];\r\n minutes: any[] = [];\r\n /** Whether the clock is in hour view. */\r\n hourView: boolean = true;\r\n selectedHour: number;\r\n selectedMinute: number;\r\n\r\n private _element = inject(ElementRef);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter);\r\n\r\n private _timeChanged = false;\r\n private _mouseMoveListener: any;\r\n private _mouseUpListener: any;\r\n private _activeDate: D;\r\n private _selected: D | null;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n\r\n\r\n constructor() {\r\n this._mouseMoveListener = (event: any): void => {\r\n this.handleMousemove(event);\r\n };\r\n this._mouseUpListener = (): void => {\r\n this.handleMouseup();\r\n };\r\n }\r\n\r\n /**\r\n * The date to display in this clock view.\r\n */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n if (!this._adapter.sameMinute(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n }\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n if (this._selected) {\r\n this.activeDate = this._selected;\r\n }\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n /** Whether the clock should be started in hour or minute view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n set startView(value: CmatClockView) {\r\n this.hourView = value !== 'minute';\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hand(): any {\r\n let hour = this._adapter.getHour(this.activeDate);\r\n if (this.twelvehour) {\r\n if (hour === 0) {\r\n hour = 24;\r\n }\r\n this.selectedHour = hour > 12 ? (hour - 12) : hour;\r\n } else {\r\n this.selectedHour = hour;\r\n }\r\n this.selectedMinute = this._adapter.getMinute(this.activeDate);\r\n let deg;\r\n let radius = CLOCK_OUTER_RADIUS;\r\n if (this.hourView) {\r\n const outer = this.selectedHour > 0 && this.selectedHour < 13;\r\n radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;\r\n if (this.twelvehour) {\r\n radius = CLOCK_OUTER_RADIUS;\r\n }\r\n deg = Math.round(this.selectedHour * (360 / (24 / 2)));\r\n } else {\r\n deg = Math.round(this.selectedMinute * (360 / 60));\r\n }\r\n return {\r\n 'transform': `rotate(${deg}deg)`,\r\n 'height': `${radius}%`,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n 'margin-top': `${50 - radius}%`\r\n };\r\n }\r\n\r\n @HostListener('mousedown', ['$event'])\r\n /** Handles mousedown events on the clock body. */\r\n handleMousedown(event: MouseEvent): void {\r\n this._timeChanged = false;\r\n this._setTime(event);\r\n\r\n document.addEventListener('mousemove', this._mouseMoveListener);\r\n document.addEventListener('touchmove', this._mouseMoveListener);\r\n document.addEventListener('mouseup', this._mouseUpListener);\r\n document.addEventListener('touchend', this._mouseUpListener);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this.activeDate = this._activeDate || this._adapter.today();\r\n this._init();\r\n }\r\n\r\n handleMousemove(event: any): void {\r\n event.preventDefault();\r\n this._setTime(event);\r\n }\r\n\r\n handleMouseup(): void {\r\n document.removeEventListener('mousemove', this._mouseMoveListener);\r\n document.removeEventListener('touchmove', this._mouseMoveListener);\r\n document.removeEventListener('mouseup', this._mouseUpListener);\r\n document.removeEventListener('touchend', this._mouseUpListener);\r\n if (this._timeChanged) {\r\n this.selectedChange.emit(this.activeDate);\r\n if (!this.hourView) {\r\n this.userSelection.emit();\r\n }\r\n }\r\n }\r\n\r\n /** Initializes this clock view. */\r\n private _init(): void {\r\n this.hours.length = 0;\r\n this.minutes.length = 0;\r\n\r\n const hourNames = this._adapter.getHourNames();\r\n const minuteNames = this._adapter.getMinuteNames();\r\n\r\n if (this.twelvehour) {\r\n for (let i = 1; i < (hourNames.length / 2) + 1; i++) {\r\n const radian = i / 6 * Math.PI;\r\n const radius = CLOCK_OUTER_RADIUS;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), i + 1, 0);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate) as number) <= 0);\r\n this.hours.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : hourNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS\r\n });\r\n }\r\n } else {\r\n for (let i = 0; i < hourNames.length; i++) {\r\n const radian = i / 6 * Math.PI;\r\n const outer = i > 0 && i < 13;\r\n const radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), i, 0);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate, false) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate, false) as number) <= 0) &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.HOUR));\r\n this.hours.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : hourNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS,\r\n fontSize: i > 0 && i < 13 ? '' : '80%'\r\n });\r\n }\r\n }\r\n\r\n for (let i = 0; i < minuteNames.length; i += 5) {\r\n const radian = i / 30 * Math.PI;\r\n const date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), i);\r\n const enabled =\r\n (!this.minDate || (this._adapter.compareDatetime(date, this.minDate) as number) >= 0) &&\r\n (!this.maxDate || (this._adapter.compareDatetime(date, this.maxDate) as number) <= 0) &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.MINUTE));\r\n this.minutes.push({\r\n value: i,\r\n displayValue: i === 0 ? '00' : minuteNames[i],\r\n enabled: enabled,\r\n top: CLOCK_RADIUS - Math.cos(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS,\r\n left: CLOCK_RADIUS + Math.sin(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Set Time\r\n *\r\n * @param event\r\n */\r\n private _setTime(event: any): void {\r\n const trigger = this._element.nativeElement;\r\n const triggerRect = trigger.getBoundingClientRect();\r\n const width = trigger.offsetWidth;\r\n const height = trigger.offsetHeight;\r\n const pageX = event.pageX !== undefined ? event.pageX : event.touches[0].pageX;\r\n const pageY = event.pageY !== undefined ? event.pageY : event.touches[0].pageY;\r\n const x = (width / 2) - (pageX - triggerRect.left - window.scrollX);\r\n const y = (height / 2) - (pageY - triggerRect.top - window.scrollY); let radian = Math.atan2(-x, y);\r\n const unit = Math.PI / (this.hourView ? 6 : (this.interval ? (30 / this.interval) : 30));\r\n const z = Math.sqrt(x * x + y * y);\r\n const outer = this.hourView && z > ((width * (CLOCK_OUTER_RADIUS / 100)) +\r\n (width * (CLOCK_INNER_RADIUS / 100))) / 2;\r\n\r\n if (radian < 0) {\r\n radian = Math.PI * 2 + radian;\r\n }\r\n let value = Math.round(radian / unit);\r\n\r\n let date: D;\r\n if (this.hourView) {\r\n if (this.twelvehour) {\r\n value = value === 0 ? 12 : value;\r\n } else {\r\n if (value === 12) {\r\n value = 0;\r\n }\r\n value = outer ? (value === 0 ? 12 : value) : value === 0 ? 0 : value + 12;\r\n }\r\n date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), value, this._adapter.getMinute(this.activeDate));\r\n } else {\r\n if (this.interval) {\r\n value *= this.interval;\r\n }\r\n if (value === 60) {\r\n value = 0;\r\n }\r\n date = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);\r\n }\r\n\r\n this._timeChanged = true;\r\n this.activeDate = date;\r\n this.activeDateChange.emit(this.activeDate);\r\n }\r\n\r\n}\r\n\r\n","<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>","\r\nexport function createMissingDateImplError(provider: string): Error {\r\n return Error(\r\n `CmatDatetimepickerComponent: No provider found for ${provider}. You must import one of the following ` +\r\n 'modules at your application root: CMatNativeDatetimeModule or provide a ' +\r\n 'custom implementation.');\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CmatDatetimepickerIntl {\r\n /**\r\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\r\n * changed after initialization.\r\n */\r\n readonly changes = new Subject<void>();\r\n\r\n /** A label for the calendar popup (used by screen readers). */\r\n calendarLabel = '日历';\r\n\r\n /** A label for the button used to open the calendar popup (used by screen readers). */\r\n openCalendarLabel = '打开日历';\r\n\r\n /** Label for the button used to close the calendar popup. */\r\n closeCalendarLabel = '关闭日历';\r\n\r\n /** A label for the previous month button (used by screen readers). */\r\n prevMonthLabel = '上个月';\r\n\r\n /** A label for the next month button (used by screen readers). */\r\n nextMonthLabel = '下个月';\r\n\r\n /** A label for the previous year button (used by screen readers). */\r\n prevYearLabel = '去年';\r\n\r\n /** A label for the next year button (used by screen readers). */\r\n nextYearLabel = '明年';\r\n\r\n /** A label for the previous multi-year button (used by screen readers). */\r\n prevMultiYearLabel = '过去24年';\r\n\r\n /** A label for the next multi-year button (used by screen readers). */\r\n nextMultiYearLabel = '未来24年';\r\n\r\n /** A label for the 'switch to month view' button (used by screen readers). */\r\n switchToMonthViewLabel = '选择日期';\r\n\r\n /** A label for the 'switch to year view' button (used by screen readers). */\r\n switchToYearViewLabel = '选择月份';\r\n\r\n /** A label for the 'switch to multi-year view' button (used by screen readers). */\r\n switchToMultiYearViewLabel = '选择年月';\r\n\r\n /** A label for the first date of a range of dates (used by screen readers). */\r\n startDateLabel = '开始日期';\r\n\r\n /** A label for the last date of a range of dates (used by screen readers). */\r\n endDateLabel = '结束日期';\r\n\r\n /** A label for the 'switch to clock hour view' button (used by screen readers). */\r\n switchToClockHourViewLabel = '选择小时';\r\n\r\n /** A label for the 'switch to clock minute view' button (used by screen readers). */\r\n switchToClockMinuteViewLabel = '选择分钟';\r\n\r\n /** Label used for ok button within the manual time input. */\r\n okLabel = '确认';\r\n\r\n /** Label used for cancel button within the manual time input. */\r\n cancelLabel = '取消';\r\n /** Formats a range of years (used for visuals). */\r\n formatYearRange(start: string, end: string): string {\r\n return `${start} \\u2013 ${end}`;\r\n }\r\n\r\n /** Formats a label for a range of years (used by screen readers). */\r\n formatYearRangeLabel(start: string, end: string): string {\r\n return `${start} to ${end}`;\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';\r\n\r\n\r\n/**\r\n * An internal class that represents the data corresponding to a single calendar cell.\r\n */\r\nexport class CmatDatetimepickerCalendarCellComponent {\r\n constructor(public value: number,\r\n public displayValue: string,\r\n public ariaLabel: string,\r\n public enabled: boolean) {\r\n }\r\n}\r\n\r\n/**\r\n * An internal component used to display calendar data in a table.\r\n */\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: '[cmat-datetimepicker-calendar-body]',\r\n templateUrl: 'calendar-body.html',\r\n styleUrls: ['calendar-body.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerCalendarBody',\r\n imports: []\r\n})\r\nexport class CmatDatetimepickerCalendarBodyComponent {\r\n /** The label for the table. (e.g. \"Jan 2017\"). */\r\n @Input() label: string;\r\n\r\n /** The cells to display in the table. */\r\n @Input() rows: CmatDatetimepickerCalendarCellComponent[][];\r\n\r\n /** The value in the table that corresponds to today. */\r\n @Input() todayValue: number | null;\r\n\r\n /** The value in the table that is currently selected. */\r\n @Input() selectedValue: number | null;\r\n\r\n /** The minimum number of free cells needed to fit the label in the first row. */\r\n @Input() labelMinRequiredCells: number;\r\n\r\n /** The number of columns in the table. */\r\n @Input() numCols = 7;\r\n\r\n /** Whether to allow selection of disabled cells. */\r\n @Input() allowDisabledSelection = false;\r\n\r\n /** The cell number of the active cell in the table. */\r\n @Input() activeCell = 0;\r\n\r\n /** Emits when a new value is selected. */\r\n @Output() selectedValueChange = new EventEmitter<number>();\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-calendar-body';\r\n\r\n /** The number of blank cells to put at the beginning for the first row. */\r\n get _firstRowOffset(): number {\r\n return this.rows?.length && this.rows[0].length ?\r\n this.numCols - this.rows[0].length : 0;\r\n }\r\n\r\n cellClicked(cell: CmatDatetimepickerCalendarCellComponent): void {\r\n if (!this.allowDisabledSelection && !cell.enabled) {\r\n return;\r\n }\r\n this.selectedValueChange.emit(cell.value);\r\n }\r\n\r\n isActiveCell(rowIndex: number, colIndex: number): boolean {\r\n let cellNumber = rowIndex * this.numCols + colIndex;\r\n\r\n // Account for the fact that the first row may not have as many cells.\r\n if (rowIndex) {\r\n cellNumber -= this._firstRowOffset;\r\n }\r\n\r\n return cellNumber === this.activeCell;\r\n }\r\n}\r\n","<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}","import { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\n\r\nconst DAYS_PER_WEEK = 7;\r\n\r\n/**\r\n * An internal component used to display a single month in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-month-view',\r\n templateUrl: 'month-view.html',\r\n styleUrls:['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerMonthView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent,NgClass]\r\n})\r\nexport class CmatDatetimepickerMonthViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new date is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n\r\n /** Grid of calendar cells representing the dates of the month. */\r\n weeks: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The number of blank cells in the first row before the 1st of the month. */\r\n firstWeekOffset: number;\r\n /**\r\n * The date of the month that the currently selected Date falls on.\r\n * Null if the currently selected Date is in another month.\r\n */\r\n selectedDate: number | null;\r\n /** The date of the month that today falls on. Null if today is in another month. */\r\n todayDate: number | null;\r\n /** The names of the weekdays. */\r\n weekdays: { long: string; narrow: string }[];\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _elementRef = inject(ElementRef);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n const firstDayOfWeek = this.adapter.getFirstDayOfWeek();\r\n const narrowWeekdays = this.adapter.getDayOfWeekNames('narrow');\r\n const longWeekdays = this.adapter.getDayOfWeekNames('long');\r\n\r\n // Rotate the labels for days of the week based on the configured first day of the week.\r\n const weekdays = longWeekdays.map((long, i) => ({ long, narrow: narrowWeekdays[i] }));\r\n this.weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n\r\n /**\r\n * The date to display in this month view (everything other than the month and year is ignored).\r\n */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !this.adapter.sameMonthAndYear(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedDate = this._getDateInCurrentMonth(this.selected);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new date is selected. */\r\n dateSelected(date: number): void {\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), this.adapter.getMonth(this.activeDate),\r\n date, this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n if (this.type === 'date') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n /** Initializes this month view. */\r\n private _init(): void {\r\n this.selectedDate = this._getDateInCurrentMonth(this.selected);\r\n this.todayDate = this._getDateInCurrentMonth(this.adapter.today());\r\n\r\n const firstOfMonth = this.adapter.createDatetime(this.adapter.getYear(this.activeDate),\r\n this.adapter.getMonth(this.activeDate), 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n this.firstWeekOffset =\r\n (DAYS_PER_WEEK + this.adapter.getDayOfWeek(firstOfMonth) -\r\n this.adapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;\r\n\r\n this._createWeekCells();\r\n }\r\n\r\n /** Creates MdCalendarCells for the dates in this month. */\r\n private _createWeekCells(): void {\r\n const daysInMonth = this.adapter.getNumDaysInMonth(this.activeDate);\r\n const dateNames = this.adapter.getDateNames();\r\n this.weeks = [[]];\r\n for (let i = 0, cell = this.firstWeekOffset; i < daysInMonth; i++, cell++) {\r\n if (cell === DAYS_PER_WEEK) {\r\n this.weeks.push([]);\r\n cell = 0;\r\n }\r\n const date = this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate),\r\n this.adapter.getMonth(this.activeDate), i + 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n const enabled = !this.dateFilter ||\r\n this.dateFilter(date);\r\n const ariaLabel = this.adapter.format(date, this._dateFormats.display.dateA11yLabel);\r\n this.weeks[this.weeks.length - 1]\r\n .push(new CmatDatetimepickerCalendarCellComponent(i + 1, dateNames[i], ariaLabel, enabled));\r\n }\r\n }\r\n\r\n /**\r\n * Gets the date in this month that the given Date falls on.\r\n * Returns null if the given Date is in another month.\r\n */\r\n private _getDateInCurrentMonth(date: D): number | null {\r\n return this.adapter.sameMonthAndYear(date, this.activeDate) ?\r\n this.adapter.getDate(date) : null;\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>","\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\nexport const yearsPerPage = 24;\r\n\r\nexport const yearsPerRow = 4;\r\n\r\n/**\r\n * An internal component used to display multiple years in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-multi-year-view',\r\n templateUrl: 'multi-year-view.html',\r\n styleUrls: ['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerMultiYearView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerMultiYearViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new month is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n /** Grid of calendar cells representing the years in the range. */\r\n years: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The label for this year range (e.g. \"2000-2020\"). */\r\n yearLabel: string;\r\n /** The year in this range that today falls on. Null if today is in a different range. */\r\n todayYear: number;\r\n /**\r\n * The year in this range that the selected Date falls on.\r\n * Null if the selected Date is in a different range.\r\n */\r\n selectedYear: number | null;\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _elementRef = inject(ElementRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** The date to display in this multi year view*/\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !isSameMultiYearView(this.adapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\r\n this._init();\r\n\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedYear = this._selected && this.adapter.getYear(this._selected);\r\n }\r\n\r\n\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._getValidDateOrNull(this.adapter.deserialize(value));\r\n }\r\n\r\n\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._getValidDateOrNull(this.adapter.deserialize(value));\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new year is selected. */\r\n yearSelected(year: number): void {\r\n const month = this.adapter.getMonth(this.activeDate);\r\n const normalizedDate = this.adapter.createDatetime(year, month, 1, 0, 0);\r\n\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n year,\r\n month,\r\n Math.min(this.adapter.getDate(this.activeDate),\r\n this.adapter.getNumDaysInMonth(normalizedDate)),\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n\r\n if (this.type === 'year') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n getActiveCell(): number {\r\n return getActiveOffset(this.adapter, this.activeDate, this.minDate, this.maxDate);\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n /** Initializes this year view. */\r\n private _init(): void {\r\n\r\n this.todayYear = this.adapter.getYear(this.adapter.today());\r\n this.yearLabel = this.adapter.getYearName(this.activeDate);\r\n\r\n\r\n const activeYear = this.adapter.getYear(this.activeDate);\r\n\r\n const minYearOfPage = activeYear - getActiveOffset(\r\n this.adapter, this.activeDate, this.minDate, this.maxDate);\r\n\r\n this.years = [];\r\n for (let i = 0, row: number[] = []; i < yearsPerPage; i++) {\r\n row.push(minYearOfPage + i);\r\n if (row.length === yearsPerRow) {\r\n this.years.push(row.map(year => this._createCellForYear(year)));\r\n row = [];\r\n }\r\n }\r\n }\r\n\r\n /** Creates an MatDatetimepickerCalendarCell for the given year. */\r\n private _createCellForYear(year: number): CmatDatetimepickerCalendarCellComponent {\r\n const yearName = this.adapter.getYearName(this.adapter.createDate(year, 0, 1));\r\n return new CmatDatetimepickerCalendarCellComponent(year, yearName, yearName, this._shouldEnableYear(year));\r\n }\r\n\r\n /** Whether the given year is enabled. */\r\n private _shouldEnableYear(year: number): boolean {\r\n // disable if the year is greater than maxDate lower than minDate\r\n if (year === undefined || year === null ||\r\n (this.maxDate && year > this.adapter.getYear(this.maxDate)) ||\r\n (this.minDate && year < this.adapter.getYear(this.minDate))) {\r\n return false;\r\n }\r\n\r\n // enable if it reaches here and there's no filter defined\r\n if (!this.dateFilter) {\r\n return true;\r\n }\r\n\r\n const firstOfYear = this.adapter.createDate(year, 0, 1);\r\n\r\n // If any date in the year is enabled count the year as enabled.\r\n for (let date = firstOfYear; this.adapter.getYear(date) === year;\r\n date = this.adapter.addCalendarDays(date, 1)) {\r\n if (this.dateFilter(date)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * @param obj The object to check.\r\n * @returns The given object if it is both a date instance and valid, otherwise null.\r\n */\r\n private _getValidDateOrNull(obj: any): D | null {\r\n return (this.adapter.isDateInstance(obj) && this.adapter.isValid(obj)) ? obj : null;\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n}\r\n\r\nexport function isSameMultiYearView<D>(\r\n dateAdapter: DatetimeAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean {\r\n const year1 = dateAdapter.getYear(date1);\r\n const year2 = dateAdapter.getYear(date2);\r\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\r\n return Math.floor((year1 - startingYear) / yearsPerPage) ===\r\n Math.floor((year2 - startingYear) / yearsPerPage);\r\n}\r\n\r\n/**\r\n * When the multi-year view is first opened, the active year will be in view.\r\n * So we compute how many years are between the active year and the *slot* where our\r\n * \"startingYear\" will render when paged into view.\r\n */\r\nexport function getActiveOffset<D>(\r\n dateAdapter: DatetimeAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number {\r\n const activeYear = dateAdapter.getYear(activeDate);\r\n return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)),\r\n yearsPerPage);\r\n}\r\n\r\n/**\r\n * We pick a \"starting\" year such that either the maximum year would be at the end\r\n * or the minimum year would be at the beginning of a page.\r\n */\r\nfunction getStartingYear<D>(\r\n dateAdapter: DatetimeAdapter<D>, minDate: D | null, maxDate: D | null): number {\r\n let startingYear = 0;\r\n if (maxDate) {\r\n const maxYear = dateAdapter.getYear(maxDate);\r\n startingYear = maxYear - yearsPerPage + 1;\r\n } else if (minDate) {\r\n startingYear = dateAdapter.getYear(minDate);\r\n }\r\n return startingYear;\r\n}\r\n\r\n/** Gets remainder that is non-negative, even if first number is negative */\r\nfunction euclideanModulo(a: number, b: number): number {\r\n return (a % b + b) % b;\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>","import {\r\n coerceBooleanProperty,\r\n coerceNumberProperty,\r\n NumberInput,\r\n} from '@angular/cdk/coercion';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, Output, SimpleChanges, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { SubscriptionLike } from 'rxjs';\r\nimport { CmatDatetimepickerClockComponent } from './clock';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\nimport { CmatAMPM, CmatClockView } from './datetimepicker-types';\r\n\r\n\r\n\r\nfunction pad(num: NumberInput, size: number): string {\r\n num = String(num);\r\n while (num.length < size) { num = '0' + num; }\r\n return num;\r\n}\r\n\r\n@Directive({\r\n // eslint-disable-next-line @angular-eslint/directive-selector\r\n selector: 'input.cmat-datetimepicker-time-input',\r\n exportAs: 'cmatDatetimepickerTimeInput'\r\n})\r\nexport class CmatDatetimepickerTimeInputDirective implements OnDestroy {\r\n @Input() timeInterval: number = 1;\r\n @Input() timeMin: number = 0;\r\n @Input() timeMax: number = Infinity;\r\n\r\n @Output() timeValueChanged = new EventEmitter<NumberInput>();\r\n\r\n private _element = inject(ElementRef);\r\n private _cdr = inject(ChangeDetectorRef);\r\n\r\n private _value: NumberInput;\r\n\r\n private _keyDownListener = this.keyDownHandler.bind(this);\r\n private _keyPressListener = this.keyPressHandler.bind(this);\r\n private _inputEventListener = this.inputChangedHandler.bind(this);\r\n\r\n\r\n\r\n constructor() {\r\n this.inputElement.addEventListener('keydown', this._keyDownListener, {\r\n passive: true,\r\n });\r\n\r\n // Do not passive since we want to be able to preventDefault()\r\n this.inputElement.addEventListener('keypress', this._keyPressListener);\r\n this.inputElement.addEventListener('input', this._inputEventListener, {\r\n passive: true,\r\n });\r\n }\r\n\r\n get hasFocus(): boolean {\r\n return this._element.nativeElement && this._element?.nativeElement === document?.activeElement;\r\n }\r\n\r\n get inputElement(): HTMLInputElement {\r\n return this._element.nativeElement as HTMLInputElement;\r\n }\r\n\r\n // We look here at the placeholder value, because we write '' into the value on focus\r\n // placeholder should always be up to date with \"currentValue\"\r\n get valid(): boolean {\r\n // At the start _value is undefined therefore this would result in not valid and\r\n // make a ugly warning border afterwards we can safely check\r\n if (this._value) {\r\n const currentValue = String(this.inputElement.value);\r\n\r\n // It can be that currentValue is empty due to we removing the value on focus,\r\n // if that is the case we should check previous value which should be in the placeholder\r\n if (currentValue.length) {\r\n return pad(this._value, 2) === this.inputElement.value;\r\n } else {\r\n return pad(this._value, 2) === this.inputElement.placeholder;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n get invalid(): boolean {\r\n return !this.valid;\r\n }\r\n\r\n @Input()\r\n set timeValue(value: NumberInput) {\r\n this._value = coerceNumberProperty(value);\r\n if (!this.hasFocus) {\r\n this.writeValue(this._value);\r\n }\r\n this.writePlaceholder(this._value);\r\n }\r\n\r\n @HostListener('blur', ['$event'])\r\n blur(): void {\r\n this.writeValue(this._value);\r\n this.writePlaceholder(this._value);\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n @HostListener('focus', ['$event'])\r\n focus(): void {\r\n this.writeValue('');\r\n }\r\n\r\n /**\r\n * Write value to inputElement\r\n *\r\n * @param value NumberInput\r\n */\r\n writeValue(value: NumberInput): void {\r\n if (value !== '') {\r\n this.inputElement.value = pad(value, 2);\r\n } else {\r\n this.inputElement.value = '';\r\n }\r\n this._cdr.markForCheck();\r\n }\r\n\r\n /**\r\n * Writes value to placeholder\r\n *\r\n * @param value NumberInput\r\n */\r\n writePlaceholder(value: NumberInput): void {\r\n this.inputElement.placeholder = pad(value, 2);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n keyDownHandler(event: KeyboardEvent): void {\r\n if (String(this.inputElement.value).length > 0) {\r\n let value: number | null = null;\r\n if (event.code === 'ArrowUp') {\r\n value = coerceNumberProperty(this._value);\r\n value += this.timeInterval;\r\n event.stopPropagation();\r\n } else if (event.code === 'ArrowDown') {\r\n value = coerceNumberProperty(this._value);\r\n value -= this.timeInterval;\r\n event.stopPropagation();\r\n }\r\n\r\n // if value has changed\r\n if (typeof value === 'number') {\r\n this.writeValue(value);\r\n this.writePlaceholder(value);\r\n this.clampInputValue();\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Prevent non number inputs in the inputElement with the exception of Enter/BackSpace\r\n *\r\n * @param event KeyboardEvent\r\n */\r\n keyPressHandler(event: KeyboardEvent): void {\r\n const key = event?.key ?? null;\r\n if (isNaN(Number(key)) && key !== 'Enter') {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n inputChangedHandler(): void {\r\n this.clampInputValue();\r\n this.timeValueChanged.emit(this._value);\r\n }\r\n\r\n clampInputValue(): void {\r\n if (this.inputElement?.value === '') {\r\n return;\r\n }\r\n\r\n const value = coerceNumberProperty(this.inputElement?.value ?? null);\r\n if (value) {\r\n const clampedValue = Math.min(Math.max(value, this.timeMin), this.timeMax);\r\n if (clampedValue !== value) {\r\n this.writeValue(clampedValue);\r\n this.writePlaceholder(clampedValue);\r\n }\r\n this._value = clampedValue;\r\n }\r\n }\r\n\r\n /**\r\n * Remove event listeners on destruction\r\n */\r\n ngOnDestroy(): void {\r\n this.inputElement.removeEventListener('keydown', this._keyDownListener);\r\n this.inputElement.removeEventListener('keypress', this._keyPressListener);\r\n this.inputElement.removeEventListener('input', this._inputEventListener);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-time',\r\n templateUrl: './time.html',\r\n styleUrls: ['time.scss'],\r\n exportAs: 'cmatDatetimepickerTime',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CmatDatetimepickerTimeInputDirective, MatButtonModule, CmatDatetimepickerClockComponent]\r\n})\r\nexport class CmatDatetimepickerTimeComponent<D> implements OnChanges, AfterViewInit, OnDestroy {\r\n /** Emits when the currently selected date changes. */\r\n @Output() readonly selectedChange = new EventEmitter<D>();\r\n\r\n /** Emits when any date changes. */\r\n @Output() readonly activeDateChange = new EventEmitter<D>();\r\n\r\n /** Emits when any date is selected. */\r\n @Output() readonly userSelection = new EventEmitter<void>();\r\n\r\n /** Emits when AM/PM button are clicked. */\r\n @Output() readonly ampmChange = new EventEmitter<CmatAMPM>();\r\n\r\n /** Emits when AM/PM button are clicked. */\r\n @Output() readonly clockViewChange = new EventEmitter<CmatClockView>();\r\n\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter!: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Step over minutes. */\r\n @Input() interval: number = 1;\r\n /** Whether the time is now in AM or PM. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n @Input() AMPM: CmatAMPM = 'AM';\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-time';\r\n\r\n @ViewChild('hourInput', { read: ElementRef<HTMLInputElement> })\r\n protected hourInputElement: ElementRef<HTMLInputElement> | void;\r\n\r\n @ViewChild('hourInput', { read: CmatDatetimepickerTimeInputDirective })\r\n protected hourInputDirective: CmatDatetimepickerTimeInputDirective | void;\r\n\r\n @ViewChild('minuteInput', { read: ElementRef<HTMLInputElement> })\r\n protected minuteInputElement: ElementRef<HTMLInputElement> | void;\r\n\r\n @ViewChild('minuteInput', { read: CmatDatetimepickerTimeInputDirective })\r\n protected minuteInputDirective: CmatDatetimepickerTimeInputDirective | void;\r\n\r\n datetimepickerIntlChangesSubscription: SubscriptionLike;\r\n\r\n protected datetimepickerIntl = inject(CmatDatetimepickerIntl);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n private _twelvehour = false;\r\n private _activeDate!: D;\r\n private _selected!: D | null;\r\n private _minDate!: D | null;\r\n private _maxDate!: D | null;\r\n /** Whether the clock is in hour view. */\r\n private _clockView: CmatClockView = 'hour';\r\n\r\n\r\n\r\n constructor() {\r\n this.datetimepickerIntlChangesSubscription = this.datetimepickerIntl.changes.subscribe(() => {\r\n this._changeDetectorRef.detectChanges();\r\n });\r\n }\r\n\r\n get isHourView(): boolean {\r\n return this._clockView === 'hour';\r\n }\r\n\r\n get isMinuteView(): boolean {\r\n return this._clockView === 'hour';\r\n }\r\n\r\n get hour(): string {\r\n if (!this.activeDate) {\r\n if (this.twelvehour) {\r\n return '12';\r\n } else {\r\n return '00';\r\n }\r\n }\r\n\r\n const hour = Number(this._adapter.getHour(this.activeDate));\r\n if (!this.twelvehour) {\r\n return this.prefixWithZero(hour);\r\n }\r\n\r\n if (hour === 0) {\r\n return '12';\r\n } else {\r\n return this.prefixWithZero(hour > 12 ? hour - 12 : hour);\r\n }\r\n }\r\n\r\n get minute(): string {\r\n if (this.activeDate) {\r\n return this.prefixWithZero(this._adapter.getMinute(this.activeDate));\r\n }\r\n\r\n return '00';\r\n }\r\n\r\n /** Whether the clock uses 12 hour format. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get twelvehour(): boolean {\r\n return this._twelvehour;\r\n }\r\n set twelvehour(value: boolean) {\r\n this._twelvehour = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * The date to display in this clock view.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n set activeDate(value: D) {\r\n this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n }\r\n\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n if (this._selected) {\r\n this.activeDate = this._selected;\r\n }\r\n }\r\n\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));\r\n }\r\n\r\n\r\n /** Whether the clock should be started in hour or minute view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get clockView(): CmatClockView {\r\n return this._clockView;\r\n }\r\n set clockView(value: CmatClockView) {\r\n this._clockView = value;\r\n }\r\n\r\n prefixWithZero(value: number): string {\r\n if (value < 10) {\r\n return '0' + String(value);\r\n }\r\n\r\n return String(value);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // when clockView changes by input we should focus the correct input\r\n if (changes['clockView']) {\r\n if (changes['clockView'].currentValue !== changes['clockView'].previousValue) {\r\n this.focusInputElement();\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.focusInputElement();\r\n }\r\n\r\n focusInputElement(): void {\r\n if (this.clockView === 'hour') {\r\n if (this.hourInputElement) {\r\n (this.hourInputElement.nativeElement).focus();\r\n }\r\n } else {\r\n if (this.minuteInputElement) {\r\n (this.minuteInputElement.nativeElement).focus();\r\n }\r\n }\r\n }\r\n\r\n handleHourInputChange(value: NumberInput): void {\r\n const hour = coerceNumberProperty(value);\r\n if (hour || hour === 0) {\r\n const newValue = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n this.updateHourForAmPm(hour),\r\n this._adapter.getMinute(this.activeDate)\r\n );\r\n\r\n this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);\r\n this.activeDateChange.emit(this.activeDate);\r\n\r\n // If previously we did set [cmatValue]=\"13\" and the input changed to 6, and the clamping will make it \"13\" again\r\n // then the hourInputDirective will not have been updated since \"13\" === \"13\" same reference so no change detected\r\n // by directly setting it within this handler, we handle this usecase\r\n if (this.hourInputDirective) {\r\n this.hourInputDirective.timeValue = this.hour;\r\n }\r\n }\r\n }\r\n\r\n updateHourForAmPm(value: number): number {\r\n if (!this.twelvehour) {\r\n return value;\r\n }\r\n\r\n // value should be between 1-12\r\n if (this.AMPM === 'AM') {\r\n if (value === 0 || value === 12) {\r\n return 0;\r\n }\r\n return value;\r\n }\r\n // PM\r\n else {\r\n if (value === 0 || value === 12) {\r\n return 12;\r\n }\r\n\r\n // other cases, we should add 12 to the value aka 3:00 PM = 3 + 12 = 15:00\r\n return value + 12;\r\n }\r\n }\r\n\r\n handleMinuteInputChange(value: NumberInput): void {\r\n const minute = coerceNumberProperty(value);\r\n if (minute || minute === 0) {\r\n const newValue = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n this._adapter.getHour(this._activeDate),\r\n minute\r\n );\r\n this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);\r\n this.activeDateChange.emit(this.activeDate);\r\n\r\n // If previously we did set [cmatValue]=\"40\" and the input changed to 30, and the clamping will make it \"40\" again\r\n // then the minuteInputDirective will not have been updated since \"40\" === \"40\" same reference so no change detected\r\n // by directly setting it within this handler, we handle this usecase\r\n if (this.minuteInputDirective) {\r\n this.minuteInputDirective.timeValue = this.minute;\r\n }\r\n }\r\n }\r\n\r\n handleFocus(clockView: CmatClockView): void {\r\n this.clockView = clockView;\r\n this.clockViewChange.emit(clockView);\r\n }\r\n\r\n timeSelected(date: D): void {\r\n if (this.clockView === 'hour') {\r\n this.clockView = 'minute';\r\n }\r\n this._activeDate = this.selected = date;\r\n }\r\n\r\n onActiveDateChange(date: D): void {\r\n this._activeDate = date;\r\n this.activeDateChange.emit(date);\r\n }\r\n\r\n handleOk(): void {\r\n if (this._selected) {\r\n this.selectedChange.emit(this._selected);\r\n }\r\n this.userSelection.emit();\r\n }\r\n\r\n handleCancel(): void {\r\n this.userSelection.emit();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.datetimepickerIntlChangesSubscription) {\r\n this.datetimepickerIntlChangesSubscription.unsubscribe();\r\n }\r\n }\r\n}\r\n","<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>","import { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarBodyComponent } from './calendar-body';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerType } from './datetimepicker-types';\r\n\r\n\r\n/**\r\n * An internal component used to display a single year in the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-year-view',\r\n templateUrl: 'year-view.html',\r\n styleUrls: ['datetimepicker-base.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerYearView',\r\n imports: [CmatDatetimepickerCalendarBodyComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerYearViewComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n\r\n @Input() type: CmatDatetimepickerType = 'date';\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D) => boolean;\r\n /** Emits when a new month is selected. */\r\n @Output() selectedChange = new EventEmitter<D>();\r\n\r\n /** Grid of calendar cells representing the months of the year. */\r\n months: CmatDatetimepickerCalendarCellComponent[][];\r\n /** The label for this year (e.g. \"2017\"). */\r\n yearLabel: string;\r\n /** The month in this year that today falls on. Null if today is in a different year. */\r\n todayMonth: number | null;\r\n /**\r\n * The month in this year that the selected Date falls on.\r\n * Null if the selected Date is in a different year.\r\n */\r\n selectedMonth: number | null;\r\n calendarState: string;\r\n\r\n adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n\r\n private _activeDate: D;\r\n private _selected: D;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _elementRef = inject(ElementRef);\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n if (!this.adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._activeDate = this.adapter.today();\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n\r\n /** The date to display in this year view (everything other than the year is ignored). */\r\n @Input()\r\n get activeDate(): D {\r\n return this._activeDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._activeDate;\r\n this._activeDate = value || this.adapter.today();\r\n if (oldActiveDate && this._activeDate &&\r\n !this.adapter.sameYear(oldActiveDate, this._activeDate)) {\r\n this._init();\r\n\r\n if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D) {\r\n this._selected = value;\r\n this.selectedMonth = this._getMonthInCurrentYear(this.selected);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n /** Handles when a new month is selected. */\r\n monthSelected(month: number): void {\r\n const normalizedDate = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, 0, 0);\r\n\r\n this.selectedChange.emit(this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), month,\r\n Math.min(this.adapter.getDate(this.activeDate), this.adapter.getNumDaysInMonth(normalizedDate)),\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)));\r\n if (this.type === 'month') {\r\n this.userSelection.emit();\r\n }\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n\r\n /** Initializes this month view. */\r\n private _init(): void {\r\n this.selectedMonth = this._getMonthInCurrentYear(this.selected);\r\n this.todayMonth = this._getMonthInCurrentYear(this.adapter.today());\r\n this.yearLabel = this.adapter.getYearName(this.activeDate);\r\n\r\n const monthNames = this.adapter.getMonthNames('short');\r\n // First row of months only contains 5 elements so we can fit the year label on the same row.\r\n this.months = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11]].map(row => row.map(\r\n month => this._createCellForMonth(month, monthNames[month])));\r\n }\r\n\r\n /**\r\n * Gets the month in this year that the given Date falls on.\r\n * Returns null if the given Date is in another year.\r\n */\r\n private _getMonthInCurrentYear(date: D): number | null {\r\n return this.adapter.sameYear(date, this.activeDate) ?\r\n this.adapter.getMonth(date) : null;\r\n }\r\n\r\n /** Creates an MdCalendarCell for the given month. */\r\n private _createCellForMonth(month: number, monthName: string): CmatDatetimepickerCalendarCellComponent {\r\n const ariaLabel = this.adapter.format(\r\n this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate)),\r\n this._dateFormats.display.monthYearA11yLabel);\r\n return new CmatDatetimepickerCalendarCellComponent(\r\n month, monthName.toLocaleUpperCase(), ariaLabel, this._isMonthEnabled(month));\r\n }\r\n\r\n /** Whether the given month is enabled. */\r\n private _isMonthEnabled(month: number): boolean {\r\n if (!this.dateFilter) {\r\n return true;\r\n }\r\n\r\n const firstOfMonth = this.adapter.createDatetime(\r\n this.adapter.getYear(this.activeDate), month, 1,\r\n this.adapter.getHour(this.activeDate),\r\n this.adapter.getMinute(this.activeDate));\r\n\r\n // If any date in the month is enabled count the month as enabled.\r\n for (let date = firstOfMonth; this.adapter.getMonth(date) === month;\r\n date = this.adapter.addCalendarDays(date, 1)) {\r\n if (this.dateFilter(date)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n\r\n}\r\n","<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { CMAT_DATETIME_FORMATS, CmatDatetimeFormats, DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { Subscription } from 'rxjs';\r\nimport { CmatDatetimepickerClockComponent } from './clock';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\nimport { CmatAMPM, CmatCalendarView, CmatClockView, CmatDatetimepickerType } from './datetimepicker-types';\r\nimport { CmatDatetimepickerMonthViewComponent } from './month-view';\r\nimport { getActiveOffset, isSameMultiYearView, yearsPerPage, yearsPerRow, CmatDatetimepickerMultiYearViewComponent } from './multi-year-view';\r\nimport { CmatDatetimepickerTimeComponent } from './time';\r\nimport { CmatDatetimepickerYearViewComponent } from './year-view';\r\n\r\n/**\r\n * A calendar that is used as part of the datepicker.\r\n */\r\n@Component({\r\n selector: 'cmat-datetimepicker-calendar',\r\n templateUrl: 'calendar.html',\r\n styleUrls: ['calendar.scss', 'datetimepicker-base.scss'],\r\n host: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.cmat-datetimepicker-calendar-with-time-input]': 'timeInput',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerCalendar',\r\n imports: [MatButtonModule, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerYearViewComponent,\r\n CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerCalendarComponent<D> implements AfterContentInit, OnDestroy {\r\n @Output() userSelection = new EventEmitter<void>();\r\n /** Active multi year view when click on year. */\r\n @Input() multiYearSelector: boolean = false;\r\n /** Whether the calendar should be started in month or year view. */\r\n @Input() startView: CmatCalendarView = 'month';\r\n @Input() twelvehour: boolean = false;\r\n @Input() timeInterval: number = 1;\r\n /** A function used to filter which dates are selectable. */\r\n @Input() dateFilter: (date: D, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Prevent user to select same date time */\r\n @Input() preventSameDateTimeSelection = false;\r\n /** Emits when the currently selected date changes. */\r\n @Output() selectedChange: EventEmitter<D> = new EventEmitter<D>();\r\n /** Emits when the view has been changed. **/\r\n @Output() viewChanged: EventEmitter<CmatCalendarView> = new EventEmitter<CmatCalendarView>();\r\n @HostBinding('class') class = 'cmat-datetimepicker-calendar';\r\n @HostBinding('attr.aria-label') label = 'ariaLabel';\r\n @HostBinding('role') role = 'dialog';\r\n @HostBinding('tabindex') tabindex = 0;\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AMPM: CmatAMPM;\r\n clockView: CmatClockView = 'hour';\r\n calendarState: string;\r\n\r\n /** Whether the calendar is in month view. */\r\n private _elementRef = inject(ElementRef);\r\n private _intl = inject(CmatDatetimepickerIntl);\r\n private _adapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _currentView: CmatCalendarView;\r\n private _intlChanges: Subscription;\r\n private _clampedActiveDate: D;\r\n private _type: CmatDatetimepickerType = 'date';\r\n private _startAt: D | null;\r\n private _selected: D | null;\r\n private _minDate: D | null;\r\n private _maxDate: D | null;\r\n private _timeInput = false;\r\n private _calendarAnimationListener = this.calendarStateDone.bind(this);\r\n constructor() {\r\n const _intl = this._intl;\r\n const changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n if (!this._adapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n this._intlChanges = _intl.changes\r\n .subscribe(() => changeDetectorRef.markForCheck());\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);\r\n }\r\n\r\n @Input()\r\n get type(): CmatDatetimepickerType {\r\n return this._type;\r\n }\r\n\r\n set type(value: CmatDatetimepickerType) {\r\n this._type = value || 'date';\r\n if (this.type === 'year') {\r\n this.multiYearSelector = true;\r\n }\r\n }\r\n\r\n /** A date representing the period (month or year) to start the calendar in. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get startAt(): D | null {\r\n return this._startAt;\r\n }\r\n\r\n set startAt(value: D | null) {\r\n this._startAt = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /**\r\n * Whether the calendar is in time mode. In time mode the calendar clock gets time input elements rather then just clock\r\n *\r\n * When touchUi is enabled this will be disabled\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get timeInput(): boolean {\r\n return this._timeInput;\r\n }\r\n set timeInput(value: boolean) {\r\n this._timeInput = coerceBooleanProperty(value);\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get selected(): D | null {\r\n return this._selected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._selected = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get minDate(): D | null {\r\n return this._minDate;\r\n }\r\n\r\n set minDate(value: D | null) {\r\n this._minDate = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get maxDate(): D | null {\r\n return this._maxDate;\r\n }\r\n\r\n set maxDate(value: D | null) {\r\n this._maxDate = this._adapter.getValidDateOrNull(value);\r\n }\r\n\r\n /**\r\n * The current active date. This determines which time period is shown and which date is\r\n * highlighted when using keyboard navigation.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get activeDate(): D {\r\n return this._clampedActiveDate;\r\n }\r\n\r\n set activeDate(value: D) {\r\n const oldActiveDate = this._clampedActiveDate;\r\n this._clampedActiveDate = this._adapter.clampDate(value, this.minDate, this.maxDate);\r\n if (oldActiveDate && this._clampedActiveDate &&\r\n !this._adapter.sameMonthAndYear(oldActiveDate, this._clampedActiveDate)) {\r\n if (this._adapter.isInNextMonth(oldActiveDate, this._clampedActiveDate)) {\r\n this._changeCalendarState('right');\r\n } else {\r\n this._changeCalendarState('left');\r\n }\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get currentView(): CmatCalendarView {\r\n return this._currentView;\r\n }\r\n\r\n set currentView(view: CmatCalendarView) {\r\n this._currentView = view;\r\n this.viewChanged.emit(view);\r\n }\r\n\r\n /** The label for the current calendar view. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearButtonText(): string {\r\n return this._adapter.getYearName(this.activeDate);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearPeriodText(): string {\r\n\r\n if (this.currentView === 'multi-year') {\r\n // The offset from the active year to the \"slot\" for the starting year is the\r\n // *actual* first rendered year in the multi-year view, and the last year is\r\n // just yearsPerPage - 1 away.\r\n const activeYear = this._adapter.getYear(this.activeDate);\r\n const minYearOfPage = activeYear - getActiveOffset(\r\n this._adapter, this.activeDate, this.minDate, this.maxDate);\r\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\r\n const minYearName =\r\n this._adapter.getYearName(this._adapter.createDate(minYearOfPage, 0, 1));\r\n const maxYearName =\r\n this._adapter.getYearName(this._adapter.createDate(maxYearOfPage, 0, 1));\r\n return this._intl.formatYearRange(minYearName, maxYearName);\r\n }\r\n\r\n return this.currentView === 'month' ? this._adapter.getMonthNames('long')[this._adapter.getMonth(this.activeDate)] :\r\n this._adapter.getYearName(this.activeDate);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get yearButtonLabel(): string {\r\n return this.multiYearSelector\r\n ? this._intl.switchToMultiYearViewLabel\r\n : this._intl.switchToYearViewLabel;\r\n }\r\n\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateButtonText(): string {\r\n switch (this.type) {\r\n case 'month':\r\n return this._adapter.getMonthNames('long')[this._adapter.getMonth(this.activeDate)];\r\n default:\r\n return this._adapter.format(this.activeDate, this._dateFormats.display.popupHeaderDateLabel);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateButtonLabel(): string {\r\n return this._intl.switchToMonthViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hoursButtonText(): string {\r\n let hour = this._adapter.getHour(this.activeDate);\r\n if (this.twelvehour) {\r\n if (hour === 0) {\r\n hour = 24;\r\n }\r\n hour = hour > 12 ? (hour - 12) : hour;\r\n }\r\n return this._2digit(hour);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get hourButtonLabel(): string {\r\n return this._intl.switchToClockHourViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minutesButtonText(): string {\r\n return this._2digit(this._adapter.getMinute(this.activeDate));\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minuteButtonLabel(): string {\r\n return this._intl.switchToClockMinuteViewLabel;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get prevButtonLabel(): string {\r\n switch (this._currentView) {\r\n case 'month':\r\n return this._intl.prevMonthLabel;\r\n case 'year':\r\n return this._intl.prevYearLabel;\r\n case 'multi-year':\r\n return this._intl.prevMultiYearLabel;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get nextButtonLabel(): string {\r\n switch (this._currentView) {\r\n case 'month':\r\n return this._intl.nextMonthLabel;\r\n case 'year':\r\n return this._intl.nextYearLabel;\r\n case 'multi-year':\r\n return this._intl.nextMultiYearLabel;\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n handleCalendarBodyKeydown(event: KeyboardEvent): void {\r\n if (this.currentView === 'month') {\r\n this._handleCalendarBodyKeydownInMonthView(event);\r\n } else if (this.currentView === 'year') {\r\n this._handleCalendarBodyKeydownInYearView(event);\r\n } else if (this.currentView === 'multi-year') {\r\n this._handleCalendarBodyKeydownInMultiYearView(event);\r\n } else {\r\n this._handleCalendarBodyKeydownInClockView(event);\r\n }\r\n }\r\n\r\n /** Date filter for the month and year views. */\r\n dateFilterForViews = (date: D): boolean => !!date &&\r\n (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.DATE)) &&\r\n (!this.minDate || this._adapter.compareDate(date, this.minDate) >= 0) &&\r\n (!this.maxDate || this._adapter.compareDate(date, this.maxDate) <= 0);\r\n\r\n userSelected(): void {\r\n this.userSelection.emit();\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this.activeDate = this.startAt ?? this._adapter.today();\r\n this.selectAMPM(this.activeDate);\r\n this.focusActiveCell();\r\n if (this.type === 'year') {\r\n this.currentView = 'multi-year';\r\n } else if (this.type === 'month') {\r\n this.currentView = 'year';\r\n } else if (this.type === 'time') {\r\n this.currentView = 'clock';\r\n } else {\r\n this.currentView = this.startView || 'month';\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);\r\n\r\n this._intlChanges.unsubscribe();\r\n }\r\n\r\n /** Handles date selection in the month view. */\r\n dateSelected(date: D): void {\r\n if (this.type === 'date') {\r\n if (!this._adapter.sameDate(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n } else {\r\n this.activeDate = date;\r\n this.currentView = 'clock';\r\n }\r\n }\r\n\r\n /** Handles month selection in the year view. */\r\n monthSelected(month: D): void {\r\n if (this.type === 'month') {\r\n if (!this._adapter.sameMonthAndYear(month, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(this._adapter.getFirstDateOfMonth(month));\r\n }\r\n } else {\r\n this.activeDate = month;\r\n this.currentView = 'month';\r\n this.clockView = 'hour';\r\n }\r\n }\r\n\r\n /** Handles year selection in the multi year view. */\r\n yearSelected(year: D): void {\r\n if (this.type === 'year') {\r\n if ((this.selected && !this._adapter.sameYear(year, this.selected)) || !this.preventSameDateTimeSelection) {\r\n const normalizedDate = this._adapter.createDatetime(this._adapter.getYear(year), 0, 1, 0, 0);\r\n this.selectedChange.emit(normalizedDate);\r\n }\r\n } else {\r\n this.activeDate = year;\r\n this.currentView = 'year';\r\n }\r\n }\r\n\r\n timeSelected(date: D): void {\r\n this.activeDate = this.updateDate(date);\r\n if (!this._adapter.sameDatetime(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n }\r\n\r\n dialTimeSelected(date: D): void {\r\n if (this.clockView !== 'minute') {\r\n this.activeDate = this.updateDate(date);\r\n this.clockView = 'minute';\r\n } else {\r\n if (!this._adapter.sameDatetime(date, this.selected) || !this.preventSameDateTimeSelection) {\r\n this.selectedChange.emit(date);\r\n }\r\n }\r\n }\r\n\r\n onActiveDateChange(date: D): void {\r\n this.activeDate = date;\r\n }\r\n\r\n updateDate(date: D): D {\r\n if (this.twelvehour) {\r\n const HOUR = this._adapter.getHour(date);\r\n if (HOUR === 12) {\r\n if (this.AMPM === 'AM') {\r\n return this._adapter.addCalendarHours(date, -12);\r\n }\r\n } else if (this.AMPM === 'PM') {\r\n return this._adapter.addCalendarHours(date, 12);\r\n }\r\n }\r\n return date;\r\n }\r\n\r\n selectAMPM(date: D): void {\r\n if (this._adapter.getHour(date) > 11) {\r\n this.AMPM = 'PM';\r\n } else {\r\n this.AMPM = 'AM';\r\n }\r\n }\r\n\r\n ampmClicked(source: CmatAMPM): void {\r\n this._currentView = 'clock';\r\n\r\n if (source === this.AMPM) {\r\n return;\r\n }\r\n this.AMPM = source;\r\n\r\n // if AMPM changed from PM to AM substract 12 hours\r\n const currentHour = this._adapter.getHour(this.activeDate);\r\n let newHourValue: number;\r\n if (this.AMPM === 'AM') {\r\n newHourValue = currentHour >= 12 ? this._adapter.getHour(this.activeDate) - 12 : 12;\r\n }\r\n // otherwise add 12 hours\r\n else {\r\n newHourValue = (currentHour + 12) % 24;\r\n }\r\n\r\n this.activeDate = this._adapter.createDatetime(\r\n this._adapter.getYear(this.activeDate),\r\n this._adapter.getMonth(this.activeDate),\r\n this._adapter.getDate(this.activeDate),\r\n newHourValue,\r\n this._adapter.getMinute(this.activeDate)\r\n );\r\n }\r\n\r\n yearClicked(): void {\r\n if (this.type === 'year' || this.multiYearSelector) {\r\n this.currentView = 'multi-year';\r\n return;\r\n }\r\n this.currentView = 'year';\r\n }\r\n\r\n dateClicked(): void {\r\n if (this.type !== 'month') {\r\n this.currentView = 'month';\r\n }\r\n }\r\n\r\n hoursClicked(): void {\r\n this.currentView = 'clock';\r\n this.clockView = 'hour';\r\n }\r\n\r\n minutesClicked(): void {\r\n this.currentView = 'clock';\r\n this.clockView = 'minute';\r\n }\r\n\r\n /** Handles user clicks on the previous button. */\r\n previousClicked(): void {\r\n this.activeDate = this.currentView === 'month' ?\r\n this._adapter.addCalendarMonths(this.activeDate, -1) :\r\n this._adapter.addCalendarYears(\r\n this.activeDate, this.currentView === 'year' ? -1 : -yearsPerPage\r\n );\r\n }\r\n\r\n /** Handles user clicks on the next button. */\r\n nextClicked(): void {\r\n this.activeDate = this.currentView === 'month' ?\r\n this._adapter.addCalendarMonths(this.activeDate, 1) :\r\n this._adapter.addCalendarYears(\r\n this.activeDate, this.currentView === 'year' ? 1 : yearsPerPage\r\n );\r\n }\r\n\r\n /** Whether the previous period button is enabled. */\r\n previousEnabled(): boolean {\r\n if (!this.minDate) {\r\n return true;\r\n }\r\n return !this.minDate || !this._isSameView(this.activeDate, this.minDate);\r\n }\r\n\r\n /** Whether the next period button is enabled. */\r\n nextEnabled(): boolean {\r\n return !this.maxDate || !this._isSameView(this.activeDate, this.maxDate);\r\n }\r\n\r\n\r\n focusActiveCell(): void {\r\n this._elementRef.nativeElement.focus();\r\n }\r\n\r\n calendarStateDone(event: AnimationEvent): void {\r\n if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {\r\n this.calendarState = '';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n\r\n /** Whether the two dates represent the same view in the current view mode (month or year). */\r\n private _isSameView(date1: D, date2: D): boolean {\r\n if (this.currentView === 'month') {\r\n return this._adapter.getYear(date1) === this._adapter.getYear(date2) &&\r\n this._adapter.getMonth(date1) === this._adapter.getMonth(date2);\r\n }\r\n if (this.currentView === 'year') {\r\n return this._adapter.getYear(date1) === this._adapter.getYear(date2);\r\n }\r\n // Otherwise we are in 'multi-year' view.\r\n return isSameMultiYearView(\r\n this._adapter, date1, date2, this.minDate, this.maxDate);\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in month view. */\r\n private _handleCalendarBodyKeydownInMonthView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, -7);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate, 7);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate,\r\n 1 - this._adapter.getDate(this.activeDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarDays(this.activeDate,\r\n (this._adapter.getNumDaysInMonth(this.activeDate) -\r\n this._adapter.getDate(this.activeDate)));\r\n break;\r\n case 'PageUp':\r\n this.activeDate = event.altKey ?\r\n this._adapter.addCalendarYears(this.activeDate, -1) :\r\n this._adapter.addCalendarMonths(this.activeDate, -1);\r\n break;\r\n case 'PageDown':\r\n this.activeDate = event.altKey ?\r\n this._adapter.addCalendarYears(this.activeDate, 1) :\r\n this._adapter.addCalendarMonths(this.activeDate, 1);\r\n break;\r\n case 'Enter':\r\n if (this.dateFilterForViews(this.activeDate)) {\r\n this.dateSelected(this.activeDate);\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n return;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in year view. */\r\n private _handleCalendarBodyKeydownInYearView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._prevMonthInSameCol(this.activeDate);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._nextMonthInSameCol(this.activeDate);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate,\r\n -this._adapter.getMonth(this.activeDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarMonths(this.activeDate,\r\n 11 - this._adapter.getMonth(this.activeDate));\r\n break;\r\n case 'PageUp':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(this.activeDate, event.altKey ? -10 : -1);\r\n break;\r\n case 'PageDown':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(this.activeDate, event.altKey ? 10 : 1);\r\n break;\r\n case 'Enter':\r\n this.monthSelected(this.activeDate);\r\n break;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\r\n private _handleCalendarBodyKeydownInMultiYearView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowLeft':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, -1);\r\n break;\r\n case 'ArrowRight':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, 1);\r\n break;\r\n case 'ArrowUp':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, -yearsPerRow);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate, yearsPerRow);\r\n break;\r\n case 'Home':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate,\r\n -getActiveOffset(this._adapter, this.activeDate, this.minDate, this.maxDate));\r\n break;\r\n case 'End':\r\n this.activeDate = this._adapter.addCalendarYears(this.activeDate,\r\n yearsPerPage - getActiveOffset(\r\n this._adapter, this.activeDate, this.minDate, this.maxDate) - 1);\r\n break;\r\n case 'PageUp':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(\r\n this.activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\r\n break;\r\n case 'PageDown':\r\n this.activeDate =\r\n this._adapter.addCalendarYears(\r\n this.activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\r\n break;\r\n case 'Enter':\r\n this.yearSelected(this.activeDate);\r\n break;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n }\r\n\r\n /** Handles keydown events on the calendar body when calendar is in month view. */\r\n private _handleCalendarBodyKeydownInClockView(event: KeyboardEvent): void {\r\n switch (event.code) {\r\n case 'ArrowUp':\r\n this.activeDate = this.clockView === 'hour' ?\r\n this._adapter.addCalendarHours(this.activeDate, 1) :\r\n this._adapter.addCalendarMinutes(this.activeDate, this.timeInterval);\r\n // if the hours changed the am/pm we should update the AM/PM\r\n this.selectAMPM(this.activeDate);\r\n break;\r\n case 'ArrowDown':\r\n this.activeDate = this.clockView === 'hour' ?\r\n this._adapter.addCalendarHours(this.activeDate, -1) :\r\n this._adapter.addCalendarMinutes(this.activeDate, -this.timeInterval);\r\n // if the hours changed the am/pm we should update the AM/PM\r\n this.selectAMPM(this.activeDate);\r\n break;\r\n case 'Enter':\r\n if (!this.timeInput) {\r\n this.dialTimeSelected(this.activeDate);\r\n }\r\n return;\r\n default:\r\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\r\n return;\r\n }\r\n\r\n // Prevent unexpected default actions such as form submission.\r\n event.preventDefault();\r\n }\r\n\r\n /**\r\n * Determine the date for the month that comes before the given month in the same column in the\r\n * calendar table.\r\n */\r\n private _prevMonthInSameCol(date: D): D {\r\n // Determine how many months to jump forward given that there are 2 empty slots at the beginning\r\n // of each year.\r\n const increment = this._adapter.getMonth(date) <= 4 ? -5 :\r\n (this._adapter.getMonth(date) >= 7 ? -7 : -12);\r\n return this._adapter.addCalendarMonths(date, increment);\r\n }\r\n\r\n /**\r\n * Determine the date for the month that comes after the given month in the same column in the\r\n * calendar table.\r\n */\r\n private _nextMonthInSameCol(date: D): D {\r\n // Determine how many months to jump forward given that there are 2 empty slots at the beginning\r\n // of each year.\r\n const increment = this._adapter.getMonth(date) <= 4 ? 7 :\r\n (this._adapter.getMonth(date) >= 7 ? 5 : 12);\r\n return this._adapter.addCalendarMonths(date, increment);\r\n }\r\n\r\n private _changeCalendarState(direction: string): void {\r\n this.calendarState = direction;\r\n }\r\n\r\n private _2digit(n: number): string {\r\n return ('00' + n).slice(-2);\r\n }\r\n}\r\n","<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';\r\nimport { hasModifierKey } from '@angular/cdk/keycodes';\r\nimport { FlexibleConnectedPositionStrategy, GlobalPositionStrategy, Overlay, OverlayConfig, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\r\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport { AfterContentInit, afterNextRender, ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, InjectionToken, Injector, Input, OnDestroy, OnInit, Output, ViewChild, ViewContainerRef, ViewEncapsulation, DOCUMENT, inject } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { DatetimeAdapter } from 'cmat/components/adapter';\r\nimport { Subject, Subscription, merge } from 'rxjs';\r\nimport { filter, take } from 'rxjs/operators';\r\nimport { CmatDatetimepickerCalendarComponent } from './calendar';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\nimport { CmatDatetimepickerInputDirective } from './datetimepicker-input';\r\nimport { CmatCalendarView, CmatDatetimepickerMode, CmatDatetimepickerType, DatetimepickerDropdownPositionX, DatetimepickerDropdownPositionY } from './datetimepicker-types';\r\n\r\n/** Used to generate a unique ID for each datepicker instance. */\r\nlet datetimepickerUid = 0;\r\n\r\n/** Injection token that determines the scroll handling while the calendar is open. */\r\nexport const CMAT_DATETIMEPICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\r\n 'cmat-datetimepicker-scroll-strategy'\r\n);\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\r\n return () => overlay.scrollStrategies.reposition();\r\n}\r\n\r\nexport const CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\r\n provide: CMAT_DATETIMEPICKER_SCROLL_STRATEGY,\r\n deps: [Overlay],\r\n useFactory: CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY\r\n};\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-content',\r\n templateUrl: 'datetimepicker-content.html',\r\n host: {\r\n 'class': 'cmat-datetimepicker-content cmat-datetimepicker-transform-panel',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class]': 'color ? \"mat-\" + color : \"\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.enter-dropdown]': 'animationState === \"enter-dropdown\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.enter-dialog]': 'animationState === \"enter-dialog\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.leave]': 'animationState === \"leave\"',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[class.cmat-datetimepicker-content-touch]': 'datetimepicker?.touchUi',\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n '[attr.mode]': 'datetimepicker.mode'\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDatetimepickerContent',\r\n imports: [A11yModule, CmatDatetimepickerCalendarComponent, NgClass]\r\n})\r\nexport class CmatDatetimepickerContentComponent<D> implements OnInit, AfterContentInit, OnDestroy {\r\n @ViewChild(CmatDatetimepickerCalendarComponent, { static: true }) _calendar!: CmatDatetimepickerCalendarComponent<D>;\r\n @Input() color: ThemePalette;\r\n\r\n datetimepicker!: CmatDatetimepickerComponent<D>;\r\n\r\n /** Whether the datetimepicker is above or below the input. */\r\n isAbove!: boolean;\r\n\r\n /** Current state of the animation. */\r\n animationState!: 'enter-dropdown' | 'enter-dialog' | 'leave';\r\n\r\n /** Emits when an animation has finished. */\r\n readonly animationDone = new Subject<void>();\r\n\r\n /** Id of the label for the `role=\"dialog\"` element. */\r\n dialogLabelId: string | null = null;\r\n\r\n protected _elementRef = inject(ElementRef);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _animationEndListener: ((event: AnimationEvent) => void) | null = null;\r\n\r\n ngOnInit(): void {\r\n this.animationState = this.datetimepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';\r\n\r\n this._animationEndListener = (event: AnimationEvent): void => {\r\n if (event.animationName === 'panel-dropdown-enter' || event.animationName === 'panel-dialog-enter' || event.animationName === 'panel-leave') {\r\n this.animationDone.next();\r\n }\r\n };\r\n\r\n this._elementRef.nativeElement.addEventListener('animationend', this._animationEndListener);\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._calendar.focusActiveCell();\r\n }\r\n\r\n startExitAnimation(): void {\r\n this.animationState = 'leave';\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.animationDone.complete();\r\n\r\n this._elementRef.nativeElement.removeEventListener('animationend', this._animationEndListener);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker',\r\n exportAs: 'cmatDatetimepicker',\r\n template: '',\r\n styleUrls: ['datetimepicker.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false\r\n})\r\nexport class CmatDatetimepickerComponent<D> implements OnDestroy {\r\n /** The view that the calendar should start in. */\r\n @Input() startView: CmatCalendarView = 'month';\r\n @Input() mode: CmatDatetimepickerMode = 'auto';\r\n @Input() timeInterval: number = 1;\r\n /** Prevent user to select same date time */\r\n @Input() preventSameDateTimeSelection = false;\r\n\r\n /** Preferred position of the datetimepicker in the X axis. */\r\n @Input()\r\n xPosition: DatetimepickerDropdownPositionX = 'start';\r\n\r\n /** Preferred position of the datetimepicker in the Y axis. */\r\n @Input()\r\n yPosition: DatetimepickerDropdownPositionY = 'below';\r\n\r\n @Output() selectedChanged = new EventEmitter<D>();\r\n /** Emits when the datepicker has been opened. */\r\n @Output() openedStream: EventEmitter<void> = new EventEmitter<void>();\r\n /** Emits when the datepicker has been closed. */\r\n @Output() closedStream: EventEmitter<void> = new EventEmitter<void>();\r\n /** Emits when the view has been changed. **/\r\n @Output() viewChanged: EventEmitter<CmatCalendarView> = new EventEmitter<CmatCalendarView>();\r\n /** Whether the calendar is open. */\r\n\r\n /** The id for the datepicker calendar. */\r\n id = `cmat-datetimepicker-${datetimepickerUid++}`;\r\n /** The input element this datepicker is associated with. */\r\n datetimepickerInput: CmatDatetimepickerInputDirective<D>;\r\n /** Emits when the datepicker is disabled. */\r\n disabledChange = new Subject<boolean>();\r\n\r\n private _overlay = inject(Overlay);\r\n private _injector = inject(Injector);\r\n private _viewContainerRef = inject(ViewContainerRef);\r\n private _scrollStrategy = inject(CMAT_DATETIMEPICKER_SCROLL_STRATEGY);\r\n private _dateAdapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dir = inject(Directionality, { optional: true })!;\r\n private _document = inject(DOCUMENT, { optional: true })!;\r\n\r\n\r\n private _validSelected: D | null = null;\r\n\r\n /** A reference to the overlay into which we've rendered the calendar. */\r\n private _overlayRef!: OverlayRef | null;\r\n\r\n /** Reference to the component instance rendered in the overlay. */\r\n private _componentRef!: ComponentRef<CmatDatetimepickerContentComponent<D>> | null;\r\n\r\n /** The element that was focused before the datetimepicker was opened. */\r\n private _focusedElementBeforeOpen: HTMLElement | null = null;\r\n\r\n /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\r\n private _backdropHarnessClass = `${this.id}-backdrop`;\r\n\r\n private _inputStateChanges = Subscription.EMPTY;\r\n\r\n private _multiYearSelector = false;\r\n private _twelvehour = false;\r\n private _panelClass!: string[];\r\n private _opened = false;\r\n private _color: ThemePalette;\r\n private _startAt: D | null;\r\n private _type: CmatDatetimepickerType = 'datetime';\r\n private _touchUi = false;\r\n private _disabled: boolean;\r\n private _timeInput = true;\r\n private _restoreFocus = true;\r\n\r\n\r\n\r\n constructor() {\r\n if (!this._dateAdapter) {\r\n throw createMissingDateImplError('DatetimeAdapter');\r\n }\r\n }\r\n\r\n /** Whether to show multi-year view. */\r\n @Input()\r\n get multiYearSelector(): boolean {\r\n return this._multiYearSelector;\r\n }\r\n set multiYearSelector(value: boolean) {\r\n this._multiYearSelector = coerceBooleanProperty(value);\r\n }\r\n\r\n /** Whether the clock uses 12 hour format. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get twelvehour(): boolean {\r\n return this._twelvehour;\r\n }\r\n set twelvehour(value: boolean) {\r\n this._twelvehour = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * Classes to be passed to the date picker panel.\r\n * Supports string and string array values, similar to `ngClass`.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get panelClass(): string | string[] {\r\n return this._panelClass;\r\n }\r\n set panelClass(value: string | string[]) {\r\n this._panelClass = coerceStringArray(value);\r\n }\r\n\r\n /** Whether the calendar is open. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get opened(): boolean {\r\n return this._opened;\r\n }\r\n set opened(value: boolean) {\r\n coerceBooleanProperty(value) ? this.open() : this.close();\r\n }\r\n\r\n /** Color palette to use on the datetimepicker's calendar. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get color(): ThemePalette {\r\n return (\r\n this._color ??\r\n (this.datetimepickerInput ? this.datetimepickerInput.getThemePalette() : undefined)\r\n );\r\n }\r\n set color(value: ThemePalette) {\r\n this._color = value;\r\n }\r\n\r\n /** The date to open the calendar to initially. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get startAt(): D | null {\r\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\r\n // selected value is.\r\n return this._startAt ?? (this.datetimepickerInput ? this.datetimepickerInput.value : null);\r\n }\r\n\r\n set startAt(date: D | null) {\r\n this._startAt = this._dateAdapter.getValidDateOrNull(date);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get type(): CmatDatetimepickerType {\r\n return this._type;\r\n }\r\n\r\n set type(value: CmatDatetimepickerType) {\r\n this._type = value || 'datetime';\r\n }\r\n\r\n /**\r\n * Whether the calendar is in time mode. In time mode the calendar clock gets time input\r\n * elements rather then just clock. When `touchUi` is enabled this will be disabled.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get timeInput(): boolean {\r\n return this._timeInput && !this.touchUi;\r\n }\r\n set timeInput(value: boolean) {\r\n this._timeInput = coerceBooleanProperty(value);\r\n }\r\n\r\n /**\r\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\r\n * than a popup and elements have more padding to allow for bigger touch targets.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get touchUi(): boolean {\r\n return this._touchUi;\r\n }\r\n\r\n set touchUi(value: boolean) {\r\n this._touchUi = coerceBooleanProperty(value);\r\n }\r\n\r\n /** Whether the datepicker pop-up should be disabled. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled === undefined && this.datetimepickerInput ?\r\n this.datetimepickerInput.disabled : !!this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n const newValue = coerceBooleanProperty(value);\r\n\r\n if (newValue !== this._disabled) {\r\n this._disabled = newValue;\r\n this.disabledChange.next(newValue);\r\n }\r\n }\r\n\r\n /**\r\n * Whether to restore focus to the previously-focused element when the panel is closed.\r\n * Note that automatic focus restoration is an accessibility feature and it is recommended that\r\n * you provide your own equivalent, if you decide to turn it off.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get restoreFocus(): boolean {\r\n return this._restoreFocus;\r\n }\r\n set restoreFocus(value: boolean) {\r\n this._restoreFocus = coerceBooleanProperty(value);\r\n }\r\n\r\n /** The currently selected date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get selected(): D | null {\r\n return this._validSelected;\r\n }\r\n\r\n set selected(value: D | null) {\r\n this._validSelected = value;\r\n }\r\n\r\n /** The minimum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get minDate(): D | null {\r\n return this.datetimepickerInput?.min;\r\n }\r\n\r\n /** The maximum selectable date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get maxDate(): D | null {\r\n return this.datetimepickerInput?.max;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateFilter(): (date: D | null, type: CmatDatetimepickerFilterType) => boolean {\r\n return this.datetimepickerInput?.dateFilter;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._destroyOverlay();\r\n this.close();\r\n this._inputStateChanges.unsubscribe();\r\n this.disabledChange.complete();\r\n }\r\n\r\n /**\r\n * Register an input with this datepicker.\r\n *\r\n * @param input The datepicker input to register with this datepicker.\r\n */\r\n registerInput(input: CmatDatetimepickerInputDirective<D>): void {\r\n if (this.datetimepickerInput) {\r\n throw Error('A MatDatepicker can only be associated with a single input.');\r\n }\r\n this.datetimepickerInput = input;\r\n this._inputStateChanges =\r\n this.datetimepickerInput.valueChange.subscribe((value: D | null) => this.selected = value);\r\n }\r\n\r\n\r\n /** Open the calendar. */\r\n open(): void {\r\n if (this.opened || this.disabled) {\r\n return;\r\n }\r\n if (!this.datetimepickerInput) {\r\n throw Error('Attempted to open an MatDatepicker with no associated input.');\r\n }\r\n\r\n this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();\r\n this._openOverlay();\r\n this._opened = true;\r\n this.openedStream.emit();\r\n }\r\n\r\n /** Close the calendar. */\r\n close(): void {\r\n if (!this._opened) {\r\n return;\r\n }\r\n\r\n const canRestoreFocus =\r\n this._restoreFocus &&\r\n this._focusedElementBeforeOpen &&\r\n typeof this._focusedElementBeforeOpen.focus === 'function';\r\n\r\n const completeClose = (): void => {\r\n // The `_opened` could've been reset already if\r\n // we got two events in quick succession.\r\n if (this._opened) {\r\n this._opened = false;\r\n this.closedStream.emit();\r\n }\r\n };\r\n\r\n if (this._componentRef) {\r\n const { instance, location } = this._componentRef;\r\n instance.startExitAnimation();\r\n instance.animationDone.pipe(take(1)).subscribe(() => {\r\n const activeElement = this._document.activeElement;\r\n\r\n // Since we restore focus after the exit animation, we have to check that\r\n // the user didn't move focus themselves inside the `close` handler.\r\n if (\r\n canRestoreFocus &&\r\n (!activeElement ||\r\n activeElement === this._document.activeElement ||\r\n location.nativeElement.contains(activeElement))\r\n ) {\r\n this._focusedElementBeforeOpen?.focus();\r\n }\r\n\r\n this._focusedElementBeforeOpen = null;\r\n this._destroyOverlay();\r\n });\r\n }\r\n\r\n if (canRestoreFocus) {\r\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\r\n // marked the datepicker as closed. If the event fires out of sequence and the element that\r\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\r\n // able to close the calendar at all. We work around it by making the logic, that marks\r\n // the datepicker as closed, async as well.\r\n setTimeout(completeClose);\r\n } else {\r\n completeClose();\r\n }\r\n }\r\n /** Selects the given date */\r\n select(date: D): void {\r\n const oldValue = this.selected;\r\n this.selected = date;\r\n if (!this._dateAdapter.sameDatetime(oldValue, this.selected)) {\r\n this.selectedChanged.emit(date);\r\n }\r\n }\r\n\r\n viewChange(type: CmatCalendarView): void {\r\n this.viewChanged.emit(type);\r\n }\r\n\r\n /**\r\n * relevant values from the datetimepicker to the\r\n * datetimepicker content inside the overlay.\r\n */\r\n private _forwardContentValues(instance: CmatDatetimepickerContentComponent<D>): void {\r\n instance.datetimepicker = this;\r\n instance.color = this.color;\r\n instance.dialogLabelId = this.datetimepickerInput.getOverlayLabelId();\r\n }\r\n\r\n /** Opens the overlay with the calendar. */\r\n private _openOverlay(): void {\r\n this._destroyOverlay();\r\n\r\n const isDialog = this.touchUi;\r\n const labelId = this.datetimepickerInput.getOverlayLabelId();\r\n\r\n const portal = new ComponentPortal<CmatDatetimepickerContentComponent<D>>(\r\n CmatDatetimepickerContentComponent,\r\n this._viewContainerRef\r\n );\r\n const overlayRef = (this._overlayRef = this._overlay.create(\r\n new OverlayConfig({\r\n positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),\r\n hasBackdrop: true,\r\n backdropClass: [\r\n isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',\r\n this._backdropHarnessClass,\r\n ],\r\n direction: this._dir,\r\n scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),\r\n panelClass: `cmat-datetimepicker-${isDialog ? 'dialog' : 'popup'}`,\r\n })\r\n ));\r\n\r\n const overlayElement = overlayRef.overlayElement;\r\n overlayElement.setAttribute('role', 'dialog');\r\n\r\n if (labelId) {\r\n overlayElement.setAttribute('aria-labelledby', labelId);\r\n }\r\n\r\n if (isDialog) {\r\n overlayElement.setAttribute('aria-modal', 'true');\r\n }\r\n\r\n this._getCloseStream(overlayRef).subscribe((event: { preventDefault: VoidFunction }) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n this.close();\r\n });\r\n\r\n this._componentRef = overlayRef.attach(portal);\r\n this._forwardContentValues(this._componentRef.instance);\r\n\r\n // Update the position once the calendar has rendered. Only relevant in dropdown mode.\r\n if (!isDialog) {\r\n afterNextRender(\r\n () => {\r\n overlayRef.updatePosition();\r\n },\r\n { injector: this._injector }\r\n );\r\n\r\n }\r\n }\r\n\r\n /** Destroys the current overlay. */\r\n private _destroyOverlay(): void {\r\n if (this._overlayRef) {\r\n this._overlayRef.dispose();\r\n this._overlayRef = this._componentRef = null;\r\n }\r\n }\r\n\r\n /** Gets a position strategy that will open the calendar as a dropdown. */\r\n private _getDialogStrategy(): GlobalPositionStrategy {\r\n return this._overlay.position().global().centerHorizontally().centerVertically();\r\n }\r\n\r\n /** Gets a position strategy that will open the calendar as a dropdown. */\r\n private _getDropdownStrategy(): FlexibleConnectedPositionStrategy {\r\n const strategy = this._overlay\r\n .position()\r\n .flexibleConnectedTo(this.datetimepickerInput.getConnectedOverlayOrigin())\r\n .withTransformOriginOn('.cmat-datetimepicker-content')\r\n .withFlexibleDimensions(false)\r\n .withViewportMargin(8)\r\n .withLockedPosition();\r\n\r\n return this._setConnectedPositions(strategy);\r\n }\r\n\r\n /**\r\n * Sets the positions of the datetimepicker in dropdown mode based on the current configuration.\r\n */\r\n private _setConnectedPositions(strategy: FlexibleConnectedPositionStrategy): FlexibleConnectedPositionStrategy {\r\n const primaryX = this.xPosition === 'end' ? 'end' : 'start';\r\n const secondaryX = primaryX === 'start' ? 'end' : 'start';\r\n const primaryY = this.yPosition === 'above' ? 'bottom' : 'top';\r\n const secondaryY = primaryY === 'top' ? 'bottom' : 'top';\r\n\r\n return strategy.withPositions([\r\n {\r\n originX: primaryX,\r\n originY: secondaryY,\r\n overlayX: primaryX,\r\n overlayY: primaryY,\r\n },\r\n {\r\n originX: primaryX,\r\n originY: primaryY,\r\n overlayX: primaryX,\r\n overlayY: secondaryY,\r\n },\r\n {\r\n originX: secondaryX,\r\n originY: secondaryY,\r\n overlayX: secondaryX,\r\n overlayY: primaryY,\r\n },\r\n {\r\n originX: secondaryX,\r\n originY: primaryY,\r\n overlayX: secondaryX,\r\n overlayY: secondaryY,\r\n },\r\n ]);\r\n }\r\n\r\n /** Gets an observable that will emit when the overlay is supposed to be closed. */\r\n private _getCloseStream(overlayRef: OverlayRef): any {\r\n return merge(\r\n overlayRef.backdropClick(),\r\n overlayRef.detachments(),\r\n overlayRef.keydownEvents().pipe(\r\n filter(event =>\r\n // Closing on alt + up is only valid when there's an input associated with the datetimepicker.\r\n (\r\n (event.code === 'Escape' && !hasModifierKey(event)) ||\r\n (this.datetimepickerInput &&\r\n hasModifierKey(event, 'altKey') &&\r\n event.code === 'ArrowUp')\r\n )\r\n )\r\n )\r\n );\r\n }\r\n}\r\n","<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { AfterContentInit, Directive, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, Output, inject } from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n ControlValueAccessor,\r\n NG_VALIDATORS,\r\n NG_VALUE_ACCESSOR,\r\n ValidationErrors,\r\n Validator,\r\n ValidatorFn,\r\n Validators\r\n} from '@angular/forms';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\r\nimport { DatetimeAdapter, CMAT_DATETIME_FORMATS, CmatDatetimeFormats } from 'cmat/components/adapter';\r\nimport { Subscription } from 'rxjs';\r\nimport { CmatDatetimepickerComponent } from './datetimepicker';\r\nimport { createMissingDateImplError } from './datetimepicker-errors';\r\nimport { CmatDatetimepickerFilterType } from './datetimepicker-filtertype';\r\n\r\nexport const CMAT_DATETIMEPICKER_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDatetimepickerInputDirective),\r\n multi: true\r\n};\r\n\r\nexport const CMAT_DATETIMEPICKER_VALIDATORS: any = {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => CmatDatetimepickerInputDirective),\r\n multi: true\r\n};\r\n\r\n/**\r\n * An event used for datepicker input and change events. We don't always have access to a native\r\n * input or change event because the event may have been triggered by the user clicking on the\r\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\r\n */\r\nexport class CmatDatetimepickerInputEvent<D> {\r\n /** The new value for the target datepicker input. */\r\n value: D | null;\r\n\r\n constructor(public target: CmatDatetimepickerInputDirective<D>, public targetElement: HTMLElement) {\r\n this.value = this.target.value;\r\n }\r\n}\r\n\r\n/** Directive used to connect an input to a MatDatepicker. */\r\n@Directive({\r\n selector: 'input[cmatDatetimepicker]',\r\n providers: [\r\n CMAT_DATETIMEPICKER_VALUE_ACCESSOR,\r\n CMAT_DATETIMEPICKER_VALIDATORS,\r\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CmatDatetimepickerInputDirective },\r\n ],\r\n \r\n host: {\r\n '[attr.aria-haspopup]': 'true',\r\n '[attr.aria-owns]': '(datetimepicker?.opened && datetimepicker.id) || null',\r\n '[attr.min]': 'min ? datetimepicker.toIso8601(min) : null',\r\n '[attr.max]': 'max ? datetimepicker.toIso8601(max) : null',\r\n '[disabled]': 'disabled',\r\n '(input)': 'onInput($event.target.value)',\r\n '(change)': 'onChange()',\r\n '(blur)': 'onBlur()',\r\n '(keydown)': 'onKeydown($event)'\r\n },\r\n exportAs: 'cmatDatepickerInput'\r\n})\r\nexport class CmatDatetimepickerInputDirective<D> implements AfterContentInit, ControlValueAccessor, OnDestroy,\r\n Validator { \r\n /** Emits when a `change` event is fired on this `<input>`. */\r\n @Output() dateChange = new EventEmitter<CmatDatetimepickerInputEvent<D>>();\r\n /** Emits when an `input` event is fired on this `<input>`. */\r\n @Output() dateInput = new EventEmitter<CmatDatetimepickerInputEvent<D>>();\r\n\r\n datetimepicker: CmatDatetimepickerComponent<D>;\r\n dateFilter: (date: D | null, type: CmatDatetimepickerFilterType) => boolean;\r\n\r\n /** Emits when the value changes (either due to user input or programmatic change). */\r\n valueChange = new EventEmitter<D | null>();\r\n /** Emits when the disabled state has changed */\r\n disabledChange = new EventEmitter<boolean>();\r\n\r\n private _elementRef = inject(ElementRef);\r\n private _dateAdapter = inject<DatetimeAdapter<D>>(DatetimeAdapter, { optional: true })!;\r\n private _dateFormats = inject<CmatDatetimeFormats>(CMAT_DATETIME_FORMATS, { optional: true })!;\r\n private _formField = inject(MatFormField, { optional: true })!;\r\n\r\n private _datepickerSubscription = Subscription.EMPTY;\r\n private _localeSubscription = Subscription.EMPTY;\r\n /** Whether the last value set on the input was valid. */\r\n private _lastValueValid = false;\r\n private _value: D | null;\r\n private _min: D | null;\r\n private _max: D | null;\r\n private _disabled: boolean;\r\n\r\n \r\n\r\n constructor() {\r\n const _dateAdapter = this._dateAdapter;\r\n\r\n if (!this._dateAdapter) {\r\n throw createMissingDateImplError('CDatetimeAdapter');\r\n }\r\n if (!this._dateFormats) {\r\n throw createMissingDateImplError('CMAT_DATETIME_FORMATS');\r\n }\r\n\r\n // Update the displayed date when the locale changes.\r\n this._localeSubscription = _dateAdapter.localeChanges.subscribe();\r\n }\r\n\r\n /** The datepicker that this input is associated with. */\r\n @Input()\r\n set cmatDatetimepicker(value: CmatDatetimepickerComponent<D>) {\r\n this._registerDatetimepicker(value);\r\n }\r\n\r\n @Input() set cmatDatepickerFilter(filter: (date: D | null, type: CmatDatetimepickerFilterType) => boolean) {\r\n this.dateFilter = filter;\r\n this._validatorOnChange();\r\n }\r\n\r\n\r\n\r\n /** The value of the input. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get value(): D | null {\r\n return this._value;\r\n }\r\n\r\n set value(value: D | null) {\r\n value = this._dateAdapter.deserialize(value);\r\n this._lastValueValid = !value || this._dateAdapter.isValid(value);\r\n value = this._dateAdapter.getValidDateOrNull(value);\r\n const oldDate = this.value;\r\n this._value = value;\r\n this._formatValue(value);\r\n\r\n // use timeout to ensure the datetimepicker is instantiated and we get the correct format\r\n setTimeout(() => {\r\n if (!this._dateAdapter.sameDatetime(oldDate, value)) {\r\n this.valueChange.emit(value);\r\n }\r\n });\r\n }\r\n\r\n /** The minimum valid date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get min(): D | null {\r\n return this._min;\r\n }\r\n\r\n set min(value: D | null) {\r\n this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\r\n this._validatorOnChange();\r\n }\r\n\r\n /** The maximum valid date. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get max(): D | null {\r\n return this._max;\r\n }\r\n\r\n set max(value: D | null) {\r\n this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\r\n this._validatorOnChange();\r\n }\r\n\r\n /** Whether the datepicker-input is disabled. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n @Input()\r\n get disabled(): boolean {\r\n return !!this._disabled;\r\n }\r\n\r\n set disabled(value: any) {\r\n const newValue = coerceBooleanProperty(value);\r\n\r\n if (this._disabled !== newValue) {\r\n this._disabled = newValue;\r\n this.disabledChange.emit(newValue);\r\n }\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (this.datetimepicker) {\r\n this._datepickerSubscription = this.datetimepicker.selectedChanged.subscribe((selected: D) => {\r\n this.value = selected;\r\n this._cvaOnChange(selected);\r\n this._onTouched();\r\n this.dateInput.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n });\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._datepickerSubscription.unsubscribe();\r\n this._localeSubscription.unsubscribe();\r\n this.valueChange.complete();\r\n this.disabledChange.complete();\r\n }\r\n\r\n registerOnValidatorChange(fn:VoidFunction): void {\r\n this._validatorOnChange = fn;\r\n }\r\n\r\n validate(c: AbstractControl): ValidationErrors | null {\r\n return this._validator ? this._validator(c) : null;\r\n }\r\n\r\n /**\r\n * Gets the element that the datepicker popup should be connected to.\r\n *\r\n * @return The element to connect the popup to.\r\n */\r\n getConnectedOverlayOrigin(): ElementRef {\r\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\r\n }\r\n\r\n /** Gets the ID of an element that should be used a description for the calendar overlay. */\r\n getOverlayLabelId(): string | null {\r\n if (this._formField) {\r\n return this._formField.getLabelId();\r\n }\r\n\r\n return this._elementRef.nativeElement.getAttribute('aria-labelledby');\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n writeValue(value: D): void {\r\n this.value = value;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n registerOnChange(fn: (value: any) => void): void {\r\n this._cvaOnChange = fn;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n registerOnTouched(fn: VoidFunction): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n // Implemented as part of ControlValueAccessor\r\n setDisabledState(disabled: boolean): void {\r\n this.disabled = disabled;\r\n }\r\n\r\n onKeydown(event: KeyboardEvent): void {\r\n if (event.altKey && event.code === 'ArrowDown') {\r\n this.datetimepicker.open();\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n onInput(value: string): void {\r\n let date = this._dateAdapter.parse(value, this._getParseFormat());\r\n this._lastValueValid = !date || this._dateAdapter.isValid(date);\r\n date = this._dateAdapter.getValidDateOrNull(date);\r\n this._value = date;\r\n this._cvaOnChange(date);\r\n this.valueChange.emit(date);\r\n this.dateInput.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n }\r\n\r\n onChange(): void {\r\n this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));\r\n }\r\n\r\n /** Handles blur events on the input. */\r\n onBlur(): void {\r\n // Reformat the input only if we have a valid value.\r\n if (this.value) {\r\n this._formatValue(this.value);\r\n }\r\n\r\n this._onTouched();\r\n }\r\n\r\n /** Returns the palette used by the input's form field, if any. */\r\n getThemePalette(): ThemePalette {\r\n return this._formField ? this._formField.color : undefined;\r\n }\r\n\r\n private _registerDatetimepicker(value: CmatDatetimepickerComponent<D>): void {\r\n if (value) {\r\n this.datetimepicker = value;\r\n this.datetimepicker.registerInput(this);\r\n }\r\n }\r\n\r\n private _getDisplayFormat(): any {\r\n switch (this.datetimepicker.type) {\r\n case 'date':\r\n return this._dateFormats.display.dateInput;\r\n case 'datetime':\r\n return this._dateFormats.display.datetimeInput;\r\n case 'time':\r\n return this._dateFormats.display.timeInput;\r\n case 'month':\r\n return this._dateFormats.display.monthInput;\r\n case 'year':\r\n return this._dateFormats.display.yearInput;\r\n }\r\n }\r\n\r\n private _getParseFormat(): any {\r\n let parseFormat: any;\r\n\r\n switch (this.datetimepicker.type) {\r\n case 'date':\r\n parseFormat = this._dateFormats.parse.dateInput;\r\n break;\r\n case 'datetime':\r\n parseFormat = this._dateFormats.parse.datetimeInput;\r\n break;\r\n case 'time':\r\n parseFormat = this._dateFormats.parse.timeInput;\r\n break;\r\n case 'month':\r\n parseFormat = this._dateFormats.parse.monthInput;\r\n break;\r\n case 'year':\r\n parseFormat = this._dateFormats.parse.yearInput;\r\n break;\r\n }\r\n parseFormat ??= this._dateFormats.parse.dateInput;\r\n\r\n return parseFormat;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onTouched = (): void => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _cvaOnChange: (value: any) => void = () => {};\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _validatorOnChange = (): void => { };\r\n\r\n /** The form control validator for whether the input parses. */\r\n private _parseValidator: ValidatorFn = (): ValidationErrors | null => this._lastValueValid ?\r\n null : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };\r\n\r\n /** The form control validator for the min date. */\r\n private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return (!this.min || !controlValue ||\r\n (this._dateAdapter.compareDatetime(this.min, controlValue) as number) <= 0) ?\r\n null : { 'matDatepickerMin': { 'min': this.min, 'actual': controlValue } };\r\n };\r\n\r\n /** The form control validator for the max date. */\r\n private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return (!this.max || !controlValue ||\r\n (this._dateAdapter.compareDatetime(this.max, controlValue) as number) >= 0) ?\r\n null : { 'matDatepickerMax': { 'max': this.max, 'actual': controlValue } };\r\n };\r\n\r\n /** The form control validator for the date filter. */\r\n private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\r\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\r\n return !this.dateFilter || !controlValue || this.dateFilter(controlValue, CmatDatetimepickerFilterType.DATE) ?\r\n null : { 'matDatepickerFilter': true };\r\n };\r\n\r\n /** The combined form control validator for this input. */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n private _validator: ValidatorFn | null =\r\n Validators.compose(\r\n [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);\r\n\r\n /** Formats a value and sets it on the input element. */\r\n private _formatValue(value: D | null): void {\r\n this._elementRef.nativeElement.value =\r\n value ? this._dateAdapter.format(value, this._getDisplayFormat()) : '';\r\n }\r\n}\r\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Directive, HostBinding, Input, OnChanges, OnDestroy, SimpleChanges, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButton, MatButtonModule } from '@angular/material/button';\r\nimport { merge, of as observableOf, Subscription } from 'rxjs';\r\nimport { CmatDatetimepickerComponent } from './datetimepicker';\r\nimport { CmatDatetimepickerIntl } from './datetimepicker-intl';\r\n\r\n\r\n/** Can be used to override the icon of a `cmatDatetimepickerToggle`. */\r\n@Directive({\r\n selector: '[cmatDatetimepickerToggleIcon]'\r\n})\r\nexport class CmatDatetimepickerToggleIconDirective { }\r\n\r\n@Component({\r\n selector: 'cmat-datetimepicker-toggle',\r\n templateUrl: 'datetimepicker-toggle.html',\r\n exportAs: 'cmatDatetimepickerToggle',\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [MatButtonModule]\r\n})\r\nexport class CmatDatetimepickerToggleComponent<D> implements AfterContentInit, OnChanges, OnDestroy {\r\n /** Datepicker instance that the button will toggle. */\r\n // eslint-disable-next-line @angular-eslint/no-input-rename\r\n @Input('for') datetimepicker: CmatDatetimepickerComponent<D>;\r\n /** Tabindex for the toggle. */\r\n @Input() tabIndex!: number;\r\n\r\n /** Screen-reader label for the button. */\r\n @Input('aria-label') ariaLabel?: string;\r\n\r\n /** Whether ripples on the toggle should be disabled. */\r\n @Input() disableRipple!: boolean;\r\n\r\n /** Custom icon set by the consumer. */\r\n @ContentChild(CmatDatetimepickerToggleIconDirective) customIcon!: CmatDatetimepickerToggleIconDirective;\r\n\r\n /** Underlying button element. */\r\n @ViewChild('button') button!: MatButton;\r\n\r\n\r\n @HostBinding('class') class = 'cmat-datetimepicker-toggle';\r\n\r\n protected intl = inject(CmatDatetimepickerIntl);\r\n\r\n private _stateChanges = Subscription.EMPTY;\r\n private _disabled: boolean;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n\r\n /** Whether the toggle button is disabled. */\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled === undefined ? this.datetimepicker.disabled : !!this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['datepicker']) {\r\n this._watchStateChanges();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._stateChanges.unsubscribe();\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._watchStateChanges();\r\n }\r\n\r\n open(event: Event): void {\r\n if (this.datetimepicker && !this.disabled) {\r\n this.datetimepicker.open();\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n private _watchStateChanges(): void {\r\n const datepickerDisabled = this.datetimepicker ? this.datetimepicker.disabledChange : observableOf();\r\n const inputDisabled = this.datetimepicker?.datetimepickerInput ?\r\n this.datetimepicker.datetimepickerInput.disabledChange : observableOf();\r\n\r\n this._stateChanges.unsubscribe();\r\n this._stateChanges = merge([this.intl.changes, datepickerDisabled, inputDisabled])\r\n .subscribe(() => this._changeDetectorRef.markForCheck());\r\n }\r\n}\r\n","<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;IACY;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AAAE,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AAAE,IAAA,4BAAA,CAAA,4BAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACtB,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,GAAA,EAAA,CAAA,CAAA;;ACKjC,MAAM,YAAY,GAAG;AACrB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,kBAAkB,GAAG;AAC3B,MAA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