@lilydesignsystem/angular-date-time-picker 0.1.2 → 0.2.1
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/README.md +21 -10
- package/fesm2022/lilydesignsystem-angular-date-time-picker.mjs +1684 -1358
- package/fesm2022/lilydesignsystem-angular-date-time-picker.mjs.map +1 -1
- package/package.json +6 -6
- package/types/lilydesignsystem-angular-date-time-picker.d.ts +566 -401
- package/types/lilydesignsystem-angular-date-time-picker.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lilydesignsystem-angular-date-time-picker.mjs","sources":["../../date-time-picker.component.ts","../../lilydesignsystem-angular-date-time-picker.ts"],"sourcesContent":["import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n TemplateRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from \"@angular/core\";\n// Only the trigger button composes a headless primitive here. Angular's\n// headless `Dialog` renders `<dialog [open]=\"open()\">` — the native tag,\n// not this component's documented `<div class=\"date-time-picker-dialog\"\n// role=\"dialog\">` markup, so composing it would change the root tag\n// outright. It also sets `open` as a plain boolean attribute rather than\n// calling `.showModal()`, which HTML defines as producing a *non-modal*\n// dialog (no backdrop, no top-layer promotion, no native focus trap,\n// Escape does not auto-close) — so composing it would gain none of the\n// modal guarantee this component's own hand-rolled focus trap exists to\n// provide (`aria-modal=\"true\"` alone is a promise the browser does not\n// keep on its own — see the focus-trap code below), while still needing\n// `Dialog` extended with `aria-modal`/`aria-describedby`/`tabindex`/a\n// keydown output it doesn't have today. The calendar grid is bespoke\n// civil-date business logic with no generic headless equivalent either.\nimport { IconButton } from \"@lilydesignsystem/angular-headless\";\n\n/**\n * Default button glyph: U+1F4C5 CALENDAR, followed by U+FE0E VARIATION\n * SELECTOR-15 to request text (monochrome) presentation.\n *\n * Same construction as locale-picker's globe. The variation selector is a\n * hint, not a guarantee — several platforms ignore it and render the emoji\n * anyway — but where it is honoured the glyph inherits the page's text\n * colour and stops looking like a sticker among the siblings' ◑, \"A\" and\n * ➤. Written as an escape, never as a bare character: a variation\n * selector has no visual form at all, so a bare one is invisible in an\n * editor and trivially lost to a careless edit.\n */\nexport const CALENDAR = \"📅︎\";\n\n/** What the control collects. */\nexport type DateTimeMode = \"date\" | \"time\" | \"datetime\";\n\n/**\n * A civil date: no time zone, no instant.\n *\n * The whole component works in these rather than in `Date`, because a\n * `Date` is an instant and a calendar day is not. `new Date(2026, 2, 1)`\n * is midnight *local*, and in a zone whose DST transition falls at\n * midnight that instant can land on the previous day — so a picker built\n * on local-midnight `Date` values shows the wrong day to some users a\n * couple of times a year. Arithmetic here goes through UTC epoch days,\n * which has no such edge.\n */\nexport type CivilDate = { year: number; month: number; day: number };\n\n/** A wall-clock time, 24-hour, no seconds. */\nexport type CivilTime = { hour: number; minute: number };\n\n/** One quick-pick button in the dialog. */\nexport type DateTimeShortcut = {\n /** Stable identifier, passed back on the `shortcut` output. */\n id: string;\n /** Visible button text. Consumer-supplied, so it localises. */\n label: string;\n /** Days from today. Mutually exclusive with `months` and `date`. */\n days?: number;\n /** Calendar months from today. */\n months?: number;\n /** An absolute ISO date, for shortcuts that are not relative. */\n date?: string;\n};\n\n/**\n * Every user-facing string the dialog needs.\n *\n * Grouped into one object rather than spread across a dozen flat inputs.\n * The sibling helpers use flat inputs because they need two or three\n * strings; this one needs ten, and ten flat inputs is a call site nobody\n * can read. One object also maps cleanly onto a translation bundle, which\n * is how these strings actually arrive.\n *\n * The four navigation labels and the two footer labels are required: they\n * name buttons that always render, and a button whose accessible name we\n * invented in English is precisely the defect this package exists to\n * avoid. The rest gate optional UI.\n */\nexport type DateTimePickerLabels = {\n /** Accessible name for the previous-year button. */\n previousYear: string;\n /** Accessible name for the previous-month button. */\n previousMonth: string;\n /** Accessible name for the previous-week button. */\n previousWeek: string;\n /** Accessible name for the previous-day button. */\n previousDay: string;\n /** Accessible name for the next-day button. */\n nextDay: string;\n /** Accessible name for the next-week button. */\n nextWeek: string;\n /** Accessible name for the next-month button. */\n nextMonth: string;\n /** Accessible name for the next-year button. */\n nextYear: string;\n /** Visible text of the commit button. */\n confirm: string;\n /** Visible text of the dismiss button. */\n cancel: string;\n /** Label for the hour select. Required when `mode` includes a time. */\n hour?: string;\n /** Label for the minute select. Required when `mode` includes a time. */\n minute?: string;\n /** Label for the AM/PM select, when `hour12` resolves true. */\n meridiem?: string;\n /** Column heading for week numbers. Required when `showWeekNumbers`. */\n week?: string;\n /** Visible text of the clear button. The button renders only when set. */\n clear?: string;\n /**\n * Label for the time-zone select. The select renders only when set, for\n * the same reason `clear` gates its button: a zone list is an opt-in\n * part of the form, and we will not name it in English.\n */\n timeZone?: string;\n /**\n * Message announced when typed text will not parse or is out of range.\n * When set, a `role=\"status\"` live region renders after the field and\n * is wired to it via `aria-errormessage` — without it, `aria-invalid`\n * flips silently and a screen-reader user who has already left the\n * field never hears that their date was refused.\n */\n invalid?: string;\n /**\n * Keyboard help for the dialog, e.g. \"Use the arrow keys to choose a\n * date\". When set, it renders inside the dialog and becomes the\n * dialog's `aria-describedby`, so a screen reader speaks it once on\n * open — the APG date-picker dialog ships exactly this affordance.\n */\n instructions?: string;\n};\n\n/** Context passed to a projected icon `<ng-template>` (the button glyph). */\nexport type ChildArgs = {\n /** The committed value, in ISO form. */\n value: string;\n /** Is the dialog open? */\n open: boolean;\n /** The value as the user sees it in the field. */\n display: string;\n};\n\n/** Payload of the `shortcut` output. */\nexport type ShortcutEvent = {\n /** The chosen shortcut's `id`. */\n id: string;\n /** The ISO date the shortcut resolved to. */\n isoDate: string;\n};\n\n// -----------------------------------------------------------------\n// Civil-date arithmetic\n//\n// Pure and total: no local-time `Date` values, no throwing, null for\n// \"not a date\". Exported so the acceptance tests can exercise the\n// arithmetic directly rather than only through the rendered grid.\n// -----------------------------------------------------------------\n\n/** Zero-pad to `width`. */\nexport function pad(n: number, width = 2): string {\n return String(Math.abs(n)).padStart(width, \"0\");\n}\n\n/** Days in a month. `month` is 1-12. */\nexport function daysInMonth(year: number, month: number): number {\n // Day 0 of the next month is the last day of this one.\n return new Date(Date.UTC(year, month, 0)).getUTCDate();\n}\n\n/** `{2026, 3, 1}` → `\"2026-03-01\"`. */\nexport function formatIsoDate(date: CivilDate): string {\n return `${pad(date.year, 4)}-${pad(date.month)}-${pad(date.day)}`;\n}\n\n/**\n * `\"2026-03-01\"` → `{2026, 3, 1}`, or null.\n *\n * Rejects impossible components rather than rolling them over, so\n * `\"2026-02-31\"` is null and not the 3rd of March. A field that silently\n * reinterprets an impossible date is worse than one that refuses it.\n */\nexport function parseIsoDate(text: string): CivilDate | null {\n const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(text.trim());\n if (!m) return null;\n const year = Number(m[1]);\n const month = Number(m[2]);\n const day = Number(m[3]);\n if (month < 1 || month > 12) return null;\n if (day < 1 || day > daysInMonth(year, month)) return null;\n return { year, month, day };\n}\n\n/** Days since the Unix epoch. The unit all date arithmetic goes through. */\nexport function toEpochDay(date: CivilDate): number {\n return Date.UTC(date.year, date.month - 1, date.day) / 86400000;\n}\n\n/** Inverse of `toEpochDay`. */\nexport function fromEpochDay(epochDay: number): CivilDate {\n const d = new Date(epochDay * 86400000);\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n };\n}\n\n/** Shift an ISO date by whole days. */\nexport function addDays(isoDate: string, days: number): string {\n const date = parseIsoDate(isoDate);\n if (!date) return isoDate;\n return formatIsoDate(fromEpochDay(toEpochDay(date) + days));\n}\n\n/**\n * Shift an ISO date by whole months, clamping the day.\n *\n * 31 January + 1 month is 28 February (29 in a leap year), not 3 March.\n * Rolling over is what `Date.prototype.setMonth` does and it is almost\n * never what someone paging a calendar means.\n */\nexport function addMonths(isoDate: string, months: number): string {\n const date = parseIsoDate(isoDate);\n if (!date) return isoDate;\n const total = date.year * 12 + (date.month - 1) + months;\n const year = Math.floor(total / 12);\n const month = (((total % 12) + 12) % 12) + 1;\n return formatIsoDate({\n year,\n month,\n day: Math.min(date.day, daysInMonth(year, month)),\n });\n}\n\n/** Day of week: 0 = Sunday … 6 = Saturday. */\nexport function weekdayOf(isoDate: string): number {\n const date = parseIsoDate(isoDate);\n if (!date) return 0;\n return new Date(Date.UTC(date.year, date.month - 1, date.day)).getUTCDay();\n}\n\n/**\n * ISO-8601 week number.\n *\n * Weeks start Monday and week 1 is the one containing the first Thursday,\n * which is why this pivots on Thursday rather than counting from 1\n * January. Public-sector and clinical rotas quote ISO week numbers, so\n * the column is worth getting exactly right.\n */\nexport function isoWeek(isoDate: string): number {\n if (!parseIsoDate(isoDate)) return 0;\n const mondayIndex = (weekdayOf(isoDate) + 6) % 7;\n const thursday = addDays(isoDate, 3 - mondayIndex);\n const parsed = parseIsoDate(thursday);\n if (!parsed) return 0;\n const jan1 = parseIsoDate(\n formatIsoDate({ year: parsed.year, month: 1, day: 1 }),\n );\n if (!jan1) return 0;\n return Math.floor((toEpochDay(parsed) - toEpochDay(jan1)) / 7) + 1;\n}\n\n/** `\"09:30\"` → `{9, 30}`, or null. */\nexport function parseIsoTime(text: string): CivilTime | null {\n const m = /^(\\d{2}):(\\d{2})$/.exec(text.trim());\n if (!m) return null;\n const hour = Number(m[1]);\n const minute = Number(m[2]);\n if (hour > 23 || minute > 59) return null;\n return { hour, minute };\n}\n\n/** `{9, 30}` → `\"09:30\"`. */\nexport function formatIsoTime(time: CivilTime): string {\n return `${pad(time.hour)}:${pad(time.minute)}`;\n}\n\n/** Pull the date and time halves out of a mode-appropriate ISO value. */\nexport function splitValue(\n value: string,\n mode: DateTimeMode,\n): { date: string; time: string } {\n if (!value) return { date: \"\", time: \"\" };\n if (mode === \"time\") {\n return { date: \"\", time: parseIsoTime(value) ? value : \"\" };\n }\n const [datePart = \"\", timePart = \"\"] = value.split(\"T\");\n return {\n date: parseIsoDate(datePart) ? datePart : \"\",\n time: mode === \"datetime\" && parseIsoTime(timePart) ? timePart : \"\",\n };\n}\n\n/** Recombine the halves. Returns \"\" when the value is incomplete. */\nexport function joinValue(\n date: string,\n time: string,\n mode: DateTimeMode,\n): string {\n if (mode === \"date\") return date;\n if (mode === \"time\") return time;\n return date && time ? `${date}T${time}` : \"\";\n}\n\n/** Is `isoDate` inside the inclusive [min, max] window? Empty bounds pass. */\nexport function withinRange(\n isoDate: string,\n min?: string,\n max?: string,\n): boolean {\n if (min && isoDate < min) return false;\n if (max && isoDate > max) return false;\n return true;\n}\n\n/** Uppercase region subtag of a BCP 47 tag, or \"\". */\nfunction regionOf(locale?: string): string {\n if (!locale) return \"\";\n for (const part of locale.split(/[-_]/).slice(1)) {\n if (/^[A-Za-z]{2}$/.test(part)) return part.toUpperCase();\n }\n return \"\";\n}\n\nconst SUNDAY_FIRST_REGIONS = new Set([\n \"AR\", \"BR\", \"CA\", \"CL\", \"CO\", \"DO\", \"GT\", \"HK\", \"IL\", \"IN\", \"JP\",\n \"KR\", \"MO\", \"MX\", \"PE\", \"PH\", \"PK\", \"TH\", \"TW\", \"US\", \"VE\", \"ZA\",\n]);\n\nconst SATURDAY_FIRST_REGIONS = new Set([\n \"AE\", \"AF\", \"BH\", \"DJ\", \"DZ\", \"EG\", \"IQ\", \"IR\", \"JO\", \"KW\", \"LY\",\n \"OM\", \"QA\", \"SA\", \"SD\", \"SY\", \"YE\",\n]);\n\n/**\n * First day of the week for a locale: 0 = Sunday … 6 = Saturday.\n *\n * `Intl.Locale.prototype.getWeekInfo` is the right answer, but it is\n * recent enough that a fallback still earns its place — and it is\n * missing from some SSR runtimes entirely. The fallback is a short\n * region table plus a Monday default, Monday being both the ISO-8601\n * rule and the majority convention worldwide.\n */\nexport function firstDayOfWeekFor(locale?: string): number {\n if (locale) {\n try {\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n getWeekInfo?: () => { firstDay: number };\n weekInfo?: { firstDay: number };\n };\n const info = loc.getWeekInfo?.() ?? loc.weekInfo;\n // getWeekInfo reports 1 = Monday … 7 = Sunday, so Sunday (7) has to\n // fold to 0.\n if (info && typeof info.firstDay === \"number\") {\n return info.firstDay % 7;\n }\n } catch {\n // Malformed tag — fall through to the table.\n }\n }\n const region = regionOf(locale);\n if (SUNDAY_FIRST_REGIONS.has(region)) return 0;\n if (SATURDAY_FIRST_REGIONS.has(region)) return 6;\n return 1;\n}\n\n/**\n * The dates of one month's grid, always six rows of seven.\n *\n * Fixed height on purpose. A grid sized to its month runs four to six\n * rows, so the footer — and the confirm button in it — moves vertically\n * as you page months. That is a Fitts's-law tax on every subsequent click\n * and it makes the dialog jump under the pointer. A constant six rows\n * costs at most one extra trailing week.\n */\nexport function monthMatrix(\n year: number,\n month: number,\n firstDayOfWeek: number,\n): string[][] {\n const first = formatIsoDate({ year, month, day: 1 });\n const lead = (weekdayOf(first) - firstDayOfWeek + 7) % 7;\n const start = addDays(first, -lead);\n const weeks: string[][] = [];\n for (let row = 0; row < 6; row++) {\n const week: string[] = [];\n for (let col = 0; col < 7; col++) {\n week.push(addDays(start, row * 7 + col));\n }\n weeks.push(week);\n }\n return weeks;\n}\n\n/** Long and short month names for a locale, index 0 = January. */\nexport function monthNames(locale?: string): {\n long: string[];\n short: string[];\n} {\n const build = (month: \"long\" | \"short\") => {\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n month,\n timeZone: \"UTC\",\n });\n return Array.from({ length: 12 }, (_, i) =>\n fmt.format(new Date(Date.UTC(2021, i, 15))),\n );\n } catch {\n return [];\n }\n };\n return { long: build(\"long\"), short: build(\"short\") };\n}\n\n/** Match a token against a locale's month names. Returns 1-12, or 0. */\nfunction matchMonthName(\n token: string,\n names: { long: string[]; short: string[] },\n): number {\n const norm = (s: string) =>\n s.toLocaleLowerCase().replace(/\\.$/, \"\").normalize(\"NFKD\");\n const t = norm(token);\n if (!t || /^\\d+$/.test(t)) return 0;\n for (let i = 0; i < 12; i++) {\n if (norm(names.long[i] ?? \"\") === t) return i + 1;\n if (norm(names.short[i] ?? \"\") === t) return i + 1;\n }\n // Prefix match, so \"Sept\" finds September. Three characters minimum:\n // \"Ma\" cannot choose between March and May, and guessing there would be\n // worse than refusing.\n if (t.length >= 3) {\n for (let i = 0; i < 12; i++) {\n const long = norm(names.long[i] ?? \"\");\n if (long && long.startsWith(t)) return i + 1;\n }\n }\n return 0;\n}\n\n/**\n * The order a locale writes a numeric date in — `[\"day\",\"month\",\"year\"]`\n * for en-GB, `[\"month\",\"day\",\"year\"]` for en-US.\n */\nexport function numericFieldOrder(\n locale?: string,\n): (\"day\" | \"month\" | \"year\")[] {\n try {\n const parts = new Intl.DateTimeFormat(locale, {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 4, 6)));\n const order = parts\n .map((p) => p.type)\n .filter(\n (t): t is \"day\" | \"month\" | \"year\" =>\n t === \"day\" || t === \"month\" || t === \"year\",\n );\n if (order.length === 3) return order;\n } catch {\n // Fall through.\n }\n return [\"day\", \"month\", \"year\"];\n}\n\n/**\n * Parse typed text into an ISO date.\n *\n * Accepts, in order: ISO `YYYY-MM-DD`; a numeric form whose field order\n * follows the locale, so `03/04/2026` is 3 April in en-GB and 4 March in\n * en-US — which is what each user means; and a form with a written month\n * matched against the locale's own long and short month names, which is\n * what lets DHCW's `27-Jun-2025` round-trip.\n *\n * Anything else is null. Guessing harder than this is how date fields\n * silently record the wrong day.\n */\nexport function parseDateInput(text: string, locale?: string): string | null {\n const trimmed = text.trim();\n if (!trimmed) return null;\n\n const iso = parseIsoDate(trimmed);\n if (iso) return formatIsoDate(iso);\n\n const parts = trimmed.split(/[\\s./-]+/).filter(Boolean);\n if (parts.length !== 3) return null;\n\n // Look for a written month first. Whichever field it is, the other two\n // are the day and the year, and their order is then decidable without\n // knowing the locale: the larger number is the year.\n const names = monthNames(locale);\n let month = 0;\n let monthIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n const found = matchMonthName(parts[i], names);\n if (found) {\n month = found;\n monthIndex = i;\n break;\n }\n }\n\n let day = 0;\n let year = 0;\n\n if (monthIndex >= 0) {\n const rest = parts\n .filter((_, i) => i !== monthIndex)\n .map((p) => Number(p));\n if (rest.some((n) => Number.isNaN(n))) return null;\n [day, year] = rest[0] > rest[1] ? [rest[1], rest[0]] : rest;\n } else {\n const nums = parts.map((p) => Number(p));\n if (nums.some((n) => Number.isNaN(n))) return null;\n const order = numericFieldOrder(locale);\n year = nums[order.indexOf(\"year\")];\n day = nums[order.indexOf(\"day\")];\n month = nums[order.indexOf(\"month\")];\n }\n\n // Two-digit years: the usual 70 pivot. Documented rather than clever,\n // because any choice here is wrong for someone.\n if (year < 100) year += year < 70 ? 2000 : 1900;\n if (month < 1 || month > 12) return null;\n if (day < 1 || day > daysInMonth(year, month)) return null;\n return formatIsoDate({ year, month, day });\n}\n\n/** Accepts `9:30`, `09:30`, `0930`, `9.30`, and a trailing am/pm. */\nexport function parseTimeInput(text: string): string | null {\n const m =\n /^(\\d{1,2})[:.]?(\\d{2})\\s*([ap])\\.?m\\.?$|^(\\d{1,2})[:.]?(\\d{2})$/.exec(\n text.trim().toLowerCase(),\n );\n if (!m) return null;\n let hour = Number(m[1] ?? m[4]);\n const minute = Number(m[2] ?? m[5]);\n const meridiem = m[3];\n if (meridiem === \"p\" && hour < 12) hour += 12;\n if (meridiem === \"a\" && hour === 12) hour = 0;\n if (hour > 23 || minute > 59) return null;\n return formatIsoTime({ hour, minute });\n}\n\n/** Does this locale write times on a 12-hour clock? */\nfunction localeUsesHour12(loc?: string): boolean {\n try {\n const parts = new Intl.DateTimeFormat(loc, {\n hour: \"numeric\",\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 0, 1, 13)));\n return parts.some((p) => p.type === \"dayPeriod\");\n } catch {\n return false;\n }\n}\n\n/** The host's current calendar day, read via the *local* getters. */\nfunction todayIso(): string {\n const now = new Date();\n return formatIsoDate({\n year: now.getFullYear(),\n month: now.getMonth() + 1,\n day: now.getDate(),\n });\n}\n\nlet uid = 0;\n/** Stable per-instance id prefix; SSR-safe (no Math.random / Date.now). */\nexport function nextDateTimePickerId(): string {\n uid += 1;\n return `date-time-picker-${uid}`;\n}\n\n/**\n * Optional marker for the projected icon template. Gives consumers typed\n * `let-` variables:\n *\n * ```html\n * <lily-date-time-picker label=\"Choose a date\" [labels]=\"labels\">\n * <ng-template lilyDateTimePickerIcon let-args>{{ args.open ? \"×\" : \"📅\" }}</ng-template>\n * </lily-date-time-picker>\n * ```\n *\n * The component queries any projected `<ng-template>`, so the marker is\n * for type-checking and readability, not for matching.\n */\n@Directive({\n selector: \"ng-template[lilyDateTimePickerIcon]\",\n standalone: true,\n})\nexport class DateTimePickerIcon {\n static ngTemplateContextGuard(\n _dir: DateTimePickerIcon,\n _ctx: unknown,\n ): _ctx is ChildArgs & { $implicit: ChildArgs } {\n return true;\n }\n}\n\n/**\n * DateTimePicker — a headless date / time / datetime control.\n *\n * A typeable text field plus an icon button that opens a WAI-ARIA APG\n * **Date Picker Dialog**: a month grid with a full keyboard contract.\n * Locale-correct by construction — month names, weekday names, first day\n * of week, numeric field order, 12- vs 24-hour clock and day-period names\n * all come from `Intl`. See `spec/index.md` for the full contract.\n *\n * Unlike the three preference helpers this is a **form control**, not a\n * page-header preference control, and it persists nothing.\n */\n@Component({\n selector: \"lily-date-time-picker\",\n standalone: true,\n imports: [NgTemplateOutlet, IconButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n \"(document:click)\": \"onDocumentClick($event)\",\n },\n template: `\n <div\n #rootEl\n class=\"date-time-picker {{ className() }}\"\n [attr.data-mode]=\"mode()\"\n [attr.data-time-zone]=\"timeZone() || null\"\n >\n <input type=\"hidden\" [name]=\"name()\" [value]=\"value()\" />\n @if (labels().timeZone) {\n <input\n type=\"hidden\"\n [name]=\"name() + '-time-zone'\"\n [value]=\"timeZone()\"\n />\n }\n\n <div class=\"date-time-picker-field\">\n <input\n class=\"date-time-picker-input\"\n [id]=\"fieldId()\"\n type=\"text\"\n autocomplete=\"off\"\n [value]=\"display()\"\n [attr.placeholder]=\"placeholder() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [attr.aria-describedby]=\"fieldDescribedBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-errormessage]=\"\n invalid() && labels().invalid ? statusId : null\n \"\n (input)=\"typed.set($any($event.target).value)\"\n (blur)=\"resolveTyped()\"\n (keydown)=\"onFieldKeydown($event)\"\n />\n\n <lily-icon-button\n #buttonEl\n [label]=\"label()\"\n baseClass=\"date-time-picker-button\"\n ariaHaspopup=\"dialog\"\n [ariaExpanded]=\"open()\"\n [ariaControls]=\"dialogId\"\n [disabled]=\"disabled() || readOnly()\"\n (click)=\"open() ? closeDialog() : openDialog()\"\n >\n @if (iconTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"childContext()\"\n />\n } @else {\n <span class=\"date-time-picker-icon\" aria-hidden=\"true\">{{\n glyph\n }}</span>\n }\n </lily-icon-button>\n </div>\n\n @if (labels().invalid) {\n <!-- Present in the DOM before it has content: a live region that\n appears at the same moment as its message is routinely not\n announced at all. Empty while the field is valid. -->\n <span class=\"date-time-picker-status\" [id]=\"statusId\" role=\"status\">{{\n invalid() ? labels().invalid : \"\"\n }}</span>\n }\n\n <div\n #dialogEl\n class=\"date-time-picker-dialog\"\n [id]=\"dialogId\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"labels().instructions ? instructionsId : null\"\n tabindex=\"-1\"\n [attr.hidden]=\"open() ? null : ''\"\n (keydown)=\"onDialogKeydown($event)\"\n >\n @if (labels().instructions) {\n <!-- Spoken once when the dialog takes focus, via the dialog's\n aria-describedby. Visible by default; a consumer who wants\n it screen-reader-only hides it with their own CSS. -->\n <p class=\"date-time-picker-instructions\" [id]=\"instructionsId\">\n {{ labels().instructions }}\n </p>\n }\n @if (usesDate()) {\n <div class=\"date-time-picker-header\">\n <button\n type=\"button\"\n class=\"date-time-picker-previous-year\"\n [attr.aria-label]=\"labels().previousYear\"\n (click)=\"shiftYear(-1)\"\n >\n <span aria-hidden=\"true\">«</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-month\"\n [attr.aria-label]=\"labels().previousMonth\"\n (click)=\"shiftMonth(-1)\"\n >\n <span aria-hidden=\"true\">‹</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-week\"\n [attr.aria-label]=\"labels().previousWeek\"\n (click)=\"shiftDays(-7)\"\n >\n <span aria-hidden=\"true\">‹‹</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-day\"\n [attr.aria-label]=\"labels().previousDay\"\n (click)=\"shiftDays(-1)\"\n >\n <span aria-hidden=\"true\">‹</span>\n </button>\n\n <!-- Polite, not assertive: paging months is the visible result\n of the user's own keypress, so it should reach a screen\n reader without interrupting anything. -->\n <span\n class=\"date-time-picker-period\"\n [id]=\"periodId\"\n aria-live=\"polite\"\n >{{ periodText() }}</span\n >\n\n <button\n type=\"button\"\n class=\"date-time-picker-next-day\"\n [attr.aria-label]=\"labels().nextDay\"\n (click)=\"shiftDays(1)\"\n >\n <span aria-hidden=\"true\">›</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-week\"\n [attr.aria-label]=\"labels().nextWeek\"\n (click)=\"shiftDays(7)\"\n >\n <span aria-hidden=\"true\">››</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-month\"\n [attr.aria-label]=\"labels().nextMonth\"\n (click)=\"shiftMonth(1)\"\n >\n <span aria-hidden=\"true\">›</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-year\"\n [attr.aria-label]=\"labels().nextYear\"\n (click)=\"shiftYear(1)\"\n >\n <span aria-hidden=\"true\">»</span>\n </button>\n </div>\n\n @if (labels().timeZone) {\n <!-- Before the grid, so the zone is chosen before the instant.\n The empty first option is the \"no zone\" state: the picker\n never guesses one from the runtime. -->\n <div class=\"date-time-picker-time-zone\">\n <label\n class=\"date-time-picker-time-zone-label\"\n [for]=\"timeZoneId\"\n >{{ labels().timeZone }}</label\n >\n <!-- A parent [value] binding on <select> races the @for\n block's own per-option bindings: Angular's update pass\n can apply the select's value before the dynamically\n created <option> elements have their own [value]\n applied, so the browser matches nothing. Binding\n [selected] on each <option> instead selects correctly\n regardless of that ordering, because it is evaluated as\n part of the same per-item update as the option's own\n value/text. -->\n <select\n class=\"date-time-picker-time-zone-select\"\n [id]=\"timeZoneId\"\n (change)=\"onTimeZoneSelect($event)\"\n >\n <option value=\"\" [selected]=\"timeZone() === ''\"></option>\n @for (zone of zoneOptions(); track zone) {\n <option [value]=\"zone\" [selected]=\"zone === timeZone()\">\n {{ zoneLabel(zone) }}\n </option>\n }\n </select>\n </div>\n }\n\n <!-- The grid owns its own keyboard contract, which is why the\n handler sits on the table rather than on each of 42 cells. -->\n <table\n #gridEl\n class=\"date-time-picker-calendar\"\n role=\"grid\"\n [attr.aria-labelledby]=\"periodId\"\n (keydown)=\"onGridKeydown($event)\"\n >\n <thead>\n <tr>\n @if (showWeekNumbers()) {\n <th\n class=\"date-time-picker-week-heading\"\n scope=\"col\"\n [attr.abbr]=\"labels().week\"\n >\n {{ labels().week }}\n </th>\n }\n @for (weekday of weekdays(); track $index) {\n <!-- abbr carries the full weekday name, so a screen\n reader announcing the column says \"Monday\" where the\n eye reads \"Mo\". -->\n <th\n class=\"date-time-picker-weekday\"\n scope=\"col\"\n [attr.abbr]=\"weekday.long\"\n >\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of weeks(); track week[0]) {\n <tr>\n @if (showWeekNumbers()) {\n <th class=\"date-time-picker-week\" scope=\"row\">\n {{ isoWeekOf(week[0]) }}\n </th>\n }\n @for (isoDate of week; track isoDate) {\n @let cell = parseCell(isoDate);\n @let isToday = isoDate === today();\n @let isSelected = isoDate === pendingDate();\n @let isDisabled = dayDisabled(isoDate);\n <td role=\"gridcell\" [attr.aria-selected]=\"isSelected\">\n <!-- aria-disabled, not the disabled attribute: a\n vetoed day must stay focusable so the roving\n cursor can land on it and a screen reader can\n announce it as unavailable. A disabled button\n refuses focus, and arrowing across a blocked\n week goes silent while the visible focus stays\n behind. Activation is refused in selectDay\n instead. -->\n <button\n type=\"button\"\n class=\"date-time-picker-day\"\n [attr.data-date]=\"isoDate\"\n [attr.data-outside]=\"cell.outside ? '' : null\"\n [attr.data-today]=\"isToday ? '' : null\"\n [attr.data-selected]=\"isSelected ? '' : null\"\n [attr.data-disabled]=\"isDisabled ? '' : null\"\n [attr.tabindex]=\"isoDate === cursor() ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(isoDate)\"\n [attr.aria-current]=\"isToday ? 'date' : null\"\n [attr.aria-disabled]=\"isDisabled ? 'true' : null\"\n (click)=\"selectDay(isoDate)\"\n >\n {{ cell.day }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (usesTime()) {\n <div class=\"date-time-picker-time\">\n <label class=\"date-time-picker-time-label\" [for]=\"hourId\">\n {{ labels().hour }}\n </label>\n <select\n class=\"date-time-picker-hour\"\n [id]=\"hourId\"\n [value]=\"pendingHour()\"\n (change)=\"setHour(+$any($event.target).value)\"\n >\n @for (option of hourOptions(); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n\n <label class=\"date-time-picker-time-label\" [for]=\"minuteId\">\n {{ labels().minute }}\n </label>\n <select\n class=\"date-time-picker-minute\"\n [id]=\"minuteId\"\n [value]=\"pendingMinute()\"\n (change)=\"setMinute(+$any($event.target).value)\"\n >\n @for (minute of minuteOptions(); track minute) {\n <option [value]=\"minute\">{{ pad2(minute) }}</option>\n }\n </select>\n\n @if (clock12()) {\n <label class=\"date-time-picker-time-label\" [for]=\"meridiemId\">\n {{ labels().meridiem }}\n </label>\n <select\n class=\"date-time-picker-meridiem\"\n [id]=\"meridiemId\"\n [value]=\"pendingHour() >= 12 ? 'pm' : 'am'\"\n (change)=\"setMeridiem($any($event.target).value === 'pm')\"\n >\n <!-- Stable values, localised labels: the visible text is\n the locale's own day-period name. -->\n <option value=\"am\">{{ dayPeriodName(false) }}</option>\n <option value=\"pm\">{{ dayPeriodName(true) }}</option>\n </select>\n }\n </div>\n }\n\n @if (shortcuts().length > 0) {\n <div class=\"date-time-picker-shortcuts\">\n @for (shortcut of shortcuts(); track shortcut.id) {\n <button\n type=\"button\"\n class=\"date-time-picker-shortcut\"\n [attr.data-shortcut-id]=\"shortcut.id\"\n (click)=\"applyShortcut(shortcut)\"\n >\n {{ shortcut.label }}\n </button>\n }\n </div>\n }\n\n <div class=\"date-time-picker-footer\">\n @if (labels().clear) {\n <button\n type=\"button\"\n class=\"date-time-picker-clear\"\n (click)=\"clear()\"\n >\n {{ labels().clear }}\n </button>\n }\n <button\n type=\"button\"\n class=\"date-time-picker-cancel\"\n (click)=\"closeDialog()\"\n >\n {{ labels().cancel }}\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-confirm\"\n (click)=\"commit()\"\n >\n {{ labels().confirm }}\n </button>\n </div>\n </div>\n </div>\n `,\n})\nexport class DateTimePicker {\n /** Accessible name for the trigger button and the dialog. */\n readonly label = input.required<string>();\n /** Every other user-facing string. See `spec/index.md` §4.2. */\n readonly labels = input.required<DateTimePickerLabels>();\n /** What to collect: a date, a time, or both. */\n readonly mode = input<DateTimeMode>(\"date\");\n /** ISO value: `YYYY-MM-DD`, `HH:MM`, or `YYYY-MM-DDTHH:MM`. Two-way bindable. */\n readonly value = model<string>(\"\");\n /** BCP 47 tag driving month names, weekday names and first weekday. */\n readonly locale = input<string>(\"\");\n /** Earliest selectable date, ISO. */\n readonly min = input<string>(\"\");\n /** Latest selectable date, ISO. */\n readonly max = input<string>(\"\");\n /** Veto individual dates — true means \"cannot be picked\". */\n readonly isDateDisabled = input<((isoDate: string) => boolean) | undefined>(\n undefined,\n );\n /** 0 = Sunday … 6 = Saturday. Defaults to the locale's convention. */\n readonly firstDayOfWeek = input<number | undefined>(undefined);\n /** Granularity of the minute select. */\n readonly minuteStep = input<number>(1);\n /** 12-hour clock. Defaults to the locale's convention. */\n readonly hour12 = input<boolean | undefined>(undefined);\n /** Render an ISO-8601 week-number column. */\n readonly showWeekNumbers = input<boolean>(false);\n /** Quick-pick buttons. */\n readonly shortcuts = input<DateTimeShortcut[]>([]);\n /** Commit and close as soon as a day is chosen. Defaults to date-only. */\n readonly confirmOnSelect = input<boolean | undefined>(undefined);\n /** `name` of the hidden input that carries the value in a form post. */\n readonly name = input<string>(\"date-time\");\n /**\n * Selected IANA time zone (e.g. `Europe/London`), or `\"\"` for none.\n * Two-way bindable via `[(timeZone)]`, matching `value`. Rides its own\n * hidden input `{name}-time-zone` and is reflected as `data-time-zone`\n * on the root. It is metadata about WHERE the civil value applies, not\n * part of the value — converting to an instant stays the consumer's\n * job. Never guessed from the runtime: the picker no more picks a zone\n * than `locale-picker` picks a locale.\n */\n readonly timeZone = model<string>(\"\");\n /**\n * Zones offered by the select. Defaults to every zone the runtime\n * knows via `Intl.supportedValuesOf(\"timeZone\")` — never a bundled\n * table, the rule month and weekday names already follow.\n */\n readonly timeZones = input<string[] | undefined>(undefined);\n /** Display text per zone id; a zone without an entry shows its id. */\n readonly timeZoneLabels = input<Record<string, string>>({});\n /** `id` of the text field, so a consumer `<label for>` can name it. */\n readonly inputId = input<string>(\"\");\n /** Forwarded to the text field as `aria-describedby`. */\n readonly describedBy = input<string>(\"\");\n /** Placeholder for the text field. */\n readonly placeholder = input<string>(\"\");\n /** Disable the whole control. */\n readonly disabled = input<boolean>(false);\n /**\n * Show the value but refuse edits.\n *\n * Named `readOnly` (not `readonly`) so the Angular input has an\n * unambiguous identifier distinct from the TypeScript `readonly`\n * modifier — the one Angular-forced rename beyond `class` → `className`.\n */\n readonly readOnly = input<boolean>(false);\n /** Mark the field required. */\n readonly required = input<boolean>(false);\n /** Override how a committed value is rendered into the text field. */\n readonly formatValue = input<((value: string) => string) | undefined>(\n undefined,\n );\n /** Override how typed text is turned back into an ISO value. */\n readonly parseInput = input<((text: string) => string | null) | undefined>(\n undefined,\n );\n /** Extra CSS class on the root `<div>`. */\n readonly className = input<string>(\"\");\n\n /** Fires after a new value is committed. */\n readonly change = output<string>();\n /** Fires when a shortcut is used, before the value settles. */\n readonly shortcut = output<ShortcutEvent>();\n /** Fires when typed text cannot be parsed. */\n readonly invalidInput = output<string>();\n\n /** Projected icon template; replaces the default glyph when supplied. */\n protected readonly iconTemplate = contentChild(TemplateRef);\n\n private readonly rootRef =\n viewChild.required<ElementRef<HTMLDivElement>>(\"rootEl\");\n // Angular resolves a template-ref-variable on a component tag to the\n // component INSTANCE by default (not its ElementRef) — exactly what's\n // needed to call the headless component's own public `focus()`\n // method / `element` getter.\n private readonly buttonRef = viewChild.required<IconButton>(\"buttonEl\");\n private readonly dialogRef =\n viewChild.required<ElementRef<HTMLDivElement>>(\"dialogEl\");\n /** Optional: the grid renders only when `mode` includes a date. */\n private readonly gridRef =\n viewChild<ElementRef<HTMLTableElement>>(\"gridEl\");\n\n protected readonly glyph = CALENDAR;\n\n /**\n * For rendering the view synchronously before a focus move.\n *\n * Svelte updates the DOM synchronously when state changes, so the\n * canonical helper can focus a freshly-paged month from a microtask.\n * Angular renders later — after the microtask queue drains, whether the\n * app is zone-based or zoneless — so a queued focus into a month that\n * has not rendered yet finds nothing (or, worse, finds and focuses a\n * cell that the next render destroys, dropping focus to `<body>`).\n * `cdr.detectChanges()` inside the event handler is the Angular\n * equivalent of Svelte's synchronous flush.\n */\n private readonly cdr = inject(ChangeDetectorRef);\n\n private readonly baseId = nextDateTimePickerId();\n protected readonly dialogId = `${this.baseId}-dialog`;\n protected readonly periodId = `${this.baseId}-period`;\n protected readonly hourId = `${this.baseId}-hour`;\n protected readonly minuteId = `${this.baseId}-minute`;\n protected readonly meridiemId = `${this.baseId}-meridiem`;\n protected readonly statusId = `${this.baseId}-status`;\n protected readonly instructionsId = `${this.baseId}-instructions`;\n protected readonly timeZoneId = `${this.baseId}-time-zone`;\n\n protected readonly open = signal(false);\n protected readonly invalid = signal(false);\n\n /**\n * The element that opened the dialog, so close can return focus to it.\n *\n * The APG rule is \"focus returns to the element that invoked the\n * dialog\" — which is the trigger button on a click, but the *text\n * field* when the user pressed Alt+ArrowDown. Always refocusing the\n * button strands a keyboard user one Tab stop past where they were.\n */\n private openerEl: HTMLElement | null = null;\n\n /**\n * Text the user has typed but not yet resolved.\n *\n * `null` means \"no pending edit, show the formatted value\". An empty\n * string is a real state (the user cleared the field) and must not\n * collapse into `null`.\n */\n protected readonly typed = signal<string | null>(null);\n\n /**\n * The pending selection, live only while the dialog is open.\n *\n * Kept separate from `value` so Cancel and Escape can genuinely revert.\n * A picker that writes through on every arrow key has no cancel — only\n * an undo the user has to perform by hand, from memory.\n */\n protected readonly pendingDate = signal(\"\");\n protected readonly pendingTime = signal(\"\");\n\n /** The month on screen. */\n protected readonly viewYear = signal(1970);\n protected readonly viewMonth = signal(1);\n\n /** The day the grid's roving tabindex sits on. */\n protected readonly cursor = signal(\"\");\n\n /**\n * Today, sampled once at open and refreshed on the initial effect below.\n * Not re-read per cell: the grid asks \"is this today?\" 42 times a\n * render, and a clock read per cell buys nothing over a clock read per\n * open.\n */\n protected readonly today = signal(\"\");\n\n protected readonly fieldId = computed(\n () => this.inputId() || `${this.baseId}-input`,\n );\n protected readonly committed = computed(() =>\n splitValue(this.value(), this.mode()),\n );\n protected readonly weekStart = computed(\n () => this.firstDayOfWeek() ?? firstDayOfWeekFor(this.locale() || undefined),\n );\n protected readonly commitOnDay = computed(\n () => this.confirmOnSelect() ?? this.mode() === \"date\",\n );\n protected readonly usesDate = computed(() => this.mode() !== \"time\");\n protected readonly usesTime = computed(() => this.mode() !== \"date\");\n protected readonly clock12 = computed(\n () => this.hour12() ?? localeUsesHour12(this.locale() || undefined),\n );\n\n /**\n * `aria-describedby` for the field: the consumer's hint, plus — while\n * invalid, with `labels().invalid` supplied — the status region, for\n * the assistive technologies that read `aria-describedby` but not the\n * newer `aria-errormessage`.\n */\n protected readonly fieldDescribedBy = computed(\n () =>\n [\n this.describedBy() || undefined,\n this.invalid() && this.labels().invalid ? this.statusId : undefined,\n ]\n .filter(Boolean)\n .join(\" \") || null,\n );\n\n /** The text shown in the field. A pending edit wins until resolved. */\n protected readonly display = computed(() => {\n const t = this.typed();\n if (t !== null) return t;\n const formatter = this.formatValue() ?? ((v: string) => this.defaultFormat(v));\n return formatter(this.value());\n });\n\n /** The \"March 2026\" heading. */\n /**\n * `Intl.supportedValuesOf` is guarded rather than called bare: an empty\n * select beats a throw at mount on an older embedded runtime that\n * lacks the method entirely.\n */\n protected readonly zoneOptions = computed<string[]>(() => {\n if (this.timeZones() !== undefined) return this.timeZones() as string[];\n return typeof Intl.supportedValuesOf === \"function\"\n ? Intl.supportedValuesOf(\"timeZone\")\n : [];\n });\n\n protected readonly periodText = computed(() => {\n const viewYear = this.viewYear();\n const viewMonth = this.viewMonth();\n try {\n return new Intl.DateTimeFormat(this.locale() || undefined, {\n month: \"long\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).format(new Date(Date.UTC(viewYear, viewMonth - 1, 1)));\n } catch {\n return `${viewYear}-${pad(viewMonth)}`;\n }\n });\n\n /** Column headings, in this locale, starting on `weekStart`. */\n protected readonly weekdays = computed(() => {\n const weekStart = this.weekStart();\n const locale = this.locale() || undefined;\n const out: { short: string; long: string }[] = [];\n for (let i = 0; i < 7; i++) {\n // 2021-08-01 was a Sunday, so this walks the week from whichever\n // day the locale starts on.\n const d = new Date(Date.UTC(2021, 7, 1 + ((weekStart + i) % 7)));\n try {\n out.push({\n short: new Intl.DateTimeFormat(locale, {\n weekday: \"short\",\n timeZone: \"UTC\",\n }).format(d),\n long: new Intl.DateTimeFormat(locale, {\n weekday: \"long\",\n timeZone: \"UTC\",\n }).format(d),\n });\n } catch {\n out.push({ short: \"\", long: \"\" });\n }\n }\n return out;\n });\n\n protected readonly weeks = computed(() =>\n monthMatrix(this.viewYear(), this.viewMonth(), this.weekStart()),\n );\n\n protected readonly pendingHour = computed(\n () => parseIsoTime(this.pendingTime())?.hour ?? 0,\n );\n protected readonly pendingMinute = computed(\n () => parseIsoTime(this.pendingTime())?.minute ?? 0,\n );\n\n /**\n * The hours offered.\n *\n * On a 12-hour clock this lists only the half of the day the meridiem\n * select is currently on, so the two controls together name exactly one\n * hour. Listing 1-12 once and letting the meridiem reinterpret it is\n * the same thing, but it makes \"12 AM\" ambiguous at precisely the point\n * where users already get it wrong.\n */\n protected readonly hourOptions = computed(() => {\n const clock12 = this.clock12();\n const pendingHour = this.pendingHour();\n const out: { value: number; label: string }[] = [];\n for (let h = 0; h < 24; h++) {\n if (clock12 && h < 12 !== pendingHour < 12) continue;\n out.push({\n value: h,\n label: clock12 ? String(((h + 11) % 12) + 1) : pad(h),\n });\n }\n return out;\n });\n\n protected readonly minuteOptions = computed(() => {\n const step = Math.max(1, this.minuteStep());\n const out: number[] = [];\n for (let m = 0; m < 60; m += step) out.push(m);\n return out;\n });\n\n protected readonly childContext = computed(() => {\n const args: ChildArgs = {\n value: this.value(),\n open: this.open(),\n display: this.display(),\n };\n return { $implicit: args, ...args };\n });\n\n private initialised = false;\n\n constructor() {\n // Seeds the view month and the grid cursor from the committed value\n // (or today) exactly once. Deferred to `effect()`, rather than read\n // synchronously in the constructor, because signal inputs are not\n // bound yet when the constructor runs — an Angular-forced difference\n // from the Svelte original, which reads `value` synchronously at\n // `$props()` time. `effect()` is this catalog's established seam for\n // side effects driven by input signals; see catalog `AGENTS.md`.\n effect(() => {\n const committed = this.committed();\n if (this.initialised) return;\n this.initialised = true;\n const today = todayIso();\n this.today.set(today);\n const anchor = parseIsoDate(committed.date) ?? parseIsoDate(today);\n if (anchor) {\n this.viewYear.set(anchor.year);\n this.viewMonth.set(anchor.month);\n this.cursor.set(formatIsoDate(anchor));\n }\n });\n }\n\n // ---------------------------------------------------------------\n // Template helpers\n // ---------------------------------------------------------------\n\n protected pad2(n: number): string {\n return pad(n);\n }\n\n protected isoWeekOf(isoDate: string): number {\n return isoWeek(isoDate);\n }\n\n /** Per-cell derived values for the grid template's `@let`. */\n protected parseCell(isoDate: string): { day: string; outside: boolean } {\n const parsed = parseIsoDate(isoDate);\n return {\n day: parsed ? String(parsed.day) : \"\",\n outside: parsed ? parsed.month !== this.viewMonth() : false,\n };\n }\n\n /** Accessible name for one day cell, e.g. \"Sunday 1 March 2026\". */\n protected dayLabel(isoDate: string): string {\n const parsed = parseIsoDate(isoDate);\n if (!parsed) return isoDate;\n try {\n return new Intl.DateTimeFormat(this.locale() || undefined, {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).format(new Date(Date.UTC(parsed.year, parsed.month - 1, parsed.day)));\n } catch {\n return isoDate;\n }\n }\n\n /** The locale's own AM / PM strings, so neither is hardcoded. */\n protected dayPeriodName(pm: boolean): string {\n try {\n const parts = new Intl.DateTimeFormat(this.locale() || undefined, {\n hour: \"numeric\",\n hour12: true,\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 0, 1, pm ? 13 : 1)));\n const found = parts.find((p) => p.type === \"dayPeriod\")?.value;\n if (found) return found;\n } catch {\n // Fall through.\n }\n return pm ? \"PM\" : \"AM\";\n }\n\n private formatTimeForDisplay(isoTime: string): string {\n const parsed = parseIsoTime(isoTime);\n if (!parsed) return isoTime;\n try {\n return new Intl.DateTimeFormat(this.locale() || undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: this.clock12(),\n timeZone: \"UTC\",\n }).format(new Date(Date.UTC(2021, 0, 1, parsed.hour, parsed.minute)));\n } catch {\n return isoTime;\n }\n }\n\n /** Render an ISO value the way this locale writes it. */\n private defaultFormat(isoValue: string): string {\n if (!isoValue) return \"\";\n const { date, time } = splitValue(isoValue, this.mode());\n const chunks: string[] = [];\n const parsed = date ? parseIsoDate(date) : null;\n if (parsed) {\n try {\n chunks.push(\n new Intl.DateTimeFormat(this.locale() || undefined, {\n day: \"2-digit\",\n month: \"short\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).format(\n new Date(Date.UTC(parsed.year, parsed.month - 1, parsed.day)),\n ),\n );\n } catch {\n chunks.push(date);\n }\n }\n if (time) chunks.push(this.formatTimeForDisplay(time));\n return chunks.join(\" \");\n }\n\n // ---------------------------------------------------------------\n // Selectability\n // ---------------------------------------------------------------\n\n protected dayDisabled(isoDate: string): boolean {\n if (!withinRange(isoDate, this.min() || undefined, this.max() || undefined)) {\n return true;\n }\n return this.isDateDisabled()?.(isoDate) === true;\n }\n\n /** The nearest selectable day to `isoDate`, searching outwards. */\n private nearestSelectable(isoDate: string): string {\n if (!this.dayDisabled(isoDate)) return isoDate;\n // Bounded: a year either way is far beyond any real min/max window,\n // and an unbounded search would hang on a predicate that disables\n // everything.\n for (let delta = 1; delta <= 366; delta++) {\n const after = addDays(isoDate, delta);\n if (!this.dayDisabled(after)) return after;\n const before = addDays(isoDate, -delta);\n if (!this.dayDisabled(before)) return before;\n }\n return isoDate;\n }\n\n // ---------------------------------------------------------------\n // Open / close / commit\n // ---------------------------------------------------------------\n\n protected openDialog(): void {\n if (this.disabled() || this.readOnly()) return;\n // Remember what opened the dialog — the field on Alt+ArrowDown, the\n // trigger button on a click — so closeDialog can put focus back\n // there, per the APG dialog rule.\n const active = document.activeElement;\n this.openerEl =\n active instanceof HTMLElement &&\n this.rootRef().nativeElement.contains(active)\n ? active\n : (this.buttonRef().element ?? null);\n const today = todayIso();\n this.today.set(today);\n const pendingDate = this.committed().date || this.nearestSelectable(today);\n this.pendingDate.set(pendingDate);\n this.pendingTime.set(this.committed().time || this.defaultTime());\n this.cursor.set(pendingDate);\n const anchor = parseIsoDate(pendingDate) ?? parseIsoDate(today);\n if (anchor) {\n this.viewYear.set(anchor.year);\n this.viewMonth.set(anchor.month);\n }\n this.open.set(true);\n // Render first, focus second: until change detection runs, the\n // dialog still carries `hidden`, and focusing into a hidden subtree\n // is a no-op in a real browser.\n this.cdr.detectChanges();\n this.focusInitial();\n }\n\n /** Where an unset time starts: now, snapped down to the step. */\n private defaultTime(): string {\n if (!this.usesTime()) return \"\";\n const now = new Date();\n const step = Math.max(1, this.minuteStep());\n return formatIsoTime({\n hour: now.getHours(),\n minute: Math.floor(now.getMinutes() / step) * step,\n });\n }\n\n /** Focus the grid cursor, or the first control when there is no grid. */\n private focusInitial(): void {\n if (this.usesDate()) {\n this.focusCursor();\n return;\n }\n this.focusables()[0]?.focus?.();\n }\n\n protected closeDialog(refocus = true): void {\n if (!this.open()) return;\n this.open.set(false);\n if (refocus) {\n const target = this.openerEl ?? this.buttonRef().element;\n queueMicrotask(() => target?.focus?.());\n }\n }\n\n /** Commit the pending selection to `value` and notify. */\n protected commit(): void {\n const next = joinValue(this.pendingDate(), this.pendingTime(), this.mode());\n // An incomplete datetime is not committed. Half a timestamp is not a\n // smaller truth; it is a different one.\n if (!next) return;\n this.typed.set(null);\n this.invalid.set(false);\n if (next !== this.value()) {\n this.value.set(next);\n this.change.emit(next);\n }\n this.closeDialog();\n }\n\n protected clear(): void {\n this.typed.set(null);\n this.invalid.set(false);\n if (this.value() !== \"\") {\n this.value.set(\"\");\n this.change.emit(\"\");\n }\n this.closeDialog();\n }\n\n // ---------------------------------------------------------------\n // Grid navigation\n // ---------------------------------------------------------------\n\n /**\n * Move the cursor, paging the view when the target is off-screen.\n *\n * Disabled days are still reachable — the cursor lands on them and the\n * button is `aria-disabled` (so it takes real focus and announces), so\n * arrowing across a blocked range works. What is refused is leaving\n * the min/max window entirely, because there is nothing out there to\n * navigate to.\n */\n private moveCursor(nextIso: string): void {\n if (!withinRange(nextIso, this.min() || undefined, this.max() || undefined)) {\n return;\n }\n this.cursor.set(nextIso);\n const parsed = parseIsoDate(nextIso);\n if (\n parsed &&\n (parsed.year !== this.viewYear() || parsed.month !== this.viewMonth())\n ) {\n this.viewYear.set(parsed.year);\n this.viewMonth.set(parsed.month);\n }\n // Synchronous render-then-focus: when the cursor crossed into a new\n // month, the cell it needs does not exist until change detection has\n // run — see `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n\n private focusCursor(): void {\n const dialogEl = this.dialogRef()?.nativeElement;\n const cursor = this.cursor();\n if (!dialogEl || !cursor) return;\n // An attribute selector, not `#id`: the id is not on this element, and\n // a value we generated as `YYYY-MM-DD` needs no escaping.\n const el = dialogEl.querySelector<HTMLElement>(`[data-date=\"${cursor}\"]`);\n // Guard the METHODS, not only the element. jsdom implements no\n // `scrollIntoView`, and an unguarded call throws from inside a\n // keydown handler — where it stays invisible to a green suite.\n el?.focus?.();\n el?.scrollIntoView?.({ block: \"nearest\" });\n }\n\n protected selectDay(isoDate: string): void {\n if (this.dayDisabled(isoDate)) return;\n this.pendingDate.set(isoDate);\n this.cursor.set(isoDate);\n if (this.commitOnDay()) this.commit();\n }\n\n protected shiftMonth(delta: number): void {\n const anchor = formatIsoDate({\n year: this.viewYear(),\n month: this.viewMonth(),\n day: 1,\n });\n const next = parseIsoDate(addMonths(anchor, delta));\n if (!next) return;\n // Refocus the cursor only when focus is already in the grid: grid\n // paging (PageUp/PageDown, or a browser that focused nothing on\n // click) must carry focus, or it dies with the unrendered cell —\n // but a header button must keep focus, or its user is yanked into\n // the grid after one activation and cannot page twice.\n const hadGridFocus =\n this.gridRef()?.nativeElement.contains(document.activeElement) === true;\n this.viewYear.set(next.year);\n this.viewMonth.set(next.month);\n // Carry the cursor into the new month rather than leaving the roving\n // tabindex on a cell that is no longer rendered.\n const c = parseIsoDate(this.cursor());\n if (c) {\n this.cursor.set(\n formatIsoDate({\n year: next.year,\n month: next.month,\n day: Math.min(c.day, daysInMonth(next.year, next.month)),\n }),\n );\n if (hadGridFocus) {\n // Render-then-focus, synchronously — the target cell does not\n // exist until change detection has run. See `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n }\n\n protected shiftYear(delta: number): void {\n this.shiftMonth(delta * 12);\n }\n\n /**\n * Week/day steps are the fine end of the header: unlike month/year,\n * which move the GRID and merely carry the cursor, these move the\n * pending day itself by ±7 / ±1 civil days and page the grid only\n * when the new day leaves the shown month. A step off the min/max\n * window is refused outright; a step onto a vetoed day moves the\n * cursor — vetoed days are reachable, as with the arrow keys — but\n * leaves the pending selection where it was. No commit even under\n * `confirmOnSelect`.\n */\n protected shiftDays(delta: number): void {\n const from = parseIsoDate(this.cursor()) ? this.cursor() : this.pendingDate();\n if (!from) return;\n const next = addDays(from, delta);\n if (!withinRange(next, this.min() || undefined, this.max() || undefined)) {\n return;\n }\n const hadGridFocus =\n this.gridRef()?.nativeElement.contains(document.activeElement) === true;\n const parsed = parseIsoDate(next);\n if (\n parsed &&\n (parsed.year !== this.viewYear() || parsed.month !== this.viewMonth())\n ) {\n this.viewYear.set(parsed.year);\n this.viewMonth.set(parsed.month);\n }\n this.cursor.set(next);\n if (!this.dayDisabled(next)) this.pendingDate.set(next);\n if (hadGridFocus) {\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n\n protected onTimeZoneSelect(event: Event): void {\n this.timeZone.set((event.target as HTMLSelectElement).value);\n }\n\n /**\n * A plain index expression (`timeZoneLabels()[zone] ?? zone`) trips\n * NG8102: without `noUncheckedIndexedAccess`, TypeScript types a\n * `Record<string, string>` index as always `string`, so the compiler\n * sees the `??` as dead code even though a real, unlisted zone id is\n * exactly the case it exists for. The cast documents that the index\n * genuinely can miss.\n */\n protected zoneLabel(zone: string): string {\n return (\n (this.timeZoneLabels() as Record<string, string | undefined>)[zone] ?? zone\n );\n }\n\n protected onGridKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case \"ArrowLeft\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), -1));\n break;\n case \"ArrowRight\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), 1));\n break;\n case \"ArrowUp\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), -7));\n break;\n case \"ArrowDown\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), 7));\n break;\n case \"Home\": {\n event.preventDefault();\n const offset = (weekdayOf(this.cursor()) - this.weekStart() + 7) % 7;\n this.moveCursor(addDays(this.cursor(), -offset));\n break;\n }\n case \"End\": {\n event.preventDefault();\n const offset = (weekdayOf(this.cursor()) - this.weekStart() + 7) % 7;\n this.moveCursor(addDays(this.cursor(), 6 - offset));\n break;\n }\n case \"PageUp\":\n event.preventDefault();\n if (event.shiftKey) this.shiftYear(-1);\n else this.shiftMonth(-1);\n break;\n case \"PageDown\":\n event.preventDefault();\n if (event.shiftKey) this.shiftYear(1);\n else this.shiftMonth(1);\n break;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n this.selectDay(this.cursor());\n break;\n default:\n break;\n }\n }\n\n // ---------------------------------------------------------------\n // Dialog keys and the focus trap\n // ---------------------------------------------------------------\n\n /** Everything tabbable inside the dialog, in DOM order. */\n private focusables(): HTMLElement[] {\n const dialogEl = this.dialogRef()?.nativeElement;\n if (!dialogEl) return [];\n return Array.from(\n dialogEl.querySelectorAll<HTMLElement>(\n 'button:not([disabled]):not([tabindex=\"-1\"]), select:not([disabled])',\n ),\n );\n }\n\n protected onDialogKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n event.preventDefault();\n // Escape discards: `value` is untouched, so the field still shows\n // whatever was committed before the dialog opened.\n this.closeDialog();\n return;\n }\n if (event.key !== \"Tab\") return;\n\n // The trap. `aria-modal=\"true\"` is a promise that focus cannot reach\n // the page behind the dialog, and it is a promise the browser does\n // not keep for us: an untrapped aria-modal dialog tells a screen\n // reader the rest of the page is inert while Tab quietly walks into\n // it.\n const all = this.focusables();\n if (all.length === 0) return;\n const first = all[0];\n const last = all[all.length - 1];\n const active = document.activeElement as HTMLElement | null;\n const dialogEl = this.dialogRef()?.nativeElement;\n if (event.shiftKey && (active === first || !dialogEl?.contains(active))) {\n event.preventDefault();\n last.focus?.();\n } else if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus?.();\n }\n }\n\n // ---------------------------------------------------------------\n // Text field\n // ---------------------------------------------------------------\n\n /** Default text parsing, per mode. */\n private parseTypedForMode(text: string): string | null {\n if (this.mode() === \"time\") return parseTimeInput(text);\n if (this.mode() === \"date\") return parseDateInput(text, this.locale() || undefined);\n // datetime: split on the last whitespace run or a literal T, and\n // require both halves — see `commit` on why half is refused.\n const m = /^(.*?)[T\\s]+([^\\sT]+)$/.exec(text.trim());\n if (!m) return null;\n const date = parseDateInput(m[1], this.locale() || undefined);\n const time = parseTimeInput(m[2]);\n return date && time ? `${date}T${time}` : null;\n }\n\n /** Resolve typed text on blur or Enter. */\n protected resolveTyped(): void {\n const text = this.typed();\n if (text === null) return;\n\n if (!text.trim()) {\n this.typed.set(null);\n this.invalid.set(false);\n if (this.value() !== \"\") {\n this.value.set(\"\");\n this.change.emit(\"\");\n }\n return;\n }\n\n const parser = this.parseInput();\n const parsed = parser ? parser(text) : this.parseTypedForMode(text);\n if (!parsed) {\n this.invalid.set(true);\n this.invalidInput.emit(text);\n return;\n }\n\n const { date } = splitValue(parsed, this.mode());\n if (this.usesDate() && date && this.dayDisabled(date)) {\n // Parseable but out of bounds. Same outcome as unparseable: the\n // text stays put and the field is marked invalid, rather than being\n // silently snapped to some nearby legal date the user never typed.\n this.invalid.set(true);\n this.invalidInput.emit(text);\n return;\n }\n\n this.typed.set(null);\n this.invalid.set(false);\n if (parsed !== this.value()) {\n this.value.set(parsed);\n this.change.emit(parsed);\n }\n }\n\n protected onFieldKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n this.resolveTyped();\n } else if (event.key === \"ArrowDown\" && event.altKey) {\n // The platform convention for \"open the picker\" from a field,\n // matching <input type=\"date\"> in every major browser.\n event.preventDefault();\n this.openDialog();\n } else if (event.key === \"Escape\" && this.typed() !== null) {\n // Discard the pending edit and show the committed value again —\n // the same contract Escape has inside the dialog. Stops\n // propagating so a surrounding dialog does not also close on\n // what was, to the user, a text-editing keystroke. When no edit\n // is pending the key is left alone.\n event.preventDefault();\n event.stopPropagation();\n this.typed.set(null);\n this.invalid.set(false);\n }\n }\n\n // ---------------------------------------------------------------\n // Time selects\n // ---------------------------------------------------------------\n\n protected setHour(hour: number): void {\n this.pendingTime.set(formatIsoTime({ hour, minute: this.pendingMinute() }));\n }\n\n protected setMinute(minute: number): void {\n this.pendingTime.set(formatIsoTime({ hour: this.pendingHour(), minute }));\n }\n\n /** Cross between AM and PM without changing the minute of the hour. */\n protected setMeridiem(pm: boolean): void {\n this.setHour((this.pendingHour() % 12) + (pm ? 12 : 0));\n }\n\n // ---------------------------------------------------------------\n // Shortcuts\n // ---------------------------------------------------------------\n\n protected applyShortcut(shortcut: DateTimeShortcut): void {\n const base = todayIso();\n let target = shortcut.date ?? base;\n if (shortcut.days !== undefined) target = addDays(base, shortcut.days);\n else if (shortcut.months !== undefined) {\n target = addMonths(base, shortcut.months);\n }\n // A shortcut to a blocked date does nothing rather than landing\n // somewhere near it: \"+4 weeks\" that quietly means \"+27 days\" is a\n // booking error waiting to happen.\n if (this.dayDisabled(target)) return;\n\n this.pendingDate.set(target);\n this.cursor.set(target);\n const parsed = parseIsoDate(target);\n if (parsed) {\n this.viewYear.set(parsed.year);\n this.viewMonth.set(parsed.month);\n }\n this.shortcut.emit({ id: shortcut.id, isoDate: target });\n if (this.commitOnDay()) this.commit();\n else {\n // Render-then-focus: the shortcut may have paged to a month whose\n // cells do not exist until change detection has run. See `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n\n // ---------------------------------------------------------------\n // Dismissal\n // ---------------------------------------------------------------\n\n protected onDocumentClick(event: Event): void {\n if (!this.open()) return;\n const target = event.target as Node | null;\n if (!target) return;\n // Anything outside the dialog closes it — including the component's\n // own text field. The dialog says aria-modal=\"true\", and a modal\n // that stays open while the user edits the field behind it is\n // telling assistive technology one thing and doing another. The\n // trigger button is exempt because its own handler already toggles.\n if (\n this.dialogRef().nativeElement.contains(target) ||\n (this.buttonRef().element?.contains(target) ?? false)\n ) {\n return;\n }\n this.closeDialog(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAkCA;;;;;;;;;;;AAWG;AACI,MAAM,QAAQ,GAAG;AAyHxB;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;SACgB,GAAG,CAAC,CAAS,EAAE,KAAK,GAAG,CAAC,EAAA;AACtC,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;AACjD;AAEA;AACM,SAAU,WAAW,CAAC,IAAY,EAAE,KAAa,EAAA;;AAErD,IAAA,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE;AACxD;AAEA;AACM,SAAU,aAAa,CAAC,IAAe,EAAA;IAC3C,OAAO,CAAA,EAAG,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA,CAAA,EAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE;AACnE;AAEA;;;;;;AAMG;AACG,SAAU,YAAY,CAAC,IAAY,EAAA;IACvC,MAAM,CAAC,GAAG,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACvD,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,OAAO,IAAI;IACnB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxB,IAAA,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG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AA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,WAAW,kEAGT,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAKG,UAAU,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAErB,UAAU,iEAGjB,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC3lCpD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"lilydesignsystem-angular-date-time-picker.mjs","names":[],"sources":["../../calendar-system.ts","../../direction.ts","../../date-time-picker.component.ts"],"sourcesContent":["/**\n * Month grids in any CLDR calendar (`persian`, `islamic-umalqura`, `buddhist`, `hebrew`, ...), with no dependency and no\n * calendar arithmetic of our own: `Intl.DateTimeFormat` says which day of its month a date is, and a month is the run of\n * days from one day 1 to the next. That holds for lunar months and for leap months alike.\n *\n * Every date in and out is an ISO Gregorian `YYYY-MM-DD`, so a form value never changes shape. A month is named by the\n * ISO date of its first day. With no calendar, or `gregory`, the module takes the same path and agrees with plain\n * Gregorian paging. Spec: spec/date-time-picker/index.md#calendar-systems.\n */\n\nconst DAY_MS = 86400000;\n\nconst toMs = (iso: string): number => Date.parse(`${iso}T00:00:00Z`);\nconst toIso = (ms: number): string => new Date(ms).toISOString().slice(0, 10);\nconst shift = (iso: string, days: number): string => toIso(toMs(iso) + days * DAY_MS);\n\nconst formatters = new Map<string, Intl.DateTimeFormat>();\n\nfunction dayFormatter(calendar: string): Intl.DateTimeFormat {\n let formatter = formatters.get(calendar);\n if (!formatter) {\n // English numerals here only so the digits parse; nothing from this formatter is shown to anyone.\n formatter = new Intl.DateTimeFormat(`en-u-ca-${calendar}-nu-latn`, {\n day: \"numeric\",\n timeZone: \"UTC\",\n });\n formatters.set(calendar, formatter);\n }\n return formatter;\n}\n\n/** The day of the month in `calendar`, 1-based. */\nexport function calendarDay(iso: string, calendar = \"gregory\"): number {\n const part = dayFormatter(calendar)\n .formatToParts(new Date(toMs(iso)))\n .find((p) => p.type === \"day\");\n return Number(part?.value);\n}\n\n/** The first day of the month holding `iso`. */\nexport function calendarMonthStart(iso: string, calendar = \"gregory\"): string {\n return shift(iso, 1 - calendarDay(iso, calendar));\n}\n\n/** How many days the month starting on `start` has. */\nexport function calendarMonthLength(start: string, calendar = \"gregory\"): number {\n // Counted from 1: Ethiopic and Coptic have a thirteenth month of five or six days.\n for (let length = 1; length < 40; length++) {\n if (calendarDay(shift(start, length), calendar) === 1) return length;\n }\n throw new RangeError(`calendar-system: no month end after ${start} in ${calendar}`);\n}\n\n/** The first day of the month `delta` months after the one starting on `start`. */\nexport function calendarAddMonths(start: string, delta: number, calendar = \"gregory\"): string {\n let month = start;\n for (let i = 0; i < delta; i++) month = shift(month, calendarMonthLength(month, calendar));\n for (let i = 0; i > delta; i--) month = calendarMonthStart(shift(month, -1), calendar);\n return month;\n}\n\n/** Six rows of seven ISO dates holding the month, starting on `firstDayOfWeek` (0 = Sunday). */\nexport function calendarMonthMatrix(\n start: string,\n firstDayOfWeek: number,\n calendar = \"gregory\",\n): string[][] {\n const weekday = new Date(toMs(start)).getUTCDay();\n let date = shift(start, -((weekday - firstDayOfWeek + 7) % 7));\n const rows: string[][] = [];\n for (let row = 0; row < 6; row++) {\n const days: string[] = [];\n for (let column = 0; column < 7; column++) {\n days.push(date);\n date = shift(date, 1);\n }\n rows.push(days);\n }\n return rows;\n}\n\n/** `locale` with `calendar` set on it, for headings and day labels. No calendar or a bad tag gives the locale back. */\nexport function calendarLocale(\n locale: string | undefined,\n calendar = \"gregory\",\n): string | undefined {\n if (!locale) return locale;\n try {\n return new Intl.Locale(locale, { calendar }).toString();\n } catch {\n return locale;\n }\n}\n","/**\n * Reading direction for keyboard navigation. A grid's left and right arrow keys are *visual*: in a right-to-left layout the next\n * cell is on the left, so ArrowLeft must move forward. Pure apart from reading the DOM, so it is unit-tested with a jsdom element.\n */\n\n/** Whether the text around `element` runs right to left: the nearest `dir` attribute wins, then the computed `direction`. */\nexport function isRtl(element: Element | null | undefined): boolean {\n if (!element) return false;\n const attr = element.closest(\"[dir]\")?.getAttribute(\"dir\")?.toLowerCase();\n if (attr === \"rtl\") return true;\n if (attr === \"ltr\") return false;\n if (typeof getComputedStyle === \"function\")\n return getComputedStyle(element).direction === \"rtl\";\n return false;\n}\n\n/**\n * The key to act on after reading direction into account: in RTL, ArrowLeft and ArrowRight swap. Everything else is unchanged.\n * Callers pass the result to the same `switch` they always used.\n */\nexport function logicalKey(key: string, rtl: boolean): string {\n if (!rtl) return key;\n if (key === \"ArrowLeft\") return \"ArrowRight\";\n if (key === \"ArrowRight\") return \"ArrowLeft\";\n return key;\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n afterNextRender,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from \"@angular/core\";\n// Only the trigger button composes a headless primitive here. Angular's\n// headless `Dialog` renders `<dialog [open]=\"open()\">` — the native tag,\n// not this component's documented `<div class=\"date-time-picker-dialog\"\n// role=\"dialog\">` markup, so composing it would change the root tag\n// outright. It also sets `open` as a plain boolean attribute rather than\n// calling `.showModal()`, which HTML defines as producing a *non-modal*\n// dialog (no backdrop, no top-layer promotion, no native focus trap,\n// Escape does not auto-close) — so composing it would gain none of the\n// modal guarantee this component's own hand-rolled focus trap exists to\n// provide (`aria-modal=\"true\"` alone is a promise the browser does not\n// keep on its own — see the focus-trap code below), while still needing\n// `Dialog` extended with `aria-modal`/`aria-describedby`/`tabindex`/a\n// keydown output it doesn't have today. The calendar grid is bespoke\n// civil-date business logic with no generic headless equivalent either.\nimport { IconButton } from \"@lilydesignsystem/angular-headless\";\n\nimport {\n calendarAddMonths,\n calendarDay,\n calendarLocale,\n calendarMonthLength,\n calendarMonthMatrix,\n calendarMonthStart,\n} from \"./calendar-system\";\nimport { isRtl, logicalKey } from \"./direction\";\n\n/**\n * Default button glyph: U+1F4C5 CALENDAR, followed by U+FE0E VARIATION\n * SELECTOR-15 to request text (monochrome) presentation.\n *\n * Same construction as locale-picker's globe. The variation selector is a\n * hint, not a guarantee — several platforms ignore it and render the emoji\n * anyway — but where it is honoured the glyph inherits the page's text\n * colour and stops looking like a sticker among the siblings' ◑, \"A\" and\n * ➤. Written as an escape, never as a bare character: a variation\n * selector has no visual form at all, so a bare one is invisible in an\n * editor and trivially lost to a careless edit.\n */\nexport const CALENDAR = \"📅︎\";\n\n/** What the control collects. */\nexport type DateTimeMode = \"date\" | \"time\" | \"datetime\";\n\n/**\n * A civil date: no time zone, no instant.\n *\n * The whole component works in these rather than in `Date`, because a\n * `Date` is an instant and a calendar day is not. `new Date(2026, 2, 1)`\n * is midnight *local*, and in a zone whose DST transition falls at\n * midnight that instant can land on the previous day — so a picker built\n * on local-midnight `Date` values shows the wrong day to some users a\n * couple of times a year. Arithmetic here goes through UTC epoch days,\n * which has no such edge.\n */\nexport type CivilDate = { year: number; month: number; day: number };\n\n/** A wall-clock time, 24-hour, no seconds. */\nexport type CivilTime = { hour: number; minute: number };\n\n/** One quick-pick button in the dialog. */\nexport type DateTimeShortcut = {\n /** Stable identifier, passed back on the `shortcut` output. */\n id: string;\n /** Visible button text. Consumer-supplied, so it localises. */\n label: string;\n /** Days from today. Mutually exclusive with `months` and `date`. */\n days?: number;\n /** Calendar months from today. */\n months?: number;\n /** An absolute ISO date, for shortcuts that are not relative. */\n date?: string;\n};\n\n/**\n * Every user-facing string the dialog needs.\n *\n * Grouped into one object rather than spread across a dozen flat inputs.\n * The sibling helpers use flat inputs because they need two or three\n * strings; this one needs ten, and ten flat inputs is a call site nobody\n * can read. One object also maps cleanly onto a translation bundle, which\n * is how these strings actually arrive.\n *\n * The four navigation labels and the two footer labels are required: they\n * name buttons that always render, and a button whose accessible name we\n * invented in English is precisely the defect this package exists to\n * avoid. The rest gate optional UI.\n */\nexport type DateTimePickerLabels = {\n /** Accessible name for the previous-year button. */\n previousYear: string;\n /** Accessible name for the previous-month button. */\n previousMonth: string;\n /** Accessible name for the previous-week button. */\n previousWeek: string;\n /** Accessible name for the previous-day button. */\n previousDay: string;\n /** Accessible name for the next-day button. */\n nextDay: string;\n /** Accessible name for the next-week button. */\n nextWeek: string;\n /** Accessible name for the next-month button. */\n nextMonth: string;\n /** Accessible name for the next-year button. */\n nextYear: string;\n /** Visible text of the commit button. */\n confirm: string;\n /** Visible text of the dismiss button. */\n cancel: string;\n /** Label for the hour select. Required when `mode` includes a time. */\n hour?: string;\n /** Label for the minute select. Required when `mode` includes a time. */\n minute?: string;\n /** Label for the AM/PM select, when `hour12` resolves true. */\n meridiem?: string;\n /** Column heading for week numbers. Required when `showWeekNumbers`. */\n week?: string;\n /** Visible text of the clear button. The button renders only when set. */\n clear?: string;\n /**\n * Label for the time-zone select. The select renders only when set, for\n * the same reason `clear` gates its button: a zone list is an opt-in\n * part of the form, and we will not name it in English.\n */\n timeZone?: string;\n /**\n * Message announced when typed text will not parse or is out of range.\n * When set, a `role=\"status\"` live region renders after the field and\n * is wired to it via `aria-errormessage` — without it, `aria-invalid`\n * flips silently and a screen-reader user who has already left the\n * field never hears that their date was refused.\n */\n invalid?: string;\n /**\n * Keyboard help for the dialog, e.g. \"Use the arrow keys to choose a\n * date\". When set, it renders inside the dialog and becomes the\n * dialog's `aria-describedby`, so a screen reader speaks it once on\n * open — the APG date-picker dialog ships exactly this affordance.\n */\n instructions?: string;\n};\n\n/** Context passed to a projected icon `<ng-template>` (the button glyph). */\nexport type ChildArgs = {\n /** The committed value, in ISO form. */\n value: string;\n /** Is the dialog open? */\n open: boolean;\n /** The value as the user sees it in the field. */\n display: string;\n};\n\n/** Payload of the `shortcut` output. */\nexport type ShortcutEvent = {\n /** The chosen shortcut's `id`. */\n id: string;\n /** The ISO date the shortcut resolved to. */\n isoDate: string;\n};\n\n// -----------------------------------------------------------------\n// Civil-date arithmetic\n//\n// Pure and total: no local-time `Date` values, no throwing, null for\n// \"not a date\". Exported so the acceptance tests can exercise the\n// arithmetic directly rather than only through the rendered grid.\n// -----------------------------------------------------------------\n\n/** Zero-pad to `width`. */\nexport function pad(n: number, width = 2): string {\n return String(Math.abs(n)).padStart(width, \"0\");\n}\n\n/** Days in a month. `month` is 1-12. */\nexport function daysInMonth(year: number, month: number): number {\n // Day 0 of the next month is the last day of this one.\n return new Date(Date.UTC(year, month, 0)).getUTCDate();\n}\n\n/** `{2026, 3, 1}` → `\"2026-03-01\"`. */\nexport function formatIsoDate(date: CivilDate): string {\n return `${pad(date.year, 4)}-${pad(date.month)}-${pad(date.day)}`;\n}\n\n/**\n * `\"2026-03-01\"` → `{2026, 3, 1}`, or null.\n *\n * Rejects impossible components rather than rolling them over, so\n * `\"2026-02-31\"` is null and not the 3rd of March. A field that silently\n * reinterprets an impossible date is worse than one that refuses it.\n */\nexport function parseIsoDate(text: string): CivilDate | null {\n const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(text.trim());\n if (!m) return null;\n const year = Number(m[1]);\n const month = Number(m[2]);\n const day = Number(m[3]);\n if (month < 1 || month > 12) return null;\n if (day < 1 || day > daysInMonth(year, month)) return null;\n return { year, month, day };\n}\n\n/** Days since the Unix epoch. The unit all date arithmetic goes through. */\nexport function toEpochDay(date: CivilDate): number {\n return Date.UTC(date.year, date.month - 1, date.day) / 86400000;\n}\n\n/** Inverse of `toEpochDay`. */\nexport function fromEpochDay(epochDay: number): CivilDate {\n const d = new Date(epochDay * 86400000);\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n };\n}\n\n/** Shift an ISO date by whole days. */\nexport function addDays(isoDate: string, days: number): string {\n const date = parseIsoDate(isoDate);\n if (!date) return isoDate;\n return formatIsoDate(fromEpochDay(toEpochDay(date) + days));\n}\n\n/**\n * Shift an ISO date by whole months, clamping the day.\n *\n * 31 January + 1 month is 28 February (29 in a leap year), not 3 March.\n * Rolling over is what `Date.prototype.setMonth` does and it is almost\n * never what someone paging a calendar means.\n */\nexport function addMonths(isoDate: string, months: number): string {\n const date = parseIsoDate(isoDate);\n if (!date) return isoDate;\n const total = date.year * 12 + (date.month - 1) + months;\n const year = Math.floor(total / 12);\n const month = (((total % 12) + 12) % 12) + 1;\n return formatIsoDate({\n year,\n month,\n day: Math.min(date.day, daysInMonth(year, month)),\n });\n}\n\n/** Day of week: 0 = Sunday … 6 = Saturday. */\nexport function weekdayOf(isoDate: string): number {\n const date = parseIsoDate(isoDate);\n if (!date) return 0;\n return new Date(Date.UTC(date.year, date.month - 1, date.day)).getUTCDay();\n}\n\n/**\n * ISO-8601 week number.\n *\n * Weeks start Monday and week 1 is the one containing the first Thursday,\n * which is why this pivots on Thursday rather than counting from 1\n * January. Public-sector and clinical rotas quote ISO week numbers, so\n * the column is worth getting exactly right.\n */\nexport function isoWeek(isoDate: string): number {\n if (!parseIsoDate(isoDate)) return 0;\n const mondayIndex = (weekdayOf(isoDate) + 6) % 7;\n const thursday = addDays(isoDate, 3 - mondayIndex);\n const parsed = parseIsoDate(thursday);\n if (!parsed) return 0;\n const jan1 = parseIsoDate(formatIsoDate({ year: parsed.year, month: 1, day: 1 }));\n if (!jan1) return 0;\n return Math.floor((toEpochDay(parsed) - toEpochDay(jan1)) / 7) + 1;\n}\n\n/** `\"09:30\"` → `{9, 30}`, or null. */\nexport function parseIsoTime(text: string): CivilTime | null {\n const m = /^(\\d{2}):(\\d{2})$/.exec(text.trim());\n if (!m) return null;\n const hour = Number(m[1]);\n const minute = Number(m[2]);\n if (hour > 23 || minute > 59) return null;\n return { hour, minute };\n}\n\n/** `{9, 30}` → `\"09:30\"`. */\nexport function formatIsoTime(time: CivilTime): string {\n return `${pad(time.hour)}:${pad(time.minute)}`;\n}\n\n/** Pull the date and time halves out of a mode-appropriate ISO value. */\nexport function splitValue(value: string, mode: DateTimeMode): { date: string; time: string } {\n if (!value) return { date: \"\", time: \"\" };\n if (mode === \"time\") {\n return { date: \"\", time: parseIsoTime(value) ? value : \"\" };\n }\n const [datePart = \"\", timePart = \"\"] = value.split(\"T\");\n return {\n date: parseIsoDate(datePart) ? datePart : \"\",\n time: mode === \"datetime\" && parseIsoTime(timePart) ? timePart : \"\",\n };\n}\n\n/** Recombine the halves. Returns \"\" when the value is incomplete. */\nexport function joinValue(date: string, time: string, mode: DateTimeMode): string {\n if (mode === \"date\") return date;\n if (mode === \"time\") return time;\n return date && time ? `${date}T${time}` : \"\";\n}\n\n/** Is `isoDate` inside the inclusive [min, max] window? Empty bounds pass. */\nexport function withinRange(isoDate: string, min?: string, max?: string): boolean {\n if (min && isoDate < min) return false;\n if (max && isoDate > max) return false;\n return true;\n}\n\n/** Uppercase region subtag of a BCP 47 tag, or \"\". */\nfunction regionOf(locale?: string): string {\n if (!locale) return \"\";\n for (const part of locale.split(/[-_]/).slice(1)) {\n if (/^[A-Za-z]{2}$/.test(part)) return part.toUpperCase();\n }\n return \"\";\n}\n\nconst SUNDAY_FIRST_REGIONS = new Set([\n \"AR\",\n \"BR\",\n \"CA\",\n \"CL\",\n \"CO\",\n \"DO\",\n \"GT\",\n \"HK\",\n \"IL\",\n \"IN\",\n \"JP\",\n \"KR\",\n \"MO\",\n \"MX\",\n \"PE\",\n \"PH\",\n \"PK\",\n \"TH\",\n \"TW\",\n \"US\",\n \"VE\",\n \"ZA\",\n]);\n\nconst SATURDAY_FIRST_REGIONS = new Set([\n \"AE\",\n \"AF\",\n \"BH\",\n \"DJ\",\n \"DZ\",\n \"EG\",\n \"IQ\",\n \"IR\",\n \"JO\",\n \"KW\",\n \"LY\",\n \"OM\",\n \"QA\",\n \"SA\",\n \"SD\",\n \"SY\",\n \"YE\",\n]);\n\n/**\n * First day of the week for a locale: 0 = Sunday … 6 = Saturday.\n *\n * `Intl.Locale.prototype.getWeekInfo` is the right answer, but it is\n * recent enough that a fallback still earns its place — and it is\n * missing from some SSR runtimes entirely. The fallback is a short\n * region table plus a Monday default, Monday being both the ISO-8601\n * rule and the majority convention worldwide.\n */\nexport function firstDayOfWeekFor(locale?: string): number {\n if (locale) {\n try {\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n getWeekInfo?: () => { firstDay: number };\n weekInfo?: { firstDay: number };\n };\n const info = loc.getWeekInfo?.() ?? loc.weekInfo;\n // getWeekInfo reports 1 = Monday … 7 = Sunday, so Sunday (7) has to\n // fold to 0.\n if (info && typeof info.firstDay === \"number\") {\n return info.firstDay % 7;\n }\n } catch {\n // Malformed tag — fall through to the table.\n }\n }\n const region = regionOf(locale);\n if (SUNDAY_FIRST_REGIONS.has(region)) return 0;\n if (SATURDAY_FIRST_REGIONS.has(region)) return 6;\n return 1;\n}\n\n/**\n * The dates of one month's grid, always six rows of seven.\n *\n * Fixed height on purpose. A grid sized to its month runs four to six\n * rows, so the footer — and the confirm button in it — moves vertically\n * as you page months. That is a Fitts's-law tax on every subsequent click\n * and it makes the dialog jump under the pointer. A constant six rows\n * costs at most one extra trailing week.\n */\nexport function monthMatrix(year: number, month: number, firstDayOfWeek: number): string[][] {\n const first = formatIsoDate({ year, month, day: 1 });\n const lead = (weekdayOf(first) - firstDayOfWeek + 7) % 7;\n const start = addDays(first, -lead);\n const weeks: string[][] = [];\n for (let row = 0; row < 6; row++) {\n const week: string[] = [];\n for (let col = 0; col < 7; col++) {\n week.push(addDays(start, row * 7 + col));\n }\n weeks.push(week);\n }\n return weeks;\n}\n\n/** Long and short month names for a locale, index 0 = January. */\nexport function monthNames(locale?: string): {\n long: string[];\n short: string[];\n} {\n const build = (month: \"long\" | \"short\") => {\n try {\n const fmt = new Intl.DateTimeFormat(gregorian(locale), {\n month,\n timeZone: \"UTC\",\n });\n return Array.from({ length: 12 }, (_, i) =>\n fmt.format(new Date(Date.UTC(2021, i, 15))),\n );\n } catch {\n return [];\n }\n };\n return { long: build(\"long\"), short: build(\"short\") };\n}\n\n/** Match a token against a locale's month names. Returns 1-12, or 0. */\nfunction matchMonthName(token: string, names: { long: string[]; short: string[] }): number {\n const norm = (s: string) => s.toLocaleLowerCase().replace(/\\.$/, \"\").normalize(\"NFKD\");\n const t = norm(token);\n if (!t || /^\\d+$/.test(t)) return 0;\n for (let i = 0; i < 12; i++) {\n if (norm(names.long[i] ?? \"\") === t) return i + 1;\n if (norm(names.short[i] ?? \"\") === t) return i + 1;\n }\n // Prefix match, so \"Sept\" finds September. Three characters minimum:\n // \"Ma\" cannot choose between March and May, and guessing there would be\n // worse than refusing.\n if (t.length >= 3) {\n for (let i = 0; i < 12; i++) {\n const long = norm(names.long[i] ?? \"\");\n if (long && long.startsWith(t)) return i + 1;\n }\n }\n return 0;\n}\n\n/**\n * The order a locale writes a numeric date in — `[\"day\",\"month\",\"year\"]`\n * for en-GB, `[\"month\",\"day\",\"year\"]` for en-US.\n */\nexport function numericFieldOrder(locale?: string): (\"day\" | \"month\" | \"year\")[] {\n try {\n const parts = new Intl.DateTimeFormat(gregorian(locale), {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 4, 6)));\n const order = parts\n .map((p) => p.type)\n .filter(\n (t): t is \"day\" | \"month\" | \"year\" => t === \"day\" || t === \"month\" || t === \"year\",\n );\n if (order.length === 3) return order;\n } catch {\n // Fall through.\n }\n return [\"day\", \"month\", \"year\"];\n}\n\n/**\n * Parse typed text into an ISO date.\n *\n * Accepts, in order: ISO `YYYY-MM-DD`; a numeric form whose field order\n * follows the locale, so `03/04/2026` is 3 April in en-GB and 4 March in\n * en-US — which is what each user means; and a form with a written month\n * matched against the locale's own long and short month names, which is\n * what lets DHCW's `27-Jun-2025` round-trip.\n *\n * Anything else is null. Guessing harder than this is how date fields\n * silently record the wrong day.\n */\nexport function parseDateInput(text: string, locale?: string): string | null {\n const trimmed = normalizeDigits(text).trim();\n if (!trimmed) return null;\n\n const iso = parseIsoDate(trimmed);\n if (iso) return formatIsoDate(iso);\n\n const parts = trimmed.split(/[\\s./-]+/).filter(Boolean);\n if (parts.length !== 3) return null;\n\n // Look for a written month first. Whichever field it is, the other two\n // are the day and the year, and their order is then decidable without\n // knowing the locale: the larger number is the year.\n const names = monthNames(locale);\n let month = 0;\n let monthIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n const found = matchMonthName(parts[i], names);\n if (found) {\n month = found;\n monthIndex = i;\n break;\n }\n }\n\n let day = 0;\n let year = 0;\n\n if (monthIndex >= 0) {\n const rest = parts.filter((_, i) => i !== monthIndex).map((p) => Number(p));\n if (rest.some((n) => Number.isNaN(n))) return null;\n [day, year] = rest[0] > rest[1] ? [rest[1], rest[0]] : rest;\n } else {\n const nums = parts.map((p) => Number(p));\n if (nums.some((n) => Number.isNaN(n))) return null;\n const order = numericFieldOrder(locale);\n year = nums[order.indexOf(\"year\")];\n day = nums[order.indexOf(\"day\")];\n month = nums[order.indexOf(\"month\")];\n }\n\n // Two-digit years: the usual 70 pivot. Documented rather than clever,\n // because any choice here is wrong for someone.\n if (year < 100) year += year < 70 ? 2000 : 1900;\n if (month < 1 || month > 12) return null;\n if (day < 1 || day > daysInMonth(year, month)) return null;\n return formatIsoDate({ year, month, day });\n}\n\n/**\n * The locale with the Gregorian calendar forced. The day grid is always Gregorian, so a heading, day label or month name\n * in the locale's own calendar (Solar Hijri for fa-IR, Buddhist years for th-TH, Japanese eras for ja-JP-u-ca-japanese)\n * would name a different date than the cell the user is on. A `calendar` prop is planned (P17-T1).\n */\nexport function gregorian(locale?: string): string | undefined {\n if (!locale) return locale;\n try {\n return new Intl.Locale(locale, { calendar: \"gregory\" }).toString();\n } catch {\n return locale;\n }\n}\n\nconst NATIVE_DIGITS = new Map<string, string>();\n/** Every Unicode decimal digit that `Intl` knows a numbering system for, mapped to its ASCII digit. */\nfunction nativeDigits(): Map<string, string> {\n if (NATIVE_DIGITS.size > 0) return NATIVE_DIGITS;\n for (const system of [\n \"adlm\",\n \"ahom\",\n \"arab\",\n \"arabext\",\n \"bali\",\n \"beng\",\n \"bhks\",\n \"brah\",\n \"cakm\",\n \"cham\",\n \"deva\",\n \"fullwide\",\n \"gong\",\n \"gonm\",\n \"gujr\",\n \"guru\",\n \"hanidec\",\n \"hmng\",\n \"hmnp\",\n \"java\",\n \"kali\",\n \"kawi\",\n \"khmr\",\n \"knda\",\n \"lana\",\n \"lanatham\",\n \"laoo\",\n \"lepc\",\n \"limb\",\n \"mathbold\",\n \"mathdbl\",\n \"mathmono\",\n \"mathsanb\",\n \"mathsans\",\n \"mlym\",\n \"modi\",\n \"mong\",\n \"mroo\",\n \"mtei\",\n \"mymr\",\n \"mymrshan\",\n \"mymrtlng\",\n \"nagm\",\n \"newa\",\n \"nkoo\",\n \"olck\",\n \"orya\",\n \"osma\",\n \"rohg\",\n \"saur\",\n \"segment\",\n \"shrd\",\n \"sind\",\n \"sinh\",\n \"sora\",\n \"sund\",\n \"takr\",\n \"talu\",\n \"tamldec\",\n \"telu\",\n \"thai\",\n \"tibt\",\n \"tirh\",\n \"tnsa\",\n \"vaii\",\n \"wara\",\n \"wcho\",\n ]) {\n try {\n const format = new Intl.NumberFormat(`en-u-nu-${system}`, { useGrouping: false });\n for (let digit = 0; digit < 10; digit++)\n NATIVE_DIGITS.set(format.format(digit), String(digit));\n } catch {\n // A numbering system this runtime lacks.\n }\n }\n return NATIVE_DIGITS;\n}\n\n/** Typed text with native digits (Arabic-Indic, Persian, Devanagari, Bengali, Thai, ...) turned into ASCII digits. */\nexport function normalizeDigits(text: string): string {\n const map = nativeDigits();\n return text.replace(/\\p{Nd}/gu, (d) => map.get(d) ?? d);\n}\n\n/** The locale's own words for the morning and afternoon, lower-cased, without dots or spaces: `{ am: \"ص\", pm: \"م\" }`. */\nfunction dayPeriodWords(locale?: string): { am: string; pm: string } | null {\n try {\n const word = (hour: number): string =>\n new Intl.DateTimeFormat(locale, {\n hour: \"numeric\",\n hourCycle: \"h12\",\n timeZone: \"UTC\",\n })\n .formatToParts(new Date(Date.UTC(2021, 4, 6, hour)))\n .find((p) => p.type === \"dayPeriod\")\n ?.value.toLowerCase()\n .replace(/[.\\s\\u00a0\\u202f]/g, \"\") ?? \"\";\n const am = word(9);\n const pm = word(15);\n return am && pm && am !== pm ? { am, pm } : null;\n } catch {\n return null;\n }\n}\n\n/** Accepts `9:30`, `09:30`, `0930`, `9.30`, and a trailing am/pm. */\nexport function parseTimeInput(text: string, locale?: string): string | null {\n let typed = normalizeDigits(text).trim().toLowerCase();\n // The locale's own day-period words (\"ص\", \"م\", \"pm\", \"午後\") stand in for a/p, which stays accepted in every locale.\n const words = dayPeriodWords(locale);\n if (words) {\n const compact = typed.replace(/[.\\s\\u00a0\\u202f]/g, \"\");\n if (compact.endsWith(words.pm)) typed = `${compact.slice(0, -words.pm.length)} pm`;\n else if (compact.endsWith(words.am)) typed = `${compact.slice(0, -words.am.length)} am`;\n else if (compact.startsWith(words.pm)) typed = `${compact.slice(words.pm.length)} pm`;\n else if (compact.startsWith(words.am)) typed = `${compact.slice(words.am.length)} am`;\n }\n const m = /^(\\d{1,2})[:.]?(\\d{2})\\s*([ap])\\.?m\\.?$|^(\\d{1,2})[:.]?(\\d{2})$/.exec(typed);\n if (!m) return null;\n let hour = Number(m[1] ?? m[4]);\n const minute = Number(m[2] ?? m[5]);\n const meridiem = m[3];\n if (meridiem === \"p\" && hour < 12) hour += 12;\n if (meridiem === \"a\" && hour === 12) hour = 0;\n if (hour > 23 || minute > 59) return null;\n return formatIsoTime({ hour, minute });\n}\n\n/** Does this locale write times on a 12-hour clock? */\nfunction localeUsesHour12(loc?: string): boolean {\n try {\n const parts = new Intl.DateTimeFormat(loc, {\n hour: \"numeric\",\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 0, 1, 13)));\n return parts.some((p) => p.type === \"dayPeriod\");\n } catch {\n return false;\n }\n}\n\n/** The host's current calendar day, read via the *local* getters. */\nfunction todayIso(): string {\n const now = new Date();\n return formatIsoDate({\n year: now.getFullYear(),\n month: now.getMonth() + 1,\n day: now.getDate(),\n });\n}\n\nlet uid = 0;\n/** Stable per-instance id prefix; SSR-safe (no Math.random / Date.now). */\nexport function nextDateTimePickerId(): string {\n uid += 1;\n return `date-time-picker-${uid}`;\n}\n\n/**\n * Optional marker for the projected icon template. Gives consumers typed\n * `let-` variables:\n *\n * ```html\n * <lily-date-time-picker label=\"Choose a date\" [labels]=\"labels\">\n * <ng-template lilyDateTimePickerIcon let-args>{{ args.open ? \"×\" : \"📅\" }}</ng-template>\n * </lily-date-time-picker>\n * ```\n *\n * The component queries any projected `<ng-template>`, so the marker is\n * for type-checking and readability, not for matching.\n */\n@Directive({\n selector: \"ng-template[lilyDateTimePickerIcon]\",\n standalone: true,\n})\nexport class DateTimePickerIcon {\n static ngTemplateContextGuard(\n _dir: DateTimePickerIcon,\n _ctx: unknown,\n ): _ctx is ChildArgs & { $implicit: ChildArgs } {\n return true;\n }\n}\n\n/**\n * DateTimePicker — a headless date / time / datetime control.\n *\n * A typeable text field plus an icon button that opens a WAI-ARIA APG\n * **Date Picker Dialog**: a month grid with a full keyboard contract.\n * Locale-correct by construction — month names, weekday names, first day\n * of week, numeric field order, 12- vs 24-hour clock and day-period names\n * all come from `Intl`. See `spec/index.md` for the full contract.\n *\n * Unlike the three preference helpers this is a **form control**, not a\n * page-header preference control, and it persists nothing.\n */\n@Component({\n selector: \"lily-date-time-picker\",\n standalone: true,\n imports: [NgTemplateOutlet, IconButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n \"(document:click)\": \"onDocumentClick($event)\",\n },\n template: `\n <div\n #rootEl\n class=\"date-time-picker {{ className() }}\"\n [attr.data-mode]=\"mode()\"\n [attr.data-time-zone]=\"timeZone() || null\"\n >\n <input type=\"hidden\" [name]=\"name()\" [value]=\"value()\" />\n @if (labels().timeZone) {\n <input\n type=\"hidden\"\n [name]=\"name() + '-time-zone'\"\n [value]=\"timeZone()\"\n />\n }\n\n <div class=\"date-time-picker-field\">\n <input\n class=\"date-time-picker-input\"\n [id]=\"fieldId()\"\n type=\"text\"\n autocomplete=\"off\"\n [value]=\"display()\"\n [attr.placeholder]=\"placeholder() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [attr.aria-describedby]=\"fieldDescribedBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-errormessage]=\"\n invalid() && labels().invalid ? statusId : null\n \"\n (input)=\"typed.set($any($event.target).value)\"\n (blur)=\"resolveTyped()\"\n (keydown)=\"onFieldKeydown($event)\"\n />\n\n <lily-icon-button\n #buttonEl\n [label]=\"label()\"\n baseClass=\"date-time-picker-button\"\n ariaHaspopup=\"dialog\"\n [ariaExpanded]=\"open()\"\n [ariaControls]=\"dialogId\"\n [disabled]=\"disabled() || readOnly()\"\n (click)=\"open() ? closeDialog() : openDialog(); hoverButton.set(false)\"\n (mouseenter)=\"onTooltipButtonEnter()\"\n (mouseleave)=\"hoverButton.set(false)\"\n (focusin)=\"onTooltipButtonFocusIn()\"\n (focusout)=\"onTooltipButtonFocusOut()\"\n (keydown)=\"onTooltipKeydown($event)\"\n >\n @if (iconTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"childContext()\"\n />\n } @else {\n <span class=\"date-time-picker-icon\" aria-hidden=\"true\">{{\n glyph\n }}</span>\n }\n </lily-icon-button>\n\n <!-- Purely visual: the same text is already the button's aria-label,\n so it is not wired with aria-describedby (that would announce\n the name twice). -->\n <div\n class=\"date-time-picker-tooltip\"\n role=\"tooltip\"\n [id]=\"tooltipId\"\n [attr.hidden]=\"tooltipVisible() ? null : ''\"\n (mouseenter)=\"hoverTooltip.set(true)\"\n (mouseleave)=\"hoverTooltip.set(false)\"\n >{{ label() }}</div>\n </div>\n\n @if (labels().invalid) {\n <!-- Present in the DOM before it has content: a live region that\n appears at the same moment as its message is routinely not\n announced at all. Empty while the field is valid. -->\n <span class=\"date-time-picker-status\" [id]=\"statusId\" role=\"status\">{{\n invalid() ? labels().invalid : \"\"\n }}</span>\n }\n\n <div\n #dialogEl\n class=\"date-time-picker-dialog\"\n [id]=\"dialogId\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"labels().instructions ? instructionsId : null\"\n tabindex=\"-1\"\n [attr.hidden]=\"open() ? null : ''\"\n (keydown)=\"onDialogKeydown($event)\"\n >\n @if (labels().instructions) {\n <!-- Spoken once when the dialog takes focus, via the dialog's\n aria-describedby. Visible by default; a consumer who wants\n it screen-reader-only hides it with their own CSS. -->\n <p class=\"date-time-picker-instructions\" [id]=\"instructionsId\">\n {{ labels().instructions }}\n </p>\n }\n @if (usesDate()) {\n <div class=\"date-time-picker-header\">\n <button\n type=\"button\"\n class=\"date-time-picker-previous-year\"\n [attr.aria-label]=\"labels().previousYear\"\n (click)=\"shiftYear(-1)\"\n >\n <span aria-hidden=\"true\">«</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-month\"\n [attr.aria-label]=\"labels().previousMonth\"\n (click)=\"shiftMonth(-1)\"\n >\n <span aria-hidden=\"true\">‹</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-week\"\n [attr.aria-label]=\"labels().previousWeek\"\n (click)=\"shiftDays(-7)\"\n >\n <span aria-hidden=\"true\">‹‹</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-previous-day\"\n [attr.aria-label]=\"labels().previousDay\"\n (click)=\"shiftDays(-1)\"\n >\n <span aria-hidden=\"true\">‹</span>\n </button>\n\n <!-- Polite, not assertive: paging months is the visible result\n of the user's own keypress, so it should reach a screen\n reader without interrupting anything. -->\n <span\n class=\"date-time-picker-period\"\n [id]=\"periodId\"\n aria-live=\"polite\"\n >{{ periodText() }}</span\n >\n\n <button\n type=\"button\"\n class=\"date-time-picker-next-day\"\n [attr.aria-label]=\"labels().nextDay\"\n (click)=\"shiftDays(1)\"\n >\n <span aria-hidden=\"true\">›</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-week\"\n [attr.aria-label]=\"labels().nextWeek\"\n (click)=\"shiftDays(7)\"\n >\n <span aria-hidden=\"true\">››</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-month\"\n [attr.aria-label]=\"labels().nextMonth\"\n (click)=\"shiftMonth(1)\"\n >\n <span aria-hidden=\"true\">›</span>\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-next-year\"\n [attr.aria-label]=\"labels().nextYear\"\n (click)=\"shiftYear(1)\"\n >\n <span aria-hidden=\"true\">»</span>\n </button>\n </div>\n\n @if (labels().timeZone) {\n <!-- Before the grid, so the zone is chosen before the instant.\n The empty first option is the \"no zone\" state: the picker\n never guesses one from the runtime. -->\n <div class=\"date-time-picker-time-zone\">\n <label\n class=\"date-time-picker-time-zone-label\"\n [for]=\"timeZoneId\"\n >{{ labels().timeZone }}</label\n >\n <!-- A parent [value] binding on <select> races the @for\n block's own per-option bindings: Angular's update pass\n can apply the select's value before the dynamically\n created <option> elements have their own [value]\n applied, so the browser matches nothing. Binding\n [selected] on each <option> instead selects correctly\n regardless of that ordering, because it is evaluated as\n part of the same per-item update as the option's own\n value/text. -->\n <select\n class=\"date-time-picker-time-zone-select\"\n [id]=\"timeZoneId\"\n (change)=\"onTimeZoneSelect($event)\"\n >\n <option value=\"\" [selected]=\"timeZone() === ''\"></option>\n @for (zone of zoneOptions(); track zone) {\n <option [value]=\"zone\" [selected]=\"zone === timeZone()\">\n {{ zoneLabel(zone) }}\n </option>\n }\n </select>\n </div>\n }\n\n <!-- The grid owns its own keyboard contract, which is why the\n handler sits on the table rather than on each of 42 cells. -->\n <table\n #gridEl\n class=\"date-time-picker-calendar\"\n role=\"grid\"\n [attr.aria-labelledby]=\"periodId\"\n (keydown)=\"onGridKeydown($event)\"\n >\n <thead>\n <tr>\n @if (showWeekNumbers()) {\n <th\n class=\"date-time-picker-week-heading\"\n scope=\"col\"\n [attr.abbr]=\"labels().week\"\n >\n {{ labels().week }}\n </th>\n }\n @for (weekday of weekdays(); track $index) {\n <!-- abbr carries the full weekday name, so a screen\n reader announcing the column says \"Monday\" where the\n eye reads \"Mo\". -->\n <th\n class=\"date-time-picker-weekday\"\n scope=\"col\"\n [attr.abbr]=\"weekday.long\"\n >\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of weeks(); track week[0]) {\n <tr>\n @if (showWeekNumbers()) {\n <th class=\"date-time-picker-week\" scope=\"row\">\n {{ isoWeekOf(week[0]) }}\n </th>\n }\n @for (isoDate of week; track isoDate) {\n @let cell = parseCell(isoDate);\n @let isToday = isoDate === today();\n @let isSelected = isoDate === pendingDate();\n @let isDisabled = dayDisabled(isoDate);\n <td role=\"gridcell\" [attr.aria-selected]=\"isSelected\">\n <!-- aria-disabled, not the disabled attribute: a\n vetoed day must stay focusable so the roving\n cursor can land on it and a screen reader can\n announce it as unavailable. A disabled button\n refuses focus, and arrowing across a blocked\n week goes silent while the visible focus stays\n behind. Activation is refused in selectDay\n instead. -->\n <button\n type=\"button\"\n class=\"date-time-picker-day\"\n [attr.data-date]=\"isoDate\"\n [attr.data-outside]=\"cell.outside ? '' : null\"\n [attr.data-today]=\"isToday ? '' : null\"\n [attr.data-selected]=\"isSelected ? '' : null\"\n [attr.data-disabled]=\"isDisabled ? '' : null\"\n [attr.tabindex]=\"isoDate === cursor() ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(isoDate)\"\n [attr.aria-current]=\"isToday ? 'date' : null\"\n [attr.aria-disabled]=\"isDisabled ? 'true' : null\"\n (click)=\"selectDay(isoDate)\"\n >\n {{ cell.day }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (usesTime()) {\n <div class=\"date-time-picker-time\">\n <label class=\"date-time-picker-time-label\" [for]=\"hourId\">\n {{ labels().hour }}\n </label>\n <select\n class=\"date-time-picker-hour\"\n [id]=\"hourId\"\n [value]=\"pendingHour()\"\n (change)=\"setHour(+$any($event.target).value)\"\n >\n @for (option of hourOptions(); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n\n <label class=\"date-time-picker-time-label\" [for]=\"minuteId\">\n {{ labels().minute }}\n </label>\n <select\n class=\"date-time-picker-minute\"\n [id]=\"minuteId\"\n [value]=\"pendingMinute()\"\n (change)=\"setMinute(+$any($event.target).value)\"\n >\n @for (minute of minuteOptions(); track minute) {\n <option [value]=\"minute\">{{ pad2(minute) }}</option>\n }\n </select>\n\n @if (clock12()) {\n <label class=\"date-time-picker-time-label\" [for]=\"meridiemId\">\n {{ labels().meridiem }}\n </label>\n <select\n class=\"date-time-picker-meridiem\"\n [id]=\"meridiemId\"\n [value]=\"pendingHour() >= 12 ? 'pm' : 'am'\"\n (change)=\"setMeridiem($any($event.target).value === 'pm')\"\n >\n <!-- Stable values, localised labels: the visible text is\n the locale's own day-period name. -->\n <option value=\"am\">{{ dayPeriodName(false) }}</option>\n <option value=\"pm\">{{ dayPeriodName(true) }}</option>\n </select>\n }\n </div>\n }\n\n @if (shortcuts().length > 0) {\n <div class=\"date-time-picker-shortcuts\">\n @for (shortcut of shortcuts(); track shortcut.id) {\n <button\n type=\"button\"\n class=\"date-time-picker-shortcut\"\n [attr.data-shortcut-id]=\"shortcut.id\"\n (click)=\"applyShortcut(shortcut)\"\n >\n {{ shortcut.label }}\n </button>\n }\n </div>\n }\n\n <div class=\"date-time-picker-footer\">\n @if (labels().clear) {\n <button\n type=\"button\"\n class=\"date-time-picker-clear\"\n (click)=\"clear()\"\n >\n {{ labels().clear }}\n </button>\n }\n <button\n type=\"button\"\n class=\"date-time-picker-cancel\"\n (click)=\"closeDialog()\"\n >\n {{ labels().cancel }}\n </button>\n <button\n type=\"button\"\n class=\"date-time-picker-confirm\"\n (click)=\"commit()\"\n >\n {{ labels().confirm }}\n </button>\n </div>\n </div>\n </div>\n `,\n})\nexport class DateTimePicker {\n /** Accessible name for the trigger button and the dialog. */\n readonly label = input.required<string>();\n /** Every other user-facing string. See `spec/index.md` §4.2. */\n readonly labels = input.required<DateTimePickerLabels>();\n /** What to collect: a date, a time, or both. */\n readonly mode = input<DateTimeMode>(\"date\");\n /** ISO value: `YYYY-MM-DD`, `HH:MM`, or `YYYY-MM-DDTHH:MM`. Two-way bindable. */\n readonly value = model<string>(\"\");\n /** BCP 47 tag driving month names, weekday names and first weekday. */\n readonly locale = input<string>(\"\");\n /** CLDR calendar for the day grid, such as `persian`. The value stays ISO. */\n readonly calendar = input<string>(\"gregory\");\n /** Earliest selectable date, ISO. */\n readonly min = input<string>(\"\");\n /** Latest selectable date, ISO. */\n readonly max = input<string>(\"\");\n /** Veto individual dates — true means \"cannot be picked\". */\n readonly isDateDisabled = input<((isoDate: string) => boolean) | undefined>(undefined);\n /** 0 = Sunday … 6 = Saturday. Defaults to the locale's convention. */\n readonly firstDayOfWeek = input<number | undefined>(undefined);\n /** Granularity of the minute select. */\n readonly minuteStep = input<number>(1);\n /** 12-hour clock. Defaults to the locale's convention. */\n readonly hour12 = input<boolean | undefined>(undefined);\n /** Render an ISO-8601 week-number column. */\n readonly showWeekNumbers = input<boolean>(false);\n /** Quick-pick buttons. */\n readonly shortcuts = input<DateTimeShortcut[]>([]);\n /** Commit and close as soon as a day is chosen. Defaults to date-only. */\n readonly confirmOnSelect = input<boolean | undefined>(undefined);\n /** `name` of the hidden input that carries the value in a form post. */\n readonly name = input<string>(\"date-time\");\n /**\n * Selected IANA time zone (e.g. `Europe/London`), or `\"\"` for none.\n * Two-way bindable via `[(timeZone)]`, matching `value`. Rides its own\n * hidden input `{name}-time-zone` and is reflected as `data-time-zone`\n * on the root. It is metadata about WHERE the civil value applies, not\n * part of the value — converting to an instant stays the consumer's\n * job. Never guessed from the runtime: the picker no more picks a zone\n * than `locale-picker` picks a locale.\n */\n readonly timeZone = model<string>(\"\");\n /**\n * Zones offered by the select. Defaults to every zone the runtime\n * knows via `Intl.supportedValuesOf(\"timeZone\")` — never a bundled\n * table, the rule month and weekday names already follow.\n */\n readonly timeZones = input<string[] | undefined>(undefined);\n /** Display text per zone id; a zone without an entry shows its id. */\n readonly timeZoneLabels = input<Record<string, string>>({});\n /** `id` of the text field, so a consumer `<label for>` can name it. */\n readonly inputId = input<string>(\"\");\n /** Forwarded to the text field as `aria-describedby`. */\n readonly describedBy = input<string>(\"\");\n /** Placeholder for the text field. */\n readonly placeholder = input<string>(\"\");\n /** Disable the whole control. */\n readonly disabled = input<boolean>(false);\n /**\n * Show the value but refuse edits.\n *\n * Named `readOnly` (not `readonly`) so the Angular input has an\n * unambiguous identifier distinct from the TypeScript `readonly`\n * modifier — the one Angular-forced rename beyond `class` → `className`.\n */\n readonly readOnly = input<boolean>(false);\n /** Mark the field required. */\n readonly required = input<boolean>(false);\n /** Override how a committed value is rendered into the text field. */\n readonly formatValue = input<((value: string) => string) | undefined>(undefined);\n /** Override how typed text is turned back into an ISO value. */\n readonly parseInput = input<((text: string) => string | null) | undefined>(undefined);\n /** Extra CSS class on the root `<div>`. */\n readonly className = input<string>(\"\");\n\n /** Fires after a new value is committed. */\n readonly change = output<string>();\n /** Fires when a shortcut is used, before the value settles. */\n readonly shortcut = output<ShortcutEvent>();\n /** Fires when typed text cannot be parsed. */\n readonly invalidInput = output<string>();\n\n /** Projected icon template; replaces the default glyph when supplied. */\n protected readonly iconTemplate = contentChild(TemplateRef);\n\n private readonly rootRef = viewChild.required<ElementRef<HTMLDivElement>>(\"rootEl\");\n // Angular resolves a template-ref-variable on a component tag to the\n // component INSTANCE by default (not its ElementRef) — exactly what's\n // needed to call the headless component's own public `focus()`\n // method / `element` getter.\n private readonly buttonRef = viewChild.required<IconButton>(\"buttonEl\");\n private readonly dialogRef = viewChild.required<ElementRef<HTMLDivElement>>(\"dialogEl\");\n /** Optional: the grid renders only when `mode` includes a date. */\n private readonly gridRef = viewChild<ElementRef<HTMLTableElement>>(\"gridEl\");\n\n protected readonly glyph = CALENDAR;\n\n /**\n * For rendering the view synchronously before a focus move.\n *\n * Svelte updates the DOM synchronously when state changes, so the\n * canonical helper can focus a freshly-paged month from a microtask.\n * Angular renders later — after the microtask queue drains, whether the\n * app is zone-based or zoneless — so a queued focus into a month that\n * has not rendered yet finds nothing (or, worse, finds and focuses a\n * cell that the next render destroys, dropping focus to `<body>`).\n * `cdr.detectChanges()` inside the event handler is the Angular\n * equivalent of Svelte's synchronous flush.\n */\n private readonly cdr = inject(ChangeDetectorRef);\n\n private readonly baseId = nextDateTimePickerId();\n protected readonly dialogId = `${this.baseId}-dialog`;\n protected readonly periodId = `${this.baseId}-period`;\n protected readonly hourId = `${this.baseId}-hour`;\n protected readonly minuteId = `${this.baseId}-minute`;\n protected readonly meridiemId = `${this.baseId}-meridiem`;\n protected readonly statusId = `${this.baseId}-status`;\n protected readonly instructionsId = `${this.baseId}-instructions`;\n protected readonly timeZoneId = `${this.baseId}-time-zone`;\n\n protected readonly open = signal(false);\n\n // Tooltip: shown while the pointer is over the button or the tooltip\n // itself (hoverable, WCAG 1.4.13) or while the button has keyboard\n // focus; Escape dismisses it without moving focus; never shown while\n // the popup is open, since the popup then explains the control.\n protected readonly tooltipId = `${this.baseId}-tooltip`;\n protected readonly hoverButton = signal(false);\n protected readonly hoverTooltip = signal(false);\n protected readonly focusButton = signal(false);\n protected readonly dismissed = signal(false);\n protected readonly tooltipVisible = computed(\n () =>\n !this.open() &&\n !this.dismissed() &&\n (this.hoverButton() || this.hoverTooltip() || this.focusButton()),\n );\n\n protected onTooltipButtonEnter(): void {\n this.hoverButton.set(true);\n this.dismissed.set(false);\n }\n\n protected onTooltipButtonFocusIn(): void {\n // Keyboard focus only: a mouse click also focuses the button in\n // Chromium, and the tooltip should not stick after a click.\n try {\n this.focusButton.set(this.buttonRef().element?.matches(\":focus-visible\") ?? false);\n } catch {\n this.focusButton.set(true); // engine without :focus-visible — err towards showing\n }\n }\n\n protected onTooltipButtonFocusOut(): void {\n this.focusButton.set(false);\n this.dismissed.set(false);\n }\n\n protected onTooltipKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\" && this.tooltipVisible()) this.dismissed.set(true);\n }\n\n // WCAG 1.4.13 \"dismissable\": while the tooltip is visible, Escape works\n // wherever focus is (hover-only tooltips have focus elsewhere). The\n // listener exists only while visible; the effect cleanup removes it on\n // hide and on destroy. No preventDefault/stopPropagation, focus untouched.\n private readonly tooltipEscapeListener = effect((onCleanup) => {\n if (!this.tooltipVisible() || typeof document === \"undefined\") return;\n const onKey = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") this.dismissed.set(true);\n };\n document.addEventListener(\"keydown\", onKey);\n onCleanup(() => document.removeEventListener(\"keydown\", onKey));\n });\n protected readonly invalid = signal(false);\n\n /**\n * The element that opened the dialog, so close can return focus to it.\n *\n * The APG rule is \"focus returns to the element that invoked the\n * dialog\" — which is the trigger button on a click, but the *text\n * field* when the user pressed Alt+ArrowDown. Always refocusing the\n * button strands a keyboard user one Tab stop past where they were.\n */\n private openerEl: HTMLElement | null = null;\n\n /**\n * Text the user has typed but not yet resolved.\n *\n * `null` means \"no pending edit, show the formatted value\". An empty\n * string is a real state (the user cleared the field) and must not\n * collapse into `null`.\n */\n protected readonly typed = signal<string | null>(null);\n\n /**\n * The pending selection, live only while the dialog is open.\n *\n * Kept separate from `value` so Cancel and Escape can genuinely revert.\n * A picker that writes through on every arrow key has no cancel — only\n * an undo the user has to perform by hand, from memory.\n */\n protected readonly pendingDate = signal(\"\");\n protected readonly pendingTime = signal(\"\");\n\n /** The month on screen. */\n /** The month shown, named by the ISO date of its first day in `calendar`. */\n protected readonly viewStart = signal(\"1970-01-01\");\n\n /** The day the grid's roving tabindex sits on. */\n protected readonly cursor = signal(\"\");\n\n /**\n * Today, sampled once at open and refreshed on the initial effect below.\n * Not re-read per cell: the grid asks \"is this today?\" 42 times a\n * render, and a clock read per cell buys nothing over a clock read per\n * open.\n */\n protected readonly today = signal(\"\");\n\n protected readonly fieldId = computed(() => this.inputId() || `${this.baseId}-input`);\n protected readonly committed = computed(() => splitValue(this.value(), this.mode()));\n protected readonly weekStart = computed(\n () => this.firstDayOfWeek() ?? firstDayOfWeekFor(this.locale() || undefined),\n );\n protected readonly commitOnDay = computed(\n () => this.confirmOnSelect() ?? this.mode() === \"date\",\n );\n protected readonly usesDate = computed(() => this.mode() !== \"time\");\n protected readonly usesTime = computed(() => this.mode() !== \"date\");\n protected readonly clock12 = computed(\n () => this.hour12() ?? localeUsesHour12(this.locale() || undefined),\n );\n\n /**\n * `aria-describedby` for the field: the consumer's hint, plus — while\n * invalid, with `labels().invalid` supplied — the status region, for\n * the assistive technologies that read `aria-describedby` but not the\n * newer `aria-errormessage`.\n */\n protected readonly fieldDescribedBy = computed(\n () =>\n [\n this.describedBy() || undefined,\n this.invalid() && this.labels().invalid ? this.statusId : undefined,\n ]\n .filter(Boolean)\n .join(\" \") || null,\n );\n\n /** The text shown in the field. A pending edit wins until resolved. */\n protected readonly display = computed(() => {\n const t = this.typed();\n if (t !== null) return t;\n const formatter = this.formatValue() ?? ((v: string) => this.defaultFormat(v));\n return formatter(this.value());\n });\n\n /** The \"March 2026\" heading. */\n /**\n * `Intl.supportedValuesOf` is guarded rather than called bare: an empty\n * select beats a throw at mount on an older embedded runtime that\n * lacks the method entirely.\n */\n protected readonly zoneOptions = computed<string[]>(() => {\n if (this.timeZones() !== undefined) return this.timeZones() as string[];\n return typeof Intl.supportedValuesOf === \"function\"\n ? Intl.supportedValuesOf(\"timeZone\")\n : [];\n });\n\n protected readonly periodText = computed(() => {\n const viewStart = this.viewStart();\n try {\n return new Intl.DateTimeFormat(\n calendarLocale(this.locale() || undefined, this.calendar()),\n {\n month: \"long\",\n year: \"numeric\",\n timeZone: \"UTC\",\n },\n ).format(new Date(`${viewStart}T00:00:00Z`));\n } catch {\n return viewStart.slice(0, 7);\n }\n });\n\n /** Column headings, in this locale, starting on `weekStart`. */\n protected readonly weekdays = computed(() => {\n const weekStart = this.weekStart();\n const locale = this.locale() || undefined;\n const out: { short: string; long: string }[] = [];\n for (let i = 0; i < 7; i++) {\n // 2021-08-01 was a Sunday, so this walks the week from whichever\n // day the locale starts on.\n const d = new Date(Date.UTC(2021, 7, 1 + ((weekStart + i) % 7)));\n try {\n out.push({\n short: new Intl.DateTimeFormat(gregorian(locale), {\n weekday: \"short\",\n timeZone: \"UTC\",\n }).format(d),\n long: new Intl.DateTimeFormat(gregorian(locale), {\n weekday: \"long\",\n timeZone: \"UTC\",\n }).format(d),\n });\n } catch {\n out.push({ short: \"\", long: \"\" });\n }\n }\n return out;\n });\n\n protected readonly weeks = computed(() =>\n calendarMonthMatrix(this.viewStart(), this.weekStart(), this.calendar()),\n );\n\n protected readonly pendingHour = computed(() => parseIsoTime(this.pendingTime())?.hour ?? 0);\n protected readonly pendingMinute = computed(\n () => parseIsoTime(this.pendingTime())?.minute ?? 0,\n );\n\n /**\n * The hours offered.\n *\n * On a 12-hour clock this lists only the half of the day the meridiem\n * select is currently on, so the two controls together name exactly one\n * hour. Listing 1-12 once and letting the meridiem reinterpret it is\n * the same thing, but it makes \"12 AM\" ambiguous at precisely the point\n * where users already get it wrong.\n */\n protected readonly hourOptions = computed(() => {\n const clock12 = this.clock12();\n const pendingHour = this.pendingHour();\n const out: { value: number; label: string }[] = [];\n for (let h = 0; h < 24; h++) {\n if (clock12 && h < 12 !== pendingHour < 12) continue;\n out.push({\n value: h,\n label: clock12 ? String(((h + 11) % 12) + 1) : pad(h),\n });\n }\n return out;\n });\n\n protected readonly minuteOptions = computed(() => {\n const step = Math.max(1, this.minuteStep());\n const out: number[] = [];\n for (let m = 0; m < 60; m += step) out.push(m);\n return out;\n });\n\n protected readonly childContext = computed(() => {\n const args: ChildArgs = {\n value: this.value(),\n open: this.open(),\n display: this.display(),\n };\n return { $implicit: args, ...args };\n });\n\n private initialised = false;\n\n constructor() {\n // Seeds the view month and the grid cursor from the committed value\n // (or today) exactly once. Deferred to `effect()`, rather than read\n // synchronously in the constructor, because signal inputs are not\n // bound yet when the constructor runs — an Angular-forced difference\n // from the Svelte original, which reads `value` synchronously at\n // `$props()` time. `effect()` is this catalog's established seam for\n // side effects driven by input signals; see catalog `AGENTS.md`.\n effect(() => {\n const committed = this.committed();\n if (this.initialised) return;\n this.initialised = true;\n const today = todayIso();\n this.today.set(today);\n const anchor = parseIsoDate(committed.date) ?? parseIsoDate(today);\n if (anchor) {\n this.viewStart.set(calendarMonthStart(formatIsoDate(anchor), this.calendar()));\n this.cursor.set(formatIsoDate(anchor));\n }\n });\n\n // Form reset. The visible field takes a one-way `[value]`, so a reset\n // blanked it while `value` — and the hidden input the form submits — kept\n // the date: the field showed nothing and the form still sent the old\n // value. Restore the initial value instead, one tick later (after the\n // browser has reset the DOM) and not when the reset was cancelled. Read\n // after the first render, once the inputs are bound. Like a native reset\n // it emits no `change`; the `value` model is updated.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const root = this.rootRef().nativeElement;\n const form = root.closest(\"form\");\n if (!form) return;\n const initialValue = this.value();\n const initialZone = this.timeZone();\n let timer: ReturnType<typeof setTimeout> | undefined;\n const onReset = (event: Event) => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n if (event.defaultPrevented) return;\n this.closeDialog(false);\n this.typed.set(null);\n this.invalid.set(false);\n this.value.set(initialValue);\n this.timeZone.set(initialZone);\n const field = root.querySelector<HTMLInputElement>(\".date-time-picker-input\");\n const formatter = this.formatValue() ?? ((v: string) => this.defaultFormat(v));\n if (field) field.value = formatter(initialValue ?? \"\");\n this.cdr.markForCheck();\n }, 0);\n };\n form.addEventListener(\"reset\", onReset);\n destroyRef.onDestroy(() => {\n clearTimeout(timer);\n form.removeEventListener(\"reset\", onReset);\n });\n });\n }\n\n // ---------------------------------------------------------------\n // Template helpers\n // ---------------------------------------------------------------\n\n protected pad2(n: number): string {\n return pad(n);\n }\n\n protected isoWeekOf(isoDate: string): number {\n return isoWeek(isoDate);\n }\n\n /** Per-cell derived values for the grid template's `@let`. */\n protected parseCell(isoDate: string): { day: string; outside: boolean } {\n const parsed = parseIsoDate(isoDate);\n return {\n day: parsed ? String(calendarDay(isoDate, this.calendar())) : \"\",\n outside:\n isoDate < this.viewStart() ||\n isoDate >= calendarAddMonths(this.viewStart(), 1, this.calendar()),\n };\n }\n\n /** Accessible name for one day cell, e.g. \"Sunday 1 March 2026\". */\n protected dayLabel(isoDate: string): string {\n const parsed = parseIsoDate(isoDate);\n if (!parsed) return isoDate;\n try {\n return new Intl.DateTimeFormat(\n calendarLocale(this.locale() || undefined, this.calendar()),\n {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n timeZone: \"UTC\",\n },\n ).format(new Date(Date.UTC(parsed.year, parsed.month - 1, parsed.day)));\n } catch {\n return isoDate;\n }\n }\n\n /** The locale's own AM / PM strings, so neither is hardcoded. */\n protected dayPeriodName(pm: boolean): string {\n try {\n const parts = new Intl.DateTimeFormat(gregorian(this.locale() || undefined), {\n hour: \"numeric\",\n hour12: true,\n timeZone: \"UTC\",\n }).formatToParts(new Date(Date.UTC(2021, 0, 1, pm ? 13 : 1)));\n const found = parts.find((p) => p.type === \"dayPeriod\")?.value;\n if (found) return found;\n } catch {\n // Fall through.\n }\n return pm ? \"PM\" : \"AM\";\n }\n\n private formatTimeForDisplay(isoTime: string): string {\n const parsed = parseIsoTime(isoTime);\n if (!parsed) return isoTime;\n try {\n return new Intl.DateTimeFormat(gregorian(this.locale() || undefined), {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: this.clock12(),\n timeZone: \"UTC\",\n }).format(new Date(Date.UTC(2021, 0, 1, parsed.hour, parsed.minute)));\n } catch {\n return isoTime;\n }\n }\n\n /** Render an ISO value the way this locale writes it. */\n private defaultFormat(isoValue: string): string {\n if (!isoValue) return \"\";\n const { date, time } = splitValue(isoValue, this.mode());\n const chunks: string[] = [];\n const parsed = date ? parseIsoDate(date) : null;\n if (parsed) {\n try {\n chunks.push(\n new Intl.DateTimeFormat(gregorian(this.locale() || undefined), {\n day: \"2-digit\",\n month: \"short\",\n year: \"numeric\",\n timeZone: \"UTC\",\n }).format(new Date(Date.UTC(parsed.year, parsed.month - 1, parsed.day))),\n );\n } catch {\n chunks.push(date);\n }\n }\n if (time) chunks.push(this.formatTimeForDisplay(time));\n return chunks.join(\" \");\n }\n\n // ---------------------------------------------------------------\n // Selectability\n // ---------------------------------------------------------------\n\n protected dayDisabled(isoDate: string): boolean {\n if (!withinRange(isoDate, this.min() || undefined, this.max() || undefined)) {\n return true;\n }\n return this.isDateDisabled()?.(isoDate) === true;\n }\n\n /** The nearest selectable day to `isoDate`, searching outwards. */\n private nearestSelectable(isoDate: string): string {\n if (!this.dayDisabled(isoDate)) return isoDate;\n // Bounded: a year either way is far beyond any real min/max window,\n // and an unbounded search would hang on a predicate that disables\n // everything.\n for (let delta = 1; delta <= 366; delta++) {\n const after = addDays(isoDate, delta);\n if (!this.dayDisabled(after)) return after;\n const before = addDays(isoDate, -delta);\n if (!this.dayDisabled(before)) return before;\n }\n return isoDate;\n }\n\n // ---------------------------------------------------------------\n // Open / close / commit\n // ---------------------------------------------------------------\n\n protected openDialog(): void {\n if (this.disabled() || this.readOnly()) return;\n // Remember what opened the dialog — the field on Alt+ArrowDown, the\n // trigger button on a click — so closeDialog can put focus back\n // there, per the APG dialog rule.\n const active = document.activeElement;\n this.openerEl =\n active instanceof HTMLElement && this.rootRef().nativeElement.contains(active)\n ? active\n : (this.buttonRef().element ?? null);\n const today = todayIso();\n this.today.set(today);\n const pendingDate = this.committed().date || this.nearestSelectable(today);\n this.pendingDate.set(pendingDate);\n this.pendingTime.set(this.committed().time || this.defaultTime());\n this.cursor.set(pendingDate);\n const anchor = parseIsoDate(pendingDate) ?? parseIsoDate(today);\n if (anchor) {\n this.viewStart.set(calendarMonthStart(formatIsoDate(anchor), this.calendar()));\n }\n this.open.set(true);\n // Render first, focus second: until change detection runs, the\n // dialog still carries `hidden`, and focusing into a hidden subtree\n // is a no-op in a real browser.\n this.cdr.detectChanges();\n this.focusInitial();\n }\n\n /** Where an unset time starts: now, snapped down to the step. */\n private defaultTime(): string {\n if (!this.usesTime()) return \"\";\n const now = new Date();\n const step = Math.max(1, this.minuteStep());\n return formatIsoTime({\n hour: now.getHours(),\n minute: Math.floor(now.getMinutes() / step) * step,\n });\n }\n\n /** Focus the grid cursor, or the first control when there is no grid. */\n private focusInitial(): void {\n if (this.usesDate()) {\n this.focusCursor();\n return;\n }\n this.focusables()[0]?.focus?.();\n }\n\n protected closeDialog(refocus = true): void {\n if (!this.open()) return;\n this.open.set(false);\n if (refocus) {\n const target = this.openerEl ?? this.buttonRef().element;\n queueMicrotask(() => target?.focus?.());\n }\n }\n\n /** Commit the pending selection to `value` and notify. */\n protected commit(): void {\n const next = joinValue(this.pendingDate(), this.pendingTime(), this.mode());\n // An incomplete datetime is not committed. Half a timestamp is not a\n // smaller truth; it is a different one.\n if (!next) return;\n this.typed.set(null);\n this.invalid.set(false);\n if (next !== this.value()) {\n this.value.set(next);\n this.change.emit(next);\n }\n this.closeDialog();\n }\n\n protected clear(): void {\n this.typed.set(null);\n this.invalid.set(false);\n if (this.value() !== \"\") {\n this.value.set(\"\");\n this.change.emit(\"\");\n }\n this.closeDialog();\n }\n\n // ---------------------------------------------------------------\n // Grid navigation\n // ---------------------------------------------------------------\n\n /**\n * Move the cursor, paging the view when the target is off-screen.\n *\n * Disabled days are still reachable — the cursor lands on them and the\n * button is `aria-disabled` (so it takes real focus and announces), so\n * arrowing across a blocked range works. What is refused is leaving\n * the min/max window entirely, because there is nothing out there to\n * navigate to.\n */\n private moveCursor(nextIso: string): void {\n if (!withinRange(nextIso, this.min() || undefined, this.max() || undefined)) {\n return;\n }\n this.cursor.set(nextIso);\n const parsed = parseIsoDate(nextIso);\n if (parsed) {\n this.viewStart.set(calendarMonthStart(formatIsoDate(parsed), this.calendar()));\n }\n // Synchronous render-then-focus: when the cursor crossed into a new\n // month, the cell it needs does not exist until change detection has\n // run — see `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n\n private focusCursor(): void {\n const dialogEl = this.dialogRef()?.nativeElement;\n const cursor = this.cursor();\n if (!dialogEl || !cursor) return;\n // An attribute selector, not `#id`: the id is not on this element, and\n // a value we generated as `YYYY-MM-DD` needs no escaping.\n const el = dialogEl.querySelector<HTMLElement>(`[data-date=\"${cursor}\"]`);\n // Guard the METHODS, not only the element. jsdom implements no\n // `scrollIntoView`, and an unguarded call throws from inside a\n // keydown handler — where it stays invisible to a green suite.\n el?.focus?.();\n el?.scrollIntoView?.({ block: \"nearest\" });\n }\n\n protected selectDay(isoDate: string): void {\n if (this.dayDisabled(isoDate)) return;\n this.pendingDate.set(isoDate);\n this.cursor.set(isoDate);\n if (this.commitOnDay()) this.commit();\n }\n\n protected shiftMonth(delta: number): void {\n const next = calendarAddMonths(this.viewStart(), delta, this.calendar());\n // Refocus the cursor only when focus is already in the grid: grid\n // paging (PageUp/PageDown, or a browser that focused nothing on\n // click) must carry focus, or it dies with the unrendered cell —\n // but a header button must keep focus, or its user is yanked into\n // the grid after one activation and cannot page twice.\n const hadGridFocus =\n this.gridRef()?.nativeElement.contains(document.activeElement) === true;\n this.viewStart.set(next);\n // Carry the cursor into the new month rather than leaving the roving\n // tabindex on a cell that is no longer rendered.\n const c = parseIsoDate(this.cursor());\n if (c) {\n this.cursor.set(\n addDays(\n next,\n Math.min(\n calendarDay(formatIsoDate(c), this.calendar()),\n calendarMonthLength(next, this.calendar()),\n ) - 1,\n ),\n );\n if (hadGridFocus) {\n // Render-then-focus, synchronously — the target cell does not\n // exist until change detection has run. See `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n }\n\n protected shiftYear(delta: number): void {\n this.shiftMonth(delta * 12);\n }\n\n /**\n * Week/day steps are the fine end of the header: unlike month/year,\n * which move the GRID and merely carry the cursor, these move the\n * pending day itself by ±7 / ±1 civil days and page the grid only\n * when the new day leaves the shown month. A step off the min/max\n * window is refused outright; a step onto a vetoed day moves the\n * cursor — vetoed days are reachable, as with the arrow keys — but\n * leaves the pending selection where it was. No commit even under\n * `confirmOnSelect`.\n */\n protected shiftDays(delta: number): void {\n const from = parseIsoDate(this.cursor()) ? this.cursor() : this.pendingDate();\n if (!from) return;\n const next = addDays(from, delta);\n if (!withinRange(next, this.min() || undefined, this.max() || undefined)) {\n return;\n }\n const hadGridFocus =\n this.gridRef()?.nativeElement.contains(document.activeElement) === true;\n const parsed = parseIsoDate(next);\n if (parsed) {\n this.viewStart.set(calendarMonthStart(formatIsoDate(parsed), this.calendar()));\n }\n this.cursor.set(next);\n if (!this.dayDisabled(next)) this.pendingDate.set(next);\n if (hadGridFocus) {\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n\n protected onTimeZoneSelect(event: Event): void {\n this.timeZone.set((event.target as HTMLSelectElement).value);\n }\n\n /**\n * A plain index expression (`timeZoneLabels()[zone] ?? zone`) trips\n * NG8102: without `noUncheckedIndexedAccess`, TypeScript types a\n * `Record<string, string>` index as always `string`, so the compiler\n * sees the `??` as dead code even though a real, unlisted zone id is\n * exactly the case it exists for. The cast documents that the index\n * genuinely can miss.\n */\n protected zoneLabel(zone: string): string {\n return (this.timeZoneLabels() as Record<string, string | undefined>)[zone] ?? zone;\n }\n\n protected onGridKeydown(event: KeyboardEvent): void {\n switch (logicalKey(event.key, isRtl(this.gridRef()?.nativeElement))) {\n case \"ArrowLeft\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), -1));\n break;\n case \"ArrowRight\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), 1));\n break;\n case \"ArrowUp\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), -7));\n break;\n case \"ArrowDown\":\n event.preventDefault();\n this.moveCursor(addDays(this.cursor(), 7));\n break;\n case \"Home\": {\n event.preventDefault();\n const offset = (weekdayOf(this.cursor()) - this.weekStart() + 7) % 7;\n this.moveCursor(addDays(this.cursor(), -offset));\n break;\n }\n case \"End\": {\n event.preventDefault();\n const offset = (weekdayOf(this.cursor()) - this.weekStart() + 7) % 7;\n this.moveCursor(addDays(this.cursor(), 6 - offset));\n break;\n }\n case \"PageUp\":\n event.preventDefault();\n if (event.shiftKey) this.shiftYear(-1);\n else this.shiftMonth(-1);\n break;\n case \"PageDown\":\n event.preventDefault();\n if (event.shiftKey) this.shiftYear(1);\n else this.shiftMonth(1);\n break;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n this.selectDay(this.cursor());\n break;\n default:\n break;\n }\n }\n\n // ---------------------------------------------------------------\n // Dialog keys and the focus trap\n // ---------------------------------------------------------------\n\n /** Everything tabbable inside the dialog, in DOM order. */\n private focusables(): HTMLElement[] {\n const dialogEl = this.dialogRef()?.nativeElement;\n if (!dialogEl) return [];\n return Array.from(\n dialogEl.querySelectorAll<HTMLElement>(\n 'button:not([disabled]):not([tabindex=\"-1\"]), select:not([disabled])',\n ),\n );\n }\n\n protected onDialogKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n event.preventDefault();\n // Escape discards: `value` is untouched, so the field still shows\n // whatever was committed before the dialog opened.\n this.closeDialog();\n return;\n }\n if (event.key !== \"Tab\") return;\n\n // The trap. `aria-modal=\"true\"` is a promise that focus cannot reach\n // the page behind the dialog, and it is a promise the browser does\n // not keep for us: an untrapped aria-modal dialog tells a screen\n // reader the rest of the page is inert while Tab quietly walks into\n // it.\n const all = this.focusables();\n if (all.length === 0) return;\n const first = all[0];\n const last = all[all.length - 1];\n const active = document.activeElement as HTMLElement | null;\n const dialogEl = this.dialogRef()?.nativeElement;\n if (event.shiftKey && (active === first || !dialogEl?.contains(active))) {\n event.preventDefault();\n last.focus?.();\n } else if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus?.();\n }\n }\n\n // ---------------------------------------------------------------\n // Text field\n // ---------------------------------------------------------------\n\n /** Default text parsing, per mode. */\n private parseTypedForMode(text: string): string | null {\n if (this.mode() === \"time\") return parseTimeInput(text, this.locale() || undefined);\n if (this.mode() === \"date\") return parseDateInput(text, this.locale() || undefined);\n // datetime: split on the last whitespace run or a literal T, and\n // require both halves — see `commit` on why half is refused.\n const m = /^(.*?)[T\\s]+([^\\sT]+)$/.exec(text.trim());\n if (!m) return null;\n const date = parseDateInput(m[1], this.locale() || undefined);\n const time = parseTimeInput(m[2], this.locale() || undefined);\n return date && time ? `${date}T${time}` : null;\n }\n\n /** Resolve typed text on blur or Enter. */\n protected resolveTyped(): void {\n const text = this.typed();\n if (text === null) return;\n\n if (!text.trim()) {\n this.typed.set(null);\n this.invalid.set(false);\n if (this.value() !== \"\") {\n this.value.set(\"\");\n this.change.emit(\"\");\n }\n return;\n }\n\n const parser = this.parseInput();\n const parsed = parser ? parser(text) : this.parseTypedForMode(text);\n if (!parsed) {\n this.invalid.set(true);\n this.invalidInput.emit(text);\n return;\n }\n\n const { date } = splitValue(parsed, this.mode());\n if (this.usesDate() && date && this.dayDisabled(date)) {\n // Parseable but out of bounds. Same outcome as unparseable: the\n // text stays put and the field is marked invalid, rather than being\n // silently snapped to some nearby legal date the user never typed.\n this.invalid.set(true);\n this.invalidInput.emit(text);\n return;\n }\n\n this.typed.set(null);\n this.invalid.set(false);\n if (parsed !== this.value()) {\n this.value.set(parsed);\n this.change.emit(parsed);\n }\n }\n\n protected onFieldKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n this.resolveTyped();\n } else if (event.key === \"ArrowDown\" && event.altKey) {\n // The platform convention for \"open the picker\" from a field,\n // matching <input type=\"date\"> in every major browser.\n event.preventDefault();\n this.openDialog();\n } else if (event.key === \"Escape\" && this.typed() !== null) {\n // Discard the pending edit and show the committed value again —\n // the same contract Escape has inside the dialog. Stops\n // propagating so a surrounding dialog does not also close on\n // what was, to the user, a text-editing keystroke. When no edit\n // is pending the key is left alone.\n event.preventDefault();\n event.stopPropagation();\n this.typed.set(null);\n this.invalid.set(false);\n }\n }\n\n // ---------------------------------------------------------------\n // Time selects\n // ---------------------------------------------------------------\n\n protected setHour(hour: number): void {\n this.pendingTime.set(formatIsoTime({ hour, minute: this.pendingMinute() }));\n }\n\n protected setMinute(minute: number): void {\n this.pendingTime.set(formatIsoTime({ hour: this.pendingHour(), minute }));\n }\n\n /** Cross between AM and PM without changing the minute of the hour. */\n protected setMeridiem(pm: boolean): void {\n this.setHour((this.pendingHour() % 12) + (pm ? 12 : 0));\n }\n\n // ---------------------------------------------------------------\n // Shortcuts\n // ---------------------------------------------------------------\n\n protected applyShortcut(shortcut: DateTimeShortcut): void {\n const base = todayIso();\n let target = shortcut.date ?? base;\n if (shortcut.days !== undefined) target = addDays(base, shortcut.days);\n else if (shortcut.months !== undefined) {\n target = addMonths(base, shortcut.months);\n }\n // A shortcut to a blocked date does nothing rather than landing\n // somewhere near it: \"+4 weeks\" that quietly means \"+27 days\" is a\n // booking error waiting to happen.\n if (this.dayDisabled(target)) return;\n\n this.pendingDate.set(target);\n this.cursor.set(target);\n const parsed = parseIsoDate(target);\n if (parsed) {\n this.viewStart.set(calendarMonthStart(formatIsoDate(parsed), this.calendar()));\n }\n this.shortcut.emit({ id: shortcut.id, isoDate: target });\n if (this.commitOnDay()) this.commit();\n else {\n // Render-then-focus: the shortcut may have paged to a month whose\n // cells do not exist until change detection has run. See `cdr`.\n this.cdr.detectChanges();\n this.focusCursor();\n }\n }\n\n // ---------------------------------------------------------------\n // Dismissal\n // ---------------------------------------------------------------\n\n protected onDocumentClick(event: Event): void {\n if (!this.open()) return;\n const target = event.target as Node | null;\n if (!target) return;\n // Anything outside the dialog closes it — including the component's\n // own text field. The dialog says aria-modal=\"true\", and a modal\n // that stays open while the user edits the field behind it is\n // telling assistive technology one thing and doing another. The\n // trigger button is exempt because its own handler already toggles.\n if (\n this.dialogRef().nativeElement.contains(target) ||\n (this.buttonRef().element?.contains(target) ?? false)\n ) {\n return;\n }\n this.closeDialog(false);\n }\n}\n"],"mappings":";;;;AAUA,MAAM,SAAS;AAEf,MAAM,QAAQ,QAAwB,KAAK,MAAM,GAAG,IAAG,WAAY;AACnE,MAAM,SAAS,OAAuB,IAAI,KAAK,EAAE,CAAC,CAAC,YAAW,CAAE,CAAC,MAAM,GAAG,EAAE;AAC5E,MAAM,SAAS,KAAa,SAAyB,MAAM,KAAK,GAAG,IAAI,OAAO,MAAM;AAEpF,MAAM,6BAAa,IAAI,IAAG;AAE1B,SAAS,aAAa,UAAgB;CAClC,IAAI,YAAY,WAAW,IAAI,QAAQ;CACvC,IAAI,CAAC,WAAW;EAEZ,YAAY,IAAI,KAAK,eAAe,WAAW,SAAQ,WAAY;GAC/D,KAAK;GACL,UAAU;EACb,CAAA;EACD,WAAW,IAAI,UAAU,SAAS;CACtC;CACA,OAAO;AACX;AAGA,SAAgB,YAAY,KAAa,WAAW,WAAS;CACzD,MAAM,OAAO,aAAa,QAAQ,CAAC,CAC9B,cAAc,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,CAClC,MAAM,MAAM,EAAE,SAAS,KAAK;CACjC,OAAO,OAAO,MAAM,KAAK;AAC7B;AAGA,SAAgB,mBAAmB,KAAa,WAAW,WAAS;CAChE,OAAO,MAAM,KAAK,IAAI,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