@wkly/datetime-picker 21.1.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wkly-datetime-picker-cdk-overlay.mjs +214 -148
- package/fesm2022/wkly-datetime-picker-cdk-overlay.mjs.map +1 -1
- package/fesm2022/wkly-datetime-picker.mjs +2197 -1673
- package/fesm2022/wkly-datetime-picker.mjs.map +1 -1
- package/package.json +7 -7
- package/types/wkly-datetime-picker-cdk-overlay.d.ts +27 -30
- package/types/wkly-datetime-picker.d.ts +532 -325
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wkly-datetime-picker.mjs","sources":["../../../projects/wkly-datetime-picker.21/src/config.ts","../../../projects/wkly-datetime-picker.21/src/field.component.ts","../../../projects/wkly-datetime-picker.21/src/field.component.html","../../../projects/wkly-datetime-picker.21/src/picker.component.ts","../../../projects/wkly-datetime-picker.21/src/picker.component.html","../../../projects/wkly-datetime-picker.21/src/presentation.ts","../../../projects/wkly-datetime-picker.21/src/public-api.ts","../../../projects/wkly-datetime-picker.21/src/wkly-datetime-picker.ts"],"sourcesContent":["import {\n Directive,\n InjectionToken,\n booleanAttribute,\n input,\n InputSignal,\n InputSignalWithTransform,\n output,\n OutputEmitterRef,\n} from \"@angular/core\";\nimport { WklyWeekOffset } from \"@wkly/core\";\nimport {\n WklyCalendarAdapter,\n WklyDisabledDatePredicate,\n WklyDisabledTimePredicate,\n WklyHourCycle,\n WklyPickerValue,\n WklyRangeValidator,\n WklySelectionMode,\n WklyValidationError,\n WklyViewportPreset,\n WklyWeekLabelFormatter,\n WklyWeekLabelMode,\n} from \"@wkly/adapters\";\nimport {\n DEFAULT_OVERSCAN_WEEKS,\n WklyClock,\n WklyConfiguration,\n WklyCloseReason,\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerOutputs as WklyPickerOutputsContract,\n WklyStrings,\n WklyTranslations,\n WklyViewportChange,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nexport * from \"@wkly/presentation\";\nexport const WKLY_CLOCK = new InjectionToken<WklyClock>(\"WKLY_CLOCK\", {\n providedIn: \"root\",\n factory: () => ({ now: () => new Date() }),\n});\nexport const WKLY_CONFIG = new InjectionToken<WklyConfiguration>(\n \"WKLY_CONFIG\",\n { providedIn: \"root\", factory: () => ({}) },\n);\nexport const WKLY_LOCALIZATION = new InjectionToken<WklyStrings>(\n \"WKLY_LOCALIZATION\",\n { providedIn: \"root\", factory: () => ({}) },\n);\nexport const WKLY_TRANSLATIONS = new InjectionToken<WklyTranslations>(\n \"WKLY_TRANSLATIONS\",\n { providedIn: \"root\", factory: () => ({}) },\n);\n/** Shared public inputs/outputs inherited by the picker and both trigger directives. */\nexport type WklyPickerSignalInputs<T> = {\n [K in keyof T]: InputSignal<T[K]> | InputSignalWithTransform<T[K], unknown>;\n};\nexport type WklyPickerSignalOutputs<T> = {\n [K in keyof T]: OutputEmitterRef<T[K]>;\n};\nexport type WklyPickerSignalInputsAndOutputs<T, U> = WklyPickerSignalInputs<T> &\n WklyPickerSignalOutputs<U>;\n@Directive({\n // Angular's metadata evaluator requires strings; template expressions\n // preserve the enum as their source.\n outputs: [\n `${WklyPickerOutputsPropertyKeys.ValueChange}`,\n `${WklyPickerOutputsPropertyKeys.ValidationChange}`,\n `${WklyPickerOutputsPropertyKeys.Opened}`,\n `${WklyPickerOutputsPropertyKeys.Closed}`,\n `${WklyPickerOutputsPropertyKeys.ViewportChange}`,\n `${WklyPickerOutputsPropertyKeys.ViewModeChange}`,\n ],\n})\nexport abstract class WklyPickerInputs implements WklyPickerSignalInputsAndOutputs<\n WklyPickerInputsContract,\n WklyPickerOutputsContract\n> {\n // Angular discovers signal inputs from identifier property declarations.\n protected readonly modeInput = input<WklySelectionMode>(\"datetime\", {\n alias: \"mode\",\n });\n protected readonly valueInput = input<WklyPickerValue>(null, {\n alias: \"value\",\n });\n protected readonly calendarAdapterInput = input<WklyCalendarAdapter>(\n undefined!,\n { alias: \"calendarAdapter\" },\n );\n protected readonly localeInput = input(\"\", { alias: \"locale\" });\n protected readonly weekOffsetInput = input<WklyWeekOffset | null>(null, {\n alias: \"weekOffset\",\n });\n protected readonly viewportPresetInput = input<WklyViewportPreset>(\n { kind: \"full-month\" },\n { alias: \"viewportPreset\" },\n );\n protected readonly hourCycleInput = input<WklyHourCycle>(\"locale\", {\n alias: \"hourCycle\",\n });\n protected readonly showSecondsInput = input(false, {\n alias: \"showSeconds\",\n transform: booleanAttribute,\n });\n protected readonly minuteStepInput = input(1, { alias: \"minuteStep\" });\n protected readonly secondStepInput = input(1, { alias: \"secondStep\" });\n protected readonly minInput = input<string | null>(null, { alias: \"min\" });\n protected readonly maxInput = input<string | null>(null, { alias: \"max\" });\n protected readonly isDateDisabledInput =\n input<WklyDisabledDatePredicate | null>(null, { alias: \"isDateDisabled\" });\n protected readonly isTimeDisabledInput =\n input<WklyDisabledTimePredicate | null>(null, { alias: \"isTimeDisabled\" });\n protected readonly rangeValidatorInput = input<WklyRangeValidator | null>(\n null,\n { alias: \"rangeValidator\" },\n );\n protected readonly allowRangeAcrossDisabledInput = input(false, {\n alias: \"allowRangeAcrossDisabled\",\n transform: booleanAttribute,\n });\n protected readonly requiredInput = input(false, {\n alias: \"required\",\n transform: booleanAttribute,\n });\n protected readonly disabledInput = input(false, {\n alias: \"disabled\",\n transform: booleanAttribute,\n });\n protected readonly weekLabelModeInput = input<WklyWeekLabelMode>(\"locale\", {\n alias: \"weekLabelMode\",\n });\n protected readonly weekLabelFormatterInput =\n input<WklyWeekLabelFormatter | null>(null, { alias: \"weekLabelFormatter\" });\n protected readonly weekCacheSizeInput = input(256, {\n alias: \"weekCacheSize\",\n });\n protected readonly overscanWeeksInput = input(DEFAULT_OVERSCAN_WEEKS, {\n alias: \"overscanWeeks\",\n });\n protected readonly ariaLabelInput = input<string | null>(null, {\n alias: \"ariaLabel\",\n });\n protected readonly ariaDescribedByInput = input<string | null>(null, {\n alias: \"ariaDescribedBy\",\n });\n protected readonly initialEpochDayInput = input<number | null>(null, {\n alias: \"initialEpochDay\",\n });\n protected readonly closeOnBackdropInput = input(true, {\n alias: \"closeOnBackdrop\",\n transform: booleanAttribute,\n });\n protected readonly validatorsInput = input<\n readonly ((value: WklyPickerValue) => WklyValidationError | null)[]\n >([], { alias: \"validators\" });\n protected readonly translationsInput = input<WklyTranslations | null>(null, {\n alias: \"translations\",\n });\n // Public members of the shared picker input contract.\n readonly [WklyPickerInputsPropertyKeys.Mode] = this.modeInput;\n readonly [WklyPickerInputsPropertyKeys.Value] = this.valueInput;\n readonly [WklyPickerInputsPropertyKeys.CalendarAdapter] =\n this.calendarAdapterInput;\n readonly [WklyPickerInputsPropertyKeys.Locale] = this.localeInput;\n readonly [WklyPickerInputsPropertyKeys.WeekOffset] = this.weekOffsetInput;\n readonly [WklyPickerInputsPropertyKeys.ViewportPreset] =\n this.viewportPresetInput;\n readonly [WklyPickerInputsPropertyKeys.HourCycle] = this.hourCycleInput;\n readonly [WklyPickerInputsPropertyKeys.ShowSeconds] = this.showSecondsInput;\n readonly [WklyPickerInputsPropertyKeys.MinuteStep] = this.minuteStepInput;\n readonly [WklyPickerInputsPropertyKeys.SecondStep] = this.secondStepInput;\n readonly [WklyPickerInputsPropertyKeys.Min] = this.minInput;\n readonly [WklyPickerInputsPropertyKeys.Max] = this.maxInput;\n readonly [WklyPickerInputsPropertyKeys.IsDateDisabled] =\n this.isDateDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.IsTimeDisabled] =\n this.isTimeDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.RangeValidator] =\n this.rangeValidatorInput;\n readonly [WklyPickerInputsPropertyKeys.AllowRangeAcrossDisabled] =\n this.allowRangeAcrossDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.Required] = this.requiredInput;\n readonly [WklyPickerInputsPropertyKeys.Disabled] = this.disabledInput;\n readonly [WklyPickerInputsPropertyKeys.WeekLabelMode] =\n this.weekLabelModeInput;\n readonly [WklyPickerInputsPropertyKeys.WeekLabelFormatter] =\n this.weekLabelFormatterInput;\n readonly [WklyPickerInputsPropertyKeys.WeekCacheSize] =\n this.weekCacheSizeInput;\n readonly [WklyPickerInputsPropertyKeys.OverscanWeeks] =\n this.overscanWeeksInput;\n readonly [WklyPickerInputsPropertyKeys.AriaLabel] = this.ariaLabelInput;\n readonly [WklyPickerInputsPropertyKeys.AriaDescribedBy] =\n this.ariaDescribedByInput;\n readonly [WklyPickerInputsPropertyKeys.InitialEpochDay] =\n this.initialEpochDayInput;\n readonly [WklyPickerInputsPropertyKeys.CloseOnBackdrop] =\n this.closeOnBackdropInput;\n readonly [WklyPickerInputsPropertyKeys.Validators] = this.validatorsInput;\n readonly [WklyPickerInputsPropertyKeys.Translations] = this.translationsInput;\n readonly [WklyPickerOutputsPropertyKeys.ValueChange] =\n output<WklyPickerValue>();\n readonly [WklyPickerOutputsPropertyKeys.ValidationChange] =\n output<readonly WklyValidationError[]>();\n readonly [WklyPickerOutputsPropertyKeys.Opened] = output<void>();\n readonly [WklyPickerOutputsPropertyKeys.Closed] = output<WklyCloseReason>();\n readonly [WklyPickerOutputsPropertyKeys.ViewportChange] =\n output<WklyViewportChange>();\n readonly [WklyPickerOutputsPropertyKeys.ViewModeChange] = output<\n \"calendar\" | \"manual\"\n >();\n}\nexport function unwrapWklyPickerSignalInputs<\n T extends WklyPickerInputsContract,\n>(source: WklyPickerSignalInputs<T>): T {\n const keys = Object.values(WklyPickerInputsPropertyKeys) as (keyof T)[];\n\n return Object.fromEntries(\n keys.map((key) => [key, source[key]()]),\n ) as unknown as T;\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n} from \"@angular/core\";\nimport { floorMod } from \"@wkly/core\";\nimport { normalizeDigits } from \"@wkly/adapters\";\n@Component({\n standalone: false,\n selector: \"wkly-field\",\n templateUrl: \"./field.component.html\",\n styleUrls: [\"./field.component.css\"],\n})\nexport class WklyFieldComponent implements OnChanges, OnDestroy {\n @Input() value: number | null = 0;\n @Input() label = \"\";\n @Input() hideLabel = false;\n @Input() previousLabel = \"\";\n @Input() nextLabel = \"\";\n @Input() min = 0;\n @Input() max = 59;\n @Input() step = 1;\n @Input() locale = \"en-US\";\n @Input() disabled = false;\n @Input() invalid = false;\n @Input() labels: readonly string[] | null = null;\n @Output() valueChange = new EventEmitter<number | null>();\n @Output() complete = new EventEmitter<void>();\n private before: number | null = null;\n private touchY = 0;\n private touchSteps = 0;\n private touchChanged = false;\n private typed: string | null = null;\n private inputTimer: ReturnType<typeof setTimeout> | null = null;\n private wheelTimer: ReturnType<typeof setTimeout> | null = null;\n get display(): string {\n if (this.typed !== null) return this.typed;\n return this.value === null\n ? \"\"\n : this.labels\n ? this.labels[this.value - this.min] || String(this.value)\n : new Intl.NumberFormat(this.locale, {\n useGrouping: false,\n minimumIntegerDigits: this.max < 60 ? 2 : 1,\n }).format(this.value);\n }\n ngOnChanges(changes: any): void {\n if (changes.value && this.min < 0 && this.typed !== null) {\n const typedValue =\n this.typed === \"\" || this.typed === \"-\" ? null : Number(this.typed);\n if (this.value !== typedValue) {\n // External date edits replace a pending relative-day preview.\n this.cancelInput();\n this.typed = null;\n }\n }\n }\n ngOnDestroy(): void {\n this.cancelInput();\n if (this.wheelTimer !== null) clearTimeout(this.wheelTimer);\n }\n next(delta: number): number {\n const count = Math.floor((this.max - this.min) / this.step) + 1;\n return (\n this.min +\n floorMod(\n Math.floor(\n ((this.value === null ? this.min : this.value) - this.min) /\n this.step,\n ) + delta,\n count,\n ) *\n this.step\n );\n }\n neighbor(delta: number): string {\n const n = this.next(delta);\n return this.labels\n ? this.labels[n - this.min] || \"\"\n : new Intl.NumberFormat(this.locale, { useGrouping: false }).format(n);\n }\n stepBy(delta: number): void {\n if (this.disabled) return;\n this.scrollBy(delta);\n this.complete.emit();\n }\n begin(event: FocusEvent): void {\n this.before = this.value;\n (event.target as HTMLInputElement).select();\n }\n type(event: Event): void {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n const raw = input.value;\n const numeric = Array.from(raw).every(\n (character) => normalizeDigits(character).length === 1,\n );\n if (this.min < 0 && !this.labels) {\n // Preserve the sign while using the same locale digit normalization.\n const signed = raw\n .replace(/[\\u200e\\u200f\\u061c]/g, \"\")\n .replace(/\\u2212/g, \"-\");\n const digits = normalizeDigits(signed);\n this.typed = input.value = (signed.startsWith(\"-\") ? \"-\" : \"\") + digits;\n this.value =\n digits === \"\"\n ? null\n : Math.max(this.min, Math.min(this.max, Number(this.typed)));\n if (this.value !== null && Number(this.typed) !== this.value)\n this.typed = input.value = String(this.value);\n } else if (numeric) {\n const normalized = normalizeDigits(raw);\n this.typed = input.value =\n this.min >= 0 && this.max < 100 ? normalized.slice(-2) : normalized;\n this.value = this.typed === \"\" ? null : Number(this.typed);\n } else if (this.labels) {\n const search = raw.trim().toLocaleLowerCase(this.locale);\n this.typed = raw;\n const matches = this.labels\n .map((label, index) => ({ label, index }))\n .filter((item) =>\n item.label.toLocaleLowerCase(this.locale).includes(search),\n );\n this.value = matches.length === 1 ? this.min + matches[0].index : null;\n } else {\n this.typed = input.value = normalizeDigits(raw);\n this.value = this.typed === \"\" ? null : Number(this.typed);\n }\n this.valueChange.emit(this.value);\n this.cancelInput();\n if (!numeric && this.labels && this.value !== null) this.complete.emit();\n this.inputTimer = setTimeout(() => {\n this.inputTimer = null;\n this.typed = null;\n if (!this.disabled) this.complete.emit();\n }, 1000);\n }\n key(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n this.cancelInput();\n this.typed = null;\n this.value = this.before;\n this.valueChange.emit(this.before);\n (event.target as HTMLInputElement).value = this.display;\n (event.target as HTMLInputElement).blur();\n }\n if (event.key === \"Enter\") {\n event.preventDefault();\n event.stopPropagation();\n this.finish();\n }\n const delta =\n event.key === \"ArrowUp\"\n ? -1\n : event.key === \"ArrowDown\"\n ? 1\n : event.key === \"PageUp\"\n ? -5\n : event.key === \"PageDown\"\n ? 5\n : 0;\n if (delta) {\n event.preventDefault();\n this.stepBy(delta);\n }\n }\n finish(): void {\n this.cancelInput();\n this.typed = null;\n this.complete.emit();\n }\n wheel(event: WheelEvent): void {\n if (this.disabled || Math.abs(event.deltaY) < 1) return;\n event.preventDefault();\n this.scrollBy(event.deltaY > 0 ? 1 : -1);\n if (this.wheelTimer !== null) clearTimeout(this.wheelTimer);\n this.wheelTimer = setTimeout(() => {\n this.wheelTimer = null;\n this.complete.emit();\n }, 140);\n }\n touchStart(event: TouchEvent): void {\n this.touchY = event.touches[0].clientY;\n this.touchSteps = 0;\n this.touchChanged = false;\n }\n touchMove(event: TouchEvent): void {\n this.applyTouchY(event.touches[0].clientY);\n }\n touchEnd(event: TouchEvent): void {\n this.applyTouchY(event.changedTouches[0].clientY);\n if (this.touchChanged) this.complete.emit();\n this.touchChanged = false;\n }\n private cancelInput(): void {\n if (this.inputTimer !== null) clearTimeout(this.inputTimer);\n this.inputTimer = null;\n }\n private scrollBy(delta: number): void {\n if (this.disabled || !delta) return;\n this.cancelInput();\n this.typed = null;\n this.value = this.next(delta);\n this.valueChange.emit(this.value);\n }\n private applyTouchY(y: number): void {\n // Count total gesture steps so repeated move events do not duplicate changes.\n if (this.disabled) return;\n const delta = this.touchY - y;\n const steps =\n Math.abs(delta) > 16\n ? Math.sign(delta) * Math.max(1, Math.round(Math.abs(delta) / 40))\n : 0;\n const change = steps - this.touchSteps;\n if (!change) return;\n this.scrollBy(change);\n this.touchSteps = steps;\n this.touchChanged = true;\n }\n}\n","<div\n class=\"field\"\n (wheel)=\"wheel($event)\"\n (touchstart)=\"touchStart($event)\"\n (touchmove)=\"touchMove($event)\"\n (touchend)=\"touchEnd($event)\"\n (touchcancel)=\"touchEnd($event)\"\n>\n <span *ngIf=\"!hideLabel\" class=\"label\">{{ label }}</span>\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"previousLabel || label + ': previous'\"\n (click)=\"stepBy(-1)\"\n >\n {{ neighbor(-1) }}\n </button>\n <input\n [attr.aria-label]=\"label\"\n [attr.aria-invalid]=\"invalid\"\n [disabled]=\"disabled\"\n [value]=\"display\"\n [attr.inputmode]=\"labels ? 'text' : min < 0 ? 'text' : 'numeric'\"\n autocomplete=\"off\"\n (focus)=\"begin($event)\"\n (input)=\"type($event)\"\n (blur)=\"finish()\"\n (keydown)=\"key($event)\"\n />\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"nextLabel || label + ': next'\"\n (click)=\"stepBy(1)\"\n >\n {{ neighbor(1) }}\n </button>\n</div>\n","import type { WklyHourCycle } from \"@wkly/adapters\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n effect,\n forwardRef,\n Inject,\n LOCALE_ID,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n signal,\n untracked,\n ViewChild,\n} from \"@angular/core\";\nimport { getLocaleFirstDayOfWeek, isPlatformBrowser } from \"@angular/common\";\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport {\n absoluteWeekOf,\n createWeekGenerator,\n firstEpochDayOf,\n integer,\n WklyWeekGenerator,\n WklyWeekOffset,\n} from \"@wkly/core\";\nimport {\n draftDayDifference,\n setDraftDayDifference,\n calendarMonthBounds,\n resolveWklyTranslation,\n createWeekRows,\n validateDrafts,\n WklyDraft as Draft,\n WklyWeekRow as Row,\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nimport {\n decodeIso,\n error,\n resolveWeekOffset,\n validateSelection,\n WklyCalendarAdapter,\n WklyCalendarDate,\n WklyDateTime,\n WklyGregorianCalendarAdapter,\n WklyPickerValue,\n WklyValidationError,\n} from \"@wkly/adapters\";\nimport {\n WKLY_CLOCK,\n WKLY_CONFIG,\n WKLY_LOCALIZATION,\n WKLY_TRANSLATIONS,\n WklyClock,\n WklyCloseReason,\n WklyConfiguration,\n WklyJumpOptions,\n WklyPickerInputs,\n unwrapWklyPickerSignalInputs,\n WklyStrings,\n WklyTranslations,\n} from \"./config\";\ndeclare class ResizeObserver {\n constructor(callback: () => void);\n observe(element: Element): void;\n disconnect(): void;\n}\n@Component({\n selector: \"wkly-datetime-picker\",\n standalone: false,\n templateUrl: \"./picker.component.html\",\n styleUrls: [\"../../wkly-datetime-picker/src/picker.component.css\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WklyDateTimePickerComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => WklyDateTimePickerComponent),\n multi: true,\n },\n ],\n})\nexport class WklyDateTimePickerComponent\n extends WklyPickerInputs\n implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator\n{\n @ViewChild(\"scroller\") scroller?: ElementRef<HTMLElement>;\n presentation: \"inline\" | \"transient\" = \"inline\";\n viewMode: \"calendar\" | \"manual\" = \"calendar\";\n endView: \"date\" | \"days\" = \"date\";\n adapter!: WklyCalendarAdapter;\n effectiveLocale = \"en-US\";\n effectiveOffset: WklyWeekOffset = 0;\n effectiveHourCycle: \"h12\" | \"h24\" = \"h24\";\n private configuredHourCycle?: WklyHourCycle;\n direction = \"ltr\";\n rows: Row[] = [];\n weekdays: string[] = [];\n drafts: Draft[] = [];\n errors: readonly WklyValidationError[] = [];\n today = 0;\n focused = 0;\n anchorWeek = 0;\n firstWeek = 0;\n visibleCount = 6;\n rowHeight = 76;\n scrollHeight = 152076;\n paddingTop = 0;\n initialized = false;\n compact = false;\n readonly WklyPickerInputsPropertyKeys = WklyPickerInputsPropertyKeys;\n private baseWeek = 0;\n private firstSupportedDay = 0;\n private lastSupportedDay = 0;\n private firstSupportedWeek = 0;\n private lastSupportedWeek = 0;\n private generator!: WklyWeekGenerator;\n private initialMonth = \"\";\n private clipMonth = false;\n private browser = false;\n private observer?: ResizeObserver;\n private destroyed = false;\n private scrollEndTimer?: ReturnType<typeof setTimeout>;\n private snapPending = false;\n private onChange: (value: WklyPickerValue) => void = () => {};\n private onTouched: () => void = () => {};\n private validatorChanged: () => void = () => {};\n private configErrors: WklyValidationError[] = [];\n private pendingValue: WklyPickerValue = null;\n private emittedValue: string | null = null;\n private manualDateEndpoint = 0;\n private readonly formValue = signal<WklyPickerValue | undefined>(undefined);\n private readonly formDisabled = signal(false);\n private previousInputs?: WklyPickerInputsContract;\n currentValue(): WklyPickerValue {\n return this.formValue() === undefined\n ? this[WklyPickerInputsPropertyKeys.Value]()\n : this.formValue()!;\n }\n isDisabled(): boolean {\n return this[WklyPickerInputsPropertyKeys.Disabled]() || this.formDisabled();\n }\n constructor(\n @Inject(LOCALE_ID) private defaultLocale: string,\n @Inject(WKLY_CONFIG) private defaults: WklyConfiguration,\n @Inject(WKLY_CLOCK) private clock: WklyClock,\n @Inject(WKLY_LOCALIZATION) private strings: WklyStrings,\n @Inject(WKLY_TRANSLATIONS) private defaultTranslations: WklyTranslations,\n @Inject(PLATFORM_ID) platform: Object,\n private host: ElementRef<HTMLElement>,\n private changeDetector: ChangeDetectorRef,\n ) {\n super();\n this.browser = isPlatformBrowser(platform);\n effect(() => {\n const inputs =\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n const previous = this.previousInputs;\n this.previousInputs = inputs;\n if (!previous || !this.initialized) return;\n const changed = (key: keyof typeof inputs) =>\n !Object.is(previous[key], inputs[key]);\n if (\n !Object.keys(inputs).some((key) => changed(key as keyof typeof inputs))\n )\n return;\n untracked(() => {\n if (changed(WklyPickerInputsPropertyKeys.Value))\n this.formValue.set(undefined);\n if (\n changed(WklyPickerInputsPropertyKeys.Value) &&\n this.emittedValue === JSON.stringify(this.currentValue()) &&\n Object.keys(inputs).every(\n (key) =>\n key === WklyPickerInputsPropertyKeys.Value ||\n !changed(key as keyof typeof inputs),\n )\n ) {\n this.emittedValue = null;\n return;\n }\n const focus = this.focused;\n this.configure();\n if (\n changed(WklyPickerInputsPropertyKeys.Value) ||\n changed(WklyPickerInputsPropertyKeys.Mode) ||\n changed(WklyPickerInputsPropertyKeys.CalendarAdapter)\n ) {\n this.load(this.currentValue());\n this.position(this.focused, true);\n } else {\n this.check();\n if (changed(WklyPickerInputsPropertyKeys.ViewportPreset))\n this.position(focus, true);\n else this.scrollToEpochDay(focus);\n }\n });\n });\n }\n ngOnInit(): void {\n this.initialize();\n }\n initialize(): void {\n if (this.initialized) return;\n this.configure();\n const initialEpochDay =\n this[WklyPickerInputsPropertyKeys.InitialEpochDay]();\n this.today = this.browser\n ? Math.floor(this.clock.now().getTime() / 86400000)\n : initialEpochDay === null\n ? 0\n : initialEpochDay;\n this.focused =\n initialEpochDay === null\n ? this.defaults.initialEpochDay === undefined\n ? this.today\n : this.defaults.initialEpochDay\n : initialEpochDay;\n this.load(this.currentValue());\n this.initialized = true;\n this.position(this.focused, true);\n }\n configure(): void {\n this.configErrors = [];\n this.effectiveLocale =\n this[WklyPickerInputsPropertyKeys.Locale]() ||\n this.defaults.locale ||\n this.defaultLocale;\n this.direction = /^(ar|he|fa|ur)(-|$)/.test(this.effectiveLocale)\n ? \"rtl\"\n : \"ltr\";\n this.adapter =\n this[WklyPickerInputsPropertyKeys.CalendarAdapter]() ||\n new WklyGregorianCalendarAdapter(this.effectiveLocale);\n try {\n let firstDay: number | undefined;\n try {\n firstDay = getLocaleFirstDayOfWeek(this.effectiveLocale);\n } catch (_) {}\n this.effectiveOffset = resolveWeekOffset(\n this.effectiveLocale,\n this[WklyPickerInputsPropertyKeys.WeekOffset](),\n this.defaults.weekOffset,\n firstDay,\n );\n integer(this[WklyPickerInputsPropertyKeys.WeekCacheSize]());\n integer(this[WklyPickerInputsPropertyKeys.OverscanWeeks]());\n if (\n this[WklyPickerInputsPropertyKeys.WeekCacheSize]() < 0 ||\n this[WklyPickerInputsPropertyKeys.OverscanWeeks]() < 0 ||\n this[WklyPickerInputsPropertyKeys.OverscanWeeks]() > 50\n )\n throw new RangeError();\n if (\n ![\n \"datetime\",\n \"date\",\n \"time\",\n \"datetime-range\",\n \"date-range\",\n \"time-range\",\n ].includes(this[WklyPickerInputsPropertyKeys.Mode]())\n )\n throw new RangeError();\n const preset = this[WklyPickerInputsPropertyKeys.ViewportPreset]();\n if (preset.kind === \"weeks\") {\n integer(preset.visibleWeekCount);\n if (preset.visibleWeekCount < 1 || preset.visibleWeekCount > 52)\n throw new RangeError();\n }\n if (preset.kind === \"full-month-and-around\")\n for (const n of [\n preset.extraWeeksBefore || 0,\n preset.extraWeeksAfter || 0,\n ]) {\n integer(n);\n if (n < 0 || n > 52) throw new RangeError();\n }\n this.generator = createWeekGenerator({\n weekOffset: this.effectiveOffset,\n cacheSize: this[WklyPickerInputsPropertyKeys.WeekCacheSize](),\n });\n } catch (_) {\n this.configErrors.push(\n error(\n \"configuration-error\",\n this[WklyPickerInputsPropertyKeys.WeekOffset](),\n ),\n );\n this.generator = createWeekGenerator();\n this.effectiveOffset = 0;\n }\n this.setSupportedScrollRange();\n const hourCycle = this[WklyPickerInputsPropertyKeys.HourCycle]();\n // Host value/configuration feedback must retain the user's switchable format.\n if (hourCycle !== \"switchable\" || this.configuredHourCycle !== hourCycle) {\n this.effectiveHourCycle =\n hourCycle === \"h12\"\n ? \"h12\"\n : hourCycle === \"locale\"\n ? new Intl.DateTimeFormat(this.effectiveLocale, {\n hour: \"numeric\",\n timeZone: \"UTC\",\n }).resolvedOptions().hour12\n ? \"h12\"\n : \"h24\"\n : \"h24\";\n }\n this.configuredHourCycle = hourCycle;\n this.weekdays = Array.from({ length: 7 }, (_, i) =>\n this.adapter.formatWeekday(this.effectiveOffset + i, \"short\"),\n );\n }\n private setSupportedScrollRange(): void {\n let [first, last] = this.adapter.supportedEpochDayRange;\n const [firstYear, lastYear] = this.adapter.supportedYearRange;\n const yearOf = (day: number) => this.adapter.epochDayToDate(day).year;\n if (yearOf(first) < firstYear) {\n let low = first,\n high = last;\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (yearOf(mid) < firstYear) low = mid + 1;\n else high = mid;\n }\n first = low;\n }\n if (yearOf(last) > lastYear) {\n let low = first,\n high = last;\n while (low < high) {\n const mid = Math.ceil((low + high) / 2);\n if (yearOf(mid) > lastYear) high = mid - 1;\n else low = mid;\n }\n last = low;\n }\n if (\n first > last ||\n yearOf(first) < firstYear ||\n yearOf(first) > lastYear ||\n yearOf(last) < firstYear ||\n yearOf(last) > lastYear\n )\n throw new RangeError(\"No supported days within the calendar year range\");\n this.firstSupportedDay = first;\n this.lastSupportedDay = last;\n this.firstSupportedWeek = absoluteWeekOf(first, this.effectiveOffset);\n this.lastSupportedWeek = absoluteWeekOf(last, this.effectiveOffset);\n }\n private clampFirstWeek(week: number): number {\n // Keep supported weeks inside the viewport; renderRows adds the buffer rows.\n const last = Math.max(\n this.firstSupportedWeek,\n this.lastSupportedWeek - this.visibleCount + 1,\n );\n return Math.max(this.firstSupportedWeek, Math.min(last, week));\n }\n ngAfterViewInit(): void {\n this.resetScroll();\n if (this.browser && typeof ResizeObserver !== \"undefined\") {\n this.observer = new ResizeObserver(() => {\n this.compact = this.host.nativeElement.clientWidth < 338;\n const row = this.host.nativeElement.querySelector(\n \".week-row\",\n ) as HTMLElement;\n // CSS heights and scrollTop use layout pixels; client rectangles include zoom.\n const height = row ? parseFloat(getComputedStyle(row).height) : 0;\n if (height && height !== this.rowHeight) {\n this.rowHeight = height;\n this.scrollHeight = this.rowHeight * 2001;\n this.renderRows();\n this.resetScroll();\n }\n });\n this.observer.observe(this.host.nativeElement);\n }\n }\n ngOnDestroy(): void {\n this.destroyed = true;\n if (this.observer) this.observer.disconnect();\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n if (this.generator) this.generator.clearCache();\n }\n t(key: string): string {\n return resolveWklyTranslation(\n key,\n this.effectiveLocale,\n this[WklyPickerInputsPropertyKeys.Translations]() ||\n this.defaultTranslations,\n this.strings,\n );\n }\n get isRange(): boolean {\n return this[WklyPickerInputsPropertyKeys.Mode]().endsWith(\"-range\");\n }\n get hasDate(): boolean {\n return !this[WklyPickerInputsPropertyKeys.Mode]().startsWith(\"time\");\n }\n get hasTime(): boolean {\n return (\n this[WklyPickerInputsPropertyKeys.Mode]() !== \"date\" &&\n this[WklyPickerInputsPropertyKeys.Mode]() !== \"date-range\"\n );\n }\n get submitVisible(): boolean {\n return (\n this.presentation === \"transient\" &&\n (this[WklyPickerInputsPropertyKeys.Mode]() !== \"date\" ||\n this.viewMode === \"manual\")\n );\n }\n get title(): string {\n try {\n const d = this.adapter.epochDayToDate(\n Math.max(\n this.firstSupportedDay,\n Math.min(\n this.lastSupportedDay,\n firstEpochDayOf(this.anchorWeek, this.effectiveOffset),\n ),\n ),\n );\n return this.adapter.formatMonth(d) + \" \" + this.adapter.formatYear(d);\n } catch (_) {\n return \"\";\n }\n }\n get canSubmit(): boolean {\n return (\n !this.isDisabled() && !this.errors.length && this.pendingValue !== null\n );\n }\n private blank(day: number): Draft {\n const safe = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n return {\n date: this.adapter.epochDayToDate(safe),\n hour: 0,\n minute: 0,\n second: 0,\n present: false,\n };\n }\n load(value: WklyPickerValue): void {\n this.drafts = [this.blank(this.focused), this.blank(this.focused)];\n const validation = validateSelection(\n value,\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n this.adapter,\n );\n if (value !== null && !validation.length) {\n const values = typeof value === \"string\" ? [value] : value;\n values.forEach((v, i) => {\n const d = decodeIso(v);\n this.drafts[i] = {\n date: this.hasDate\n ? this.adapter.epochDayToDate(d.epochDay)\n : this.blank(this.today).date,\n hour: d.hour,\n minute: d.minute,\n second: d.second,\n present: true,\n };\n if (i === 0 && this.hasDate) this.focused = d.epochDay;\n });\n }\n if (validation.length) {\n this.pendingValue = null;\n this.report(validation);\n } else this.check();\n }\n writeValue(value: WklyPickerValue): void {\n this.formValue.set(value);\n if (this.initialized) {\n this.load(value);\n this.position(this.focused, true);\n }\n }\n registerOnChange(fn: (value: WklyPickerValue) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(disabled: boolean): void {\n this.formDisabled.set(disabled);\n }\n validate(_control: AbstractControl): ValidationErrors | null {\n return this.errors.length ? { wkly: this.errors } : null;\n }\n registerOnValidatorChange(fn: () => void): void {\n this.validatorChanged = fn;\n }\n touched(): void {\n Promise.resolve().then(() => this.onTouched());\n }\n private report(errors: readonly WklyValidationError[]): void {\n const changed = JSON.stringify(this.errors) !== JSON.stringify(errors);\n this.errors = errors;\n if (changed) {\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(errors);\n this.validatorChanged();\n }\n }\n check(): void {\n const result = validateDrafts({\n drafts: this.drafts,\n configErrors: this.configErrors,\n adapter: this.adapter,\n selection: unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n mode: this[WklyPickerInputsPropertyKeys.Mode](),\n isRange: this.isRange,\n hasDate: this.hasDate,\n hasTime: this.hasTime,\n showSeconds: this[WklyPickerInputsPropertyKeys.ShowSeconds](),\n required: this[WklyPickerInputsPropertyKeys.Required](),\n });\n this.pendingValue = result.pendingValue;\n this.report(result.errors);\n }\n trackDraft(index: number): number {\n // Endpoint controls keep their identity and focus when draft objects swap.\n return index;\n }\n private orderDrafts(): void {\n if (!this.isRange || !this.drafts.every((draft) => draft.present)) return;\n if (this.drafts.some((draft) => draft.unsupportedEpochDay !== undefined))\n return;\n try {\n const a = this.drafts[0],\n b = this.drafts[1];\n const key = (d: Draft) =>\n this.adapter.dateToEpochDay(d.date) * 86400 +\n (d.hour || 0) * 3600 +\n (d.minute || 0) * 60 +\n (d.second || 0);\n if (key(a) > key(b)) this.drafts = [b, a];\n } catch (_) {\n // Impossible or incomplete dates remain editable until corrected.\n }\n }\n finish(): void {\n if (this.isDisabled()) return;\n this.orderDrafts();\n if (this.viewMode === \"manual\" && this.hasDate) this.positionOnManualDate();\n this.check();\n if (this.presentation === \"inline\" && this.canSubmit) this.commit();\n }\n private commit(): void {\n if (!this.canSubmit) return;\n const next = this.pendingValue;\n if (JSON.stringify(next) !== JSON.stringify(this.currentValue())) {\n this.formValue.set(next);\n this.emittedValue = JSON.stringify(next);\n this.onChange(next);\n this[WklyPickerOutputsPropertyKeys.ValueChange].emit(next);\n }\n this.onTouched();\n }\n submit(reason: WklyCloseReason = \"submit\"): void {\n this.check();\n if (!this.canSubmit) return;\n this.commit();\n if (this.presentation === \"transient\")\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n cancel(reason: WklyCloseReason = \"close-button\"): void {\n if (this.isDisabled()) return;\n this.load(this.currentValue());\n this.onTouched();\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n now(): void {\n if (this.isDisabled()) return;\n const n = this.clock.now();\n const day = Math.floor(n.getTime() / 86400000);\n this.drafts = [0, 1].map((index) => ({\n ...this.clockDraft(day, n),\n present: index === 0 || this.isRange,\n }));\n if (\n this.hasDate &&\n (day < this.firstSupportedDay || day > this.lastSupportedDay)\n ) {\n this.report([error(\"unsupported-adapter-date\", day)]);\n return;\n }\n this.focused = day;\n this.position(day, true);\n this.check();\n this.submit(\"now\");\n }\n private clockDraft(day: number, now: Date): Draft {\n return {\n ...this.blank(day),\n hour: now.getUTCHours(),\n minute:\n Math.floor(\n now.getUTCMinutes() / this[WklyPickerInputsPropertyKeys.MinuteStep](),\n ) * this[WklyPickerInputsPropertyKeys.MinuteStep](),\n second: this[WklyPickerInputsPropertyKeys.ShowSeconds]()\n ? Math.floor(\n now.getUTCSeconds() /\n this[WklyPickerInputsPropertyKeys.SecondStep](),\n ) * this[WklyPickerInputsPropertyKeys.SecondStep]()\n : 0,\n };\n }\n private initializeManualRange(): void {\n if (\n !this.isRange ||\n !this.hasDate ||\n this.drafts.every((draft) => draft.present)\n )\n return;\n let seed = this.drafts.find((draft) => draft.present);\n if (!seed) {\n if (this.currentValue() !== null) return;\n const now = this.clock.now();\n const initialEpochDay =\n this[WklyPickerInputsPropertyKeys.InitialEpochDay]();\n const day =\n initialEpochDay === null\n ? this.defaults.initialEpochDay === undefined\n ? Math.floor(now.getTime() / 86400000)\n : this.defaults.initialEpochDay\n : initialEpochDay;\n seed = { ...this.clockDraft(day, now), present: true };\n }\n // Complete missing endpoints without replacing selected or invalid drafts.\n const initial = seed;\n this.drafts = this.drafts.map((draft) =>\n draft.present ? draft : { ...initial, date: { ...initial.date } },\n );\n this.finish();\n // Positioning renders before validation; refresh completion controls afterward.\n this.changeDetector.markForCheck();\n }\n toggleView(): void {\n if (this.isDisabled() || !this.hasDate) return;\n this.viewMode = this.viewMode === \"calendar\" ? \"manual\" : \"calendar\";\n if (this.viewMode === \"manual\") this.initializeManualRange();\n if (this.viewMode === \"calendar\") this.positionOnManualDate();\n this[WklyPickerOutputsPropertyKeys.ViewModeChange].emit(this.viewMode);\n if (this.viewMode === \"calendar\") setTimeout(() => this.resetScroll());\n }\n private positionOnManualDate(): void {\n const draft = this.drafts[this.manualDateEndpoint];\n if (!draft || !draft.present) return;\n try {\n // A valid day follows the selection. An impossible day keeps its draft\n // fields but still shows the chosen month in the calendar.\n const target = this.adapter.dateToEpochDay(draft.date);\n this.focused = target;\n this.position(target, true);\n } catch (_) {\n try {\n const first = this.adapter.dateToEpochDay({ ...draft.date, day: 1 });\n this.focused = first;\n this.position(first, true);\n } catch (_) {}\n }\n }\n months(draft: Draft): readonly string[] {\n try {\n return this.adapter.getMonths(draft.date.year).map((m) => m.label);\n } catch (_) {\n return [];\n }\n }\n monthCount(draft: Draft): number {\n return this.months(draft).length || 12;\n }\n get inDays(): number | null {\n return draftDayDifference(this.drafts, this.adapter);\n }\n get inDaysLabel(): string {\n const days = this.inDays;\n return this.t(\"inDays\").replace(\n /{{\\s*days\\s*}}/g,\n days === null\n ? this.t(\"daysUnavailable\")\n : new Intl.NumberFormat(this.effectiveLocale, {\n useGrouping: false,\n }).format(days),\n );\n }\n get resultingEndDate(): string {\n try {\n const draft = this.drafts[1];\n if (\n draft.unsupportedEpochDay !== undefined ||\n this.adapter.validateDate(draft.date).length\n )\n return \"\";\n return [\n this.adapter.formatDay(draft.date),\n this.adapter.formatMonth(draft.date),\n this.adapter.formatYear(draft.date),\n ].join(\" \");\n } catch (_) {\n return \"\";\n }\n }\n toggleEndView(view: \"date\" | \"days\"): void {\n if (this.isDisabled()) return;\n this.endView = view;\n }\n days(value: number | null): void {\n if (this.isDisabled()) return;\n this.manualDateEndpoint = 1;\n setDraftDayDifference(this.drafts, this.adapter, value);\n this.check();\n }\n field(index: number, field: string, value: number | null): void {\n if (this.isDisabled()) return;\n const draft = this.drafts[index];\n draft.present = true;\n if (field === \"day\" || field === \"year\" || field === \"month\") {\n this.manualDateEndpoint = index;\n delete draft.unsupportedEpochDay;\n let date = { ...draft.date, [field]: value } as WklyCalendarDate;\n if (field === \"month\") {\n let month;\n try {\n month = this.adapter\n .getMonths(date.year)\n .find((m) => m.month === value);\n } catch (_) {}\n date = { ...date, monthCode: month ? month.monthCode : \"\" };\n }\n if (field === \"year\" && value !== null) {\n try {\n const months = this.adapter.getMonths(value);\n const month = months.find((m) => m.monthCode === date.monthCode);\n if (month) date = { ...date, month: month.month };\n } catch (_) {}\n }\n draft.date = date;\n } else if (field === \"hour\" && this.effectiveHourCycle === \"h12\")\n draft.hour =\n value === null\n ? null\n : value >= 1 && value <= 12\n ? (value % 12) + ((draft.hour || 0) >= 12 ? 12 : 0)\n : 24 + value;\n else (draft as any)[field] = value;\n this.check();\n }\n displayHour(draft: Draft): number | null {\n return draft.hour === null\n ? null\n : this.effectiveHourCycle === \"h12\"\n ? draft.hour % 12 || 12\n : draft.hour;\n }\n period(index: number, period: \"am\" | \"pm\" | \"24\"): void {\n if (this.isDisabled()) return;\n if (period === \"24\") this.effectiveHourCycle = \"h24\";\n else {\n this.effectiveHourCycle = \"h12\";\n this.drafts[index].hour =\n ((this.drafts[index].hour || 0) % 12) + (period === \"pm\" ? 12 : 0);\n this.drafts[index].present = true;\n this.finish();\n }\n }\n selected(day: number): boolean {\n return this.drafts.some((d) => {\n try {\n return d.present && this.adapter.dateToEpochDay(d.date) === day;\n } catch (_) {\n return false;\n }\n });\n }\n inRange(day: number): boolean {\n if (!this.isRange || !this.drafts.every((d) => d.present)) return false;\n try {\n const a = this.adapter.dateToEpochDay(this.drafts[0].date),\n b = this.adapter.dateToEpochDay(this.drafts[1].date);\n return day > Math.min(a, b) && day < Math.max(a, b);\n } catch (_) {\n return false;\n }\n }\n dayDisabled(day: number): boolean {\n if (day < this.firstSupportedDay || day > this.lastSupportedDay)\n return true;\n try {\n const date = this.adapter.epochDayToDate(day);\n const isDateDisabled =\n this[WklyPickerInputsPropertyKeys.IsDateDisabled]();\n if (\n isDateDisabled &&\n isDateDisabled(day, {\n mode: this[WklyPickerInputsPropertyKeys.Mode](),\n endpoint: this.isRange\n ? this.drafts[0]?.present && !this.drafts[1]?.present\n ? \"end\"\n : \"start\"\n : \"single\",\n calendarDate: date,\n })\n )\n return true;\n const min = this[WklyPickerInputsPropertyKeys.Min](),\n max = this[WklyPickerInputsPropertyKeys.Max]();\n if (min && day < decodeIso(min).epochDay) return true;\n if (max && day > decodeIso(max).epochDay) return true;\n return false;\n } catch (_) {\n return true;\n }\n }\n select(day: number): void {\n if (this.isDisabled() || this.dayDisabled(day)) return;\n this.focused = day;\n const index =\n this.isRange && this.drafts[0].present && !this.drafts[1].present ? 1 : 0;\n if (this.isRange && index === 0) this.drafts[1].present = false;\n delete this.drafts[index].unsupportedEpochDay;\n this.drafts[index].date = this.adapter.epochDayToDate(day);\n this.drafts[index].present = true;\n this.orderDrafts();\n this.renderRows();\n this.finish();\n if (\n this.presentation === \"transient\" &&\n this[WklyPickerInputsPropertyKeys.Mode]() === \"date\" &&\n this.viewMode === \"calendar\"\n )\n this.submit(\"auto-submit\");\n }\n key(event: KeyboardEvent, day: number): void {\n let delta = 0;\n if (event.key === \"ArrowLeft\") delta = -1;\n if (event.key === \"ArrowRight\") delta = 1;\n if (event.key === \"ArrowUp\") delta = -7;\n if (event.key === \"ArrowDown\") delta = 7;\n if (event.key === \"PageUp\")\n delta = -7 * (event.shiftKey ? this.visibleCount : 1);\n if (event.key === \"PageDown\")\n delta = 7 * (event.shiftKey ? this.visibleCount : 1);\n if (event.key === \"Home\") {\n event.preventDefault();\n this.scrollToEpochDay(this.today, { focus: true });\n }\n if (delta) {\n event.preventDefault();\n const target = day + delta;\n if (target >= this.firstSupportedDay && target <= this.lastSupportedDay)\n this.scrollToEpochDay(target, { focus: true });\n }\n }\n private position(\n day: number,\n preset = false,\n options: WklyJumpOptions = {},\n ): void {\n day = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n this.anchorWeek = absoluteWeekOf(day, this.effectiveOffset);\n const viewportPreset = this[WklyPickerInputsPropertyKeys.ViewportPreset]();\n this.clipMonth = preset && viewportPreset.kind === \"full-month\";\n if (preset && viewportPreset.kind !== \"weeks\") {\n const d = this.adapter.epochDayToDate(day);\n this.initialMonth = d.year + \"/\" + d.monthCode;\n const [start, end] = calendarMonthBounds(this.adapter, day);\n this.firstWeek = absoluteWeekOf(start, this.effectiveOffset);\n this.visibleCount =\n absoluteWeekOf(end, this.effectiveOffset) - this.firstWeek + 1;\n if (\n viewportPreset.kind === \"full-month-and-around\" &&\n !this.configErrors.length\n ) {\n const before = viewportPreset.extraWeeksBefore || 0,\n after = viewportPreset.extraWeeksAfter || 0;\n this.firstWeek -= before;\n this.visibleCount += before + after;\n }\n } else {\n if (viewportPreset.kind === \"weeks\")\n this.visibleCount = this.configErrors.length\n ? 6\n : viewportPreset.visibleWeekCount;\n this.firstWeek =\n this.anchorWeek -\n (options.align === \"start\"\n ? 0\n : options.align === \"end\"\n ? this.visibleCount - 1\n : Math.floor(this.visibleCount / 2));\n }\n this.firstWeek = this.clampFirstWeek(this.firstWeek);\n this.baseWeek = this.firstWeek - 1000;\n this.renderRows();\n // Apply the new runway before writing scrollTop or locating a focus target.\n this.changeDetector.detectChanges();\n this.resetScroll();\n }\n private resetScroll(): void {\n // Round week boundaries to avoid scrollTop truncation under CSS zoom.\n if (this.scroller)\n this.scroller.nativeElement.scrollTop = Math.round(1000 * this.rowHeight);\n }\n scroll(event: Event): void {\n const element = event.target as HTMLElement;\n this.snapPending = true;\n this.scheduleSnap();\n // Quantize displacement around the reset point, equally in both directions.\n const relativeRows = element.scrollTop / this.rowHeight - 1000;\n const index =\n 1000 + Math.sign(relativeRows) * Math.round(Math.abs(relativeRows));\n const requestedFirst = this.baseWeek + index;\n const first = this.clampFirstWeek(requestedFirst);\n if (requestedFirst !== first) {\n element.scrollTop = Math.round((first - this.baseWeek) * this.rowHeight);\n }\n if (first === this.firstWeek) return;\n this.clipMonth = false;\n this.firstWeek = first;\n this.anchorWeek = first + Math.floor(this.visibleCount / 2);\n if (index < 100 || index > 1900) {\n // Preserve signed displacement from this week; modulo turns fractional\n // rounding just below a boundary into almost a full row after rebasing.\n const offset =\n element.scrollTop - (first - this.baseWeek) * this.rowHeight;\n this.baseWeek = first - 1000;\n element.scrollTop = Math.round(1000 * this.rowHeight + offset);\n }\n this.renderRows();\n }\n private scheduleSnap(): void {\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n this.scrollEndTimer = setTimeout(() => this.snapWeek(), 200);\n }\n snapWeek(): void {\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n this.scrollEndTimer = undefined;\n if (!this.snapPending || !this.scroller) return;\n this.snapPending = false;\n // Align the current virtual week without rebuilding or rebasing its rows.\n const element = this.scroller.nativeElement;\n const target = Math.round(\n (this.firstWeek - this.baseWeek) * this.rowHeight,\n );\n if (element.scrollTop !== target) element.scrollTop = target;\n }\n private showFirstWeek(week: number): void {\n const first = this.clampFirstWeek(week);\n if (first === this.firstWeek) return;\n this.clipMonth = false;\n this.firstWeek = first;\n this.anchorWeek = first + Math.floor(this.visibleCount / 2);\n this.baseWeek = first - 1000;\n this.renderRows();\n this.resetScroll();\n }\n canMoveWeek(delta: number): boolean {\n return this.clampFirstWeek(this.firstWeek + delta) !== this.firstWeek;\n }\n moveWeek(delta: number): void {\n if (!this.isDisabled()) this.showFirstWeek(this.firstWeek + delta);\n }\n private renderRows(): void {\n // Keep the virtual scroll offset here; row data is shared across Angular versions.\n const overscan = Math.max(\n 0,\n Math.min(50, this[WklyPickerInputsPropertyKeys.OverscanWeeks]() || 0),\n );\n const start = this.firstWeek - overscan;\n this.paddingTop = (start - this.baseWeek) * this.rowHeight;\n this.rows = createWeekRows({\n generator: this.generator,\n adapter: this.adapter,\n startWeek: start,\n count: this.visibleCount + 2 * overscan,\n firstVisibleWeek: this.firstWeek,\n firstSupportedDay: this.firstSupportedDay,\n lastSupportedDay: this.lastSupportedDay,\n clipMonth: this.clipMonth,\n initialMonth: this.initialMonth,\n weekLabelMode: this[WklyPickerInputsPropertyKeys.WeekLabelMode](),\n weekLabelFormatter:\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]() || null,\n isDayDisabled: (day) => this.dayDisabled(day),\n });\n this[WklyPickerOutputsPropertyKeys.ViewportChange].emit({\n firstVisibleAbsoluteWeek: this.firstWeek,\n lastVisibleAbsoluteWeek: this.firstWeek + this.visibleCount - 1,\n anchorAbsoluteWeek: this.anchorWeek,\n });\n }\n // Retain day DOM nodes and keyboard focus when row metadata is regenerated.\n trackCell(_i: number, cell: { epochDay: number }): number {\n return cell.epochDay;\n }\n trackRow(_i: number, row: Row): number {\n return row.week.absoluteWeek;\n }\n scrollToEpochDay(day: number, options: WklyJumpOptions = {}): void {\n integer(day);\n this.adapter.epochDayToDate(day);\n day = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n // position renders synchronously; publish the tab stop before that render.\n if (options.focus) this.focused = day;\n this.position(day, false, options);\n if (options.select) this.select(day);\n if (options.focus) this.focusDay();\n }\n scrollToAbsoluteWeek(week: number, options: WklyJumpOptions = {}): void {\n // A boundary week can start before the adapter's first supported day.\n const first = firstEpochDayOf(week, this.effectiveOffset);\n this.scrollToEpochDay(\n week === this.firstSupportedWeek\n ? Math.max(first, this.firstSupportedDay)\n : first,\n options,\n );\n }\n scrollToCalendarDate(\n date: WklyCalendarDate,\n options: WklyJumpOptions = {},\n ): void {\n this.scrollToEpochDay(this.adapter.dateToEpochDay(date), options);\n }\n scrollToValue(value: string, options: WklyJumpOptions = {}): void {\n this.scrollToEpochDay(decodeIso(value).epochDay, options);\n }\n focusDay(): void {\n if (!this.browser) return;\n setTimeout(() => {\n if (this.destroyed) return;\n this.changeDetector.detectChanges();\n const day = this.host.nativeElement.querySelector(\n '[data-day=\"' + this.focused + '\"]',\n ) as HTMLElement;\n const fallback = this.host.nativeElement.querySelector(\n \"button:not(:disabled),input:not(:disabled)\",\n ) as HTMLElement;\n (day || fallback)?.focus({ preventScroll: true });\n });\n }\n}\n","<section\n class=\"wkly\"\n [attr.dir]=\"direction\"\n [attr.aria-label]=\"\n this[WklyPickerInputsPropertyKeys.AriaLabel]() || 'Date and time picker'\n \"\n [attr.aria-describedby]=\"this[WklyPickerInputsPropertyKeys.AriaDescribedBy]()\"\n (focusout)=\"touched()\"\n>\n <header class=\"toolbar\">\n @if (hasDate) {\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"t(viewMode === 'calendar' ? 'manual' : 'calendar')\"\n (click)=\"toggleView()\"\n >\n {{ viewMode === \"calendar\" ? \"☷\" : \"▦\" }}\n </button>\n }\n @if (hasDate) {\n <span class=\"year-control\">{{ title }}</span>\n }\n <span class=\"spacer\"></span\n ><button\n type=\"button\"\n class=\"now\"\n [disabled]=\"isDisabled()\"\n (click)=\"now()\"\n >\n {{ t(\"now\") }}\n </button>\n @if (presentation === \"transient\") {\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"t('close')\"\n (click)=\"cancel()\"\n >\n ×\n </button>\n }\n </header>\n <ng-container *ngIf=\"hasDate && viewMode === 'calendar'\">\n <div\n role=\"grid\"\n [attr.aria-label]=\"\n this[WklyPickerInputsPropertyKeys.AriaLabel]() || 'Calendar'\n \"\n [attr.aria-multiselectable]=\"isRange\"\n >\n <div\n role=\"row\"\n class=\"week-head\"\n [class.no-label]=\"\n compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() === 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n >\n <span\n *ngIf=\"\n !compact &&\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() !== 'hidden' ||\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n role=\"columnheader\"\n aria-label=\"Week\"\n ></span>\n @for (day of weekdays; track $index) {\n <span role=\"columnheader\">{{ day }}</span>\n }\n </div>\n <div\n #scroller\n class=\"week-scroll\"\n [style.height.px]=\"visibleCount * rowHeight\"\n (scroll)=\"scroll($event)\"\n (scrollend)=\"snapWeek()\"\n >\n <div [style.height.px]=\"scrollHeight\" class=\"scroll-space\">\n <div class=\"rows\" [style.top.px]=\"paddingTop\">\n <div\n *ngFor=\"let row of rows; trackBy: trackRow\"\n role=\"row\"\n class=\"week-row\"\n [class.no-label]=\"\n compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() ===\n 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n >\n <span\n *ngIf=\"\n !compact &&\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() !==\n 'hidden' ||\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n role=\"rowheader\"\n class=\"week-number\"\n >{{ row.label }}</span\n >\n <div\n *ngFor=\"\n let cell of row.cells;\n let dayIndex = index;\n trackBy: trackCell\n \"\n role=\"gridcell\"\n [attr.data-weekday-index]=\"dayIndex\"\n [attr.aria-colindex]=\"\n dayIndex +\n (compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() ===\n 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n ? 1\n : 2)\n \"\n [attr.aria-selected]=\"selected(cell.epochDay)\"\n [attr.aria-disabled]=\"cell.disabled || isDisabled()\"\n [class.range]=\"inRange(cell.epochDay)\"\n [class.hidden]=\"cell.hidden\"\n [class.odd-month]=\"cell.date && cell.date.month % 2 === 1\"\n >\n <span [class]=\"'annotation annotation--' + dayIndex\">{{\n cell.annotation\n }}</span>\n <button\n type=\"button\"\n class=\"day\"\n [attr.data-day]=\"cell.epochDay\"\n [attr.aria-label]=\"cell.accessible\"\n [attr.aria-current]=\"cell.epochDay === today ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled || isDisabled()\"\n [attr.tabindex]=\"\n !cell.hidden && cell.epochDay === focused ? 0 : -1\n \"\n [class.selected]=\"selected(cell.epochDay)\"\n [class.today]=\"cell.epochDay === today\"\n (focus)=\"focused = cell.epochDay\"\n (click)=\"select(cell.epochDay)\"\n (keydown)=\"key($event, cell.epochDay)\"\n >\n {{ cell.label }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"week-navigation\">\n <button\n type=\"button\"\n [disabled]=\"isDisabled() || !canMoveWeek(-1)\"\n [attr.aria-label]=\"t('previous')\"\n (click)=\"moveWeek(-1)\"\n >\n ↑</button\n ><span>{{ title }}</span\n ><button\n type=\"button\"\n [disabled]=\"isDisabled() || !canMoveWeek(1)\"\n [attr.aria-label]=\"t('next')\"\n (click)=\"moveWeek(1)\"\n >\n ↓\n </button>\n </div>\n </ng-container>\n <ng-container\n *ngFor=\"let draft of drafts; let i = index; trackBy: trackDraft\"\n >\n <fieldset\n *ngIf=\"(i === 0 || isRange) && (hasTime || viewMode === 'manual')\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"isRange ? t(i === 0 ? 'start' : 'end') : null\"\n >\n <legend *ngIf=\"isRange\">\n <ng-container\n *ngIf=\"\n i === 1 && hasDate && viewMode === 'manual';\n else endpointLabel\n \"\n >\n <span class=\"end-view-toggle\">\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"endView === 'date'\"\n (click)=\"toggleEndView('date')\"\n >\n {{ t(\"end\") }}\n </button>\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"endView === 'days'\"\n (click)=\"toggleEndView('days')\"\n >\n {{ inDaysLabel }}\n </button>\n </span>\n </ng-container>\n <ng-template #endpointLabel>{{\n t(i === 0 ? \"start\" : \"end\")\n }}</ng-template>\n </legend>\n <div\n *ngIf=\"\n i === 1 && hasDate && viewMode === 'manual' && endView === 'days'\n \"\n class=\"date-fields in-days-fields\"\n >\n <span class=\"resulting-end-date\" [attr.aria-label]=\"t('endDate')\">{{\n resultingEndDate\n }}</span>\n <wkly-field\n [label]=\"t('days')\"\n [hideLabel]=\"true\"\n [previousLabel]=\"t('daysPrevious')\"\n [nextLabel]=\"t('daysNext')\"\n [locale]=\"effectiveLocale\"\n [value]=\"inDays\"\n [min]=\"-9999\"\n [max]=\"9999\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"days($event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n </div>\n <div\n *ngIf=\"\n hasDate && viewMode === 'manual' && (i === 0 || endView === 'date')\n \"\n class=\"date-fields\"\n >\n <wkly-field\n [label]=\"t('day')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.day\"\n [min]=\"1\"\n [max]=\"31\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'day', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('month')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.month\"\n [min]=\"1\"\n [max]=\"monthCount(draft)\"\n [labels]=\"months(draft)\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'month', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('year')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.year\"\n [min]=\"adapter.supportedYearRange[0]\"\n [max]=\"adapter.supportedYearRange[1]\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'year', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n </div>\n <div\n *ngIf=\"hasTime\"\n class=\"time-fields\"\n [class.seconds]=\"this[WklyPickerInputsPropertyKeys.ShowSeconds]()\"\n >\n <wkly-field\n [label]=\"t('hour')\"\n [locale]=\"effectiveLocale\"\n [value]=\"displayHour(draft)\"\n [min]=\"effectiveHourCycle === 'h12' ? 1 : 0\"\n [max]=\"effectiveHourCycle === 'h12' ? 12 : 23\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'hour', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('minute')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.minute\"\n [max]=\"59\"\n [step]=\"\n this[WklyPickerInputsPropertyKeys.MinuteStep]() > 0 &&\n 60 % this[WklyPickerInputsPropertyKeys.MinuteStep]() === 0\n ? this[WklyPickerInputsPropertyKeys.MinuteStep]()\n : 1\n \"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'minute', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n *ngIf=\"this[WklyPickerInputsPropertyKeys.ShowSeconds]()\"\n [label]=\"t('second')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.second\"\n [max]=\"59\"\n [step]=\"\n this[WklyPickerInputsPropertyKeys.SecondStep]() > 0 &&\n 60 % this[WklyPickerInputsPropertyKeys.SecondStep]() === 0\n ? this[WklyPickerInputsPropertyKeys.SecondStep]()\n : 1\n \"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'second', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <div class=\"period\">\n <button\n *ngIf=\"\n effectiveHourCycle === 'h12' ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() === 'switchable'\n \"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"\n effectiveHourCycle === 'h12' && (draft.hour || 0) < 12\n \"\n (click)=\"period(i, 'am')\"\n >\n {{ t(\"am\") }}</button\n ><button\n type=\"button\"\n [disabled]=\"\n isDisabled() ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() !== 'switchable'\n \"\n [attr.aria-pressed]=\"effectiveHourCycle === 'h24'\"\n (click)=\"period(i, '24')\"\n >\n 24</button\n ><button\n *ngIf=\"\n effectiveHourCycle === 'h12' ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() === 'switchable'\n \"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"\n effectiveHourCycle === 'h12' && (draft.hour || 0) >= 12\n \"\n (click)=\"period(i, 'pm')\"\n >\n {{ t(\"pm\") }}\n </button>\n </div>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"validation\" role=\"status\" aria-live=\"polite\">\n <p *ngFor=\"let err of errors\">! {{ t(err.messageKey) }}</p>\n </div>\n <footer *ngIf=\"submitVisible\">\n <button\n type=\"button\"\n class=\"confirm\"\n [disabled]=\"!canSubmit\"\n (click)=\"submit()\"\n >\n {{ t(\"confirm\") }}\n </button>\n </footer>\n</section>\n","import {\n ApplicationRef,\n ComponentRef,\n createComponent,\n Directive,\n ElementRef,\n EnvironmentInjector,\n effect,\n forwardRef,\n HostListener,\n Inject,\n Injectable,\n Injector,\n OnDestroy,\n Optional,\n PLATFORM_ID,\n signal,\n untracked,\n} from \"@angular/core\";\nimport { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\nimport {\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport {\n validateSelection,\n WklyGregorianCalendarAdapter,\n WklyCalendarDate,\n WklyPickerValue,\n WklyValidationError,\n} from \"@wkly/adapters\";\nimport {\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nimport {\n WklyCloseReason,\n WklyJumpOptions,\n WklyPickerInputs,\n unwrapWklyPickerSignalInputs,\n} from \"./config\";\nimport { WklyDateTimePickerComponent } from \"./picker.component\";\nexport interface WklyPresentationRef {\n readonly component: ComponentRef<WklyDateTimePickerComponent>;\n destroy(): void;\n}\n/** Native-dialog factory. Browser resources are allocated only by open(). */\n@Injectable({ providedIn: \"root\" })\nexport class WklyDateTimePickerDialogService {\n constructor(\n private environmentInjector: EnvironmentInjector,\n private app: ApplicationRef,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: Object,\n ) {}\n open(\n trigger: HTMLElement,\n onCancel: (reason: WklyCloseReason) => void,\n backdrop = true,\n injector?: Injector,\n ): WklyPresentationRef {\n if (!isPlatformBrowser(this.platform))\n throw new Error(\"Picker presentations can only open in a browser\");\n const dialog = this.document.createElement(\"dialog\");\n dialog.setAttribute(\"aria-label\", \"Date and time picker\");\n Object.assign(dialog.style, {\n padding: \"0\",\n border: \"0\",\n borderRadius: \"14px\",\n width: \"min(390px, 100vw)\",\n maxWidth: \"100vw\",\n maxHeight: \"94vh\",\n background: \"transparent\",\n });\n const component = createComponent(WklyDateTimePickerComponent, {\n environmentInjector: this.environmentInjector,\n elementInjector: injector,\n });\n component.instance.presentation = \"transient\";\n dialog.appendChild(component.location.nativeElement);\n this.document.body.appendChild(dialog);\n this.app.attachView(component.hostView);\n const cancel = (event: Event) => {\n event.preventDefault();\n onCancel(\"escape\");\n };\n const click = (event: MouseEvent) => {\n if (backdrop && event.target === dialog) {\n const r = dialog.getBoundingClientRect();\n if (\n event.clientX < r.left ||\n event.clientX > r.right ||\n event.clientY < r.top ||\n event.clientY > r.bottom\n )\n onCancel(\"backdrop\");\n }\n };\n const keydown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") return;\n const controls = Array.from(\n dialog.querySelectorAll<HTMLElement>(\n 'button:not(:disabled),input:not(:disabled),[tabindex=\"0\"]',\n ),\n ).filter(\n (el) =>\n el.tabIndex >= 0 &&\n el.getClientRects().length &&\n getComputedStyle(el).visibility !== \"hidden\",\n );\n const first = controls[0],\n last = controls[controls.length - 1];\n if (\n first &&\n (event.shiftKey\n ? this.document.activeElement === first\n : this.document.activeElement === last)\n ) {\n event.preventDefault();\n (event.shiftKey ? last : first).focus();\n }\n };\n dialog.addEventListener(\"cancel\", cancel);\n dialog.addEventListener(\"click\", click);\n dialog.addEventListener(\"keydown\", keydown);\n dialog.showModal();\n return {\n component,\n destroy: () => {\n dialog.removeEventListener(\"cancel\", cancel);\n dialog.removeEventListener(\"click\", click);\n dialog.removeEventListener(\"keydown\", keydown);\n dialog.close();\n this.app.detachView(component.hostView);\n component.destroy();\n dialog.remove();\n trigger.focus();\n },\n };\n }\n}\n/** Shared trigger lifecycle; optional presentation packages extend this class. */\n@Directive()\nexport abstract class WklyTriggerBase\n extends WklyPickerInputs\n implements ControlValueAccessor, Validator, OnDestroy\n{\n protected ref: WklyPresentationRef | null = null;\n protected subscriptions: { unsubscribe(): void }[] = [];\n private errors: readonly WklyValidationError[] = [];\n private change: (value: WklyPickerValue) => void = () => {};\n private touched: () => void = () => {};\n private validation: () => void = () => {};\n private readonly formValue = signal<WklyPickerValue | undefined>(undefined);\n private readonly formDisabled = signal(false);\n private previousInputs?: WklyPickerInputsContract;\n private currentValue(): WklyPickerValue {\n return this.formValue() === undefined\n ? this[WklyPickerInputsPropertyKeys.Value]()\n : this.formValue()!;\n }\n private isDisabled(): boolean {\n return this[WklyPickerInputsPropertyKeys.Disabled]() || this.formDisabled();\n }\n constructor(protected element: ElementRef<HTMLElement>) {\n super();\n effect(() => {\n const inputs =\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n const previous = this.previousInputs;\n this.previousInputs = inputs;\n untracked(() => {\n if (\n previous &&\n !Object.is(\n previous[WklyPickerInputsPropertyKeys.Value],\n inputs[WklyPickerInputsPropertyKeys.Value],\n )\n )\n this.formValue.set(undefined);\n if (\n !previous ||\n Object.keys(inputs).some(\n (key) =>\n !Object.is(\n previous[key as keyof typeof inputs],\n inputs[key as keyof typeof inputs],\n ),\n )\n ) {\n this.checkValue();\n this.display();\n if (this.ref) {\n this.copy();\n this.ref.component.changeDetectorRef.detectChanges();\n }\n }\n });\n });\n }\n protected abstract create(): WklyPresentationRef;\n @HostListener(\"click\") open(): void {\n if (this.isDisabled() || this.ref) return;\n this.ref = this.create();\n const picker = this.ref.component.instance;\n this.copy();\n this.subscriptions = [\n picker[WklyPickerOutputsPropertyKeys.ValueChange].subscribe((value) => {\n this.formValue.set(value);\n this.change(value);\n this[WklyPickerOutputsPropertyKeys.ValueChange].emit(value);\n this.display();\n }),\n picker[WklyPickerOutputsPropertyKeys.ValidationChange].subscribe(\n (errors) => {\n this.errors = errors;\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(errors);\n this.validation();\n },\n ),\n picker[WklyPickerOutputsPropertyKeys.Closed].subscribe((reason) =>\n this.close(reason),\n ),\n picker[WklyPickerOutputsPropertyKeys.ViewportChange].subscribe((value) =>\n this[WklyPickerOutputsPropertyKeys.ViewportChange].emit(value),\n ),\n picker[WklyPickerOutputsPropertyKeys.ViewModeChange].subscribe((value) =>\n this[WklyPickerOutputsPropertyKeys.ViewModeChange].emit(value),\n ),\n ];\n this.ref.component.changeDetectorRef.detectChanges();\n picker.focusDay();\n this[WklyPickerOutputsPropertyKeys.Opened].emit();\n }\n @HostListener(\"keydown\", [\"$event\"]) key(event: KeyboardEvent): void {\n if (\n event.key === \"Enter\" ||\n event.key === \" \" ||\n event.key === \"ArrowDown\"\n ) {\n event.preventDefault();\n this.open();\n }\n }\n @HostListener(\"blur\") blur(): void {\n this.touched();\n }\n close(reason: WklyCloseReason = \"programmatic\"): void {\n if (!this.ref) return;\n const ref = this.ref;\n this.ref = null;\n this.subscriptions.forEach((s) => s.unsubscribe());\n this.subscriptions = [];\n ref.destroy();\n this.touched();\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n ngOnDestroy(): void {\n this.close();\n }\n private copy(): void {\n if (!this.ref) return;\n const inputs = unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n for (const name of Object.values(WklyPickerInputsPropertyKeys))\n this.ref.component.setInput(\n name,\n name === WklyPickerInputsPropertyKeys.Value\n ? this.currentValue()\n : name === WklyPickerInputsPropertyKeys.Disabled\n ? this.isDisabled()\n : inputs[name],\n );\n }\n private display(): void {\n const host = this.element.nativeElement as HTMLInputElement;\n if (host.tagName === \"INPUT\") {\n host.readOnly = true;\n const value = this.currentValue();\n host.value =\n value === null\n ? \"\"\n : typeof value === \"string\"\n ? value\n : value.join(\" — \");\n host.disabled = this.isDisabled();\n host.setAttribute(\"aria-haspopup\", \"dialog\");\n }\n }\n private checkValue(): void {\n this.errors = validateSelection(\n this.currentValue(),\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n this[WklyPickerInputsPropertyKeys.CalendarAdapter]() ||\n new WklyGregorianCalendarAdapter(\n this[WklyPickerInputsPropertyKeys.Locale]() || \"en-US\",\n ),\n );\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(this.errors);\n this.validation();\n }\n writeValue(value: WklyPickerValue): void {\n this.formValue.set(value);\n this.checkValue();\n this.display();\n if (this.ref) this.ref.component.instance.writeValue(value);\n }\n registerOnChange(fn: (value: WklyPickerValue) => void): void {\n this.change = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.touched = fn;\n }\n setDisabledState(value: boolean): void {\n this.formDisabled.set(value);\n this.display();\n if (this.ref) this.ref.component.instance.setDisabledState(value);\n }\n validate(): ValidationErrors | null {\n return this.errors.length ? { wkly: this.errors } : null;\n }\n registerOnValidatorChange(fn: () => void): void {\n this.validation = fn;\n }\n scrollToEpochDay(day: number, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToEpochDay(day, options);\n }\n scrollToAbsoluteWeek(week: number, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToAbsoluteWeek(week, options);\n }\n scrollToCalendarDate(\n date: WklyCalendarDate,\n options?: WklyJumpOptions,\n ): void {\n this.open();\n this.ref?.component.instance.scrollToCalendarDate(date, options);\n }\n scrollToValue(value: string, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToValue(value, options);\n }\n}\n@Directive({\n selector: \"[wklyDateTimePickerDialog]\",\n standalone: false,\n exportAs: \"wklyDialog\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WklyDateTimePickerDialogDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => WklyDateTimePickerDialogDirective),\n multi: true,\n },\n ],\n})\nexport class WklyDateTimePickerDialogDirective extends WklyTriggerBase {\n constructor(\n element: ElementRef<HTMLElement>,\n private service: WklyDateTimePickerDialogService,\n private triggerInjector: Injector,\n ) {\n super(element);\n }\n protected create(): WklyPresentationRef {\n return this.service.open(\n this.element.nativeElement,\n (reason) => this.close(reason),\n this[WklyPickerInputsPropertyKeys.CloseOnBackdrop](),\n this.triggerInjector,\n );\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { WklyDateTimePickerComponent } from \"./picker.component\";\nimport { WklyDateTimePickerDialogDirective } from \"./presentation\";\nimport { WklyFieldComponent } from \"./field.component\";\nexport * from \"./config\";\nexport { WklyDateTimePickerComponent } from \"./picker.component\";\nexport {\n WklyPresentationRef,\n WklyDateTimePickerDialogService,\n WklyTriggerBase,\n WklyDateTimePickerDialogDirective,\n} from \"./presentation\";\nexport { WklyFieldComponent } from \"./field.component\";\nexport {\n WklyPickerValue,\n WklyIsoString,\n WklyRangeValue,\n WklySelectionMode,\n WklyValidationError,\n WklyValidationErrorCode,\n WklyViewportPreset,\n WklyHourCycle,\n WklyEndpoint,\n WklyDisabledDatePredicate,\n WklyDisabledTimePredicate,\n WklyRangeValidator,\n WklyWeekLabelMode,\n WklyWeekLabelFormatter,\n} from \"@wkly/adapters\";\n@NgModule({\n imports: [CommonModule],\n declarations: [\n WklyDateTimePickerComponent,\n WklyDateTimePickerDialogDirective,\n WklyFieldComponent,\n ],\n exports: [WklyDateTimePickerComponent, WklyDateTimePickerDialogDirective],\n})\nexport class WklyDateTimePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.WklyFieldComponent"],"mappings":";;;;;;;;;;MAsCa,UAAU,GAAG,IAAI,cAAc,CAAY,YAAY,EAAE;AACpE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,IAAI,EAAE,EAAE,CAAC;AAC3C,CAAA;AACM,MAAM,WAAW,GAAG,IAAI,cAAc,CAC3C,aAAa,EACb,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAEtC,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB,EACnB,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAEtC,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB,EACnB,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;MAuBvB,gBAAgB,CAAA;;IAKjB,SAAS,GAAG,KAAK,CAAoB,UAAU,iFAChE,KAAK,EAAE,MAAM,EAAA,CACb;IACiB,UAAU,GAAG,KAAK,CAAkB,IAAI,kFACzD,KAAK,EAAE,OAAO,EAAA,CACd;IACiB,oBAAoB,GAAG,KAAK,CAC7C,SAAU,4FACR,KAAK,EAAE,iBAAiB,EAAA,CAC3B;IACkB,WAAW,GAAG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ime-picker.22/src/field.component.ts","../../../projects/wkly-datetime-picker.22/src/field.component.html","../../../projects/wkly-datetime-picker.22/src/picker.component.ts","../../../projects/wkly-datetime-picker.22/src/picker.component.html","../../../projects/wkly-datetime-picker.22/src/presentation.ts","../../../projects/wkly-datetime-picker.22/src/public-api.ts"],"sourcesContent":["import {\n Directive,\n InjectionToken,\n booleanAttribute,\n input,\n InputSignal,\n InputSignalWithTransform,\n output,\n OutputEmitterRef,\n} from \"@angular/core\";\nimport { WklyWeekOffset } from \"@wkly/core\";\nimport {\n WklyCalendarAdapter,\n WklyDisabledDatePredicate,\n WklyDisabledTimePredicate,\n WklyHourCycle,\n WklyPickerValue,\n WklyRangeValidator,\n WklySelectionMode,\n WklyValidationError,\n WklyViewportPreset,\n WklyWeekLabelFormatter,\n WklyWeekLabelMode,\n} from \"@wkly/adapters\";\nimport {\n DEFAULT_OVERSCAN_WEEKS,\n WklyClock,\n WklyConfiguration,\n WklyCloseReason,\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerOutputs as WklyPickerOutputsContract,\n WklyStrings,\n WklyTranslations,\n WklyViewportChange,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nexport * from \"@wkly/presentation\";\nexport const WKLY_CLOCK = new InjectionToken<WklyClock>(\"WKLY_CLOCK\", {\n providedIn: \"root\",\n factory: () => ({ now: () => new Date() }),\n});\nexport const WKLY_CONFIG = new InjectionToken<WklyConfiguration>(\n \"WKLY_CONFIG\",\n { providedIn: \"root\", factory: () => ({}) },\n);\nexport const WKLY_LOCALIZATION = new InjectionToken<WklyStrings>(\n \"WKLY_LOCALIZATION\",\n { providedIn: \"root\", factory: () => ({}) },\n);\nexport const WKLY_TRANSLATIONS = new InjectionToken<WklyTranslations>(\n \"WKLY_TRANSLATIONS\",\n { providedIn: \"root\", factory: () => ({}) },\n);\n/** Shared public inputs/outputs inherited by the picker and both trigger directives. */\nexport type WklyPickerSignalInputs<T> = {\n [K in keyof T]: InputSignal<T[K]> | InputSignalWithTransform<T[K], unknown>;\n};\nexport type WklyPickerSignalOutputs<T> = {\n [K in keyof T]: OutputEmitterRef<T[K]>;\n};\nexport type WklyPickerSignalInputsAndOutputs<T, U> = WklyPickerSignalInputs<T> &\n WklyPickerSignalOutputs<U>;\n@Directive({\n // Angular's metadata evaluator requires strings; template expressions\n // preserve the enum as their source.\n outputs: [\n `${WklyPickerOutputsPropertyKeys.ValueChange}`,\n `${WklyPickerOutputsPropertyKeys.ValidationChange}`,\n `${WklyPickerOutputsPropertyKeys.Opened}`,\n `${WklyPickerOutputsPropertyKeys.Closed}`,\n `${WklyPickerOutputsPropertyKeys.ViewportChange}`,\n `${WklyPickerOutputsPropertyKeys.ViewModeChange}`,\n ],\n})\nexport abstract class WklyPickerInputs implements WklyPickerSignalInputsAndOutputs<\n WklyPickerInputsContract,\n WklyPickerOutputsContract\n> {\n // Angular discovers signal inputs from identifier property declarations.\n protected readonly modeInput = input<WklySelectionMode>(\"datetime\", {\n alias: \"mode\",\n });\n protected readonly valueInput = input<WklyPickerValue>(null, {\n alias: \"value\",\n });\n protected readonly calendarAdapterInput = input<WklyCalendarAdapter>(\n undefined!,\n { alias: \"calendarAdapter\" },\n );\n protected readonly localeInput = input(\"\", { alias: \"locale\" });\n protected readonly weekOffsetInput = input<WklyWeekOffset | null>(null, {\n alias: \"weekOffset\",\n });\n protected readonly viewportPresetInput = input<WklyViewportPreset>(\n { kind: \"full-month\" },\n { alias: \"viewportPreset\" },\n );\n protected readonly hourCycleInput = input<WklyHourCycle>(\"locale\", {\n alias: \"hourCycle\",\n });\n protected readonly showSecondsInput = input(false, {\n alias: \"showSeconds\",\n transform: booleanAttribute,\n });\n protected readonly minuteStepInput = input(1, { alias: \"minuteStep\" });\n protected readonly secondStepInput = input(1, { alias: \"secondStep\" });\n protected readonly minInput = input<string | null>(null, { alias: \"min\" });\n protected readonly maxInput = input<string | null>(null, { alias: \"max\" });\n protected readonly isDateDisabledInput =\n input<WklyDisabledDatePredicate | null>(null, { alias: \"isDateDisabled\" });\n protected readonly isTimeDisabledInput =\n input<WklyDisabledTimePredicate | null>(null, { alias: \"isTimeDisabled\" });\n protected readonly rangeValidatorInput = input<WklyRangeValidator | null>(\n null,\n { alias: \"rangeValidator\" },\n );\n protected readonly allowRangeAcrossDisabledInput = input(false, {\n alias: \"allowRangeAcrossDisabled\",\n transform: booleanAttribute,\n });\n protected readonly requiredInput = input(false, {\n alias: \"required\",\n transform: booleanAttribute,\n });\n protected readonly disabledInput = input(false, {\n alias: \"disabled\",\n transform: booleanAttribute,\n });\n protected readonly weekLabelModeInput = input<WklyWeekLabelMode>(\"locale\", {\n alias: \"weekLabelMode\",\n });\n protected readonly weekLabelFormatterInput =\n input<WklyWeekLabelFormatter | null>(null, { alias: \"weekLabelFormatter\" });\n protected readonly weekCacheSizeInput = input(256, {\n alias: \"weekCacheSize\",\n });\n protected readonly overscanWeeksInput = input(DEFAULT_OVERSCAN_WEEKS, {\n alias: \"overscanWeeks\",\n });\n protected readonly ariaLabelInput = input<string | null>(null, {\n alias: \"ariaLabel\",\n });\n protected readonly ariaDescribedByInput = input<string | null>(null, {\n alias: \"ariaDescribedBy\",\n });\n protected readonly initialEpochDayInput = input<number | null>(null, {\n alias: \"initialEpochDay\",\n });\n protected readonly closeOnBackdropInput = input(true, {\n alias: \"closeOnBackdrop\",\n transform: booleanAttribute,\n });\n protected readonly validatorsInput = input<\n readonly ((value: WklyPickerValue) => WklyValidationError | null)[]\n >([], { alias: \"validators\" });\n protected readonly translationsInput = input<WklyTranslations | null>(null, {\n alias: \"translations\",\n });\n // Public members of the shared picker input contract.\n readonly [WklyPickerInputsPropertyKeys.Mode] = this.modeInput;\n readonly [WklyPickerInputsPropertyKeys.Value] = this.valueInput;\n readonly [WklyPickerInputsPropertyKeys.CalendarAdapter] =\n this.calendarAdapterInput;\n readonly [WklyPickerInputsPropertyKeys.Locale] = this.localeInput;\n readonly [WklyPickerInputsPropertyKeys.WeekOffset] = this.weekOffsetInput;\n readonly [WklyPickerInputsPropertyKeys.ViewportPreset] =\n this.viewportPresetInput;\n readonly [WklyPickerInputsPropertyKeys.HourCycle] = this.hourCycleInput;\n readonly [WklyPickerInputsPropertyKeys.ShowSeconds] = this.showSecondsInput;\n readonly [WklyPickerInputsPropertyKeys.MinuteStep] = this.minuteStepInput;\n readonly [WklyPickerInputsPropertyKeys.SecondStep] = this.secondStepInput;\n readonly [WklyPickerInputsPropertyKeys.Min] = this.minInput;\n readonly [WklyPickerInputsPropertyKeys.Max] = this.maxInput;\n readonly [WklyPickerInputsPropertyKeys.IsDateDisabled] =\n this.isDateDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.IsTimeDisabled] =\n this.isTimeDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.RangeValidator] =\n this.rangeValidatorInput;\n readonly [WklyPickerInputsPropertyKeys.AllowRangeAcrossDisabled] =\n this.allowRangeAcrossDisabledInput;\n readonly [WklyPickerInputsPropertyKeys.Required] = this.requiredInput;\n readonly [WklyPickerInputsPropertyKeys.Disabled] = this.disabledInput;\n readonly [WklyPickerInputsPropertyKeys.WeekLabelMode] =\n this.weekLabelModeInput;\n readonly [WklyPickerInputsPropertyKeys.WeekLabelFormatter] =\n this.weekLabelFormatterInput;\n readonly [WklyPickerInputsPropertyKeys.WeekCacheSize] =\n this.weekCacheSizeInput;\n readonly [WklyPickerInputsPropertyKeys.OverscanWeeks] =\n this.overscanWeeksInput;\n readonly [WklyPickerInputsPropertyKeys.AriaLabel] = this.ariaLabelInput;\n readonly [WklyPickerInputsPropertyKeys.AriaDescribedBy] =\n this.ariaDescribedByInput;\n readonly [WklyPickerInputsPropertyKeys.InitialEpochDay] =\n this.initialEpochDayInput;\n readonly [WklyPickerInputsPropertyKeys.CloseOnBackdrop] =\n this.closeOnBackdropInput;\n readonly [WklyPickerInputsPropertyKeys.Validators] = this.validatorsInput;\n readonly [WklyPickerInputsPropertyKeys.Translations] = this.translationsInput;\n readonly [WklyPickerOutputsPropertyKeys.ValueChange] =\n output<WklyPickerValue>();\n readonly [WklyPickerOutputsPropertyKeys.ValidationChange] =\n output<readonly WklyValidationError[]>();\n readonly [WklyPickerOutputsPropertyKeys.Opened] = output<void>();\n readonly [WklyPickerOutputsPropertyKeys.Closed] = output<WklyCloseReason>();\n readonly [WklyPickerOutputsPropertyKeys.ViewportChange] =\n output<WklyViewportChange>();\n readonly [WklyPickerOutputsPropertyKeys.ViewModeChange] = output<\n \"calendar\" | \"manual\"\n >();\n}\nexport function unwrapWklyPickerSignalInputs<\n T extends WklyPickerInputsContract,\n>(source: WklyPickerSignalInputs<T>): T {\n const keys = Object.values(WklyPickerInputsPropertyKeys) as (keyof T)[];\n\n return Object.fromEntries(\n keys.map((key) => [key, source[key]()]),\n ) as unknown as T;\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n} from \"@angular/core\";\nimport { floorMod } from \"@wkly/core\";\nimport { normalizeDigits } from \"@wkly/adapters\";\n@Component({\n standalone: false,\n selector: \"wkly-field\",\n templateUrl: \"./field.component.html\",\n styleUrls: [\"./field.component.css\"],\n})\nexport class WklyFieldComponent implements OnChanges, OnDestroy {\n @Input() value: number | null = 0;\n @Input() label = \"\";\n @Input() hideLabel = false;\n @Input() previousLabel = \"\";\n @Input() nextLabel = \"\";\n @Input() min = 0;\n @Input() max = 59;\n @Input() step = 1;\n @Input() locale = \"en-US\";\n @Input() disabled = false;\n @Input() invalid = false;\n @Input() labels: readonly string[] | null = null;\n @Output() valueChange = new EventEmitter<number | null>();\n @Output() complete = new EventEmitter<void>();\n private before: number | null = null;\n private touchY = 0;\n private touchSteps = 0;\n private touchChanged = false;\n private typed: string | null = null;\n private inputTimer: ReturnType<typeof setTimeout> | null = null;\n private wheelTimer: ReturnType<typeof setTimeout> | null = null;\n get display(): string {\n if (this.typed !== null) return this.typed;\n return this.value === null\n ? \"\"\n : this.labels\n ? this.labels[this.value - this.min] || String(this.value)\n : new Intl.NumberFormat(this.locale, {\n useGrouping: false,\n minimumIntegerDigits: this.max < 60 ? 2 : 1,\n }).format(this.value);\n }\n ngOnChanges(changes: any): void {\n if (changes.value && this.min < 0 && this.typed !== null) {\n const typedValue =\n this.typed === \"\" || this.typed === \"-\" ? null : Number(this.typed);\n if (this.value !== typedValue) {\n // External date edits replace a pending relative-day preview.\n this.cancelInput();\n this.typed = null;\n }\n }\n }\n ngOnDestroy(): void {\n this.cancelInput();\n if (this.wheelTimer !== null) clearTimeout(this.wheelTimer);\n }\n next(delta: number): number {\n const count = Math.floor((this.max - this.min) / this.step) + 1;\n return (\n this.min +\n floorMod(\n Math.floor(\n ((this.value === null ? this.min : this.value) - this.min) /\n this.step,\n ) + delta,\n count,\n ) *\n this.step\n );\n }\n neighbor(delta: number): string {\n const n = this.next(delta);\n return this.labels\n ? this.labels[n - this.min] || \"\"\n : new Intl.NumberFormat(this.locale, { useGrouping: false }).format(n);\n }\n stepBy(delta: number): void {\n if (this.disabled) return;\n this.scrollBy(delta);\n this.complete.emit();\n }\n begin(event: FocusEvent): void {\n this.before = this.value;\n (event.target as HTMLInputElement).select();\n }\n type(event: Event): void {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n const raw = input.value;\n const numeric = Array.from(raw).every(\n (character) => normalizeDigits(character).length === 1,\n );\n if (this.min < 0 && !this.labels) {\n // Preserve the sign while using the same locale digit normalization.\n const signed = raw\n .replace(/[\\u200e\\u200f\\u061c]/g, \"\")\n .replace(/\\u2212/g, \"-\");\n const digits = normalizeDigits(signed);\n this.typed = input.value = (signed.startsWith(\"-\") ? \"-\" : \"\") + digits;\n this.value =\n digits === \"\"\n ? null\n : Math.max(this.min, Math.min(this.max, Number(this.typed)));\n if (this.value !== null && Number(this.typed) !== this.value)\n this.typed = input.value = String(this.value);\n } else if (numeric) {\n const normalized = normalizeDigits(raw);\n this.typed = input.value =\n this.min >= 0 && this.max < 100 ? normalized.slice(-2) : normalized;\n this.value = this.typed === \"\" ? null : Number(this.typed);\n } else if (this.labels) {\n const search = raw.trim().toLocaleLowerCase(this.locale);\n this.typed = raw;\n const matches = this.labels\n .map((label, index) => ({ label, index }))\n .filter((item) =>\n item.label.toLocaleLowerCase(this.locale).includes(search),\n );\n this.value = matches.length === 1 ? this.min + matches[0].index : null;\n } else {\n this.typed = input.value = normalizeDigits(raw);\n this.value = this.typed === \"\" ? null : Number(this.typed);\n }\n this.valueChange.emit(this.value);\n this.cancelInput();\n if (!numeric && this.labels && this.value !== null) this.complete.emit();\n this.inputTimer = setTimeout(() => {\n this.inputTimer = null;\n this.typed = null;\n if (!this.disabled) this.complete.emit();\n }, 1000);\n }\n key(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n this.cancelInput();\n this.typed = null;\n this.value = this.before;\n this.valueChange.emit(this.before);\n (event.target as HTMLInputElement).value = this.display;\n (event.target as HTMLInputElement).blur();\n }\n if (event.key === \"Enter\") {\n event.preventDefault();\n event.stopPropagation();\n this.finish();\n }\n const delta =\n event.key === \"ArrowUp\"\n ? -1\n : event.key === \"ArrowDown\"\n ? 1\n : event.key === \"PageUp\"\n ? -5\n : event.key === \"PageDown\"\n ? 5\n : 0;\n if (delta) {\n event.preventDefault();\n this.stepBy(delta);\n }\n }\n finish(): void {\n this.cancelInput();\n this.typed = null;\n this.complete.emit();\n }\n wheel(event: WheelEvent): void {\n if (this.disabled || Math.abs(event.deltaY) < 1) return;\n event.preventDefault();\n this.scrollBy(event.deltaY > 0 ? 1 : -1);\n if (this.wheelTimer !== null) clearTimeout(this.wheelTimer);\n this.wheelTimer = setTimeout(() => {\n this.wheelTimer = null;\n this.complete.emit();\n }, 140);\n }\n touchStart(event: TouchEvent): void {\n this.touchY = event.touches[0].clientY;\n this.touchSteps = 0;\n this.touchChanged = false;\n }\n touchMove(event: TouchEvent): void {\n this.applyTouchY(event.touches[0].clientY);\n }\n touchEnd(event: TouchEvent): void {\n this.applyTouchY(event.changedTouches[0].clientY);\n if (this.touchChanged) this.complete.emit();\n this.touchChanged = false;\n }\n private cancelInput(): void {\n if (this.inputTimer !== null) clearTimeout(this.inputTimer);\n this.inputTimer = null;\n }\n private scrollBy(delta: number): void {\n if (this.disabled || !delta) return;\n this.cancelInput();\n this.typed = null;\n this.value = this.next(delta);\n this.valueChange.emit(this.value);\n }\n private applyTouchY(y: number): void {\n // Count total gesture steps so repeated move events do not duplicate changes.\n if (this.disabled) return;\n const delta = this.touchY - y;\n const steps =\n Math.abs(delta) > 16\n ? Math.sign(delta) * Math.max(1, Math.round(Math.abs(delta) / 40))\n : 0;\n const change = steps - this.touchSteps;\n if (!change) return;\n this.scrollBy(change);\n this.touchSteps = steps;\n this.touchChanged = true;\n }\n}\n","<div\n class=\"field\"\n (wheel)=\"wheel($event)\"\n (touchstart)=\"touchStart($event)\"\n (touchmove)=\"touchMove($event)\"\n (touchend)=\"touchEnd($event)\"\n (touchcancel)=\"touchEnd($event)\"\n>\n <span *ngIf=\"!hideLabel\" class=\"label\">{{ label }}</span>\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"previousLabel || label + ': previous'\"\n (click)=\"stepBy(-1)\"\n >\n {{ neighbor(-1) }}\n </button>\n <input\n [attr.aria-label]=\"label\"\n [attr.aria-invalid]=\"invalid\"\n [disabled]=\"disabled\"\n [value]=\"display\"\n [attr.inputmode]=\"labels ? 'text' : min < 0 ? 'text' : 'numeric'\"\n autocomplete=\"off\"\n (focus)=\"begin($event)\"\n (input)=\"type($event)\"\n (blur)=\"finish()\"\n (keydown)=\"key($event)\"\n />\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"nextLabel || label + ': next'\"\n (click)=\"stepBy(1)\"\n >\n {{ neighbor(1) }}\n </button>\n</div>\n","import type { WklyHourCycle } from \"@wkly/adapters\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n effect,\n forwardRef,\n Inject,\n LOCALE_ID,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n signal,\n untracked,\n ViewChild,\n} from \"@angular/core\";\nimport { getLocaleFirstDayOfWeek, isPlatformBrowser } from \"@angular/common\";\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport {\n absoluteWeekOf,\n createWeekGenerator,\n firstEpochDayOf,\n integer,\n WklyWeekGenerator,\n WklyWeekOffset,\n} from \"@wkly/core\";\nimport {\n draftDayDifference,\n setDraftDayDifference,\n calendarMonthBounds,\n resolveWklyTranslation,\n createWeekRows,\n validateDrafts,\n WklyDraft as Draft,\n WklyWeekRow as Row,\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nimport {\n decodeIso,\n error,\n resolveWeekOffset,\n validateSelection,\n WklyCalendarAdapter,\n WklyCalendarDate,\n WklyDateTime,\n WklyGregorianCalendarAdapter,\n WklyPickerValue,\n WklyValidationError,\n} from \"@wkly/adapters\";\nimport {\n WKLY_CLOCK,\n WKLY_CONFIG,\n WKLY_LOCALIZATION,\n WKLY_TRANSLATIONS,\n WklyClock,\n WklyCloseReason,\n WklyConfiguration,\n WklyJumpOptions,\n WklyPickerInputs,\n unwrapWklyPickerSignalInputs,\n WklyStrings,\n WklyTranslations,\n} from \"./config\";\ndeclare class ResizeObserver {\n constructor(callback: () => void);\n observe(element: Element): void;\n disconnect(): void;\n}\n@Component({\n selector: \"wkly-datetime-picker\",\n standalone: false,\n templateUrl: \"./picker.component.html\",\n styleUrls: [\"../../wkly-datetime-picker/src/picker.component.css\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WklyDateTimePickerComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => WklyDateTimePickerComponent),\n multi: true,\n },\n ],\n})\nexport class WklyDateTimePickerComponent\n extends WklyPickerInputs\n implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator\n{\n @ViewChild(\"scroller\") scroller?: ElementRef<HTMLElement>;\n presentation: \"inline\" | \"transient\" = \"inline\";\n viewMode: \"calendar\" | \"manual\" = \"calendar\";\n endView: \"date\" | \"days\" = \"date\";\n adapter!: WklyCalendarAdapter;\n effectiveLocale = \"en-US\";\n effectiveOffset: WklyWeekOffset = 0;\n effectiveHourCycle: \"h12\" | \"h24\" = \"h24\";\n private configuredHourCycle?: WklyHourCycle;\n direction = \"ltr\";\n rows: Row[] = [];\n weekdays: string[] = [];\n drafts: Draft[] = [];\n errors: readonly WklyValidationError[] = [];\n today = 0;\n focused = 0;\n anchorWeek = 0;\n firstWeek = 0;\n visibleCount = 6;\n rowHeight = 76;\n scrollHeight = 152076;\n paddingTop = 0;\n initialized = false;\n compact = false;\n readonly WklyPickerInputsPropertyKeys = WklyPickerInputsPropertyKeys;\n private baseWeek = 0;\n private firstSupportedDay = 0;\n private lastSupportedDay = 0;\n private firstSupportedWeek = 0;\n private lastSupportedWeek = 0;\n private generator!: WklyWeekGenerator;\n private initialMonth = \"\";\n private clipMonth = false;\n private browser = false;\n private observer?: ResizeObserver;\n private destroyed = false;\n private scrollEndTimer?: ReturnType<typeof setTimeout>;\n private snapPending = false;\n private onChange: (value: WklyPickerValue) => void = () => {};\n private onTouched: () => void = () => {};\n private validatorChanged: () => void = () => {};\n private configErrors: WklyValidationError[] = [];\n private pendingValue: WklyPickerValue = null;\n private emittedValue: string | null = null;\n private manualDateEndpoint = 0;\n private readonly formValue = signal<WklyPickerValue | undefined>(undefined);\n private readonly formDisabled = signal(false);\n private previousInputs?: WklyPickerInputsContract;\n currentValue(): WklyPickerValue {\n return this.formValue() === undefined\n ? this[WklyPickerInputsPropertyKeys.Value]()\n : this.formValue()!;\n }\n isDisabled(): boolean {\n return this[WklyPickerInputsPropertyKeys.Disabled]() || this.formDisabled();\n }\n constructor(\n @Inject(LOCALE_ID) private defaultLocale: string,\n @Inject(WKLY_CONFIG) private defaults: WklyConfiguration,\n @Inject(WKLY_CLOCK) private clock: WklyClock,\n @Inject(WKLY_LOCALIZATION) private strings: WklyStrings,\n @Inject(WKLY_TRANSLATIONS) private defaultTranslations: WklyTranslations,\n @Inject(PLATFORM_ID) platform: Object,\n private host: ElementRef<HTMLElement>,\n private changeDetector: ChangeDetectorRef,\n ) {\n super();\n this.browser = isPlatformBrowser(platform);\n effect(() => {\n const inputs =\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n const previous = this.previousInputs;\n this.previousInputs = inputs;\n if (!previous || !this.initialized) return;\n const changed = (key: keyof typeof inputs) =>\n !Object.is(previous[key], inputs[key]);\n if (\n !Object.keys(inputs).some((key) => changed(key as keyof typeof inputs))\n )\n return;\n untracked(() => {\n if (changed(WklyPickerInputsPropertyKeys.Value))\n this.formValue.set(undefined);\n if (\n changed(WklyPickerInputsPropertyKeys.Value) &&\n this.emittedValue === JSON.stringify(this.currentValue()) &&\n Object.keys(inputs).every(\n (key) =>\n key === WklyPickerInputsPropertyKeys.Value ||\n !changed(key as keyof typeof inputs),\n )\n ) {\n this.emittedValue = null;\n return;\n }\n const focus = this.focused;\n this.configure();\n if (\n changed(WklyPickerInputsPropertyKeys.Value) ||\n changed(WklyPickerInputsPropertyKeys.Mode) ||\n changed(WklyPickerInputsPropertyKeys.CalendarAdapter)\n ) {\n this.load(this.currentValue());\n this.position(this.focused, true);\n } else {\n this.check();\n if (changed(WklyPickerInputsPropertyKeys.ViewportPreset))\n this.position(focus, true);\n else this.scrollToEpochDay(focus);\n }\n });\n });\n }\n ngOnInit(): void {\n this.initialize();\n }\n initialize(): void {\n if (this.initialized) return;\n this.configure();\n const initialEpochDay =\n this[WklyPickerInputsPropertyKeys.InitialEpochDay]();\n this.today = this.browser\n ? Math.floor(this.clock.now().getTime() / 86400000)\n : initialEpochDay === null\n ? 0\n : initialEpochDay;\n this.focused =\n initialEpochDay === null\n ? this.defaults.initialEpochDay === undefined\n ? this.today\n : this.defaults.initialEpochDay\n : initialEpochDay;\n this.load(this.currentValue());\n this.initialized = true;\n this.position(this.focused, true);\n }\n configure(): void {\n this.configErrors = [];\n this.effectiveLocale =\n this[WklyPickerInputsPropertyKeys.Locale]() ||\n this.defaults.locale ||\n this.defaultLocale;\n this.direction = /^(ar|he|fa|ur)(-|$)/.test(this.effectiveLocale)\n ? \"rtl\"\n : \"ltr\";\n this.adapter =\n this[WklyPickerInputsPropertyKeys.CalendarAdapter]() ||\n new WklyGregorianCalendarAdapter(this.effectiveLocale);\n try {\n let firstDay: number | undefined;\n try {\n firstDay = getLocaleFirstDayOfWeek(this.effectiveLocale);\n } catch (_) {}\n this.effectiveOffset = resolveWeekOffset(\n this.effectiveLocale,\n this[WklyPickerInputsPropertyKeys.WeekOffset](),\n this.defaults.weekOffset,\n firstDay,\n );\n integer(this[WklyPickerInputsPropertyKeys.WeekCacheSize]());\n integer(this[WklyPickerInputsPropertyKeys.OverscanWeeks]());\n if (\n this[WklyPickerInputsPropertyKeys.WeekCacheSize]() < 0 ||\n this[WklyPickerInputsPropertyKeys.OverscanWeeks]() < 0 ||\n this[WklyPickerInputsPropertyKeys.OverscanWeeks]() > 50\n )\n throw new RangeError();\n if (\n ![\n \"datetime\",\n \"date\",\n \"time\",\n \"datetime-range\",\n \"date-range\",\n \"time-range\",\n ].includes(this[WklyPickerInputsPropertyKeys.Mode]())\n )\n throw new RangeError();\n const preset = this[WklyPickerInputsPropertyKeys.ViewportPreset]();\n if (preset.kind === \"weeks\") {\n integer(preset.visibleWeekCount);\n if (preset.visibleWeekCount < 1 || preset.visibleWeekCount > 52)\n throw new RangeError();\n }\n if (preset.kind === \"full-month-and-around\")\n for (const n of [\n preset.extraWeeksBefore || 0,\n preset.extraWeeksAfter || 0,\n ]) {\n integer(n);\n if (n < 0 || n > 52) throw new RangeError();\n }\n this.generator = createWeekGenerator({\n weekOffset: this.effectiveOffset,\n cacheSize: this[WklyPickerInputsPropertyKeys.WeekCacheSize](),\n });\n } catch (_) {\n this.configErrors.push(\n error(\n \"configuration-error\",\n this[WklyPickerInputsPropertyKeys.WeekOffset](),\n ),\n );\n this.generator = createWeekGenerator();\n this.effectiveOffset = 0;\n }\n this.setSupportedScrollRange();\n const hourCycle = this[WklyPickerInputsPropertyKeys.HourCycle]();\n // Host value/configuration feedback must retain the user's switchable format.\n if (hourCycle !== \"switchable\" || this.configuredHourCycle !== hourCycle) {\n this.effectiveHourCycle =\n hourCycle === \"h12\"\n ? \"h12\"\n : hourCycle === \"locale\"\n ? new Intl.DateTimeFormat(this.effectiveLocale, {\n hour: \"numeric\",\n timeZone: \"UTC\",\n }).resolvedOptions().hour12\n ? \"h12\"\n : \"h24\"\n : \"h24\";\n }\n this.configuredHourCycle = hourCycle;\n this.weekdays = Array.from({ length: 7 }, (_, i) =>\n this.adapter.formatWeekday(this.effectiveOffset + i, \"short\"),\n );\n }\n private setSupportedScrollRange(): void {\n let [first, last] = this.adapter.supportedEpochDayRange;\n const [firstYear, lastYear] = this.adapter.supportedYearRange;\n const yearOf = (day: number) => this.adapter.epochDayToDate(day).year;\n if (yearOf(first) < firstYear) {\n let low = first,\n high = last;\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (yearOf(mid) < firstYear) low = mid + 1;\n else high = mid;\n }\n first = low;\n }\n if (yearOf(last) > lastYear) {\n let low = first,\n high = last;\n while (low < high) {\n const mid = Math.ceil((low + high) / 2);\n if (yearOf(mid) > lastYear) high = mid - 1;\n else low = mid;\n }\n last = low;\n }\n if (\n first > last ||\n yearOf(first) < firstYear ||\n yearOf(first) > lastYear ||\n yearOf(last) < firstYear ||\n yearOf(last) > lastYear\n )\n throw new RangeError(\"No supported days within the calendar year range\");\n this.firstSupportedDay = first;\n this.lastSupportedDay = last;\n this.firstSupportedWeek = absoluteWeekOf(first, this.effectiveOffset);\n this.lastSupportedWeek = absoluteWeekOf(last, this.effectiveOffset);\n }\n private clampFirstWeek(week: number): number {\n // Keep supported weeks inside the viewport; renderRows adds the buffer rows.\n const last = Math.max(\n this.firstSupportedWeek,\n this.lastSupportedWeek - this.visibleCount + 1,\n );\n return Math.max(this.firstSupportedWeek, Math.min(last, week));\n }\n ngAfterViewInit(): void {\n this.resetScroll();\n if (this.browser && typeof ResizeObserver !== \"undefined\") {\n this.observer = new ResizeObserver(() => {\n this.compact = this.host.nativeElement.clientWidth < 338;\n const row = this.host.nativeElement.querySelector(\n \".week-row\",\n ) as HTMLElement;\n // CSS heights and scrollTop use layout pixels; client rectangles include zoom.\n const height = row ? parseFloat(getComputedStyle(row).height) : 0;\n if (height && height !== this.rowHeight) {\n this.rowHeight = height;\n this.scrollHeight = this.rowHeight * 2001;\n this.renderRows();\n this.resetScroll();\n }\n });\n this.observer.observe(this.host.nativeElement);\n }\n }\n ngOnDestroy(): void {\n this.destroyed = true;\n if (this.observer) this.observer.disconnect();\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n if (this.generator) this.generator.clearCache();\n }\n t(key: string): string {\n return resolveWklyTranslation(\n key,\n this.effectiveLocale,\n this[WklyPickerInputsPropertyKeys.Translations]() ||\n this.defaultTranslations,\n this.strings,\n );\n }\n get isRange(): boolean {\n return this[WklyPickerInputsPropertyKeys.Mode]().endsWith(\"-range\");\n }\n get hasDate(): boolean {\n return !this[WklyPickerInputsPropertyKeys.Mode]().startsWith(\"time\");\n }\n get hasTime(): boolean {\n return (\n this[WklyPickerInputsPropertyKeys.Mode]() !== \"date\" &&\n this[WklyPickerInputsPropertyKeys.Mode]() !== \"date-range\"\n );\n }\n get submitVisible(): boolean {\n return (\n this.presentation === \"transient\" &&\n (this[WklyPickerInputsPropertyKeys.Mode]() !== \"date\" ||\n this.viewMode === \"manual\")\n );\n }\n get title(): string {\n try {\n const d = this.adapter.epochDayToDate(\n Math.max(\n this.firstSupportedDay,\n Math.min(\n this.lastSupportedDay,\n firstEpochDayOf(this.anchorWeek, this.effectiveOffset),\n ),\n ),\n );\n return this.adapter.formatMonth(d) + \" \" + this.adapter.formatYear(d);\n } catch (_) {\n return \"\";\n }\n }\n get canSubmit(): boolean {\n return (\n !this.isDisabled() && !this.errors.length && this.pendingValue !== null\n );\n }\n private blank(day: number): Draft {\n const safe = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n return {\n date: this.adapter.epochDayToDate(safe),\n hour: 0,\n minute: 0,\n second: 0,\n present: false,\n };\n }\n load(value: WklyPickerValue): void {\n this.drafts = [this.blank(this.focused), this.blank(this.focused)];\n const validation = validateSelection(\n value,\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n this.adapter,\n );\n if (value !== null && !validation.length) {\n const values = typeof value === \"string\" ? [value] : value;\n values.forEach((v, i) => {\n const d = decodeIso(v);\n this.drafts[i] = {\n date: this.hasDate\n ? this.adapter.epochDayToDate(d.epochDay)\n : this.blank(this.today).date,\n hour: d.hour,\n minute: d.minute,\n second: d.second,\n present: true,\n };\n if (i === 0 && this.hasDate) this.focused = d.epochDay;\n });\n }\n if (validation.length) {\n this.pendingValue = null;\n this.report(validation);\n } else this.check();\n }\n writeValue(value: WklyPickerValue): void {\n this.formValue.set(value);\n if (this.initialized) {\n this.load(value);\n this.position(this.focused, true);\n this.changeDetector.markForCheck();\n }\n }\n registerOnChange(fn: (value: WklyPickerValue) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(disabled: boolean): void {\n this.formDisabled.set(disabled);\n }\n validate(_control: AbstractControl): ValidationErrors | null {\n return this.errors.length ? { wkly: this.errors } : null;\n }\n registerOnValidatorChange(fn: () => void): void {\n this.validatorChanged = fn;\n }\n touched(): void {\n Promise.resolve().then(() => this.onTouched());\n }\n private report(errors: readonly WklyValidationError[]): void {\n const changed = JSON.stringify(this.errors) !== JSON.stringify(errors);\n this.errors = errors;\n if (changed) {\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(errors);\n this.validatorChanged();\n }\n }\n check(): void {\n const result = validateDrafts({\n drafts: this.drafts,\n configErrors: this.configErrors,\n adapter: this.adapter,\n selection: unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n mode: this[WklyPickerInputsPropertyKeys.Mode](),\n isRange: this.isRange,\n hasDate: this.hasDate,\n hasTime: this.hasTime,\n showSeconds: this[WklyPickerInputsPropertyKeys.ShowSeconds](),\n required: this[WklyPickerInputsPropertyKeys.Required](),\n });\n this.pendingValue = result.pendingValue;\n this.report(result.errors);\n }\n trackDraft(index: number): number {\n // Endpoint controls keep their identity and focus when draft objects swap.\n return index;\n }\n private orderDrafts(): void {\n if (!this.isRange || !this.drafts.every((draft) => draft.present)) return;\n if (this.drafts.some((draft) => draft.unsupportedEpochDay !== undefined))\n return;\n try {\n const a = this.drafts[0],\n b = this.drafts[1];\n const key = (d: Draft) =>\n this.adapter.dateToEpochDay(d.date) * 86400 +\n (d.hour || 0) * 3600 +\n (d.minute || 0) * 60 +\n (d.second || 0);\n if (key(a) > key(b)) this.drafts = [b, a];\n } catch (_) {\n // Impossible or incomplete dates remain editable until corrected.\n }\n }\n finish(): void {\n if (this.isDisabled()) return;\n this.orderDrafts();\n if (this.viewMode === \"manual\" && this.hasDate) this.positionOnManualDate();\n this.check();\n if (this.presentation === \"inline\" && this.canSubmit) this.commit();\n }\n private commit(): void {\n if (!this.canSubmit) return;\n const next = this.pendingValue;\n if (JSON.stringify(next) !== JSON.stringify(this.currentValue())) {\n this.formValue.set(next);\n this.emittedValue = JSON.stringify(next);\n this.onChange(next);\n this[WklyPickerOutputsPropertyKeys.ValueChange].emit(next);\n }\n this.onTouched();\n }\n submit(reason: WklyCloseReason = \"submit\"): void {\n this.check();\n if (!this.canSubmit) return;\n this.commit();\n if (this.presentation === \"transient\")\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n cancel(reason: WklyCloseReason = \"close-button\"): void {\n if (this.isDisabled()) return;\n this.load(this.currentValue());\n this.onTouched();\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n now(): void {\n if (this.isDisabled()) return;\n const n = this.clock.now();\n const day = Math.floor(n.getTime() / 86400000);\n this.drafts = [0, 1].map((index) => ({\n ...this.clockDraft(day, n),\n present: index === 0 || this.isRange,\n }));\n if (\n this.hasDate &&\n (day < this.firstSupportedDay || day > this.lastSupportedDay)\n ) {\n this.report([error(\"unsupported-adapter-date\", day)]);\n return;\n }\n this.focused = day;\n this.position(day, true);\n this.check();\n this.submit(\"now\");\n }\n private clockDraft(day: number, now: Date): Draft {\n return {\n ...this.blank(day),\n hour: now.getUTCHours(),\n minute:\n Math.floor(\n now.getUTCMinutes() / this[WklyPickerInputsPropertyKeys.MinuteStep](),\n ) * this[WklyPickerInputsPropertyKeys.MinuteStep](),\n second: this[WklyPickerInputsPropertyKeys.ShowSeconds]()\n ? Math.floor(\n now.getUTCSeconds() /\n this[WklyPickerInputsPropertyKeys.SecondStep](),\n ) * this[WklyPickerInputsPropertyKeys.SecondStep]()\n : 0,\n };\n }\n private initializeManualRange(): void {\n if (\n !this.isRange ||\n !this.hasDate ||\n this.drafts.every((draft) => draft.present)\n )\n return;\n let seed = this.drafts.find((draft) => draft.present);\n if (!seed) {\n if (this.currentValue() !== null) return;\n const now = this.clock.now();\n const initialEpochDay =\n this[WklyPickerInputsPropertyKeys.InitialEpochDay]();\n const day =\n initialEpochDay === null\n ? this.defaults.initialEpochDay === undefined\n ? Math.floor(now.getTime() / 86400000)\n : this.defaults.initialEpochDay\n : initialEpochDay;\n seed = { ...this.clockDraft(day, now), present: true };\n }\n // Complete missing endpoints without replacing selected or invalid drafts.\n const initial = seed;\n this.drafts = this.drafts.map((draft) =>\n draft.present ? draft : { ...initial, date: { ...initial.date } },\n );\n this.finish();\n // Positioning renders before validation; refresh completion controls afterward.\n this.changeDetector.markForCheck();\n }\n toggleView(): void {\n if (this.isDisabled() || !this.hasDate) return;\n this.viewMode = this.viewMode === \"calendar\" ? \"manual\" : \"calendar\";\n if (this.viewMode === \"manual\") this.initializeManualRange();\n if (this.viewMode === \"calendar\") this.positionOnManualDate();\n this[WklyPickerOutputsPropertyKeys.ViewModeChange].emit(this.viewMode);\n if (this.viewMode === \"calendar\") setTimeout(() => this.resetScroll());\n }\n private positionOnManualDate(): void {\n const draft = this.drafts[this.manualDateEndpoint];\n if (!draft || !draft.present) return;\n try {\n // A valid day follows the selection. An impossible day keeps its draft\n // fields but still shows the chosen month in the calendar.\n const target = this.adapter.dateToEpochDay(draft.date);\n this.focused = target;\n this.position(target, true);\n } catch (_) {\n try {\n const first = this.adapter.dateToEpochDay({ ...draft.date, day: 1 });\n this.focused = first;\n this.position(first, true);\n } catch (_) {}\n }\n }\n months(draft: Draft): readonly string[] {\n try {\n return this.adapter.getMonths(draft.date.year).map((m) => m.label);\n } catch (_) {\n return [];\n }\n }\n monthCount(draft: Draft): number {\n return this.months(draft).length || 12;\n }\n get inDays(): number | null {\n return draftDayDifference(this.drafts, this.adapter);\n }\n get inDaysLabel(): string {\n const days = this.inDays;\n return this.t(\"inDays\").replace(\n /{{\\s*days\\s*}}/g,\n days === null\n ? this.t(\"daysUnavailable\")\n : new Intl.NumberFormat(this.effectiveLocale, {\n useGrouping: false,\n }).format(days),\n );\n }\n get resultingEndDate(): string {\n try {\n const draft = this.drafts[1];\n if (\n draft.unsupportedEpochDay !== undefined ||\n this.adapter.validateDate(draft.date).length\n )\n return \"\";\n return [\n this.adapter.formatDay(draft.date),\n this.adapter.formatMonth(draft.date),\n this.adapter.formatYear(draft.date),\n ].join(\" \");\n } catch (_) {\n return \"\";\n }\n }\n toggleEndView(view: \"date\" | \"days\"): void {\n if (this.isDisabled()) return;\n this.endView = view;\n }\n days(value: number | null): void {\n if (this.isDisabled()) return;\n this.manualDateEndpoint = 1;\n setDraftDayDifference(this.drafts, this.adapter, value);\n this.check();\n }\n field(index: number, field: string, value: number | null): void {\n if (this.isDisabled()) return;\n const draft = this.drafts[index];\n draft.present = true;\n if (field === \"day\" || field === \"year\" || field === \"month\") {\n this.manualDateEndpoint = index;\n delete draft.unsupportedEpochDay;\n let date = { ...draft.date, [field]: value } as WklyCalendarDate;\n if (field === \"month\") {\n let month;\n try {\n month = this.adapter\n .getMonths(date.year)\n .find((m) => m.month === value);\n } catch (_) {}\n date = { ...date, monthCode: month ? month.monthCode : \"\" };\n }\n if (field === \"year\" && value !== null) {\n try {\n const months = this.adapter.getMonths(value);\n const month = months.find((m) => m.monthCode === date.monthCode);\n if (month) date = { ...date, month: month.month };\n } catch (_) {}\n }\n draft.date = date;\n } else if (field === \"hour\" && this.effectiveHourCycle === \"h12\")\n draft.hour =\n value === null\n ? null\n : value >= 1 && value <= 12\n ? (value % 12) + ((draft.hour || 0) >= 12 ? 12 : 0)\n : 24 + value;\n else (draft as any)[field] = value;\n this.check();\n }\n displayHour(draft: Draft): number | null {\n return draft.hour === null\n ? null\n : this.effectiveHourCycle === \"h12\"\n ? draft.hour % 12 || 12\n : draft.hour;\n }\n period(index: number, period: \"am\" | \"pm\" | \"24\"): void {\n if (this.isDisabled()) return;\n if (period === \"24\") this.effectiveHourCycle = \"h24\";\n else {\n this.effectiveHourCycle = \"h12\";\n this.drafts[index].hour =\n ((this.drafts[index].hour || 0) % 12) + (period === \"pm\" ? 12 : 0);\n this.drafts[index].present = true;\n this.finish();\n }\n }\n selected(day: number): boolean {\n return this.drafts.some((d) => {\n try {\n return d.present && this.adapter.dateToEpochDay(d.date) === day;\n } catch (_) {\n return false;\n }\n });\n }\n inRange(day: number): boolean {\n if (!this.isRange || !this.drafts.every((d) => d.present)) return false;\n try {\n const a = this.adapter.dateToEpochDay(this.drafts[0].date),\n b = this.adapter.dateToEpochDay(this.drafts[1].date);\n return day > Math.min(a, b) && day < Math.max(a, b);\n } catch (_) {\n return false;\n }\n }\n dayDisabled(day: number): boolean {\n if (day < this.firstSupportedDay || day > this.lastSupportedDay)\n return true;\n try {\n const date = this.adapter.epochDayToDate(day);\n const isDateDisabled =\n this[WklyPickerInputsPropertyKeys.IsDateDisabled]();\n if (\n isDateDisabled &&\n isDateDisabled(day, {\n mode: this[WklyPickerInputsPropertyKeys.Mode](),\n endpoint: this.isRange\n ? this.drafts[0]?.present && !this.drafts[1]?.present\n ? \"end\"\n : \"start\"\n : \"single\",\n calendarDate: date,\n })\n )\n return true;\n const min = this[WklyPickerInputsPropertyKeys.Min](),\n max = this[WklyPickerInputsPropertyKeys.Max]();\n if (min && day < decodeIso(min).epochDay) return true;\n if (max && day > decodeIso(max).epochDay) return true;\n return false;\n } catch (_) {\n return true;\n }\n }\n select(day: number): void {\n if (this.isDisabled() || this.dayDisabled(day)) return;\n this.focused = day;\n const index =\n this.isRange && this.drafts[0].present && !this.drafts[1].present ? 1 : 0;\n if (this.isRange && index === 0) this.drafts[1].present = false;\n delete this.drafts[index].unsupportedEpochDay;\n this.drafts[index].date = this.adapter.epochDayToDate(day);\n this.drafts[index].present = true;\n this.orderDrafts();\n this.renderRows();\n this.finish();\n if (\n this.presentation === \"transient\" &&\n this[WklyPickerInputsPropertyKeys.Mode]() === \"date\" &&\n this.viewMode === \"calendar\"\n )\n this.submit(\"auto-submit\");\n }\n key(event: KeyboardEvent, day: number): void {\n let delta = 0;\n if (event.key === \"ArrowLeft\") delta = -1;\n if (event.key === \"ArrowRight\") delta = 1;\n if (event.key === \"ArrowUp\") delta = -7;\n if (event.key === \"ArrowDown\") delta = 7;\n if (event.key === \"PageUp\")\n delta = -7 * (event.shiftKey ? this.visibleCount : 1);\n if (event.key === \"PageDown\")\n delta = 7 * (event.shiftKey ? this.visibleCount : 1);\n if (event.key === \"Home\") {\n event.preventDefault();\n this.scrollToEpochDay(this.today, { focus: true });\n }\n if (delta) {\n event.preventDefault();\n const target = day + delta;\n if (target >= this.firstSupportedDay && target <= this.lastSupportedDay)\n this.scrollToEpochDay(target, { focus: true });\n }\n }\n private position(\n day: number,\n preset = false,\n options: WklyJumpOptions = {},\n ): void {\n day = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n this.anchorWeek = absoluteWeekOf(day, this.effectiveOffset);\n const viewportPreset = this[WklyPickerInputsPropertyKeys.ViewportPreset]();\n this.clipMonth = preset && viewportPreset.kind === \"full-month\";\n if (preset && viewportPreset.kind !== \"weeks\") {\n const d = this.adapter.epochDayToDate(day);\n this.initialMonth = d.year + \"/\" + d.monthCode;\n const [start, end] = calendarMonthBounds(this.adapter, day);\n this.firstWeek = absoluteWeekOf(start, this.effectiveOffset);\n this.visibleCount =\n absoluteWeekOf(end, this.effectiveOffset) - this.firstWeek + 1;\n if (\n viewportPreset.kind === \"full-month-and-around\" &&\n !this.configErrors.length\n ) {\n const before = viewportPreset.extraWeeksBefore || 0,\n after = viewportPreset.extraWeeksAfter || 0;\n this.firstWeek -= before;\n this.visibleCount += before + after;\n }\n } else {\n if (viewportPreset.kind === \"weeks\")\n this.visibleCount = this.configErrors.length\n ? 6\n : viewportPreset.visibleWeekCount;\n this.firstWeek =\n this.anchorWeek -\n (options.align === \"start\"\n ? 0\n : options.align === \"end\"\n ? this.visibleCount - 1\n : Math.floor(this.visibleCount / 2));\n }\n this.firstWeek = this.clampFirstWeek(this.firstWeek);\n this.baseWeek = this.firstWeek - 1000;\n this.renderRows();\n // Apply the new runway before writing scrollTop or locating a focus target.\n this.changeDetector.detectChanges();\n this.resetScroll();\n }\n private resetScroll(): void {\n // Round week boundaries to avoid scrollTop truncation under CSS zoom.\n if (this.scroller)\n this.scroller.nativeElement.scrollTop = Math.round(1000 * this.rowHeight);\n }\n scroll(event: Event): void {\n const element = event.target as HTMLElement;\n this.snapPending = true;\n this.scheduleSnap();\n // Quantize displacement around the reset point, equally in both directions.\n const relativeRows = element.scrollTop / this.rowHeight - 1000;\n const index =\n 1000 + Math.sign(relativeRows) * Math.round(Math.abs(relativeRows));\n const requestedFirst = this.baseWeek + index;\n const first = this.clampFirstWeek(requestedFirst);\n if (requestedFirst !== first) {\n element.scrollTop = Math.round((first - this.baseWeek) * this.rowHeight);\n }\n if (first === this.firstWeek) return;\n this.clipMonth = false;\n this.firstWeek = first;\n this.anchorWeek = first + Math.floor(this.visibleCount / 2);\n if (index < 100 || index > 1900) {\n // Preserve signed displacement from this week; modulo turns fractional\n // rounding just below a boundary into almost a full row after rebasing.\n const offset =\n element.scrollTop - (first - this.baseWeek) * this.rowHeight;\n this.baseWeek = first - 1000;\n element.scrollTop = Math.round(1000 * this.rowHeight + offset);\n }\n this.renderRows();\n }\n private scheduleSnap(): void {\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n this.scrollEndTimer = setTimeout(() => this.snapWeek(), 200);\n }\n snapWeek(): void {\n if (this.scrollEndTimer) clearTimeout(this.scrollEndTimer);\n this.scrollEndTimer = undefined;\n if (!this.snapPending || !this.scroller) return;\n this.snapPending = false;\n // Align the current virtual week without rebuilding or rebasing its rows.\n const element = this.scroller.nativeElement;\n const target = Math.round(\n (this.firstWeek - this.baseWeek) * this.rowHeight,\n );\n if (element.scrollTop !== target) element.scrollTop = target;\n }\n private showFirstWeek(week: number): void {\n const first = this.clampFirstWeek(week);\n if (first === this.firstWeek) return;\n this.clipMonth = false;\n this.firstWeek = first;\n this.anchorWeek = first + Math.floor(this.visibleCount / 2);\n this.baseWeek = first - 1000;\n this.renderRows();\n this.resetScroll();\n }\n canMoveWeek(delta: number): boolean {\n return this.clampFirstWeek(this.firstWeek + delta) !== this.firstWeek;\n }\n moveWeek(delta: number): void {\n if (!this.isDisabled()) this.showFirstWeek(this.firstWeek + delta);\n }\n private renderRows(): void {\n // Keep the virtual scroll offset here; row data is shared across Angular versions.\n const overscan = Math.max(\n 0,\n Math.min(50, this[WklyPickerInputsPropertyKeys.OverscanWeeks]() || 0),\n );\n const start = this.firstWeek - overscan;\n this.paddingTop = (start - this.baseWeek) * this.rowHeight;\n this.rows = createWeekRows({\n generator: this.generator,\n adapter: this.adapter,\n startWeek: start,\n count: this.visibleCount + 2 * overscan,\n firstVisibleWeek: this.firstWeek,\n firstSupportedDay: this.firstSupportedDay,\n lastSupportedDay: this.lastSupportedDay,\n clipMonth: this.clipMonth,\n initialMonth: this.initialMonth,\n weekLabelMode: this[WklyPickerInputsPropertyKeys.WeekLabelMode](),\n weekLabelFormatter:\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]() || null,\n isDayDisabled: (day) => this.dayDisabled(day),\n });\n this[WklyPickerOutputsPropertyKeys.ViewportChange].emit({\n firstVisibleAbsoluteWeek: this.firstWeek,\n lastVisibleAbsoluteWeek: this.firstWeek + this.visibleCount - 1,\n anchorAbsoluteWeek: this.anchorWeek,\n });\n }\n // Retain day DOM nodes and keyboard focus when row metadata is regenerated.\n trackCell(_i: number, cell: { epochDay: number }): number {\n return cell.epochDay;\n }\n trackRow(_i: number, row: Row): number {\n return row.week.absoluteWeek;\n }\n scrollToEpochDay(day: number, options: WklyJumpOptions = {}): void {\n integer(day);\n this.adapter.epochDayToDate(day);\n day = Math.max(\n this.firstSupportedDay,\n Math.min(this.lastSupportedDay, day),\n );\n // position renders synchronously; publish the tab stop before that render.\n if (options.focus) this.focused = day;\n this.position(day, false, options);\n if (options.select) this.select(day);\n if (options.focus) this.focusDay();\n }\n scrollToAbsoluteWeek(week: number, options: WklyJumpOptions = {}): void {\n // A boundary week can start before the adapter's first supported day.\n const first = firstEpochDayOf(week, this.effectiveOffset);\n this.scrollToEpochDay(\n week === this.firstSupportedWeek\n ? Math.max(first, this.firstSupportedDay)\n : first,\n options,\n );\n }\n scrollToCalendarDate(\n date: WklyCalendarDate,\n options: WklyJumpOptions = {},\n ): void {\n this.scrollToEpochDay(this.adapter.dateToEpochDay(date), options);\n }\n scrollToValue(value: string, options: WklyJumpOptions = {}): void {\n this.scrollToEpochDay(decodeIso(value).epochDay, options);\n }\n focusDay(): void {\n if (!this.browser) return;\n setTimeout(() => {\n if (this.destroyed) return;\n this.changeDetector.detectChanges();\n const day = this.host.nativeElement.querySelector(\n '[data-day=\"' + this.focused + '\"]',\n ) as HTMLElement;\n const fallback = this.host.nativeElement.querySelector(\n \"button:not(:disabled),input:not(:disabled)\",\n ) as HTMLElement;\n (day || fallback)?.focus({ preventScroll: true });\n });\n }\n}\n","<section\n class=\"wkly\"\n [attr.dir]=\"direction\"\n [attr.aria-label]=\"\n this[WklyPickerInputsPropertyKeys.AriaLabel]() || 'Date and time picker'\n \"\n [attr.aria-describedby]=\"this[WklyPickerInputsPropertyKeys.AriaDescribedBy]()\"\n (focusout)=\"touched()\"\n>\n <header class=\"toolbar\">\n @if (hasDate) {\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"t(viewMode === 'calendar' ? 'manual' : 'calendar')\"\n (click)=\"toggleView()\"\n >\n {{ viewMode === \"calendar\" ? \"☷\" : \"▦\" }}\n </button>\n }\n @if (hasDate) {\n <span class=\"year-control\">{{ title }}</span>\n }\n <span class=\"spacer\"></span\n ><button\n type=\"button\"\n class=\"now\"\n [disabled]=\"isDisabled()\"\n (click)=\"now()\"\n >\n {{ t(\"now\") }}\n </button>\n @if (presentation === \"transient\") {\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"t('close')\"\n (click)=\"cancel()\"\n >\n ×\n </button>\n }\n </header>\n <ng-container *ngIf=\"hasDate && viewMode === 'calendar'\">\n <div\n role=\"grid\"\n [attr.aria-label]=\"\n this[WklyPickerInputsPropertyKeys.AriaLabel]() || 'Calendar'\n \"\n [attr.aria-multiselectable]=\"isRange\"\n >\n <div\n role=\"row\"\n class=\"week-head\"\n [class.no-label]=\"\n compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() === 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n >\n <span\n *ngIf=\"\n !compact &&\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() !== 'hidden' ||\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n role=\"columnheader\"\n aria-label=\"Week\"\n ></span>\n @for (day of weekdays; track $index) {\n <span role=\"columnheader\">{{ day }}</span>\n }\n </div>\n <div\n #scroller\n class=\"week-scroll\"\n [style.height.px]=\"visibleCount * rowHeight\"\n (scroll)=\"scroll($event)\"\n (scrollend)=\"snapWeek()\"\n >\n <div [style.height.px]=\"scrollHeight\" class=\"scroll-space\">\n <div class=\"rows\" [style.top.px]=\"paddingTop\">\n <div\n *ngFor=\"let row of rows; trackBy: trackRow\"\n role=\"row\"\n class=\"week-row\"\n [class.no-label]=\"\n compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() ===\n 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n >\n <span\n *ngIf=\"\n !compact &&\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() !==\n 'hidden' ||\n this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n \"\n role=\"rowheader\"\n class=\"week-number\"\n >{{ row.label }}</span\n >\n <div\n *ngFor=\"\n let cell of row.cells;\n let dayIndex = index;\n trackBy: trackCell\n \"\n role=\"gridcell\"\n [attr.data-weekday-index]=\"dayIndex\"\n [attr.aria-colindex]=\"\n dayIndex +\n (compact ||\n (this[WklyPickerInputsPropertyKeys.WeekLabelMode]() ===\n 'hidden' &&\n !this[WklyPickerInputsPropertyKeys.WeekLabelFormatter]())\n ? 1\n : 2)\n \"\n [attr.aria-selected]=\"selected(cell.epochDay)\"\n [attr.aria-disabled]=\"cell.disabled || isDisabled()\"\n [class.range]=\"inRange(cell.epochDay)\"\n [class.hidden]=\"cell.hidden\"\n [class.odd-month]=\"cell.date && cell.date.month % 2 === 1\"\n >\n <span [class]=\"'annotation annotation--' + dayIndex\">{{\n cell.annotation\n }}</span>\n <button\n type=\"button\"\n class=\"day\"\n [attr.data-day]=\"cell.epochDay\"\n [attr.aria-label]=\"cell.accessible\"\n [attr.aria-current]=\"cell.epochDay === today ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled || isDisabled()\"\n [attr.tabindex]=\"\n !cell.hidden && cell.epochDay === focused ? 0 : -1\n \"\n [class.selected]=\"selected(cell.epochDay)\"\n [class.today]=\"cell.epochDay === today\"\n (focus)=\"focused = cell.epochDay\"\n (click)=\"select(cell.epochDay)\"\n (keydown)=\"key($event, cell.epochDay)\"\n >\n {{ cell.label }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"week-navigation\">\n <button\n type=\"button\"\n [disabled]=\"isDisabled() || !canMoveWeek(-1)\"\n [attr.aria-label]=\"t('previous')\"\n (click)=\"moveWeek(-1)\"\n >\n ↑</button\n ><span>{{ title }}</span\n ><button\n type=\"button\"\n [disabled]=\"isDisabled() || !canMoveWeek(1)\"\n [attr.aria-label]=\"t('next')\"\n (click)=\"moveWeek(1)\"\n >\n ↓\n </button>\n </div>\n </ng-container>\n <ng-container\n *ngFor=\"let draft of drafts; let i = index; trackBy: trackDraft\"\n >\n <fieldset\n *ngIf=\"(i === 0 || isRange) && (hasTime || viewMode === 'manual')\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"isRange ? t(i === 0 ? 'start' : 'end') : null\"\n >\n <legend *ngIf=\"isRange\">\n <ng-container\n *ngIf=\"\n i === 1 && hasDate && viewMode === 'manual';\n else endpointLabel\n \"\n >\n <span class=\"end-view-toggle\">\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"endView === 'date'\"\n (click)=\"toggleEndView('date')\"\n >\n {{ t(\"end\") }}\n </button>\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"endView === 'days'\"\n (click)=\"toggleEndView('days')\"\n >\n {{ inDaysLabel }}\n </button>\n </span>\n </ng-container>\n <ng-template #endpointLabel>{{\n t(i === 0 ? \"start\" : \"end\")\n }}</ng-template>\n </legend>\n <div\n *ngIf=\"\n i === 1 && hasDate && viewMode === 'manual' && endView === 'days'\n \"\n class=\"date-fields in-days-fields\"\n >\n <span class=\"resulting-end-date\" [attr.aria-label]=\"t('endDate')\">{{\n resultingEndDate\n }}</span>\n <wkly-field\n [label]=\"t('days')\"\n [hideLabel]=\"true\"\n [previousLabel]=\"t('daysPrevious')\"\n [nextLabel]=\"t('daysNext')\"\n [locale]=\"effectiveLocale\"\n [value]=\"inDays\"\n [min]=\"-9999\"\n [max]=\"9999\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"days($event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n </div>\n <div\n *ngIf=\"\n hasDate && viewMode === 'manual' && (i === 0 || endView === 'date')\n \"\n class=\"date-fields\"\n >\n <wkly-field\n [label]=\"t('day')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.day\"\n [min]=\"1\"\n [max]=\"31\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'day', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('month')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.month\"\n [min]=\"1\"\n [max]=\"monthCount(draft)\"\n [labels]=\"months(draft)\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'month', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('year')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.date.year\"\n [min]=\"adapter.supportedYearRange[0]\"\n [max]=\"adapter.supportedYearRange[1]\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'year', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n </div>\n <div\n *ngIf=\"hasTime\"\n class=\"time-fields\"\n [class.seconds]=\"this[WklyPickerInputsPropertyKeys.ShowSeconds]()\"\n >\n <wkly-field\n [label]=\"t('hour')\"\n [locale]=\"effectiveLocale\"\n [value]=\"displayHour(draft)\"\n [min]=\"effectiveHourCycle === 'h12' ? 1 : 0\"\n [max]=\"effectiveHourCycle === 'h12' ? 12 : 23\"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'hour', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n [label]=\"t('minute')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.minute\"\n [max]=\"59\"\n [step]=\"\n this[WklyPickerInputsPropertyKeys.MinuteStep]() > 0 &&\n 60 % this[WklyPickerInputsPropertyKeys.MinuteStep]() === 0\n ? this[WklyPickerInputsPropertyKeys.MinuteStep]()\n : 1\n \"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'minute', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <wkly-field\n *ngIf=\"this[WklyPickerInputsPropertyKeys.ShowSeconds]()\"\n [label]=\"t('second')\"\n [locale]=\"effectiveLocale\"\n [value]=\"draft.second\"\n [max]=\"59\"\n [step]=\"\n this[WklyPickerInputsPropertyKeys.SecondStep]() > 0 &&\n 60 % this[WklyPickerInputsPropertyKeys.SecondStep]() === 0\n ? this[WklyPickerInputsPropertyKeys.SecondStep]()\n : 1\n \"\n [disabled]=\"isDisabled()\"\n [invalid]=\"!!errors.length\"\n (valueChange)=\"field(i, 'second', $event)\"\n (complete)=\"finish()\"\n ></wkly-field>\n <div class=\"period\">\n <button\n *ngIf=\"\n effectiveHourCycle === 'h12' ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() === 'switchable'\n \"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"\n effectiveHourCycle === 'h12' && (draft.hour || 0) < 12\n \"\n (click)=\"period(i, 'am')\"\n >\n {{ t(\"am\") }}</button\n ><button\n type=\"button\"\n [disabled]=\"\n isDisabled() ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() !== 'switchable'\n \"\n [attr.aria-pressed]=\"effectiveHourCycle === 'h24'\"\n (click)=\"period(i, '24')\"\n >\n 24</button\n ><button\n *ngIf=\"\n effectiveHourCycle === 'h12' ||\n this[WklyPickerInputsPropertyKeys.HourCycle]() === 'switchable'\n \"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.aria-pressed]=\"\n effectiveHourCycle === 'h12' && (draft.hour || 0) >= 12\n \"\n (click)=\"period(i, 'pm')\"\n >\n {{ t(\"pm\") }}\n </button>\n </div>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"validation\" role=\"status\" aria-live=\"polite\">\n <p *ngFor=\"let err of errors\">! {{ t(err.messageKey) }}</p>\n </div>\n <footer *ngIf=\"submitVisible\">\n <button\n type=\"button\"\n class=\"confirm\"\n [disabled]=\"!canSubmit\"\n (click)=\"submit()\"\n >\n {{ t(\"confirm\") }}\n </button>\n </footer>\n</section>\n","import {\n ApplicationRef,\n ComponentRef,\n createComponent,\n Directive,\n ElementRef,\n EnvironmentInjector,\n effect,\n forwardRef,\n HostListener,\n Inject,\n Injectable,\n Injector,\n OnDestroy,\n Optional,\n PLATFORM_ID,\n signal,\n untracked,\n} from \"@angular/core\";\nimport { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\nimport {\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport {\n validateSelection,\n WklyGregorianCalendarAdapter,\n WklyCalendarDate,\n WklyPickerValue,\n WklyValidationError,\n} from \"@wkly/adapters\";\nimport {\n WklyPickerInputs as WklyPickerInputsContract,\n WklyPickerInputsPropertyKeys,\n WklyPickerOutputsPropertyKeys,\n} from \"@wkly/presentation\";\nimport {\n WklyCloseReason,\n WklyJumpOptions,\n WklyPickerInputs,\n unwrapWklyPickerSignalInputs,\n} from \"./config\";\nimport { WklyDateTimePickerComponent } from \"./picker.component\";\nexport interface WklyPresentationRef {\n readonly component: ComponentRef<WklyDateTimePickerComponent>;\n destroy(): void;\n}\n/** Native-dialog factory. Browser resources are allocated only by open(). */\n@Injectable({ providedIn: \"root\" })\nexport class WklyDateTimePickerDialogService {\n constructor(\n private environmentInjector: EnvironmentInjector,\n private app: ApplicationRef,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: Object,\n ) {}\n open(\n trigger: HTMLElement,\n onCancel: (reason: WklyCloseReason) => void,\n backdrop = true,\n injector?: Injector,\n ): WklyPresentationRef {\n if (!isPlatformBrowser(this.platform))\n throw new Error(\"Picker presentations can only open in a browser\");\n const dialog = this.document.createElement(\"dialog\");\n dialog.setAttribute(\"aria-label\", \"Date and time picker\");\n Object.assign(dialog.style, {\n padding: \"0\",\n border: \"0\",\n borderRadius: \"14px\",\n width: \"min(390px, 100vw)\",\n maxWidth: \"100vw\",\n maxHeight: \"94vh\",\n background: \"transparent\",\n });\n const component = createComponent(WklyDateTimePickerComponent, {\n environmentInjector: this.environmentInjector,\n elementInjector: injector,\n });\n component.instance.presentation = \"transient\";\n dialog.appendChild(component.location.nativeElement);\n this.document.body.appendChild(dialog);\n this.app.attachView(component.hostView);\n const cancel = (event: Event) => {\n event.preventDefault();\n onCancel(\"escape\");\n };\n const click = (event: MouseEvent) => {\n if (backdrop && event.target === dialog) {\n const r = dialog.getBoundingClientRect();\n if (\n event.clientX < r.left ||\n event.clientX > r.right ||\n event.clientY < r.top ||\n event.clientY > r.bottom\n )\n onCancel(\"backdrop\");\n }\n };\n const keydown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") return;\n const controls = Array.from(\n dialog.querySelectorAll<HTMLElement>(\n 'button:not(:disabled),input:not(:disabled),[tabindex=\"0\"]',\n ),\n ).filter(\n (el) =>\n el.tabIndex >= 0 &&\n el.getClientRects().length &&\n getComputedStyle(el).visibility !== \"hidden\",\n );\n const first = controls[0],\n last = controls[controls.length - 1];\n if (\n first &&\n (event.shiftKey\n ? this.document.activeElement === first\n : this.document.activeElement === last)\n ) {\n event.preventDefault();\n (event.shiftKey ? last : first).focus();\n }\n };\n dialog.addEventListener(\"cancel\", cancel);\n dialog.addEventListener(\"click\", click);\n dialog.addEventListener(\"keydown\", keydown);\n dialog.showModal();\n return {\n component,\n destroy: () => {\n dialog.removeEventListener(\"cancel\", cancel);\n dialog.removeEventListener(\"click\", click);\n dialog.removeEventListener(\"keydown\", keydown);\n dialog.close();\n this.app.detachView(component.hostView);\n component.destroy();\n dialog.remove();\n trigger.focus();\n },\n };\n }\n}\n/** Shared trigger lifecycle; optional presentation packages extend this class. */\n@Directive()\nexport abstract class WklyTriggerBase\n extends WklyPickerInputs\n implements ControlValueAccessor, Validator, OnDestroy\n{\n protected ref: WklyPresentationRef | null = null;\n protected subscriptions: { unsubscribe(): void }[] = [];\n private errors: readonly WklyValidationError[] = [];\n private change: (value: WklyPickerValue) => void = () => {};\n private touched: () => void = () => {};\n private validation: () => void = () => {};\n private readonly formValue = signal<WklyPickerValue | undefined>(undefined);\n private readonly formDisabled = signal(false);\n private previousInputs?: WklyPickerInputsContract;\n private currentValue(): WklyPickerValue {\n return this.formValue() === undefined\n ? this[WklyPickerInputsPropertyKeys.Value]()\n : this.formValue()!;\n }\n private isDisabled(): boolean {\n return this[WklyPickerInputsPropertyKeys.Disabled]() || this.formDisabled();\n }\n constructor(protected element: ElementRef<HTMLElement>) {\n super();\n effect(() => {\n const inputs =\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n const previous = this.previousInputs;\n this.previousInputs = inputs;\n untracked(() => {\n if (\n previous &&\n !Object.is(\n previous[WklyPickerInputsPropertyKeys.Value],\n inputs[WklyPickerInputsPropertyKeys.Value],\n )\n )\n this.formValue.set(undefined);\n if (\n !previous ||\n Object.keys(inputs).some(\n (key) =>\n !Object.is(\n previous[key as keyof typeof inputs],\n inputs[key as keyof typeof inputs],\n ),\n )\n ) {\n this.checkValue();\n this.display();\n if (this.ref) {\n this.copy();\n this.ref.component.changeDetectorRef.detectChanges();\n }\n }\n });\n });\n }\n protected abstract create(): WklyPresentationRef;\n @HostListener(\"click\") open(): void {\n if (this.isDisabled() || this.ref) return;\n this.ref = this.create();\n const picker = this.ref.component.instance;\n this.copy();\n this.subscriptions = [\n picker[WklyPickerOutputsPropertyKeys.ValueChange].subscribe((value) => {\n this.formValue.set(value);\n this.change(value);\n this[WklyPickerOutputsPropertyKeys.ValueChange].emit(value);\n this.display();\n }),\n picker[WklyPickerOutputsPropertyKeys.ValidationChange].subscribe(\n (errors) => {\n this.errors = errors;\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(errors);\n this.validation();\n },\n ),\n picker[WklyPickerOutputsPropertyKeys.Closed].subscribe((reason) =>\n this.close(reason),\n ),\n picker[WklyPickerOutputsPropertyKeys.ViewportChange].subscribe((value) =>\n this[WklyPickerOutputsPropertyKeys.ViewportChange].emit(value),\n ),\n picker[WklyPickerOutputsPropertyKeys.ViewModeChange].subscribe((value) =>\n this[WklyPickerOutputsPropertyKeys.ViewModeChange].emit(value),\n ),\n ];\n this.ref.component.changeDetectorRef.detectChanges();\n picker.focusDay();\n this[WklyPickerOutputsPropertyKeys.Opened].emit();\n }\n @HostListener(\"keydown\", [\"$event\"]) key(event: KeyboardEvent): void {\n if (\n event.key === \"Enter\" ||\n event.key === \" \" ||\n event.key === \"ArrowDown\"\n ) {\n event.preventDefault();\n this.open();\n }\n }\n @HostListener(\"blur\") blur(): void {\n this.touched();\n }\n close(reason: WklyCloseReason = \"programmatic\"): void {\n if (!this.ref) return;\n const ref = this.ref;\n this.ref = null;\n this.subscriptions.forEach((s) => s.unsubscribe());\n this.subscriptions = [];\n ref.destroy();\n this.touched();\n this[WklyPickerOutputsPropertyKeys.Closed].emit(reason);\n }\n ngOnDestroy(): void {\n this.close();\n }\n private copy(): void {\n if (!this.ref) return;\n const inputs = unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this);\n for (const name of Object.values(WklyPickerInputsPropertyKeys))\n this.ref.component.setInput(\n name,\n name === WklyPickerInputsPropertyKeys.Value\n ? this.currentValue()\n : name === WklyPickerInputsPropertyKeys.Disabled\n ? this.isDisabled()\n : inputs[name],\n );\n }\n private display(): void {\n const host = this.element.nativeElement as HTMLInputElement;\n if (host.tagName === \"INPUT\") {\n host.readOnly = true;\n const value = this.currentValue();\n host.value =\n value === null\n ? \"\"\n : typeof value === \"string\"\n ? value\n : value.join(\" — \");\n host.disabled = this.isDisabled();\n host.setAttribute(\"aria-haspopup\", \"dialog\");\n }\n }\n private checkValue(): void {\n this.errors = validateSelection(\n this.currentValue(),\n unwrapWklyPickerSignalInputs<WklyPickerInputsContract>(this),\n this[WklyPickerInputsPropertyKeys.CalendarAdapter]() ||\n new WklyGregorianCalendarAdapter(\n this[WklyPickerInputsPropertyKeys.Locale]() || \"en-US\",\n ),\n );\n this[WklyPickerOutputsPropertyKeys.ValidationChange].emit(this.errors);\n this.validation();\n }\n writeValue(value: WklyPickerValue): void {\n this.formValue.set(value);\n this.checkValue();\n this.display();\n if (this.ref) this.ref.component.instance.writeValue(value);\n }\n registerOnChange(fn: (value: WklyPickerValue) => void): void {\n this.change = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.touched = fn;\n }\n setDisabledState(value: boolean): void {\n this.formDisabled.set(value);\n this.display();\n if (this.ref) this.ref.component.instance.setDisabledState(value);\n }\n validate(): ValidationErrors | null {\n return this.errors.length ? { wkly: this.errors } : null;\n }\n registerOnValidatorChange(fn: () => void): void {\n this.validation = fn;\n }\n scrollToEpochDay(day: number, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToEpochDay(day, options);\n }\n scrollToAbsoluteWeek(week: number, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToAbsoluteWeek(week, options);\n }\n scrollToCalendarDate(\n date: WklyCalendarDate,\n options?: WklyJumpOptions,\n ): void {\n this.open();\n this.ref?.component.instance.scrollToCalendarDate(date, options);\n }\n scrollToValue(value: string, options?: WklyJumpOptions): void {\n this.open();\n this.ref?.component.instance.scrollToValue(value, options);\n }\n}\n@Directive({\n selector: \"[wklyDateTimePickerDialog]\",\n standalone: false,\n exportAs: \"wklyDialog\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WklyDateTimePickerDialogDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => WklyDateTimePickerDialogDirective),\n multi: true,\n },\n ],\n})\nexport class WklyDateTimePickerDialogDirective extends WklyTriggerBase {\n constructor(\n element: ElementRef<HTMLElement>,\n private service: WklyDateTimePickerDialogService,\n private triggerInjector: Injector,\n ) {\n super(element);\n }\n protected create(): WklyPresentationRef {\n return this.service.open(\n this.element.nativeElement,\n (reason) => this.close(reason),\n this[WklyPickerInputsPropertyKeys.CloseOnBackdrop](),\n this.triggerInjector,\n );\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { WklyDateTimePickerComponent } from \"./picker.component\";\nimport { WklyDateTimePickerDialogDirective } from \"./presentation\";\nimport { WklyFieldComponent } from \"./field.component\";\nexport * from \"./config\";\nexport { WklyDateTimePickerComponent } from \"./picker.component\";\nexport {\n WklyPresentationRef,\n WklyDateTimePickerDialogService,\n WklyTriggerBase,\n WklyDateTimePickerDialogDirective,\n} from \"./presentation\";\nexport { WklyFieldComponent } from \"./field.component\";\nexport {\n WklyPickerValue,\n WklyIsoString,\n WklyRangeValue,\n WklySelectionMode,\n WklyValidationError,\n WklyValidationErrorCode,\n WklyViewportPreset,\n WklyHourCycle,\n WklyEndpoint,\n WklyDisabledDatePredicate,\n WklyDisabledTimePredicate,\n WklyRangeValidator,\n WklyWeekLabelMode,\n WklyWeekLabelFormatter,\n} from \"@wkly/adapters\";\n@NgModule({\n imports: [CommonModule],\n declarations: [\n WklyDateTimePickerComponent,\n WklyDateTimePickerDialogDirective,\n WklyFieldComponent,\n ],\n exports: [WklyDateTimePickerComponent, WklyDateTimePickerDialogDirective],\n})\nexport class WklyDateTimePickerModule {}\n"],"mappings":";;;;;;;;;AAsCA,MAAa,aAAa,IAAI,eAA0B,cAAc;CACpE,YAAY;CACZ,gBAAgB,EAAE,2BAAW,IAAI,KAAI,EAAE;AACxC,CAAA;AACD,MAAa,cAAc,IAAI,eAC7B,eACA;CAAE,YAAY;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