@4sh/ui-kit 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fr.md +47 -22
- package/README.md +46 -23
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +5 -3
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +439 -0
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +111 -10
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +14 -6
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +655 -92
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1107 -0
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +43 -3
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +5 -3
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +8 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +15 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +8 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +40 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +6 -4
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +8 -3
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +317 -0
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +8 -2
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +374 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +49 -14
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +45 -4
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +2 -2
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +5 -3
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +5 -3
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +5 -3
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -10
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +19 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +5 -3
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2 -2
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/text-search-docs.json +1083 -83
- package/mcp/data/ui-config.json +5592 -2586
- package/mcp/index.js +682 -410
- package/mcp/package.json +1 -1
- package/package.json +29 -1
- package/schematics/index.cjs +1 -1
- package/styles/base/_ripple.scss +53 -0
- package/styles/component-vars.scss +177 -2
- package/styles/generated/_tokens-breakpoint.scss +1 -1
- package/styles/generated/_tokens-metrics.scss +1 -1
- package/styles/generated/_tokens-primitives.scss +1 -1
- package/styles/generated/_tokens-responsive.scss +17 -17
- package/styles/generated/_tokens-semantics.scss +15 -15
- package/styles/generated/_tokens-styles.scss +1 -1
- package/styles/generated/_tokens-transitions.scss +1 -1
- package/styles/generated/_tokens-typography.scss +1 -1
- package/styles/generated/_tokens.scss +1 -1
- package/styles/index.scss +1 -0
- package/styles/settings/_ui-config.scss +9 -0
- package/styles/utils/_helpers.scss +15 -0
- package/styles/utils/_mixins.scss +17 -1
- package/styles.css +1 -1
- package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +234 -0
- package/types/4sh-ui-kit-base-ui-image.d.ts +16 -3
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +7 -2
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +242 -37
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +481 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +32 -2
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +4 -0
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +9 -0
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +4 -1
- package/types/4sh-ui-kit-forms-ui-input.d.ts +28 -2
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-select.d.ts +5 -1
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +126 -0
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +4 -0
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +222 -0
- package/types/4sh-ui-kit-forms.d.ts +38 -7
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +7 -0
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +8 -3
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +16 -3
- package/types/4sh-ui-kit-ripple.d.ts +156 -0
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, numberAttribute, output, contentChild, inject, LOCALE_ID, viewChild, ElementRef, signal, linkedSignal, computed, effect, untracked, forwardRef, Component } from '@angular/core';
|
|
3
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import { input, booleanAttribute, numberAttribute, output, contentChild, inject, LOCALE_ID, ChangeDetectorRef, viewChild, ElementRef, signal, linkedSignal, computed, effect, untracked, forwardRef, Component } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/cdk/overlay';
|
|
6
6
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
7
|
import { BaseFormField, dropdownOverlayPositions, buildMaskSlots, extractMaskData, autoFormatSegments, caretForMask } from '@4sh/ui-kit/forms';
|
|
8
|
-
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
|
8
|
+
import { FocusMonitor, CdkTrapFocus } from '@angular/cdk/a11y';
|
|
9
9
|
import { UiInput } from '@4sh/ui-kit/forms/ui-input';
|
|
10
10
|
import { UiButton } from '@4sh/ui-kit/actions/ui-button';
|
|
11
11
|
import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
|
|
@@ -87,6 +87,38 @@ function normalizeDateInput(v) {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
let nextPanelUid = 0;
|
|
90
|
+
/** Typed `range` separator (FSHSP-118: `"jj/mm/aaaa - jj/mm/aaaa"`) — placeholder, live mask,
|
|
91
|
+
* and `parseTypedMulti` splitting. A plain hyphen, distinct from the DISPLAYED en dash below —
|
|
92
|
+
* reusing this one for display used to silently change the look of every non-typing consumer. */
|
|
93
|
+
const RANGE_SEPARATOR = ' - ';
|
|
94
|
+
/** Displayed (committed) `range` separator — unchanged since before typed entry existed. */
|
|
95
|
+
const RANGE_DISPLAY_SEPARATOR = ' – ';
|
|
96
|
+
/** Typed/displayed `multiple` separator (`"jj/mm/aaaa, jj/mm/aaaa, ..."`) — one separator for both. */
|
|
97
|
+
const MULTIPLE_SEPARATOR = ', ';
|
|
98
|
+
/** Illustrative date the auto placeholder and the field-order probe are both derived from
|
|
99
|
+
* (22 Nov 2023): day, month and year are pairwise distinct, so each one is identifiable in a
|
|
100
|
+
* formatter's own output. A fresh instance per call — a consumer's `dateFormat` receives it,
|
|
101
|
+
* and a shared one could be mutated in place. */
|
|
102
|
+
function probeDate() {
|
|
103
|
+
return new Date(2023, 10, 22);
|
|
104
|
+
}
|
|
105
|
+
/** First index at which any of `tokens` occurs in `text` (`-1` if none) — probes a formatter's
|
|
106
|
+
* output for one {@link probeDate} component, most specific token first. */
|
|
107
|
+
function firstIndexOf(text, tokens) {
|
|
108
|
+
for (const token of tokens) {
|
|
109
|
+
const i = text.indexOf(token);
|
|
110
|
+
if (i !== -1)
|
|
111
|
+
return i;
|
|
112
|
+
}
|
|
113
|
+
return -1;
|
|
114
|
+
}
|
|
115
|
+
/** Splits a flat cell list into rows of `size` (month/year pickers need `role="row"` wrappers). */
|
|
116
|
+
function chunk(items, size) {
|
|
117
|
+
const rows = [];
|
|
118
|
+
for (let i = 0; i < items.length; i += size)
|
|
119
|
+
rows.push(items.slice(i, i + size));
|
|
120
|
+
return rows;
|
|
121
|
+
}
|
|
90
122
|
/**
|
|
91
123
|
* ui-datepicker — headless date / month / year (and optional time) picker.
|
|
92
124
|
*
|
|
@@ -183,6 +215,19 @@ class UiDatepicker extends BaseFormField {
|
|
|
183
215
|
: { dateStyle: 'medium' };
|
|
184
216
|
return new Intl.DateTimeFormat(this.resolvedLocale(), options).format(date);
|
|
185
217
|
}
|
|
218
|
+
/** @ignore `timeOnly` display — respects `hourFormat` (never the locale's own AM/PM-vs-24h
|
|
219
|
+
* default) and `dateFormat` when provided (symmetric with `formatDate`/`formatMonth`, used
|
|
220
|
+
* here as a time formatter). */
|
|
221
|
+
formatTime(date) {
|
|
222
|
+
const custom = this.dateFormat();
|
|
223
|
+
if (custom)
|
|
224
|
+
return custom(date);
|
|
225
|
+
return new Intl.DateTimeFormat(this.resolvedLocale(), {
|
|
226
|
+
hour: '2-digit',
|
|
227
|
+
minute: '2-digit',
|
|
228
|
+
hour12: this.hourFormat() === '12',
|
|
229
|
+
}).format(date);
|
|
230
|
+
}
|
|
186
231
|
/** @ignore Month-view display (numeric + round-trippable when the trigger is typeable). */
|
|
187
232
|
formatMonth(date) {
|
|
188
233
|
if (this.allowInput() && !this.dateFormat()) {
|
|
@@ -206,8 +251,14 @@ class UiDatepicker extends BaseFormField {
|
|
|
206
251
|
/** Accessible name of the toggle button (a11y). */
|
|
207
252
|
this.iconAriaLabel = input('Ouvrir le calendrier', /* @ts-ignore */
|
|
208
253
|
...(ngDevMode ? [{ debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []));
|
|
209
|
-
/**
|
|
210
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Show a clear (×) button in the trigger when a value is set. **Default `true`** (FSHSP-118):
|
|
256
|
+
* only takes effect when `showIcon` is `false` — the calendar/clock toggle otherwise always
|
|
257
|
+
* wins the trigger's single icon slot, so the panel stays reachable by click even once a value
|
|
258
|
+
* is set. With `showIcon` at its own default (`true`), clearing goes through the keyboard
|
|
259
|
+
* (`allowInput`, itself `true` by default) instead: select the text and delete it.
|
|
260
|
+
*/
|
|
261
|
+
this.showClear = input(true, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
211
262
|
/**
|
|
212
263
|
* Shape of the emitted value: `'date'` (a plain `Date` — matches a DTO round-tripped through
|
|
213
264
|
* `class-transformer`) or `'iso'` (ISO `"yyyy-MM-dd"` string, for a value read/written directly
|
|
@@ -242,17 +293,46 @@ class UiDatepicker extends BaseFormField {
|
|
|
242
293
|
/** BCP-47 locale for names and default formatting. Defaults to `LOCALE_ID`. */
|
|
243
294
|
this.locale = input(/* @ts-ignore */
|
|
244
295
|
...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
245
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* Custom display formatter for a single date (overrides the default `Intl` format) — also
|
|
298
|
+
* used, unchanged, as the time formatter in `timeOnly` mode.
|
|
299
|
+
*
|
|
300
|
+
* With `allowInput` and no `parseDate`, the typed text is read back in the day/month/year
|
|
301
|
+
* order **this formatter writes** (probed from its own output, whatever locale it uses
|
|
302
|
+
* internally), not the resolved locale's — so entry and display always agree. A non-numeric
|
|
303
|
+
* format (e.g. `"22 novembre 2023"`) can't be probed: pair it with a matching `parseDate`.
|
|
304
|
+
*/
|
|
246
305
|
this.dateFormat = input(/* @ts-ignore */
|
|
247
306
|
...(ngDevMode ? [undefined, { debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
248
307
|
/**
|
|
249
|
-
* Allow typing the date directly in the trigger (
|
|
250
|
-
*
|
|
251
|
-
* the
|
|
252
|
-
*
|
|
253
|
-
*
|
|
308
|
+
* Allow typing the date directly in the trigger. **Default `true`** (FSHSP-118): a calendar
|
|
309
|
+
* grid alone forces a screen-reader user through ~30 cells to pick a date, when typing it is
|
|
310
|
+
* far faster — set `false` to force the grid-only path instead. The typed text is parsed on
|
|
311
|
+
* blur / `Enter`; an unparsable value reverts to the previously displayed one. When enabled
|
|
312
|
+
* (and no custom `dateFormat`), the value is displayed in a numeric locale format so it
|
|
313
|
+
* round-trips with typing.
|
|
314
|
+
*
|
|
315
|
+
* `single` gets the full experience: a live auto-"/" mask while constructing a date from an
|
|
316
|
+
* empty field (see `typingSlots`), free-form text editing otherwise — no live reformatting,
|
|
317
|
+
* parsed on blur/Enter. "Otherwise" covers both a value that already exists and an edit made
|
|
318
|
+
* inside the text being typed rather than at its tail: editing a segment in place, e.g. just
|
|
319
|
+
* the month, never shifts what follows (FSHSP-118, FSHSP-179).
|
|
320
|
+
*
|
|
321
|
+
* `range`/`multiple` are typeable too (FSHSP-118), but always as plain text — no live mask,
|
|
322
|
+
* only parsed on blur/Enter: `"jj/mm/aaaa - jj/mm/aaaa"` for `range` (exactly two dates,
|
|
323
|
+
* reordered chronologically if typed backwards), `"jj/mm/aaaa, jj/mm/aaaa, ..."` for `multiple`
|
|
324
|
+
* (any count, duplicates collapsed) — see `parseTypedMulti`. The grid keeps working exactly as
|
|
325
|
+
* before either way; typing is a complement, not a replacement.
|
|
326
|
+
*
|
|
327
|
+
* A typeable field is a text field first: **a click in it no longer opens the panel**
|
|
328
|
+
* (FSHSP-180) — the calendar icon, `↓` and the keyboard do. `allowInput="false"` (or
|
|
329
|
+
* `readonly`/`timeOnly`) restores the click-to-open, the field being the affordance there; so
|
|
330
|
+
* does `showIcon="false"`, which leaves no icon to click. See `onTriggerClick`.
|
|
331
|
+
*
|
|
332
|
+
* Has no effect in `timeOnly` mode: the trigger stays read-only there (no parser/formatter for
|
|
333
|
+
* a bare time string).
|
|
254
334
|
*/
|
|
255
|
-
this.allowInput = input(
|
|
335
|
+
this.allowInput = input(true, { ...(ngDevMode ? { debugName: "allowInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
256
336
|
/**
|
|
257
337
|
* Custom parser for the typed text (symmetric with `dateFormat`). Return `null`
|
|
258
338
|
* to reject the input. When omitted, a locale-aware numeric parser is used.
|
|
@@ -274,12 +354,24 @@ class UiDatepicker extends BaseFormField {
|
|
|
274
354
|
this.editableTime = input(true, { ...(ngDevMode ? { debugName: "editableTime" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
275
355
|
/** Show the bottom button bar (Today / Clear) — or the `#buttonbar` template. */
|
|
276
356
|
this.showButtonBar = input(false, { ...(ngDevMode ? { debugName: "showButtonBar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
357
|
+
/** Ripple Effect */
|
|
358
|
+
this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
277
359
|
/** Label of the default "Today" button. */
|
|
278
360
|
this.todayLabel = input("Aujourd'hui", /* @ts-ignore */
|
|
279
361
|
...(ngDevMode ? [{ debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
280
362
|
/** Label of the default "Clear" button. */
|
|
281
363
|
this.clearLabel = input('Effacer', /* @ts-ignore */
|
|
282
364
|
...(ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []));
|
|
365
|
+
/**
|
|
366
|
+
* Accessible hint announcing the expected typed format, chained onto the trigger's
|
|
367
|
+
* `aria-describedby` (alongside the helper/error message, never replacing it) whenever it's
|
|
368
|
+
* typeable (FSHSP-118): the `placeholder` alone is unreliable across screen readers, and it
|
|
369
|
+
* disappears the moment the user starts typing. Defaults to a sentence built from the resolved
|
|
370
|
+
* placeholder (e.g. "Format attendu : jj/mm/aaaa"); pass an explicit string to override it, or
|
|
371
|
+
* `''` to omit it.
|
|
372
|
+
*/
|
|
373
|
+
this.formatHintLabel = input(/* @ts-ignore */
|
|
374
|
+
...(ngDevMode ? [undefined, { debugName: "formatHintLabel" }] : /* istanbul ignore next */ []));
|
|
283
375
|
/** Accessible name of the calendar panel (fallback when no `label`/`ariaLabel`). */
|
|
284
376
|
this.panelAriaLabel = input('Calendrier', /* @ts-ignore */
|
|
285
377
|
...(ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -315,6 +407,11 @@ class UiDatepicker extends BaseFormField {
|
|
|
315
407
|
...(ngDevMode ? [{ debugName: "toggleMeridiemAriaLabel" }] : /* istanbul ignore next */ []));
|
|
316
408
|
/** Render the panel inline (no trigger, no overlay). */
|
|
317
409
|
this.inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
410
|
+
/**
|
|
411
|
+
* Open the panel as soon as the trigger takes focus, pointer *or* keyboard, never a
|
|
412
|
+
* programmatic focus.
|
|
413
|
+
*/
|
|
414
|
+
this.showOnFocus = input(false, { ...(ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
318
415
|
/**
|
|
319
416
|
* Auto-flip the panel above the trigger when there isn't enough room below
|
|
320
417
|
* (default). Set `false` to lock it below the trigger regardless of space.
|
|
@@ -354,6 +451,16 @@ class UiDatepicker extends BaseFormField {
|
|
|
354
451
|
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
355
452
|
/** @ignore */
|
|
356
453
|
this.localeId = inject(LOCALE_ID);
|
|
454
|
+
/** @ignore Focus origin of the trigger, for `showOnFocus`. The CDK is the only thing that can
|
|
455
|
+
* tell a user-initiated focus from a programmatic one (`autofocus`, a host app calling
|
|
456
|
+
* `focus()`), which must not pop a calendar the user never asked for. */
|
|
457
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
458
|
+
/** @ignore Only used to detach the overlay *synchronously* on `Tab`, see `onTriggerKeydown`. */
|
|
459
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
460
|
+
/** @ignore */
|
|
461
|
+
this.doc = inject(DOCUMENT);
|
|
462
|
+
/** @ignore Element the current press started on, see `onOutsideClick`. */
|
|
463
|
+
this.pressOrigin = null;
|
|
357
464
|
/** @ignore */
|
|
358
465
|
this.triggerInput = viewChild('trigger', /* @ts-ignore */
|
|
359
466
|
...(ngDevMode ? [{ debugName: "triggerInput" }] : /* istanbul ignore next */ []));
|
|
@@ -362,11 +469,23 @@ class UiDatepicker extends BaseFormField {
|
|
|
362
469
|
/** @ignore Panel root element (overlay or inline) — used for roving day focus. */
|
|
363
470
|
this.panelEl = viewChild('panel', /* @ts-ignore */
|
|
364
471
|
...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
|
|
472
|
+
/** @ignore Trigger wrapper (field + label + format hint). A non-modal panel has no backdrop,
|
|
473
|
+
* so outside-click dismissal has to know what "inside the trigger" means. */
|
|
474
|
+
this.triggerWrapperEl = viewChild('triggerWrapper', /* @ts-ignore */
|
|
475
|
+
...(ngDevMode ? [{ debugName: "triggerWrapperEl" }] : /* istanbul ignore next */ []));
|
|
365
476
|
/** @ignore */
|
|
366
477
|
this.panelId = `ui-datepicker-panel-${nextPanelUid++}`;
|
|
367
478
|
/** @ignore */
|
|
368
479
|
this.panelOpen = signal(false, /* @ts-ignore */
|
|
369
480
|
...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
|
|
481
|
+
/** @ignore Panel opened without taking the focus (`showOnFocus`): plain popup instead of the
|
|
482
|
+
* usual modal dialog — see {@link DatepickerOpenOrigin}. */
|
|
483
|
+
this.nonModal = signal(false, /* @ts-ignore */
|
|
484
|
+
...(ngDevMode ? [{ debugName: "nonModal" }] : /* istanbul ignore next */ []));
|
|
485
|
+
/** @ignore Set while we hand the focus back to the trigger ourselves (`close`), so the
|
|
486
|
+
* returning focus never re-opens the panel that just closed. `focus()` dispatches
|
|
487
|
+
* synchronously, so a plain flag is enough, no timer to leak. */
|
|
488
|
+
this.suppressFocusOpen = false;
|
|
370
489
|
/** @ignore Element the overlay is anchored to (the input box). */
|
|
371
490
|
this.overlayOrigin = signal(null, /* @ts-ignore */
|
|
372
491
|
...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
|
|
@@ -393,6 +512,11 @@ class UiDatepicker extends BaseFormField {
|
|
|
393
512
|
/** @ignore Raw text while the user edits the trigger (`allowInput`); `null` when not editing. */
|
|
394
513
|
this.typedValue = signal(null, /* @ts-ignore */
|
|
395
514
|
...(ngDevMode ? [{ debugName: "typedValue" }] : /* istanbul ignore next */ []));
|
|
515
|
+
/** @ignore Live mask given up on for the rest of the current entry, because the user edited
|
|
516
|
+
* inside the text instead of appending at its tail (see `onTriggerInput`/`typingSlots`).
|
|
517
|
+
* Lifted by any commit, and as soon as the field reads empty. */
|
|
518
|
+
this.maskSuspended = signal(false, /* @ts-ignore */
|
|
519
|
+
...(ngDevMode ? [{ debugName: "maskSuspended" }] : /* istanbul ignore next */ []));
|
|
396
520
|
/** @ignore Date-based source of truth for all calendar/selection logic; `modelValue`
|
|
397
521
|
* (inherited) only ever carries the public value (`Date` or ISO string per `valueType`),
|
|
398
522
|
* written in lockstep. */
|
|
@@ -401,6 +525,9 @@ class UiDatepicker extends BaseFormField {
|
|
|
401
525
|
/** @ignore Below the trigger, flipping above when `autoFlip` and space is lacking. */
|
|
402
526
|
this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
|
|
403
527
|
...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
|
|
528
|
+
/** @ignore Gutter kept with the viewport edges, matching the one `$panel-max-width`
|
|
529
|
+
* reserves; with `cdkConnectedOverlayPush` it keeps the panel fully on screen. */
|
|
530
|
+
this.overlayViewportMargin = 12;
|
|
404
531
|
/** @ignore Bound (stable) callbacks exposed to the `#buttonbar` template. */
|
|
405
532
|
this.todayCallback = (event) => {
|
|
406
533
|
event?.stopPropagation?.();
|
|
@@ -420,24 +547,19 @@ class UiDatepicker extends BaseFormField {
|
|
|
420
547
|
...(ngDevMode ? [{ debugName: "resolvedMaxDate" }] : /* istanbul ignore next */ []));
|
|
421
548
|
this.resolvedDisabledDates = computed(() => (this.disabledDates() ?? []).map(normalizeDateInput).filter((d) => d !== null), /* @ts-ignore */
|
|
422
549
|
...(ngDevMode ? [{ debugName: "resolvedDisabledDates" }] : /* istanbul ignore next */ []));
|
|
423
|
-
/**
|
|
424
|
-
*
|
|
425
|
-
|
|
426
|
-
* parser/formatter for a bare time string), so it's disabled outright here rather than
|
|
427
|
-
* silently mis-parsing.
|
|
428
|
-
*/
|
|
429
|
-
this.triggerReadonly = computed(() => this.readonly() || !this.allowInput() || this.selectionMode() !== 'single' || this.timeOnly(), /* @ts-ignore */
|
|
550
|
+
/** @ignore Not typeable: manual input off, read-only, or `timeOnly` (no bare-time parser).
|
|
551
|
+
* `range`/`multiple` ARE typeable (FSHSP-118) — see `parseTypedMulti`/`typingSlots`. */
|
|
552
|
+
this.triggerReadonly = computed(() => this.readonly() || !this.allowInput() || this.timeOnly(), /* @ts-ignore */
|
|
430
553
|
...(ngDevMode ? [{ debugName: "triggerReadonly" }] : /* istanbul ignore next */ []));
|
|
431
|
-
/**
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*/
|
|
436
|
-
this.
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return explicit;
|
|
554
|
+
/** @ignore Single-date placeholder token (e.g. `jj/mm/aaaa`) — the building block
|
|
555
|
+
* `resolvedPlaceholder` composes for `range`/`multiple`. With a custom `dateFormat`, the
|
|
556
|
+
* locale's numeric token would be flatly wrong (it describes a format nothing actually
|
|
557
|
+
* produces or accepts) — showing that custom formatter's own output for an illustrative date
|
|
558
|
+
* instead at least matches what the field really expects. */
|
|
559
|
+
this.singleDatePlaceholder = computed(() => {
|
|
560
|
+
const custom = this.dateFormat();
|
|
561
|
+
if (custom)
|
|
562
|
+
return custom(probeDate());
|
|
441
563
|
const fr = this.resolvedLocale().toLowerCase().startsWith('fr');
|
|
442
564
|
const token = { day: fr ? 'jj' : 'dd', month: 'mm', year: fr ? 'aaaa' : 'yyyy' };
|
|
443
565
|
const view = this.view();
|
|
@@ -447,7 +569,7 @@ class UiDatepicker extends BaseFormField {
|
|
|
447
569
|
? { month: '2-digit', year: 'numeric' }
|
|
448
570
|
: { day: '2-digit', month: '2-digit', year: 'numeric' };
|
|
449
571
|
return new Intl.DateTimeFormat(this.resolvedLocale(), opts)
|
|
450
|
-
.formatToParts(
|
|
572
|
+
.formatToParts(probeDate())
|
|
451
573
|
.map((p) => p.type === 'day'
|
|
452
574
|
? token.day
|
|
453
575
|
: p.type === 'month'
|
|
@@ -457,14 +579,87 @@ class UiDatepicker extends BaseFormField {
|
|
|
457
579
|
: p.value)
|
|
458
580
|
.join('');
|
|
459
581
|
}, /* @ts-ignore */
|
|
582
|
+
...(ngDevMode ? [{ debugName: "singleDatePlaceholder" }] : /* istanbul ignore next */ []));
|
|
583
|
+
/**
|
|
584
|
+
* @ignore Placeholder shown in the typeable trigger. Falls back to a hint derived from the
|
|
585
|
+
* resolved locale's field order (e.g. `jj/mm/aaaa` in French, `mm/dd/yyyy` in en-US) — or, with
|
|
586
|
+
* a custom `dateFormat`, from that formatter's own output for an illustrative date (see
|
|
587
|
+
* `singleDatePlaceholder`), since the locale-numeric token would describe a format nothing
|
|
588
|
+
* actually produces or accepts — so the field never advertises the wrong format. Composed into
|
|
589
|
+
* `"jj/mm/aaaa - jj/mm/aaaa"` (`range`) or `"jj/mm/aaaa, ..."` (`multiple`), matching
|
|
590
|
+
* `RANGE_SEPARATOR`/`MULTIPLE_SEPARATOR` (see `parseTypedMulti`).
|
|
591
|
+
*/
|
|
592
|
+
this.resolvedPlaceholder = computed(() => {
|
|
593
|
+
const explicit = this.placeholder();
|
|
594
|
+
// Keep the consumer's placeholder, and don't auto-hint on a read-only trigger.
|
|
595
|
+
if (explicit || this.triggerReadonly())
|
|
596
|
+
return explicit;
|
|
597
|
+
const single = this.singleDatePlaceholder();
|
|
598
|
+
const mode = this.selectionMode();
|
|
599
|
+
if (mode === 'range')
|
|
600
|
+
return `${single}${RANGE_SEPARATOR}${single}`;
|
|
601
|
+
if (mode === 'multiple')
|
|
602
|
+
return `${single}${MULTIPLE_SEPARATOR}...`;
|
|
603
|
+
return single;
|
|
604
|
+
}, /* @ts-ignore */
|
|
460
605
|
...(ngDevMode ? [{ debugName: "resolvedPlaceholder" }] : /* istanbul ignore next */ []));
|
|
461
|
-
/**
|
|
606
|
+
/**
|
|
607
|
+
* @ignore Format hint text, or `null` when there's nothing to announce: the trigger isn't
|
|
608
|
+
* typeable, or `formatHintLabel` was explicitly set to `''` to opt out.
|
|
609
|
+
*/
|
|
610
|
+
this.resolvedFormatHint = computed(() => {
|
|
611
|
+
if (this.triggerReadonly())
|
|
612
|
+
return null;
|
|
613
|
+
const explicit = this.formatHintLabel();
|
|
614
|
+
if (explicit === '')
|
|
615
|
+
return null;
|
|
616
|
+
return explicit || `Format attendu : ${this.resolvedPlaceholder()}`;
|
|
617
|
+
}, /* @ts-ignore */
|
|
618
|
+
...(ngDevMode ? [{ debugName: "resolvedFormatHint" }] : /* istanbul ignore next */ []));
|
|
619
|
+
/** @ignore Stable id for the hint element `resolvedFormatHint` renders into. */
|
|
620
|
+
this.formatHintId = computed(() => `${this.resolvedId()}-format-hint`, /* @ts-ignore */
|
|
621
|
+
...(ngDevMode ? [{ debugName: "formatHintId" }] : /* istanbul ignore next */ []));
|
|
622
|
+
/**
|
|
623
|
+
* @ignore Field order a custom `dateFormat` actually writes, probed from its own output for
|
|
624
|
+
* {@link probeDate}. `null` when there is no custom formatter, or when its output isn't
|
|
625
|
+
* numeric enough to tell (e.g. `"22 novembre 2023"`) — the locale order stands then.
|
|
626
|
+
*
|
|
627
|
+
* The default parser and the live mask have to read the text back in the order the field
|
|
628
|
+
* displays it, and a `dateFormat` is free to use a locale of its own: an `fr-FR` formatter
|
|
629
|
+
* under an `en-US` `LOCALE_ID` displayed `"08/07/2026"` but parsed it month-first, so
|
|
630
|
+
* finishing the entry silently swapped day and month (FSHSP-179).
|
|
631
|
+
*/
|
|
632
|
+
this.customFormatFieldOrder = computed(() => {
|
|
633
|
+
const custom = this.dateFormat();
|
|
634
|
+
if (!custom)
|
|
635
|
+
return null;
|
|
636
|
+
const out = custom(probeDate());
|
|
637
|
+
// 4-digit year probed before the 2-digit one: `"23"` also occurs inside `"2023"` ("20|23"),
|
|
638
|
+
// at an offset that isn't where the year starts.
|
|
639
|
+
const probed = [
|
|
640
|
+
['day', firstIndexOf(out, ['22'])],
|
|
641
|
+
['month', firstIndexOf(out, ['11'])],
|
|
642
|
+
['year', firstIndexOf(out, ['2023', '23'])],
|
|
643
|
+
];
|
|
644
|
+
if (probed.some(([, i]) => i === -1))
|
|
645
|
+
return null;
|
|
646
|
+
if (new Set(probed.map(([, i]) => i)).size !== probed.length)
|
|
647
|
+
return null;
|
|
648
|
+
return probed.sort((a, b) => a[1] - b[1]).map(([field]) => field);
|
|
649
|
+
}, /* @ts-ignore */
|
|
650
|
+
...(ngDevMode ? [{ debugName: "customFormatFieldOrder" }] : /* istanbul ignore next */ []));
|
|
651
|
+
/** @ignore Order of day/month/year driving numeric parsing, the live mask and the auto
|
|
652
|
+
* placeholder: what a custom `dateFormat` writes when that can be probed
|
|
653
|
+
* ({@link customFormatFieldOrder}), the resolved locale's own order otherwise. */
|
|
462
654
|
this.dateFieldOrder = computed(() => {
|
|
655
|
+
const fromFormat = this.customFormatFieldOrder();
|
|
656
|
+
if (fromFormat)
|
|
657
|
+
return fromFormat;
|
|
463
658
|
const parts = new Intl.DateTimeFormat(this.resolvedLocale(), {
|
|
464
659
|
day: '2-digit',
|
|
465
660
|
month: '2-digit',
|
|
466
661
|
year: 'numeric',
|
|
467
|
-
}).formatToParts(
|
|
662
|
+
}).formatToParts(probeDate());
|
|
468
663
|
const order = parts
|
|
469
664
|
.map((p) => p.type)
|
|
470
665
|
.filter((t) => t === 'day' || t === 'month' || t === 'year');
|
|
@@ -475,18 +670,29 @@ class UiDatepicker extends BaseFormField {
|
|
|
475
670
|
this.activeFields = computed(() => this.dateFieldOrder().filter((f) => (this.view() === 'month' ? f !== 'day' : true)), /* @ts-ignore */
|
|
476
671
|
...(ngDevMode ? [{ debugName: "activeFields" }] : /* istanbul ignore next */ []));
|
|
477
672
|
/**
|
|
478
|
-
* @ignore Dynamic mask (day/month/year widths
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
* (
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* `
|
|
485
|
-
*
|
|
486
|
-
*
|
|
673
|
+
* @ignore Dynamic mask (day/month/year widths, `+` time if `showTime`, `+` a second date for
|
|
674
|
+
* `range`) driving the auto-"/"/":"/" - " formatting of the typeable trigger. `null` disables
|
|
675
|
+
* it: `triggerReadonly`, `view === 'year'` (free-form field), a custom `parseDate` (non-numeric
|
|
676
|
+
* format), `hasValue()`, or `multiple` (unbounded date count, no fixed template fits — plain
|
|
677
|
+
* text on blur/Enter instead, see `parseTypedMulti`).
|
|
678
|
+
*
|
|
679
|
+
* `hasValue()`: re-deriving the mask from the raw digit stream only works for *constructing* a
|
|
680
|
+
* value from nothing, not editing one in place (day/month re-validate arbitrary residual digits
|
|
681
|
+
* after any edit — see `onTriggerInput`). So it's off once a value exists — plain text instead,
|
|
682
|
+
* parsed on blur/Enter — and re-arms the moment the field reads empty (`onTriggerInput` commits
|
|
683
|
+
* the clear right there, not just on blur, so `hasValue()` actually flips before the next key).
|
|
684
|
+
*
|
|
685
|
+
* `maskSuspended()`: the same limitation, hit before any value exists — an edit made *inside*
|
|
686
|
+
* the text being typed rather than at its tail (see `onTriggerInput`).
|
|
487
687
|
*/
|
|
488
688
|
this.typingSlots = computed(() => {
|
|
489
|
-
|
|
689
|
+
const mode = this.selectionMode();
|
|
690
|
+
if (this.triggerReadonly() ||
|
|
691
|
+
this.view() === 'year' ||
|
|
692
|
+
this.parseDate() ||
|
|
693
|
+
this.hasValue() ||
|
|
694
|
+
this.maskSuspended() ||
|
|
695
|
+
(mode !== 'single' && mode !== 'range'))
|
|
490
696
|
return null;
|
|
491
697
|
const widths = { day: '99', month: '99', year: '9999' };
|
|
492
698
|
const bounds = {
|
|
@@ -497,13 +703,19 @@ class UiDatepicker extends BaseFormField {
|
|
|
497
703
|
const fields = this.activeFields();
|
|
498
704
|
let mask = fields.map((f) => widths[f]).join('/');
|
|
499
705
|
const segmentBounds = fields.map((f) => bounds[f]);
|
|
500
|
-
if (this.showTime() && this.view() === 'date') {
|
|
706
|
+
if (mode === 'single' && this.showTime() && this.view() === 'date') {
|
|
501
707
|
mask += this.hourFormat() === '12' ? ' 99:99 aa' : ' 99:99';
|
|
502
708
|
segmentBounds.push(this.hourFormat() === '12' ? { min: 1, max: 12 } : { min: 0, max: 23 }, {
|
|
503
709
|
min: 0,
|
|
504
710
|
max: 59,
|
|
505
711
|
});
|
|
506
712
|
}
|
|
713
|
+
if (mode === 'range') {
|
|
714
|
+
// Second date, same widths/bounds, joined by the literal typing separator — no `showTime`
|
|
715
|
+
// support here (typed `range` is always `startOfDay`, see `parseTypedMulti`).
|
|
716
|
+
mask += RANGE_SEPARATOR + fields.map((f) => widths[f]).join('/');
|
|
717
|
+
segmentBounds.push(...fields.map((f) => bounds[f]));
|
|
718
|
+
}
|
|
507
719
|
return buildMaskSlots(mask, segmentBounds);
|
|
508
720
|
}, /* @ts-ignore */
|
|
509
721
|
...(ngDevMode ? [{ debugName: "typingSlots" }] : /* istanbul ignore next */ []));
|
|
@@ -519,10 +731,33 @@ class UiDatepicker extends BaseFormField {
|
|
|
519
731
|
/** @ignore A value is currently set. */
|
|
520
732
|
this.hasValue = computed(() => this.selectedDates().length > 0, /* @ts-ignore */
|
|
521
733
|
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
522
|
-
/**
|
|
523
|
-
|
|
734
|
+
/**
|
|
735
|
+
* @ignore A `range` whose two ends are both picked. Between the first and the second click
|
|
736
|
+
* the start is selected but there is no zone yet: the grid must then show its chip alone,
|
|
737
|
+
* never a half band running off toward an end that does not exist.
|
|
738
|
+
*/
|
|
739
|
+
this.rangeComplete = computed(() => {
|
|
740
|
+
if (this.selectionMode() !== 'range')
|
|
741
|
+
return false;
|
|
742
|
+
const [start, end] = this.selectedDates();
|
|
743
|
+
return !!start && !!end;
|
|
744
|
+
}, /* @ts-ignore */
|
|
745
|
+
...(ngDevMode ? [{ debugName: "rangeComplete" }] : /* istanbul ignore next */ []));
|
|
746
|
+
/**
|
|
747
|
+
* @ignore The trigger's right action clears the value (instead of toggling the panel). Gated
|
|
748
|
+
* on `!showIcon()` (FSHSP-118): the calendar/clock toggle always wins the trigger's single icon
|
|
749
|
+
* slot when it's shown, so there's always a click target to reopen the panel and pick a
|
|
750
|
+
* different date directly — the cross only replaces it in configs that hid it (`showIcon`
|
|
751
|
+
* false), where it's the sole remaining affordance to empty the field without a keyboard.
|
|
752
|
+
*/
|
|
753
|
+
this.showClearButton = computed(() => this.showClear() &&
|
|
754
|
+
this.hasValue() &&
|
|
755
|
+
!this.isDisabled() &&
|
|
756
|
+
!this.readonly() &&
|
|
757
|
+
!this.showIcon(), /* @ts-ignore */
|
|
524
758
|
...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
|
|
525
|
-
/** @ignore Right-side icon: clear (×) when clearable + set
|
|
759
|
+
/** @ignore Right-side icon: clear (×) when clearable + set + no calendar toggle to show
|
|
760
|
+
* (see `showClearButton`), else the calendar/clock toggle. */
|
|
526
761
|
this.triggerIcon = computed(() => {
|
|
527
762
|
if (this.showClearButton())
|
|
528
763
|
return 'xmark';
|
|
@@ -567,13 +802,13 @@ class UiDatepicker extends BaseFormField {
|
|
|
567
802
|
if (base === 'year')
|
|
568
803
|
return String(dates[0].getFullYear());
|
|
569
804
|
if (this.timeOnly()) {
|
|
570
|
-
return
|
|
805
|
+
return this.formatTime(dates[0]);
|
|
571
806
|
}
|
|
572
807
|
const mode = this.selectionMode();
|
|
573
808
|
if (mode === 'multiple')
|
|
574
|
-
return dates.map((d) => this.formatDate(d)).join(
|
|
809
|
+
return dates.map((d) => this.formatDate(d)).join(MULTIPLE_SEPARATOR);
|
|
575
810
|
if (mode === 'range')
|
|
576
|
-
return dates.map((d) => this.formatDate(d)).join(
|
|
811
|
+
return dates.map((d) => this.formatDate(d)).join(RANGE_DISPLAY_SEPARATOR);
|
|
577
812
|
return this.formatDate(dates[0]);
|
|
578
813
|
}, /* @ts-ignore */
|
|
579
814
|
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
@@ -660,6 +895,15 @@ class UiDatepicker extends BaseFormField {
|
|
|
660
895
|
});
|
|
661
896
|
}, /* @ts-ignore */
|
|
662
897
|
...(ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []));
|
|
898
|
+
/** @ignore Month/year cells chunked into the rows the CSS actually renders (3 and 2 columns,
|
|
899
|
+
* see `.ui-datepicker-picker._month` / `._year`). A `role="grid"` requires its `gridcell`s to
|
|
900
|
+
* sit inside a `role="row"`; without it the whole grid is invalid ARIA and screen readers get
|
|
901
|
+
* no row structure to walk. Keep the chunk sizes in step with the SCSS column counts. */
|
|
902
|
+
this.monthRows = computed(() => chunk(this.months(), 3), /* @ts-ignore */
|
|
903
|
+
...(ngDevMode ? [{ debugName: "monthRows" }] : /* istanbul ignore next */ []));
|
|
904
|
+
/** @ignore Year-picker rows — 2 columns, see `.ui-datepicker-picker._year`. */
|
|
905
|
+
this.yearRows = computed(() => chunk(this.years(), 2), /* @ts-ignore */
|
|
906
|
+
...(ngDevMode ? [{ debugName: "yearRows" }] : /* istanbul ignore next */ []));
|
|
663
907
|
/** @ignore Hours as shown in the 12h stepper (1–12). */
|
|
664
908
|
this.displayHours = computed(() => {
|
|
665
909
|
if (this.hourFormat() === '24')
|
|
@@ -671,6 +915,20 @@ class UiDatepicker extends BaseFormField {
|
|
|
671
915
|
/** @ignore */
|
|
672
916
|
this.meridiem = computed(() => (this.hours() < 12 ? 'AM' : 'PM'), /* @ts-ignore */
|
|
673
917
|
...(ngDevMode ? [{ debugName: "meridiem" }] : /* istanbul ignore next */ []));
|
|
918
|
+
/**
|
|
919
|
+
* @ignore Whether a click on the trigger opens the panel. It does when the field isn't
|
|
920
|
+
* typeable (`triggerReadonly`: the field then *is* the button), and when `showIcon` is off
|
|
921
|
+
* (no calendar toggle left — without this, nothing would open the panel with a mouse).
|
|
922
|
+
*
|
|
923
|
+
* On a typeable field it does NOT (FSHSP-180). The panel is an overlay with a permanent
|
|
924
|
+
* backdrop, so an open panel swallows every further click on the field: the first click
|
|
925
|
+
* placed the caret, the next one lost focus without moving it — correcting a single segment
|
|
926
|
+
* with the mouse was impossible. Opening also live-commits the typed text through
|
|
927
|
+
* `previewTyped`, which disarms the auto-"/" mask mid-entry (see `typingSlots`). The icon,
|
|
928
|
+
* `↓` and typing are unaffected.
|
|
929
|
+
*/
|
|
930
|
+
this.openOnTriggerClick = computed(() => this.triggerReadonly() || !this.showIcon() || this.showOnFocus(), /* @ts-ignore */
|
|
931
|
+
...(ngDevMode ? [{ debugName: "openOnTriggerClick" }] : /* istanbul ignore next */ []));
|
|
674
932
|
/** @ignore Zero-padded labels for the steppers. */
|
|
675
933
|
this.hoursLabel = computed(() => this.pad(this.hourFormat() === '12' ? this.displayHours() : this.hours()), /* @ts-ignore */
|
|
676
934
|
...(ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -700,6 +958,42 @@ class UiDatepicker extends BaseFormField {
|
|
|
700
958
|
// Never carry an open panel over to the next page (the field can live in
|
|
701
959
|
// an app shell that survives the navigation).
|
|
702
960
|
closeOnNavigation(() => this.close(false));
|
|
961
|
+
// `showOnFocus`: open on a user-initiated focus of the trigger. Driven straight off the
|
|
962
|
+
// FocusMonitor stream rather than the field's own `(focus)`, the origin has to be known
|
|
963
|
+
// before deciding, and this way there is no listener-ordering question to get wrong.
|
|
964
|
+
effect((onCleanup) => {
|
|
965
|
+
const el = this.triggerInput()?.nativeInputElement();
|
|
966
|
+
if (!el)
|
|
967
|
+
return;
|
|
968
|
+
const sub = this.focusMonitor.monitor(el).subscribe((origin) => {
|
|
969
|
+
// `null` = blur. `'program'` = not a user gesture. And `suppressFocusOpen` covers the
|
|
970
|
+
// focus WE give back on close, which the monitor still attributes to whatever gesture
|
|
971
|
+
// triggered that close ('keyboard' for Escape, 'mouse' for a day click).
|
|
972
|
+
if (!origin || origin === 'program' || this.suppressFocusOpen)
|
|
973
|
+
return;
|
|
974
|
+
if (this.showOnFocus())
|
|
975
|
+
this.openFrom('focus');
|
|
976
|
+
});
|
|
977
|
+
onCleanup(() => {
|
|
978
|
+
sub.unsubscribe();
|
|
979
|
+
this.focusMonitor.stopMonitoring(el);
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
// A press is dismissive only from where it STARTED. Released elsewhere, the browser
|
|
983
|
+
// dispatches the click on the common ancestor of both targets, which the overlay reports as
|
|
984
|
+
// an outside click: pressing in the field, with the panel opening under the cursor, would
|
|
985
|
+
// close it again on release. Listening for the whole lifetime and not just while open is
|
|
986
|
+
// what makes that very press catchable, since it precedes the opening.
|
|
987
|
+
effect((onCleanup) => {
|
|
988
|
+
if (this.inline())
|
|
989
|
+
return;
|
|
990
|
+
const record = (event) => (this.pressOrigin = event.target);
|
|
991
|
+
this.doc.addEventListener('pointerdown', record, true);
|
|
992
|
+
onCleanup(() => {
|
|
993
|
+
this.doc.removeEventListener('pointerdown', record, true);
|
|
994
|
+
this.pressOrigin = null;
|
|
995
|
+
});
|
|
996
|
+
});
|
|
703
997
|
// Keep time signals in sync with the (first) value.
|
|
704
998
|
effect(() => {
|
|
705
999
|
const first = this.firstSelectedFrom(this.internalValue() ?? null);
|
|
@@ -727,7 +1021,16 @@ class UiDatepicker extends BaseFormField {
|
|
|
727
1021
|
}
|
|
728
1022
|
}
|
|
729
1023
|
// --- Panel open/close ------------------------------------------------
|
|
730
|
-
|
|
1024
|
+
/**
|
|
1025
|
+
* @param viaIcon Whether this open was specifically triggered by the calendar icon (vs.
|
|
1026
|
+
* clicking the field itself, or a keyboard shortcut) — see the rove-into-grid comment below.
|
|
1027
|
+
*/
|
|
1028
|
+
open(viaIcon = false) {
|
|
1029
|
+
this.openFrom(viaIcon ? 'icon' : 'field');
|
|
1030
|
+
}
|
|
1031
|
+
/** @ignore Real implementation of {@link open}, keyed on the full {@link DatepickerOpenOrigin}
|
|
1032
|
+
* (the public `open()` only ever expresses two of the three). */
|
|
1033
|
+
openFrom(origin) {
|
|
731
1034
|
if (this.inline() || this.isDisabled() || this.readonly() || this.panelOpen())
|
|
732
1035
|
return;
|
|
733
1036
|
const base = this.firstSelectedFrom(this.internalValue() ?? null) ?? startOfDay(new Date());
|
|
@@ -737,10 +1040,23 @@ class UiDatepicker extends BaseFormField {
|
|
|
737
1040
|
this.focusedMonthIndex.set(base.getMonth());
|
|
738
1041
|
this.focusedYear.set(base.getFullYear());
|
|
739
1042
|
this.overlayOrigin.set(this.resolveOverlayOrigin());
|
|
1043
|
+
// Before `panelOpen`: the overlay reads `hasBackdrop` when it attaches, not after.
|
|
1044
|
+
// `showOnFocus` makes the panel a popup whichever way it was opened, so the field never
|
|
1045
|
+
// gets two different behaviours depending on how it got there.
|
|
1046
|
+
this.nonModal.set(origin === 'focus' || this.showOnFocus());
|
|
740
1047
|
this.panelOpen.set(true);
|
|
741
1048
|
this.opened.emit();
|
|
742
|
-
// Keep focus in the input
|
|
743
|
-
|
|
1049
|
+
// Keep focus in the input whenever it's typeable; only rove into the grid when it isn't
|
|
1050
|
+
// (`triggerReadonly`) or when opened via the icon specifically (`viaIcon` — "I want the
|
|
1051
|
+
// grid"). Used to key off `selectionMode() !== 'single'` instead, which broke once `range`
|
|
1052
|
+
// got its own live mask: back then the field's own click ALSO called `open()` (now gated,
|
|
1053
|
+
// see `onTriggerClick`), so roving on every non-`single` mode stole focus back out of the
|
|
1054
|
+
// field the moment you clicked it to type.
|
|
1055
|
+
// Never on `'focus'`: moving the focus as a *consequence* of focusing the field is a WCAG
|
|
1056
|
+
// 3.2.1 change of context. `↓` is how the user asks for the grid there.
|
|
1057
|
+
if (origin !== 'focus' &&
|
|
1058
|
+
this.showCalendar() &&
|
|
1059
|
+
(this.triggerReadonly() || origin === 'icon')) {
|
|
744
1060
|
if (this.currentView() === 'date')
|
|
745
1061
|
this.queueDayFocus();
|
|
746
1062
|
else if (this.currentView() === 'month')
|
|
@@ -755,24 +1071,67 @@ class UiDatepicker extends BaseFormField {
|
|
|
755
1071
|
this.panelOpen.set(false);
|
|
756
1072
|
this.emitTouch();
|
|
757
1073
|
this.closed.emit();
|
|
758
|
-
if (focusTrigger)
|
|
1074
|
+
if (focusTrigger) {
|
|
1075
|
+
// Guard the whole (synchronous) focus dispatch: with `showOnFocus` the returning focus
|
|
1076
|
+
// would otherwise re-open the panel we are closing, on Escape and on every selection.
|
|
1077
|
+
this.suppressFocusOpen = true;
|
|
759
1078
|
this.triggerInput()?.focus();
|
|
1079
|
+
this.suppressFocusOpen = false;
|
|
1080
|
+
}
|
|
760
1081
|
}
|
|
761
1082
|
/** @ignore */
|
|
762
|
-
toggle() {
|
|
763
|
-
this.panelOpen() ? this.close() : this.open();
|
|
1083
|
+
toggle(viaIcon = false) {
|
|
1084
|
+
this.panelOpen() ? this.close() : this.open(viaIcon);
|
|
764
1085
|
}
|
|
765
|
-
/** @ignore Right action: clear when clearable + set, otherwise toggle the panel
|
|
766
|
-
* `stopPropagation` keeps the click from bubbling to the field (which
|
|
1086
|
+
/** @ignore Right action: clear when clearable + set, otherwise toggle the panel (via the icon —
|
|
1087
|
+
* see `open`'s `viaIcon`). `stopPropagation` keeps the click from bubbling to the field (which
|
|
1088
|
+
* would otherwise also call `open()`, without `viaIcon`, right behind this one). */
|
|
767
1089
|
onIconClick(event) {
|
|
768
1090
|
event.stopPropagation();
|
|
769
1091
|
if (this.showClearButton())
|
|
770
1092
|
this.clear();
|
|
771
1093
|
else
|
|
772
|
-
this.toggle();
|
|
1094
|
+
this.toggle(true);
|
|
773
1095
|
}
|
|
774
|
-
/** @ignore */
|
|
1096
|
+
/** @ignore Click anywhere on the trigger (label, field or format hint — they share the wrapper). */
|
|
1097
|
+
onTriggerClick() {
|
|
1098
|
+
if (!this.openOnTriggerClick())
|
|
1099
|
+
return;
|
|
1100
|
+
// The click may have landed on the label or the format hint, leaving focus outside the
|
|
1101
|
+
// wrapper — `Escape`/`↓` are bound there, so they'd be dead while the panel is open. A click
|
|
1102
|
+
// on the field itself is already focused by then, so this never moves the caret.
|
|
1103
|
+
if (!this.triggerReadonly())
|
|
1104
|
+
this.triggerInput()?.focus();
|
|
1105
|
+
// Same origin as the focus that (usually) just opened it, so a click never upgrades a
|
|
1106
|
+
// non-modal panel into a modal one mid-interaction.
|
|
1107
|
+
this.openFrom('field');
|
|
1108
|
+
}
|
|
1109
|
+
/** @ignore Keys typed anywhere in the trigger wrapper. */
|
|
775
1110
|
onTriggerKeydown(event) {
|
|
1111
|
+
// The overlay sits after the trigger in the DOM, so an open panel would capture the
|
|
1112
|
+
// tabulation. Closing it late is worse: the focus lands in a panel that detaches under it,
|
|
1113
|
+
// hence the synchronous refresh. The grid is entered with `↓`, per the APG combobox pattern.
|
|
1114
|
+
if (event.key === 'Tab' &&
|
|
1115
|
+
this.nonModal() &&
|
|
1116
|
+
this.panelOpen() &&
|
|
1117
|
+
this.tabLeavesTrigger(event)) {
|
|
1118
|
+
this.close(false);
|
|
1119
|
+
this.cdr.detectChanges();
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
// The wrapper also catches keys pressed on the trigger's own action button. It is a native
|
|
1123
|
+
// `<button>`: `Enter` and `Space` must reach it. Only `Escape` stays ours.
|
|
1124
|
+
const inputEl = this.triggerInput()?.nativeInputElement();
|
|
1125
|
+
if (inputEl && event.target !== inputEl) {
|
|
1126
|
+
this.handleEscape(event);
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
// `Alt+↑` closes from either flavour of trigger.
|
|
1130
|
+
if (event.key === 'ArrowUp' && event.altKey) {
|
|
1131
|
+
event.preventDefault();
|
|
1132
|
+
this.close();
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
776
1135
|
// Typeable trigger: let printable keys through, only intercept nav/commit.
|
|
777
1136
|
if (!this.triggerReadonly()) {
|
|
778
1137
|
if (event.key === 'ArrowDown') {
|
|
@@ -786,8 +1145,8 @@ class UiDatepicker extends BaseFormField {
|
|
|
786
1145
|
if (this.panelOpen() && this.closeOnSelect() && !this.showTime())
|
|
787
1146
|
this.close(false);
|
|
788
1147
|
}
|
|
789
|
-
else
|
|
790
|
-
this.
|
|
1148
|
+
else {
|
|
1149
|
+
this.handleEscape(event);
|
|
791
1150
|
}
|
|
792
1151
|
return;
|
|
793
1152
|
}
|
|
@@ -795,10 +1154,19 @@ class UiDatepicker extends BaseFormField {
|
|
|
795
1154
|
event.preventDefault();
|
|
796
1155
|
this.open();
|
|
797
1156
|
}
|
|
798
|
-
else
|
|
799
|
-
this.
|
|
1157
|
+
else {
|
|
1158
|
+
this.handleEscape(event);
|
|
800
1159
|
}
|
|
801
1160
|
}
|
|
1161
|
+
/** @ignore `Escape` is consumed only when it really closes the panel. A closed one lets it
|
|
1162
|
+
* bubble, so a parent dialog stays reachable by the same key. */
|
|
1163
|
+
handleEscape(event) {
|
|
1164
|
+
if (event.key !== 'Escape' || !this.panelOpen())
|
|
1165
|
+
return;
|
|
1166
|
+
event.preventDefault();
|
|
1167
|
+
event.stopPropagation();
|
|
1168
|
+
this.close();
|
|
1169
|
+
}
|
|
802
1170
|
/**
|
|
803
1171
|
* @ignore Track the raw text as the user types; live-preview the open panel. When a typing
|
|
804
1172
|
* mask applies (see `typingSlots`), auto-insert "/" as soon as a segment is complete (same
|
|
@@ -810,6 +1178,17 @@ class UiDatepicker extends BaseFormField {
|
|
|
810
1178
|
const slots = this.typingSlots();
|
|
811
1179
|
if (!slots) {
|
|
812
1180
|
this.typedValue.set(value);
|
|
1181
|
+
// The mask is off because a value already exists, or an in-place edit suspended it (see
|
|
1182
|
+
// `typingSlots`) — but the field was just emptied by hand, with no blur/Enter to go through
|
|
1183
|
+
// `commitTyped`'s own clear. Commit it right here instead of waiting for a commit that may
|
|
1184
|
+
// never come: `hasValue()` flips to `false` for real and the suspension lifts, so
|
|
1185
|
+
// `typingSlots()` re-arms the mask on the very next keystroke, for whatever fresh date
|
|
1186
|
+
// comes next (FSHSP-118).
|
|
1187
|
+
if (!value.trim()) {
|
|
1188
|
+
this.maskSuspended.set(false);
|
|
1189
|
+
if (this.hasValue())
|
|
1190
|
+
this.clear();
|
|
1191
|
+
}
|
|
813
1192
|
if (this.panelOpen())
|
|
814
1193
|
this.previewTyped();
|
|
815
1194
|
return;
|
|
@@ -818,28 +1197,78 @@ class UiDatepicker extends BaseFormField {
|
|
|
818
1197
|
const caret = el?.selectionStart ?? value.length;
|
|
819
1198
|
// Number of data characters located BEFORE the caret (stable anchor, same trick as ui-input-mask).
|
|
820
1199
|
const dataBeforeCaret = extractMaskData(value.slice(0, caret)).length;
|
|
821
|
-
const
|
|
1200
|
+
const newData = extractMaskData(value);
|
|
1201
|
+
// Editing INSIDE the text (data still sits after the caret) rather than appending at its
|
|
1202
|
+
// tail: the mask can only re-derive the whole field from one flat digit stream, so re-running
|
|
1203
|
+
// it here re-slices every following segment by however much this edit grew or shrank —
|
|
1204
|
+
// replacing the month "07" with a single "1" turned "08/07/2026" into "08/12/026", the year
|
|
1205
|
+
// silently losing a digit (FSHSP-179). Give the mask up for the rest of the entry instead —
|
|
1206
|
+
// exactly what `allowInput` already promises once a value exists: plain text, parsed on
|
|
1207
|
+
// blur/Enter. For the rest of the entry, not just this keystroke: the digits still to come
|
|
1208
|
+
// belong to the segment being fixed, and re-arming under the caret would shift them again.
|
|
1209
|
+
if (dataBeforeCaret < newData.length) {
|
|
1210
|
+
this.maskSuspended.set(true);
|
|
1211
|
+
this.typedValue.set(value);
|
|
1212
|
+
if (this.panelOpen())
|
|
1213
|
+
this.previewTyped();
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
// A deletion (Backspace/Delete/selection-clear) leaves only ALREADY-valid digits behind —
|
|
1217
|
+
// re-running the bounds check against them (meant to reject a just-typed invalid leading
|
|
1218
|
+
// digit, e.g. "8" can't start a 1-31 day) can instead skip a still-valid residual one and
|
|
1219
|
+
// misalign every segment after it (FSHSP-118: only the year, which carries no bound, always
|
|
1220
|
+
// survived editing untouched). Comparing data lengths (not `event.inputType`, unavailable
|
|
1221
|
+
// here) distinguishes typing/pasting (grows or holds, still bounds-checked) from deleting
|
|
1222
|
+
// (shrinks, bounds-checked only up to the final blur/Enter parse — see `finalizeParsed`).
|
|
1223
|
+
// Baseline is `displayValue()` (what's actually shown before this edit — typed text OR a
|
|
1224
|
+
// calendar-committed date, `typedValue` alone would miss the latter), read before any
|
|
1225
|
+
// signal write below still reflects the state.
|
|
1226
|
+
const enforceBounds = newData.length >= extractMaskData(this.displayValue()).length;
|
|
1227
|
+
const { text, tokenIndices, dataEnd } = autoFormatSegments(slots, newData, { enforceBounds });
|
|
822
1228
|
this.typedValue.set(text);
|
|
823
1229
|
if (el) {
|
|
824
1230
|
el.value = text;
|
|
825
|
-
|
|
1231
|
+
// A deletion (!enforceBounds) whose caret sat at/past all remaining data (editing at the
|
|
1232
|
+
// tail, by far the common case — see `enforceBounds` above) always lands on `dataEnd`,
|
|
1233
|
+
// never on `caretForMask`'s result: that function answers "where's the next slot to type
|
|
1234
|
+
// INTO", which for a just-emptied segment is the position right after its
|
|
1235
|
+
// eagerly-auto-inserted trailing separator — landing there makes the very next Backspace
|
|
1236
|
+
// delete that decorative separator (silently re-inserted next render) instead of the
|
|
1237
|
+
// segment's last digit, so deleting looks stuck one keystroke short forever (FSHSP-118).
|
|
1238
|
+
// A mid-string deletion (more data still sits after the caret) falls back to the normal
|
|
1239
|
+
// computation unchanged — still an approximation (see the class doc), just not this trap.
|
|
1240
|
+
const atTail = dataBeforeCaret >= newData.length;
|
|
1241
|
+
const pos = !enforceBounds && atTail ? dataEnd : caretForMask(tokenIndices, dataBeforeCaret, dataEnd);
|
|
826
1242
|
el.setSelectionRange(pos, pos);
|
|
827
1243
|
}
|
|
828
1244
|
if (this.panelOpen())
|
|
829
1245
|
this.previewTyped();
|
|
830
1246
|
}
|
|
1247
|
+
/** @ignore Whether `text` already has its time portion too, when `showTime` requires one.
|
|
1248
|
+
* `previewTyped` needs this: without it, `hasValue()` (and the mask) flipped off the moment
|
|
1249
|
+
* day/month/year were typed, before a single time digit — the next digit then glued onto the
|
|
1250
|
+
* year with no mask to insert "HH:MM" (FSHSP-118). `commitTyped` doesn't use this: a date typed
|
|
1251
|
+
* and blurred without a time is still a legitimate commit (time defaults to the steppers). */
|
|
1252
|
+
hasCompleteTimeIfNeeded(text) {
|
|
1253
|
+
if (!this.showTime() || this.view() !== 'date')
|
|
1254
|
+
return true;
|
|
1255
|
+
const groups = text.match(/\d+/g) ?? [];
|
|
1256
|
+
return groups.length >= this.activeFields().length + 2;
|
|
1257
|
+
}
|
|
831
1258
|
/**
|
|
832
|
-
* @ignore Reflect a fully-typed date in the open panel
|
|
833
|
-
* without reformatting the field, so the caret stays put while typing.
|
|
1259
|
+
* @ignore Reflect a fully-typed date (or `range`/`multiple` set) in the open panel
|
|
1260
|
+
* (navigate + highlight) without reformatting the field, so the caret stays put while typing.
|
|
834
1261
|
*/
|
|
835
1262
|
previewTyped() {
|
|
836
1263
|
const raw = this.typedValue();
|
|
837
1264
|
if (raw === null || !raw.trim())
|
|
838
1265
|
return;
|
|
839
|
-
|
|
840
|
-
if (!parsed || this.isParsedDisabled(parsed))
|
|
1266
|
+
if (this.selectionMode() === 'single' && !this.hasCompleteTimeIfNeeded(raw.trim()))
|
|
841
1267
|
return;
|
|
842
|
-
const picked = this.
|
|
1268
|
+
const picked = this.parseTypedValue(raw.trim(), true);
|
|
1269
|
+
if (!picked)
|
|
1270
|
+
return;
|
|
1271
|
+
const first = Array.isArray(picked) ? picked[0] : picked;
|
|
843
1272
|
// Update the model (drives the selected-day highlight + live value) but keep
|
|
844
1273
|
// `typedValue` so `displayValue` still returns the raw text (no caret jump).
|
|
845
1274
|
this.internalValue.set(picked);
|
|
@@ -847,24 +1276,90 @@ class UiDatepicker extends BaseFormField {
|
|
|
847
1276
|
this.modelValue.set(external ?? undefined);
|
|
848
1277
|
this.emitChange(external);
|
|
849
1278
|
this.valueChange.emit(external);
|
|
850
|
-
this.viewDate.set(firstOfMonth(
|
|
851
|
-
this.focusedDate.set(startOfDay(
|
|
1279
|
+
this.viewDate.set(firstOfMonth(first));
|
|
1280
|
+
this.focusedDate.set(startOfDay(first));
|
|
852
1281
|
}
|
|
853
1282
|
/** @ignore Parse the typed text on blur, then forward the blur. */
|
|
854
1283
|
onTriggerBlur(event) {
|
|
855
1284
|
this.commitTyped();
|
|
856
1285
|
const next = event.relatedTarget;
|
|
857
|
-
if (!
|
|
1286
|
+
if (!this.panelContains(next))
|
|
858
1287
|
this.emitTouch();
|
|
859
1288
|
this.inputBlur.emit(event);
|
|
860
1289
|
}
|
|
861
|
-
/**
|
|
1290
|
+
/**
|
|
1291
|
+
* @ignore Focus leaving the trigger altogether. A non-modal panel has neither backdrop nor
|
|
1292
|
+
* focus trap, so tabbing on to the next field is a dismissal that nothing else would perform
|
|
1293
|
+
*/
|
|
1294
|
+
onTriggerFocusOut(event) {
|
|
1295
|
+
if (!this.nonModal() || !this.panelOpen())
|
|
1296
|
+
return;
|
|
1297
|
+
const next = event.relatedTarget;
|
|
1298
|
+
if (this.panelContains(next) || this.triggerContains(next))
|
|
1299
|
+
return;
|
|
1300
|
+
this.close(false);
|
|
1301
|
+
}
|
|
1302
|
+
/** @ignore Focus leaving a non-modal panel altogether (`Tab` out of the grid) — same
|
|
1303
|
+
* dismissal as {@link onTriggerBlur}, from the other side. */
|
|
1304
|
+
onPanelFocusOut(event) {
|
|
1305
|
+
if (this.inline() || !this.nonModal() || !this.panelOpen())
|
|
1306
|
+
return;
|
|
1307
|
+
const next = event.relatedTarget;
|
|
1308
|
+
if (!next)
|
|
1309
|
+
return;
|
|
1310
|
+
if (this.panelContains(next) || this.triggerContains(next))
|
|
1311
|
+
return;
|
|
1312
|
+
this.close(false);
|
|
1313
|
+
}
|
|
1314
|
+
/** @ignore Pointer landing outside the overlay. A non-modal panel leaves the trigger live
|
|
1315
|
+
* underneath, and a press there must place the caret, not dismiss the panel it would then
|
|
1316
|
+
* immediately re-open. */
|
|
1317
|
+
onOutsideClick(event) {
|
|
1318
|
+
const origin = this.pressOrigin ?? event.target;
|
|
1319
|
+
if (this.triggerContains(origin) || this.panelContains(origin))
|
|
1320
|
+
return;
|
|
1321
|
+
this.close(false);
|
|
1322
|
+
}
|
|
1323
|
+
/** @ignore Whether this `Tab` walks out of the trigger, rather than between the field and its
|
|
1324
|
+
* own action button (at most two stops, so an exact list beats any heuristic). */
|
|
1325
|
+
tabLeavesTrigger(event) {
|
|
1326
|
+
const wrapper = this.triggerWrapperEl()?.nativeElement;
|
|
1327
|
+
if (!wrapper)
|
|
1328
|
+
return true;
|
|
1329
|
+
const stops = Array.from(wrapper.querySelectorAll('input:not([disabled]), button:not([disabled])')).filter((el) => el.tabIndex >= 0);
|
|
1330
|
+
const index = stops.indexOf(event.target);
|
|
1331
|
+
if (index === -1)
|
|
1332
|
+
return true;
|
|
1333
|
+
return event.shiftKey ? index === 0 : index === stops.length - 1;
|
|
1334
|
+
}
|
|
1335
|
+
/** @ignore Pressing the panel's own chrome must not pull the focus out of the field: a
|
|
1336
|
+
* non-modal panel would be dismissed by its own focusout. Its controls keep the default. */
|
|
1337
|
+
onPanelMousedown(event) {
|
|
1338
|
+
if (!this.nonModal())
|
|
1339
|
+
return;
|
|
1340
|
+
if (event.target?.closest('button, input'))
|
|
1341
|
+
return;
|
|
1342
|
+
event.preventDefault();
|
|
1343
|
+
}
|
|
1344
|
+
/** @ignore */
|
|
1345
|
+
panelContains(node) {
|
|
1346
|
+
return !!node && !!this.panelEl()?.nativeElement.contains(node);
|
|
1347
|
+
}
|
|
1348
|
+
/** @ignore */
|
|
1349
|
+
triggerContains(node) {
|
|
1350
|
+
return !!node && !!this.triggerWrapperEl()?.nativeElement.contains(node);
|
|
1351
|
+
}
|
|
1352
|
+
/** @ignore Parse and apply the typed text (single date, or `range`/`multiple` set — see
|
|
1353
|
+
* `parseTypedValue`); revert to the previous value if invalid. */
|
|
862
1354
|
commitTyped() {
|
|
863
1355
|
if (this.triggerReadonly())
|
|
864
1356
|
return;
|
|
865
1357
|
const raw = this.typedValue();
|
|
866
1358
|
if (raw === null)
|
|
867
1359
|
return; // untouched
|
|
1360
|
+
// Parsed, cleared or reverted, this commit ends the current entry: re-arm the live mask for
|
|
1361
|
+
// the next one (`commit` does it too, for the paths that go through it).
|
|
1362
|
+
this.maskSuspended.set(false);
|
|
868
1363
|
const text = raw.trim();
|
|
869
1364
|
if (!text) {
|
|
870
1365
|
this.typedValue.set(null);
|
|
@@ -872,13 +1367,17 @@ class UiDatepicker extends BaseFormField {
|
|
|
872
1367
|
this.clear();
|
|
873
1368
|
return;
|
|
874
1369
|
}
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
1370
|
+
const picked = this.parseTypedValue(text, true);
|
|
1371
|
+
if (picked) {
|
|
1372
|
+
this.commit(picked); // clears typedValue and reformats
|
|
1373
|
+
const first = Array.isArray(picked) ? picked[0] : picked;
|
|
1374
|
+
// `dateSelect` reports "which single day was just picked" — no such thing for a typed
|
|
1375
|
+
// range/list committed all at once, so it's single-mode only (matches its `Date | string`
|
|
1376
|
+
// output type, which couldn't carry an array anyway).
|
|
1377
|
+
if (!Array.isArray(picked))
|
|
1378
|
+
this.dateSelect.emit(this.serializeValue(picked));
|
|
1379
|
+
this.viewDate.set(firstOfMonth(first));
|
|
1380
|
+
this.focusedDate.set(startOfDay(first));
|
|
882
1381
|
}
|
|
883
1382
|
else {
|
|
884
1383
|
this.typedValue.set(null); // revert: displayValue reformats the current value
|
|
@@ -893,6 +1392,68 @@ class UiDatepicker extends BaseFormField {
|
|
|
893
1392
|
const custom = this.parseDate();
|
|
894
1393
|
return custom ? custom(text) : this.defaultParse(text, requireComplete);
|
|
895
1394
|
}
|
|
1395
|
+
/**
|
|
1396
|
+
* @ignore Parses typed text into whatever shape the current `selectionMode` commits: a single
|
|
1397
|
+
* `Date` for `single`, a `Date[]` for `range`/`multiple` (see `parseTypedMulti`). `null` means
|
|
1398
|
+
* "not a complete, enabled value for this mode" — the caller reverts.
|
|
1399
|
+
*/
|
|
1400
|
+
parseTypedValue(text, requireComplete) {
|
|
1401
|
+
if (this.selectionMode() === 'single') {
|
|
1402
|
+
const parsed = this.parseTyped(text, requireComplete);
|
|
1403
|
+
return parsed && !this.isParsedDisabled(parsed) ? parsed : null;
|
|
1404
|
+
}
|
|
1405
|
+
return this.parseTypedMulti(text, requireComplete);
|
|
1406
|
+
}
|
|
1407
|
+
/** @ignore `range`/`multiple` typed entry (FSHSP-118): splits via `splitTypedSegments`, parses
|
|
1408
|
+
* each part with `parseTyped` (a custom `parseDate` applies per part, like `dateFormat` does
|
|
1409
|
+
* per date on display). `range` needs exactly 2 parts, reordered chronologically; `multiple`
|
|
1410
|
+
* takes any count, deduped. One bad/disabled part fails the whole thing. Always `startOfDay` —
|
|
1411
|
+
* no `showTime` support here. */
|
|
1412
|
+
parseTypedMulti(text, requireComplete) {
|
|
1413
|
+
const mode = this.selectionMode();
|
|
1414
|
+
const sep = mode === 'range' ? RANGE_SEPARATOR : MULTIPLE_SEPARATOR;
|
|
1415
|
+
const parts = this.splitTypedSegments(text, sep);
|
|
1416
|
+
if (mode === 'range' && parts.length !== 2)
|
|
1417
|
+
return null;
|
|
1418
|
+
if (mode === 'multiple' && parts.length < 1)
|
|
1419
|
+
return null;
|
|
1420
|
+
const parsed = parts.map((p) => this.parseTyped(p, requireComplete));
|
|
1421
|
+
if (parsed.some((d) => d === null || this.isParsedDisabled(d)))
|
|
1422
|
+
return null;
|
|
1423
|
+
const dates = parsed.map(startOfDay);
|
|
1424
|
+
if (mode === 'range')
|
|
1425
|
+
return dates.sort((a, b) => a.getTime() - b.getTime());
|
|
1426
|
+
return dates.filter((d, i) => dates.findIndex((o) => isSameDay(o, d)) === i);
|
|
1427
|
+
}
|
|
1428
|
+
/** @ignore Splits typed `range`/`multiple` text into per-date segments (FSHSP-118). A plain
|
|
1429
|
+
* `text.split(sep)` breaks when a date's own formatted text contains `sep` (e.g. a `", "`
|
|
1430
|
+
* `dateFormat` in `multiple`, or an ISO dash in `range`) — instead, a `sep` occurrence is only
|
|
1431
|
+
* accepted as a boundary once the text before it already parses as a complete date. */
|
|
1432
|
+
splitTypedSegments(text, sep) {
|
|
1433
|
+
const segments = [];
|
|
1434
|
+
let rest = text.trim();
|
|
1435
|
+
while (rest.length) {
|
|
1436
|
+
let boundary = -1;
|
|
1437
|
+
let searchFrom = 0;
|
|
1438
|
+
for (;;) {
|
|
1439
|
+
const idx = rest.indexOf(sep, searchFrom);
|
|
1440
|
+
if (idx === -1)
|
|
1441
|
+
break;
|
|
1442
|
+
if (this.parseTyped(rest.slice(0, idx), true)) {
|
|
1443
|
+
boundary = idx;
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
searchFrom = idx + 1;
|
|
1447
|
+
}
|
|
1448
|
+
if (boundary === -1) {
|
|
1449
|
+
segments.push(rest.trim());
|
|
1450
|
+
break;
|
|
1451
|
+
}
|
|
1452
|
+
segments.push(rest.slice(0, boundary).trim());
|
|
1453
|
+
rest = rest.slice(boundary + sep.length).trim();
|
|
1454
|
+
}
|
|
1455
|
+
return segments.filter((s) => s.length > 0);
|
|
1456
|
+
}
|
|
896
1457
|
/**
|
|
897
1458
|
* @ignore Locale-aware numeric parser (day/month/year order from `dateFieldOrder`).
|
|
898
1459
|
* With `requireComplete`, returns `null` unless every component is present
|
|
@@ -974,6 +1535,10 @@ class UiDatepicker extends BaseFormField {
|
|
|
974
1535
|
else if (v === 'month') {
|
|
975
1536
|
this.focusedYear.set(this.viewDate().getFullYear());
|
|
976
1537
|
this.currentView.set('year');
|
|
1538
|
+
// Last level up: the title turns `disabled` here, so the focus it was holding is about to
|
|
1539
|
+
// be dropped on `<body>` and the grid that just appeared would answer no arrow key. Hand
|
|
1540
|
+
// it to the roving year cell, as the drill-down transitions do.
|
|
1541
|
+
this.queueYearFocus();
|
|
977
1542
|
}
|
|
978
1543
|
}
|
|
979
1544
|
/** @ignore Prev/next arrow — steps month / year / decade depending on the view. */
|
|
@@ -1275,8 +1840,7 @@ class UiDatepicker extends BaseFormField {
|
|
|
1275
1840
|
this.selectDay(this.buildDay(startOfDay(current), this.viewDate()));
|
|
1276
1841
|
return;
|
|
1277
1842
|
case 'Escape':
|
|
1278
|
-
|
|
1279
|
-
this.close();
|
|
1843
|
+
this.handleEscape(event);
|
|
1280
1844
|
return;
|
|
1281
1845
|
default:
|
|
1282
1846
|
return;
|
|
@@ -1329,8 +1893,7 @@ class UiDatepicker extends BaseFormField {
|
|
|
1329
1893
|
return;
|
|
1330
1894
|
}
|
|
1331
1895
|
if (event.key === 'Escape') {
|
|
1332
|
-
|
|
1333
|
-
this.close();
|
|
1896
|
+
this.handleEscape(event);
|
|
1334
1897
|
return;
|
|
1335
1898
|
}
|
|
1336
1899
|
if (event.key === 'PageUp' || event.key === 'PageDown') {
|
|
@@ -1358,8 +1921,7 @@ class UiDatepicker extends BaseFormField {
|
|
|
1358
1921
|
return;
|
|
1359
1922
|
}
|
|
1360
1923
|
if (event.key === 'Escape') {
|
|
1361
|
-
|
|
1362
|
-
this.close();
|
|
1924
|
+
this.handleEscape(event);
|
|
1363
1925
|
return;
|
|
1364
1926
|
}
|
|
1365
1927
|
if (event.key === 'PageUp' || event.key === 'PageDown') {
|
|
@@ -1403,6 +1965,7 @@ class UiDatepicker extends BaseFormField {
|
|
|
1403
1965
|
* `Date`/`Date[]`/`null` exactly as before — the ISO contract lives entirely in this method. */
|
|
1404
1966
|
commit(value) {
|
|
1405
1967
|
this.typedValue.set(null); // any committed value re-formats the trigger
|
|
1968
|
+
this.maskSuspended.set(false); // …and re-arms the live mask (see `typingSlots`)
|
|
1406
1969
|
this.internalValue.set(value ?? null);
|
|
1407
1970
|
const external = this.toExternalValue(value ?? null);
|
|
1408
1971
|
this.modelValue.set(external ?? undefined);
|
|
@@ -1531,18 +2094,18 @@ class UiDatepicker extends BaseFormField {
|
|
|
1531
2094
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
1532
2095
|
}
|
|
1533
2096
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1534
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiDatepicker, isStandalone: true, selector: "ui-datepicker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: true, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, editableTime: { classPropertyName: "editableTime", publicName: "editableTime", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, panelAriaLabel: { classPropertyName: "panelAriaLabel", publicName: "panelAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, prevAriaLabel: { classPropertyName: "prevAriaLabel", publicName: "prevAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, nextAriaLabel: { classPropertyName: "nextAriaLabel", publicName: "nextAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, hoursAriaLabel: { classPropertyName: "hoursAriaLabel", publicName: "hoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, minutesAriaLabel: { classPropertyName: "minutesAriaLabel", publicName: "minutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, meridiemAriaLabel: { classPropertyName: "meridiemAriaLabel", publicName: "meridiemAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, incrementHoursAriaLabel: { classPropertyName: "incrementHoursAriaLabel", publicName: "incrementHoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementHoursAriaLabel: { classPropertyName: "decrementHoursAriaLabel", publicName: "decrementHoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, incrementMinutesAriaLabel: { classPropertyName: "incrementMinutesAriaLabel", publicName: "incrementMinutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementMinutesAriaLabel: { classPropertyName: "decrementMinutesAriaLabel", publicName: "decrementMinutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, toggleMeridiemAriaLabel: { classPropertyName: "toggleMeridiemAriaLabel", publicName: "toggleMeridiemAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelect: "dateSelect", monthChange: "monthChange", opened: "opened", closed: "closed", cleared: "cleared", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
|
|
2097
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiDatepicker, isStandalone: true, selector: "ui-datepicker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: true, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, editableTime: { classPropertyName: "editableTime", publicName: "editableTime", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, formatHintLabel: { classPropertyName: "formatHintLabel", publicName: "formatHintLabel", isSignal: true, isRequired: false, transformFunction: null }, panelAriaLabel: { classPropertyName: "panelAriaLabel", publicName: "panelAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, prevAriaLabel: { classPropertyName: "prevAriaLabel", publicName: "prevAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, nextAriaLabel: { classPropertyName: "nextAriaLabel", publicName: "nextAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, hoursAriaLabel: { classPropertyName: "hoursAriaLabel", publicName: "hoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, minutesAriaLabel: { classPropertyName: "minutesAriaLabel", publicName: "minutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, meridiemAriaLabel: { classPropertyName: "meridiemAriaLabel", publicName: "meridiemAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, incrementHoursAriaLabel: { classPropertyName: "incrementHoursAriaLabel", publicName: "incrementHoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementHoursAriaLabel: { classPropertyName: "decrementHoursAriaLabel", publicName: "decrementHoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, incrementMinutesAriaLabel: { classPropertyName: "incrementMinutesAriaLabel", publicName: "incrementMinutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementMinutesAriaLabel: { classPropertyName: "decrementMinutesAriaLabel", publicName: "decrementMinutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, toggleMeridiemAriaLabel: { classPropertyName: "toggleMeridiemAriaLabel", publicName: "toggleMeridiemAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "showOnFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelect: "dateSelect", monthChange: "monthChange", opened: "opened", closed: "closed", cleared: "cleared", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
|
|
1535
2098
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiDatepicker), multi: true },
|
|
1536
|
-
], queries: [{ propertyName: "dateTemplate", first: true, predicate: ["date"], descendants: true, isSignal: true }, { propertyName: "buttonBarTemplate", first: true, predicate: ["buttonbar"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "triggerInput", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Calendar panel: shared between inline render and the CDK overlay. -->\n<ng-template #calendarTpl>\n <div\n #panel\n class=\"ui-datepicker-panel\"\n [class]=\"panelStyleClass()\"\n [class._inline]=\"inline()\"\n [attr.id]=\"panelId\"\n role=\"dialog\"\n [attr.aria-modal]=\"inline() ? null : 'true'\"\n [cdkTrapFocus]=\"!inline()\"\n [attr.aria-label]=\"label() || ariaLabel() || panelAriaLabel()\"\n >\n @if (showCalendar()) {\n <!-- Shared header (single-month): prev / title (drill-up) / next.\n Multi-month puts the arrows + titles in each panel's own header. -->\n @if (singleMonth()) {\n <div class=\"ui-datepicker-header\">\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-title _button\"\n aria-live=\"polite\"\n [disabled]=\"currentView() === 'year'\"\n (click)=\"onHeaderClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n </div>\n }\n\n <!-- YEAR view -->\n @if (currentView() === 'year') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _year\" role=\"grid\" (keydown)=\"onYearGridKeydown($event)\">\n @for (y of years(); track y.year) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"y.selected\"\n [class._focusable]=\"isFocusableYear(y)\"\n [disabled]=\"y.disabled\"\n [attr.tabindex]=\"isFocusableYear(y) ? 0 : -1\"\n [attr.aria-selected]=\"y.selected\"\n (click)=\"selectYear(y)\"\n >\n {{ y.year }}\n </button>\n }\n </div>\n }\n\n <!-- MONTH view -->\n @else if (currentView() === 'month') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _month\" role=\"grid\" (keydown)=\"onMonthGridKeydown($event)\">\n @for (m of months(); track m.index) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"m.selected\"\n [class._focusable]=\"isFocusableMonth(m)\"\n [disabled]=\"m.disabled\"\n [attr.tabindex]=\"isFocusableMonth(m) ? 0 : -1\"\n [attr.aria-selected]=\"m.selected\"\n (click)=\"selectMonth(m)\"\n >\n {{ m.label }}\n </button>\n }\n </div>\n }\n\n <!-- DATE view (one or several month panels) -->\n @else {\n <!-- Calendar grid: keyboard delegated to the container, focus lives on\n the gridcell buttons (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-months\" (keydown)=\"onGridKeydown($event)\">\n @for (mp of monthPanels(); track mp.monthDate.getTime()) {\n <div class=\"ui-datepicker-month\">\n @if (!singleMonth()) {\n <!-- Per-panel header: prev on the first panel, next on the last, title centered. -->\n <div class=\"ui-datepicker-subheader\">\n @if (mp.showPrev) {\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n <span class=\"ui-datepicker-title\" aria-live=\"polite\">{{ mp.label }}</span>\n @if (mp.showNext) {\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n </div>\n }\n\n <div class=\"ui-datepicker-grid\" role=\"grid\">\n <div class=\"ui-datepicker-weekdays\" role=\"row\">\n @for (wd of weekDayNames(); track $index) {\n <span\n class=\"ui-datepicker-weekday\"\n role=\"columnheader\"\n [attr.aria-label]=\"wd.full\"\n >{{ wd.short }}</span\n >\n }\n </div>\n @for (week of mp.weeks; track $index) {\n <div class=\"ui-datepicker-week\" role=\"row\">\n @for (cell of week; track cell.ts) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-day\"\n [class._selected]=\"cell.selected\"\n [class._today]=\"cell.today && !cell.selected\"\n [class._other-month]=\"cell.otherMonth\"\n [class._range-start]=\"cell.rangeStart\"\n [class._range-end]=\"cell.rangeEnd\"\n [class._in-range]=\"cell.inRange\"\n [class._focusable]=\"isFocusableDay(cell)\"\n [disabled]=\"cell.disabled\"\n [attr.tabindex]=\"isFocusableDay(cell) ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.aria-current]=\"cell.today ? 'date' : null\"\n [attr.aria-label]=\"cell.ariaLabel\"\n (click)=\"selectDay(cell)\"\n >\n @if (dateTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: cell, selected: cell.selected }\"\n />\n } @else {\n {{ cell.day }}\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- Time selection \u2014 vertical steppers (ARIA spinbutton pattern) -->\n @if (showTime()) {\n <div class=\"ui-datepicker-time\">\n <!-- Hours -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementHoursAriaLabel()\"\n (click)=\"stepHours(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"hoursAriaLabel()\"\n [attr.aria-valuenow]=\"hourFormat() === '12' ? displayHours() : hours()\"\n [attr.aria-valuemin]=\"hourBounds().min\"\n [attr.aria-valuemax]=\"hourBounds().max\"\n [attr.aria-valuetext]=\"hoursLabel()\"\n [value]=\"hoursValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onHoursInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onHoursBlur()\"\n (keydown)=\"onHourKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementHoursAriaLabel()\"\n (click)=\"stepHours(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n\n <!-- Minutes -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"minutesAriaLabel()\"\n [attr.aria-valuenow]=\"minutes()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"59\"\n [attr.aria-valuetext]=\"minutesLabel()\"\n [value]=\"minutesValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onMinutesInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onMinutesBlur()\"\n (keydown)=\"onMinuteKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <!-- Meridiem (12h) -->\n @if (hourFormat() === '12') {\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <span\n class=\"ui-datepicker-time-value\"\n role=\"spinbutton\"\n [attr.tabindex]=\"timeControlsEnabled() ? 0 : -1\"\n [attr.aria-label]=\"meridiemAriaLabel()\"\n [attr.aria-valuetext]=\"meridiem()\"\n [attr.aria-disabled]=\"!timeControlsEnabled() || null\"\n (keydown)=\"onMeridiemKeydown($event)\"\n (click)=\"toggleMeridiem()\"\n >\n {{ meridiem() }}\n </span>\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Button bar (custom template or default) -->\n @if (showButtonBar() || buttonBarTemplate()) {\n <div class=\"ui-datepicker-buttonbar\">\n @if (buttonBarTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: todayCallback,\n todayCallback: todayCallback,\n clearCallback: clearCallback,\n }\"\n />\n } @else {\n <ui-button\n size=\"small\"\n level=\"low\"\n [label]=\"todayLabel()\"\n (buttonClick)=\"selectToday()\"\n />\n <ui-button size=\"small\" level=\"low\" [label]=\"clearLabel()\" (buttonClick)=\"clear()\" />\n }\n </div>\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n} @else {\n <!-- Trigger: readonly composed field. Clicking the field or the icon opens the panel. -->\n <!-- Convenience wrapper: focus and keyboard are carried by the inner ui-input. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-trigger\" (click)=\"open()\" (keydown)=\"onTriggerKeydown($event)\">\n <ui-input\n #trigger\n [label]=\"label()\"\n [helperText]=\"helperText()\"\n [errorText]=\"errorText()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"triggerReadonly()\"\n [invalid]=\"isInvalid()\"\n [name]=\"name() ?? ''\"\n [inputId]=\"resolvedId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [tabindex]=\"tabindex()\"\n [value]=\"displayValue()\"\n [iconRight]=\"triggerIcon()\"\n [iconRightTemplate]=\"triggerIconTemplate()\"\n [iconRightAriaLabel]=\"triggerIconAriaLabel()\"\n ariaHasPopup=\"dialog\"\n [ariaExpanded]=\"panelOpen()\"\n [ariaControls]=\"panelOpen() ? panelId : undefined\"\n (iconRightClick)=\"onIconClick($event)\"\n (valueChange)=\"onTriggerInput($event)\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"onTriggerBlur($event)\"\n />\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n </ng-template>\n}\n", styles: [".ui-datepicker-trigger{display:block;cursor:pointer}.ui-datepicker-panel{display:flex;flex-direction:column;gap:var(--ui-datepicker-panel-gap, var(--units-sm));box-sizing:border-box;width:max-content;max-width:var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-datepicker-panel-padding, var(--ui-overlay-panel-padding, var(--units-sm)));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--form-high-surface-default);box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base)}.ui-datepicker-panel._inline{box-shadow:none}.ui-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-header-gap, var(--units-sm))}.ui-datepicker-nav{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default));padding:0;border:none;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));background:none;color:var(--informative-defaultlow-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-nav:hover{background-color:var(--informative-highlightlow-surface-hover);color:var(--informative-defaultlow-content-hover)}.ui-datepicker-nav:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title{flex:1 1 auto;text-align:center;font-size:var(--ui-datepicker-title-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-title._button{padding:var(--ui-datepicker-title-padding-y, var(--units-2xs)) var(--ui-datepicker-title-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-title-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-title._button:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title._button:disabled{cursor:default}.ui-datepicker-months{display:flex;gap:var(--ui-datepicker-months-gap, var(--units-lg))}.ui-datepicker-month{display:flex;flex-direction:column;gap:var(--ui-datepicker-month-gap, var(--units-sm));flex:0 0 auto;width:var(--ui-datepicker-panel-width, 22.5rem)}.ui-datepicker-month:not(:first-child){border-left:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-left:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}.ui-datepicker-subheader{display:flex;align-items:center;gap:var(--ui-datepicker-subheader-gap, var(--units-sm))}.ui-datepicker-nav-spacer{flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default))}.ui-datepicker-picker{display:grid;gap:var(--ui-datepicker-picker-gap, var(--units-xs));width:var(--ui-datepicker-panel-width, 22.5rem)}.ui-datepicker-picker._month{grid-template-columns:repeat(3,1fr)}.ui-datepicker-picker._year{grid-template-columns:repeat(2,1fr)}.ui-datepicker-cell{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:var(--ui-datepicker-cell-min-height, var(--size-components-sm));padding:var(--ui-datepicker-cell-padding-y, var(--units-sm)) var(--ui-datepicker-cell-padding-x, var(--units-md));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-cell-radius, var(--radius-sm));background-color:var(--actions-low-surface-default);font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--actions-low-surface-hover)}.ui-datepicker-cell:active:not(:disabled){background-color:var(--actions-low-surface-pressed)}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--actions-high-surface-default);color:var(--actions-high-content-default)}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--actions-high-surface-hover)}.ui-datepicker-cell:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-weekdays,.ui-datepicker-week{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center;align-items:center}.ui-datepicker-weekday{padding:var(--ui-datepicker-weekday-padding-y, var(--units-xs)) 0;font-size:var(--ui-datepicker-weekday-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default);-webkit-user-select:none;user-select:none}.ui-datepicker-grid{display:flex;flex-direction:column;gap:var(--ui-datepicker-grid-gap, var(--units-xs))}.ui-datepicker-day{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:var(--ui-datepicker-day-size, var(--size-components-default));padding:0;border:none;background:transparent;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ui-datepicker-day-size, var(--size-components-default));height:var(--ui-datepicker-day-size, var(--size-components-default));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));z-index:-1;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--actions-low-surface-hover)}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--actions-low-surface-pressed)}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-day._other-month{color:var(--form-low-content-default);opacity:var(--ui-datepicker-day-opacity-outside, .6)}.ui-datepicker-day._today:before{border-color:var(--actions-high-stroke-default)}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--actions-high-stroke-hover)}.ui-datepicker-day._today:focus-visible:before{border-color:var(--actions-high-stroke-focused)}.ui-datepicker-day._selected{color:var(--actions-high-content-default)}.ui-datepicker-day._selected:before{background-color:var(--actions-high-surface-default)}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--actions-high-content-hover)}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--actions-high-surface-hover)}.ui-datepicker-day._selected:focus-visible{color:var(--actions-high-content-focused)}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--actions-high-surface-focused)}.ui-datepicker-day._in-range,.ui-datepicker-day._range-start,.ui-datepicker-day._range-end{border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--actions-high-stroke-default);border-bottom:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--actions-high-stroke-default)}.ui-datepicker-day._in-range{background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-day._range-start{background:linear-gradient(to right,transparent 50%,var(--informative-highlightlow-surface-hover) 50%)}.ui-datepicker-day._range-end{background:linear-gradient(to left,transparent 50%,var(--informative-highlightlow-surface-hover) 50%)}.ui-datepicker-day._range-start._range-end{background:transparent}.ui-datepicker-day:disabled{color:var(--form-high-content-disabled);opacity:var(--ui-datepicker-day-opacity-disabled, .45);cursor:not-allowed}.ui-datepicker-time{display:flex;align-items:center;justify-content:center;gap:var(--ui-datepicker-time-gap, var(--units-sm));padding-top:var(--ui-datepicker-time-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}.ui-datepicker-time:first-child{padding-top:0;border-top:none}.ui-datepicker-time-unit{display:flex;flex-direction:column;align-items:center;gap:var(--ui-datepicker-time-unit-gap, var(--units-2xs))}.ui-datepicker-time-value{box-sizing:border-box;display:inline-block;width:var(--ui-datepicker-time-field-width, 3rem);padding:var(--ui-datepicker-time-value-padding-y, var(--units-2xs)) var(--ui-datepicker-time-value-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-time-value-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;color:var(--form-high-content-default);text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-value:read-only{cursor:pointer}.ui-datepicker-time-value:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-time-value:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-btn{display:flex;align-items:center;justify-content:center;width:var(--ui-datepicker-time-btn-width, var(--size-components-xs));height:var(--ui-datepicker-time-btn-height, var(--size-components-2xs));padding:0;border:none;border-radius:var(--ui-datepicker-time-btn-radius, var(--radius-sm));background:none;color:var(--form-low-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover);color:var(--form-high-content-hover)}.ui-datepicker-time-btn:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-colon{font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-buttonbar-gap, var(--units-sm));padding-top:var(--ui-datepicker-buttonbar-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: UiInput, selector: "ui-input", inputs: ["type", "value", "ariaHasPopup", "ariaExpanded", "ariaControls", "placeholder", "unit", "iconLeft", "iconRight", "iconRightAriaLabel", "autocomplete", "maxlength", "iconLeftTemplate", "iconRightTemplate"], outputs: ["valueChange", "iconRightClick", "inputFocus", "inputBlur"] }, { kind: "component", type: UiButton, selector: "ui-button", inputs: ["label", "ariaLabel", "type", "level", "variant", "onColor", "size", "icon", "iconPos", "iconOnly", "loading", "loadingIcon", "expanded", "rounded", "disabled", "tabindex", "buttonProps", "iconTemplate", "loadingIconTemplate", "href", "routerLink", "target", "rel"], outputs: ["buttonClick", "buttonFocus", "buttonBlur"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
2099
|
+
], queries: [{ propertyName: "dateTemplate", first: true, predicate: ["date"], descendants: true, isSignal: true }, { propertyName: "buttonBarTemplate", first: true, predicate: ["buttonbar"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "triggerInput", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "triggerWrapperEl", first: true, predicate: ["triggerWrapper"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Calendar panel: shared between inline render and the CDK overlay. -->\n<ng-template #calendarTpl>\n <div\n #panel\n class=\"ui-datepicker-panel\"\n [class]=\"panelStyleClass()\"\n [class._inline]=\"inline()\"\n [class._range-complete]=\"rangeComplete()\"\n [attr.id]=\"panelId\"\n role=\"dialog\"\n [attr.aria-modal]=\"inline() || nonModal() ? null : 'true'\"\n [cdkTrapFocus]=\"!inline() && !nonModal()\"\n [attr.aria-label]=\"label() || ariaLabel() || panelAriaLabel()\"\n (focusout)=\"onPanelFocusOut($event)\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n @if (showCalendar()) {\n <!-- Shared header (single-month): prev / title (drill-up) / next.\n Multi-month puts the arrows + titles in each panel's own header. -->\n @if (singleMonth()) {\n <div class=\"ui-datepicker-header\">\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-title _button\"\n aria-live=\"polite\"\n [disabled]=\"currentView() === 'year'\"\n (click)=\"onHeaderClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n </div>\n }\n\n <!-- YEAR view -->\n @if (currentView() === 'year') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _year\" role=\"grid\" (keydown)=\"onYearGridKeydown($event)\">\n @for (row of yearRows(); track $index) {\n <div class=\"ui-datepicker-picker-row\" role=\"row\">\n @for (y of row; track y.year) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"y.selected\"\n [class._focusable]=\"isFocusableYear(y)\"\n [disabled]=\"y.disabled\"\n [attr.tabindex]=\"isFocusableYear(y) ? 0 : -1\"\n [attr.aria-selected]=\"y.selected\"\n (click)=\"selectYear(y)\"\n >\n {{ y.year }}\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- MONTH view -->\n @else if (currentView() === 'month') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _month\" role=\"grid\" (keydown)=\"onMonthGridKeydown($event)\">\n @for (row of monthRows(); track $index) {\n <div class=\"ui-datepicker-picker-row\" role=\"row\">\n @for (m of row; track m.index) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"m.selected\"\n [class._focusable]=\"isFocusableMonth(m)\"\n [disabled]=\"m.disabled\"\n [attr.tabindex]=\"isFocusableMonth(m) ? 0 : -1\"\n [attr.aria-selected]=\"m.selected\"\n (click)=\"selectMonth(m)\"\n >\n {{ m.label }}\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- DATE view (one or several month panels) -->\n @else {\n <!-- Calendar grid: keyboard delegated to the container, focus lives on\n the gridcell buttons (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-months\" (keydown)=\"onGridKeydown($event)\">\n @for (mp of monthPanels(); track mp.monthDate.getTime()) {\n <div class=\"ui-datepicker-month\">\n @if (!singleMonth()) {\n <!-- Per-panel header: prev on the first panel, next on the last, title centered. -->\n <div class=\"ui-datepicker-subheader\">\n @if (mp.showPrev) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n <span class=\"ui-datepicker-title\" aria-live=\"polite\">{{ mp.label }}</span>\n @if (mp.showNext) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n </div>\n }\n\n <div class=\"ui-datepicker-grid\" role=\"grid\">\n <div class=\"ui-datepicker-weekdays\" role=\"row\">\n @for (wd of weekDayNames(); track $index) {\n <span\n class=\"ui-datepicker-weekday\"\n role=\"columnheader\"\n [attr.aria-label]=\"wd.full\"\n >{{ wd.short }}</span\n >\n }\n </div>\n @for (week of mp.weeks; track $index) {\n <div class=\"ui-datepicker-week\" role=\"row\">\n @for (cell of week; track cell.ts) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-day\"\n [class._selected]=\"cell.selected\"\n [class._today]=\"cell.today && !cell.selected\"\n [class._other-month]=\"cell.otherMonth\"\n [class._range-start]=\"cell.rangeStart\"\n [class._range-end]=\"cell.rangeEnd\"\n [class._in-range]=\"cell.inRange\"\n [class._focusable]=\"isFocusableDay(cell)\"\n [disabled]=\"cell.disabled\"\n [attr.tabindex]=\"isFocusableDay(cell) ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.aria-current]=\"cell.today ? 'date' : null\"\n [attr.aria-label]=\"cell.ariaLabel\"\n (click)=\"selectDay(cell)\"\n >\n @if (dateTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: cell, selected: cell.selected }\"\n />\n } @else {\n {{ cell.day }}\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- Time selection \u2014 vertical steppers (ARIA spinbutton pattern) -->\n @if (showTime()) {\n <div class=\"ui-datepicker-time\">\n <!-- Hours -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementHoursAriaLabel()\"\n (click)=\"stepHours(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"hoursAriaLabel()\"\n [attr.aria-valuenow]=\"hourFormat() === '12' ? displayHours() : hours()\"\n [attr.aria-valuemin]=\"hourBounds().min\"\n [attr.aria-valuemax]=\"hourBounds().max\"\n [attr.aria-valuetext]=\"hoursLabel()\"\n [value]=\"hoursValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onHoursInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onHoursBlur()\"\n (keydown)=\"onHourKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementHoursAriaLabel()\"\n (click)=\"stepHours(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n\n <!-- Minutes -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"minutesAriaLabel()\"\n [attr.aria-valuenow]=\"minutes()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"59\"\n [attr.aria-valuetext]=\"minutesLabel()\"\n [value]=\"minutesValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onMinutesInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onMinutesBlur()\"\n (keydown)=\"onMinuteKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <!-- Meridiem (12h) -->\n @if (hourFormat() === '12') {\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <span\n class=\"ui-datepicker-time-value\"\n role=\"spinbutton\"\n [attr.tabindex]=\"timeControlsEnabled() ? 0 : -1\"\n [attr.aria-label]=\"meridiemAriaLabel()\"\n [attr.aria-valuetext]=\"meridiem()\"\n [attr.aria-disabled]=\"!timeControlsEnabled() || null\"\n (keydown)=\"onMeridiemKeydown($event)\"\n (click)=\"toggleMeridiem()\"\n >\n {{ meridiem() }}\n </span>\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Button bar (custom template or default) -->\n @if (showButtonBar() || buttonBarTemplate()) {\n <div class=\"ui-datepicker-buttonbar\">\n @if (buttonBarTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: todayCallback,\n todayCallback: todayCallback,\n clearCallback: clearCallback,\n }\"\n />\n } @else {\n <ui-button\n size=\"small\"\n level=\"low\"\n [label]=\"todayLabel()\"\n (buttonClick)=\"selectToday()\"\n />\n <ui-button size=\"small\" level=\"low\" [label]=\"clearLabel()\" (buttonClick)=\"clear()\" />\n }\n </div>\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n} @else {\n <!-- Trigger: composed field. The icon opens the panel; a click on the field itself only does\n so when the field isn't typeable (see `onTriggerClick`). -->\n <!-- Convenience wrapper: focus and keyboard are carried by the inner ui-input. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n #triggerWrapper\n class=\"ui-datepicker-trigger\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focusout)=\"onTriggerFocusOut($event)\"\n >\n <ui-input\n #trigger\n [label]=\"label()\"\n [helperText]=\"helperText()\"\n [errorText]=\"errorText()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"triggerReadonly()\"\n [invalid]=\"isInvalid()\"\n [name]=\"name() ?? ''\"\n [inputId]=\"resolvedId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [ariaDescribedBy]=\"resolvedFormatHint() ? formatHintId() : undefined\"\n [tabindex]=\"tabindex()\"\n [value]=\"displayValue()\"\n [iconRight]=\"triggerIcon()\"\n [iconRightTemplate]=\"triggerIconTemplate()\"\n [iconRightAriaLabel]=\"triggerIconAriaLabel()\"\n ariaHasPopup=\"dialog\"\n [ariaExpanded]=\"panelOpen()\"\n [ariaControls]=\"panelOpen() ? panelId : undefined\"\n (iconRightClick)=\"onIconClick($event)\"\n (valueChange)=\"onTriggerInput($event)\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"onTriggerBlur($event)\"\n />\n @if (resolvedFormatHint(); as hint) {\n <span [id]=\"formatHintId()\" class=\"ui-datepicker-format-hint\">{{ hint }}</span>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayViewportMargin]=\"overlayViewportMargin\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayHasBackdrop]=\"!nonModal()\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n </ng-template>\n}\n", styles: [".ui-datepicker-trigger{display:block;cursor:pointer}.ui-datepicker-format-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-datepicker-panel{display:flex;flex-direction:column;gap:var(--ui-datepicker-panel-gap, var(--units-sm));box-sizing:border-box;width:max-content;max-width:var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-datepicker-panel-padding, var(--ui-overlay-panel-padding, var(--units-sm)));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--form-high-surface-default);box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base);overflow:auto}.ui-datepicker-panel:not(._inline){max-height:var(--ui-datepicker-panel-max-height, calc(100dvh - var(--units-3xl)));overscroll-behavior:contain}.ui-datepicker-panel._inline{box-shadow:none;max-width:min(100%,var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg))))}.ui-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-header-gap, var(--units-sm))}.ui-datepicker-nav{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default));padding:0;border:none;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));background:none;color:var(--informative-defaultlow-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-nav:hover{background-color:var(--informative-highlightlow-surface-hover);color:var(--informative-defaultlow-content-hover)}.ui-datepicker-nav:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title{flex:1 1 auto;min-width:0;text-align:center;font-size:var(--ui-datepicker-title-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-title._button{padding:var(--ui-datepicker-title-padding-y, var(--units-2xs)) var(--ui-datepicker-title-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-title-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-title._button:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title._button:disabled{cursor:default}.ui-datepicker-months{display:flex;gap:var(--ui-datepicker-months-gap, var(--units-lg))}.ui-datepicker-month{display:flex;flex-direction:column;gap:var(--ui-datepicker-month-gap, var(--units-sm));flex:0 1 auto;width:var(--ui-datepicker-panel-width, 22.5rem);min-width:0;max-width:100%}.ui-datepicker-month:not(:first-child){border-left:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-left:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}@media(width<37.5rem){.ui-datepicker-months{flex-direction:column}.ui-datepicker-month:not(:first-child){border-left:none;padding-left:0;border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-top:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}}.ui-datepicker-subheader{display:flex;align-items:center;gap:var(--ui-datepicker-subheader-gap, var(--units-sm))}.ui-datepicker-nav-spacer{flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default))}.ui-datepicker-picker{display:grid;gap:var(--ui-datepicker-picker-gap, var(--units-xs));width:var(--ui-datepicker-panel-width, 22.5rem);max-width:100%}.ui-datepicker-picker-row{display:contents}.ui-datepicker-picker._month{grid-template-columns:repeat(3,1fr)}.ui-datepicker-picker._year{grid-template-columns:repeat(2,1fr)}.ui-datepicker-cell{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:var(--ui-datepicker-cell-min-height, var(--size-components-sm));padding:var(--ui-datepicker-cell-padding-y, var(--units-sm)) var(--ui-datepicker-cell-padding-x, var(--units-md));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-cell-radius, var(--radius-sm));background-color:var(--actions-low-surface-default);font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--actions-low-surface-hover)}.ui-datepicker-cell:active:not(:disabled){background-color:var(--actions-low-surface-pressed)}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--actions-high-surface-default);color:var(--actions-high-content-default)}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--actions-high-surface-hover)}.ui-datepicker-cell:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-weekdays,.ui-datepicker-week{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center;align-items:center}.ui-datepicker-weekday{padding:var(--ui-datepicker-weekday-padding-y, var(--units-xs)) 0;font-size:var(--ui-datepicker-weekday-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default);-webkit-user-select:none;user-select:none}.ui-datepicker-grid{display:flex;flex-direction:column;gap:var(--ui-datepicker-grid-gap, var(--units-xs))}.ui-datepicker-day{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;aspect-ratio:1;max-height:var(--ui-datepicker-day-size, var(--size-components-default));padding:0;border:none;background:transparent;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(100%,var(--ui-datepicker-day-size, var(--size-components-default)));height:100%;border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));z-index:-1;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--actions-low-surface-hover)}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--actions-low-surface-pressed)}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-day._other-month{color:var(--ui-datepicker-day-color-outside, var(--global-text-default));opacity:var(--ui-datepicker-day-opacity-outside, .6)}.ui-datepicker-day._today:before{border-color:var(--actions-high-stroke-default)}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--actions-high-stroke-hover)}.ui-datepicker-day._today:focus-visible:before{border-color:var(--actions-high-stroke-focused)}.ui-datepicker-day._selected{color:var(--actions-high-content-default)}.ui-datepicker-day._selected:before{background-color:var(--actions-high-surface-default)}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--actions-high-content-hover)}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--actions-high-surface-hover)}.ui-datepicker-day._selected:focus-visible{color:var(--actions-high-content-focused)}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--actions-high-surface-focused)}.ui-datepicker-day._in-range:after,.ui-datepicker-day._range-start:after,.ui-datepicker-day._range-end:after{content:\"\";position:absolute;top:50%;inset-inline:0;height:100%;transform:translateY(-50%);background-color:var(--ui-datepicker-range-background, var(--informative-highlightlow-surface-hover));z-index:-2}.ui-datepicker-day._range-start:after{inset-inline-start:50%}.ui-datepicker-day._range-end:after{inset-inline-end:50%}.ui-datepicker-day._range-start._range-end:after{content:none}.ui-datepicker-panel:not(._range-complete) .ui-datepicker-day._range-start:after{content:none}.ui-datepicker-day:first-child:after{inset-inline-start:max(0px,(100% - var(--ui-datepicker-day-size, var(--size-components-default))) / 2);border-start-start-radius:var(--ui-datepicker-day-radius, var(--radius-full));border-end-start-radius:var(--ui-datepicker-day-radius, var(--radius-full))}.ui-datepicker-day:last-child:after{inset-inline-end:max(0px,(100% - var(--ui-datepicker-day-size, var(--size-components-default))) / 2);border-start-end-radius:var(--ui-datepicker-day-radius, var(--radius-full));border-end-end-radius:var(--ui-datepicker-day-radius, var(--radius-full))}.ui-datepicker-day._in-range{color:var(--ui-datepicker-range-color, var(--informative-highlightlow-content-default))}.ui-datepicker-day._in-range:disabled{color:var(--ui-datepicker-range-color, var(--informative-highlightlow-content-default))}.ui-datepicker-day._in-range:hover:not(:disabled),.ui-datepicker-day._in-range:focus-visible{color:var(--informative-highlighthigh-content-default)}.ui-datepicker-day._in-range:hover:not(:disabled):before,.ui-datepicker-day._in-range:focus-visible:before{background-color:var(--informative-highlighthigh-surface-default)}.ui-datepicker-day:disabled{color:var(--form-high-content-disabled);opacity:var(--ui-datepicker-day-opacity-disabled, .45);cursor:not-allowed}.ui-datepicker-time{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-datepicker-time-gap, var(--units-sm));padding-top:var(--ui-datepicker-time-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}.ui-datepicker-time:first-child{padding-top:0;border-top:none}.ui-datepicker-time-unit{display:flex;flex-direction:column;align-items:center;gap:var(--ui-datepicker-time-unit-gap, var(--units-2xs))}.ui-datepicker-time-value{box-sizing:border-box;display:inline-block;width:var(--ui-datepicker-time-field-width, 3rem);padding:var(--ui-datepicker-time-value-padding-y, var(--units-2xs)) var(--ui-datepicker-time-value-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-time-value-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;color:var(--form-high-content-default);text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-value:read-only{cursor:pointer}.ui-datepicker-time-value:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-time-value:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-btn{display:flex;align-items:center;justify-content:center;width:var(--ui-datepicker-time-btn-width, var(--size-components-xs));height:var(--ui-datepicker-time-btn-height, var(--size-components-2xs));padding:0;border:none;border-radius:var(--ui-datepicker-time-btn-radius, var(--radius-sm));background:none;color:var(--form-low-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover);color:var(--form-high-content-hover)}.ui-datepicker-time-btn:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-colon{font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-buttonbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-datepicker-buttonbar-gap, var(--units-sm));padding-top:var(--ui-datepicker-buttonbar-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: UiInput, selector: "ui-input", inputs: ["type", "value", "ariaHasPopup", "ariaExpanded", "ariaControls", "placeholder", "ariaDescribedBy", "unit", "iconLeft", "iconRight", "iconRightAriaLabel", "autocomplete", "maxlength", "iconLeftTemplate", "iconRightTemplate"], outputs: ["valueChange", "iconRightClick", "inputFocus", "inputBlur"] }, { kind: "component", type: UiButton, selector: "ui-button", inputs: ["label", "ariaLabel", "type", "level", "variant", "onColor", "size", "icon", "iconPos", "iconOnly", "loading", "loadingIcon", "expanded", "rounded", "disabled", "ripple", "tabindex", "buttonProps", "iconTemplate", "loadingIconTemplate", "href", "routerLink", "target", "rel"], outputs: ["buttonClick", "buttonFocus", "buttonBlur"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
1537
2100
|
}
|
|
1538
2101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiDatepicker, decorators: [{
|
|
1539
2102
|
type: Component,
|
|
1540
2103
|
args: [{ selector: 'ui-datepicker', imports: [NgTemplateOutlet, OverlayModule, CdkTrapFocus, UiInput, UiButton, UiIcon], providers: [
|
|
1541
2104
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiDatepicker), multi: true },
|
|
1542
|
-
], template: "<!-- Calendar panel: shared between inline render and the CDK overlay. -->\n<ng-template #calendarTpl>\n <div\n #panel\n class=\"ui-datepicker-panel\"\n [class]=\"panelStyleClass()\"\n [class._inline]=\"inline()\"\n [attr.id]=\"panelId\"\n role=\"dialog\"\n [attr.aria-modal]=\"inline() ? null : 'true'\"\n [cdkTrapFocus]=\"!inline()\"\n [attr.aria-label]=\"label() || ariaLabel() || panelAriaLabel()\"\n >\n @if (showCalendar()) {\n <!-- Shared header (single-month): prev / title (drill-up) / next.\n Multi-month puts the arrows + titles in each panel's own header. -->\n @if (singleMonth()) {\n <div class=\"ui-datepicker-header\">\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-title _button\"\n aria-live=\"polite\"\n [disabled]=\"currentView() === 'year'\"\n (click)=\"onHeaderClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n </div>\n }\n\n <!-- YEAR view -->\n @if (currentView() === 'year') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _year\" role=\"grid\" (keydown)=\"onYearGridKeydown($event)\">\n @for (y of years(); track y.year) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"y.selected\"\n [class._focusable]=\"isFocusableYear(y)\"\n [disabled]=\"y.disabled\"\n [attr.tabindex]=\"isFocusableYear(y) ? 0 : -1\"\n [attr.aria-selected]=\"y.selected\"\n (click)=\"selectYear(y)\"\n >\n {{ y.year }}\n </button>\n }\n </div>\n }\n\n <!-- MONTH view -->\n @else if (currentView() === 'month') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _month\" role=\"grid\" (keydown)=\"onMonthGridKeydown($event)\">\n @for (m of months(); track m.index) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"m.selected\"\n [class._focusable]=\"isFocusableMonth(m)\"\n [disabled]=\"m.disabled\"\n [attr.tabindex]=\"isFocusableMonth(m) ? 0 : -1\"\n [attr.aria-selected]=\"m.selected\"\n (click)=\"selectMonth(m)\"\n >\n {{ m.label }}\n </button>\n }\n </div>\n }\n\n <!-- DATE view (one or several month panels) -->\n @else {\n <!-- Calendar grid: keyboard delegated to the container, focus lives on\n the gridcell buttons (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-months\" (keydown)=\"onGridKeydown($event)\">\n @for (mp of monthPanels(); track mp.monthDate.getTime()) {\n <div class=\"ui-datepicker-month\">\n @if (!singleMonth()) {\n <!-- Per-panel header: prev on the first panel, next on the last, title centered. -->\n <div class=\"ui-datepicker-subheader\">\n @if (mp.showPrev) {\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n <span class=\"ui-datepicker-title\" aria-live=\"polite\">{{ mp.label }}</span>\n @if (mp.showNext) {\n <button\n type=\"button\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n </div>\n }\n\n <div class=\"ui-datepicker-grid\" role=\"grid\">\n <div class=\"ui-datepicker-weekdays\" role=\"row\">\n @for (wd of weekDayNames(); track $index) {\n <span\n class=\"ui-datepicker-weekday\"\n role=\"columnheader\"\n [attr.aria-label]=\"wd.full\"\n >{{ wd.short }}</span\n >\n }\n </div>\n @for (week of mp.weeks; track $index) {\n <div class=\"ui-datepicker-week\" role=\"row\">\n @for (cell of week; track cell.ts) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"ui-datepicker-day\"\n [class._selected]=\"cell.selected\"\n [class._today]=\"cell.today && !cell.selected\"\n [class._other-month]=\"cell.otherMonth\"\n [class._range-start]=\"cell.rangeStart\"\n [class._range-end]=\"cell.rangeEnd\"\n [class._in-range]=\"cell.inRange\"\n [class._focusable]=\"isFocusableDay(cell)\"\n [disabled]=\"cell.disabled\"\n [attr.tabindex]=\"isFocusableDay(cell) ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.aria-current]=\"cell.today ? 'date' : null\"\n [attr.aria-label]=\"cell.ariaLabel\"\n (click)=\"selectDay(cell)\"\n >\n @if (dateTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: cell, selected: cell.selected }\"\n />\n } @else {\n {{ cell.day }}\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- Time selection \u2014 vertical steppers (ARIA spinbutton pattern) -->\n @if (showTime()) {\n <div class=\"ui-datepicker-time\">\n <!-- Hours -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementHoursAriaLabel()\"\n (click)=\"stepHours(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"hoursAriaLabel()\"\n [attr.aria-valuenow]=\"hourFormat() === '12' ? displayHours() : hours()\"\n [attr.aria-valuemin]=\"hourBounds().min\"\n [attr.aria-valuemax]=\"hourBounds().max\"\n [attr.aria-valuetext]=\"hoursLabel()\"\n [value]=\"hoursValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onHoursInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onHoursBlur()\"\n (keydown)=\"onHourKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementHoursAriaLabel()\"\n (click)=\"stepHours(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n\n <!-- Minutes -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"minutesAriaLabel()\"\n [attr.aria-valuenow]=\"minutes()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"59\"\n [attr.aria-valuetext]=\"minutesLabel()\"\n [value]=\"minutesValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onMinutesInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onMinutesBlur()\"\n (keydown)=\"onMinuteKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <!-- Meridiem (12h) -->\n @if (hourFormat() === '12') {\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <span\n class=\"ui-datepicker-time-value\"\n role=\"spinbutton\"\n [attr.tabindex]=\"timeControlsEnabled() ? 0 : -1\"\n [attr.aria-label]=\"meridiemAriaLabel()\"\n [attr.aria-valuetext]=\"meridiem()\"\n [attr.aria-disabled]=\"!timeControlsEnabled() || null\"\n (keydown)=\"onMeridiemKeydown($event)\"\n (click)=\"toggleMeridiem()\"\n >\n {{ meridiem() }}\n </span>\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Button bar (custom template or default) -->\n @if (showButtonBar() || buttonBarTemplate()) {\n <div class=\"ui-datepicker-buttonbar\">\n @if (buttonBarTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: todayCallback,\n todayCallback: todayCallback,\n clearCallback: clearCallback,\n }\"\n />\n } @else {\n <ui-button\n size=\"small\"\n level=\"low\"\n [label]=\"todayLabel()\"\n (buttonClick)=\"selectToday()\"\n />\n <ui-button size=\"small\" level=\"low\" [label]=\"clearLabel()\" (buttonClick)=\"clear()\" />\n }\n </div>\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n} @else {\n <!-- Trigger: readonly composed field. Clicking the field or the icon opens the panel. -->\n <!-- Convenience wrapper: focus and keyboard are carried by the inner ui-input. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-trigger\" (click)=\"open()\" (keydown)=\"onTriggerKeydown($event)\">\n <ui-input\n #trigger\n [label]=\"label()\"\n [helperText]=\"helperText()\"\n [errorText]=\"errorText()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"triggerReadonly()\"\n [invalid]=\"isInvalid()\"\n [name]=\"name() ?? ''\"\n [inputId]=\"resolvedId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [tabindex]=\"tabindex()\"\n [value]=\"displayValue()\"\n [iconRight]=\"triggerIcon()\"\n [iconRightTemplate]=\"triggerIconTemplate()\"\n [iconRightAriaLabel]=\"triggerIconAriaLabel()\"\n ariaHasPopup=\"dialog\"\n [ariaExpanded]=\"panelOpen()\"\n [ariaControls]=\"panelOpen() ? panelId : undefined\"\n (iconRightClick)=\"onIconClick($event)\"\n (valueChange)=\"onTriggerInput($event)\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"onTriggerBlur($event)\"\n />\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n </ng-template>\n}\n", styles: [".ui-datepicker-trigger{display:block;cursor:pointer}.ui-datepicker-panel{display:flex;flex-direction:column;gap:var(--ui-datepicker-panel-gap, var(--units-sm));box-sizing:border-box;width:max-content;max-width:var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-datepicker-panel-padding, var(--ui-overlay-panel-padding, var(--units-sm)));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--form-high-surface-default);box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base)}.ui-datepicker-panel._inline{box-shadow:none}.ui-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-header-gap, var(--units-sm))}.ui-datepicker-nav{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default));padding:0;border:none;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));background:none;color:var(--informative-defaultlow-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-nav:hover{background-color:var(--informative-highlightlow-surface-hover);color:var(--informative-defaultlow-content-hover)}.ui-datepicker-nav:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title{flex:1 1 auto;text-align:center;font-size:var(--ui-datepicker-title-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-title._button{padding:var(--ui-datepicker-title-padding-y, var(--units-2xs)) var(--ui-datepicker-title-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-title-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-title._button:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title._button:disabled{cursor:default}.ui-datepicker-months{display:flex;gap:var(--ui-datepicker-months-gap, var(--units-lg))}.ui-datepicker-month{display:flex;flex-direction:column;gap:var(--ui-datepicker-month-gap, var(--units-sm));flex:0 0 auto;width:var(--ui-datepicker-panel-width, 22.5rem)}.ui-datepicker-month:not(:first-child){border-left:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-left:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}.ui-datepicker-subheader{display:flex;align-items:center;gap:var(--ui-datepicker-subheader-gap, var(--units-sm))}.ui-datepicker-nav-spacer{flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default))}.ui-datepicker-picker{display:grid;gap:var(--ui-datepicker-picker-gap, var(--units-xs));width:var(--ui-datepicker-panel-width, 22.5rem)}.ui-datepicker-picker._month{grid-template-columns:repeat(3,1fr)}.ui-datepicker-picker._year{grid-template-columns:repeat(2,1fr)}.ui-datepicker-cell{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:var(--ui-datepicker-cell-min-height, var(--size-components-sm));padding:var(--ui-datepicker-cell-padding-y, var(--units-sm)) var(--ui-datepicker-cell-padding-x, var(--units-md));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-cell-radius, var(--radius-sm));background-color:var(--actions-low-surface-default);font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--actions-low-surface-hover)}.ui-datepicker-cell:active:not(:disabled){background-color:var(--actions-low-surface-pressed)}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--actions-high-surface-default);color:var(--actions-high-content-default)}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--actions-high-surface-hover)}.ui-datepicker-cell:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-weekdays,.ui-datepicker-week{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center;align-items:center}.ui-datepicker-weekday{padding:var(--ui-datepicker-weekday-padding-y, var(--units-xs)) 0;font-size:var(--ui-datepicker-weekday-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default);-webkit-user-select:none;user-select:none}.ui-datepicker-grid{display:flex;flex-direction:column;gap:var(--ui-datepicker-grid-gap, var(--units-xs))}.ui-datepicker-day{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:var(--ui-datepicker-day-size, var(--size-components-default));padding:0;border:none;background:transparent;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ui-datepicker-day-size, var(--size-components-default));height:var(--ui-datepicker-day-size, var(--size-components-default));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));z-index:-1;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--actions-low-surface-hover)}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--actions-low-surface-pressed)}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-day._other-month{color:var(--form-low-content-default);opacity:var(--ui-datepicker-day-opacity-outside, .6)}.ui-datepicker-day._today:before{border-color:var(--actions-high-stroke-default)}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--actions-high-stroke-hover)}.ui-datepicker-day._today:focus-visible:before{border-color:var(--actions-high-stroke-focused)}.ui-datepicker-day._selected{color:var(--actions-high-content-default)}.ui-datepicker-day._selected:before{background-color:var(--actions-high-surface-default)}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--actions-high-content-hover)}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--actions-high-surface-hover)}.ui-datepicker-day._selected:focus-visible{color:var(--actions-high-content-focused)}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--actions-high-surface-focused)}.ui-datepicker-day._in-range,.ui-datepicker-day._range-start,.ui-datepicker-day._range-end{border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--actions-high-stroke-default);border-bottom:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--actions-high-stroke-default)}.ui-datepicker-day._in-range{background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-day._range-start{background:linear-gradient(to right,transparent 50%,var(--informative-highlightlow-surface-hover) 50%)}.ui-datepicker-day._range-end{background:linear-gradient(to left,transparent 50%,var(--informative-highlightlow-surface-hover) 50%)}.ui-datepicker-day._range-start._range-end{background:transparent}.ui-datepicker-day:disabled{color:var(--form-high-content-disabled);opacity:var(--ui-datepicker-day-opacity-disabled, .45);cursor:not-allowed}.ui-datepicker-time{display:flex;align-items:center;justify-content:center;gap:var(--ui-datepicker-time-gap, var(--units-sm));padding-top:var(--ui-datepicker-time-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}.ui-datepicker-time:first-child{padding-top:0;border-top:none}.ui-datepicker-time-unit{display:flex;flex-direction:column;align-items:center;gap:var(--ui-datepicker-time-unit-gap, var(--units-2xs))}.ui-datepicker-time-value{box-sizing:border-box;display:inline-block;width:var(--ui-datepicker-time-field-width, 3rem);padding:var(--ui-datepicker-time-value-padding-y, var(--units-2xs)) var(--ui-datepicker-time-value-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-time-value-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;color:var(--form-high-content-default);text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-value:read-only{cursor:pointer}.ui-datepicker-time-value:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-time-value:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-btn{display:flex;align-items:center;justify-content:center;width:var(--ui-datepicker-time-btn-width, var(--size-components-xs));height:var(--ui-datepicker-time-btn-height, var(--size-components-2xs));padding:0;border:none;border-radius:var(--ui-datepicker-time-btn-radius, var(--radius-sm));background:none;color:var(--form-low-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover);color:var(--form-high-content-hover)}.ui-datepicker-time-btn:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-colon{font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-buttonbar-gap, var(--units-sm));padding-top:var(--ui-datepicker-buttonbar-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}\n"] }]
|
|
1543
|
-
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], iconAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAriaLabel", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], valueType: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueType", required: true }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], numberOfMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfMonths", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], editableTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "editableTime", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], panelAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelAriaLabel", required: false }] }], prevAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevAriaLabel", required: false }] }], nextAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextAriaLabel", required: false }] }], hoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoursAriaLabel", required: false }] }], minutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "minutesAriaLabel", required: false }] }], meridiemAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "meridiemAriaLabel", required: false }] }], incrementHoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementHoursAriaLabel", required: false }] }], decrementHoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementHoursAriaLabel", required: false }] }], incrementMinutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementMinutesAriaLabel", required: false }] }], decrementMinutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementMinutesAriaLabel", required: false }] }], toggleMeridiemAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleMeridiemAriaLabel", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], dateTemplate: [{ type: i0.ContentChild, args: ['date', { isSignal: true }] }], buttonBarTemplate: [{ type: i0.ContentChild, args: ['buttonbar', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], triggerInput: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { ...{
|
|
2105
|
+
], template: "<!-- Calendar panel: shared between inline render and the CDK overlay. -->\n<ng-template #calendarTpl>\n <div\n #panel\n class=\"ui-datepicker-panel\"\n [class]=\"panelStyleClass()\"\n [class._inline]=\"inline()\"\n [class._range-complete]=\"rangeComplete()\"\n [attr.id]=\"panelId\"\n role=\"dialog\"\n [attr.aria-modal]=\"inline() || nonModal() ? null : 'true'\"\n [cdkTrapFocus]=\"!inline() && !nonModal()\"\n [attr.aria-label]=\"label() || ariaLabel() || panelAriaLabel()\"\n (focusout)=\"onPanelFocusOut($event)\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n @if (showCalendar()) {\n <!-- Shared header (single-month): prev / title (drill-up) / next.\n Multi-month puts the arrows + titles in each panel's own header. -->\n @if (singleMonth()) {\n <div class=\"ui-datepicker-header\">\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n class=\"ui-datepicker-title _button\"\n aria-live=\"polite\"\n [disabled]=\"currentView() === 'year'\"\n (click)=\"onHeaderClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n </div>\n }\n\n <!-- YEAR view -->\n @if (currentView() === 'year') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _year\" role=\"grid\" (keydown)=\"onYearGridKeydown($event)\">\n @for (row of yearRows(); track $index) {\n <div class=\"ui-datepicker-picker-row\" role=\"row\">\n @for (y of row; track y.year) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"y.selected\"\n [class._focusable]=\"isFocusableYear(y)\"\n [disabled]=\"y.disabled\"\n [attr.tabindex]=\"isFocusableYear(y) ? 0 : -1\"\n [attr.aria-selected]=\"y.selected\"\n (click)=\"selectYear(y)\"\n >\n {{ y.year }}\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- MONTH view -->\n @else if (currentView() === 'month') {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-picker _month\" role=\"grid\" (keydown)=\"onMonthGridKeydown($event)\">\n @for (row of monthRows(); track $index) {\n <div class=\"ui-datepicker-picker-row\" role=\"row\">\n @for (m of row; track m.index) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-cell\"\n [class._selected]=\"m.selected\"\n [class._focusable]=\"isFocusableMonth(m)\"\n [disabled]=\"m.disabled\"\n [attr.tabindex]=\"isFocusableMonth(m) ? 0 : -1\"\n [attr.aria-selected]=\"m.selected\"\n (click)=\"selectMonth(m)\"\n >\n {{ m.label }}\n </button>\n }\n </div>\n }\n </div>\n }\n\n <!-- DATE view (one or several month panels) -->\n @else {\n <!-- Calendar grid: keyboard delegated to the container, focus lives on\n the gridcell buttons (roving tabindex). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div class=\"ui-datepicker-months\" (keydown)=\"onGridKeydown($event)\">\n @for (mp of monthPanels(); track mp.monthDate.getTime()) {\n <div class=\"ui-datepicker-month\">\n @if (!singleMonth()) {\n <!-- Per-panel header: prev on the first panel, next on the last, title centered. -->\n <div class=\"ui-datepicker-subheader\">\n @if (mp.showPrev) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"prevAriaLabel()\"\n (click)=\"onPrev()\"\n >\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n <span class=\"ui-datepicker-title\" aria-live=\"polite\">{{ mp.label }}</span>\n @if (mp.showNext) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-nav\"\n [attr.aria-label]=\"nextAriaLabel()\"\n (click)=\"onNext()\"\n >\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n </button>\n } @else {\n <span class=\"ui-datepicker-nav-spacer\" aria-hidden=\"true\"></span>\n }\n </div>\n }\n\n <div class=\"ui-datepicker-grid\" role=\"grid\">\n <div class=\"ui-datepicker-weekdays\" role=\"row\">\n @for (wd of weekDayNames(); track $index) {\n <span\n class=\"ui-datepicker-weekday\"\n role=\"columnheader\"\n [attr.aria-label]=\"wd.full\"\n >{{ wd.short }}</span\n >\n }\n </div>\n @for (week of mp.weeks; track $index) {\n <div class=\"ui-datepicker-week\" role=\"row\">\n @for (cell of week; track cell.ts) {\n <button\n type=\"button\"\n role=\"gridcell\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-datepicker-day\"\n [class._selected]=\"cell.selected\"\n [class._today]=\"cell.today && !cell.selected\"\n [class._other-month]=\"cell.otherMonth\"\n [class._range-start]=\"cell.rangeStart\"\n [class._range-end]=\"cell.rangeEnd\"\n [class._in-range]=\"cell.inRange\"\n [class._focusable]=\"isFocusableDay(cell)\"\n [disabled]=\"cell.disabled\"\n [attr.tabindex]=\"isFocusableDay(cell) ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.aria-current]=\"cell.today ? 'date' : null\"\n [attr.aria-label]=\"cell.ariaLabel\"\n (click)=\"selectDay(cell)\"\n >\n @if (dateTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: cell, selected: cell.selected }\"\n />\n } @else {\n {{ cell.day }}\n }\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- Time selection \u2014 vertical steppers (ARIA spinbutton pattern) -->\n @if (showTime()) {\n <div class=\"ui-datepicker-time\">\n <!-- Hours -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementHoursAriaLabel()\"\n (click)=\"stepHours(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"hoursAriaLabel()\"\n [attr.aria-valuenow]=\"hourFormat() === '12' ? displayHours() : hours()\"\n [attr.aria-valuemin]=\"hourBounds().min\"\n [attr.aria-valuemax]=\"hourBounds().max\"\n [attr.aria-valuetext]=\"hoursLabel()\"\n [value]=\"hoursValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onHoursInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onHoursBlur()\"\n (keydown)=\"onHourKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementHoursAriaLabel()\"\n (click)=\"stepHours(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n\n <!-- Minutes -->\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"incrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(1)\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <input\n class=\"ui-datepicker-time-value\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n maxlength=\"2\"\n role=\"spinbutton\"\n [attr.aria-label]=\"minutesAriaLabel()\"\n [attr.aria-valuenow]=\"minutes()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"59\"\n [attr.aria-valuetext]=\"minutesLabel()\"\n [value]=\"minutesValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"!timeEditable()\"\n (input)=\"onMinutesInput($event)\"\n (focus)=\"onTimeFocus($event)\"\n (blur)=\"onMinutesBlur()\"\n (keydown)=\"onMinuteKeydown($event)\"\n />\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"decrementMinutesAriaLabel()\"\n (click)=\"stepMinutes(-1)\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n\n <!-- Meridiem (12h) -->\n @if (hourFormat() === '12') {\n <span class=\"ui-datepicker-time-colon\" aria-hidden=\"true\">:</span>\n <div class=\"ui-datepicker-time-unit\">\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-up\" size=\"sm\" />\n </button>\n <span\n class=\"ui-datepicker-time-value\"\n role=\"spinbutton\"\n [attr.tabindex]=\"timeControlsEnabled() ? 0 : -1\"\n [attr.aria-label]=\"meridiemAriaLabel()\"\n [attr.aria-valuetext]=\"meridiem()\"\n [attr.aria-disabled]=\"!timeControlsEnabled() || null\"\n (keydown)=\"onMeridiemKeydown($event)\"\n (click)=\"toggleMeridiem()\"\n >\n {{ meridiem() }}\n </span>\n <button\n type=\"button\"\n class=\"ui-datepicker-time-btn\"\n tabindex=\"-1\"\n [disabled]=\"!timeControlsEnabled()\"\n [attr.aria-label]=\"toggleMeridiemAriaLabel()\"\n (click)=\"toggleMeridiem()\"\n >\n <ui-icon name=\"chevron-down\" size=\"sm\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Button bar (custom template or default) -->\n @if (showButtonBar() || buttonBarTemplate()) {\n <div class=\"ui-datepicker-buttonbar\">\n @if (buttonBarTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: todayCallback,\n todayCallback: todayCallback,\n clearCallback: clearCallback,\n }\"\n />\n } @else {\n <ui-button\n size=\"small\"\n level=\"low\"\n [label]=\"todayLabel()\"\n (buttonClick)=\"selectToday()\"\n />\n <ui-button size=\"small\" level=\"low\" [label]=\"clearLabel()\" (buttonClick)=\"clear()\" />\n }\n </div>\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n} @else {\n <!-- Trigger: composed field. The icon opens the panel; a click on the field itself only does\n so when the field isn't typeable (see `onTriggerClick`). -->\n <!-- Convenience wrapper: focus and keyboard are carried by the inner ui-input. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n #triggerWrapper\n class=\"ui-datepicker-trigger\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focusout)=\"onTriggerFocusOut($event)\"\n >\n <ui-input\n #trigger\n [label]=\"label()\"\n [helperText]=\"helperText()\"\n [errorText]=\"errorText()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"triggerReadonly()\"\n [invalid]=\"isInvalid()\"\n [name]=\"name() ?? ''\"\n [inputId]=\"resolvedId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [ariaDescribedBy]=\"resolvedFormatHint() ? formatHintId() : undefined\"\n [tabindex]=\"tabindex()\"\n [value]=\"displayValue()\"\n [iconRight]=\"triggerIcon()\"\n [iconRightTemplate]=\"triggerIconTemplate()\"\n [iconRightAriaLabel]=\"triggerIconAriaLabel()\"\n ariaHasPopup=\"dialog\"\n [ariaExpanded]=\"panelOpen()\"\n [ariaControls]=\"panelOpen() ? panelId : undefined\"\n (iconRightClick)=\"onIconClick($event)\"\n (valueChange)=\"onTriggerInput($event)\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"onTriggerBlur($event)\"\n />\n @if (resolvedFormatHint(); as hint) {\n <span [id]=\"formatHintId()\" class=\"ui-datepicker-format-hint\">{{ hint }}</span>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayViewportMargin]=\"overlayViewportMargin\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayHasBackdrop]=\"!nonModal()\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"calendarTpl\" />\n </ng-template>\n}\n", styles: [".ui-datepicker-trigger{display:block;cursor:pointer}.ui-datepicker-format-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-datepicker-panel{display:flex;flex-direction:column;gap:var(--ui-datepicker-panel-gap, var(--units-sm));box-sizing:border-box;width:max-content;max-width:var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-datepicker-panel-padding, var(--ui-overlay-panel-padding, var(--units-sm)));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--form-high-surface-default);box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--fontfamily-base);overflow:auto}.ui-datepicker-panel:not(._inline){max-height:var(--ui-datepicker-panel-max-height, calc(100dvh - var(--units-3xl)));overscroll-behavior:contain}.ui-datepicker-panel._inline{box-shadow:none;max-width:min(100%,var(--ui-datepicker-panel-max-width, calc(100vw - var(--units-lg))))}.ui-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-datepicker-header-gap, var(--units-sm))}.ui-datepicker-nav{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default));padding:0;border:none;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));background:none;color:var(--informative-defaultlow-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-nav:hover{background-color:var(--informative-highlightlow-surface-hover);color:var(--informative-defaultlow-content-hover)}.ui-datepicker-nav:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title{flex:1 1 auto;min-width:0;text-align:center;font-size:var(--ui-datepicker-title-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-title._button{padding:var(--ui-datepicker-title-padding-y, var(--units-2xs)) var(--ui-datepicker-title-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-title-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-title._button:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-title._button:disabled{cursor:default}.ui-datepicker-months{display:flex;gap:var(--ui-datepicker-months-gap, var(--units-lg))}.ui-datepicker-month{display:flex;flex-direction:column;gap:var(--ui-datepicker-month-gap, var(--units-sm));flex:0 1 auto;width:var(--ui-datepicker-panel-width, 22.5rem);min-width:0;max-width:100%}.ui-datepicker-month:not(:first-child){border-left:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-left:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}@media(width<37.5rem){.ui-datepicker-months{flex-direction:column}.ui-datepicker-month:not(:first-child){border-left:none;padding-left:0;border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);padding-top:var(--ui-datepicker-month-divider-padding-left, var(--units-lg))}}.ui-datepicker-subheader{display:flex;align-items:center;gap:var(--ui-datepicker-subheader-gap, var(--units-sm))}.ui-datepicker-nav-spacer{flex-shrink:0;width:var(--ui-datepicker-nav-size, var(--size-components-default));height:var(--ui-datepicker-nav-size, var(--size-components-default))}.ui-datepicker-picker{display:grid;gap:var(--ui-datepicker-picker-gap, var(--units-xs));width:var(--ui-datepicker-panel-width, 22.5rem);max-width:100%}.ui-datepicker-picker-row{display:contents}.ui-datepicker-picker._month{grid-template-columns:repeat(3,1fr)}.ui-datepicker-picker._year{grid-template-columns:repeat(2,1fr)}.ui-datepicker-cell{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:var(--ui-datepicker-cell-min-height, var(--size-components-sm));padding:var(--ui-datepicker-cell-padding-y, var(--units-sm)) var(--ui-datepicker-cell-padding-x, var(--units-md));border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-cell-radius, var(--radius-sm));background-color:var(--actions-low-surface-default);font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--actions-low-surface-hover)}.ui-datepicker-cell:active:not(:disabled){background-color:var(--actions-low-surface-pressed)}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--actions-high-surface-default);color:var(--actions-high-content-default)}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--actions-high-surface-hover)}.ui-datepicker-cell:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-weekdays,.ui-datepicker-week{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center;align-items:center}.ui-datepicker-weekday{padding:var(--ui-datepicker-weekday-padding-y, var(--units-xs)) 0;font-size:var(--ui-datepicker-weekday-font-size, var(--size-typography-text-md));font-weight:var(--weight-bold);color:var(--form-low-content-default);-webkit-user-select:none;user-select:none}.ui-datepicker-grid{display:flex;flex-direction:column;gap:var(--ui-datepicker-grid-gap, var(--units-xs))}.ui-datepicker-day{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;aspect-ratio:1;max-height:var(--ui-datepicker-day-size, var(--size-components-default));padding:0;border:none;background:transparent;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--form-high-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(100%,var(--ui-datepicker-day-size, var(--size-components-default)));height:100%;border:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid transparent;border-radius:var(--ui-datepicker-day-radius, var(--radius-full));z-index:-1;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--actions-low-surface-hover)}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--actions-low-surface-pressed)}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--actions-low-surface-focused);box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--actions-high-stroke-focused) r g b/50%)}.ui-datepicker-day._other-month{color:var(--ui-datepicker-day-color-outside, var(--global-text-default));opacity:var(--ui-datepicker-day-opacity-outside, .6)}.ui-datepicker-day._today:before{border-color:var(--actions-high-stroke-default)}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--actions-high-stroke-hover)}.ui-datepicker-day._today:focus-visible:before{border-color:var(--actions-high-stroke-focused)}.ui-datepicker-day._selected{color:var(--actions-high-content-default)}.ui-datepicker-day._selected:before{background-color:var(--actions-high-surface-default)}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--actions-high-content-hover)}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--actions-high-surface-hover)}.ui-datepicker-day._selected:focus-visible{color:var(--actions-high-content-focused)}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--actions-high-surface-focused)}.ui-datepicker-day._in-range:after,.ui-datepicker-day._range-start:after,.ui-datepicker-day._range-end:after{content:\"\";position:absolute;top:50%;inset-inline:0;height:100%;transform:translateY(-50%);background-color:var(--ui-datepicker-range-background, var(--informative-highlightlow-surface-hover));z-index:-2}.ui-datepicker-day._range-start:after{inset-inline-start:50%}.ui-datepicker-day._range-end:after{inset-inline-end:50%}.ui-datepicker-day._range-start._range-end:after{content:none}.ui-datepicker-panel:not(._range-complete) .ui-datepicker-day._range-start:after{content:none}.ui-datepicker-day:first-child:after{inset-inline-start:max(0px,(100% - var(--ui-datepicker-day-size, var(--size-components-default))) / 2);border-start-start-radius:var(--ui-datepicker-day-radius, var(--radius-full));border-end-start-radius:var(--ui-datepicker-day-radius, var(--radius-full))}.ui-datepicker-day:last-child:after{inset-inline-end:max(0px,(100% - var(--ui-datepicker-day-size, var(--size-components-default))) / 2);border-start-end-radius:var(--ui-datepicker-day-radius, var(--radius-full));border-end-end-radius:var(--ui-datepicker-day-radius, var(--radius-full))}.ui-datepicker-day._in-range{color:var(--ui-datepicker-range-color, var(--informative-highlightlow-content-default))}.ui-datepicker-day._in-range:disabled{color:var(--ui-datepicker-range-color, var(--informative-highlightlow-content-default))}.ui-datepicker-day._in-range:hover:not(:disabled),.ui-datepicker-day._in-range:focus-visible{color:var(--informative-highlighthigh-content-default)}.ui-datepicker-day._in-range:hover:not(:disabled):before,.ui-datepicker-day._in-range:focus-visible:before{background-color:var(--informative-highlighthigh-surface-default)}.ui-datepicker-day:disabled{color:var(--form-high-content-disabled);opacity:var(--ui-datepicker-day-opacity-disabled, .45);cursor:not-allowed}.ui-datepicker-time{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-datepicker-time-gap, var(--units-sm));padding-top:var(--ui-datepicker-time-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}.ui-datepicker-time:first-child{padding-top:0;border-top:none}.ui-datepicker-time-unit{display:flex;flex-direction:column;align-items:center;gap:var(--ui-datepicker-time-unit-gap, var(--units-2xs))}.ui-datepicker-time-value{box-sizing:border-box;display:inline-block;width:var(--ui-datepicker-time-field-width, 3rem);padding:var(--ui-datepicker-time-value-padding-y, var(--units-2xs)) var(--ui-datepicker-time-value-padding-x, var(--units-sm));border:none;border-radius:var(--ui-datepicker-time-value-radius, var(--radius-sm));background:none;font-family:var(--fontfamily-base);font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;color:var(--form-high-content-default);text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-value:read-only{cursor:pointer}.ui-datepicker-time-value:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--informative-highlightlow-surface-hover)}.ui-datepicker-time-value:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-datepicker-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-btn{display:flex;align-items:center;justify-content:center;width:var(--ui-datepicker-time-btn-width, var(--size-components-xs));height:var(--ui-datepicker-time-btn-height, var(--size-components-2xs));padding:0;border:none;border-radius:var(--ui-datepicker-time-btn-radius, var(--radius-sm));background:none;color:var(--form-low-content-default);cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--informative-highlightlow-surface-hover);color:var(--form-high-content-hover)}.ui-datepicker-time-btn:disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-datepicker-time-colon{font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--weight-bold);color:var(--form-high-content-default)}.ui-datepicker-buttonbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-datepicker-buttonbar-gap, var(--units-sm));padding-top:var(--ui-datepicker-buttonbar-padding-top, var(--units-sm));border-top:var(--ui-datepicker-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default)}\n"] }]
|
|
2106
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], iconAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAriaLabel", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], valueType: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueType", required: true }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], numberOfMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfMonths", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], editableTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "editableTime", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], formatHintLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatHintLabel", required: false }] }], panelAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelAriaLabel", required: false }] }], prevAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevAriaLabel", required: false }] }], nextAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextAriaLabel", required: false }] }], hoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoursAriaLabel", required: false }] }], minutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "minutesAriaLabel", required: false }] }], meridiemAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "meridiemAriaLabel", required: false }] }], incrementHoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementHoursAriaLabel", required: false }] }], decrementHoursAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementHoursAriaLabel", required: false }] }], incrementMinutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementMinutesAriaLabel", required: false }] }], decrementMinutesAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementMinutesAriaLabel", required: false }] }], toggleMeridiemAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleMeridiemAriaLabel", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnFocus", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], dateTemplate: [{ type: i0.ContentChild, args: ['date', { isSignal: true }] }], buttonBarTemplate: [{ type: i0.ContentChild, args: ['buttonbar', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], triggerInput: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { ...{
|
|
1544
2107
|
read: ElementRef,
|
|
1545
|
-
}, isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
2108
|
+
}, isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], triggerWrapperEl: [{ type: i0.ViewChild, args: ['triggerWrapper', { isSignal: true }] }] } });
|
|
1546
2109
|
|
|
1547
2110
|
/*
|
|
1548
2111
|
* Public API Surface of ui-kit/ui-datepicker
|