@4sh/ui-kit 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,2056 +1,2302 @@
1
- import * as i0 from '@angular/core';
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
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import * as i1 from '@angular/cdk/overlay';
6
- import { OverlayModule } from '@angular/cdk/overlay';
7
- import { BaseFormField, toIsoDateTime, toIsoDate, parseIsoDateTime, parseIsoDate, startOfDay, dropdownOverlayPositions, normalizeDateInput, buildMaskSlots, addDays, firstOfMonth, addMonths, hasFocus, extractMaskData, autoFormatSegments, caretForMask, isSameDay, finalizeParsed } from '@4sh/ui-kit/forms';
8
- import { FocusMonitor, CdkTrapFocus } from '@angular/cdk/a11y';
9
- import { UiInput } from '@4sh/ui-kit/forms/ui-input';
10
- import { UiButton } from '@4sh/ui-kit/actions/ui-button';
11
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
12
- import { closeOnNavigation } from '@4sh/ui-kit/overlay';
13
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectorRef, Component, ElementRef, LOCALE_ID, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import * as i1 from "@angular/cdk/overlay";
6
+ import { OverlayModule } from "@angular/cdk/overlay";
7
+ import { BaseFormField, addDays, addMonths, autoFormatSegments, buildMaskSlots, caretForMask, dropdownOverlayPositions, extractMaskData, finalizeParsed, firstOfMonth, hasFocus, isSameDay, normalizeDateInput, parseIsoDate, parseIsoDateTime, startOfDay, toIsoDate, toIsoDateTime } from "@4sh/ui-kit/forms";
8
+ import { CdkTrapFocus, FocusMonitor } from "@angular/cdk/a11y";
9
+ import { UiInput } from "@4sh/ui-kit/forms/ui-input";
10
+ import { UiButton } from "@4sh/ui-kit/actions/ui-button";
11
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
12
+ import { closeOnNavigation } from "@4sh/ui-kit/overlay";
14
13
  let nextPanelUid = 0;
15
- /** Typed `range` separator (FSHSP-118: `"jj/mm/aaaa - jj/mm/aaaa"`) — placeholder, live mask,
16
- * and `parseTypedMulti` splitting. A plain hyphen, distinct from the DISPLAYED en dash below —
17
- * reusing this one for display used to silently change the look of every non-typing consumer. */
18
- const RANGE_SEPARATOR = ' - ';
19
- /** Displayed (committed) `range` separator — unchanged since before typed entry existed. */
20
- const RANGE_DISPLAY_SEPARATOR = ' – ';
21
- /** Typed/displayed `multiple` separator (`"jj/mm/aaaa, jj/mm/aaaa, ..."`) — one separator for both. */
22
- const MULTIPLE_SEPARATOR = ', ';
23
- /** Illustrative date the auto placeholder and the field-order probe are both derived from
24
- * (22 Nov 2023): day, month and year are pairwise distinct, so each one is identifiable in a
25
- * formatter's own output. A fresh instance per call — a consumer's `dateFormat` receives it,
26
- * and a shared one could be mutated in place. */
14
+ const RANGE_SEPARATOR = " - ";
15
+ const RANGE_DISPLAY_SEPARATOR = " – ";
16
+ const MULTIPLE_SEPARATOR = ", ";
27
17
  function probeDate() {
28
- return new Date(2023, 10, 22);
18
+ return new Date(2023, 10, 22);
29
19
  }
30
- /** First index at which any of `tokens` occurs in `text` (`-1` if none) — probes a formatter's
31
- * output for one {@link probeDate} component, most specific token first. */
32
20
  function firstIndexOf(text, tokens) {
33
- for (const token of tokens) {
34
- const i = text.indexOf(token);
35
- if (i !== -1)
36
- return i;
37
- }
38
- return -1;
21
+ for (const token of tokens) {
22
+ const i = text.indexOf(token);
23
+ if (i !== -1) return i;
24
+ }
25
+ return -1;
39
26
  }
40
- /** Splits a flat cell list into rows of `size` (month/year pickers need `role="row"` wrappers). */
41
27
  function chunk(items, size) {
42
- const rows = [];
43
- for (let i = 0; i < items.length; i += size)
44
- rows.push(items.slice(i, i + size));
45
- return rows;
46
- }
47
- /**
48
- * ui-datepicker — headless date / month / year (and optional time) picker.
49
- *
50
- * A readonly {@link UiInput} trigger opens a token-styled panel in a CDK overlay
51
- * (or renders inline). Supports single / multiple / range selection, drill-down
52
- * views (day → month → year), `MonthPicker`/`YearPicker` modes (`view`), several
53
- * months side-by-side (`numberOfMonths`), a time row, and roving keyboard focus.
54
- *
55
- * Value is `Date` or ISO `"yyyy-MM-dd"` string depending on the **required** `valueType` input (no
56
- * default — the consumer must pick one), wired through `ControlValueAccessor` on
57
- * {@link BaseFormField} (shared label / helper / level / validation / states). `writeValue`
58
- * accepts either shape transparently; what gets **emitted** always follows `valueType` — see
59
- * {@link DatepickerValueType}.
60
- *
61
- * Customisation: `panelStyleClass`, the `#date` cell template
62
- * (`let-date let-selected="selected"`) and the `#buttonbar` template
63
- * (`let-todayCallback let-clearCallback`), plus the local SCSS variables.
64
- */
65
- class UiDatepicker extends BaseFormField {
66
- /** @ignore First selected date (for view seeding / time / display). */
67
- firstSelectedFrom(value) {
68
- if (!value)
69
- return null;
70
- const arr = Array.isArray(value) ? value : [value];
71
- return arr.find((d) => d instanceof Date) ?? null;
72
- }
73
- /** @ignore Date → ISO string, date-only unless `showTime`/`timeOnly`. */
74
- toIsoValue(d) {
75
- return this.hasTimeComponent() ? toIsoDateTime(d) : toIsoDate(d);
76
- }
77
- /** @ignore ISO string → Date, `null` if malformed (never throws). */
78
- fromIsoValue(s) {
79
- return this.hasTimeComponent() ? parseIsoDateTime(s) : parseIsoDate(s);
80
- }
81
- /** @ignore Internal Date → the shape `valueType` commits to emitting: a fresh `Date`
82
- * (normalized to midnight when no time is shown — never the original reference) in `'date'`
83
- * mode, an ISO string in `'iso'` mode. The single point deciding the emitted type. */
84
- serializeValue(d) {
85
- if (this.valueType() === 'iso')
86
- return this.toIsoValue(d);
87
- return this.hasTimeComponent() ? new Date(d) : startOfDay(d);
88
- }
89
- /** @ignore A single incoming item, `Date` or ISO string, auto-detected — `writeValue` accepts
90
- * either shape regardless of `valueType` (only the emitted side commits to one). Cloned when
91
- * already a `Date` (never the caller's own reference) — symmetric with `serializeValue`,
92
- * which never hands back the internal reference either; protects against the caller later
93
- * mutating that `Date` in place and silently desyncing `internalValue`. */
94
- parseValue(v) {
95
- return v instanceof Date ? new Date(v) : this.fromIsoValue(v);
96
- }
97
- /** @ignore Internal Date(s) → public value, right before it reaches `modelValue`/the CVA.
98
- * The cast is safe: `serializeValue` only branches on `valueType()`, constant across the
99
- * `map`, so the array is always homogeneous (`Date[]` or `string[]`, never mixed). */
100
- toExternalValue(value) {
101
- if (!value)
102
- return null;
103
- if (Array.isArray(value))
104
- return value.map((d) => this.serializeValue(d));
105
- return this.serializeValue(value);
106
- }
107
- /** @ignore Public value → internal Date(s), right as it enters via `writeValue`. Invalid
108
- * entries are dropped rather than failing the whole value (a malformed item in a
109
- * `multiple`/`range` array shouldn't wipe out the rest). */
110
- toInternalValue(value) {
111
- if (!value)
112
- return null;
113
- if (Array.isArray(value)) {
114
- const parsed = value.map((v) => this.parseValue(v)).filter((d) => d !== null);
115
- return parsed.length ? parsed : null;
116
- }
117
- return this.parseValue(value);
118
- }
119
- // --- Display ---------------------------------------------------------
120
- /** @ignore */
121
- formatDate(date) {
122
- const custom = this.dateFormat();
123
- if (custom)
124
- return custom(date);
125
- // Typeable trigger → numeric format that round-trips with the default parser.
126
- if (this.allowInput()) {
127
- const opts = {
128
- day: '2-digit',
129
- month: '2-digit',
130
- year: 'numeric',
131
- };
132
- if (this.showTime()) {
133
- opts.hour = '2-digit';
134
- opts.minute = '2-digit';
135
- }
136
- return new Intl.DateTimeFormat(this.resolvedLocale(), opts).format(date);
137
- }
138
- const options = this.showTime()
139
- ? { dateStyle: 'medium', timeStyle: 'short' }
140
- : { dateStyle: 'medium' };
141
- return new Intl.DateTimeFormat(this.resolvedLocale(), options).format(date);
142
- }
143
- /** @ignore `timeOnly` display — respects `hourFormat` (never the locale's own AM/PM-vs-24h
144
- * default) and `dateFormat` when provided (symmetric with `formatDate`/`formatMonth`, used
145
- * here as a time formatter). */
146
- formatTime(date) {
147
- const custom = this.dateFormat();
148
- if (custom)
149
- return custom(date);
150
- return new Intl.DateTimeFormat(this.resolvedLocale(), {
151
- hour: '2-digit',
152
- minute: '2-digit',
153
- hour12: this.hourFormat() === '12',
154
- }).format(date);
155
- }
156
- /** @ignore Month-view display (numeric + round-trippable when the trigger is typeable). */
157
- formatMonth(date) {
158
- if (this.allowInput() && !this.dateFormat()) {
159
- const yearFirst = this.dateFieldOrder().filter((f) => f !== 'day')[0] === 'year';
160
- const mm = this.pad(date.getMonth() + 1);
161
- const yyyy = String(date.getFullYear());
162
- return yearFirst ? `${yyyy}/${mm}` : `${mm}/${yyyy}`;
163
- }
164
- return this.capitalize(new Intl.DateTimeFormat(this.resolvedLocale(), { month: 'long', year: 'numeric' }).format(date));
165
- }
166
- constructor() {
167
- super();
168
- /** Placeholder shown in the trigger when nothing is selected. */
169
- this.placeholder = input(/* @ts-ignore */
170
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
171
- /** FontAwesome icon of the trigger's toggle button. */
172
- this.icon = input('calendar', /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
174
- /** Show the trigger's calendar toggle button. */
175
- this.showIcon = input(true, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
176
- /** Accessible name of the toggle button (a11y). */
177
- this.iconAriaLabel = input('Ouvrir le calendrier', /* @ts-ignore */
178
- ...(ngDevMode ? [{ debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []));
179
- /**
180
- * Show a clear (×) button in the trigger when a value is set. **Default `true`** (FSHSP-118):
181
- * only takes effect when `showIcon` is `false` — the calendar/clock toggle otherwise always
182
- * wins the trigger's single icon slot, so the panel stays reachable by click even once a value
183
- * is set. With `showIcon` at its own default (`true`), clearing goes through the keyboard
184
- * (`allowInput`, itself `true` by default) instead: select the text and delete it.
185
- */
186
- this.showClear = input(true, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
187
- /**
188
- * Shape of the emitted value: `'date'` (a plain `Date` — matches a DTO round-tripped through
189
- * `class-transformer`) or `'iso'` (ISO `"yyyy-MM-dd"` string, for a value read/written directly
190
- * against a backend `LocalDate`). `writeValue` always accepts either shape regardless of this
191
- * setting — it only governs what `valueChange`/`dateSelect` emit. **Required, no default**: the
192
- * consumer must pick the one matching its own model's type rather than inherit a silent default.
193
- */
194
- this.valueType = input.required(/* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "valueType" }] : /* istanbul ignore next */ []));
196
- /** Selection quantity: `single` (default), `multiple` or `range`. */
197
- this.selectionMode = input('single', /* @ts-ignore */
198
- ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
199
- /** Base picking granularity: `date` (default), `month` (MonthPicker) or `year` (YearPicker). */
200
- this.view = input('date', /* @ts-ignore */
201
- ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
202
- /** Number of month panels shown side-by-side (date view only). */
203
- this.numberOfMonths = input(1, { ...(ngDevMode ? { debugName: "numberOfMonths" } : /* istanbul ignore next */ {}), transform: numberAttribute });
204
- /** Earliest selectable date (inclusive). `Date` or ISO `"yyyy-MM-dd"`. */
205
- this.minDate = input(null, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
207
- /** Latest selectable date (inclusive). `Date` or ISO `"yyyy-MM-dd"`. */
208
- this.maxDate = input(null, /* @ts-ignore */
209
- ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
210
- /** Individual dates to disable. `Date` or ISO `"yyyy-MM-dd"`, mixable. */
211
- this.disabledDates = input([], /* @ts-ignore */
212
- ...(ngDevMode ? [{ debugName: "disabledDates" }] : /* istanbul ignore next */ []));
213
- /** Week days to disable (0 = Sunday … 6 = Saturday). */
214
- this.disabledDays = input([], /* @ts-ignore */
215
- ...(ngDevMode ? [{ debugName: "disabledDays" }] : /* istanbul ignore next */ []));
216
- /** First day of the week (0 = Sunday … 6 = Saturday). Defaults to Monday. */
217
- this.firstDayOfWeek = input(1, { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), transform: numberAttribute });
218
- /** BCP-47 locale for names and default formatting. Defaults to `LOCALE_ID`. */
219
- this.locale = input(/* @ts-ignore */
220
- ...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
221
- /**
222
- * Custom display formatter for a single date (overrides the default `Intl` format) — also
223
- * used, unchanged, as the time formatter in `timeOnly` mode.
224
- *
225
- * With `allowInput` and no `parseDate`, the typed text is read back in the day/month/year
226
- * order **this formatter writes** (probed from its own output, whatever locale it uses
227
- * internally), not the resolved locale's — so entry and display always agree. A non-numeric
228
- * format (e.g. `"22 novembre 2023"`) can't be probed: pair it with a matching `parseDate`.
229
- */
230
- this.dateFormat = input(/* @ts-ignore */
231
- ...(ngDevMode ? [undefined, { debugName: "dateFormat" }] : /* istanbul ignore next */ []));
232
- /**
233
- * Allow typing the date directly in the trigger. **Default `true`** (FSHSP-118): a calendar
234
- * grid alone forces a screen-reader user through ~30 cells to pick a date, when typing it is
235
- * far faster — set `false` to force the grid-only path instead. The typed text is parsed on
236
- * blur / `Enter`; an unparsable value reverts to the previously displayed one. When enabled
237
- * (and no custom `dateFormat`), the value is displayed in a numeric locale format so it
238
- * round-trips with typing.
239
- *
240
- * `single` gets the full experience: a live auto-"/" mask while constructing a date from an
241
- * empty field (see `typingSlots`), free-form text editing otherwise — no live reformatting,
242
- * parsed on blur/Enter. "Otherwise" covers both a value that already exists and an edit made
243
- * inside the text being typed rather than at its tail: editing a segment in place, e.g. just
244
- * the month, never shifts what follows (FSHSP-118, FSHSP-179).
245
- *
246
- * `range`/`multiple` are typeable too (FSHSP-118), but always as plain text — no live mask,
247
- * only parsed on blur/Enter: `"jj/mm/aaaa - jj/mm/aaaa"` for `range` (exactly two dates,
248
- * reordered chronologically if typed backwards), `"jj/mm/aaaa, jj/mm/aaaa, ..."` for `multiple`
249
- * (any count, duplicates collapsed) — see `parseTypedMulti`. The grid keeps working exactly as
250
- * before either way; typing is a complement, not a replacement.
251
- *
252
- * A typeable field is a text field first: **a click in it no longer opens the panel**
253
- * (FSHSP-180) — the calendar icon, `↓` and the keyboard do. `allowInput="false"` (or
254
- * `readonly`/`timeOnly`) restores the click-to-open, the field being the affordance there; so
255
- * does `showIcon="false"`, which leaves no icon to click. See `onTriggerClick`.
256
- *
257
- * Has no effect in `timeOnly` mode: the trigger stays read-only there (no parser/formatter for
258
- * a bare time string).
259
- */
260
- this.allowInput = input(true, { ...(ngDevMode ? { debugName: "allowInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
261
- /**
262
- * Custom parser for the typed text (symmetric with `dateFormat`). Return `null`
263
- * to reject the input. When omitted, a locale-aware numeric parser is used.
264
- */
265
- this.parseDate = input(/* @ts-ignore */
266
- ...(ngDevMode ? [undefined, { debugName: "parseDate" }] : /* istanbul ignore next */ []));
267
- /** Enable the time selection row. */
268
- this.showTime = input(false, { ...(ngDevMode ? { debugName: "showTime" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
269
- /** Time-only mode: hide the calendar, keep the time row. */
270
- this.timeOnly = input(false, { ...(ngDevMode ? { debugName: "timeOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
271
- /** 12h (AM/PM) or 24h clock. */
272
- this.hourFormat = input('24', /* @ts-ignore */
273
- ...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
274
- /** Minute increment of the time stepper (buttons / arrow keys — typing stays exact). */
275
- this.stepMinute = input(1, { ...(ngDevMode ? { debugName: "stepMinute" } : /* istanbul ignore next */ {}), transform: numberAttribute });
276
- /**
277
- * Let the hours and minutes be typed directly in the time row (default).
278
- */
279
- this.editableTime = input(true, { ...(ngDevMode ? { debugName: "editableTime" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
280
- /** Show the bottom button bar (Today / Clear) — or the `#buttonbar` template. */
281
- this.showButtonBar = input(false, { ...(ngDevMode ? { debugName: "showButtonBar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
282
- /** Ripple Effect */
283
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
284
- /** Label of the default "Today" button. */
285
- this.todayLabel = input("Aujourd'hui", /* @ts-ignore */
286
- ...(ngDevMode ? [{ debugName: "todayLabel" }] : /* istanbul ignore next */ []));
287
- /** Label of the default "Clear" button. */
288
- this.clearLabel = input('Effacer', /* @ts-ignore */
289
- ...(ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []));
290
- /**
291
- * Accessible hint announcing the expected typed format, chained onto the trigger's
292
- * `aria-describedby` (alongside the helper/error message, never replacing it) whenever it's
293
- * typeable (FSHSP-118): the `placeholder` alone is unreliable across screen readers, and it
294
- * disappears the moment the user starts typing. Defaults to a sentence built from the resolved
295
- * placeholder (e.g. "Format attendu : jj/mm/aaaa"); pass an explicit string to override it, or
296
- * `''` to omit it.
297
- */
298
- this.formatHintLabel = input(/* @ts-ignore */
299
- ...(ngDevMode ? [undefined, { debugName: "formatHintLabel" }] : /* istanbul ignore next */ []));
300
- /** Accessible name of the calendar panel (fallback when no `label`/`ariaLabel`). */
301
- this.panelAriaLabel = input('Calendrier', /* @ts-ignore */
302
- ...(ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []));
303
- /** Accessible label of the previous-month/year navigation arrow. */
304
- this.prevAriaLabel = input('Précédent', /* @ts-ignore */
305
- ...(ngDevMode ? [{ debugName: "prevAriaLabel" }] : /* istanbul ignore next */ []));
306
- /** Accessible label of the next-month/year navigation arrow. */
307
- this.nextAriaLabel = input('Suivant', /* @ts-ignore */
308
- ...(ngDevMode ? [{ debugName: "nextAriaLabel" }] : /* istanbul ignore next */ []));
309
- /** Accessible name of the hours spinbutton. */
310
- this.hoursAriaLabel = input('Heures', /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "hoursAriaLabel" }] : /* istanbul ignore next */ []));
312
- /** Accessible name of the minutes spinbutton. */
313
- this.minutesAriaLabel = input('Minutes', /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "minutesAriaLabel" }] : /* istanbul ignore next */ []));
315
- /** Accessible name of the AM/PM spinbutton. */
316
- this.meridiemAriaLabel = input('AM/PM', /* @ts-ignore */
317
- ...(ngDevMode ? [{ debugName: "meridiemAriaLabel" }] : /* istanbul ignore next */ []));
318
- /** Accessible label of the hours increment button. */
319
- this.incrementHoursAriaLabel = input('Augmenter les heures', /* @ts-ignore */
320
- ...(ngDevMode ? [{ debugName: "incrementHoursAriaLabel" }] : /* istanbul ignore next */ []));
321
- /** Accessible label of the hours decrement button. */
322
- this.decrementHoursAriaLabel = input('Diminuer les heures', /* @ts-ignore */
323
- ...(ngDevMode ? [{ debugName: "decrementHoursAriaLabel" }] : /* istanbul ignore next */ []));
324
- /** Accessible label of the minutes increment button. */
325
- this.incrementMinutesAriaLabel = input('Augmenter les minutes', /* @ts-ignore */
326
- ...(ngDevMode ? [{ debugName: "incrementMinutesAriaLabel" }] : /* istanbul ignore next */ []));
327
- /** Accessible label of the minutes decrement button. */
328
- this.decrementMinutesAriaLabel = input('Diminuer les minutes', /* @ts-ignore */
329
- ...(ngDevMode ? [{ debugName: "decrementMinutesAriaLabel" }] : /* istanbul ignore next */ []));
330
- /** Accessible label of the AM/PM toggle buttons. */
331
- this.toggleMeridiemAriaLabel = input('Changer AM/PM', /* @ts-ignore */
332
- ...(ngDevMode ? [{ debugName: "toggleMeridiemAriaLabel" }] : /* istanbul ignore next */ []));
333
- /** Render the panel inline (no trigger, no overlay). */
334
- this.inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
335
- /**
336
- * Open the panel as soon as the trigger takes focus, pointer *or* keyboard, never a
337
- * programmatic focus.
338
- */
339
- this.showOnFocus = input(false, { ...(ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
340
- /**
341
- * Auto-flip the panel above the trigger when there isn't enough room below
342
- * (default). Set `false` to lock it below the trigger regardless of space.
343
- */
344
- this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
345
- /** Close after a complete selection (ignored when `showTime`). */
346
- this.closeOnSelect = input(true, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
347
- /** Extra class(es) applied to the panel (scoped custom styling). */
348
- this.panelStyleClass = input(/* @ts-ignore */
349
- ...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
350
- /** Native autocomplete, forwarded to the trigger. */
351
- this.autocomplete = input(/* @ts-ignore */
352
- ...(ngDevMode ? [undefined, { debugName: "autocomplete" }] : /* istanbul ignore next */ []));
353
- /** Emitted whenever the value changes (selection, time, clear). */
354
- this.valueChange = output();
355
- /** Emitted when a date/month/year is picked — always a single value (in `valueType`'s
356
- * shape), even in `multiple`/`range` (it reports "which day was just clicked", not the model
357
- * value, which is why it never becomes an array there). */
358
- this.dateSelect = output();
359
- /** Emitted when the displayed month changes. */
360
- this.monthChange = output();
361
- /** Emitted when the panel opens. */
362
- this.opened = output();
363
- /** Emitted when the panel closes. */
364
- this.closed = output();
365
- /** Emitted when the value is cleared. */
366
- this.cleared = output();
367
- /** Emitted when the trigger receives focus. */
368
- this.inputFocus = output();
369
- /** Emitted when the trigger loses focus. */
370
- this.inputBlur = output();
371
- /** Custom day-cell template: `<ng-template #date let-date let-selected="selected">`. */
372
- this.dateTemplate = contentChild('date', /* @ts-ignore */
373
- ...(ngDevMode ? [{ debugName: "dateTemplate" }] : /* istanbul ignore next */ []));
374
- /** Custom button-bar template: `<ng-template #buttonbar let-todayCallback let-clearCallback>`. */
375
- this.buttonBarTemplate = contentChild('buttonbar', /* @ts-ignore */
376
- ...(ngDevMode ? [{ debugName: "buttonBarTemplate" }] : /* istanbul ignore next */ []));
377
- /** Custom trigger-icon template: `<ng-template #icon let-name let-size="size">`. */
378
- this.iconTemplate = contentChild('icon', /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
380
- /** @ignore */
381
- this.localeId = inject(LOCALE_ID);
382
- /** @ignore Focus origin of the trigger, for `showOnFocus`. The CDK is the only thing that can
383
- * tell a user-initiated focus from a programmatic one (`autofocus`, a host app calling
384
- * `focus()`), which must not pop a calendar the user never asked for. */
385
- this.focusMonitor = inject(FocusMonitor);
386
- /** @ignore Only used to detach the overlay *synchronously* on `Tab`, see `onTriggerKeydown`. */
387
- this.cdr = inject(ChangeDetectorRef);
388
- /** @ignore */
389
- this.doc = inject(DOCUMENT);
390
- /** @ignore Element the current press started on, see `onOutsideClick`. */
391
- this.pressOrigin = null;
392
- /** @ignore */
393
- this.triggerInput = viewChild('trigger', /* @ts-ignore */
394
- ...(ngDevMode ? [{ debugName: "triggerInput" }] : /* istanbul ignore next */ []));
395
- /** @ignore Trigger host (to anchor the overlay on the input box, not the helper). */
396
- this.triggerRef = viewChild('trigger', { ...(ngDevMode ? { debugName: "triggerRef" } : /* istanbul ignore next */ {}), read: ElementRef });
397
- /** @ignore Panel root element (overlay or inline) — used for roving day focus. */
398
- this.panelEl = viewChild('panel', /* @ts-ignore */
399
- ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
400
- /** @ignore Trigger wrapper (field + label + format hint). A non-modal panel has no backdrop,
401
- * so outside-click dismissal has to know what "inside the trigger" means. */
402
- this.triggerWrapperEl = viewChild('triggerWrapper', /* @ts-ignore */
403
- ...(ngDevMode ? [{ debugName: "triggerWrapperEl" }] : /* istanbul ignore next */ []));
404
- /** @ignore */
405
- this.panelId = `ui-datepicker-panel-${nextPanelUid++}`;
406
- /** @ignore */
407
- this.panelOpen = signal(false, /* @ts-ignore */
408
- ...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
409
- /** @ignore Panel opened without taking the focus (`showOnFocus`): plain popup instead of the
410
- * usual modal dialog — see {@link DatepickerOpenOrigin}. */
411
- this.nonModal = signal(false, /* @ts-ignore */
412
- ...(ngDevMode ? [{ debugName: "nonModal" }] : /* istanbul ignore next */ []));
413
- /** @ignore Set while we hand the focus back to the trigger ourselves (`close`), so the
414
- * returning focus never re-opens the panel that just closed. `focus()` dispatches
415
- * synchronously, so a plain flag is enough, no timer to leak. */
416
- this.suppressFocusOpen = false;
417
- /** @ignore Element the overlay is anchored to (the input box). */
418
- this.overlayOrigin = signal(null, /* @ts-ignore */
419
- ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
420
- /** @ignore Month currently displayed. */
421
- this.viewDate = signal(startOfDay(new Date()), /* @ts-ignore */
422
- ...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
423
- /** @ignore Active drill-down level; resets to `view()` when it changes. */
424
- this.currentView = linkedSignal(() => this.view(), /* @ts-ignore */
425
- ...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
426
- /** @ignore Day cell owning the roving tabindex. */
427
- this.focusedDate = signal(startOfDay(new Date()), /* @ts-ignore */
428
- ...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
429
- /** @ignore Month-picker cell (index 0–11) owning the roving tabindex. */
430
- this.focusedMonthIndex = signal(new Date().getMonth(), /* @ts-ignore */
431
- ...(ngDevMode ? [{ debugName: "focusedMonthIndex" }] : /* istanbul ignore next */ []));
432
- /** @ignore Year-picker cell (absolute year) owning the roving tabindex. */
433
- this.focusedYear = signal(new Date().getFullYear(), /* @ts-ignore */
434
- ...(ngDevMode ? [{ debugName: "focusedYear" }] : /* istanbul ignore next */ []));
435
- /** @ignore Time components. */
436
- this.hours = signal(0, /* @ts-ignore */
437
- ...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
438
- this.minutes = signal(0, /* @ts-ignore */
439
- ...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
440
- /** @ignore Raw text while the user edits the trigger (`allowInput`); `null` when not editing. */
441
- this.typedValue = signal(null, /* @ts-ignore */
442
- ...(ngDevMode ? [{ debugName: "typedValue" }] : /* istanbul ignore next */ []));
443
- /** @ignore Live mask given up on for the rest of the current entry, because the user edited
444
- * inside the text instead of appending at its tail (see `onTriggerInput`/`typingSlots`).
445
- * Lifted by any commit, and as soon as the field reads empty. */
446
- this.maskSuspended = signal(false, /* @ts-ignore */
447
- ...(ngDevMode ? [{ debugName: "maskSuspended" }] : /* istanbul ignore next */ []));
448
- /** @ignore Date-based source of truth for all calendar/selection logic; `modelValue`
449
- * (inherited) only ever carries the public value (`Date` or ISO string per `valueType`),
450
- * written in lockstep. */
451
- this.internalValue = signal(null, /* @ts-ignore */
452
- ...(ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []));
453
- /** @ignore Below the trigger, flipping above when `autoFlip` and space is lacking. */
454
- this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
455
- ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
456
- /** @ignore Gutter kept with the viewport edges, matching the one `$panel-max-width`
457
- * reserves; with `cdkConnectedOverlayPush` it keeps the panel fully on screen. */
458
- this.overlayViewportMargin = 12;
459
- /** @ignore Bound (stable) callbacks exposed to the `#buttonbar` template. */
460
- this.todayCallback = (event) => {
461
- event?.stopPropagation?.();
462
- this.selectToday();
463
- };
464
- this.clearCallback = (event) => {
465
- event?.stopPropagation?.();
466
- this.clear();
467
- };
468
- /** @ignore */
469
- this.resolvedLocale = computed(() => this.locale() ?? this.localeId, /* @ts-ignore */
470
- ...(ngDevMode ? [{ debugName: "resolvedLocale" }] : /* istanbul ignore next */ []));
471
- /** @ignore `minDate`/`maxDate`/`disabledDates` normalized to `Date` (accept ISO strings too). */
472
- this.resolvedMinDate = computed(() => normalizeDateInput(this.minDate()), /* @ts-ignore */
473
- ...(ngDevMode ? [{ debugName: "resolvedMinDate" }] : /* istanbul ignore next */ []));
474
- this.resolvedMaxDate = computed(() => normalizeDateInput(this.maxDate()), /* @ts-ignore */
475
- ...(ngDevMode ? [{ debugName: "resolvedMaxDate" }] : /* istanbul ignore next */ []));
476
- this.resolvedDisabledDates = computed(() => (this.disabledDates() ?? []).map(normalizeDateInput).filter((d) => d !== null), /* @ts-ignore */
477
- ...(ngDevMode ? [{ debugName: "resolvedDisabledDates" }] : /* istanbul ignore next */ []));
478
- /** @ignore Not typeable: manual input off, read-only, or `timeOnly` (no bare-time parser).
479
- * `range`/`multiple` ARE typeable (FSHSP-118) — see `parseTypedMulti`/`typingSlots`. */
480
- this.triggerReadonly = computed(() => this.readonly() || !this.allowInput() || this.timeOnly(), /* @ts-ignore */
481
- ...(ngDevMode ? [{ debugName: "triggerReadonly" }] : /* istanbul ignore next */ []));
482
- /** @ignore Single-date placeholder token (e.g. `jj/mm/aaaa`) — the building block
483
- * `resolvedPlaceholder` composes for `range`/`multiple`. With a custom `dateFormat`, the
484
- * locale's numeric token would be flatly wrong (it describes a format nothing actually
485
- * produces or accepts) — showing that custom formatter's own output for an illustrative date
486
- * instead at least matches what the field really expects. */
487
- this.singleDatePlaceholder = computed(() => {
488
- const custom = this.dateFormat();
489
- if (custom)
490
- return custom(probeDate());
491
- const fr = this.resolvedLocale().toLowerCase().startsWith('fr');
492
- const token = { day: fr ? 'jj' : 'dd', month: 'mm', year: fr ? 'aaaa' : 'yyyy' };
493
- const view = this.view();
494
- if (view === 'year')
495
- return token.year;
496
- const opts = view === 'month'
497
- ? { month: '2-digit', year: 'numeric' }
498
- : { day: '2-digit', month: '2-digit', year: 'numeric' };
499
- return new Intl.DateTimeFormat(this.resolvedLocale(), opts)
500
- .formatToParts(probeDate())
501
- .map((p) => p.type === 'day'
502
- ? token.day
503
- : p.type === 'month'
504
- ? token.month
505
- : p.type === 'year'
506
- ? token.year
507
- : p.value)
508
- .join('');
509
- }, /* @ts-ignore */
510
- ...(ngDevMode ? [{ debugName: "singleDatePlaceholder" }] : /* istanbul ignore next */ []));
511
- /**
512
- * @ignore Placeholder shown in the typeable trigger. Falls back to a hint derived from the
513
- * resolved locale's field order (e.g. `jj/mm/aaaa` in French, `mm/dd/yyyy` in en-US) — or, with
514
- * a custom `dateFormat`, from that formatter's own output for an illustrative date (see
515
- * `singleDatePlaceholder`), since the locale-numeric token would describe a format nothing
516
- * actually produces or accepts — so the field never advertises the wrong format. Composed into
517
- * `"jj/mm/aaaa - jj/mm/aaaa"` (`range`) or `"jj/mm/aaaa, ..."` (`multiple`), matching
518
- * `RANGE_SEPARATOR`/`MULTIPLE_SEPARATOR` (see `parseTypedMulti`).
519
- */
520
- this.resolvedPlaceholder = computed(() => {
521
- const explicit = this.placeholder();
522
- // Keep the consumer's placeholder, and don't auto-hint on a read-only trigger.
523
- if (explicit || this.triggerReadonly())
524
- return explicit;
525
- const single = this.singleDatePlaceholder();
526
- const mode = this.selectionMode();
527
- if (mode === 'range')
528
- return `${single}${RANGE_SEPARATOR}${single}`;
529
- if (mode === 'multiple')
530
- return `${single}${MULTIPLE_SEPARATOR}...`;
531
- return single;
532
- }, /* @ts-ignore */
533
- ...(ngDevMode ? [{ debugName: "resolvedPlaceholder" }] : /* istanbul ignore next */ []));
534
- /**
535
- * @ignore Format hint text, or `null` when there's nothing to announce: the trigger isn't
536
- * typeable, or `formatHintLabel` was explicitly set to `''` to opt out.
537
- */
538
- this.resolvedFormatHint = computed(() => {
539
- if (this.triggerReadonly())
540
- return null;
541
- const explicit = this.formatHintLabel();
542
- if (explicit === '')
543
- return null;
544
- return explicit || `Format attendu : ${this.resolvedPlaceholder()}`;
545
- }, /* @ts-ignore */
546
- ...(ngDevMode ? [{ debugName: "resolvedFormatHint" }] : /* istanbul ignore next */ []));
547
- /** @ignore Stable id for the hint element `resolvedFormatHint` renders into. */
548
- this.formatHintId = computed(() => `${this.resolvedId()}-format-hint`, /* @ts-ignore */
549
- ...(ngDevMode ? [{ debugName: "formatHintId" }] : /* istanbul ignore next */ []));
550
- /**
551
- * @ignore Field order a custom `dateFormat` actually writes, probed from its own output for
552
- * {@link probeDate}. `null` when there is no custom formatter, or when its output isn't
553
- * numeric enough to tell (e.g. `"22 novembre 2023"`) — the locale order stands then.
554
- *
555
- * The default parser and the live mask have to read the text back in the order the field
556
- * displays it, and a `dateFormat` is free to use a locale of its own: an `fr-FR` formatter
557
- * under an `en-US` `LOCALE_ID` displayed `"08/07/2026"` but parsed it month-first, so
558
- * finishing the entry silently swapped day and month (FSHSP-179).
559
- */
560
- this.customFormatFieldOrder = computed(() => {
561
- const custom = this.dateFormat();
562
- if (!custom)
563
- return null;
564
- const out = custom(probeDate());
565
- // 4-digit year probed before the 2-digit one: `"23"` also occurs inside `"2023"` ("20|23"),
566
- // at an offset that isn't where the year starts.
567
- const probed = [
568
- ['day', firstIndexOf(out, ['22'])],
569
- ['month', firstIndexOf(out, ['11'])],
570
- ['year', firstIndexOf(out, ['2023', '23'])],
571
- ];
572
- if (probed.some(([, i]) => i === -1))
573
- return null;
574
- if (new Set(probed.map(([, i]) => i)).size !== probed.length)
575
- return null;
576
- return probed.sort((a, b) => a[1] - b[1]).map(([field]) => field);
577
- }, /* @ts-ignore */
578
- ...(ngDevMode ? [{ debugName: "customFormatFieldOrder" }] : /* istanbul ignore next */ []));
579
- /** @ignore Order of day/month/year driving numeric parsing, the live mask and the auto
580
- * placeholder: what a custom `dateFormat` writes when that can be probed
581
- * ({@link customFormatFieldOrder}), the resolved locale's own order otherwise. */
582
- this.dateFieldOrder = computed(() => {
583
- const fromFormat = this.customFormatFieldOrder();
584
- if (fromFormat)
585
- return fromFormat;
586
- const parts = new Intl.DateTimeFormat(this.resolvedLocale(), {
587
- day: '2-digit',
588
- month: '2-digit',
589
- year: 'numeric',
590
- }).formatToParts(probeDate());
591
- const order = parts
592
- .map((p) => p.type)
593
- .filter((t) => t === 'day' || t === 'month' || t === 'year');
594
- return order.length === 3 ? order : ['day', 'month', 'year'];
595
- }, /* @ts-ignore */
596
- ...(ngDevMode ? [{ debugName: "dateFieldOrder" }] : /* istanbul ignore next */ []));
597
- /** @ignore `dateFieldOrder`, minus `day` in month view — the fields actually typed. */
598
- this.activeFields = computed(() => this.dateFieldOrder().filter((f) => (this.view() === 'month' ? f !== 'day' : true)), /* @ts-ignore */
599
- ...(ngDevMode ? [{ debugName: "activeFields" }] : /* istanbul ignore next */ []));
600
- /**
601
- * @ignore Dynamic mask (day/month/year widths, `+` time if `showTime`, `+` a second date for
602
- * `range`) driving the auto-"/"/":"/" - " formatting of the typeable trigger. `null` disables
603
- * it: `triggerReadonly`, `view === 'year'` (free-form field), a custom `parseDate` (non-numeric
604
- * format), `hasValue()`, or `multiple` (unbounded date count, no fixed template fits — plain
605
- * text on blur/Enter instead, see `parseTypedMulti`).
606
- *
607
- * `hasValue()`: re-deriving the mask from the raw digit stream only works for *constructing* a
608
- * value from nothing, not editing one in place (day/month re-validate arbitrary residual digits
609
- * after any edit — see `onTriggerInput`). So it's off once a value exists — plain text instead,
610
- * parsed on blur/Enter — and re-arms the moment the field reads empty (`onTriggerInput` commits
611
- * the clear right there, not just on blur, so `hasValue()` actually flips before the next key).
612
- *
613
- * `maskSuspended()`: the same limitation, hit before any value exists — an edit made *inside*
614
- * the text being typed rather than at its tail (see `onTriggerInput`).
615
- */
616
- this.typingSlots = computed(() => {
617
- const mode = this.selectionMode();
618
- if (this.triggerReadonly() ||
619
- this.view() === 'year' ||
620
- this.parseDate() ||
621
- this.hasValue() ||
622
- this.maskSuspended() ||
623
- (mode !== 'single' && mode !== 'range'))
624
- return null;
625
- const widths = { day: '99', month: '99', year: '9999' };
626
- const bounds = {
627
- day: { min: 1, max: 31 },
628
- month: { min: 1, max: 12 },
629
- year: null,
630
- };
631
- const fields = this.activeFields();
632
- let mask = fields.map((f) => widths[f]).join('/');
633
- const segmentBounds = fields.map((f) => bounds[f]);
634
- if (mode === 'single' && this.showTime() && this.view() === 'date') {
635
- mask += this.hourFormat() === '12' ? ' 99:99 aa' : ' 99:99';
636
- segmentBounds.push(this.hourFormat() === '12' ? { min: 1, max: 12 } : { min: 0, max: 23 }, {
637
- min: 0,
638
- max: 59,
639
- });
640
- }
641
- if (mode === 'range') {
642
- // Second date, same widths/bounds, joined by the literal typing separator — no `showTime`
643
- // support here (typed `range` is always `startOfDay`, see `parseTypedMulti`).
644
- mask += RANGE_SEPARATOR + fields.map((f) => widths[f]).join('/');
645
- segmentBounds.push(...fields.map((f) => bounds[f]));
646
- }
647
- return buildMaskSlots(mask, segmentBounds);
648
- }, /* @ts-ignore */
649
- ...(ngDevMode ? [{ debugName: "typingSlots" }] : /* istanbul ignore next */ []));
650
- /** @ignore The panel is visible. */
651
- this.showPanel = computed(() => this.inline() || this.panelOpen(), /* @ts-ignore */
652
- ...(ngDevMode ? [{ debugName: "showPanel" }] : /* istanbul ignore next */ []));
653
- /** @ignore Day grid shown (hidden in `timeOnly`). */
654
- this.showCalendar = computed(() => !this.timeOnly(), /* @ts-ignore */
655
- ...(ngDevMode ? [{ debugName: "showCalendar" }] : /* istanbul ignore next */ []));
656
- /** @ignore Single-month layout enables the drill-down header + roving focus. */
657
- this.singleMonth = computed(() => Math.max(1, this.numberOfMonths()) === 1, /* @ts-ignore */
658
- ...(ngDevMode ? [{ debugName: "singleMonth" }] : /* istanbul ignore next */ []));
659
- /** @ignore A value is currently set. */
660
- this.hasValue = computed(() => this.selectedDates().length > 0, /* @ts-ignore */
661
- ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
662
- /**
663
- * @ignore A `range` whose two ends are both picked. Between the first and the second click
664
- * the start is selected but there is no zone yet: the grid must then show its chip alone,
665
- * never a half band running off toward an end that does not exist.
666
- */
667
- this.rangeComplete = computed(() => {
668
- if (this.selectionMode() !== 'range')
669
- return false;
670
- const [start, end] = this.selectedDates();
671
- return !!start && !!end;
672
- }, /* @ts-ignore */
673
- ...(ngDevMode ? [{ debugName: "rangeComplete" }] : /* istanbul ignore next */ []));
674
- /**
675
- * @ignore The trigger's right action clears the value (instead of toggling the panel). Gated
676
- * on `!showIcon()` (FSHSP-118): the calendar/clock toggle always wins the trigger's single icon
677
- * slot when it's shown, so there's always a click target to reopen the panel and pick a
678
- * different date directly — the cross only replaces it in configs that hid it (`showIcon`
679
- * false), where it's the sole remaining affordance to empty the field without a keyboard.
680
- */
681
- this.showClearButton = computed(() => this.showClear() &&
682
- this.hasValue() &&
683
- !this.isDisabled() &&
684
- !this.readonly() &&
685
- !this.showIcon(), /* @ts-ignore */
686
- ...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
687
- /** @ignore Right-side icon: clear (×) when clearable + set + no calendar toggle to show
688
- * (see `showClearButton`), else the calendar/clock toggle. */
689
- this.triggerIcon = computed(() => {
690
- if (this.showClearButton())
691
- return 'xmark';
692
- if (!this.showIcon())
693
- return undefined;
694
- // Default to a clock in time-only mode (unless a custom icon was provided).
695
- return this.timeOnly() && this.icon() === 'calendar' ? 'clock' : this.icon();
696
- }, /* @ts-ignore */
697
- ...(ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []));
698
- /** @ignore Accessible name of the right action. */
699
- this.triggerIconAriaLabel = computed(() => this.showClearButton() ? this.clearLabel() : this.iconAriaLabel(), /* @ts-ignore */
700
- ...(ngDevMode ? [{ debugName: "triggerIconAriaLabel" }] : /* istanbul ignore next */ []));
701
- /** @ignore Forwarded to the trigger only when an icon zone is rendered — `showIcon="false"` stays icon-less. */
702
- this.triggerIconTemplate = computed(() => this.triggerIcon() ? this.iconTemplate() : undefined, /* @ts-ignore */
703
- ...(ngDevMode ? [{ debugName: "triggerIconTemplate" }] : /* istanbul ignore next */ []));
704
- // --- Selection helpers ----------------------------------------------
705
- /** @ignore Flatten the internal (Date-based) value to a list of selected dates. */
706
- this.selectedDates = computed(() => {
707
- const v = this.internalValue();
708
- if (!v)
709
- return [];
710
- return (Array.isArray(v) ? v : [v]).filter((d) => d instanceof Date);
711
- }, /* @ts-ignore */
712
- ...(ngDevMode ? [{ debugName: "selectedDates" }] : /* istanbul ignore next */ []));
713
- // --- Value conversion (the ONLY boundary between the public `Date`/ISO contract
714
- // and the internal Date-based calendar logic) --------------------------------
715
- /** @ignore Whether the value carries a time component (date+time ISO / non-midnight `Date`). */
716
- this.hasTimeComponent = computed(() => this.showTime() || this.timeOnly(), /* @ts-ignore */
717
- ...(ngDevMode ? [{ debugName: "hasTimeComponent" }] : /* istanbul ignore next */ []));
718
- /** @ignore Value rendered in the trigger. */
719
- this.displayValue = computed(() => {
720
- // While editing, mirror the raw text so the input keeps what the user types.
721
- const typed = this.typedValue();
722
- if (typed !== null)
723
- return typed;
724
- const dates = this.selectedDates();
725
- if (!dates.length)
726
- return '';
727
- const base = this.view();
728
- if (base === 'month')
729
- return this.formatMonth(dates[0]);
730
- if (base === 'year')
731
- return String(dates[0].getFullYear());
732
- if (this.timeOnly()) {
733
- return this.formatTime(dates[0]);
734
- }
735
- const mode = this.selectionMode();
736
- if (mode === 'multiple')
737
- return dates.map((d) => this.formatDate(d)).join(MULTIPLE_SEPARATOR);
738
- if (mode === 'range')
739
- return dates.map((d) => this.formatDate(d)).join(RANGE_DISPLAY_SEPARATOR);
740
- return this.formatDate(dates[0]);
741
- }, /* @ts-ignore */
742
- ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
743
- // --- Header ----------------------------------------------------------
744
- /** @ignore Displayed decade start (year view). */
745
- this.decadeStart = computed(() => Math.floor(this.viewDate().getFullYear() / 10) * 10, /* @ts-ignore */
746
- ...(ngDevMode ? [{ debugName: "decadeStart" }] : /* istanbul ignore next */ []));
747
- /** @ignore Header label depends on the active view. */
748
- this.headerLabel = computed(() => {
749
- const v = this.currentView();
750
- if (v === 'year')
751
- return `${this.decadeStart()} - ${this.decadeStart() + 9}`;
752
- if (v === 'month')
753
- return String(this.viewDate().getFullYear());
754
- return this.capitalize(new Intl.DateTimeFormat(this.resolvedLocale(), { month: 'long', year: 'numeric' }).format(this.viewDate()));
755
- }, /* @ts-ignore */
756
- ...(ngDevMode ? [{ debugName: "headerLabel" }] : /* istanbul ignore next */ []));
757
- // --- Weekday headers -------------------------------------------------
758
- /** @ignore Short (visible) + full (aria-label) weekday names — without both, either the header
759
- * stays `aria-hidden` or the short text alone leaves screen-reader users without column names. */
760
- this.weekDayNames = computed(() => {
761
- const shortFmt = new Intl.DateTimeFormat(this.resolvedLocale(), { weekday: 'short' });
762
- const longFmt = new Intl.DateTimeFormat(this.resolvedLocale(), { weekday: 'long' });
763
- const sunday = new Date(2023, 0, 1); // getDay() === 0
764
- const first = this.firstDayOfWeek();
765
- return Array.from({ length: 7 }, (_, k) => {
766
- const d = addDays(sunday, (first + k) % 7);
767
- return {
768
- short: this.capitalize(shortFmt.format(d)),
769
- full: this.capitalize(longFmt.format(d)),
770
- };
771
- });
772
- }, /* @ts-ignore */
773
- ...(ngDevMode ? [{ debugName: "weekDayNames" }] : /* istanbul ignore next */ []));
774
- /** @ignore Full-date `aria-label` formatter for day gridcells (e.g. "8 juillet 2026"). */
775
- this.dayAriaFormatter = computed(() => new Intl.DateTimeFormat(this.resolvedLocale(), {
776
- day: 'numeric',
777
- month: 'long',
778
- year: 'numeric',
779
- }), /* @ts-ignore */
780
- ...(ngDevMode ? [{ debugName: "dayAriaFormatter" }] : /* istanbul ignore next */ []));
781
- // --- Grids -----------------------------------------------------------
782
- /** @ignore Month panels (1 or more) for the date view. */
783
- this.monthPanels = computed(() => {
784
- const count = Math.max(1, this.numberOfMonths());
785
- const start = firstOfMonth(this.viewDate());
786
- const fmt = new Intl.DateTimeFormat(this.resolvedLocale(), { month: 'long', year: 'numeric' });
787
- return Array.from({ length: count }, (_, i) => {
788
- const monthDate = addMonths(start, i);
789
- return {
790
- monthDate,
791
- label: this.capitalize(fmt.format(monthDate)),
792
- weeks: this.buildMonthWeeks(monthDate),
793
- showPrev: i === 0,
794
- showNext: i === count - 1,
795
- };
796
- });
797
- }, /* @ts-ignore */
798
- ...(ngDevMode ? [{ debugName: "monthPanels" }] : /* istanbul ignore next */ []));
799
- /** @ignore Month-picker grid (12 months of the displayed year). */
800
- this.months = computed(() => {
801
- const fmt = new Intl.DateTimeFormat(this.resolvedLocale(), { month: 'short' });
802
- const year = this.viewDate().getFullYear();
803
- const sel = this.selectedDates();
804
- return Array.from({ length: 12 }, (_, i) => ({
805
- index: i,
806
- label: this.capitalize(fmt.format(new Date(year, i, 1))),
807
- selected: sel.some((d) => d.getFullYear() === year && d.getMonth() === i),
808
- disabled: this.isMonthDisabled(year, i),
809
- }));
810
- }, /* @ts-ignore */
811
- ...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
812
- /** @ignore Year-picker grid (the displayed decade). */
813
- this.years = computed(() => {
814
- const start = this.decadeStart();
815
- const sel = this.selectedDates();
816
- return Array.from({ length: 10 }, (_, i) => {
817
- const year = start + i;
818
- return {
819
- year,
820
- selected: sel.some((d) => d.getFullYear() === year),
821
- disabled: this.isYearDisabled(year),
822
- };
823
- });
824
- }, /* @ts-ignore */
825
- ...(ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []));
826
- /** @ignore Month/year cells chunked into the rows the CSS actually renders (3 and 2 columns,
827
- * see `.ui-datepicker-picker._month` / `._year`). A `role="grid"` requires its `gridcell`s to
828
- * sit inside a `role="row"`; without it the whole grid is invalid ARIA and screen readers get
829
- * no row structure to walk. Keep the chunk sizes in step with the SCSS column counts. */
830
- this.monthRows = computed(() => chunk(this.months(), 3), /* @ts-ignore */
831
- ...(ngDevMode ? [{ debugName: "monthRows" }] : /* istanbul ignore next */ []));
832
- /** @ignore Year-picker rows — 2 columns, see `.ui-datepicker-picker._year`. */
833
- this.yearRows = computed(() => chunk(this.years(), 2), /* @ts-ignore */
834
- ...(ngDevMode ? [{ debugName: "yearRows" }] : /* istanbul ignore next */ []));
835
- /** @ignore Hours as shown in the 12h stepper (1–12). */
836
- this.displayHours = computed(() => {
837
- if (this.hourFormat() === '24')
838
- return this.hours();
839
- const h = this.hours() % 12;
840
- return h === 0 ? 12 : h;
841
- }, /* @ts-ignore */
842
- ...(ngDevMode ? [{ debugName: "displayHours" }] : /* istanbul ignore next */ []));
843
- /** @ignore */
844
- this.meridiem = computed(() => (this.hours() < 12 ? 'AM' : 'PM'), /* @ts-ignore */
845
- ...(ngDevMode ? [{ debugName: "meridiem" }] : /* istanbul ignore next */ []));
846
- /**
847
- * @ignore Whether a click on the trigger opens the panel. It does when the field isn't
848
- * typeable (`triggerReadonly`: the field then *is* the button), and when `showIcon` is off
849
- * (no calendar toggle left — without this, nothing would open the panel with a mouse).
850
- *
851
- * On a typeable field it does NOT (FSHSP-180). The panel is an overlay with a permanent
852
- * backdrop, so an open panel swallows every further click on the field: the first click
853
- * placed the caret, the next one lost focus without moving it — correcting a single segment
854
- * with the mouse was impossible. Opening also live-commits the typed text through
855
- * `previewTyped`, which disarms the auto-"/" mask mid-entry (see `typingSlots`). The icon,
856
- * `↓` and typing are unaffected.
857
- */
858
- this.openOnTriggerClick = computed(() => this.triggerReadonly() || !this.showIcon() || this.showOnFocus(), /* @ts-ignore */
859
- ...(ngDevMode ? [{ debugName: "openOnTriggerClick" }] : /* istanbul ignore next */ []));
860
- /** @ignore Zero-padded labels for the steppers. */
861
- this.hoursLabel = computed(() => this.pad(this.hourFormat() === '12' ? this.displayHours() : this.hours()), /* @ts-ignore */
862
- ...(ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []));
863
- this.minutesLabel = computed(() => this.pad(this.minutes()), /* @ts-ignore */
864
- ...(ngDevMode ? [{ debugName: "minutesLabel" }] : /* istanbul ignore next */ []));
865
- /** @ignore Raw digits while a time field is being typed in; `null` when not editing. */
866
- this.hoursDraft = signal(null, /* @ts-ignore */
867
- ...(ngDevMode ? [{ debugName: "hoursDraft" }] : /* istanbul ignore next */ []));
868
- this.minutesDraft = signal(null, /* @ts-ignore */
869
- ...(ngDevMode ? [{ debugName: "minutesDraft" }] : /* istanbul ignore next */ []));
870
- /** @ignore Text rendered in a time field: the draft while typing, the padded label otherwise. */
871
- this.hoursValue = computed(() => this.hoursDraft() ?? this.hoursLabel(), /* @ts-ignore */
872
- ...(ngDevMode ? [{ debugName: "hoursValue" }] : /* istanbul ignore next */ []));
873
- this.minutesValue = computed(() => this.minutesDraft() ?? this.minutesLabel(), /* @ts-ignore */
874
- ...(ngDevMode ? [{ debugName: "minutesValue" }] : /* istanbul ignore next */ []));
875
- /** @ignore Accepted hours range (the 12h clock shows 1–12). */
876
- this.hourBounds = computed(() => this.hourFormat() === '12' ? { min: 1, max: 12 } : { min: 0, max: 23 }, /* @ts-ignore */
877
- ...(ngDevMode ? [{ debugName: "hourBounds" }] : /* istanbul ignore next */ []));
878
- /** @ignore The hours/minutes fields accept typing. */
879
- this.timeEditable = computed(() => this.editableTime() && !this.isDisabled() && !this.readonly(), /* @ts-ignore */
880
- ...(ngDevMode ? [{ debugName: "timeEditable" }] : /* istanbul ignore next */ []));
881
- /** @ignore The time steppers (chevrons + AM/PM toggle) accept interaction — unlike
882
- * `timeEditable`, not gated on `editableTime` (the steppers stay usable in
883
- * `StepperOnlyTime`-style configs; only `disabled`/`readonly` freeze them). */
884
- this.timeControlsEnabled = computed(() => !this.isDisabled() && !this.readonly(), /* @ts-ignore */
885
- ...(ngDevMode ? [{ debugName: "timeControlsEnabled" }] : /* istanbul ignore next */ []));
886
- // Never carry an open panel over to the next page (the field can live in
887
- // an app shell that survives the navigation).
888
- closeOnNavigation(() => this.close(false));
889
- // `showOnFocus`: open on a user-initiated focus of the trigger. Driven straight off the
890
- // FocusMonitor stream rather than the field's own `(focus)`, the origin has to be known
891
- // before deciding, and this way there is no listener-ordering question to get wrong.
892
- effect((onCleanup) => {
893
- const el = this.triggerInput()?.nativeInputElement();
894
- if (!el)
895
- return;
896
- const sub = this.focusMonitor.monitor(el).subscribe((origin) => {
897
- // `null` = blur. `'program'` = not a user gesture. And `suppressFocusOpen` covers the
898
- // focus WE give back on close, which the monitor still attributes to whatever gesture
899
- // triggered that close ('keyboard' for Escape, 'mouse' for a day click). A focus event on
900
- // a field without focus is the one Chrome sends along with its autofill.
901
- if (!origin || origin === 'program' || this.suppressFocusOpen || !hasFocus(el))
902
- return;
903
- if (this.showOnFocus())
904
- this.openFrom('focus');
905
- });
906
- onCleanup(() => {
907
- sub.unsubscribe();
908
- this.focusMonitor.stopMonitoring(el);
909
- });
910
- });
911
- // A press is dismissive only from where it STARTED. Released elsewhere, the browser
912
- // dispatches the click on the common ancestor of both targets, which the overlay reports as
913
- // an outside click: pressing in the field, with the panel opening under the cursor, would
914
- // close it again on release. Listening for the whole lifetime and not just while open is
915
- // what makes that very press catchable, since it precedes the opening.
916
- effect((onCleanup) => {
917
- if (this.inline())
918
- return;
919
- const record = (event) => (this.pressOrigin = event.target);
920
- this.doc.addEventListener('pointerdown', record, true);
921
- onCleanup(() => {
922
- this.doc.removeEventListener('pointerdown', record, true);
923
- this.pressOrigin = null;
924
- });
925
- });
926
- // Keep time signals in sync with the (first) value.
927
- effect(() => {
928
- const first = this.firstSelectedFrom(this.internalValue() ?? null);
929
- untracked(() => {
930
- if (first) {
931
- this.hours.set(first.getHours());
932
- this.minutes.set(first.getMinutes());
933
- }
934
- });
935
- });
936
- }
937
- writeValue(value) {
938
- this.typedValue.set(null);
939
- this.hoursDraft.set(null);
940
- this.minutesDraft.set(null);
941
- const internal = this.toInternalValue(value ?? null);
942
- this.internalValue.set(internal);
943
- this.modelValue.set(value ?? undefined);
944
- const first = this.firstSelectedFrom(internal);
945
- if (first) {
946
- this.viewDate.set(firstOfMonth(first));
947
- this.focusedDate.set(startOfDay(first));
948
- this.focusedMonthIndex.set(first.getMonth());
949
- this.focusedYear.set(first.getFullYear());
950
- }
951
- }
952
- // --- Panel open/close ------------------------------------------------
953
- /**
954
- * @param viaIcon Whether this open was specifically triggered by the calendar icon (vs.
955
- * clicking the field itself, or a keyboard shortcut) — see the rove-into-grid comment below.
956
- */
957
- open(viaIcon = false) {
958
- this.openFrom(viaIcon ? 'icon' : 'field');
959
- }
960
- /** @ignore Real implementation of {@link open}, keyed on the full {@link DatepickerOpenOrigin}
961
- * (the public `open()` only ever expresses two of the three). */
962
- openFrom(origin) {
963
- if (this.inline() || this.isDisabled() || this.readonly() || this.panelOpen())
964
- return;
965
- const base = this.firstSelectedFrom(this.internalValue() ?? null) ?? startOfDay(new Date());
966
- this.viewDate.set(firstOfMonth(base));
967
- this.currentView.set(this.view());
968
- this.focusedDate.set(this.clampToRange(startOfDay(base)));
969
- this.focusedMonthIndex.set(base.getMonth());
970
- this.focusedYear.set(base.getFullYear());
971
- this.overlayOrigin.set(this.resolveOverlayOrigin());
972
- // Before `panelOpen`: the overlay reads `hasBackdrop` when it attaches, not after.
973
- // `showOnFocus` makes the panel a popup whichever way it was opened, so the field never
974
- // gets two different behaviours depending on how it got there.
975
- this.nonModal.set(origin === 'focus' || this.showOnFocus());
976
- this.panelOpen.set(true);
977
- this.opened.emit();
978
- // Keep focus in the input whenever it's typeable; only rove into the grid when it isn't
979
- // (`triggerReadonly`) or when opened via the icon specifically (`viaIcon` — "I want the
980
- // grid"). Used to key off `selectionMode() !== 'single'` instead, which broke once `range`
981
- // got its own live mask: back then the field's own click ALSO called `open()` (now gated,
982
- // see `onTriggerClick`), so roving on every non-`single` mode stole focus back out of the
983
- // field the moment you clicked it to type.
984
- // Never on `'focus'`: moving the focus as a *consequence* of focusing the field is a WCAG
985
- // 3.2.1 change of context. `↓` is how the user asks for the grid there.
986
- if (origin !== 'focus' &&
987
- this.showCalendar() &&
988
- (this.triggerReadonly() || origin === 'icon')) {
989
- if (this.currentView() === 'date')
990
- this.queueDayFocus();
991
- else if (this.currentView() === 'month')
992
- this.queueMonthFocus();
993
- else
994
- this.queueYearFocus();
995
- }
996
- }
997
- close(focusTrigger = true) {
998
- if (!this.panelOpen())
999
- return;
1000
- this.panelOpen.set(false);
1001
- this.emitTouch();
1002
- this.closed.emit();
1003
- if (focusTrigger) {
1004
- // Guard the whole (synchronous) focus dispatch: with `showOnFocus` the returning focus
1005
- // would otherwise re-open the panel we are closing, on Escape and on every selection.
1006
- this.suppressFocusOpen = true;
1007
- this.triggerInput()?.focus();
1008
- this.suppressFocusOpen = false;
1009
- }
1010
- }
1011
- /** @ignore */
1012
- toggle(viaIcon = false) {
1013
- this.panelOpen() ? this.close() : this.open(viaIcon);
1014
- }
1015
- /** @ignore Right action: clear when clearable + set, otherwise toggle the panel (via the icon —
1016
- * see `open`'s `viaIcon`). `stopPropagation` keeps the click from bubbling to the field (which
1017
- * would otherwise also call `open()`, without `viaIcon`, right behind this one). */
1018
- onIconClick(event) {
1019
- event.stopPropagation();
1020
- if (this.showClearButton())
1021
- this.clear();
1022
- else
1023
- this.toggle(true);
1024
- }
1025
- /** @ignore Click anywhere on the trigger (label, field or format hint — they share the wrapper). */
1026
- onTriggerClick() {
1027
- if (!this.openOnTriggerClick())
1028
- return;
1029
- // The click may have landed on the label or the format hint, leaving focus outside the
1030
- // wrapper — `Escape`/`↓` are bound there, so they'd be dead while the panel is open. A click
1031
- // on the field itself is already focused by then, so this never moves the caret.
1032
- if (!this.triggerReadonly())
1033
- this.triggerInput()?.focus();
1034
- // Same origin as the focus that (usually) just opened it, so a click never upgrades a
1035
- // non-modal panel into a modal one mid-interaction.
1036
- this.openFrom('field');
1037
- }
1038
- /** @ignore Keys typed anywhere in the trigger wrapper. */
1039
- onTriggerKeydown(event) {
1040
- // The overlay sits after the trigger in the DOM, so an open panel would capture the
1041
- // tabulation. Closing it late is worse: the focus lands in a panel that detaches under it,
1042
- // hence the synchronous refresh. The grid is entered with `↓`, per the APG combobox pattern.
1043
- if (event.key === 'Tab' &&
1044
- this.nonModal() &&
1045
- this.panelOpen() &&
1046
- this.tabLeavesTrigger(event)) {
1047
- this.close(false);
1048
- this.cdr.detectChanges();
1049
- return;
1050
- }
1051
- // The wrapper also catches keys pressed on the trigger's own action button. It is a native
1052
- // `<button>`: `Enter` and `Space` must reach it. Only `Escape` stays ours.
1053
- const inputEl = this.triggerInput()?.nativeInputElement();
1054
- if (inputEl && event.target !== inputEl) {
1055
- this.handleEscape(event);
1056
- return;
1057
- }
1058
- // `Alt+↑` closes from either flavour of trigger.
1059
- if (event.key === 'ArrowUp' && event.altKey) {
1060
- event.preventDefault();
1061
- this.close();
1062
- return;
1063
- }
1064
- // Typeable trigger: let printable keys through, only intercept nav/commit.
1065
- if (!this.triggerReadonly()) {
1066
- if (event.key === 'ArrowDown') {
1067
- event.preventDefault();
1068
- this.open();
1069
- this.queueDayFocus();
1070
- }
1071
- else if (event.key === 'Enter') {
1072
- event.preventDefault();
1073
- this.commitTyped();
1074
- if (this.panelOpen() && this.closeOnSelect() && !this.showTime())
1075
- this.close(false);
1076
- }
1077
- else {
1078
- this.handleEscape(event);
1079
- }
1080
- return;
1081
- }
1082
- if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') {
1083
- event.preventDefault();
1084
- this.open();
1085
- }
1086
- else {
1087
- this.handleEscape(event);
1088
- }
1089
- }
1090
- /** @ignore `Escape` is consumed only when it really closes the panel. A closed one lets it
1091
- * bubble, so a parent dialog stays reachable by the same key. */
1092
- handleEscape(event) {
1093
- if (event.key !== 'Escape' || !this.panelOpen())
1094
- return;
1095
- event.preventDefault();
1096
- event.stopPropagation();
1097
- this.close();
1098
- }
1099
- /**
1100
- * @ignore Track the raw text as the user types; live-preview the open panel. When a typing
1101
- * mask applies (see `typingSlots`), auto-insert "/" as soon as a segment is complete (same
1102
- * pattern as a card-expiry field) and reposition the caret accordingly.
1103
- */
1104
- onTriggerInput(value) {
1105
- if (this.triggerReadonly())
1106
- return;
1107
- const el = this.triggerInput()?.nativeInputElement();
1108
- // Written by the browser without focus: no blur/Enter will follow to commit it.
1109
- if (el && !hasFocus(el)) {
1110
- this.typedValue.set(value);
1111
- this.commitTyped();
1112
- // A reverted fill renders the same text as before it, which the binding would skip.
1113
- el.value = this.displayValue();
1114
- return;
1115
- }
1116
- const slots = this.typingSlots();
1117
- if (!slots) {
1118
- this.typedValue.set(value);
1119
- // The mask is off because a value already exists, or an in-place edit suspended it (see
1120
- // `typingSlots`) — but the field was just emptied by hand, with no blur/Enter to go through
1121
- // `commitTyped`'s own clear. Commit it right here instead of waiting for a commit that may
1122
- // never come: `hasValue()` flips to `false` for real and the suspension lifts, so
1123
- // `typingSlots()` re-arms the mask on the very next keystroke, for whatever fresh date
1124
- // comes next (FSHSP-118).
1125
- if (!value.trim()) {
1126
- this.maskSuspended.set(false);
1127
- if (this.hasValue())
1128
- this.clear();
1129
- }
1130
- if (this.panelOpen())
1131
- this.previewTyped();
1132
- return;
1133
- }
1134
- const caret = el?.selectionStart ?? value.length;
1135
- // Number of data characters located BEFORE the caret (stable anchor, same trick as ui-input-mask).
1136
- const dataBeforeCaret = extractMaskData(value.slice(0, caret)).length;
1137
- const newData = extractMaskData(value);
1138
- // Editing INSIDE the text (data still sits after the caret) rather than appending at its
1139
- // tail: the mask can only re-derive the whole field from one flat digit stream, so re-running
1140
- // it here re-slices every following segment by however much this edit grew or shrank —
1141
- // replacing the month "07" with a single "1" turned "08/07/2026" into "08/12/026", the year
1142
- // silently losing a digit (FSHSP-179). Give the mask up for the rest of the entry instead —
1143
- // exactly what `allowInput` already promises once a value exists: plain text, parsed on
1144
- // blur/Enter. For the rest of the entry, not just this keystroke: the digits still to come
1145
- // belong to the segment being fixed, and re-arming under the caret would shift them again.
1146
- if (dataBeforeCaret < newData.length) {
1147
- this.maskSuspended.set(true);
1148
- this.typedValue.set(value);
1149
- if (this.panelOpen())
1150
- this.previewTyped();
1151
- return;
1152
- }
1153
- // A deletion (Backspace/Delete/selection-clear) leaves only ALREADY-valid digits behind —
1154
- // re-running the bounds check against them (meant to reject a just-typed invalid leading
1155
- // digit, e.g. "8" can't start a 1-31 day) can instead skip a still-valid residual one and
1156
- // misalign every segment after it (FSHSP-118: only the year, which carries no bound, always
1157
- // survived editing untouched). Comparing data lengths (not `event.inputType`, unavailable
1158
- // here) distinguishes typing/pasting (grows or holds, still bounds-checked) from deleting
1159
- // (shrinks, bounds-checked only up to the final blur/Enter parse — see `finalizeParsed`).
1160
- // Baseline is `displayValue()` (what's actually shown before this edit — typed text OR a
1161
- // calendar-committed date, `typedValue` alone would miss the latter), read before any
1162
- // signal write below still reflects the state.
1163
- const enforceBounds = newData.length >= extractMaskData(this.displayValue()).length;
1164
- const { text, tokenIndices, dataEnd } = autoFormatSegments(slots, newData, { enforceBounds });
1165
- this.typedValue.set(text);
1166
- if (el) {
1167
- el.value = text;
1168
- // A deletion (!enforceBounds) whose caret sat at/past all remaining data (editing at the
1169
- // tail, by far the common case — see `enforceBounds` above) always lands on `dataEnd`,
1170
- // never on `caretForMask`'s result: that function answers "where's the next slot to type
1171
- // INTO", which for a just-emptied segment is the position right after its
1172
- // eagerly-auto-inserted trailing separator — landing there makes the very next Backspace
1173
- // delete that decorative separator (silently re-inserted next render) instead of the
1174
- // segment's last digit, so deleting looks stuck one keystroke short forever (FSHSP-118).
1175
- // A mid-string deletion (more data still sits after the caret) falls back to the normal
1176
- // computation unchanged — still an approximation (see the class doc), just not this trap.
1177
- const atTail = dataBeforeCaret >= newData.length;
1178
- const pos = !enforceBounds && atTail ? dataEnd : caretForMask(tokenIndices, dataBeforeCaret, dataEnd);
1179
- el.setSelectionRange(pos, pos);
1180
- }
1181
- if (this.panelOpen())
1182
- this.previewTyped();
1183
- }
1184
- /** @ignore Whether `text` already has its time portion too, when `showTime` requires one.
1185
- * `previewTyped` needs this: without it, `hasValue()` (and the mask) flipped off the moment
1186
- * day/month/year were typed, before a single time digit — the next digit then glued onto the
1187
- * year with no mask to insert "HH:MM" (FSHSP-118). `commitTyped` doesn't use this: a date typed
1188
- * and blurred without a time is still a legitimate commit (time defaults to the steppers). */
1189
- hasCompleteTimeIfNeeded(text) {
1190
- if (!this.showTime() || this.view() !== 'date')
1191
- return true;
1192
- const groups = text.match(/\d+/g) ?? [];
1193
- return groups.length >= this.activeFields().length + 2;
1194
- }
1195
- /**
1196
- * @ignore Reflect a fully-typed date (or `range`/`multiple` set) in the open panel
1197
- * (navigate + highlight) without reformatting the field, so the caret stays put while typing.
1198
- */
1199
- previewTyped() {
1200
- const raw = this.typedValue();
1201
- if (raw === null || !raw.trim())
1202
- return;
1203
- if (this.selectionMode() === 'single' && !this.hasCompleteTimeIfNeeded(raw.trim()))
1204
- return;
1205
- const picked = this.parseTypedValue(raw.trim(), true);
1206
- if (!picked)
1207
- return;
1208
- const first = Array.isArray(picked) ? picked[0] : picked;
1209
- // Update the model (drives the selected-day highlight + live value) but keep
1210
- // `typedValue` so `displayValue` still returns the raw text (no caret jump).
1211
- this.internalValue.set(picked);
1212
- const external = this.toExternalValue(picked);
1213
- this.modelValue.set(external ?? undefined);
1214
- this.emitChange(external);
1215
- this.valueChange.emit(external);
1216
- this.viewDate.set(firstOfMonth(first));
1217
- this.focusedDate.set(startOfDay(first));
1218
- }
1219
- /** @ignore Parse the typed text on blur, then forward the blur. */
1220
- onTriggerBlur(event) {
1221
- this.commitTyped();
1222
- const next = event.relatedTarget;
1223
- if (!this.panelContains(next))
1224
- this.emitTouch();
1225
- this.inputBlur.emit(event);
1226
- }
1227
- /**
1228
- * @ignore Focus leaving the trigger altogether. A non-modal panel has neither backdrop nor
1229
- * focus trap, so tabbing on to the next field is a dismissal that nothing else would perform
1230
- */
1231
- onTriggerFocusOut(event) {
1232
- if (!this.nonModal() || !this.panelOpen())
1233
- return;
1234
- const next = event.relatedTarget;
1235
- if (this.panelContains(next) || this.triggerContains(next))
1236
- return;
1237
- this.close(false);
1238
- }
1239
- /** @ignore Focus leaving a non-modal panel altogether (`Tab` out of the grid) — same
1240
- * dismissal as {@link onTriggerBlur}, from the other side. */
1241
- onPanelFocusOut(event) {
1242
- if (this.inline() || !this.nonModal() || !this.panelOpen())
1243
- return;
1244
- const next = event.relatedTarget;
1245
- if (!next)
1246
- return;
1247
- if (this.panelContains(next) || this.triggerContains(next))
1248
- return;
1249
- this.close(false);
1250
- }
1251
- /** @ignore Pointer landing outside the overlay. A non-modal panel leaves the trigger live
1252
- * underneath, and a press there must place the caret, not dismiss the panel it would then
1253
- * immediately re-open. */
1254
- onOutsideClick(event) {
1255
- const origin = this.pressOrigin ?? event.target;
1256
- if (this.triggerContains(origin) || this.panelContains(origin))
1257
- return;
1258
- this.close(false);
1259
- }
1260
- /** @ignore Whether this `Tab` walks out of the trigger, rather than between the field and its
1261
- * own action button (at most two stops, so an exact list beats any heuristic). */
1262
- tabLeavesTrigger(event) {
1263
- const wrapper = this.triggerWrapperEl()?.nativeElement;
1264
- if (!wrapper)
1265
- return true;
1266
- const stops = Array.from(wrapper.querySelectorAll('input:not([disabled]), button:not([disabled])')).filter((el) => el.tabIndex >= 0);
1267
- const index = stops.indexOf(event.target);
1268
- if (index === -1)
1269
- return true;
1270
- return event.shiftKey ? index === 0 : index === stops.length - 1;
1271
- }
1272
- /** @ignore Pressing the panel's own chrome must not pull the focus out of the field: a
1273
- * non-modal panel would be dismissed by its own focusout. Its controls keep the default. */
1274
- onPanelMousedown(event) {
1275
- if (!this.nonModal())
1276
- return;
1277
- if (event.target?.closest('button, input'))
1278
- return;
1279
- event.preventDefault();
1280
- }
1281
- /** @ignore */
1282
- panelContains(node) {
1283
- return !!node && !!this.panelEl()?.nativeElement.contains(node);
1284
- }
1285
- /** @ignore */
1286
- triggerContains(node) {
1287
- return !!node && !!this.triggerWrapperEl()?.nativeElement.contains(node);
1288
- }
1289
- /** @ignore Parse and apply the typed text (single date, or `range`/`multiple` set — see
1290
- * `parseTypedValue`); revert to the previous value if invalid. */
1291
- commitTyped() {
1292
- if (this.triggerReadonly())
1293
- return;
1294
- const raw = this.typedValue();
1295
- if (raw === null)
1296
- return; // untouched
1297
- // Parsed, cleared or reverted, this commit ends the current entry: re-arm the live mask for
1298
- // the next one (`commit` does it too, for the paths that go through it).
1299
- this.maskSuspended.set(false);
1300
- const text = raw.trim();
1301
- if (!text) {
1302
- this.typedValue.set(null);
1303
- if (this.hasValue())
1304
- this.clear();
1305
- return;
1306
- }
1307
- const picked = this.parseTypedValue(text, true);
1308
- if (picked) {
1309
- this.commit(picked); // clears typedValue and reformats
1310
- const first = Array.isArray(picked) ? picked[0] : picked;
1311
- // `dateSelect` reports "which single day was just picked" — no such thing for a typed
1312
- // range/list committed all at once, so it's single-mode only (matches its `Date | string`
1313
- // output type, which couldn't carry an array anyway).
1314
- if (!Array.isArray(picked))
1315
- this.dateSelect.emit(this.serializeValue(picked));
1316
- this.viewDate.set(firstOfMonth(first));
1317
- this.focusedDate.set(startOfDay(first));
1318
- }
1319
- else {
1320
- this.typedValue.set(null); // revert: displayValue reformats the current value
1321
- }
1322
- }
1323
- /**
1324
- * @ignore Custom parser when provided, otherwise the locale-aware numeric parser.
1325
- * `requireComplete` gates the default parser to fully-typed dates (custom
1326
- * parsers decide completeness themselves).
1327
- */
1328
- parseTyped(text, requireComplete = false) {
1329
- const custom = this.parseDate();
1330
- return custom ? custom(text) : this.defaultParse(text, requireComplete);
1331
- }
1332
- /**
1333
- * @ignore Parses typed text into whatever shape the current `selectionMode` commits: a single
1334
- * `Date` for `single`, a `Date[]` for `range`/`multiple` (see `parseTypedMulti`). `null` means
1335
- * "not a complete, enabled value for this mode" — the caller reverts.
1336
- */
1337
- parseTypedValue(text, requireComplete) {
1338
- if (this.selectionMode() === 'single') {
1339
- const parsed = this.parseTyped(text, requireComplete);
1340
- return parsed && !this.isParsedDisabled(parsed) ? parsed : null;
1341
- }
1342
- return this.parseTypedMulti(text, requireComplete);
1343
- }
1344
- /** @ignore `range`/`multiple` typed entry (FSHSP-118): splits via `splitTypedSegments`, parses
1345
- * each part with `parseTyped` (a custom `parseDate` applies per part, like `dateFormat` does
1346
- * per date on display). `range` needs exactly 2 parts, reordered chronologically; `multiple`
1347
- * takes any count, deduped. One bad/disabled part fails the whole thing. Always `startOfDay` —
1348
- * no `showTime` support here. */
1349
- parseTypedMulti(text, requireComplete) {
1350
- const mode = this.selectionMode();
1351
- const sep = mode === 'range' ? RANGE_SEPARATOR : MULTIPLE_SEPARATOR;
1352
- const parts = this.splitTypedSegments(text, sep);
1353
- if (mode === 'range' && parts.length !== 2)
1354
- return null;
1355
- if (mode === 'multiple' && parts.length < 1)
1356
- return null;
1357
- const parsed = parts.map((p) => this.parseTyped(p, requireComplete));
1358
- if (parsed.some((d) => d === null || this.isParsedDisabled(d)))
1359
- return null;
1360
- const dates = parsed.map(startOfDay);
1361
- if (mode === 'range')
1362
- return dates.sort((a, b) => a.getTime() - b.getTime());
1363
- return dates.filter((d, i) => dates.findIndex((o) => isSameDay(o, d)) === i);
1364
- }
1365
- /** @ignore Splits typed `range`/`multiple` text into per-date segments (FSHSP-118). A plain
1366
- * `text.split(sep)` breaks when a date's own formatted text contains `sep` (e.g. a `", "`
1367
- * `dateFormat` in `multiple`, or an ISO dash in `range`) — instead, a `sep` occurrence is only
1368
- * accepted as a boundary once the text before it already parses as a complete date. */
1369
- splitTypedSegments(text, sep) {
1370
- const segments = [];
1371
- let rest = text.trim();
1372
- while (rest.length) {
1373
- let boundary = -1;
1374
- let searchFrom = 0;
1375
- for (;;) {
1376
- const idx = rest.indexOf(sep, searchFrom);
1377
- if (idx === -1)
1378
- break;
1379
- if (this.parseTyped(rest.slice(0, idx), true)) {
1380
- boundary = idx;
1381
- break;
1382
- }
1383
- searchFrom = idx + 1;
1384
- }
1385
- if (boundary === -1) {
1386
- segments.push(rest.trim());
1387
- break;
1388
- }
1389
- segments.push(rest.slice(0, boundary).trim());
1390
- rest = rest.slice(boundary + sep.length).trim();
1391
- }
1392
- return segments.filter((s) => s.length > 0);
1393
- }
1394
- /**
1395
- * @ignore Locale-aware numeric parser (day/month/year order from `dateFieldOrder`).
1396
- * With `requireComplete`, returns `null` unless every component is present
1397
- * (and the year has 2 or ≥4 digits) — used for live preview to avoid jumps.
1398
- */
1399
- defaultParse(text, requireComplete = false) {
1400
- const groups = text.match(/\d+/g) ?? [];
1401
- const nums = groups.map(Number);
1402
- if (!nums.length)
1403
- return null;
1404
- const view = this.view();
1405
- if (view === 'year') {
1406
- if (requireComplete && (groups[0]?.length ?? 0) < 4)
1407
- return null;
1408
- return finalizeParsed(this.normalizeYear(nums[0]), 0, 1, 0, 0);
1409
- }
1410
- const fields = this.activeFields();
1411
- if (requireComplete) {
1412
- if (groups.length < fields.length)
1413
- return null;
1414
- const yearLen = groups[fields.indexOf('year')]?.length ?? 0;
1415
- if (yearLen !== 2 && yearLen < 4)
1416
- return null;
1417
- }
1418
- let day = 1;
1419
- let month = 0;
1420
- let year = this.viewDate().getFullYear();
1421
- fields.forEach((field, i) => {
1422
- const n = nums[i];
1423
- if (n === undefined)
1424
- return;
1425
- if (field === 'day')
1426
- day = n;
1427
- else if (field === 'month')
1428
- month = n - 1;
1429
- else
1430
- year = this.normalizeYear(n);
1431
- });
1432
- let h = this.hours();
1433
- let min = this.minutes();
1434
- if (this.showTime() && view === 'date') {
1435
- const t = nums.slice(fields.length);
1436
- if (t.length >= 1)
1437
- h = t[0];
1438
- if (t.length >= 2)
1439
- min = t[1];
1440
- if (this.hourFormat() === '12') {
1441
- if (/p/i.test(text) && h < 12)
1442
- h += 12;
1443
- if (/a/i.test(text) && h === 12)
1444
- h = 0;
1445
- }
1446
- }
1447
- return finalizeParsed(year, month, view === 'month' ? 1 : day, h, min);
1448
- }
1449
- /** @ignore 2-digit years → 2000s. */
1450
- normalizeYear(y) {
1451
- return y < 100 ? 2000 + y : y;
1452
- }
1453
- /** @ignore Range/disabled check for a parsed value, granular to the base view. */
1454
- isParsedDisabled(date) {
1455
- const v = this.view();
1456
- if (v === 'year')
1457
- return this.isYearDisabled(date.getFullYear());
1458
- if (v === 'month')
1459
- return this.isMonthDisabled(date.getFullYear(), date.getMonth());
1460
- return this.isDateDisabled(startOfDay(date));
1461
- }
1462
- // --- Header interactions --------------------------------------------
1463
- /** @ignore Click the header title → drill up (date → month → year). Single-month only. */
1464
- onHeaderClick() {
1465
- if (!this.singleMonth())
1466
- return;
1467
- const v = this.currentView();
1468
- if (v === 'date') {
1469
- this.focusedMonthIndex.set(this.viewDate().getMonth());
1470
- this.currentView.set('month');
1471
- }
1472
- else if (v === 'month') {
1473
- this.focusedYear.set(this.viewDate().getFullYear());
1474
- this.currentView.set('year');
1475
- // Last level up: the title turns `disabled` here, so the focus it was holding is about to
1476
- // be dropped on `<body>` and the grid that just appeared would answer no arrow key. Hand
1477
- // it to the roving year cell, as the drill-down transitions do.
1478
- this.queueYearFocus();
1479
- }
1480
- }
1481
- /** @ignore Prev/next arrow — steps month / year / decade depending on the view. */
1482
- onPrev() {
1483
- this.step(-1);
1484
- }
1485
- onNext() {
1486
- this.step(1);
1487
- }
1488
- /** @ignore */
1489
- step(dir) {
1490
- const v = this.currentView();
1491
- if (v === 'date')
1492
- this.changeMonth(dir);
1493
- else if (v === 'month')
1494
- this.viewDate.set(new Date(this.viewDate().getFullYear() + dir, this.viewDate().getMonth(), 1));
1495
- else
1496
- this.viewDate.set(new Date(this.viewDate().getFullYear() + dir * 10, this.viewDate().getMonth(), 1));
1497
- }
1498
- /** @ignore */
1499
- changeMonth(delta) {
1500
- const next = addMonths(this.viewDate(), delta);
1501
- this.viewDate.set(next);
1502
- this.monthChange.emit({ month: next.getMonth(), year: next.getFullYear() });
1503
- }
1504
- // --- Selection -------------------------------------------------------
1505
- /** @ignore Pick a day from the grid. */
1506
- selectDay(cell) {
1507
- if (cell.disabled || this.isDisabled() || this.readonly())
1508
- return;
1509
- const picked = new Date(cell.date);
1510
- if (this.showTime())
1511
- picked.setHours(this.hours(), this.minutes(), 0, 0);
1512
- const mode = this.selectionMode();
1513
- let value;
1514
- let complete = true;
1515
- if (mode === 'multiple') {
1516
- const arr = [...this.selectedDates()];
1517
- const idx = arr.findIndex((d) => isSameDay(d, picked));
1518
- if (idx >= 0)
1519
- arr.splice(idx, 1);
1520
- else
1521
- arr.push(picked);
1522
- value = arr;
1523
- complete = false; // multiple never auto-closes
1524
- }
1525
- else if (mode === 'range') {
1526
- const arr = this.selectedDates();
1527
- if (arr.length !== 1) {
1528
- value = [picked];
1529
- complete = false;
1530
- }
1531
- else {
1532
- value = picked < startOfDay(arr[0]) ? [picked] : [arr[0], picked];
1533
- complete = Array.isArray(value) && value.length === 2;
1534
- }
1535
- }
1536
- else {
1537
- value = picked;
1538
- }
1539
- this.commit(value);
1540
- this.dateSelect.emit(this.serializeValue(picked));
1541
- this.viewDate.set(firstOfMonth(picked));
1542
- this.focusedDate.set(startOfDay(picked));
1543
- if (this.closeOnSelect() && !this.showTime() && !this.inline() && complete)
1544
- this.close();
1545
- }
1546
- /** @ignore Month-picker / drill-down month selection. */
1547
- selectMonth(cell) {
1548
- if (cell.disabled)
1549
- return;
1550
- const d = new Date(this.viewDate().getFullYear(), cell.index, 1);
1551
- this.viewDate.set(d);
1552
- if (this.view() === 'month') {
1553
- this.commit(d);
1554
- this.dateSelect.emit(this.serializeValue(d));
1555
- if (this.closeOnSelect() && !this.showTime() && !this.inline())
1556
- this.close();
1557
- }
1558
- else {
1559
- this.currentView.set('date');
1560
- this.focusedDate.set(this.clampToRange(startOfDay(d)));
1561
- this.queueDayFocus();
1562
- }
1563
- }
1564
- /** @ignore Year-picker / drill-down year selection. */
1565
- selectYear(cell) {
1566
- if (cell.disabled)
1567
- return;
1568
- const d = new Date(cell.year, this.view() === 'year' ? 0 : this.viewDate().getMonth(), 1);
1569
- this.viewDate.set(d);
1570
- if (this.view() === 'year') {
1571
- this.commit(d);
1572
- this.dateSelect.emit(this.serializeValue(d));
1573
- if (this.closeOnSelect() && !this.showTime() && !this.inline())
1574
- this.close();
1575
- }
1576
- else {
1577
- this.currentView.set('month');
1578
- this.focusedMonthIndex.set(d.getMonth());
1579
- this.queueMonthFocus();
1580
- }
1581
- }
1582
- /** @ignore Apply the time signals to the value (single selection only). */
1583
- applyTime() {
1584
- if (this.selectionMode() !== 'single')
1585
- return;
1586
- const base = this.firstSelectedFrom(this.internalValue() ?? null) ??
1587
- startOfDay(this.timeOnly() ? new Date() : this.viewDate());
1588
- const next = new Date(base);
1589
- next.setHours(this.hours(), this.minutes(), 0, 0);
1590
- this.commit(next);
1591
- }
1592
- /** @ignore Step hours (wraps 0↔23; also flips meridiem across the 12h boundary). */
1593
- stepHours(dir) {
1594
- if (!this.timeControlsEnabled())
1595
- return;
1596
- this.hoursDraft.set(null);
1597
- this.hours.set((((this.hours() + dir) % 24) + 24) % 24);
1598
- this.applyTime();
1599
- }
1600
- /** @ignore Step minutes by `stepMinute` (wraps 0↔59). */
1601
- stepMinutes(dir) {
1602
- if (!this.timeControlsEnabled())
1603
- return;
1604
- this.minutesDraft.set(null);
1605
- const step = Math.max(1, this.stepMinute());
1606
- this.minutes.set((((this.minutes() + dir * step) % 60) + 60) % 60);
1607
- this.applyTime();
1608
- }
1609
- /** @ignore */
1610
- toggleMeridiem() {
1611
- if (!this.timeControlsEnabled())
1612
- return;
1613
- this.hoursDraft.set(null);
1614
- this.hours.set((this.hours() + 12) % 24);
1615
- this.applyTime();
1616
- }
1617
- /**
1618
- * @ignore Typing in the hours field. The digits are held as a draft (so `0` can
1619
- * be the start of `09`) and committed as soon as they form a valid hour.
1620
- */
1621
- onHoursInput(event) {
1622
- if (!this.timeEditable())
1623
- return; // read-only fields never emit natively — belt and braces
1624
- const { min, max } = this.hourBounds();
1625
- const digits = this.acceptTimeDigits(event, this.hoursValue(), max);
1626
- if (digits === null)
1627
- return;
1628
- this.hoursDraft.set(digits);
1629
- const n = Number(digits);
1630
- if (!digits || n < min || n > max)
1631
- return; // not an hour yet (e.g. `0` on a 12h clock)
1632
- this.hours.set(this.hourFormat() === '12' ? this.to24(n) : n);
1633
- this.applyTime();
1634
- }
1635
- /** @ignore Typing in the minutes field — exact value (`stepMinute` only drives the steppers). */
1636
- onMinutesInput(event) {
1637
- if (!this.timeEditable())
1638
- return;
1639
- const digits = this.acceptTimeDigits(event, this.minutesValue(), 59);
1640
- if (digits === null || !digits)
1641
- return;
1642
- this.minutesDraft.set(digits);
1643
- this.minutes.set(Number(digits));
1644
- this.applyTime();
1645
- }
1646
- /**
1647
- * @ignore Keep a time field to at most 2 digits and reject what can never be in
1648
- * range (`33`, or `13` on a 12h clock) — the field reverts to `current`, so the
1649
- * keystroke is simply refused. Returns the accepted digits, or `null` if rejected.
1650
- */
1651
- acceptTimeDigits(event, current, max) {
1652
- const el = event.target;
1653
- const digits = el.value.replace(/\D/g, '').slice(0, 2);
1654
- const accepted = !digits || Number(digits) <= max;
1655
- const text = accepted ? digits : current;
1656
- // `[value]` is a no-op whenever the bound text is unchanged → write the DOM here.
1657
- if (el.value !== text) {
1658
- el.value = text;
1659
- el.setSelectionRange(text.length, text.length);
1660
- }
1661
- return accepted ? digits : null;
1662
- }
1663
- /** @ignore 12h display hour (1–12) + the current meridiem → 24h hour. */
1664
- to24(displayed) {
1665
- return (displayed % 12) + (this.meridiem() === 'PM' ? 12 : 0);
1666
- }
1667
- /** @ignore Focusing a time field selects it, so typing replaces the value. */
1668
- onTimeFocus(event) {
1669
- event.target.select();
1670
- }
1671
- /** @ignore Leaving a time field drops the draft: the zero-padded label comes back. */
1672
- onHoursBlur() {
1673
- this.hoursDraft.set(null);
1674
- }
1675
- /** @ignore */
1676
- onMinutesBlur() {
1677
- this.minutesDraft.set(null);
1678
- }
1679
- /** @ignore ARIA spinbutton keyboard: ↑/↓ step, PageUp/PageDown ±, Enter commits. */
1680
- onHourKeydown(event) {
1681
- if (event.key === 'ArrowUp' || event.key === 'PageUp') {
1682
- event.preventDefault();
1683
- this.stepHours(1);
1684
- }
1685
- else if (event.key === 'ArrowDown' || event.key === 'PageDown') {
1686
- event.preventDefault();
1687
- this.stepHours(-1);
1688
- }
1689
- else if (event.key === 'Enter') {
1690
- event.preventDefault(); // commit in place, never submit the surrounding form
1691
- this.hoursDraft.set(null);
1692
- }
1693
- }
1694
- /** @ignore */
1695
- onMinuteKeydown(event) {
1696
- if (event.key === 'ArrowUp' || event.key === 'PageUp') {
1697
- event.preventDefault();
1698
- this.stepMinutes(1);
1699
- }
1700
- else if (event.key === 'ArrowDown' || event.key === 'PageDown') {
1701
- event.preventDefault();
1702
- this.stepMinutes(-1);
1703
- }
1704
- else if (event.key === 'Enter') {
1705
- event.preventDefault();
1706
- this.minutesDraft.set(null);
1707
- }
1708
- }
1709
- /** @ignore */
1710
- onMeridiemKeydown(event) {
1711
- if (!this.timeControlsEnabled())
1712
- return;
1713
- if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
1714
- event.preventDefault();
1715
- this.toggleMeridiem();
1716
- }
1717
- }
1718
- /** @ignore */
1719
- pad(n) {
1720
- return String(n).padStart(2, '0');
1721
- }
1722
- /** @ignore */
1723
- selectToday() {
1724
- const today = startOfDay(new Date());
1725
- if (this.isDateDisabled(today))
1726
- return;
1727
- if (this.showTime())
1728
- today.setHours(this.hours(), this.minutes(), 0, 0);
1729
- this.commit(this.selectionMode() === 'single' ? today : [today]);
1730
- this.dateSelect.emit(this.serializeValue(today));
1731
- this.viewDate.set(firstOfMonth(today));
1732
- this.focusedDate.set(today);
1733
- if (this.closeOnSelect() &&
1734
- !this.showTime() &&
1735
- !this.inline() &&
1736
- this.selectionMode() !== 'multiple')
1737
- this.close();
1738
- }
1739
- /** @ignore */
1740
- clear() {
1741
- this.commit(null);
1742
- this.cleared.emit();
1743
- }
1744
- // --- Grid keyboard navigation (roving focus, date view) ---------------
1745
- /** @ignore */
1746
- onGridKeydown(event) {
1747
- const current = this.focusedDate();
1748
- let next;
1749
- switch (event.key) {
1750
- case 'ArrowLeft':
1751
- next = addDays(current, -1);
1752
- break;
1753
- case 'ArrowRight':
1754
- next = addDays(current, 1);
1755
- break;
1756
- case 'ArrowUp':
1757
- next = addDays(current, -7);
1758
- break;
1759
- case 'ArrowDown':
1760
- next = addDays(current, 7);
1761
- break;
1762
- case 'Home':
1763
- next = addDays(current, -((current.getDay() - this.firstDayOfWeek() + 7) % 7));
1764
- break;
1765
- case 'End':
1766
- next = addDays(current, 6 - ((current.getDay() - this.firstDayOfWeek() + 7) % 7));
1767
- break;
1768
- case 'PageUp':
1769
- next = addMonths(current, event.shiftKey ? -12 : -1);
1770
- break;
1771
- case 'PageDown':
1772
- next = addMonths(current, event.shiftKey ? 12 : 1);
1773
- break;
1774
- case 'Enter':
1775
- case ' ':
1776
- event.preventDefault();
1777
- this.selectDay(this.buildDay(startOfDay(current), this.viewDate()));
1778
- return;
1779
- case 'Escape':
1780
- this.handleEscape(event);
1781
- return;
1782
- default:
1783
- return;
1784
- }
1785
- event.preventDefault();
1786
- if (!next)
1787
- return;
1788
- this.focusedDate.set(startOfDay(next));
1789
- this.ensureMonthVisible(next);
1790
- this.queueDayFocus();
1791
- }
1792
- /** @ignore The roving-focus cell. `otherMonth` cells are excluded so a date
1793
- * shown twice across adjacent panels (multi-month) yields a single tab stop. */
1794
- isFocusableDay(cell) {
1795
- return !cell.otherMonth && isSameDay(cell.date, this.focusedDate());
1796
- }
1797
- // --- Grid keyboard navigation (roving focus, month/year pickers) -------
1798
- /**
1799
- * @ignore Shared arrow/Home/End math for a fixed-size, `columns`-wide grid (the month picker's
1800
- * 12 cells / 3 columns and the year picker's 10 cells / 2 columns) — the one piece of roving-
1801
- * focus logic actually common to all three grids; `PageUp`/`PageDown`/`Enter`/`Escape` differ
1802
- * per grid (paging semantics, selecting a month vs. a year) and stay in their own handler.
1803
- * Returns `null` for a key it doesn't handle.
1804
- */
1805
- navigateGridIndex(key, current, columns, count) {
1806
- switch (key) {
1807
- case 'ArrowLeft':
1808
- return Math.max(0, current - 1);
1809
- case 'ArrowRight':
1810
- return Math.min(count - 1, current + 1);
1811
- case 'ArrowUp':
1812
- return current - columns >= 0 ? current - columns : current;
1813
- case 'ArrowDown':
1814
- return current + columns < count ? current + columns : current;
1815
- case 'Home':
1816
- return Math.floor(current / columns) * columns;
1817
- case 'End':
1818
- return Math.min(count - 1, Math.floor(current / columns) * columns + columns - 1);
1819
- default:
1820
- return null;
1821
- }
1822
- }
1823
- /** @ignore Month-picker grid: ←↑→↓/Home/End move within the 12 months (3 columns), PageUp/PageDown
1824
- * step the displayed year (Shift = ×10), Enter/Space picks the focused month. */
1825
- onMonthGridKeydown(event) {
1826
- const current = this.focusedMonthIndex();
1827
- if (event.key === 'Enter' || event.key === ' ') {
1828
- event.preventDefault();
1829
- this.selectMonth(this.months()[current]);
1830
- return;
1831
- }
1832
- if (event.key === 'Escape') {
1833
- this.handleEscape(event);
1834
- return;
1835
- }
1836
- if (event.key === 'PageUp' || event.key === 'PageDown') {
1837
- event.preventDefault();
1838
- const dir = event.key === 'PageUp' ? -1 : 1;
1839
- const years = event.shiftKey ? 10 : 1;
1840
- this.viewDate.set(new Date(this.viewDate().getFullYear() + dir * years, this.viewDate().getMonth(), 1));
1841
- this.queueMonthFocus();
1842
- return;
1843
- }
1844
- const next = this.navigateGridIndex(event.key, current, 3, 12);
1845
- if (next === null)
1846
- return;
1847
- event.preventDefault();
1848
- this.focusedMonthIndex.set(next);
1849
- this.queueMonthFocus();
1850
- }
1851
- /** @ignore Year-picker grid: ←↑→↓/Home/End move within the displayed decade (2 columns),
1852
- * PageUp/PageDown step by a decade (Shift = ×10 decades), Enter/Space picks the focused year. */
1853
- onYearGridKeydown(event) {
1854
- const current = this.focusedYear();
1855
- if (event.key === 'Enter' || event.key === ' ') {
1856
- event.preventDefault();
1857
- this.selectYear(this.years()[current - this.decadeStart()]);
1858
- return;
1859
- }
1860
- if (event.key === 'Escape') {
1861
- this.handleEscape(event);
1862
- return;
1863
- }
1864
- if (event.key === 'PageUp' || event.key === 'PageDown') {
1865
- event.preventDefault();
1866
- const dir = event.key === 'PageUp' ? -1 : 1;
1867
- const delta = (event.shiftKey ? 100 : 10) * dir;
1868
- this.viewDate.set(new Date(this.viewDate().getFullYear() + delta, this.viewDate().getMonth(), 1));
1869
- this.focusedYear.set(current + delta);
1870
- this.queueYearFocus();
1871
- return;
1872
- }
1873
- const idx = this.navigateGridIndex(event.key, current - this.decadeStart(), 2, 10);
1874
- if (idx === null)
1875
- return;
1876
- event.preventDefault();
1877
- this.focusedYear.set(this.decadeStart() + idx);
1878
- this.queueYearFocus();
1879
- }
1880
- /** @ignore The month-picker roving-focus cell. */
1881
- isFocusableMonth(cell) {
1882
- return cell.index === this.focusedMonthIndex();
1883
- }
1884
- /** @ignore The year-picker roving-focus cell. */
1885
- isFocusableYear(cell) {
1886
- return cell.year === this.focusedYear();
1887
- }
1888
- /** @ignore Shift the visible month window just enough to contain `date`. */
1889
- ensureMonthVisible(date) {
1890
- const count = Math.max(1, this.numberOfMonths());
1891
- const start = firstOfMonth(this.viewDate());
1892
- const end = addMonths(start, count - 1);
1893
- const month = firstOfMonth(date);
1894
- if (month < start)
1895
- this.viewDate.set(month);
1896
- else if (month > end)
1897
- this.viewDate.set(addMonths(month, 1 - count));
1898
- }
1899
- // --- Internals -------------------------------------------------------
1900
- /** @ignore Sole "normal" write path: takes internal Date(s), serializes to the public ISO
1901
- * string(s) right here, before it ever reaches `modelValue`/the CVA. Callers keep passing
1902
- * `Date`/`Date[]`/`null` exactly as before — the ISO contract lives entirely in this method. */
1903
- commit(value) {
1904
- this.typedValue.set(null); // any committed value re-formats the trigger
1905
- this.maskSuspended.set(false); // …and re-arms the live mask (see `typingSlots`)
1906
- this.internalValue.set(value ?? null);
1907
- const external = this.toExternalValue(value ?? null);
1908
- this.modelValue.set(external ?? undefined);
1909
- this.emitChange(external);
1910
- this.valueChange.emit(external);
1911
- }
1912
- /** @ignore Build a day-cell descriptor with its selection/range flags. */
1913
- buildDay(date, viewMonth) {
1914
- const today = startOfDay(new Date());
1915
- const mode = this.selectionMode();
1916
- const sel = this.selectedDates();
1917
- let selected = false;
1918
- let rangeStart = false;
1919
- let rangeEnd = false;
1920
- let inRange = false;
1921
- if (mode === 'range') {
1922
- const [s, e] = sel;
1923
- if (s && isSameDay(date, s)) {
1924
- rangeStart = true;
1925
- selected = true;
1926
- }
1927
- if (e && isSameDay(date, e)) {
1928
- rangeEnd = true;
1929
- selected = true;
1930
- }
1931
- if (s && e && date > startOfDay(s) && date < startOfDay(e))
1932
- inRange = true;
1933
- }
1934
- else {
1935
- selected = sel.some((d) => isSameDay(d, date));
1936
- }
1937
- return {
1938
- date,
1939
- day: date.getDate(),
1940
- month: date.getMonth(),
1941
- year: date.getFullYear(),
1942
- otherMonth: date.getMonth() !== viewMonth.getMonth(),
1943
- today: isSameDay(date, today),
1944
- selected,
1945
- disabled: this.isDateDisabled(date),
1946
- ariaLabel: this.dayAriaFormatter().format(date),
1947
- rangeStart,
1948
- rangeEnd,
1949
- inRange,
1950
- ts: date.getTime(),
1951
- };
1952
- }
1953
- /** @ignore 6×7 grid for a given month, incl. adjacent-month spill-over. */
1954
- buildMonthWeeks(monthDate) {
1955
- const first = firstOfMonth(monthDate);
1956
- const offset = (first.getDay() - this.firstDayOfWeek() + 7) % 7;
1957
- const gridStart = addDays(first, -offset);
1958
- return Array.from({ length: 6 }, (_, w) => Array.from({ length: 7 }, (_, d) => this.buildDay(addDays(gridStart, w * 7 + d), monthDate)));
1959
- }
1960
- /** @ignore */
1961
- resolveOverlayOrigin() {
1962
- const host = this.triggerRef()?.nativeElement;
1963
- // Anchor on the bordered input box so a helper message below doesn't push the panel down.
1964
- return host?.querySelector('.ui-field-box') ?? host ?? null;
1965
- }
1966
- /** @ignore Focus the roving-tabindex cell matching `selector`, once the DOM reflects the
1967
- * just-updated `focusedDate`/`focusedMonthIndex`/`focusedYear` signal. */
1968
- queueCellFocus(selector) {
1969
- if (typeof requestAnimationFrame === 'undefined')
1970
- return;
1971
- requestAnimationFrame(() => {
1972
- this.panelEl()?.nativeElement.querySelector(selector)?.focus();
1973
- });
1974
- }
1975
- /** @ignore */
1976
- queueDayFocus() {
1977
- this.queueCellFocus('.ui-datepicker-day._focusable');
1978
- }
1979
- /** @ignore */
1980
- queueMonthFocus() {
1981
- this.queueCellFocus('.ui-datepicker-picker._month .ui-datepicker-cell._focusable');
1982
- }
1983
- /** @ignore */
1984
- queueYearFocus() {
1985
- this.queueCellFocus('.ui-datepicker-picker._year .ui-datepicker-cell._focusable');
1986
- }
1987
- /** @ignore */
1988
- clampToRange(date) {
1989
- const min = this.resolvedMinDate();
1990
- const max = this.resolvedMaxDate();
1991
- if (min && date < startOfDay(min))
1992
- return startOfDay(min);
1993
- if (max && date > startOfDay(max))
1994
- return startOfDay(max);
1995
- return date;
1996
- }
1997
- /** @ignore */
1998
- isDateDisabled(date) {
1999
- const min = this.resolvedMinDate();
2000
- const max = this.resolvedMaxDate();
2001
- if (min && date < startOfDay(min))
2002
- return true;
2003
- if (max && date > startOfDay(max))
2004
- return true;
2005
- if ((this.disabledDays() ?? []).includes(date.getDay()))
2006
- return true;
2007
- return this.resolvedDisabledDates().some((d) => isSameDay(d, date));
2008
- }
2009
- /** @ignore Whole month out of [min, max]. */
2010
- isMonthDisabled(year, month) {
2011
- const min = this.resolvedMinDate();
2012
- const max = this.resolvedMaxDate();
2013
- if (min && new Date(year, month + 1, 0) < startOfDay(min))
2014
- return true;
2015
- if (max && new Date(year, month, 1) > startOfDay(max))
2016
- return true;
2017
- return false;
2018
- }
2019
- /** @ignore Whole year out of [min, max]. */
2020
- isYearDisabled(year) {
2021
- const min = this.resolvedMinDate();
2022
- const max = this.resolvedMaxDate();
2023
- if (min && year < min.getFullYear())
2024
- return true;
2025
- if (max && year > max.getFullYear())
2026
- return true;
2027
- return false;
2028
- }
2029
- /** @ignore */
2030
- capitalize(s) {
2031
- return s.charAt(0).toUpperCase() + s.slice(1);
2032
- }
2033
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2034
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", 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 }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelect: "dateSelect", monthChange: "monthChange", opened: "opened", closed: "closed", cleared: "cleared", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
2035
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiDatepicker), multi: true },
2036
- ], 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 [autocomplete]=\"autocomplete()\"\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(--ui-datepicker-panel-stroke, var(--form-high-stroke-default));border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-datepicker-panel-surface, var(--form-high-surface-default));box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-datepicker-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(--ui-datepicker-nav-color, var(--informative-defaultlow-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-nav:hover{background-color:var(--ui-datepicker-nav-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-nav-color-hover, 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(--ui-datepicker-nav-focus-ring-color, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-title-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(--ui-datepicker-font-family, var(--fontfamily-base));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--ui-datepicker-title-surface-hover, 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(--ui-datepicker-title-focus-ring-color, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-cell-surface, var(--actions-low-surface-default));font-family:var(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-cell-color, var(--form-high-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-cell:active:not(:disabled){background-color:var(--ui-datepicker-cell-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--ui-datepicker-cell-surface-focus, 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(--ui-datepicker-cell-focus-ring-color, var(--actions-high-stroke-focused)) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--ui-datepicker-cell-surface-selected, var(--actions-high-surface-default));color:var(--ui-datepicker-cell-color-selected, var(--actions-high-content-default))}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-cell:disabled{color:var(--ui-datepicker-cell-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-weekday-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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-day-color, var(--form-high-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--ui-datepicker-day-surface-focus, 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(--ui-datepicker-day-focus-ring-color, 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(--ui-datepicker-day-stroke-today, var(--actions-high-stroke-default))}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--ui-datepicker-day-stroke-today-hover, var(--actions-high-stroke-hover))}.ui-datepicker-day._today:focus-visible:before{border-color:var(--ui-datepicker-day-stroke-today-focus, var(--actions-high-stroke-focused))}.ui-datepicker-day._selected{color:var(--ui-datepicker-day-color-selected, var(--actions-high-content-default))}.ui-datepicker-day._selected:before{background-color:var(--ui-datepicker-day-surface-selected, var(--actions-high-surface-default))}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--ui-datepicker-day-color-selected-hover, var(--actions-high-content-hover))}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-day._selected:focus-visible{color:var(--ui-datepicker-day-color-selected-focus, var(--actions-high-content-focused))}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--ui-datepicker-day-surface-selected-focus, 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(--ui-datepicker-range-color-hover, 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(--ui-datepicker-range-background-hover, var(--informative-highlighthigh-surface-default))}.ui-datepicker-day:disabled{color:var(--ui-datepicker-day-color-disabled, 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(--ui-datepicker-time-stroke, 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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--ui-datepicker-weight, var(--weight-bold));font-variant-numeric:tabular-nums;color:var(--ui-datepicker-time-value-color, var(--form-high-content-default));text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--ui-datepicker-time-value-surface-hover, 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(--ui-datepicker-time-value-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--ui-datepicker-time-value-color-disabled, 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(--ui-datepicker-time-btn-color, var(--form-low-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--ui-datepicker-time-btn-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-time-btn-color-hover, var(--form-high-content-hover))}.ui-datepicker-time-btn:disabled{color:var(--ui-datepicker-time-btn-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-time-colon-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(--ui-datepicker-buttonbar-stroke, 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"] }] }); }
28
+ const rows = [];
29
+ for (let i = 0; i < items.length; i += size) rows.push(items.slice(i, i + size));
30
+ return rows;
2037
31
  }
2038
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiDatepicker, decorators: [{
2039
- type: Component,
2040
- args: [{ selector: 'ui-datepicker', imports: [NgTemplateOutlet, OverlayModule, CdkTrapFocus, UiInput, UiButton, UiIcon], providers: [
2041
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiDatepicker), multi: true },
2042
- ], 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 [autocomplete]=\"autocomplete()\"\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(--ui-datepicker-panel-stroke, var(--form-high-stroke-default));border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-datepicker-panel-surface, var(--form-high-surface-default));box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-datepicker-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(--ui-datepicker-nav-color, var(--informative-defaultlow-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-nav:hover{background-color:var(--ui-datepicker-nav-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-nav-color-hover, 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(--ui-datepicker-nav-focus-ring-color, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-title-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(--ui-datepicker-font-family, var(--fontfamily-base));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--ui-datepicker-title-surface-hover, 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(--ui-datepicker-title-focus-ring-color, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-cell-surface, var(--actions-low-surface-default));font-family:var(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-cell-color, var(--form-high-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-cell:active:not(:disabled){background-color:var(--ui-datepicker-cell-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--ui-datepicker-cell-surface-focus, 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(--ui-datepicker-cell-focus-ring-color, var(--actions-high-stroke-focused)) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--ui-datepicker-cell-surface-selected, var(--actions-high-surface-default));color:var(--ui-datepicker-cell-color-selected, var(--actions-high-content-default))}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-cell:disabled{color:var(--ui-datepicker-cell-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-weekday-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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-day-color, var(--form-high-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--ui-datepicker-day-surface-focus, 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(--ui-datepicker-day-focus-ring-color, 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(--ui-datepicker-day-stroke-today, var(--actions-high-stroke-default))}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--ui-datepicker-day-stroke-today-hover, var(--actions-high-stroke-hover))}.ui-datepicker-day._today:focus-visible:before{border-color:var(--ui-datepicker-day-stroke-today-focus, var(--actions-high-stroke-focused))}.ui-datepicker-day._selected{color:var(--ui-datepicker-day-color-selected, var(--actions-high-content-default))}.ui-datepicker-day._selected:before{background-color:var(--ui-datepicker-day-surface-selected, var(--actions-high-surface-default))}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--ui-datepicker-day-color-selected-hover, var(--actions-high-content-hover))}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-day._selected:focus-visible{color:var(--ui-datepicker-day-color-selected-focus, var(--actions-high-content-focused))}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--ui-datepicker-day-surface-selected-focus, 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(--ui-datepicker-range-color-hover, 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(--ui-datepicker-range-background-hover, var(--informative-highlighthigh-surface-default))}.ui-datepicker-day:disabled{color:var(--ui-datepicker-day-color-disabled, 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(--ui-datepicker-time-stroke, 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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--ui-datepicker-weight, var(--weight-bold));font-variant-numeric:tabular-nums;color:var(--ui-datepicker-time-value-color, var(--form-high-content-default));text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--ui-datepicker-time-value-surface-hover, 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(--ui-datepicker-time-value-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--ui-datepicker-time-value-color-disabled, 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(--ui-datepicker-time-btn-color, var(--form-low-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--ui-datepicker-time-btn-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-time-btn-color-hover, var(--form-high-content-hover))}.ui-datepicker-time-btn:disabled{color:var(--ui-datepicker-time-btn-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-time-colon-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(--ui-datepicker-buttonbar-stroke, var(--form-high-stroke-default))}\n"] }]
2043
- }], 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 }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", 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', { ...{
2044
- read: ElementRef,
2045
- }, isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], triggerWrapperEl: [{ type: i0.ViewChild, args: ['triggerWrapper', { isSignal: true }] }] } });
2046
-
2047
- /*
2048
- * Public API Surface of ui-kit/ui-datepicker
2049
- */
2050
-
2051
- /**
2052
- * Generated bundle index. Do not edit.
2053
- */
2054
-
32
+ var UiDatepicker = class UiDatepicker extends BaseFormField {
33
+ firstSelectedFrom(value) {
34
+ if (!value) return null;
35
+ return (Array.isArray(value) ? value : [value]).find((d) => d instanceof Date) ?? null;
36
+ }
37
+ toIsoValue(d) {
38
+ return this.hasTimeComponent() ? toIsoDateTime(d) : toIsoDate(d);
39
+ }
40
+ fromIsoValue(s) {
41
+ return this.hasTimeComponent() ? parseIsoDateTime(s) : parseIsoDate(s);
42
+ }
43
+ serializeValue(d) {
44
+ if (this.valueType() === "iso") return this.toIsoValue(d);
45
+ return this.hasTimeComponent() ? new Date(d) : startOfDay(d);
46
+ }
47
+ parseValue(v) {
48
+ return v instanceof Date ? new Date(v) : this.fromIsoValue(v);
49
+ }
50
+ toExternalValue(value) {
51
+ if (!value) return null;
52
+ if (Array.isArray(value)) return value.map((d) => this.serializeValue(d));
53
+ return this.serializeValue(value);
54
+ }
55
+ toInternalValue(value) {
56
+ if (!value) return null;
57
+ if (Array.isArray(value)) {
58
+ const parsed = value.map((v) => this.parseValue(v)).filter((d) => d !== null);
59
+ return parsed.length ? parsed : null;
60
+ }
61
+ return this.parseValue(value);
62
+ }
63
+ formatDate(date) {
64
+ const custom = this.dateFormat();
65
+ if (custom) return custom(date);
66
+ if (this.allowInput()) {
67
+ const opts = {
68
+ day: "2-digit",
69
+ month: "2-digit",
70
+ year: "numeric"
71
+ };
72
+ if (this.showTime()) {
73
+ opts.hour = "2-digit";
74
+ opts.minute = "2-digit";
75
+ }
76
+ return new Intl.DateTimeFormat(this.resolvedLocale(), opts).format(date);
77
+ }
78
+ const options = this.showTime() ? {
79
+ dateStyle: "medium",
80
+ timeStyle: "short"
81
+ } : { dateStyle: "medium" };
82
+ return new Intl.DateTimeFormat(this.resolvedLocale(), options).format(date);
83
+ }
84
+ formatTime(date) {
85
+ const custom = this.dateFormat();
86
+ if (custom) return custom(date);
87
+ return new Intl.DateTimeFormat(this.resolvedLocale(), {
88
+ hour: "2-digit",
89
+ minute: "2-digit",
90
+ hour12: this.hourFormat() === "12"
91
+ }).format(date);
92
+ }
93
+ formatMonth(date) {
94
+ if (this.allowInput() && !this.dateFormat()) {
95
+ const yearFirst = this.dateFieldOrder().filter((f) => f !== "day")[0] === "year";
96
+ const mm = this.pad(date.getMonth() + 1);
97
+ const yyyy = String(date.getFullYear());
98
+ return yearFirst ? `${yyyy}/${mm}` : `${mm}/${yyyy}`;
99
+ }
100
+ return this.capitalize(new Intl.DateTimeFormat(this.resolvedLocale(), {
101
+ month: "long",
102
+ year: "numeric"
103
+ }).format(date));
104
+ }
105
+ constructor() {
106
+ super();
107
+ this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
108
+ this.icon = input("calendar", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
109
+ this.showIcon = input(true, {
110
+ ...ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {},
111
+ transform: booleanAttribute
112
+ });
113
+ this.iconAriaLabel = input("Ouvrir le calendrier", ...ngDevMode ? [{ debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []);
114
+ this.showClear = input(true, {
115
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
116
+ transform: booleanAttribute
117
+ });
118
+ this.valueType = input.required(...ngDevMode ? [{ debugName: "valueType" }] : /* istanbul ignore next */ []);
119
+ this.selectionMode = input("single", ...ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []);
120
+ this.view = input("date", ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
121
+ this.numberOfMonths = input(1, {
122
+ ...ngDevMode ? { debugName: "numberOfMonths" } : /* istanbul ignore next */ {},
123
+ transform: numberAttribute
124
+ });
125
+ this.minDate = input(null, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
126
+ this.maxDate = input(null, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
127
+ this.defaultViewDate = input(null, ...ngDevMode ? [{ debugName: "defaultViewDate" }] : /* istanbul ignore next */ []);
128
+ this.disabledDates = input([], ...ngDevMode ? [{ debugName: "disabledDates" }] : /* istanbul ignore next */ []);
129
+ this.disabledDays = input([], ...ngDevMode ? [{ debugName: "disabledDays" }] : /* istanbul ignore next */ []);
130
+ this.firstDayOfWeek = input(1, {
131
+ ...ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {},
132
+ transform: numberAttribute
133
+ });
134
+ this.locale = input(...ngDevMode ? [void 0, { debugName: "locale" }] : /* istanbul ignore next */ []);
135
+ this.dateFormat = input(...ngDevMode ? [void 0, { debugName: "dateFormat" }] : /* istanbul ignore next */ []);
136
+ this.allowInput = input(true, {
137
+ ...ngDevMode ? { debugName: "allowInput" } : /* istanbul ignore next */ {},
138
+ transform: booleanAttribute
139
+ });
140
+ this.parseDate = input(...ngDevMode ? [void 0, { debugName: "parseDate" }] : /* istanbul ignore next */ []);
141
+ this.showTime = input(false, {
142
+ ...ngDevMode ? { debugName: "showTime" } : /* istanbul ignore next */ {},
143
+ transform: booleanAttribute
144
+ });
145
+ this.timeOnly = input(false, {
146
+ ...ngDevMode ? { debugName: "timeOnly" } : /* istanbul ignore next */ {},
147
+ transform: booleanAttribute
148
+ });
149
+ this.hourFormat = input("24", ...ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []);
150
+ this.stepMinute = input(1, {
151
+ ...ngDevMode ? { debugName: "stepMinute" } : /* istanbul ignore next */ {},
152
+ transform: numberAttribute
153
+ });
154
+ this.editableTime = input(true, {
155
+ ...ngDevMode ? { debugName: "editableTime" } : /* istanbul ignore next */ {},
156
+ transform: booleanAttribute
157
+ });
158
+ this.showButtonBar = input(false, {
159
+ ...ngDevMode ? { debugName: "showButtonBar" } : /* istanbul ignore next */ {},
160
+ transform: booleanAttribute
161
+ });
162
+ this.ripple = input(true, {
163
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
164
+ transform: booleanAttribute
165
+ });
166
+ this.todayLabel = input("Aujourd'hui", ...ngDevMode ? [{ debugName: "todayLabel" }] : /* istanbul ignore next */ []);
167
+ this.clearLabel = input("Effacer", ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
168
+ this.formatHintLabel = input(...ngDevMode ? [void 0, { debugName: "formatHintLabel" }] : /* istanbul ignore next */ []);
169
+ this.panelAriaLabel = input("Calendrier", ...ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []);
170
+ this.prevAriaLabel = input("Précédent", ...ngDevMode ? [{ debugName: "prevAriaLabel" }] : /* istanbul ignore next */ []);
171
+ this.nextAriaLabel = input("Suivant", ...ngDevMode ? [{ debugName: "nextAriaLabel" }] : /* istanbul ignore next */ []);
172
+ this.hoursAriaLabel = input("Heures", ...ngDevMode ? [{ debugName: "hoursAriaLabel" }] : /* istanbul ignore next */ []);
173
+ this.minutesAriaLabel = input("Minutes", ...ngDevMode ? [{ debugName: "minutesAriaLabel" }] : /* istanbul ignore next */ []);
174
+ this.meridiemAriaLabel = input("AM/PM", ...ngDevMode ? [{ debugName: "meridiemAriaLabel" }] : /* istanbul ignore next */ []);
175
+ this.incrementHoursAriaLabel = input("Augmenter les heures", ...ngDevMode ? [{ debugName: "incrementHoursAriaLabel" }] : /* istanbul ignore next */ []);
176
+ this.decrementHoursAriaLabel = input("Diminuer les heures", ...ngDevMode ? [{ debugName: "decrementHoursAriaLabel" }] : /* istanbul ignore next */ []);
177
+ this.incrementMinutesAriaLabel = input("Augmenter les minutes", ...ngDevMode ? [{ debugName: "incrementMinutesAriaLabel" }] : /* istanbul ignore next */ []);
178
+ this.decrementMinutesAriaLabel = input("Diminuer les minutes", ...ngDevMode ? [{ debugName: "decrementMinutesAriaLabel" }] : /* istanbul ignore next */ []);
179
+ this.toggleMeridiemAriaLabel = input("Changer AM/PM", ...ngDevMode ? [{ debugName: "toggleMeridiemAriaLabel" }] : /* istanbul ignore next */ []);
180
+ this.inline = input(false, {
181
+ ...ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {},
182
+ transform: booleanAttribute
183
+ });
184
+ this.showOnFocus = input(false, {
185
+ ...ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {},
186
+ transform: booleanAttribute
187
+ });
188
+ this.autoFlip = input(true, {
189
+ ...ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {},
190
+ transform: booleanAttribute
191
+ });
192
+ this.closeOnSelect = input(true, {
193
+ ...ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {},
194
+ transform: booleanAttribute
195
+ });
196
+ this.panelStyleClass = input(...ngDevMode ? [void 0, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []);
197
+ this.autocomplete = input(...ngDevMode ? [void 0, { debugName: "autocomplete" }] : /* istanbul ignore next */ []);
198
+ this.valueChange = output();
199
+ this.dateSelect = output();
200
+ this.monthChange = output();
201
+ this.opened = output();
202
+ this.closed = output();
203
+ this.cleared = output();
204
+ this.inputFocus = output();
205
+ this.inputBlur = output();
206
+ this.dateTemplate = contentChild("date", ...ngDevMode ? [{ debugName: "dateTemplate" }] : /* istanbul ignore next */ []);
207
+ this.buttonBarTemplate = contentChild("buttonbar", ...ngDevMode ? [{ debugName: "buttonBarTemplate" }] : /* istanbul ignore next */ []);
208
+ this.iconTemplate = contentChild("icon", ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
209
+ this.localeId = inject(LOCALE_ID);
210
+ this.focusMonitor = inject(FocusMonitor);
211
+ this.cdr = inject(ChangeDetectorRef);
212
+ this.doc = inject(DOCUMENT);
213
+ this.pressOrigin = null;
214
+ this.triggerInput = viewChild("trigger", ...ngDevMode ? [{ debugName: "triggerInput" }] : /* istanbul ignore next */ []);
215
+ this.triggerRef = viewChild("trigger", {
216
+ ...ngDevMode ? { debugName: "triggerRef" } : /* istanbul ignore next */ {},
217
+ read: ElementRef
218
+ });
219
+ this.panelEl = viewChild("panel", ...ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []);
220
+ this.triggerWrapperEl = viewChild("triggerWrapper", ...ngDevMode ? [{ debugName: "triggerWrapperEl" }] : /* istanbul ignore next */ []);
221
+ this.panelId = `ui-datepicker-panel-${nextPanelUid++}`;
222
+ this.panelOpen = signal(false, ...ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []);
223
+ this.nonModal = signal(false, ...ngDevMode ? [{ debugName: "nonModal" }] : /* istanbul ignore next */ []);
224
+ this.suppressFocusOpen = false;
225
+ this.overlayOrigin = signal(null, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
226
+ this.viewDate = signal(startOfDay(/* @__PURE__ */ new Date()), ...ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []);
227
+ this.currentView = linkedSignal(() => this.view(), ...ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []);
228
+ this.focusedDate = signal(startOfDay(/* @__PURE__ */ new Date()), ...ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []);
229
+ this.focusedMonthIndex = signal((/* @__PURE__ */ new Date()).getMonth(), ...ngDevMode ? [{ debugName: "focusedMonthIndex" }] : /* istanbul ignore next */ []);
230
+ this.focusedYear = signal((/* @__PURE__ */ new Date()).getFullYear(), ...ngDevMode ? [{ debugName: "focusedYear" }] : /* istanbul ignore next */ []);
231
+ this.hours = signal(0, ...ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []);
232
+ this.minutes = signal(0, ...ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []);
233
+ this.typedValue = signal(null, ...ngDevMode ? [{ debugName: "typedValue" }] : /* istanbul ignore next */ []);
234
+ this.maskSuspended = signal(false, ...ngDevMode ? [{ debugName: "maskSuspended" }] : /* istanbul ignore next */ []);
235
+ this.internalValue = signal(null, ...ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []);
236
+ this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
237
+ this.overlayViewportMargin = 12;
238
+ this.todayCallback = (event) => {
239
+ event?.stopPropagation?.();
240
+ this.selectToday();
241
+ };
242
+ this.clearCallback = (event) => {
243
+ event?.stopPropagation?.();
244
+ this.clear();
245
+ };
246
+ this.resolvedLocale = computed(() => this.locale() ?? this.localeId, ...ngDevMode ? [{ debugName: "resolvedLocale" }] : /* istanbul ignore next */ []);
247
+ this.resolvedMinDate = computed(() => normalizeDateInput(this.minDate()), ...ngDevMode ? [{ debugName: "resolvedMinDate" }] : /* istanbul ignore next */ []);
248
+ this.resolvedMaxDate = computed(() => normalizeDateInput(this.maxDate()), ...ngDevMode ? [{ debugName: "resolvedMaxDate" }] : /* istanbul ignore next */ []);
249
+ this.resolvedDefaultViewDate = computed(() => normalizeDateInput(this.defaultViewDate()), ...ngDevMode ? [{ debugName: "resolvedDefaultViewDate" }] : /* istanbul ignore next */ []);
250
+ this.resolvedDisabledDates = computed(() => (this.disabledDates() ?? []).map(normalizeDateInput).filter((d) => d !== null), ...ngDevMode ? [{ debugName: "resolvedDisabledDates" }] : /* istanbul ignore next */ []);
251
+ this.triggerReadonly = computed(() => this.readonly() || !this.allowInput() || this.timeOnly(), ...ngDevMode ? [{ debugName: "triggerReadonly" }] : /* istanbul ignore next */ []);
252
+ this.singleDatePlaceholder = computed(() => {
253
+ const custom = this.dateFormat();
254
+ if (custom) return custom(probeDate());
255
+ const fr = this.resolvedLocale().toLowerCase().startsWith("fr");
256
+ const token = {
257
+ day: fr ? "jj" : "dd",
258
+ month: "mm",
259
+ year: fr ? "aaaa" : "yyyy"
260
+ };
261
+ const view = this.view();
262
+ if (view === "year") return token.year;
263
+ const opts = view === "month" ? {
264
+ month: "2-digit",
265
+ year: "numeric"
266
+ } : {
267
+ day: "2-digit",
268
+ month: "2-digit",
269
+ year: "numeric"
270
+ };
271
+ return new Intl.DateTimeFormat(this.resolvedLocale(), opts).formatToParts(probeDate()).map((p) => p.type === "day" ? token.day : p.type === "month" ? token.month : p.type === "year" ? token.year : p.value).join("");
272
+ }, ...ngDevMode ? [{ debugName: "singleDatePlaceholder" }] : /* istanbul ignore next */ []);
273
+ this.resolvedPlaceholder = computed(() => {
274
+ const explicit = this.placeholder();
275
+ if (explicit || this.triggerReadonly()) return explicit;
276
+ const single = this.singleDatePlaceholder();
277
+ const mode = this.selectionMode();
278
+ if (mode === "range") return `${single}${RANGE_SEPARATOR}${single}`;
279
+ if (mode === "multiple") return `${single}${MULTIPLE_SEPARATOR}...`;
280
+ return single;
281
+ }, ...ngDevMode ? [{ debugName: "resolvedPlaceholder" }] : /* istanbul ignore next */ []);
282
+ this.resolvedFormatHint = computed(() => {
283
+ if (this.triggerReadonly()) return null;
284
+ const explicit = this.formatHintLabel();
285
+ if (explicit === "") return null;
286
+ return explicit || `Format attendu : ${this.resolvedPlaceholder()}`;
287
+ }, ...ngDevMode ? [{ debugName: "resolvedFormatHint" }] : /* istanbul ignore next */ []);
288
+ this.formatHintId = computed(() => `${this.resolvedId()}-format-hint`, ...ngDevMode ? [{ debugName: "formatHintId" }] : /* istanbul ignore next */ []);
289
+ this.customFormatFieldOrder = computed(() => {
290
+ const custom = this.dateFormat();
291
+ if (!custom) return null;
292
+ const out = custom(probeDate());
293
+ const probed = [
294
+ ["day", firstIndexOf(out, ["22"])],
295
+ ["month", firstIndexOf(out, ["11"])],
296
+ ["year", firstIndexOf(out, ["2023", "23"])]
297
+ ];
298
+ if (probed.some(([, i]) => i === -1)) return null;
299
+ if (new Set(probed.map(([, i]) => i)).size !== probed.length) return null;
300
+ return probed.sort((a, b) => a[1] - b[1]).map(([field]) => field);
301
+ }, ...ngDevMode ? [{ debugName: "customFormatFieldOrder" }] : /* istanbul ignore next */ []);
302
+ this.dateFieldOrder = computed(() => {
303
+ const fromFormat = this.customFormatFieldOrder();
304
+ if (fromFormat) return fromFormat;
305
+ const order = new Intl.DateTimeFormat(this.resolvedLocale(), {
306
+ day: "2-digit",
307
+ month: "2-digit",
308
+ year: "numeric"
309
+ }).formatToParts(probeDate()).map((p) => p.type).filter((t) => t === "day" || t === "month" || t === "year");
310
+ return order.length === 3 ? order : [
311
+ "day",
312
+ "month",
313
+ "year"
314
+ ];
315
+ }, ...ngDevMode ? [{ debugName: "dateFieldOrder" }] : /* istanbul ignore next */ []);
316
+ this.activeFields = computed(() => this.dateFieldOrder().filter((f) => this.view() === "month" ? f !== "day" : true), ...ngDevMode ? [{ debugName: "activeFields" }] : /* istanbul ignore next */ []);
317
+ this.typingSlots = computed(() => {
318
+ const mode = this.selectionMode();
319
+ if (this.triggerReadonly() || this.view() === "year" || this.parseDate() || this.hasValue() || this.maskSuspended() || mode !== "single" && mode !== "range") return null;
320
+ const widths = {
321
+ day: "99",
322
+ month: "99",
323
+ year: "9999"
324
+ };
325
+ const bounds = {
326
+ day: {
327
+ min: 1,
328
+ max: 31
329
+ },
330
+ month: {
331
+ min: 1,
332
+ max: 12
333
+ },
334
+ year: null
335
+ };
336
+ const fields = this.activeFields();
337
+ let mask = fields.map((f) => widths[f]).join("/");
338
+ const segmentBounds = fields.map((f) => bounds[f]);
339
+ if (mode === "single" && this.showTime() && this.view() === "date") {
340
+ mask += this.hourFormat() === "12" ? " 99:99 aa" : " 99:99";
341
+ segmentBounds.push(this.hourFormat() === "12" ? {
342
+ min: 1,
343
+ max: 12
344
+ } : {
345
+ min: 0,
346
+ max: 23
347
+ }, {
348
+ min: 0,
349
+ max: 59
350
+ });
351
+ }
352
+ if (mode === "range") {
353
+ mask += RANGE_SEPARATOR + fields.map((f) => widths[f]).join("/");
354
+ segmentBounds.push(...fields.map((f) => bounds[f]));
355
+ }
356
+ return buildMaskSlots(mask, segmentBounds);
357
+ }, ...ngDevMode ? [{ debugName: "typingSlots" }] : /* istanbul ignore next */ []);
358
+ this.showPanel = computed(() => this.inline() || this.panelOpen(), ...ngDevMode ? [{ debugName: "showPanel" }] : /* istanbul ignore next */ []);
359
+ this.showCalendar = computed(() => !this.timeOnly(), ...ngDevMode ? [{ debugName: "showCalendar" }] : /* istanbul ignore next */ []);
360
+ this.singleMonth = computed(() => Math.max(1, this.numberOfMonths()) === 1, ...ngDevMode ? [{ debugName: "singleMonth" }] : /* istanbul ignore next */ []);
361
+ this.hasValue = computed(() => this.selectedDates().length > 0, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
362
+ this.rangeComplete = computed(() => {
363
+ if (this.selectionMode() !== "range") return false;
364
+ const [start, end] = this.selectedDates();
365
+ return !!start && !!end;
366
+ }, ...ngDevMode ? [{ debugName: "rangeComplete" }] : /* istanbul ignore next */ []);
367
+ this.showClearButton = computed(() => this.showClear() && this.hasValue() && !this.isDisabled() && !this.readonly() && !this.showIcon(), ...ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []);
368
+ this.triggerIcon = computed(() => {
369
+ if (this.showClearButton()) return "xmark";
370
+ if (!this.showIcon()) return void 0;
371
+ return this.timeOnly() && this.icon() === "calendar" ? "clock" : this.icon();
372
+ }, ...ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []);
373
+ this.triggerIconAriaLabel = computed(() => this.showClearButton() ? this.clearLabel() : this.iconAriaLabel(), ...ngDevMode ? [{ debugName: "triggerIconAriaLabel" }] : /* istanbul ignore next */ []);
374
+ this.triggerIconTemplate = computed(() => this.triggerIcon() ? this.iconTemplate() : void 0, ...ngDevMode ? [{ debugName: "triggerIconTemplate" }] : /* istanbul ignore next */ []);
375
+ this.selectedDates = computed(() => {
376
+ const v = this.internalValue();
377
+ if (!v) return [];
378
+ return (Array.isArray(v) ? v : [v]).filter((d) => d instanceof Date);
379
+ }, ...ngDevMode ? [{ debugName: "selectedDates" }] : /* istanbul ignore next */ []);
380
+ this.hasTimeComponent = computed(() => this.showTime() || this.timeOnly(), ...ngDevMode ? [{ debugName: "hasTimeComponent" }] : /* istanbul ignore next */ []);
381
+ this.displayValue = computed(() => {
382
+ const typed = this.typedValue();
383
+ if (typed !== null) return typed;
384
+ const dates = this.selectedDates();
385
+ if (!dates.length) return "";
386
+ const base = this.view();
387
+ if (base === "month") return this.formatMonth(dates[0]);
388
+ if (base === "year") return String(dates[0].getFullYear());
389
+ if (this.timeOnly()) return this.formatTime(dates[0]);
390
+ const mode = this.selectionMode();
391
+ if (mode === "multiple") return dates.map((d) => this.formatDate(d)).join(MULTIPLE_SEPARATOR);
392
+ if (mode === "range") return dates.map((d) => this.formatDate(d)).join(RANGE_DISPLAY_SEPARATOR);
393
+ return this.formatDate(dates[0]);
394
+ }, ...ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []);
395
+ this.decadeStart = computed(() => Math.floor(this.viewDate().getFullYear() / 10) * 10, ...ngDevMode ? [{ debugName: "decadeStart" }] : /* istanbul ignore next */ []);
396
+ this.headerLabel = computed(() => {
397
+ const v = this.currentView();
398
+ if (v === "year") return `${this.decadeStart()} - ${this.decadeStart() + 9}`;
399
+ if (v === "month") return String(this.viewDate().getFullYear());
400
+ return this.capitalize(new Intl.DateTimeFormat(this.resolvedLocale(), {
401
+ month: "long",
402
+ year: "numeric"
403
+ }).format(this.viewDate()));
404
+ }, ...ngDevMode ? [{ debugName: "headerLabel" }] : /* istanbul ignore next */ []);
405
+ this.weekDayNames = computed(() => {
406
+ const shortFmt = new Intl.DateTimeFormat(this.resolvedLocale(), { weekday: "short" });
407
+ const longFmt = new Intl.DateTimeFormat(this.resolvedLocale(), { weekday: "long" });
408
+ const sunday = new Date(2023, 0, 1);
409
+ const first = this.firstDayOfWeek();
410
+ return Array.from({ length: 7 }, (_, k) => {
411
+ const d = addDays(sunday, (first + k) % 7);
412
+ return {
413
+ short: this.capitalize(shortFmt.format(d)),
414
+ full: this.capitalize(longFmt.format(d))
415
+ };
416
+ });
417
+ }, ...ngDevMode ? [{ debugName: "weekDayNames" }] : /* istanbul ignore next */ []);
418
+ this.dayAriaFormatter = computed(() => new Intl.DateTimeFormat(this.resolvedLocale(), {
419
+ day: "numeric",
420
+ month: "long",
421
+ year: "numeric"
422
+ }), ...ngDevMode ? [{ debugName: "dayAriaFormatter" }] : /* istanbul ignore next */ []);
423
+ this.monthPanels = computed(() => {
424
+ const count = Math.max(1, this.numberOfMonths());
425
+ const start = firstOfMonth(this.viewDate());
426
+ const fmt = new Intl.DateTimeFormat(this.resolvedLocale(), {
427
+ month: "long",
428
+ year: "numeric"
429
+ });
430
+ return Array.from({ length: count }, (_, i) => {
431
+ const monthDate = addMonths(start, i);
432
+ return {
433
+ monthDate,
434
+ label: this.capitalize(fmt.format(monthDate)),
435
+ weeks: this.buildMonthWeeks(monthDate),
436
+ showPrev: i === 0,
437
+ showNext: i === count - 1
438
+ };
439
+ });
440
+ }, ...ngDevMode ? [{ debugName: "monthPanels" }] : /* istanbul ignore next */ []);
441
+ this.months = computed(() => {
442
+ const fmt = new Intl.DateTimeFormat(this.resolvedLocale(), { month: "short" });
443
+ const year = this.viewDate().getFullYear();
444
+ const sel = this.selectedDates();
445
+ return Array.from({ length: 12 }, (_, i) => ({
446
+ index: i,
447
+ label: this.capitalize(fmt.format(new Date(year, i, 1))),
448
+ selected: sel.some((d) => d.getFullYear() === year && d.getMonth() === i),
449
+ disabled: this.isMonthDisabled(year, i)
450
+ }));
451
+ }, ...ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []);
452
+ this.years = computed(() => {
453
+ const start = this.decadeStart();
454
+ const sel = this.selectedDates();
455
+ return Array.from({ length: 10 }, (_, i) => {
456
+ const year = start + i;
457
+ return {
458
+ year,
459
+ selected: sel.some((d) => d.getFullYear() === year),
460
+ disabled: this.isYearDisabled(year)
461
+ };
462
+ });
463
+ }, ...ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []);
464
+ this.monthRows = computed(() => chunk(this.months(), 3), ...ngDevMode ? [{ debugName: "monthRows" }] : /* istanbul ignore next */ []);
465
+ this.yearRows = computed(() => chunk(this.years(), 2), ...ngDevMode ? [{ debugName: "yearRows" }] : /* istanbul ignore next */ []);
466
+ this.displayHours = computed(() => {
467
+ if (this.hourFormat() === "24") return this.hours();
468
+ const h = this.hours() % 12;
469
+ return h === 0 ? 12 : h;
470
+ }, ...ngDevMode ? [{ debugName: "displayHours" }] : /* istanbul ignore next */ []);
471
+ this.meridiem = computed(() => this.hours() < 12 ? "AM" : "PM", ...ngDevMode ? [{ debugName: "meridiem" }] : /* istanbul ignore next */ []);
472
+ this.openOnTriggerClick = computed(() => this.triggerReadonly() || !this.showIcon() || this.showOnFocus(), ...ngDevMode ? [{ debugName: "openOnTriggerClick" }] : /* istanbul ignore next */ []);
473
+ this.hoursLabel = computed(() => this.pad(this.hourFormat() === "12" ? this.displayHours() : this.hours()), ...ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []);
474
+ this.minutesLabel = computed(() => this.pad(this.minutes()), ...ngDevMode ? [{ debugName: "minutesLabel" }] : /* istanbul ignore next */ []);
475
+ this.hoursDraft = signal(null, ...ngDevMode ? [{ debugName: "hoursDraft" }] : /* istanbul ignore next */ []);
476
+ this.minutesDraft = signal(null, ...ngDevMode ? [{ debugName: "minutesDraft" }] : /* istanbul ignore next */ []);
477
+ this.hoursValue = computed(() => this.hoursDraft() ?? this.hoursLabel(), ...ngDevMode ? [{ debugName: "hoursValue" }] : /* istanbul ignore next */ []);
478
+ this.minutesValue = computed(() => this.minutesDraft() ?? this.minutesLabel(), ...ngDevMode ? [{ debugName: "minutesValue" }] : /* istanbul ignore next */ []);
479
+ this.hourBounds = computed(() => this.hourFormat() === "12" ? {
480
+ min: 1,
481
+ max: 12
482
+ } : {
483
+ min: 0,
484
+ max: 23
485
+ }, ...ngDevMode ? [{ debugName: "hourBounds" }] : /* istanbul ignore next */ []);
486
+ this.timeEditable = computed(() => this.editableTime() && !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "timeEditable" }] : /* istanbul ignore next */ []);
487
+ this.timeControlsEnabled = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "timeControlsEnabled" }] : /* istanbul ignore next */ []);
488
+ closeOnNavigation(() => this.close(false));
489
+ effect((onCleanup) => {
490
+ const el = this.triggerInput()?.nativeInputElement();
491
+ if (!el) return;
492
+ const sub = this.focusMonitor.monitor(el).subscribe((origin) => {
493
+ if (!origin || origin === "program" || this.suppressFocusOpen || !hasFocus(el)) return;
494
+ if (this.showOnFocus()) this.openFrom("focus");
495
+ });
496
+ onCleanup(() => {
497
+ sub.unsubscribe();
498
+ this.focusMonitor.stopMonitoring(el);
499
+ });
500
+ });
501
+ effect((onCleanup) => {
502
+ if (this.inline()) return;
503
+ const record = (event) => this.pressOrigin = event.target;
504
+ this.doc.addEventListener("pointerdown", record, true);
505
+ onCleanup(() => {
506
+ this.doc.removeEventListener("pointerdown", record, true);
507
+ this.pressOrigin = null;
508
+ });
509
+ });
510
+ effect(() => {
511
+ const first = this.firstSelectedFrom(this.internalValue() ?? null);
512
+ untracked(() => {
513
+ if (first) {
514
+ this.hours.set(first.getHours());
515
+ this.minutes.set(first.getMinutes());
516
+ }
517
+ });
518
+ });
519
+ }
520
+ ngOnInit() {
521
+ if (!this.firstSelectedFrom(this.internalValue() ?? null)) this.showEmptyOpeningDate();
522
+ }
523
+ writeValue(value) {
524
+ this.typedValue.set(null);
525
+ this.hoursDraft.set(null);
526
+ this.minutesDraft.set(null);
527
+ const wasEmpty = !this.firstSelectedFrom(this.internalValue() ?? null);
528
+ const internal = this.toInternalValue(value ?? null);
529
+ this.internalValue.set(internal);
530
+ this.modelValue.set(value ?? void 0);
531
+ const first = this.firstSelectedFrom(internal);
532
+ if (first) {
533
+ this.viewDate.set(firstOfMonth(first));
534
+ this.focusedDate.set(startOfDay(first));
535
+ this.focusedMonthIndex.set(first.getMonth());
536
+ this.focusedYear.set(first.getFullYear());
537
+ } else if (!wasEmpty) this.showEmptyOpeningDate();
538
+ }
539
+ open(viaIcon = false) {
540
+ this.openFrom(viaIcon ? "icon" : "field");
541
+ }
542
+ openFrom(origin) {
543
+ if (this.inline() || this.isDisabled() || this.readonly() || this.panelOpen()) return;
544
+ const base = this.firstSelectedFrom(this.internalValue() ?? null) ?? this.emptyOpeningDate();
545
+ this.viewDate.set(firstOfMonth(base));
546
+ this.currentView.set(this.view());
547
+ this.focusedDate.set(this.clampToRange(startOfDay(base)));
548
+ this.focusedMonthIndex.set(base.getMonth());
549
+ this.focusedYear.set(base.getFullYear());
550
+ this.overlayOrigin.set(this.resolveOverlayOrigin());
551
+ this.nonModal.set(origin === "focus" || this.showOnFocus());
552
+ this.panelOpen.set(true);
553
+ this.opened.emit();
554
+ if (origin !== "focus" && this.showCalendar() && (this.triggerReadonly() || origin === "icon")) {
555
+ if (this.currentView() === "date") this.queueDayFocus();
556
+ else if (this.currentView() === "month") this.queueMonthFocus();
557
+ else this.queueYearFocus();
558
+ }
559
+ }
560
+ close(focusTrigger = true) {
561
+ if (!this.panelOpen()) return;
562
+ this.panelOpen.set(false);
563
+ this.emitTouch();
564
+ this.closed.emit();
565
+ if (focusTrigger) {
566
+ this.suppressFocusOpen = true;
567
+ this.triggerInput()?.focus();
568
+ this.suppressFocusOpen = false;
569
+ }
570
+ }
571
+ toggle(viaIcon = false) {
572
+ this.panelOpen() ? this.close() : this.open(viaIcon);
573
+ }
574
+ onIconClick(event) {
575
+ event.stopPropagation();
576
+ if (this.showClearButton()) this.clear();
577
+ else this.toggle(true);
578
+ }
579
+ onTriggerClick() {
580
+ if (!this.openOnTriggerClick()) return;
581
+ if (!this.triggerReadonly()) this.triggerInput()?.focus();
582
+ this.openFrom("field");
583
+ }
584
+ onTriggerKeydown(event) {
585
+ if (event.key === "Tab" && this.nonModal() && this.panelOpen() && this.tabLeavesTrigger(event)) {
586
+ this.close(false);
587
+ this.cdr.detectChanges();
588
+ return;
589
+ }
590
+ const inputEl = this.triggerInput()?.nativeInputElement();
591
+ if (inputEl && event.target !== inputEl) {
592
+ this.handleEscape(event);
593
+ return;
594
+ }
595
+ if (event.key === "ArrowUp" && event.altKey) {
596
+ event.preventDefault();
597
+ this.close();
598
+ return;
599
+ }
600
+ if (!this.triggerReadonly()) {
601
+ if (event.key === "ArrowDown") {
602
+ event.preventDefault();
603
+ this.open();
604
+ this.queueDayFocus();
605
+ } else if (event.key === "Enter") {
606
+ event.preventDefault();
607
+ this.commitTyped();
608
+ if (this.panelOpen() && this.closeOnSelect() && !this.showTime()) this.close(false);
609
+ } else this.handleEscape(event);
610
+ return;
611
+ }
612
+ if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
613
+ event.preventDefault();
614
+ this.open();
615
+ } else this.handleEscape(event);
616
+ }
617
+ handleEscape(event) {
618
+ if (event.key !== "Escape" || !this.panelOpen()) return;
619
+ event.preventDefault();
620
+ event.stopPropagation();
621
+ this.close();
622
+ }
623
+ onTriggerInput(value) {
624
+ if (this.triggerReadonly()) return;
625
+ const el = this.triggerInput()?.nativeInputElement();
626
+ if (el && !hasFocus(el)) {
627
+ this.typedValue.set(value);
628
+ this.commitTyped();
629
+ el.value = this.displayValue();
630
+ return;
631
+ }
632
+ const slots = this.typingSlots();
633
+ if (!slots) {
634
+ this.typedValue.set(value);
635
+ if (!value.trim()) {
636
+ this.maskSuspended.set(false);
637
+ if (this.hasValue()) this.clear();
638
+ }
639
+ if (this.panelOpen()) this.previewTyped();
640
+ return;
641
+ }
642
+ const caret = el?.selectionStart ?? value.length;
643
+ const dataBeforeCaret = extractMaskData(value.slice(0, caret)).length;
644
+ const newData = extractMaskData(value);
645
+ if (dataBeforeCaret < newData.length) {
646
+ this.maskSuspended.set(true);
647
+ this.typedValue.set(value);
648
+ if (this.panelOpen()) this.previewTyped();
649
+ return;
650
+ }
651
+ const enforceBounds = newData.length >= extractMaskData(this.displayValue()).length;
652
+ const { text, tokenIndices, dataEnd } = autoFormatSegments(slots, newData, { enforceBounds });
653
+ this.typedValue.set(text);
654
+ if (el) {
655
+ el.value = text;
656
+ const atTail = dataBeforeCaret >= newData.length;
657
+ const pos = !enforceBounds && atTail ? dataEnd : caretForMask(tokenIndices, dataBeforeCaret, dataEnd);
658
+ el.setSelectionRange(pos, pos);
659
+ }
660
+ if (this.panelOpen()) this.previewTyped();
661
+ }
662
+ hasCompleteTimeIfNeeded(text) {
663
+ if (!this.showTime() || this.view() !== "date") return true;
664
+ return (text.match(/\d+/g) ?? []).length >= this.activeFields().length + 2;
665
+ }
666
+ previewTyped() {
667
+ const raw = this.typedValue();
668
+ if (raw === null || !raw.trim()) return;
669
+ if (this.selectionMode() === "single" && !this.hasCompleteTimeIfNeeded(raw.trim())) return;
670
+ const picked = this.parseTypedValue(raw.trim(), true);
671
+ if (!picked) return;
672
+ const first = Array.isArray(picked) ? picked[0] : picked;
673
+ this.internalValue.set(picked);
674
+ const external = this.toExternalValue(picked);
675
+ this.modelValue.set(external ?? void 0);
676
+ this.emitChange(external);
677
+ this.valueChange.emit(external);
678
+ this.viewDate.set(firstOfMonth(first));
679
+ this.focusedDate.set(startOfDay(first));
680
+ }
681
+ onTriggerBlur(event) {
682
+ this.commitTyped();
683
+ const next = event.relatedTarget;
684
+ if (!this.panelContains(next)) this.emitTouch();
685
+ this.inputBlur.emit(event);
686
+ }
687
+ onTriggerFocusOut(event) {
688
+ if (!this.nonModal() || !this.panelOpen()) return;
689
+ const next = event.relatedTarget;
690
+ if (this.panelContains(next) || this.triggerContains(next)) return;
691
+ this.close(false);
692
+ }
693
+ onPanelFocusOut(event) {
694
+ if (this.inline() || !this.nonModal() || !this.panelOpen()) return;
695
+ const next = event.relatedTarget;
696
+ if (!next) return;
697
+ if (this.panelContains(next) || this.triggerContains(next)) return;
698
+ this.close(false);
699
+ }
700
+ onOutsideClick(event) {
701
+ const origin = this.pressOrigin ?? event.target;
702
+ if (this.triggerContains(origin) || this.panelContains(origin)) return;
703
+ this.close(false);
704
+ }
705
+ tabLeavesTrigger(event) {
706
+ const wrapper = this.triggerWrapperEl()?.nativeElement;
707
+ if (!wrapper) return true;
708
+ const stops = Array.from(wrapper.querySelectorAll("input:not([disabled]), button:not([disabled])")).filter((el) => el.tabIndex >= 0);
709
+ const index = stops.indexOf(event.target);
710
+ if (index === -1) return true;
711
+ return event.shiftKey ? index === 0 : index === stops.length - 1;
712
+ }
713
+ onPanelMousedown(event) {
714
+ if (!this.nonModal()) return;
715
+ if (event.target?.closest("button, input")) return;
716
+ event.preventDefault();
717
+ }
718
+ panelContains(node) {
719
+ return !!node && !!this.panelEl()?.nativeElement.contains(node);
720
+ }
721
+ triggerContains(node) {
722
+ return !!node && !!this.triggerWrapperEl()?.nativeElement.contains(node);
723
+ }
724
+ commitTyped() {
725
+ if (this.triggerReadonly()) return;
726
+ const raw = this.typedValue();
727
+ if (raw === null) return;
728
+ this.maskSuspended.set(false);
729
+ const text = raw.trim();
730
+ if (!text) {
731
+ this.typedValue.set(null);
732
+ if (this.hasValue()) this.clear();
733
+ return;
734
+ }
735
+ const picked = this.parseTypedValue(text, true);
736
+ if (picked) {
737
+ this.commit(picked);
738
+ const first = Array.isArray(picked) ? picked[0] : picked;
739
+ if (!Array.isArray(picked)) this.dateSelect.emit(this.serializeValue(picked));
740
+ this.viewDate.set(firstOfMonth(first));
741
+ this.focusedDate.set(startOfDay(first));
742
+ } else this.typedValue.set(null);
743
+ }
744
+ parseTyped(text, requireComplete = false) {
745
+ const custom = this.parseDate();
746
+ return custom ? custom(text) : this.defaultParse(text, requireComplete);
747
+ }
748
+ parseTypedValue(text, requireComplete) {
749
+ if (this.selectionMode() === "single") {
750
+ const parsed = this.parseTyped(text, requireComplete);
751
+ return parsed && !this.isParsedDisabled(parsed) ? parsed : null;
752
+ }
753
+ return this.parseTypedMulti(text, requireComplete);
754
+ }
755
+ parseTypedMulti(text, requireComplete) {
756
+ const mode = this.selectionMode();
757
+ const sep = mode === "range" ? RANGE_SEPARATOR : MULTIPLE_SEPARATOR;
758
+ const parts = this.splitTypedSegments(text, sep);
759
+ if (mode === "range" && parts.length !== 2) return null;
760
+ if (mode === "multiple" && parts.length < 1) return null;
761
+ const parsed = parts.map((p) => this.parseTyped(p, requireComplete));
762
+ if (parsed.some((d) => d === null || this.isParsedDisabled(d))) return null;
763
+ const dates = parsed.map(startOfDay);
764
+ if (mode === "range") return dates.sort((a, b) => a.getTime() - b.getTime());
765
+ return dates.filter((d, i) => dates.findIndex((o) => isSameDay(o, d)) === i);
766
+ }
767
+ splitTypedSegments(text, sep) {
768
+ const segments = [];
769
+ let rest = text.trim();
770
+ while (rest.length) {
771
+ let boundary = -1;
772
+ let searchFrom = 0;
773
+ for (;;) {
774
+ const idx = rest.indexOf(sep, searchFrom);
775
+ if (idx === -1) break;
776
+ if (this.parseTyped(rest.slice(0, idx), true)) {
777
+ boundary = idx;
778
+ break;
779
+ }
780
+ searchFrom = idx + 1;
781
+ }
782
+ if (boundary === -1) {
783
+ segments.push(rest.trim());
784
+ break;
785
+ }
786
+ segments.push(rest.slice(0, boundary).trim());
787
+ rest = rest.slice(boundary + sep.length).trim();
788
+ }
789
+ return segments.filter((s) => s.length > 0);
790
+ }
791
+ defaultParse(text, requireComplete = false) {
792
+ const groups = text.match(/\d+/g) ?? [];
793
+ const nums = groups.map(Number);
794
+ if (!nums.length) return null;
795
+ const view = this.view();
796
+ if (view === "year") {
797
+ if (requireComplete && (groups[0]?.length ?? 0) < 4) return null;
798
+ return finalizeParsed(this.normalizeYear(nums[0]), 0, 1, 0, 0);
799
+ }
800
+ const fields = this.activeFields();
801
+ if (requireComplete) {
802
+ if (groups.length < fields.length) return null;
803
+ const yearLen = groups[fields.indexOf("year")]?.length ?? 0;
804
+ if (yearLen !== 2 && yearLen < 4) return null;
805
+ }
806
+ let day = 1;
807
+ let month = 0;
808
+ let year = this.viewDate().getFullYear();
809
+ fields.forEach((field, i) => {
810
+ const n = nums[i];
811
+ if (n === void 0) return;
812
+ if (field === "day") day = n;
813
+ else if (field === "month") month = n - 1;
814
+ else year = this.normalizeYear(n);
815
+ });
816
+ let h = this.hours();
817
+ let min = this.minutes();
818
+ if (this.showTime() && view === "date") {
819
+ const t = nums.slice(fields.length);
820
+ if (t.length >= 1) h = t[0];
821
+ if (t.length >= 2) min = t[1];
822
+ if (this.hourFormat() === "12") {
823
+ if (/p/i.test(text) && h < 12) h += 12;
824
+ if (/a/i.test(text) && h === 12) h = 0;
825
+ }
826
+ }
827
+ return finalizeParsed(year, month, view === "month" ? 1 : day, h, min);
828
+ }
829
+ normalizeYear(y) {
830
+ return y < 100 ? 2e3 + y : y;
831
+ }
832
+ isParsedDisabled(date) {
833
+ const v = this.view();
834
+ if (v === "year") return this.isYearDisabled(date.getFullYear());
835
+ if (v === "month") return this.isMonthDisabled(date.getFullYear(), date.getMonth());
836
+ return this.isDateDisabled(startOfDay(date));
837
+ }
838
+ onHeaderClick() {
839
+ if (!this.singleMonth()) return;
840
+ const v = this.currentView();
841
+ if (v === "date") {
842
+ this.focusedMonthIndex.set(this.viewDate().getMonth());
843
+ this.currentView.set("month");
844
+ } else if (v === "month") {
845
+ this.focusedYear.set(this.viewDate().getFullYear());
846
+ this.currentView.set("year");
847
+ this.queueYearFocus();
848
+ }
849
+ }
850
+ onPrev() {
851
+ this.step(-1);
852
+ }
853
+ onNext() {
854
+ this.step(1);
855
+ }
856
+ step(dir) {
857
+ const v = this.currentView();
858
+ if (v === "date") this.changeMonth(dir);
859
+ else if (v === "month") this.viewDate.set(new Date(this.viewDate().getFullYear() + dir, this.viewDate().getMonth(), 1));
860
+ else this.viewDate.set(new Date(this.viewDate().getFullYear() + dir * 10, this.viewDate().getMonth(), 1));
861
+ }
862
+ changeMonth(delta) {
863
+ const next = addMonths(this.viewDate(), delta);
864
+ this.viewDate.set(next);
865
+ this.monthChange.emit({
866
+ month: next.getMonth(),
867
+ year: next.getFullYear()
868
+ });
869
+ }
870
+ selectDay(cell) {
871
+ if (cell.disabled || this.isDisabled() || this.readonly()) return;
872
+ const picked = new Date(cell.date);
873
+ if (this.showTime()) picked.setHours(this.hours(), this.minutes(), 0, 0);
874
+ const mode = this.selectionMode();
875
+ let value;
876
+ let complete = true;
877
+ if (mode === "multiple") {
878
+ const arr = [...this.selectedDates()];
879
+ const idx = arr.findIndex((d) => isSameDay(d, picked));
880
+ if (idx >= 0) arr.splice(idx, 1);
881
+ else arr.push(picked);
882
+ value = arr;
883
+ complete = false;
884
+ } else if (mode === "range") {
885
+ const arr = this.selectedDates();
886
+ if (arr.length !== 1) {
887
+ value = [picked];
888
+ complete = false;
889
+ } else {
890
+ value = picked < startOfDay(arr[0]) ? [picked] : [arr[0], picked];
891
+ complete = Array.isArray(value) && value.length === 2;
892
+ }
893
+ } else value = picked;
894
+ this.commit(value);
895
+ this.dateSelect.emit(this.serializeValue(picked));
896
+ this.viewDate.set(firstOfMonth(picked));
897
+ this.focusedDate.set(startOfDay(picked));
898
+ if (this.closeOnSelect() && !this.showTime() && !this.inline() && complete) this.close();
899
+ }
900
+ selectMonth(cell) {
901
+ if (cell.disabled) return;
902
+ const d = new Date(this.viewDate().getFullYear(), cell.index, 1);
903
+ this.viewDate.set(d);
904
+ if (this.view() === "month") {
905
+ this.commit(d);
906
+ this.dateSelect.emit(this.serializeValue(d));
907
+ if (this.closeOnSelect() && !this.showTime() && !this.inline()) this.close();
908
+ } else {
909
+ this.currentView.set("date");
910
+ this.focusedDate.set(this.clampToRange(startOfDay(d)));
911
+ this.queueDayFocus();
912
+ }
913
+ }
914
+ selectYear(cell) {
915
+ if (cell.disabled) return;
916
+ const d = new Date(cell.year, this.view() === "year" ? 0 : this.viewDate().getMonth(), 1);
917
+ this.viewDate.set(d);
918
+ if (this.view() === "year") {
919
+ this.commit(d);
920
+ this.dateSelect.emit(this.serializeValue(d));
921
+ if (this.closeOnSelect() && !this.showTime() && !this.inline()) this.close();
922
+ } else {
923
+ this.currentView.set("month");
924
+ this.focusedMonthIndex.set(d.getMonth());
925
+ this.queueMonthFocus();
926
+ }
927
+ }
928
+ applyTime() {
929
+ if (this.selectionMode() !== "single") return;
930
+ const base = this.firstSelectedFrom(this.internalValue() ?? null) ?? startOfDay(this.timeOnly() ? /* @__PURE__ */ new Date() : this.viewDate());
931
+ const next = new Date(base);
932
+ next.setHours(this.hours(), this.minutes(), 0, 0);
933
+ this.commit(next);
934
+ }
935
+ stepHours(dir) {
936
+ if (!this.timeControlsEnabled()) return;
937
+ this.hoursDraft.set(null);
938
+ this.hours.set(((this.hours() + dir) % 24 + 24) % 24);
939
+ this.applyTime();
940
+ }
941
+ stepMinutes(dir) {
942
+ if (!this.timeControlsEnabled()) return;
943
+ this.minutesDraft.set(null);
944
+ const step = Math.max(1, this.stepMinute());
945
+ this.minutes.set(((this.minutes() + dir * step) % 60 + 60) % 60);
946
+ this.applyTime();
947
+ }
948
+ toggleMeridiem() {
949
+ if (!this.timeControlsEnabled()) return;
950
+ this.hoursDraft.set(null);
951
+ this.hours.set((this.hours() + 12) % 24);
952
+ this.applyTime();
953
+ }
954
+ onHoursInput(event) {
955
+ if (!this.timeEditable()) return;
956
+ const { min, max } = this.hourBounds();
957
+ const digits = this.acceptTimeDigits(event, this.hoursValue(), max);
958
+ if (digits === null) return;
959
+ this.hoursDraft.set(digits);
960
+ const n = Number(digits);
961
+ if (!digits || n < min || n > max) return;
962
+ this.hours.set(this.hourFormat() === "12" ? this.to24(n) : n);
963
+ this.applyTime();
964
+ }
965
+ onMinutesInput(event) {
966
+ if (!this.timeEditable()) return;
967
+ const digits = this.acceptTimeDigits(event, this.minutesValue(), 59);
968
+ if (digits === null || !digits) return;
969
+ this.minutesDraft.set(digits);
970
+ this.minutes.set(Number(digits));
971
+ this.applyTime();
972
+ }
973
+ acceptTimeDigits(event, current, max) {
974
+ const el = event.target;
975
+ const digits = el.value.replace(/\D/g, "").slice(0, 2);
976
+ const accepted = !digits || Number(digits) <= max;
977
+ const text = accepted ? digits : current;
978
+ if (el.value !== text) {
979
+ el.value = text;
980
+ el.setSelectionRange(text.length, text.length);
981
+ }
982
+ return accepted ? digits : null;
983
+ }
984
+ to24(displayed) {
985
+ return displayed % 12 + (this.meridiem() === "PM" ? 12 : 0);
986
+ }
987
+ onTimeFocus(event) {
988
+ event.target.select();
989
+ }
990
+ onHoursBlur() {
991
+ this.hoursDraft.set(null);
992
+ }
993
+ onMinutesBlur() {
994
+ this.minutesDraft.set(null);
995
+ }
996
+ onHourKeydown(event) {
997
+ if (event.key === "ArrowUp" || event.key === "PageUp") {
998
+ event.preventDefault();
999
+ this.stepHours(1);
1000
+ } else if (event.key === "ArrowDown" || event.key === "PageDown") {
1001
+ event.preventDefault();
1002
+ this.stepHours(-1);
1003
+ } else if (event.key === "Enter") {
1004
+ event.preventDefault();
1005
+ this.hoursDraft.set(null);
1006
+ }
1007
+ }
1008
+ onMinuteKeydown(event) {
1009
+ if (event.key === "ArrowUp" || event.key === "PageUp") {
1010
+ event.preventDefault();
1011
+ this.stepMinutes(1);
1012
+ } else if (event.key === "ArrowDown" || event.key === "PageDown") {
1013
+ event.preventDefault();
1014
+ this.stepMinutes(-1);
1015
+ } else if (event.key === "Enter") {
1016
+ event.preventDefault();
1017
+ this.minutesDraft.set(null);
1018
+ }
1019
+ }
1020
+ onMeridiemKeydown(event) {
1021
+ if (!this.timeControlsEnabled()) return;
1022
+ if (event.key === "ArrowUp" || event.key === "ArrowDown") {
1023
+ event.preventDefault();
1024
+ this.toggleMeridiem();
1025
+ }
1026
+ }
1027
+ pad(n) {
1028
+ return String(n).padStart(2, "0");
1029
+ }
1030
+ selectToday() {
1031
+ const today = startOfDay(/* @__PURE__ */ new Date());
1032
+ if (this.isDateDisabled(today)) return;
1033
+ if (this.showTime()) today.setHours(this.hours(), this.minutes(), 0, 0);
1034
+ this.commit(this.selectionMode() === "single" ? today : [today]);
1035
+ this.dateSelect.emit(this.serializeValue(today));
1036
+ this.viewDate.set(firstOfMonth(today));
1037
+ this.focusedDate.set(today);
1038
+ if (this.closeOnSelect() && !this.showTime() && !this.inline() && this.selectionMode() !== "multiple") this.close();
1039
+ }
1040
+ clear() {
1041
+ this.commit(null);
1042
+ this.showEmptyOpeningDate();
1043
+ this.cleared.emit();
1044
+ }
1045
+ onGridKeydown(event) {
1046
+ const current = this.focusedDate();
1047
+ let next;
1048
+ switch (event.key) {
1049
+ case "ArrowLeft":
1050
+ next = addDays(current, -1);
1051
+ break;
1052
+ case "ArrowRight":
1053
+ next = addDays(current, 1);
1054
+ break;
1055
+ case "ArrowUp":
1056
+ next = addDays(current, -7);
1057
+ break;
1058
+ case "ArrowDown":
1059
+ next = addDays(current, 7);
1060
+ break;
1061
+ case "Home":
1062
+ next = addDays(current, -((current.getDay() - this.firstDayOfWeek() + 7) % 7));
1063
+ break;
1064
+ case "End":
1065
+ next = addDays(current, 6 - (current.getDay() - this.firstDayOfWeek() + 7) % 7);
1066
+ break;
1067
+ case "PageUp":
1068
+ next = addMonths(current, event.shiftKey ? -12 : -1);
1069
+ break;
1070
+ case "PageDown":
1071
+ next = addMonths(current, event.shiftKey ? 12 : 1);
1072
+ break;
1073
+ case "Enter":
1074
+ case " ":
1075
+ event.preventDefault();
1076
+ this.selectDay(this.buildDay(startOfDay(current), this.viewDate()));
1077
+ return;
1078
+ case "Escape":
1079
+ this.handleEscape(event);
1080
+ return;
1081
+ default: return;
1082
+ }
1083
+ event.preventDefault();
1084
+ if (!next) return;
1085
+ this.focusedDate.set(startOfDay(next));
1086
+ this.ensureMonthVisible(next);
1087
+ this.queueDayFocus();
1088
+ }
1089
+ isFocusableDay(cell) {
1090
+ return !cell.otherMonth && isSameDay(cell.date, this.focusedDate());
1091
+ }
1092
+ navigateGridIndex(key, current, columns, count) {
1093
+ switch (key) {
1094
+ case "ArrowLeft": return Math.max(0, current - 1);
1095
+ case "ArrowRight": return Math.min(count - 1, current + 1);
1096
+ case "ArrowUp": return current - columns >= 0 ? current - columns : current;
1097
+ case "ArrowDown": return current + columns < count ? current + columns : current;
1098
+ case "Home": return Math.floor(current / columns) * columns;
1099
+ case "End": return Math.min(count - 1, Math.floor(current / columns) * columns + columns - 1);
1100
+ default: return null;
1101
+ }
1102
+ }
1103
+ onMonthGridKeydown(event) {
1104
+ const current = this.focusedMonthIndex();
1105
+ if (event.key === "Enter" || event.key === " ") {
1106
+ event.preventDefault();
1107
+ this.selectMonth(this.months()[current]);
1108
+ return;
1109
+ }
1110
+ if (event.key === "Escape") {
1111
+ this.handleEscape(event);
1112
+ return;
1113
+ }
1114
+ if (event.key === "PageUp" || event.key === "PageDown") {
1115
+ event.preventDefault();
1116
+ const dir = event.key === "PageUp" ? -1 : 1;
1117
+ const years = event.shiftKey ? 10 : 1;
1118
+ this.viewDate.set(new Date(this.viewDate().getFullYear() + dir * years, this.viewDate().getMonth(), 1));
1119
+ this.queueMonthFocus();
1120
+ return;
1121
+ }
1122
+ const next = this.navigateGridIndex(event.key, current, 3, 12);
1123
+ if (next === null) return;
1124
+ event.preventDefault();
1125
+ this.focusedMonthIndex.set(next);
1126
+ this.queueMonthFocus();
1127
+ }
1128
+ onYearGridKeydown(event) {
1129
+ const current = this.focusedYear();
1130
+ if (event.key === "Enter" || event.key === " ") {
1131
+ event.preventDefault();
1132
+ this.selectYear(this.years()[current - this.decadeStart()]);
1133
+ return;
1134
+ }
1135
+ if (event.key === "Escape") {
1136
+ this.handleEscape(event);
1137
+ return;
1138
+ }
1139
+ if (event.key === "PageUp" || event.key === "PageDown") {
1140
+ event.preventDefault();
1141
+ const dir = event.key === "PageUp" ? -1 : 1;
1142
+ const delta = (event.shiftKey ? 100 : 10) * dir;
1143
+ this.viewDate.set(new Date(this.viewDate().getFullYear() + delta, this.viewDate().getMonth(), 1));
1144
+ this.focusedYear.set(current + delta);
1145
+ this.queueYearFocus();
1146
+ return;
1147
+ }
1148
+ const idx = this.navigateGridIndex(event.key, current - this.decadeStart(), 2, 10);
1149
+ if (idx === null) return;
1150
+ event.preventDefault();
1151
+ this.focusedYear.set(this.decadeStart() + idx);
1152
+ this.queueYearFocus();
1153
+ }
1154
+ isFocusableMonth(cell) {
1155
+ return cell.index === this.focusedMonthIndex();
1156
+ }
1157
+ isFocusableYear(cell) {
1158
+ return cell.year === this.focusedYear();
1159
+ }
1160
+ ensureMonthVisible(date) {
1161
+ const count = Math.max(1, this.numberOfMonths());
1162
+ const start = firstOfMonth(this.viewDate());
1163
+ const end = addMonths(start, count - 1);
1164
+ const month = firstOfMonth(date);
1165
+ if (month < start) this.viewDate.set(month);
1166
+ else if (month > end) this.viewDate.set(addMonths(month, 1 - count));
1167
+ }
1168
+ commit(value) {
1169
+ this.typedValue.set(null);
1170
+ this.maskSuspended.set(false);
1171
+ this.internalValue.set(value ?? null);
1172
+ const external = this.toExternalValue(value ?? null);
1173
+ this.modelValue.set(external ?? void 0);
1174
+ this.emitChange(external);
1175
+ this.valueChange.emit(external);
1176
+ }
1177
+ buildDay(date, viewMonth) {
1178
+ const today = startOfDay(/* @__PURE__ */ new Date());
1179
+ const mode = this.selectionMode();
1180
+ const sel = this.selectedDates();
1181
+ let selected = false;
1182
+ let rangeStart = false;
1183
+ let rangeEnd = false;
1184
+ let inRange = false;
1185
+ if (mode === "range") {
1186
+ const [s, e] = sel;
1187
+ if (s && isSameDay(date, s)) {
1188
+ rangeStart = true;
1189
+ selected = true;
1190
+ }
1191
+ if (e && isSameDay(date, e)) {
1192
+ rangeEnd = true;
1193
+ selected = true;
1194
+ }
1195
+ if (s && e && date > startOfDay(s) && date < startOfDay(e)) inRange = true;
1196
+ } else selected = sel.some((d) => isSameDay(d, date));
1197
+ return {
1198
+ date,
1199
+ day: date.getDate(),
1200
+ month: date.getMonth(),
1201
+ year: date.getFullYear(),
1202
+ otherMonth: date.getMonth() !== viewMonth.getMonth(),
1203
+ today: isSameDay(date, today),
1204
+ selected,
1205
+ disabled: this.isDateDisabled(date),
1206
+ ariaLabel: this.dayAriaFormatter().format(date),
1207
+ rangeStart,
1208
+ rangeEnd,
1209
+ inRange,
1210
+ ts: date.getTime()
1211
+ };
1212
+ }
1213
+ buildMonthWeeks(monthDate) {
1214
+ const first = firstOfMonth(monthDate);
1215
+ const offset = (first.getDay() - this.firstDayOfWeek() + 7) % 7;
1216
+ const gridStart = addDays(first, -offset);
1217
+ return Array.from({ length: 6 }, (_, w) => Array.from({ length: 7 }, (_, d) => this.buildDay(addDays(gridStart, w * 7 + d), monthDate)));
1218
+ }
1219
+ resolveOverlayOrigin() {
1220
+ const host = this.triggerRef()?.nativeElement;
1221
+ return host?.querySelector(".ui-field-box") ?? host ?? null;
1222
+ }
1223
+ queueCellFocus(selector) {
1224
+ if (typeof requestAnimationFrame === "undefined") return;
1225
+ requestAnimationFrame(() => {
1226
+ this.panelEl()?.nativeElement.querySelector(selector)?.focus();
1227
+ });
1228
+ }
1229
+ queueDayFocus() {
1230
+ this.queueCellFocus(".ui-datepicker-day._focusable");
1231
+ }
1232
+ queueMonthFocus() {
1233
+ this.queueCellFocus(".ui-datepicker-picker._month .ui-datepicker-cell._focusable");
1234
+ }
1235
+ queueYearFocus() {
1236
+ this.queueCellFocus(".ui-datepicker-picker._year .ui-datepicker-cell._focusable");
1237
+ }
1238
+ emptyOpeningDate() {
1239
+ return this.clampToRange(startOfDay(this.resolvedDefaultViewDate() ?? /* @__PURE__ */ new Date()));
1240
+ }
1241
+ showEmptyOpeningDate() {
1242
+ if (this.panelOpen()) return;
1243
+ const base = this.emptyOpeningDate();
1244
+ this.viewDate.set(firstOfMonth(base));
1245
+ this.focusedDate.set(base);
1246
+ this.focusedMonthIndex.set(base.getMonth());
1247
+ this.focusedYear.set(base.getFullYear());
1248
+ }
1249
+ clampToRange(date) {
1250
+ const min = this.resolvedMinDate();
1251
+ const max = this.resolvedMaxDate();
1252
+ if (min && date < startOfDay(min)) return startOfDay(min);
1253
+ if (max && date > startOfDay(max)) return startOfDay(max);
1254
+ return date;
1255
+ }
1256
+ isDateDisabled(date) {
1257
+ const min = this.resolvedMinDate();
1258
+ const max = this.resolvedMaxDate();
1259
+ if (min && date < startOfDay(min)) return true;
1260
+ if (max && date > startOfDay(max)) return true;
1261
+ if ((this.disabledDays() ?? []).includes(date.getDay())) return true;
1262
+ return this.resolvedDisabledDates().some((d) => isSameDay(d, date));
1263
+ }
1264
+ isMonthDisabled(year, month) {
1265
+ const min = this.resolvedMinDate();
1266
+ const max = this.resolvedMaxDate();
1267
+ if (min && new Date(year, month + 1, 0) < startOfDay(min)) return true;
1268
+ if (max && new Date(year, month, 1) > startOfDay(max)) return true;
1269
+ return false;
1270
+ }
1271
+ isYearDisabled(year) {
1272
+ const min = this.resolvedMinDate();
1273
+ const max = this.resolvedMaxDate();
1274
+ if (min && year < min.getFullYear()) return true;
1275
+ if (max && year > max.getFullYear()) return true;
1276
+ return false;
1277
+ }
1278
+ capitalize(s) {
1279
+ return s.charAt(0).toUpperCase() + s.slice(1);
1280
+ }
1281
+ static {
1282
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1283
+ minVersion: "12.0.0",
1284
+ version: "22.3.0",
1285
+ ngImport: i0,
1286
+ type: UiDatepicker,
1287
+ deps: [],
1288
+ target: i0.ɵɵFactoryTarget.Component
1289
+ });
1290
+ }
1291
+ static {
1292
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1293
+ minVersion: "17.0.0",
1294
+ version: "22.3.0",
1295
+ type: UiDatepicker,
1296
+ isStandalone: true,
1297
+ selector: "ui-datepicker",
1298
+ inputs: {
1299
+ placeholder: {
1300
+ classPropertyName: "placeholder",
1301
+ publicName: "placeholder",
1302
+ isSignal: true,
1303
+ isRequired: false,
1304
+ transformFunction: null
1305
+ },
1306
+ icon: {
1307
+ classPropertyName: "icon",
1308
+ publicName: "icon",
1309
+ isSignal: true,
1310
+ isRequired: false,
1311
+ transformFunction: null
1312
+ },
1313
+ showIcon: {
1314
+ classPropertyName: "showIcon",
1315
+ publicName: "showIcon",
1316
+ isSignal: true,
1317
+ isRequired: false,
1318
+ transformFunction: null
1319
+ },
1320
+ iconAriaLabel: {
1321
+ classPropertyName: "iconAriaLabel",
1322
+ publicName: "iconAriaLabel",
1323
+ isSignal: true,
1324
+ isRequired: false,
1325
+ transformFunction: null
1326
+ },
1327
+ showClear: {
1328
+ classPropertyName: "showClear",
1329
+ publicName: "showClear",
1330
+ isSignal: true,
1331
+ isRequired: false,
1332
+ transformFunction: null
1333
+ },
1334
+ valueType: {
1335
+ classPropertyName: "valueType",
1336
+ publicName: "valueType",
1337
+ isSignal: true,
1338
+ isRequired: true,
1339
+ transformFunction: null
1340
+ },
1341
+ selectionMode: {
1342
+ classPropertyName: "selectionMode",
1343
+ publicName: "selectionMode",
1344
+ isSignal: true,
1345
+ isRequired: false,
1346
+ transformFunction: null
1347
+ },
1348
+ view: {
1349
+ classPropertyName: "view",
1350
+ publicName: "view",
1351
+ isSignal: true,
1352
+ isRequired: false,
1353
+ transformFunction: null
1354
+ },
1355
+ numberOfMonths: {
1356
+ classPropertyName: "numberOfMonths",
1357
+ publicName: "numberOfMonths",
1358
+ isSignal: true,
1359
+ isRequired: false,
1360
+ transformFunction: null
1361
+ },
1362
+ minDate: {
1363
+ classPropertyName: "minDate",
1364
+ publicName: "minDate",
1365
+ isSignal: true,
1366
+ isRequired: false,
1367
+ transformFunction: null
1368
+ },
1369
+ maxDate: {
1370
+ classPropertyName: "maxDate",
1371
+ publicName: "maxDate",
1372
+ isSignal: true,
1373
+ isRequired: false,
1374
+ transformFunction: null
1375
+ },
1376
+ defaultViewDate: {
1377
+ classPropertyName: "defaultViewDate",
1378
+ publicName: "defaultViewDate",
1379
+ isSignal: true,
1380
+ isRequired: false,
1381
+ transformFunction: null
1382
+ },
1383
+ disabledDates: {
1384
+ classPropertyName: "disabledDates",
1385
+ publicName: "disabledDates",
1386
+ isSignal: true,
1387
+ isRequired: false,
1388
+ transformFunction: null
1389
+ },
1390
+ disabledDays: {
1391
+ classPropertyName: "disabledDays",
1392
+ publicName: "disabledDays",
1393
+ isSignal: true,
1394
+ isRequired: false,
1395
+ transformFunction: null
1396
+ },
1397
+ firstDayOfWeek: {
1398
+ classPropertyName: "firstDayOfWeek",
1399
+ publicName: "firstDayOfWeek",
1400
+ isSignal: true,
1401
+ isRequired: false,
1402
+ transformFunction: null
1403
+ },
1404
+ locale: {
1405
+ classPropertyName: "locale",
1406
+ publicName: "locale",
1407
+ isSignal: true,
1408
+ isRequired: false,
1409
+ transformFunction: null
1410
+ },
1411
+ dateFormat: {
1412
+ classPropertyName: "dateFormat",
1413
+ publicName: "dateFormat",
1414
+ isSignal: true,
1415
+ isRequired: false,
1416
+ transformFunction: null
1417
+ },
1418
+ allowInput: {
1419
+ classPropertyName: "allowInput",
1420
+ publicName: "allowInput",
1421
+ isSignal: true,
1422
+ isRequired: false,
1423
+ transformFunction: null
1424
+ },
1425
+ parseDate: {
1426
+ classPropertyName: "parseDate",
1427
+ publicName: "parseDate",
1428
+ isSignal: true,
1429
+ isRequired: false,
1430
+ transformFunction: null
1431
+ },
1432
+ showTime: {
1433
+ classPropertyName: "showTime",
1434
+ publicName: "showTime",
1435
+ isSignal: true,
1436
+ isRequired: false,
1437
+ transformFunction: null
1438
+ },
1439
+ timeOnly: {
1440
+ classPropertyName: "timeOnly",
1441
+ publicName: "timeOnly",
1442
+ isSignal: true,
1443
+ isRequired: false,
1444
+ transformFunction: null
1445
+ },
1446
+ hourFormat: {
1447
+ classPropertyName: "hourFormat",
1448
+ publicName: "hourFormat",
1449
+ isSignal: true,
1450
+ isRequired: false,
1451
+ transformFunction: null
1452
+ },
1453
+ stepMinute: {
1454
+ classPropertyName: "stepMinute",
1455
+ publicName: "stepMinute",
1456
+ isSignal: true,
1457
+ isRequired: false,
1458
+ transformFunction: null
1459
+ },
1460
+ editableTime: {
1461
+ classPropertyName: "editableTime",
1462
+ publicName: "editableTime",
1463
+ isSignal: true,
1464
+ isRequired: false,
1465
+ transformFunction: null
1466
+ },
1467
+ showButtonBar: {
1468
+ classPropertyName: "showButtonBar",
1469
+ publicName: "showButtonBar",
1470
+ isSignal: true,
1471
+ isRequired: false,
1472
+ transformFunction: null
1473
+ },
1474
+ ripple: {
1475
+ classPropertyName: "ripple",
1476
+ publicName: "ripple",
1477
+ isSignal: true,
1478
+ isRequired: false,
1479
+ transformFunction: null
1480
+ },
1481
+ todayLabel: {
1482
+ classPropertyName: "todayLabel",
1483
+ publicName: "todayLabel",
1484
+ isSignal: true,
1485
+ isRequired: false,
1486
+ transformFunction: null
1487
+ },
1488
+ clearLabel: {
1489
+ classPropertyName: "clearLabel",
1490
+ publicName: "clearLabel",
1491
+ isSignal: true,
1492
+ isRequired: false,
1493
+ transformFunction: null
1494
+ },
1495
+ formatHintLabel: {
1496
+ classPropertyName: "formatHintLabel",
1497
+ publicName: "formatHintLabel",
1498
+ isSignal: true,
1499
+ isRequired: false,
1500
+ transformFunction: null
1501
+ },
1502
+ panelAriaLabel: {
1503
+ classPropertyName: "panelAriaLabel",
1504
+ publicName: "panelAriaLabel",
1505
+ isSignal: true,
1506
+ isRequired: false,
1507
+ transformFunction: null
1508
+ },
1509
+ prevAriaLabel: {
1510
+ classPropertyName: "prevAriaLabel",
1511
+ publicName: "prevAriaLabel",
1512
+ isSignal: true,
1513
+ isRequired: false,
1514
+ transformFunction: null
1515
+ },
1516
+ nextAriaLabel: {
1517
+ classPropertyName: "nextAriaLabel",
1518
+ publicName: "nextAriaLabel",
1519
+ isSignal: true,
1520
+ isRequired: false,
1521
+ transformFunction: null
1522
+ },
1523
+ hoursAriaLabel: {
1524
+ classPropertyName: "hoursAriaLabel",
1525
+ publicName: "hoursAriaLabel",
1526
+ isSignal: true,
1527
+ isRequired: false,
1528
+ transformFunction: null
1529
+ },
1530
+ minutesAriaLabel: {
1531
+ classPropertyName: "minutesAriaLabel",
1532
+ publicName: "minutesAriaLabel",
1533
+ isSignal: true,
1534
+ isRequired: false,
1535
+ transformFunction: null
1536
+ },
1537
+ meridiemAriaLabel: {
1538
+ classPropertyName: "meridiemAriaLabel",
1539
+ publicName: "meridiemAriaLabel",
1540
+ isSignal: true,
1541
+ isRequired: false,
1542
+ transformFunction: null
1543
+ },
1544
+ incrementHoursAriaLabel: {
1545
+ classPropertyName: "incrementHoursAriaLabel",
1546
+ publicName: "incrementHoursAriaLabel",
1547
+ isSignal: true,
1548
+ isRequired: false,
1549
+ transformFunction: null
1550
+ },
1551
+ decrementHoursAriaLabel: {
1552
+ classPropertyName: "decrementHoursAriaLabel",
1553
+ publicName: "decrementHoursAriaLabel",
1554
+ isSignal: true,
1555
+ isRequired: false,
1556
+ transformFunction: null
1557
+ },
1558
+ incrementMinutesAriaLabel: {
1559
+ classPropertyName: "incrementMinutesAriaLabel",
1560
+ publicName: "incrementMinutesAriaLabel",
1561
+ isSignal: true,
1562
+ isRequired: false,
1563
+ transformFunction: null
1564
+ },
1565
+ decrementMinutesAriaLabel: {
1566
+ classPropertyName: "decrementMinutesAriaLabel",
1567
+ publicName: "decrementMinutesAriaLabel",
1568
+ isSignal: true,
1569
+ isRequired: false,
1570
+ transformFunction: null
1571
+ },
1572
+ toggleMeridiemAriaLabel: {
1573
+ classPropertyName: "toggleMeridiemAriaLabel",
1574
+ publicName: "toggleMeridiemAriaLabel",
1575
+ isSignal: true,
1576
+ isRequired: false,
1577
+ transformFunction: null
1578
+ },
1579
+ inline: {
1580
+ classPropertyName: "inline",
1581
+ publicName: "inline",
1582
+ isSignal: true,
1583
+ isRequired: false,
1584
+ transformFunction: null
1585
+ },
1586
+ showOnFocus: {
1587
+ classPropertyName: "showOnFocus",
1588
+ publicName: "showOnFocus",
1589
+ isSignal: true,
1590
+ isRequired: false,
1591
+ transformFunction: null
1592
+ },
1593
+ autoFlip: {
1594
+ classPropertyName: "autoFlip",
1595
+ publicName: "autoFlip",
1596
+ isSignal: true,
1597
+ isRequired: false,
1598
+ transformFunction: null
1599
+ },
1600
+ closeOnSelect: {
1601
+ classPropertyName: "closeOnSelect",
1602
+ publicName: "closeOnSelect",
1603
+ isSignal: true,
1604
+ isRequired: false,
1605
+ transformFunction: null
1606
+ },
1607
+ panelStyleClass: {
1608
+ classPropertyName: "panelStyleClass",
1609
+ publicName: "panelStyleClass",
1610
+ isSignal: true,
1611
+ isRequired: false,
1612
+ transformFunction: null
1613
+ },
1614
+ autocomplete: {
1615
+ classPropertyName: "autocomplete",
1616
+ publicName: "autocomplete",
1617
+ isSignal: true,
1618
+ isRequired: false,
1619
+ transformFunction: null
1620
+ }
1621
+ },
1622
+ outputs: {
1623
+ valueChange: "valueChange",
1624
+ dateSelect: "dateSelect",
1625
+ monthChange: "monthChange",
1626
+ opened: "opened",
1627
+ closed: "closed",
1628
+ cleared: "cleared",
1629
+ inputFocus: "inputFocus",
1630
+ inputBlur: "inputBlur"
1631
+ },
1632
+ providers: [{
1633
+ provide: NG_VALUE_ACCESSOR,
1634
+ useExisting: forwardRef(() => UiDatepicker),
1635
+ multi: true
1636
+ }],
1637
+ queries: [
1638
+ {
1639
+ propertyName: "dateTemplate",
1640
+ first: true,
1641
+ predicate: ["date"],
1642
+ descendants: true,
1643
+ isSignal: true
1644
+ },
1645
+ {
1646
+ propertyName: "buttonBarTemplate",
1647
+ first: true,
1648
+ predicate: ["buttonbar"],
1649
+ descendants: true,
1650
+ isSignal: true
1651
+ },
1652
+ {
1653
+ propertyName: "iconTemplate",
1654
+ first: true,
1655
+ predicate: ["icon"],
1656
+ descendants: true,
1657
+ isSignal: true
1658
+ }
1659
+ ],
1660
+ viewQueries: [
1661
+ {
1662
+ propertyName: "triggerInput",
1663
+ first: true,
1664
+ predicate: ["trigger"],
1665
+ descendants: true,
1666
+ isSignal: true
1667
+ },
1668
+ {
1669
+ propertyName: "triggerRef",
1670
+ first: true,
1671
+ predicate: ["trigger"],
1672
+ descendants: true,
1673
+ read: ElementRef,
1674
+ isSignal: true
1675
+ },
1676
+ {
1677
+ propertyName: "panelEl",
1678
+ first: true,
1679
+ predicate: ["panel"],
1680
+ descendants: true,
1681
+ isSignal: true
1682
+ },
1683
+ {
1684
+ propertyName: "triggerWrapperEl",
1685
+ first: true,
1686
+ predicate: ["triggerWrapper"],
1687
+ descendants: true,
1688
+ isSignal: true
1689
+ }
1690
+ ],
1691
+ usesInheritance: true,
1692
+ ngImport: i0,
1693
+ 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 — vertical steppers (ARIA spinbutton pattern) -->\n @if (hasTimeComponent()) {\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 [autocomplete]=\"autocomplete()\"\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",
1694
+ 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(--ui-datepicker-panel-stroke, var(--form-high-stroke-default));border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-datepicker-panel-surface, var(--form-high-surface-default));box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-datepicker-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(--ui-datepicker-nav-color, var(--informative-defaultlow-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-nav:hover{background-color:var(--ui-datepicker-nav-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-nav-color-hover, 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(--ui-datepicker-nav-focus-ring-color, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-title-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(--ui-datepicker-font-family, var(--fontfamily-base));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--ui-datepicker-title-surface-hover, 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(--ui-datepicker-title-focus-ring-color, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-cell-surface, var(--actions-low-surface-default));font-family:var(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-cell-color, var(--form-high-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-cell:active:not(:disabled){background-color:var(--ui-datepicker-cell-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--ui-datepicker-cell-surface-focus, 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(--ui-datepicker-cell-focus-ring-color, var(--actions-high-stroke-focused)) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--ui-datepicker-cell-surface-selected, var(--actions-high-surface-default));color:var(--ui-datepicker-cell-color-selected, var(--actions-high-content-default))}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-cell:disabled{color:var(--ui-datepicker-cell-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-weekday-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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-day-color, var(--form-high-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--ui-datepicker-day-surface-focus, 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(--ui-datepicker-day-focus-ring-color, 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(--ui-datepicker-day-stroke-today, var(--actions-high-stroke-default))}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--ui-datepicker-day-stroke-today-hover, var(--actions-high-stroke-hover))}.ui-datepicker-day._today:focus-visible:before{border-color:var(--ui-datepicker-day-stroke-today-focus, var(--actions-high-stroke-focused))}.ui-datepicker-day._selected{color:var(--ui-datepicker-day-color-selected, var(--actions-high-content-default))}.ui-datepicker-day._selected:before{background-color:var(--ui-datepicker-day-surface-selected, var(--actions-high-surface-default))}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--ui-datepicker-day-color-selected-hover, var(--actions-high-content-hover))}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-day._selected:focus-visible{color:var(--ui-datepicker-day-color-selected-focus, var(--actions-high-content-focused))}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--ui-datepicker-day-surface-selected-focus, 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(--ui-datepicker-range-color-hover, 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(--ui-datepicker-range-background-hover, var(--informative-highlighthigh-surface-default))}.ui-datepicker-day:disabled{color:var(--ui-datepicker-day-color-disabled, 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(--ui-datepicker-time-stroke, 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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--ui-datepicker-weight, var(--weight-bold));font-variant-numeric:tabular-nums;color:var(--ui-datepicker-time-value-color, var(--form-high-content-default));text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--ui-datepicker-time-value-surface-hover, 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(--ui-datepicker-time-value-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--ui-datepicker-time-value-color-disabled, 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(--ui-datepicker-time-btn-color, var(--form-low-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--ui-datepicker-time-btn-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-time-btn-color-hover, var(--form-high-content-hover))}.ui-datepicker-time-btn:disabled{color:var(--ui-datepicker-time-btn-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-time-colon-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(--ui-datepicker-buttonbar-stroke, var(--form-high-stroke-default))}\n"],
1695
+ dependencies: [
1696
+ {
1697
+ kind: "directive",
1698
+ type: NgTemplateOutlet,
1699
+ selector: "[ngTemplateOutlet]",
1700
+ inputs: [
1701
+ "ngTemplateOutletContext",
1702
+ "ngTemplateOutlet",
1703
+ "ngTemplateOutletInjector"
1704
+ ]
1705
+ },
1706
+ {
1707
+ kind: "ngmodule",
1708
+ type: OverlayModule
1709
+ },
1710
+ {
1711
+ kind: "directive",
1712
+ type: i1.CdkConnectedOverlay,
1713
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
1714
+ inputs: [
1715
+ "cdkConnectedOverlayOrigin",
1716
+ "cdkConnectedOverlayPositions",
1717
+ "cdkConnectedOverlayPositionStrategy",
1718
+ "cdkConnectedOverlayOffsetX",
1719
+ "cdkConnectedOverlayOffsetY",
1720
+ "cdkConnectedOverlayWidth",
1721
+ "cdkConnectedOverlayHeight",
1722
+ "cdkConnectedOverlayMinWidth",
1723
+ "cdkConnectedOverlayMinHeight",
1724
+ "cdkConnectedOverlayBackdropClass",
1725
+ "cdkConnectedOverlayPanelClass",
1726
+ "cdkConnectedOverlayViewportMargin",
1727
+ "cdkConnectedOverlayScrollStrategy",
1728
+ "cdkConnectedOverlayOpen",
1729
+ "cdkConnectedOverlayDisableClose",
1730
+ "cdkConnectedOverlayTransformOriginOn",
1731
+ "cdkConnectedOverlayHasBackdrop",
1732
+ "cdkConnectedOverlayLockPosition",
1733
+ "cdkConnectedOverlayFlexibleDimensions",
1734
+ "cdkConnectedOverlayGrowAfterOpen",
1735
+ "cdkConnectedOverlayPush",
1736
+ "cdkConnectedOverlayDisposeOnNavigation",
1737
+ "cdkConnectedOverlayUsePopover",
1738
+ "cdkConnectedOverlayMatchWidth",
1739
+ "cdkConnectedOverlay"
1740
+ ],
1741
+ outputs: [
1742
+ "backdropClick",
1743
+ "positionChange",
1744
+ "attach",
1745
+ "detach",
1746
+ "overlayKeydown",
1747
+ "overlayOutsideClick"
1748
+ ],
1749
+ exportAs: ["cdkConnectedOverlay"]
1750
+ },
1751
+ {
1752
+ kind: "directive",
1753
+ type: CdkTrapFocus,
1754
+ selector: "[cdkTrapFocus]",
1755
+ inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
1756
+ exportAs: ["cdkTrapFocus"]
1757
+ },
1758
+ {
1759
+ kind: "component",
1760
+ type: UiInput,
1761
+ selector: "ui-input",
1762
+ inputs: [
1763
+ "type",
1764
+ "value",
1765
+ "ariaHasPopup",
1766
+ "ariaExpanded",
1767
+ "ariaControls",
1768
+ "placeholder",
1769
+ "ariaDescribedBy",
1770
+ "unit",
1771
+ "iconLeft",
1772
+ "iconRight",
1773
+ "iconRightAriaLabel",
1774
+ "autocomplete",
1775
+ "maxlength",
1776
+ "iconLeftTemplate",
1777
+ "iconRightTemplate"
1778
+ ],
1779
+ outputs: [
1780
+ "valueChange",
1781
+ "iconRightClick",
1782
+ "inputFocus",
1783
+ "inputBlur"
1784
+ ]
1785
+ },
1786
+ {
1787
+ kind: "component",
1788
+ type: UiButton,
1789
+ selector: "ui-button",
1790
+ inputs: [
1791
+ "label",
1792
+ "ariaLabel",
1793
+ "type",
1794
+ "level",
1795
+ "variant",
1796
+ "onColor",
1797
+ "size",
1798
+ "icon",
1799
+ "iconPos",
1800
+ "iconOnly",
1801
+ "loading",
1802
+ "loadingIcon",
1803
+ "expanded",
1804
+ "rounded",
1805
+ "disabled",
1806
+ "ripple",
1807
+ "tabindex",
1808
+ "buttonProps",
1809
+ "iconTemplate",
1810
+ "loadingIconTemplate",
1811
+ "href",
1812
+ "routerLink",
1813
+ "target",
1814
+ "rel"
1815
+ ],
1816
+ outputs: [
1817
+ "buttonClick",
1818
+ "buttonFocus",
1819
+ "buttonBlur"
1820
+ ]
1821
+ },
1822
+ {
1823
+ kind: "component",
1824
+ type: UiIcon,
1825
+ selector: "ui-icon",
1826
+ inputs: [
1827
+ "name",
1828
+ "size",
1829
+ "type",
1830
+ "family",
1831
+ "decorative",
1832
+ "ariaLabel"
1833
+ ]
1834
+ }
1835
+ ]
1836
+ });
1837
+ }
1838
+ };
1839
+ i0.ɵɵngDeclareClassMetadata({
1840
+ minVersion: "12.0.0",
1841
+ version: "22.3.0",
1842
+ ngImport: i0,
1843
+ type: UiDatepicker,
1844
+ decorators: [{
1845
+ type: Component,
1846
+ args: [{
1847
+ selector: "ui-datepicker",
1848
+ imports: [
1849
+ NgTemplateOutlet,
1850
+ OverlayModule,
1851
+ CdkTrapFocus,
1852
+ UiInput,
1853
+ UiButton,
1854
+ UiIcon
1855
+ ],
1856
+ providers: [{
1857
+ provide: NG_VALUE_ACCESSOR,
1858
+ useExisting: forwardRef(() => UiDatepicker),
1859
+ multi: true
1860
+ }],
1861
+ 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 — vertical steppers (ARIA spinbutton pattern) -->\n @if (hasTimeComponent()) {\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 [autocomplete]=\"autocomplete()\"\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",
1862
+ 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(--ui-datepicker-panel-stroke, var(--form-high-stroke-default));border-radius:var(--ui-datepicker-panel-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-datepicker-panel-surface, var(--form-high-surface-default));box-shadow:var(--ui-datepicker-panel-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-datepicker-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(--ui-datepicker-nav-color, var(--informative-defaultlow-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-nav:hover{background-color:var(--ui-datepicker-nav-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-nav-color-hover, 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(--ui-datepicker-nav-focus-ring-color, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-title-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(--ui-datepicker-font-family, var(--fontfamily-base));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-title._button:hover:not(:disabled){background-color:var(--ui-datepicker-title-surface-hover, 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(--ui-datepicker-title-focus-ring-color, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-month-stroke, 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(--ui-datepicker-cell-surface, var(--actions-low-surface-default));font-family:var(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-cell-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-cell-color, var(--form-high-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-cell:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-cell:active:not(:disabled){background-color:var(--ui-datepicker-cell-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-cell:focus-visible{outline:none;background-color:var(--ui-datepicker-cell-surface-focus, 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(--ui-datepicker-cell-focus-ring-color, var(--actions-high-stroke-focused)) r g b/50%)}.ui-datepicker-cell._selected{background-color:var(--ui-datepicker-cell-surface-selected, var(--actions-high-surface-default));color:var(--ui-datepicker-cell-color-selected, var(--actions-high-content-default))}.ui-datepicker-cell._selected:hover:not(:disabled){background-color:var(--ui-datepicker-cell-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-cell:disabled{color:var(--ui-datepicker-cell-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-weekday-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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-day-font-size, var(--size-typography-text-default));color:var(--ui-datepicker-day-color, var(--form-high-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-day:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-hover, var(--actions-low-surface-hover))}.ui-datepicker-day:active:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-pressed, var(--actions-low-surface-pressed))}.ui-datepicker-day:focus-visible{outline:none}.ui-datepicker-day:focus-visible:before{background-color:var(--ui-datepicker-day-surface-focus, 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(--ui-datepicker-day-focus-ring-color, 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(--ui-datepicker-day-stroke-today, var(--actions-high-stroke-default))}.ui-datepicker-day._today:hover:not(:disabled):before{border-color:var(--ui-datepicker-day-stroke-today-hover, var(--actions-high-stroke-hover))}.ui-datepicker-day._today:focus-visible:before{border-color:var(--ui-datepicker-day-stroke-today-focus, var(--actions-high-stroke-focused))}.ui-datepicker-day._selected{color:var(--ui-datepicker-day-color-selected, var(--actions-high-content-default))}.ui-datepicker-day._selected:before{background-color:var(--ui-datepicker-day-surface-selected, var(--actions-high-surface-default))}.ui-datepicker-day._selected:hover:not(:disabled){color:var(--ui-datepicker-day-color-selected-hover, var(--actions-high-content-hover))}.ui-datepicker-day._selected:hover:not(:disabled):before{background-color:var(--ui-datepicker-day-surface-selected-hover, var(--actions-high-surface-hover))}.ui-datepicker-day._selected:focus-visible{color:var(--ui-datepicker-day-color-selected-focus, var(--actions-high-content-focused))}.ui-datepicker-day._selected:focus-visible:before{background-color:var(--ui-datepicker-day-surface-selected-focus, 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(--ui-datepicker-range-color-hover, 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(--ui-datepicker-range-background-hover, var(--informative-highlighthigh-surface-default))}.ui-datepicker-day:disabled{color:var(--ui-datepicker-day-color-disabled, 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(--ui-datepicker-time-stroke, 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(--ui-datepicker-font-family, var(--fontfamily-base));font-size:var(--ui-datepicker-time-font-size, var(--size-typography-title-md));font-weight:var(--ui-datepicker-weight, var(--weight-bold));font-variant-numeric:tabular-nums;color:var(--ui-datepicker-time-value-color, var(--form-high-content-default));text-align:center;cursor:text;appearance:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-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(--ui-datepicker-time-value-surface-hover, 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(--ui-datepicker-time-value-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-datepicker-time-value:disabled,.ui-datepicker-time-value[aria-disabled=true]{color:var(--ui-datepicker-time-value-color-disabled, 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(--ui-datepicker-time-btn-color, var(--form-low-content-default));cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-datepicker-time-btn:hover:not(:disabled){background-color:var(--ui-datepicker-time-btn-surface-hover, var(--informative-highlightlow-surface-hover));color:var(--ui-datepicker-time-btn-color-hover, var(--form-high-content-hover))}.ui-datepicker-time-btn:disabled{color:var(--ui-datepicker-time-btn-color-disabled, 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(--ui-datepicker-weight, var(--weight-bold));color:var(--ui-datepicker-time-colon-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(--ui-datepicker-buttonbar-stroke, var(--form-high-stroke-default))}\n"]
1863
+ }]
1864
+ }],
1865
+ ctorParameters: () => [],
1866
+ propDecorators: {
1867
+ placeholder: [{
1868
+ type: i0.Input,
1869
+ args: [{
1870
+ isSignal: true,
1871
+ alias: "placeholder",
1872
+ required: false
1873
+ }]
1874
+ }],
1875
+ icon: [{
1876
+ type: i0.Input,
1877
+ args: [{
1878
+ isSignal: true,
1879
+ alias: "icon",
1880
+ required: false
1881
+ }]
1882
+ }],
1883
+ showIcon: [{
1884
+ type: i0.Input,
1885
+ args: [{
1886
+ isSignal: true,
1887
+ alias: "showIcon",
1888
+ required: false
1889
+ }]
1890
+ }],
1891
+ iconAriaLabel: [{
1892
+ type: i0.Input,
1893
+ args: [{
1894
+ isSignal: true,
1895
+ alias: "iconAriaLabel",
1896
+ required: false
1897
+ }]
1898
+ }],
1899
+ showClear: [{
1900
+ type: i0.Input,
1901
+ args: [{
1902
+ isSignal: true,
1903
+ alias: "showClear",
1904
+ required: false
1905
+ }]
1906
+ }],
1907
+ valueType: [{
1908
+ type: i0.Input,
1909
+ args: [{
1910
+ isSignal: true,
1911
+ alias: "valueType",
1912
+ required: true
1913
+ }]
1914
+ }],
1915
+ selectionMode: [{
1916
+ type: i0.Input,
1917
+ args: [{
1918
+ isSignal: true,
1919
+ alias: "selectionMode",
1920
+ required: false
1921
+ }]
1922
+ }],
1923
+ view: [{
1924
+ type: i0.Input,
1925
+ args: [{
1926
+ isSignal: true,
1927
+ alias: "view",
1928
+ required: false
1929
+ }]
1930
+ }],
1931
+ numberOfMonths: [{
1932
+ type: i0.Input,
1933
+ args: [{
1934
+ isSignal: true,
1935
+ alias: "numberOfMonths",
1936
+ required: false
1937
+ }]
1938
+ }],
1939
+ minDate: [{
1940
+ type: i0.Input,
1941
+ args: [{
1942
+ isSignal: true,
1943
+ alias: "minDate",
1944
+ required: false
1945
+ }]
1946
+ }],
1947
+ maxDate: [{
1948
+ type: i0.Input,
1949
+ args: [{
1950
+ isSignal: true,
1951
+ alias: "maxDate",
1952
+ required: false
1953
+ }]
1954
+ }],
1955
+ defaultViewDate: [{
1956
+ type: i0.Input,
1957
+ args: [{
1958
+ isSignal: true,
1959
+ alias: "defaultViewDate",
1960
+ required: false
1961
+ }]
1962
+ }],
1963
+ disabledDates: [{
1964
+ type: i0.Input,
1965
+ args: [{
1966
+ isSignal: true,
1967
+ alias: "disabledDates",
1968
+ required: false
1969
+ }]
1970
+ }],
1971
+ disabledDays: [{
1972
+ type: i0.Input,
1973
+ args: [{
1974
+ isSignal: true,
1975
+ alias: "disabledDays",
1976
+ required: false
1977
+ }]
1978
+ }],
1979
+ firstDayOfWeek: [{
1980
+ type: i0.Input,
1981
+ args: [{
1982
+ isSignal: true,
1983
+ alias: "firstDayOfWeek",
1984
+ required: false
1985
+ }]
1986
+ }],
1987
+ locale: [{
1988
+ type: i0.Input,
1989
+ args: [{
1990
+ isSignal: true,
1991
+ alias: "locale",
1992
+ required: false
1993
+ }]
1994
+ }],
1995
+ dateFormat: [{
1996
+ type: i0.Input,
1997
+ args: [{
1998
+ isSignal: true,
1999
+ alias: "dateFormat",
2000
+ required: false
2001
+ }]
2002
+ }],
2003
+ allowInput: [{
2004
+ type: i0.Input,
2005
+ args: [{
2006
+ isSignal: true,
2007
+ alias: "allowInput",
2008
+ required: false
2009
+ }]
2010
+ }],
2011
+ parseDate: [{
2012
+ type: i0.Input,
2013
+ args: [{
2014
+ isSignal: true,
2015
+ alias: "parseDate",
2016
+ required: false
2017
+ }]
2018
+ }],
2019
+ showTime: [{
2020
+ type: i0.Input,
2021
+ args: [{
2022
+ isSignal: true,
2023
+ alias: "showTime",
2024
+ required: false
2025
+ }]
2026
+ }],
2027
+ timeOnly: [{
2028
+ type: i0.Input,
2029
+ args: [{
2030
+ isSignal: true,
2031
+ alias: "timeOnly",
2032
+ required: false
2033
+ }]
2034
+ }],
2035
+ hourFormat: [{
2036
+ type: i0.Input,
2037
+ args: [{
2038
+ isSignal: true,
2039
+ alias: "hourFormat",
2040
+ required: false
2041
+ }]
2042
+ }],
2043
+ stepMinute: [{
2044
+ type: i0.Input,
2045
+ args: [{
2046
+ isSignal: true,
2047
+ alias: "stepMinute",
2048
+ required: false
2049
+ }]
2050
+ }],
2051
+ editableTime: [{
2052
+ type: i0.Input,
2053
+ args: [{
2054
+ isSignal: true,
2055
+ alias: "editableTime",
2056
+ required: false
2057
+ }]
2058
+ }],
2059
+ showButtonBar: [{
2060
+ type: i0.Input,
2061
+ args: [{
2062
+ isSignal: true,
2063
+ alias: "showButtonBar",
2064
+ required: false
2065
+ }]
2066
+ }],
2067
+ ripple: [{
2068
+ type: i0.Input,
2069
+ args: [{
2070
+ isSignal: true,
2071
+ alias: "ripple",
2072
+ required: false
2073
+ }]
2074
+ }],
2075
+ todayLabel: [{
2076
+ type: i0.Input,
2077
+ args: [{
2078
+ isSignal: true,
2079
+ alias: "todayLabel",
2080
+ required: false
2081
+ }]
2082
+ }],
2083
+ clearLabel: [{
2084
+ type: i0.Input,
2085
+ args: [{
2086
+ isSignal: true,
2087
+ alias: "clearLabel",
2088
+ required: false
2089
+ }]
2090
+ }],
2091
+ formatHintLabel: [{
2092
+ type: i0.Input,
2093
+ args: [{
2094
+ isSignal: true,
2095
+ alias: "formatHintLabel",
2096
+ required: false
2097
+ }]
2098
+ }],
2099
+ panelAriaLabel: [{
2100
+ type: i0.Input,
2101
+ args: [{
2102
+ isSignal: true,
2103
+ alias: "panelAriaLabel",
2104
+ required: false
2105
+ }]
2106
+ }],
2107
+ prevAriaLabel: [{
2108
+ type: i0.Input,
2109
+ args: [{
2110
+ isSignal: true,
2111
+ alias: "prevAriaLabel",
2112
+ required: false
2113
+ }]
2114
+ }],
2115
+ nextAriaLabel: [{
2116
+ type: i0.Input,
2117
+ args: [{
2118
+ isSignal: true,
2119
+ alias: "nextAriaLabel",
2120
+ required: false
2121
+ }]
2122
+ }],
2123
+ hoursAriaLabel: [{
2124
+ type: i0.Input,
2125
+ args: [{
2126
+ isSignal: true,
2127
+ alias: "hoursAriaLabel",
2128
+ required: false
2129
+ }]
2130
+ }],
2131
+ minutesAriaLabel: [{
2132
+ type: i0.Input,
2133
+ args: [{
2134
+ isSignal: true,
2135
+ alias: "minutesAriaLabel",
2136
+ required: false
2137
+ }]
2138
+ }],
2139
+ meridiemAriaLabel: [{
2140
+ type: i0.Input,
2141
+ args: [{
2142
+ isSignal: true,
2143
+ alias: "meridiemAriaLabel",
2144
+ required: false
2145
+ }]
2146
+ }],
2147
+ incrementHoursAriaLabel: [{
2148
+ type: i0.Input,
2149
+ args: [{
2150
+ isSignal: true,
2151
+ alias: "incrementHoursAriaLabel",
2152
+ required: false
2153
+ }]
2154
+ }],
2155
+ decrementHoursAriaLabel: [{
2156
+ type: i0.Input,
2157
+ args: [{
2158
+ isSignal: true,
2159
+ alias: "decrementHoursAriaLabel",
2160
+ required: false
2161
+ }]
2162
+ }],
2163
+ incrementMinutesAriaLabel: [{
2164
+ type: i0.Input,
2165
+ args: [{
2166
+ isSignal: true,
2167
+ alias: "incrementMinutesAriaLabel",
2168
+ required: false
2169
+ }]
2170
+ }],
2171
+ decrementMinutesAriaLabel: [{
2172
+ type: i0.Input,
2173
+ args: [{
2174
+ isSignal: true,
2175
+ alias: "decrementMinutesAriaLabel",
2176
+ required: false
2177
+ }]
2178
+ }],
2179
+ toggleMeridiemAriaLabel: [{
2180
+ type: i0.Input,
2181
+ args: [{
2182
+ isSignal: true,
2183
+ alias: "toggleMeridiemAriaLabel",
2184
+ required: false
2185
+ }]
2186
+ }],
2187
+ inline: [{
2188
+ type: i0.Input,
2189
+ args: [{
2190
+ isSignal: true,
2191
+ alias: "inline",
2192
+ required: false
2193
+ }]
2194
+ }],
2195
+ showOnFocus: [{
2196
+ type: i0.Input,
2197
+ args: [{
2198
+ isSignal: true,
2199
+ alias: "showOnFocus",
2200
+ required: false
2201
+ }]
2202
+ }],
2203
+ autoFlip: [{
2204
+ type: i0.Input,
2205
+ args: [{
2206
+ isSignal: true,
2207
+ alias: "autoFlip",
2208
+ required: false
2209
+ }]
2210
+ }],
2211
+ closeOnSelect: [{
2212
+ type: i0.Input,
2213
+ args: [{
2214
+ isSignal: true,
2215
+ alias: "closeOnSelect",
2216
+ required: false
2217
+ }]
2218
+ }],
2219
+ panelStyleClass: [{
2220
+ type: i0.Input,
2221
+ args: [{
2222
+ isSignal: true,
2223
+ alias: "panelStyleClass",
2224
+ required: false
2225
+ }]
2226
+ }],
2227
+ autocomplete: [{
2228
+ type: i0.Input,
2229
+ args: [{
2230
+ isSignal: true,
2231
+ alias: "autocomplete",
2232
+ required: false
2233
+ }]
2234
+ }],
2235
+ valueChange: [{
2236
+ type: i0.Output,
2237
+ args: ["valueChange"]
2238
+ }],
2239
+ dateSelect: [{
2240
+ type: i0.Output,
2241
+ args: ["dateSelect"]
2242
+ }],
2243
+ monthChange: [{
2244
+ type: i0.Output,
2245
+ args: ["monthChange"]
2246
+ }],
2247
+ opened: [{
2248
+ type: i0.Output,
2249
+ args: ["opened"]
2250
+ }],
2251
+ closed: [{
2252
+ type: i0.Output,
2253
+ args: ["closed"]
2254
+ }],
2255
+ cleared: [{
2256
+ type: i0.Output,
2257
+ args: ["cleared"]
2258
+ }],
2259
+ inputFocus: [{
2260
+ type: i0.Output,
2261
+ args: ["inputFocus"]
2262
+ }],
2263
+ inputBlur: [{
2264
+ type: i0.Output,
2265
+ args: ["inputBlur"]
2266
+ }],
2267
+ dateTemplate: [{
2268
+ type: i0.ContentChild,
2269
+ args: ["date", { isSignal: true }]
2270
+ }],
2271
+ buttonBarTemplate: [{
2272
+ type: i0.ContentChild,
2273
+ args: ["buttonbar", { isSignal: true }]
2274
+ }],
2275
+ iconTemplate: [{
2276
+ type: i0.ContentChild,
2277
+ args: ["icon", { isSignal: true }]
2278
+ }],
2279
+ triggerInput: [{
2280
+ type: i0.ViewChild,
2281
+ args: ["trigger", { isSignal: true }]
2282
+ }],
2283
+ triggerRef: [{
2284
+ type: i0.ViewChild,
2285
+ args: ["trigger", {
2286
+ read: ElementRef,
2287
+ isSignal: true
2288
+ }]
2289
+ }],
2290
+ panelEl: [{
2291
+ type: i0.ViewChild,
2292
+ args: ["panel", { isSignal: true }]
2293
+ }],
2294
+ triggerWrapperEl: [{
2295
+ type: i0.ViewChild,
2296
+ args: ["triggerWrapper", { isSignal: true }]
2297
+ }]
2298
+ }
2299
+ });
2055
2300
  export { UiDatepicker };
2056
- //# sourceMappingURL=4sh-ui-kit-forms-ui-datepicker.mjs.map
2301
+
2302
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-datepicker.mjs.map