@4sh/ui-kit 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,1001 +1,1676 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, numberAttribute, output, contentChild, viewChild, viewChildren, ElementRef, signal, computed, effect, untracked, isDevMode, forwardRef, Component } from '@angular/core';
3
- import { 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 { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
8
- import { BaseFormField, formatLabel, dropdownOverlayPositions, createOptionResolver, hasFocus, UiBrowserFill } from '@4sh/ui-kit/forms';
9
- import { UiField } from '@4sh/ui-kit/forms/ui-field';
10
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
11
- import { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';
12
- import { UiChip } from '@4sh/ui-kit/informative/ui-chip';
13
- import { UiMotion } from '@4sh/ui-kit/motion';
14
- import { closeOnNavigation } from '@4sh/ui-kit/overlay';
15
-
16
- /**
17
- * ui-autocomplete — headless suggestion field built on the `ui-field` shell
18
- * (label + box + helper) with a token-styled suggestions panel in a CDK overlay.
19
- *
20
- * Two-way bound via `[(ngModel)]` (or reactive forms) through
21
- * {@link BaseFormField}. Typing emits `completeMethod` (debounced by `delay`,
22
- * gated by `minLength`); the parent answers by updating `suggestions`. Supports
23
- * primitive or object suggestions (`optionLabel` / `optionValue` /
24
- * `optionDisabled`), grouped suggestions, a `dropdown` trigger
25
- * (`dropdownMode`), a `multiple` mode (array model, removable chips in the
26
- * field, `unique`, `maxSelectedLabels`), `forceSelection`, `showClear`,
27
- * `loading`, configurable
28
- * focus behaviour (`autoOptionFocus` / `selectOnFocus` / `focusOnHover`) and
29
- * CDK virtual scrolling (plus lazy loading).
30
- *
31
- * The trigger is a real `<input>` following the WAI-ARIA combobox pattern
32
- * (`role="combobox"` + `aria-activedescendant`: focus never leaves the input,
33
- * suggestions are only visually focused).
34
- *
35
- * A value the browser writes into the input without focus (autofill) updates
36
- * the model and emits `completeMethod` without opening the panel; with
37
- * `forceSelection`, the suggestion carrying that exact label is then selected.
38
- *
39
- * Customisation: the `#item`, `#selectedItem`, `#group`, `#header`, `#footer`
40
- * and `#empty` templates, `panelStyleClass`, and the local SCSS variables.
41
- *
42
- * @example
43
- * ```html
44
- * <ui-autocomplete label="Pays" [(ngModel)]="country"
45
- * [suggestions]="results()" optionLabel="name"
46
- * (completeMethod)="search($event)" />
47
- * ```
48
- */
49
- class UiAutocomplete extends BaseFormField {
50
- constructor() {
51
- super();
52
- /** Suggestions to display — set by the parent in response to `completeMethod`. */
53
- this.suggestions = input([], /* @ts-ignore */
54
- ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
55
- /** Field name (dot-path) to read a label from, when suggestions are objects. */
56
- this.optionLabel = input(/* @ts-ignore */
57
- ...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
58
- /** Field name (dot-path) to read the value from, when suggestions are objects. */
59
- this.optionValue = input(/* @ts-ignore */
60
- ...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
61
- /** Field name (dot-path) to read the disabled flag from, when suggestions are objects. */
62
- this.optionDisabled = input(/* @ts-ignore */
63
- ...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
64
- /** Property used to compare object values for equality (highlighting the current value). */
65
- this.dataKey = input(/* @ts-ignore */
66
- ...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
67
- /** Treat `suggestions` as groups (`optionGroupLabel` + `optionGroupChildren`). */
68
- this.group = input(false, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
69
- /** Field name of a group's label. */
70
- this.optionGroupLabel = input('label', /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
72
- /** Field name of a group's children array. */
73
- this.optionGroupChildren = input('items', /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
75
- /** Native placeholder shown when the input is empty. */
76
- this.placeholder = input(/* @ts-ignore */
77
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
78
- /** Minimum number of characters before `completeMethod` is emitted while typing. */
79
- this.minLength = input(1, { ...(ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
80
- /** Debounce (ms) between the last keystroke and `completeMethod`. */
81
- this.delay = input(300, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
82
- /** Emit a query as soon as the input is focused (before any typing). */
83
- this.completeOnFocus = input(false, { ...(ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
84
- /** Show a trigger button that queries suggestions on click. */
85
- this.dropdown = input(false, { ...(ngDevMode ? { debugName: "dropdown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
86
- /** `blank` queries with an empty string, `current` with the input's current text. */
87
- this.dropdownMode = input('blank', /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "dropdownMode" }] : /* istanbul ignore next */ []));
89
- /** Accessible name of the dropdown trigger. */
90
- this.dropdownAriaLabel = input('Afficher les suggestions', /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "dropdownAriaLabel" }] : /* istanbul ignore next */ []));
92
- /** FontAwesome icon of the dropdown trigger. */
93
- this.dropdownIcon = input('angle-down', /* @ts-ignore */
94
- ...(ngDevMode ? [{ debugName: "dropdownIcon" }] : /* istanbul ignore next */ []));
95
- /**
96
- * Validate the typed text against the suggestions on blur: if it matches
97
- * none, the input is cleared so the model always holds a real suggestion.
98
- */
99
- this.forceSelection = input(false, { ...(ngDevMode ? { debugName: "forceSelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
100
- /** Ripple Effect */
101
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
102
- /** Multi-selection: the model is an array, each pick renders as a removable chip in the field. */
103
- this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
104
- /** With `multiple`: ignore picks whose value is already selected (no duplicates). */
105
- this.unique = input(true, { ...(ngDevMode ? { debugName: "unique" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
106
- /** With `multiple`: max number of chips rendered; the rest collapses behind `overflowLabel`. */
107
- this.maxSelectedLabels = input(/* @ts-ignore */
108
- ...(ngDevMode ? [undefined, { debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []));
109
- /** With `multiple`: format of the collapsed-count chip (`{0}` = hidden count). */
110
- this.overflowLabel = input('(+{0} autres)', /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []));
112
- /** With `multiple`: accessible label of each chip's remove action — `{0}` is the chip label. */
113
- this.removeTagLabel = input('Supprimer {0}', /* @ts-ignore */
114
- ...(ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []));
115
- /** Show a clear (×) action when the input holds text. */
116
- this.showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
117
- /** Accessible name of the clear action. */
118
- this.clearAriaLabel = input('Effacer la saisie', /* @ts-ignore */
119
- ...(ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []));
120
- /** Loading state: a spinner replaces the dropdown trigger while a query runs. */
121
- this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
122
- /** Message shown when a query returns no suggestion. */
123
- this.emptyMessage = input('Aucun résultat', /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
125
- /** Render the empty-state row when there is no suggestion. */
126
- this.showEmptyMessage = input(true, { ...(ngDevMode ? { debugName: "showEmptyMessage" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
127
- /** Visually focus the first suggestion when the panel opens. */
128
- this.autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
129
- /** Set the value as soon as a suggestion is visually focused with the keyboard. */
130
- this.selectOnFocus = input(false, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
131
- /** Visually focus the suggestion under the mouse pointer. */
132
- this.focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
133
- /** Render the suggestions through a CDK virtual-scroll viewport. */
134
- this.virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
135
- /** Fixed height (px) of one row — required by the virtual scroller. */
136
- this.virtualScrollItemSize = input(40, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
137
- /** With `virtualScroll`: emit `lazyLoad` with the rendered range (lazy loading). */
138
- this.lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
139
- /** Max height of the suggestions list (CSS size, e.g. `'320px'`). Defaults from the SCSS. */
140
- this.scrollHeight = input(/* @ts-ignore */
141
- ...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
142
- /**
143
- * Auto-flip the panel above the input when there isn't enough room below
144
- * (default). Set `false` to lock it below the input regardless of space.
145
- */
146
- this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
147
- /** Extra class(es) applied to the panel (scoped custom styling). */
148
- this.panelStyleClass = input(/* @ts-ignore */
149
- ...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
150
- /** Emitted (debounced) when a query should be run — fill `suggestions` from it. */
151
- this.completeMethod = output();
152
- /** Emitted whenever the value changes (selection, typing, clear). */
153
- this.valueChange = output();
154
- /** Emitted when a suggestion is picked (payload is the original suggestion). */
155
- this.optionSelect = output();
156
- /** With `multiple`: emitted when a selected value is removed (payload is the removed suggestion). */
157
- this.optionUnselect = output();
158
- /** Emitted when the panel opens. */
159
- this.opened = output();
160
- /** Emitted when the panel closes. */
161
- this.closed = output();
162
- /** Emitted when the value is cleared. */
163
- this.cleared = output();
164
- /** Emitted when the dropdown trigger is clicked. */
165
- this.dropdownClick = output();
166
- /** Emitted when the virtual viewport's rendered range changes (`virtualScroll` + `lazy`). */
167
- this.lazyLoad = output();
168
- /** Emitted when the input receives focus. */
169
- this.inputFocus = output();
170
- /** Emitted when the input loses focus. */
171
- this.inputBlur = output();
172
- /** Custom suggestion template: `<ng-template #item let-option let-selected="selected">`. */
173
- this.itemTemplate = contentChild('item', /* @ts-ignore */
174
- ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
175
- /** Custom selected-value template (per selected value, `multiple`): `<ng-template #selectedItem let-option let-remove="remove">`. */
176
- this.selectedItemTemplate = contentChild('selectedItem', /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []));
178
- /** Custom group-header template: `<ng-template #group let-group>`. */
179
- this.groupTemplate = contentChild('group', /* @ts-ignore */
180
- ...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
181
- /** Free content pinned above the list. */
182
- this.headerTemplate = contentChild('header', /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
184
- /** Free content pinned under the list. */
185
- this.footerTemplate = contentChild('footer', /* @ts-ignore */
186
- ...(ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []));
187
- /** Custom empty-state template. */
188
- this.emptyTemplate = contentChild('empty', /* @ts-ignore */
189
- ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
190
- /** @ignore Component root (overlay origin + outside-focus detection). */
191
- this.containerEl = viewChild.required('container', /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
193
- /** @ignore Focusable input (combobox). */
194
- this.inputEl = viewChild.required('inputEl', /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
196
- /** @ignore Panel root element (for scrolling the focused option into view). */
197
- this.panelEl = viewChild('panel', /* @ts-ignore */
198
- ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
199
- /** @ignore Virtual-scroll viewport (lazy range + scrollToIndex). */
200
- this.viewport = viewChild(CdkVirtualScrollViewport, /* @ts-ignore */
201
- ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
202
- /** @ignore Rendered chips (`multiple` mode, roving focus). */
203
- this.tagEls = viewChildren('tagEl', { ...(ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {}), read: ElementRef });
204
- /** @ignore */
205
- this.panelOpen = signal(false, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
207
- /** @ignore Element the overlay is anchored to (the field box). */
208
- this.overlayOrigin = signal(null, /* @ts-ignore */
209
- ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
210
- /** @ignore Panel width, locked to the field box width on open. */
211
- this.overlayWidth = signal(null, /* @ts-ignore */
212
- ...(ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []));
213
- /** @ignore Text currently shown in the `<input>`. */
214
- this.inputText = signal('', /* @ts-ignore */
215
- ...(ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []));
216
- /** @ignore Index of the visually focused option among the visible options (-1 = none). */
217
- this.focusedIndex = signal(-1, /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
219
- /** @ignore Index of the chip holding the roving focus (-1 = the input, `multiple` mode). */
220
- this.focusedTag = signal(-1, /* @ts-ignore */
221
- ...(ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []));
222
- /** @ignore Entries recorded at pick time so chip labels survive suggestion churn (`multiple`). */
223
- this.selectionCache = signal([], /* @ts-ignore */
224
- ...(ngDevMode ? [{ debugName: "selectionCache" }] : /* istanbul ignore next */ []));
225
- /** @ignore A query has been emitted and is awaiting fresh suggestions (feeds `completeOnFocus`). */
226
- this.queryDirty = false;
227
- /** @ignore A written value whose label could not be resolved yet (see `writeValue`). */
228
- this.pendingLabelSync = signal(false, /* @ts-ignore */
229
- ...(ngDevMode ? [{ debugName: "pendingLabelSync" }] : /* istanbul ignore next */ []));
230
- /** @ignore `forceSelection`: a text written by the browser, awaiting the suggestion it names. */
231
- this.pendingFill = signal(null, /* @ts-ignore */
232
- ...(ngDevMode ? [{ debugName: "pendingFill" }] : /* istanbul ignore next */ []));
233
- // --- Derived state -----------------------------------------------------
234
- /** @ignore */
235
- this.listboxId = computed(() => `${this.resolvedId()}-list`, /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []));
237
- /** @ignore Icon size aligned with the field size. */
238
- this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
239
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
240
- /** @ignore Flat entries (no groups). */
241
- this.flatEntries = computed(() => {
242
- if (this.group())
243
- return this.groupEntries().flatMap((g) => g.entries);
244
- return (this.suggestions() ?? []).map((option) => this.toEntry(option));
245
- }, /* @ts-ignore */
246
- ...(ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []));
247
- /** @ignore Groups of entries (when `group` is enabled). */
248
- this.groupEntries = computed(() => {
249
- if (!this.group())
250
- return [];
251
- return (this.suggestions() ?? []).map((groupOption) => {
252
- const children = this.getField(groupOption, this.optionGroupChildren());
253
- return {
254
- label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? '',
255
- original: groupOption,
256
- entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option)),
257
- };
258
- });
259
- }, /* @ts-ignore */
260
- ...(ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []));
261
- /** @ignore Rendered rows: suggestions + their group headers, with stable ids. */
262
- this.visibleRows = computed(() => {
263
- const rows = [];
264
- let index = 0;
265
- const pushOption = (entry) => {
266
- rows.push({
267
- kind: 'option',
268
- key: `${this.listboxId()}-${index}`,
269
- id: `${this.resolvedId()}-option-${index}`,
270
- index,
271
- entry,
272
- selected: this.isValueSelected(entry.value),
273
- });
274
- index++;
275
- };
276
- if (this.group()) {
277
- this.groupEntries().forEach((g, gi) => {
278
- if (!g.entries.length)
279
- return;
280
- rows.push({
281
- kind: 'group',
282
- key: `${this.listboxId()}-group-${gi}`,
283
- label: g.label,
284
- original: g.original,
285
- });
286
- g.entries.forEach(pushOption);
287
- });
288
- }
289
- else {
290
- this.flatEntries().forEach(pushOption);
291
- }
292
- return rows;
293
- }, /* @ts-ignore */
294
- ...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
295
- /** @ignore Visible option rows only (visual-focus space). */
296
- this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === 'option'), /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
298
- /** @ignore aria-setsize of the visible listbox. */
299
- this.optionCount = computed(() => this.visibleOptions().length, /* @ts-ignore */
300
- ...(ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []));
301
- /** @ignore trackBy of the virtual list. */
302
- this.trackRow = (_, row) => row.key;
303
- /** @ignore The input holds text. */
304
- this.hasText = computed(() => this.inputText().length > 0, /* @ts-ignore */
305
- ...(ngDevMode ? [{ debugName: "hasText" }] : /* istanbul ignore next */ []));
306
- /** @ignore The clear action is shown. */
307
- this.showClearButton = computed(() => this.showClear() &&
308
- (this.hasText() || (this.multiple() && this.selectedValues().length > 0)) &&
309
- !this.isDisabled() &&
310
- !this.readonly(), /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
312
- /** @ignore Selected values in `multiple` mode (always an array). */
313
- this.selectedValues = computed(() => {
314
- if (!this.multiple())
315
- return [];
316
- const v = this.modelValue();
317
- return Array.isArray(v) ? v : [];
318
- }, /* @ts-ignore */
319
- ...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
320
- /** @ignore One row per selected value (label resolved from the pick-time cache first). */
321
- this.tagRows = computed(() => this.selectedValues().map((value, index) => {
322
- const label = this.labelOfSelected(value);
323
- return { value, index, label, removeAriaLabel: formatLabel(this.removeTagLabel(), label) };
324
- }), /* @ts-ignore */
325
- ...(ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []));
326
- /** @ignore Rows actually rendered as chips (`maxSelectedLabels` cap). */
327
- this.visibleTagRows = computed(() => {
328
- const all = this.tagRows();
329
- const max = this.maxSelectedLabels();
330
- return max != null && max > 0 && all.length > max ? all.slice(0, max) : all;
331
- }, /* @ts-ignore */
332
- ...(ngDevMode ? [{ debugName: "visibleTagRows" }] : /* istanbul ignore next */ []));
333
- /** @ignore Number of selected values collapsed behind the overflow chip. */
334
- this.overflowCount = computed(() => this.tagRows().length - this.visibleTagRows().length, /* @ts-ignore */
335
- ...(ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []));
336
- /** @ignore Rendered overflow chip label (e.g. `(+2 autres)`). */
337
- this.overflowText = computed(() => formatLabel(this.overflowLabel(), this.overflowCount()), /* @ts-ignore */
338
- ...(ngDevMode ? [{ debugName: "overflowText" }] : /* istanbul ignore next */ []));
339
- /** @ignore Contexts handed to the `#selectedItem` template (one per displayed value). */
340
- this.selectedItemContexts = computed(() => this.visibleTagRows().map((tag) => ({
341
- $implicit: this.originalOfSelected(tag.value),
342
- option: this.originalOfSelected(tag.value),
343
- index: tag.index,
344
- remove: () => this.removeAt(tag.index),
345
- })), /* @ts-ignore */
346
- ...(ngDevMode ? [{ debugName: "selectedItemContexts" }] : /* istanbul ignore next */ []));
347
- /** @ignore Placeholder hidden as soon as values are selected (`multiple`), and
348
- * while a floating label is at rest: it already holds that spot. */
349
- this.effectivePlaceholder = computed(() => this.hasFloatLabel() || (this.multiple() && this.selectedValues().length)
350
- ? ''
351
- : (this.placeholder() ?? ''), /* @ts-ignore */
352
- ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
353
- /** @ignore Keeps a floating label raised once focus leaves. */
354
- this.isFilled = computed(() => this.hasText() || this.selectedValues().length > 0, /* @ts-ignore */
355
- ...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
356
- /** @ignore Chips are removable unless the field is disabled/readonly. */
357
- this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), /* @ts-ignore */
358
- ...(ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []));
359
- /** @ignore The empty-state row is rendered. */
360
- this.showEmpty = computed(() => this.showEmptyMessage() && !this.loading() && !this.visibleRows().length, /* @ts-ignore */
361
- ...(ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []));
362
- /** @ignore id of the visually focused option (for aria-activedescendant). */
363
- this.activeDescendant = computed(() => {
364
- if (!this.panelOpen())
365
- return null;
366
- return this.visibleOptions()[this.focusedIndex()]?.id ?? null;
367
- }, /* @ts-ignore */
368
- ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
369
- /** @ignore Below the input, flipping above when `autoFlip` and space is lacking. */
370
- this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
371
- ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
372
- /** @ignore Concrete viewport height (px) for the virtual scroller. */
373
- this.viewportHeight = computed(() => {
374
- const rows = this.visibleRows().length || 1;
375
- const max = this.scrollHeightPx();
376
- return `${Math.min(rows * this.virtualScrollItemSize(), max)}px`;
377
- }, /* @ts-ignore */
378
- ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
379
- /** @ignore `scrollHeight` parsed to px, with size-based defaults (matches the SCSS). */
380
- this.scrollHeightPx = computed(() => {
381
- const parsed = Number.parseFloat(this.scrollHeight() ?? '');
382
- if (!Number.isNaN(parsed) && parsed > 0)
383
- return parsed;
384
- return this.size() === 'small' ? 256 : 312;
385
- }, /* @ts-ignore */
386
- ...(ngDevMode ? [{ debugName: "scrollHeightPx" }] : /* istanbul ignore next */ []));
387
- /** @ignore Shared option resolution (see `option-resolver.ts`). */
388
- this.resolver = createOptionResolver({
389
- optionValue: this.optionValue,
390
- optionLabel: this.optionLabel,
391
- optionDisabled: this.optionDisabled,
392
- dataKey: this.dataKey,
393
- });
394
- // Never carry an open panel over to the next page (the field can live in
395
- // an app shell that survives the navigation).
396
- closeOnNavigation(() => this.close());
397
- // Late label resolution: a value written before suggestions exist (e.g. a
398
- // pre-filled form using `optionValue`) displays the raw value; swap in the
399
- // real label once a matching suggestion arrives.
400
- effect(() => {
401
- const entry = this.pendingLabelSync()
402
- ? this.entryOfValue(untracked(this.modelValue) ?? null)
403
- : undefined;
404
- if (!entry)
405
- return;
406
- untracked(() => {
407
- this.pendingLabelSync.set(false);
408
- this.inputText.set(entry.label);
409
- });
410
- });
411
- // `forceSelection` applies the blur rule to a browser fill as soon as a
412
- // suggestion carries its label: no blur will follow to apply it.
413
- effect(() => {
414
- const fill = this.pendingFill();
415
- const match = fill ? this.entryLabelled(fill.text) : undefined;
416
- if (!fill || !match)
417
- return;
418
- untracked(() => {
419
- this.pendingFill.set(null);
420
- this.selectEntry(match, fill.event, false);
421
- });
422
- });
423
- // Forward the rendered range of the virtual viewport (lazy loading).
424
- effect((onCleanup) => {
425
- const vp = this.viewport();
426
- if (!vp || !this.lazy())
427
- return;
428
- const sub = vp.renderedRangeStream.subscribe((range) => this.lazyLoad.emit({ first: range.start, last: range.end }));
429
- onCleanup(() => sub.unsubscribe());
430
- });
431
- // Re-measure the virtual viewport once it exists: it initialises while the
432
- // overlay panel is still laying out and can capture a 0 viewport size,
433
- // which freezes the rendered range on the first rows.
434
- effect(() => {
435
- const vp = this.viewport();
436
- if (!vp)
437
- return;
438
- setTimeout(() => {
439
- vp.checkViewportSize();
440
- this.scrollFocusedIntoView();
441
- });
442
- });
443
- // A11y / API safeguards (dev only).
444
- if (isDevMode()) {
445
- effect(() => {
446
- if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) {
447
- console.warn('[ui-autocomplete] Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.');
448
- }
449
- });
450
- }
451
- }
452
- // --- CVA -----------------------------------------------------------------
453
- writeValue(value) {
454
- this.pendingFill.set(null);
455
- if (this.multiple()) {
456
- const values = Array.isArray(value) ? value : [];
457
- this.modelValue.set(values);
458
- this.inputText.set('');
459
- this.seedSelectionCache(values);
460
- return;
461
- }
462
- this.modelValue.set(value);
463
- this.inputText.set(this.labelOfValue(value));
464
- // With `optionValue`, the label may be unresolvable until the parent
465
- // provides suggestions — remember to re-resolve it later.
466
- this.pendingLabelSync.set(value !== null && value !== undefined && this.entryOfValue(value) === undefined);
467
- }
468
- /** @ignore Best-effort label seed for values written from the form, from the current suggestions. */
469
- seedSelectionCache(values) {
470
- const cache = this.selectionCache();
471
- const entries = this.flatEntries();
472
- const found = values
473
- .filter((v) => !cache.some((e) => this.equals(e.value, v)))
474
- .map((v) => entries.find((e) => this.equals(e.value, v)))
475
- .filter((e) => !!e);
476
- if (found.length)
477
- this.selectionCache.set([...cache, ...found]);
478
- }
479
- /** Moves focus to the input. */
480
- focus(options) {
481
- this.inputEl().nativeElement.focus(options);
482
- }
483
- /** Native `<input>` element (the combobox). */
484
- nativeInputElement() {
485
- return this.inputEl().nativeElement;
486
- }
487
- // --- Panel open/close ----------------------------------------------------
488
- /** @ignore */
489
- open() {
490
- if (this.isDisabled() || this.readonly() || this.panelOpen())
491
- return;
492
- const origin = this.containerEl().nativeElement.querySelector('.ui-field-box') ??
493
- this.containerEl().nativeElement;
494
- this.overlayOrigin.set(origin);
495
- this.overlayWidth.set(origin.getBoundingClientRect().width);
496
- this.focusedIndex.set(this.initialFocusIndex());
497
- this.panelOpen.set(true);
498
- this.opened.emit();
499
- // Scroll the focused option into view once the overlay is attached.
500
- // `setTimeout` (not rAF) so it also runs in throttled/background tabs.
501
- setTimeout(() => this.scrollFocusedIntoView());
502
- }
503
- /** Closes the suggestions panel; `focusInput` moves the focus back to the input. */
504
- close(focusInput = false) {
505
- if (!this.panelOpen())
506
- return;
507
- this.panelOpen.set(false);
508
- this.focusedIndex.set(-1);
509
- this.queryDirty = false;
510
- this.closed.emit();
511
- if (focusInput)
512
- this.focus();
513
- }
514
- /** @ignore First visually focused option when the panel opens. */
515
- initialFocusIndex() {
516
- if (!this.autoOptionFocus())
517
- return -1;
518
- return this.visibleOptions().findIndex((o) => !o.entry.disabled);
519
- }
520
- // --- Input interactions --------------------------------------------------
521
- /** @ignore Typing: view → form (free text unless `forceSelection`) + debounced query.
522
- * A value written by the browser without focus queries at once, panel closed. */
523
- onInput(event) {
524
- const input = event.target;
525
- const query = input.value;
526
- const typed = hasFocus(input);
527
- this.inputText.set(query);
528
- // The user took over the text: stop any pending label re-resolution.
529
- this.pendingLabelSync.set(false);
530
- this.pendingFill.set(!typed && this.forceSelection() && query ? { text: query, event } : null);
531
- // Free-text value while typing; `forceSelection` waits for a real suggestion,
532
- // `multiple` never lets the query mutate the selection, and an emptied input
533
- // commits `null` (same normalization as `clear()`).
534
- if (!this.forceSelection() && !this.multiple())
535
- this.commit(query === '' ? null : query);
536
- if (this.searchTimeout)
537
- clearTimeout(this.searchTimeout);
538
- if (query.length === 0) {
539
- if (!this.multiple())
540
- this.cleared.emit();
541
- this.close();
542
- return;
543
- }
544
- if (query.length < this.minLength()) {
545
- this.close();
546
- return;
547
- }
548
- this.focusedIndex.set(-1);
549
- if (!typed) {
550
- this.completeMethod.emit({ originalEvent: event, query });
551
- return;
552
- }
553
- this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
554
- }
555
- /** @ignore Value written by the browser without an `input` event. */
556
- onBrowserFill(event) {
557
- if (this.inputEl().nativeElement.value !== this.inputText())
558
- this.onInput(event);
559
- }
560
- /** @ignore Emit a query and open the panel. */
561
- runSearch(event, query) {
562
- this.queryDirty = true;
563
- this.completeMethod.emit({ originalEvent: event, query });
564
- this.open();
565
- }
566
- /** @ignore */
567
- onDropdownClick(event) {
568
- if (this.isDisabled() || this.readonly())
569
- return;
570
- if (this.panelOpen()) {
571
- this.close(true);
572
- return;
573
- }
574
- // Mark the query as already handled *before* focusing: `focus()` fires a
575
- // synchronous `focus` event on the input, and `completeOnFocus` would
576
- // otherwise run its own `completeMethod` in addition to the one below —
577
- // a single dropdown click must only ever emit one query.
578
- this.queryDirty = true;
579
- this.focus();
580
- const query = this.inputText();
581
- this.runSearch(event, this.dropdownMode() === 'current' ? query : '');
582
- this.dropdownClick.emit({ originalEvent: event, query });
583
- }
584
- /** @ignore */
585
- onInputFocus(event) {
586
- if (this.isDisabled())
587
- return;
588
- // Chrome's autofill sends a focus event to a field it fills without focusing it.
589
- const focused = hasFocus(event.target);
590
- if (focused && !this.queryDirty && this.completeOnFocus())
591
- this.runSearch(event, this.inputText());
592
- this.inputFocus.emit(event);
593
- }
594
- /** @ignore Mark touched + `forceSelection` validation when focus leaves the component. */
595
- onInputBlur(event) {
596
- const next = event.relatedTarget;
597
- const insideComponent = !!next && this.containerEl().nativeElement.contains(next);
598
- const insidePanel = !!next && this.panelEl()?.nativeElement.contains(next);
599
- if (!insideComponent && !insidePanel) {
600
- this.emitTouch();
601
- if (this.forceSelection())
602
- this.validateForceSelection(event);
603
- }
604
- this.inputBlur.emit(event);
605
- }
606
- /**
607
- * @ignore `forceSelection`: keep the model in sync with a real suggestion.
608
- * The text is matched (case/diacritics-insensitive) against a known label;
609
- * on no match the field is reset so the model never holds free text.
610
- */
611
- validateForceSelection(event) {
612
- this.pendingFill.set(null);
613
- const text = this.inputText().trim();
614
- if (!text)
615
- return;
616
- const match = this.entryLabelled(text);
617
- if (match) {
618
- this.selectEntry(match, event, false);
619
- }
620
- else if (this.multiple()) {
621
- // Never commit over the selection: just drop the invalid query.
622
- this.inputText.set('');
623
- }
624
- else {
625
- this.commit(null);
626
- this.inputText.set('');
627
- this.cleared.emit();
628
- }
629
- }
630
- /** @ignore Clear action (does not bubble to the input). */
631
- onClearClick(event) {
632
- event.stopPropagation();
633
- this.clear();
634
- }
635
- /** Clears the value. */
636
- clear() {
637
- this.pendingFill.set(null);
638
- if (this.multiple()) {
639
- this.commit([]);
640
- this.selectionCache.set([]);
641
- }
642
- else {
643
- this.commit(null);
644
- }
645
- this.inputText.set('');
646
- this.cleared.emit();
647
- this.close();
648
- this.focus();
649
- }
650
- // --- Keyboard --------------------------------------------------------------
651
- /** @ignore Keyboard on the input (combobox pattern). */
652
- onInputKeydown(event) {
653
- if (this.isDisabled() || this.readonly())
654
- return;
655
- if (this.multiple() && this.selectedValues().length) {
656
- const input = event.target;
657
- if (event.key === 'Backspace' && !this.inputText()) {
658
- this.removeAt(this.selectedValues().length - 1);
659
- return;
660
- }
661
- if (event.key === 'ArrowLeft' &&
662
- !this.selectedItemTemplate() &&
663
- input.selectionStart === 0 &&
664
- input.selectionEnd === 0) {
665
- event.preventDefault();
666
- this.focusTag(this.visibleTagRows().length - 1);
667
- return;
668
- }
669
- }
670
- switch (event.key) {
671
- case 'ArrowDown':
672
- event.preventDefault();
673
- this.panelOpen() ? this.moveFocus(1) : this.reopen();
674
- return;
675
- case 'ArrowUp':
676
- event.preventDefault();
677
- if (event.altKey)
678
- this.close(true);
679
- else if (this.panelOpen())
680
- this.moveFocus(-1);
681
- else
682
- this.reopen();
683
- return;
684
- case 'Home':
685
- if (!this.panelOpen())
686
- return;
687
- event.preventDefault();
688
- this.focusEdge(1);
689
- return;
690
- case 'End':
691
- if (!this.panelOpen())
692
- return;
693
- event.preventDefault();
694
- this.focusEdge(-1);
695
- return;
696
- case 'Enter':
697
- if (!this.panelOpen())
698
- return; // closed: native form submit
699
- event.preventDefault();
700
- this.selectFocused(event);
701
- return;
702
- case 'Escape':
703
- if (!this.panelOpen())
704
- return;
705
- event.preventDefault();
706
- event.stopPropagation();
707
- this.close(true);
708
- return;
709
- case 'Tab':
710
- if (this.panelOpen())
711
- this.close();
712
- return; // let the focus move on
713
- default:
714
- return;
715
- }
716
- }
717
- /** @ignore Re-open the panel with the current suggestions (no re-query). */
718
- reopen() {
719
- if (!this.visibleRows().length)
720
- return;
721
- this.open();
722
- if (this.focusedIndex() === -1)
723
- this.moveFocus(1);
724
- }
725
- // --- Options interactions --------------------------------------------------
726
- /** @ignore */
727
- onOptionClick(row, event) {
728
- event.preventDefault();
729
- this.selectEntry(row.entry, event);
730
- }
731
- /** @ignore Keep the focus on the input when clicking an option. */
732
- onOptionMousedown(event) {
733
- event.preventDefault();
734
- }
735
- /** @ignore */
736
- onOptionMouseEnter(row) {
737
- if (this.focusOnHover() && !row.entry.disabled)
738
- this.focusedIndex.set(row.index);
739
- }
740
- /** @ignore Pick a suggestion: set the value + display its label. */
741
- selectEntry(entry, event, closePanel = true) {
742
- if (entry.disabled || this.readonly())
743
- return;
744
- if (this.multiple()) {
745
- const alreadySelected = this.selectedValues().some((v) => this.equals(v, entry.value));
746
- if (!(this.unique() && alreadySelected)) {
747
- this.selectionCache.update((cache) => [...cache, entry]);
748
- this.commit([...this.selectedValues(), entry.value]);
749
- this.optionSelect.emit(entry.original);
750
- }
751
- // The query was just consumed: an open panel would show results for a
752
- // text the input no longer displays.
753
- this.inputText.set('');
754
- if (closePanel)
755
- this.close(true);
756
- return;
757
- }
758
- this.commit(entry.value);
759
- this.inputText.set(entry.label);
760
- this.optionSelect.emit(entry.original);
761
- if (closePanel)
762
- this.close(true);
763
- }
764
- /** @ignore */
765
- selectFocused(event) {
766
- const row = this.visibleOptions()[this.focusedIndex()];
767
- if (row)
768
- this.selectEntry(row.entry, event);
769
- else
770
- this.close(true);
771
- }
772
- /** @ignore Propagate a user-driven value change (view → form). */
773
- commit(value) {
774
- this.pendingLabelSync.set(false);
775
- this.modelValue.set(value);
776
- this.emitChange(value);
777
- this.valueChange.emit(value);
778
- }
779
- // --- Visual focus ------------------------------------------------------------
780
- /** @ignore Move the visual focus, skipping disabled options (no wrap). */
781
- moveFocus(delta) {
782
- const options = this.visibleOptions();
783
- if (!options.length)
784
- return;
785
- let i = this.focusedIndex();
786
- if (i === -1)
787
- i = delta === 1 ? -1 : options.length;
788
- for (i += delta; i >= 0 && i < options.length; i += delta) {
789
- if (!options[i].entry.disabled) {
790
- this.setFocusedIndex(i, null);
791
- return;
792
- }
793
- }
794
- }
795
- /** @ignore Focus the first (`1`) or last (`-1`) enabled option. */
796
- focusEdge(direction) {
797
- const options = this.visibleOptions();
798
- const from = direction === 1 ? 0 : options.length - 1;
799
- for (let i = from; i >= 0 && i < options.length; i += direction) {
800
- if (!options[i].entry.disabled) {
801
- this.setFocusedIndex(i, null);
802
- return;
803
- }
804
- }
805
- }
806
- /** @ignore Apply a visual-focus move (+ select-on-focus, + scroll into view). */
807
- setFocusedIndex(index, event) {
808
- this.focusedIndex.set(index);
809
- if (this.selectOnFocus()) {
810
- const row = this.visibleOptions()[index];
811
- if (row)
812
- this.selectEntry(row.entry, event ?? new Event('keydown'), false);
813
- }
814
- this.scrollFocusedIntoView();
815
- }
816
- /** @ignore Keep the visually focused option visible ('auto' — smooth is unreliable in throttled tabs). */
817
- scrollFocusedIntoView() {
818
- const row = this.visibleOptions()[this.focusedIndex()];
819
- if (!row)
820
- return;
821
- const vp = this.viewport();
822
- if (vp) {
823
- const rowIndex = this.visibleRows().findIndex((r) => r.kind === 'option' && r.index === row.index);
824
- if (rowIndex !== -1)
825
- vp.scrollToIndex(Math.max(0, rowIndex - 1), 'auto');
826
- return;
827
- }
828
- this.panelEl()
829
- ?.nativeElement.querySelector(`[id="${row.id}"]`)
830
- ?.scrollIntoView({ block: 'nearest' });
831
- }
832
- // --- Option resolution ----------------------------------------------------------
833
- /** @ignore Label displayed for a model value (best-effort against the suggestions). */
834
- /** Remove the selected value at `index` (`multiple` mode). */
835
- removeAt(index) {
836
- if (this.isDisabled() || this.readonly())
837
- return;
838
- const values = this.selectedValues();
839
- if (index < 0 || index >= values.length)
840
- return;
841
- const value = values[index];
842
- const cached = this.selectionCache().find((e) => this.equals(e.value, value));
843
- this.commit(values.filter((_, i) => i !== index));
844
- this.selectionCache.update((cache) => cache.filter((e) => !this.equals(e.value, value)));
845
- this.optionUnselect.emit((cached?.original ?? value));
846
- // Keep the roving focus coherent after removal.
847
- const remaining = this.visibleTagRows().length;
848
- if (remaining === 0)
849
- this.focusInput();
850
- else
851
- this.focusTag(Math.min(index, remaining - 1));
852
- }
853
- /** @ignore Roving keyboard on a chip (`multiple` mode). */
854
- onTagKeydown(event, index) {
855
- if (this.isDisabled() || this.readonly())
856
- return;
857
- switch (event.key) {
858
- case 'ArrowLeft':
859
- event.preventDefault();
860
- if (index > 0)
861
- this.focusTag(index - 1);
862
- return;
863
- case 'ArrowRight':
864
- event.preventDefault();
865
- if (index < this.visibleTagRows().length - 1)
866
- this.focusTag(index + 1);
867
- else
868
- this.focusInput();
869
- return;
870
- case 'Backspace':
871
- case 'Delete':
872
- event.preventDefault();
873
- this.removeAt(index);
874
- return;
875
- case 'Home':
876
- event.preventDefault();
877
- this.focusTag(0);
878
- return;
879
- case 'End':
880
- event.preventDefault();
881
- this.focusTag(this.visibleTagRows().length - 1);
882
- return;
883
- default:
884
- return;
885
- }
886
- }
887
- /** @ignore Clicking the box's empty area focuses the input. */
888
- onBoxMousedown(event) {
889
- const target = event.target;
890
- if (target.closest('button') ||
891
- target.closest('.ui-autocomplete-tag') ||
892
- target.closest('input'))
893
- return;
894
- event.preventDefault();
895
- this.focusInput();
896
- }
897
- /** @ignore Move the roving focus onto a chip. */
898
- focusTag(index) {
899
- this.focusedTag.set(index);
900
- setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
901
- }
902
- /** @ignore Return the roving focus to the input. */
903
- focusInput() {
904
- this.focusedTag.set(-1);
905
- this.focus();
906
- }
907
- /** @ignore Label of a selected value: pick-time cache first, then the current suggestions. */
908
- labelOfSelected(value) {
909
- const cached = this.selectionCache().find((e) => this.equals(e.value, value));
910
- return cached ? cached.label : this.labelOfValue(value);
911
- }
912
- /** @ignore Original suggestion of a selected value (pick-time cache first, else the raw value). */
913
- originalOfSelected(value) {
914
- return this.selectionCache().find((e) => this.equals(e.value, value))?.original ?? value;
915
- }
916
- labelOfValue(value) {
917
- if (value === null || value === undefined)
918
- return '';
919
- const entry = this.entryOfValue(value);
920
- if (entry)
921
- return entry.label;
922
- return this.resolveLabel(value) ?? this.asText(value) ?? '';
923
- }
924
- /** @ignore Suggestion entry matching a model value, if currently known. */
925
- entryOfValue(value) {
926
- if (value === null || value === undefined)
927
- return undefined;
928
- return this.flatEntries().find((e) => this.equals(e.value, value));
929
- }
930
- /** @ignore */
931
- toEntry(option) {
932
- return this.resolver.toEntry(option);
933
- }
934
- /** @ignore Read a (dot-path) field from an object. */
935
- getField(target, path) {
936
- return this.resolver.getField(target, path);
937
- }
938
- /** @ignore */
939
- resolveValue(option) {
940
- return this.resolver.resolveValue(option);
941
- }
942
- /** @ignore */
943
- resolveLabel(option) {
944
- return this.resolver.resolveLabel(option);
945
- }
946
- /** @ignore */
947
- asText(value) {
948
- return this.resolver.asText(value);
949
- }
950
- /** @ignore Whether a resolved value is the current model value. */
951
- isValueSelected(value) {
952
- if (this.multiple())
953
- return this.selectedValues().some((v) => this.equals(v, value));
954
- const current = this.modelValue();
955
- return current !== null && current !== undefined && this.equals(current, value);
956
- }
957
- /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
958
- equals(a, b) {
959
- return this.resolver.equals(a, b);
960
- }
961
- /** @ignore Enabled suggestion whose label matches `text` (case/diacritics-insensitive). */
962
- entryLabelled(text) {
963
- const wanted = this.normalize(text.trim());
964
- return this.flatEntries().find((e) => !e.disabled && this.normalize(e.label) === wanted);
965
- }
966
- /** @ignore Case- and diacritics-insensitive comparison text. */
967
- normalize(text) {
968
- return text.toLowerCase().normalize('NFD').replace(/[̀-ͯ]/g, '');
969
- }
970
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
971
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiAutocomplete, isStandalone: true, selector: "ui-autocomplete", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: true, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, removeTagLabel: { classPropertyName: "removeTagLabel", publicName: "removeTagLabel", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", valueChange: "valueChange", optionSelect: "optionSelect", optionUnselect: "optionUnselect", opened: "opened", closed: "closed", cleared: "cleared", dropdownClick: "dropdownClick", lazyLoad: "lazyLoad", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
972
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiAutocomplete), multi: true },
973
- ], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One rendered row: group header or suggestion (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-autocomplete-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-autocomplete-option\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n selected: row.selected,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-autocomplete-option-label\">{{ row.entry.label }}</span>\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-autocomplete-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-autocomplete-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n </ng-container>\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-autocomplete-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n }\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-autocomplete-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyMessage() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field around a native combobox input. -->\n<div #container class=\"ui-autocomplete\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [autoHeight]=\"multiple()\"\n >\n <div class=\"ui-autocomplete-control\" (mousedown)=\"onBoxMousedown($event)\">\n @if (multiple()) {\n @if (selectedItemTemplate(); as tpl) {\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n }\n } @else {\n <!-- The listbox wraps ONLY the option tags: it may contain neither the combobox input\n nor the informative overflow chip. `display: contents` keeps the tags flowing in\n the box exactly as before. -->\n <div\n class=\"ui-autocomplete-tags\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of visibleTagRows(); track $index) {\n <ui-chip\n #tagEl\n class=\"ui-autocomplete-tag\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index)\"\n />\n }\n </div>\n }\n @if (overflowCount() > 0) {\n <!-- Collapsed remainder (`maxSelectedLabels`): informative only, not removable. -->\n <ui-chip\n class=\"ui-autocomplete-tag _overflow\"\n role=\"presentation\"\n [label]=\"overflowText()\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n />\n }\n }\n\n <input\n #inputEl\n uiBrowserFill\n type=\"text\"\n class=\"ui-autocomplete-input\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (browserFill)=\"onBrowserFill($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner\n uiFieldSuffix\n class=\"ui-autocomplete-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Recherche en cours\"\n />\n } @else if (dropdown()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-dropdown\"\n [class._open]=\"panelOpen()\"\n [disabled]=\"isDisabled()\"\n tabindex=\"-1\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-label]=\"dropdownAriaLabel()\"\n (click)=\"onDropdownClick($event)\"\n >\n <ui-icon [name]=\"dropdownIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (overlayOutsideClick)=\"close()\"\n (detach)=\"close()\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-autocomplete{display:block;--ui-field-box-cursor: text}.ui-autocomplete-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-autocomplete-tag-gap, var(--units-xs));min-width:0}.ui-autocomplete-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-autocomplete-tags{display:contents}.ui-autocomplete-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-autocomplete-tag-radius, var(--radius-full));transition: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-autocomplete-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-autocomplete-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-autocomplete-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-input{flex:1 1 var(--ui-autocomplete-input-min-width, 5rem);min-width:var(--ui-autocomplete-input-min-width, 5rem);width:auto}.ui-autocomplete-input._small{font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-autocomplete-clear-size, var(--size-components-2xs));height:var(--ui-autocomplete-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-autocomplete-clear-radius, var(--radius-full));background:none;color:var(--ui-autocomplete-clear-color, var(--form-low-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))),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-autocomplete-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:hover:not(:disabled){color:var(--ui-autocomplete-clear-color-hover, var(--form-high-content-hover))}.ui-autocomplete-clear:focus-visible{outline:none;color:var(--ui-autocomplete-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-clear:disabled{cursor:not-allowed;color:var(--ui-autocomplete-clear-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-autocomplete-dropdown:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{transition:rotate var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms);margin:0;padding:0;border:none;background:none;color:var(--ui-autocomplete-dropdown-color, var(--form-low-content-default));cursor:pointer}.ui-autocomplete-dropdown:hover:not(:disabled){color:var(--ui-autocomplete-dropdown-color-hover, var(--form-high-content-hover))}.ui-autocomplete-dropdown._open{rotate:180deg}.ui-autocomplete-dropdown:disabled{cursor:not-allowed;color:var(--ui-autocomplete-dropdown-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-loading{flex-shrink:0}.ui-autocomplete-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-autocomplete-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-autocomplete-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-autocomplete-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-autocomplete-panel-padding, var(--units-xs))}.ui-autocomplete-panel .ui-autocomplete-header,.ui-autocomplete-panel .ui-autocomplete-footer{padding:var(--ui-autocomplete-header-padding-y, var(--units-xs)) var(--ui-autocomplete-header-padding-x, var(--units-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));color:var(--ui-autocomplete-header-color, var(--form-high-content-default))}.ui-autocomplete-panel .ui-autocomplete-scroller{overflow:auto;max-height:var(--ui-autocomplete-scroller-max-height, 19.5rem)}.ui-autocomplete-panel .ui-autocomplete-scroller._small{max-height:var(--ui-autocomplete-scroller-max-height-small, 16rem)}.ui-autocomplete-panel .ui-autocomplete-viewport{width:100%}.ui-autocomplete-panel .ui-autocomplete-list{display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-list{gap:0}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group{height:var(--ui-autocomplete-option-height, 2.5rem)}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group._small{height:var(--ui-autocomplete-option-height-small, 2rem)}.ui-autocomplete-panel .ui-autocomplete-option{display:flex;align-items:center;gap:var(--ui-autocomplete-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-autocomplete-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));border-radius:var(--ui-autocomplete-option-radius, var(--radius-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select: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))),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-autocomplete-panel .ui-autocomplete-option._small{height:var(--ui-autocomplete-option-height-small, 2rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-panel .ui-autocomplete-option._focused,.ui-autocomplete-panel .ui-autocomplete-option:hover:not(._disabled){background-color:var(--ui-autocomplete-option-surface-hover, var(--global-background-default-hover))}.ui-autocomplete-panel .ui-autocomplete-option._selected{background-color:var(--ui-autocomplete-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-autocomplete-option-color-selected, var(--form-high-content-checked))}.ui-autocomplete-panel .ui-autocomplete-option._disabled{color:var(--ui-autocomplete-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-autocomplete-panel .ui-autocomplete-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-autocomplete-panel .ui-autocomplete-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-autocomplete-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-autocomplete-weight, var(--weight-bold));color:var(--ui-autocomplete-group-color, var(--form-low-content-default))}.ui-autocomplete-panel .ui-autocomplete-group._small{height:var(--ui-autocomplete-group-height-small, 1.5rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-group-font-size-small, var(--size-typography-text-sm))}.ui-autocomplete-panel .ui-autocomplete-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-autocomplete-option-height, 2.5rem);padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-empty-color, var(--form-low-content-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: i1.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.ɵɵCdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiSpinner, selector: "ui-spinner", inputs: ["size", "orientation", "label", "ariaLabel", "spinnerTemplate", "image", "imageAlt", "icon", "strokeWidth", "fill", "animationDuration", "delay"] }, { kind: "component", type: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "directive", type: UiBrowserFill, selector: "[uiBrowserFill]", outputs: ["browserFill"] }] }); }
974
- }
975
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiAutocomplete, decorators: [{
976
- type: Component,
977
- args: [{ selector: 'ui-autocomplete', imports: [
978
- NgTemplateOutlet,
979
- OverlayModule,
980
- ScrollingModule,
981
- UiField,
982
- UiIcon,
983
- UiSpinner,
984
- UiChip,
985
- UiMotion,
986
- UiBrowserFill,
987
- ], providers: [
988
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiAutocomplete), multi: true },
989
- ], template: "<!-- One rendered row: group header or suggestion (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-autocomplete-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-autocomplete-option\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n selected: row.selected,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-autocomplete-option-label\">{{ row.entry.label }}</span>\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-autocomplete-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-autocomplete-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n </ng-container>\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-autocomplete-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n }\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-autocomplete-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyMessage() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field around a native combobox input. -->\n<div #container class=\"ui-autocomplete\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [autoHeight]=\"multiple()\"\n >\n <div class=\"ui-autocomplete-control\" (mousedown)=\"onBoxMousedown($event)\">\n @if (multiple()) {\n @if (selectedItemTemplate(); as tpl) {\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n }\n } @else {\n <!-- The listbox wraps ONLY the option tags: it may contain neither the combobox input\n nor the informative overflow chip. `display: contents` keeps the tags flowing in\n the box exactly as before. -->\n <div\n class=\"ui-autocomplete-tags\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of visibleTagRows(); track $index) {\n <ui-chip\n #tagEl\n class=\"ui-autocomplete-tag\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index)\"\n />\n }\n </div>\n }\n @if (overflowCount() > 0) {\n <!-- Collapsed remainder (`maxSelectedLabels`): informative only, not removable. -->\n <ui-chip\n class=\"ui-autocomplete-tag _overflow\"\n role=\"presentation\"\n [label]=\"overflowText()\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n />\n }\n }\n\n <input\n #inputEl\n uiBrowserFill\n type=\"text\"\n class=\"ui-autocomplete-input\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (browserFill)=\"onBrowserFill($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner\n uiFieldSuffix\n class=\"ui-autocomplete-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Recherche en cours\"\n />\n } @else if (dropdown()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-dropdown\"\n [class._open]=\"panelOpen()\"\n [disabled]=\"isDisabled()\"\n tabindex=\"-1\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-label]=\"dropdownAriaLabel()\"\n (click)=\"onDropdownClick($event)\"\n >\n <ui-icon [name]=\"dropdownIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (overlayOutsideClick)=\"close()\"\n (detach)=\"close()\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-autocomplete{display:block;--ui-field-box-cursor: text}.ui-autocomplete-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-autocomplete-tag-gap, var(--units-xs));min-width:0}.ui-autocomplete-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-autocomplete-tags{display:contents}.ui-autocomplete-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-autocomplete-tag-radius, var(--radius-full));transition: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-autocomplete-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-autocomplete-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-autocomplete-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-input{flex:1 1 var(--ui-autocomplete-input-min-width, 5rem);min-width:var(--ui-autocomplete-input-min-width, 5rem);width:auto}.ui-autocomplete-input._small{font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-autocomplete-clear-size, var(--size-components-2xs));height:var(--ui-autocomplete-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-autocomplete-clear-radius, var(--radius-full));background:none;color:var(--ui-autocomplete-clear-color, var(--form-low-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))),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-autocomplete-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:hover:not(:disabled){color:var(--ui-autocomplete-clear-color-hover, var(--form-high-content-hover))}.ui-autocomplete-clear:focus-visible{outline:none;color:var(--ui-autocomplete-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-clear:disabled{cursor:not-allowed;color:var(--ui-autocomplete-clear-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-autocomplete-dropdown:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{transition:rotate var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms);margin:0;padding:0;border:none;background:none;color:var(--ui-autocomplete-dropdown-color, var(--form-low-content-default));cursor:pointer}.ui-autocomplete-dropdown:hover:not(:disabled){color:var(--ui-autocomplete-dropdown-color-hover, var(--form-high-content-hover))}.ui-autocomplete-dropdown._open{rotate:180deg}.ui-autocomplete-dropdown:disabled{cursor:not-allowed;color:var(--ui-autocomplete-dropdown-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-loading{flex-shrink:0}.ui-autocomplete-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-autocomplete-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-autocomplete-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-autocomplete-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-autocomplete-panel-padding, var(--units-xs))}.ui-autocomplete-panel .ui-autocomplete-header,.ui-autocomplete-panel .ui-autocomplete-footer{padding:var(--ui-autocomplete-header-padding-y, var(--units-xs)) var(--ui-autocomplete-header-padding-x, var(--units-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));color:var(--ui-autocomplete-header-color, var(--form-high-content-default))}.ui-autocomplete-panel .ui-autocomplete-scroller{overflow:auto;max-height:var(--ui-autocomplete-scroller-max-height, 19.5rem)}.ui-autocomplete-panel .ui-autocomplete-scroller._small{max-height:var(--ui-autocomplete-scroller-max-height-small, 16rem)}.ui-autocomplete-panel .ui-autocomplete-viewport{width:100%}.ui-autocomplete-panel .ui-autocomplete-list{display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-list{gap:0}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group{height:var(--ui-autocomplete-option-height, 2.5rem)}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group._small{height:var(--ui-autocomplete-option-height-small, 2rem)}.ui-autocomplete-panel .ui-autocomplete-option{display:flex;align-items:center;gap:var(--ui-autocomplete-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-autocomplete-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));border-radius:var(--ui-autocomplete-option-radius, var(--radius-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select: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))),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-autocomplete-panel .ui-autocomplete-option._small{height:var(--ui-autocomplete-option-height-small, 2rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-panel .ui-autocomplete-option._focused,.ui-autocomplete-panel .ui-autocomplete-option:hover:not(._disabled){background-color:var(--ui-autocomplete-option-surface-hover, var(--global-background-default-hover))}.ui-autocomplete-panel .ui-autocomplete-option._selected{background-color:var(--ui-autocomplete-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-autocomplete-option-color-selected, var(--form-high-content-checked))}.ui-autocomplete-panel .ui-autocomplete-option._disabled{color:var(--ui-autocomplete-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-autocomplete-panel .ui-autocomplete-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-autocomplete-panel .ui-autocomplete-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-autocomplete-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-autocomplete-weight, var(--weight-bold));color:var(--ui-autocomplete-group-color, var(--form-low-content-default))}.ui-autocomplete-panel .ui-autocomplete-group._small{height:var(--ui-autocomplete-group-height-small, 1.5rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-group-font-size-small, var(--size-typography-text-sm))}.ui-autocomplete-panel .ui-autocomplete-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-autocomplete-option-height, 2.5rem);padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-empty-color, var(--form-low-content-default))}\n"] }]
990
- }], ctorParameters: () => [], propDecorators: { suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], dropdownMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownMode", required: false }] }], dropdownAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownAriaLabel", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], unique: [{ type: i0.Input, args: [{ isSignal: true, alias: "unique", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], removeTagLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeTagLabel", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], showEmptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyMessage", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], optionSelect: [{ type: i0.Output, args: ["optionSelect"] }], optionUnselect: [{ type: i0.Output, args: ["optionUnselect"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], dropdownClick: [{ type: i0.Output, args: ["dropdownClick"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], containerEl: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], tagEls: [{ type: i0.ViewChildren, args: ['tagEl', { ...{ read: ElementRef }, isSignal: true }] }] } });
991
-
992
- /*
993
- * Public API Surface of ui-kit/ui-autocomplete
994
- */
995
-
996
- /**
997
- * Generated bundle index. Do not edit.
998
- */
999
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ElementRef, booleanAttribute, computed, contentChild, effect, forwardRef, input, isDevMode, numberAttribute, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
3
+ import { 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 { CdkVirtualScrollViewport, ScrollingModule } from "@angular/cdk/scrolling";
8
+ import { BaseFormField, UiBrowserFill, createOptionResolver, dropdownOverlayPositions, formatLabel, hasFocus } from "@4sh/ui-kit/forms";
9
+ import { UiField } from "@4sh/ui-kit/forms/ui-field";
10
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
11
+ import { UiSpinner } from "@4sh/ui-kit/informative/ui-spinner";
12
+ import { UiChip } from "@4sh/ui-kit/informative/ui-chip";
13
+ import { UiMotion } from "@4sh/ui-kit/motion";
14
+ import { closeOnNavigation } from "@4sh/ui-kit/overlay";
15
+ var UiAutocomplete = class UiAutocomplete extends BaseFormField {
16
+ constructor() {
17
+ super();
18
+ this.suggestions = input([], ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
19
+ this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
20
+ this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
21
+ this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
22
+ this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
23
+ this.group = input(false, {
24
+ ...ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {},
25
+ transform: booleanAttribute
26
+ });
27
+ this.optionGroupLabel = input("label", ...ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []);
28
+ this.optionGroupChildren = input("items", ...ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []);
29
+ this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
30
+ this.minLength = input(1, {
31
+ ...ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {},
32
+ transform: numberAttribute
33
+ });
34
+ this.delay = input(300, {
35
+ ...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
36
+ transform: numberAttribute
37
+ });
38
+ this.completeOnFocus = input(false, {
39
+ ...ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {},
40
+ transform: booleanAttribute
41
+ });
42
+ this.dropdown = input(false, {
43
+ ...ngDevMode ? { debugName: "dropdown" } : /* istanbul ignore next */ {},
44
+ transform: booleanAttribute
45
+ });
46
+ this.dropdownMode = input("blank", ...ngDevMode ? [{ debugName: "dropdownMode" }] : /* istanbul ignore next */ []);
47
+ this.dropdownAriaLabel = input("Afficher les suggestions", ...ngDevMode ? [{ debugName: "dropdownAriaLabel" }] : /* istanbul ignore next */ []);
48
+ this.dropdownIcon = input("angle-down", ...ngDevMode ? [{ debugName: "dropdownIcon" }] : /* istanbul ignore next */ []);
49
+ this.forceSelection = input(false, {
50
+ ...ngDevMode ? { debugName: "forceSelection" } : /* istanbul ignore next */ {},
51
+ transform: booleanAttribute
52
+ });
53
+ this.ripple = input(true, {
54
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
55
+ transform: booleanAttribute
56
+ });
57
+ this.multiple = input(false, {
58
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
59
+ transform: booleanAttribute
60
+ });
61
+ this.unique = input(true, {
62
+ ...ngDevMode ? { debugName: "unique" } : /* istanbul ignore next */ {},
63
+ transform: booleanAttribute
64
+ });
65
+ this.maxSelectedLabels = input(...ngDevMode ? [void 0, { debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []);
66
+ this.overflowLabel = input("(+{0} autres)", ...ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []);
67
+ this.removeTagLabel = input("Supprimer {0}", ...ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []);
68
+ this.showClear = input(false, {
69
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
70
+ transform: booleanAttribute
71
+ });
72
+ this.clearAriaLabel = input("Effacer la saisie", ...ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []);
73
+ this.loading = input(false, {
74
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
75
+ transform: booleanAttribute
76
+ });
77
+ this.emptyMessage = input("Aucun résultat", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
78
+ this.showEmptyMessage = input(true, {
79
+ ...ngDevMode ? { debugName: "showEmptyMessage" } : /* istanbul ignore next */ {},
80
+ transform: booleanAttribute
81
+ });
82
+ this.autoOptionFocus = input(false, {
83
+ ...ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {},
84
+ transform: booleanAttribute
85
+ });
86
+ this.selectOnFocus = input(false, {
87
+ ...ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {},
88
+ transform: booleanAttribute
89
+ });
90
+ this.focusOnHover = input(true, {
91
+ ...ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {},
92
+ transform: booleanAttribute
93
+ });
94
+ this.virtualScroll = input(false, {
95
+ ...ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {},
96
+ transform: booleanAttribute
97
+ });
98
+ this.virtualScrollItemSize = input(40, {
99
+ ...ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {},
100
+ transform: numberAttribute
101
+ });
102
+ this.lazy = input(false, {
103
+ ...ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {},
104
+ transform: booleanAttribute
105
+ });
106
+ this.scrollHeight = input(...ngDevMode ? [void 0, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []);
107
+ this.autoFlip = input(true, {
108
+ ...ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {},
109
+ transform: booleanAttribute
110
+ });
111
+ this.panelStyleClass = input(...ngDevMode ? [void 0, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []);
112
+ this.completeMethod = output();
113
+ this.valueChange = output();
114
+ this.optionSelect = output();
115
+ this.optionUnselect = output();
116
+ this.opened = output();
117
+ this.closed = output();
118
+ this.cleared = output();
119
+ this.dropdownClick = output();
120
+ this.lazyLoad = output();
121
+ this.inputFocus = output();
122
+ this.inputBlur = output();
123
+ this.itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
124
+ this.selectedItemTemplate = contentChild("selectedItem", ...ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []);
125
+ this.groupTemplate = contentChild("group", ...ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []);
126
+ this.headerTemplate = contentChild("header", ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
127
+ this.footerTemplate = contentChild("footer", ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
128
+ this.emptyTemplate = contentChild("empty", ...ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []);
129
+ this.containerEl = viewChild.required("container", ...ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []);
130
+ this.inputEl = viewChild.required("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
131
+ this.panelEl = viewChild("panel", ...ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []);
132
+ this.viewport = viewChild(CdkVirtualScrollViewport, ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
133
+ this.tagEls = viewChildren("tagEl", {
134
+ ...ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {},
135
+ read: ElementRef
136
+ });
137
+ this.panelOpen = signal(false, ...ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []);
138
+ this.overlayOrigin = signal(null, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
139
+ this.overlayWidth = signal(null, ...ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []);
140
+ this.inputText = signal("", ...ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []);
141
+ this.focusedIndex = signal(-1, ...ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []);
142
+ this.focusedTag = signal(-1, ...ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []);
143
+ this.selectionCache = signal([], ...ngDevMode ? [{ debugName: "selectionCache" }] : /* istanbul ignore next */ []);
144
+ this.queryDirty = false;
145
+ this.pendingLabelSync = signal(false, ...ngDevMode ? [{ debugName: "pendingLabelSync" }] : /* istanbul ignore next */ []);
146
+ this.pendingFill = signal(null, ...ngDevMode ? [{ debugName: "pendingFill" }] : /* istanbul ignore next */ []);
147
+ this.listboxId = computed(() => `${this.resolvedId()}-list`, ...ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []);
148
+ this.iconSize = computed(() => this.size() === "small" ? "sm" : "md", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
149
+ this.flatEntries = computed(() => {
150
+ if (this.group()) return this.groupEntries().flatMap((g) => g.entries);
151
+ return (this.suggestions() ?? []).map((option) => this.toEntry(option));
152
+ }, ...ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []);
153
+ this.groupEntries = computed(() => {
154
+ if (!this.group()) return [];
155
+ return (this.suggestions() ?? []).map((groupOption) => {
156
+ const children = this.getField(groupOption, this.optionGroupChildren());
157
+ return {
158
+ label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? "",
159
+ original: groupOption,
160
+ entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option))
161
+ };
162
+ });
163
+ }, ...ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []);
164
+ this.visibleRows = computed(() => {
165
+ const rows = [];
166
+ let index = 0;
167
+ const pushOption = (entry) => {
168
+ rows.push({
169
+ kind: "option",
170
+ key: `${this.listboxId()}-${index}`,
171
+ id: `${this.resolvedId()}-option-${index}`,
172
+ index,
173
+ entry,
174
+ selected: this.isValueSelected(entry.value)
175
+ });
176
+ index++;
177
+ };
178
+ if (this.group()) this.groupEntries().forEach((g, gi) => {
179
+ if (!g.entries.length) return;
180
+ rows.push({
181
+ kind: "group",
182
+ key: `${this.listboxId()}-group-${gi}`,
183
+ label: g.label,
184
+ original: g.original
185
+ });
186
+ g.entries.forEach(pushOption);
187
+ });
188
+ else this.flatEntries().forEach(pushOption);
189
+ return rows;
190
+ }, ...ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []);
191
+ this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === "option"), ...ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []);
192
+ this.optionCount = computed(() => this.visibleOptions().length, ...ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []);
193
+ this.trackRow = (_, row) => row.key;
194
+ this.hasText = computed(() => this.inputText().length > 0, ...ngDevMode ? [{ debugName: "hasText" }] : /* istanbul ignore next */ []);
195
+ this.showClearButton = computed(() => this.showClear() && (this.hasText() || this.multiple() && this.selectedValues().length > 0) && !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []);
196
+ this.selectedValues = computed(() => {
197
+ if (!this.multiple()) return [];
198
+ const v = this.modelValue();
199
+ return Array.isArray(v) ? v : [];
200
+ }, ...ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []);
201
+ this.tagRows = computed(() => this.selectedValues().map((value, index) => {
202
+ const label = this.labelOfSelected(value);
203
+ return {
204
+ value,
205
+ index,
206
+ label,
207
+ removeAriaLabel: formatLabel(this.removeTagLabel(), label)
208
+ };
209
+ }), ...ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []);
210
+ this.visibleTagRows = computed(() => {
211
+ const all = this.tagRows();
212
+ const max = this.maxSelectedLabels();
213
+ return max != null && max > 0 && all.length > max ? all.slice(0, max) : all;
214
+ }, ...ngDevMode ? [{ debugName: "visibleTagRows" }] : /* istanbul ignore next */ []);
215
+ this.overflowCount = computed(() => this.tagRows().length - this.visibleTagRows().length, ...ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []);
216
+ this.overflowText = computed(() => formatLabel(this.overflowLabel(), this.overflowCount()), ...ngDevMode ? [{ debugName: "overflowText" }] : /* istanbul ignore next */ []);
217
+ this.selectedItemContexts = computed(() => this.visibleTagRows().map((tag) => ({
218
+ $implicit: this.originalOfSelected(tag.value),
219
+ option: this.originalOfSelected(tag.value),
220
+ index: tag.index,
221
+ remove: () => this.removeAt(tag.index)
222
+ })), ...ngDevMode ? [{ debugName: "selectedItemContexts" }] : /* istanbul ignore next */ []);
223
+ this.effectivePlaceholder = computed(() => this.hasFloatLabel() || this.multiple() && this.selectedValues().length ? "" : this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
224
+ this.isFilled = computed(() => this.hasText() || this.selectedValues().length > 0, ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
225
+ this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []);
226
+ this.showEmpty = computed(() => this.showEmptyMessage() && !this.loading() && !this.visibleRows().length, ...ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []);
227
+ this.activeDescendant = computed(() => {
228
+ if (!this.panelOpen()) return null;
229
+ return this.visibleOptions()[this.focusedIndex()]?.id ?? null;
230
+ }, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
231
+ this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
232
+ this.viewportHeight = computed(() => {
233
+ const rows = this.visibleRows().length || 1;
234
+ const max = this.scrollHeightPx();
235
+ return `${Math.min(rows * this.virtualScrollItemSize(), max)}px`;
236
+ }, ...ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []);
237
+ this.scrollHeightPx = computed(() => {
238
+ const parsed = Number.parseFloat(this.scrollHeight() ?? "");
239
+ if (!Number.isNaN(parsed) && parsed > 0) return parsed;
240
+ return this.size() === "small" ? 256 : 312;
241
+ }, ...ngDevMode ? [{ debugName: "scrollHeightPx" }] : /* istanbul ignore next */ []);
242
+ this.resolver = createOptionResolver({
243
+ optionValue: this.optionValue,
244
+ optionLabel: this.optionLabel,
245
+ optionDisabled: this.optionDisabled,
246
+ dataKey: this.dataKey
247
+ });
248
+ closeOnNavigation(() => this.close());
249
+ effect(() => {
250
+ const entry = this.pendingLabelSync() ? this.entryOfValue(untracked(this.modelValue) ?? null) : void 0;
251
+ if (!entry) return;
252
+ untracked(() => {
253
+ this.pendingLabelSync.set(false);
254
+ this.inputText.set(entry.label);
255
+ });
256
+ });
257
+ effect(() => {
258
+ const fill = this.pendingFill();
259
+ const match = fill ? this.entryLabelled(fill.text) : void 0;
260
+ if (!fill || !match) return;
261
+ untracked(() => {
262
+ this.pendingFill.set(null);
263
+ this.selectEntry(match, fill.event, false);
264
+ });
265
+ });
266
+ effect((onCleanup) => {
267
+ const vp = this.viewport();
268
+ if (!vp || !this.lazy()) return;
269
+ const sub = vp.renderedRangeStream.subscribe((range) => this.lazyLoad.emit({
270
+ first: range.start,
271
+ last: range.end
272
+ }));
273
+ onCleanup(() => sub.unsubscribe());
274
+ });
275
+ effect(() => {
276
+ const vp = this.viewport();
277
+ if (!vp) return;
278
+ setTimeout(() => {
279
+ vp.checkViewportSize();
280
+ this.scrollFocusedIntoView();
281
+ });
282
+ });
283
+ if (isDevMode()) effect(() => {
284
+ if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) console.warn("[ui-autocomplete] Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.");
285
+ });
286
+ }
287
+ writeValue(value) {
288
+ this.pendingFill.set(null);
289
+ if (this.multiple()) {
290
+ const values = Array.isArray(value) ? value : [];
291
+ this.modelValue.set(values);
292
+ this.inputText.set("");
293
+ this.seedSelectionCache(values);
294
+ return;
295
+ }
296
+ this.modelValue.set(value);
297
+ this.inputText.set(this.labelOfValue(value));
298
+ this.pendingLabelSync.set(value !== null && value !== void 0 && this.entryOfValue(value) === void 0);
299
+ }
300
+ seedSelectionCache(values) {
301
+ const cache = this.selectionCache();
302
+ const entries = this.flatEntries();
303
+ const found = values.filter((v) => !cache.some((e) => this.equals(e.value, v))).map((v) => entries.find((e) => this.equals(e.value, v))).filter((e) => !!e);
304
+ if (found.length) this.selectionCache.set([...cache, ...found]);
305
+ }
306
+ focus(options) {
307
+ this.inputEl().nativeElement.focus(options);
308
+ }
309
+ nativeInputElement() {
310
+ return this.inputEl().nativeElement;
311
+ }
312
+ open() {
313
+ if (this.isDisabled() || this.readonly() || this.panelOpen()) return;
314
+ const origin = this.containerEl().nativeElement.querySelector(".ui-field-box") ?? this.containerEl().nativeElement;
315
+ this.overlayOrigin.set(origin);
316
+ this.overlayWidth.set(origin.getBoundingClientRect().width);
317
+ this.focusedIndex.set(this.initialFocusIndex());
318
+ this.panelOpen.set(true);
319
+ this.opened.emit();
320
+ setTimeout(() => this.scrollFocusedIntoView());
321
+ }
322
+ close(focusInput = false) {
323
+ if (!this.panelOpen()) return;
324
+ this.panelOpen.set(false);
325
+ this.focusedIndex.set(-1);
326
+ this.queryDirty = false;
327
+ this.closed.emit();
328
+ if (focusInput) this.focus();
329
+ }
330
+ initialFocusIndex() {
331
+ if (!this.autoOptionFocus()) return -1;
332
+ return this.visibleOptions().findIndex((o) => !o.entry.disabled);
333
+ }
334
+ onInput(event) {
335
+ const input = event.target;
336
+ const query = input.value;
337
+ const typed = hasFocus(input);
338
+ this.inputText.set(query);
339
+ this.pendingLabelSync.set(false);
340
+ this.pendingFill.set(!typed && this.forceSelection() && query ? {
341
+ text: query,
342
+ event
343
+ } : null);
344
+ if (!this.forceSelection() && !this.multiple()) this.commit(query === "" ? null : query);
345
+ if (this.searchTimeout) clearTimeout(this.searchTimeout);
346
+ if (query.length === 0) {
347
+ if (!this.multiple()) this.cleared.emit();
348
+ this.close();
349
+ return;
350
+ }
351
+ if (query.length < this.minLength()) {
352
+ this.close();
353
+ return;
354
+ }
355
+ this.focusedIndex.set(-1);
356
+ if (!typed) {
357
+ this.completeMethod.emit({
358
+ originalEvent: event,
359
+ query
360
+ });
361
+ return;
362
+ }
363
+ this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
364
+ }
365
+ onBrowserFill(event) {
366
+ if (this.inputEl().nativeElement.value !== this.inputText()) this.onInput(event);
367
+ }
368
+ runSearch(event, query) {
369
+ this.queryDirty = true;
370
+ this.completeMethod.emit({
371
+ originalEvent: event,
372
+ query
373
+ });
374
+ this.open();
375
+ }
376
+ onDropdownClick(event) {
377
+ if (this.isDisabled() || this.readonly()) return;
378
+ if (this.panelOpen()) {
379
+ this.close(true);
380
+ return;
381
+ }
382
+ this.queryDirty = true;
383
+ this.focus();
384
+ const query = this.inputText();
385
+ this.runSearch(event, this.dropdownMode() === "current" ? query : "");
386
+ this.dropdownClick.emit({
387
+ originalEvent: event,
388
+ query
389
+ });
390
+ }
391
+ onInputFocus(event) {
392
+ if (this.isDisabled()) return;
393
+ if (hasFocus(event.target) && !this.queryDirty && this.completeOnFocus()) this.runSearch(event, this.inputText());
394
+ this.inputFocus.emit(event);
395
+ }
396
+ onInputBlur(event) {
397
+ const next = event.relatedTarget;
398
+ const insideComponent = !!next && this.containerEl().nativeElement.contains(next);
399
+ const insidePanel = !!next && this.panelEl()?.nativeElement.contains(next);
400
+ if (!insideComponent && !insidePanel) {
401
+ this.emitTouch();
402
+ if (this.forceSelection() && !this.pendingFill()) this.validateForceSelection(event);
403
+ }
404
+ this.inputBlur.emit(event);
405
+ }
406
+ validateForceSelection(event) {
407
+ this.pendingFill.set(null);
408
+ const text = this.inputText().trim();
409
+ if (!text) return;
410
+ const match = this.entryLabelled(text);
411
+ if (match && !this.multiple() && this.equals(match.value, this.modelValue())) this.inputText.set(match.label);
412
+ else if (match) this.selectEntry(match, event, false);
413
+ else if (this.multiple()) this.inputText.set("");
414
+ else {
415
+ this.commit(null);
416
+ this.inputText.set("");
417
+ this.cleared.emit();
418
+ }
419
+ }
420
+ onClearClick(event) {
421
+ event.stopPropagation();
422
+ this.clear();
423
+ }
424
+ clear() {
425
+ this.pendingFill.set(null);
426
+ if (this.multiple()) {
427
+ this.commit([]);
428
+ this.selectionCache.set([]);
429
+ } else this.commit(null);
430
+ this.inputText.set("");
431
+ this.cleared.emit();
432
+ this.close();
433
+ this.focus();
434
+ }
435
+ onInputKeydown(event) {
436
+ if (this.isDisabled() || this.readonly()) return;
437
+ if (this.multiple() && this.selectedValues().length) {
438
+ const input = event.target;
439
+ if (event.key === "Backspace" && !this.inputText()) {
440
+ this.removeAt(this.selectedValues().length - 1);
441
+ return;
442
+ }
443
+ if (event.key === "ArrowLeft" && !this.selectedItemTemplate() && input.selectionStart === 0 && input.selectionEnd === 0) {
444
+ event.preventDefault();
445
+ this.focusTag(this.visibleTagRows().length - 1);
446
+ return;
447
+ }
448
+ }
449
+ switch (event.key) {
450
+ case "ArrowDown":
451
+ event.preventDefault();
452
+ this.panelOpen() ? this.moveFocus(1) : this.reopen();
453
+ return;
454
+ case "ArrowUp":
455
+ event.preventDefault();
456
+ if (event.altKey) this.close(true);
457
+ else if (this.panelOpen()) this.moveFocus(-1);
458
+ else this.reopen();
459
+ return;
460
+ case "Home":
461
+ if (!this.panelOpen()) return;
462
+ event.preventDefault();
463
+ this.focusEdge(1);
464
+ return;
465
+ case "End":
466
+ if (!this.panelOpen()) return;
467
+ event.preventDefault();
468
+ this.focusEdge(-1);
469
+ return;
470
+ case "Enter":
471
+ if (!this.panelOpen()) return;
472
+ event.preventDefault();
473
+ this.selectFocused(event);
474
+ return;
475
+ case "Escape":
476
+ if (!this.panelOpen()) return;
477
+ event.preventDefault();
478
+ event.stopPropagation();
479
+ this.close(true);
480
+ return;
481
+ case "Tab":
482
+ if (this.panelOpen()) this.close();
483
+ return;
484
+ default: return;
485
+ }
486
+ }
487
+ reopen() {
488
+ if (!this.visibleRows().length) return;
489
+ this.open();
490
+ if (this.focusedIndex() === -1) this.moveFocus(1);
491
+ }
492
+ onOptionClick(row, event) {
493
+ event.preventDefault();
494
+ this.selectEntry(row.entry, event);
495
+ }
496
+ onOptionMousedown(event) {
497
+ event.preventDefault();
498
+ }
499
+ onOptionMouseEnter(row) {
500
+ if (this.focusOnHover() && !row.entry.disabled) this.focusedIndex.set(row.index);
501
+ }
502
+ selectEntry(entry, event, closePanel = true) {
503
+ if (entry.disabled || this.readonly()) return;
504
+ if (this.multiple()) {
505
+ const alreadySelected = this.selectedValues().some((v) => this.equals(v, entry.value));
506
+ if (!(this.unique() && alreadySelected)) {
507
+ this.selectionCache.update((cache) => [...cache, entry]);
508
+ this.commit([...this.selectedValues(), entry.value]);
509
+ this.optionSelect.emit(entry.original);
510
+ }
511
+ this.inputText.set("");
512
+ if (closePanel) this.close(true);
513
+ return;
514
+ }
515
+ this.commit(entry.value);
516
+ this.inputText.set(entry.label);
517
+ this.optionSelect.emit(entry.original);
518
+ if (closePanel) this.close(true);
519
+ }
520
+ selectFocused(event) {
521
+ const row = this.visibleOptions()[this.focusedIndex()];
522
+ if (row) this.selectEntry(row.entry, event);
523
+ else this.close(true);
524
+ }
525
+ commit(value) {
526
+ this.pendingLabelSync.set(false);
527
+ this.modelValue.set(value);
528
+ this.emitChange(value);
529
+ this.valueChange.emit(value);
530
+ }
531
+ moveFocus(delta) {
532
+ const options = this.visibleOptions();
533
+ if (!options.length) return;
534
+ let i = this.focusedIndex();
535
+ if (i === -1) i = delta === 1 ? -1 : options.length;
536
+ for (i += delta; i >= 0 && i < options.length; i += delta) if (!options[i].entry.disabled) {
537
+ this.setFocusedIndex(i, null);
538
+ return;
539
+ }
540
+ }
541
+ focusEdge(direction) {
542
+ const options = this.visibleOptions();
543
+ const from = direction === 1 ? 0 : options.length - 1;
544
+ for (let i = from; i >= 0 && i < options.length; i += direction) if (!options[i].entry.disabled) {
545
+ this.setFocusedIndex(i, null);
546
+ return;
547
+ }
548
+ }
549
+ setFocusedIndex(index, event) {
550
+ this.focusedIndex.set(index);
551
+ if (this.selectOnFocus()) {
552
+ const row = this.visibleOptions()[index];
553
+ if (row) this.selectEntry(row.entry, event ?? new Event("keydown"), false);
554
+ }
555
+ this.scrollFocusedIntoView();
556
+ }
557
+ scrollFocusedIntoView() {
558
+ const row = this.visibleOptions()[this.focusedIndex()];
559
+ if (!row) return;
560
+ const vp = this.viewport();
561
+ if (vp) {
562
+ const rowIndex = this.visibleRows().findIndex((r) => r.kind === "option" && r.index === row.index);
563
+ if (rowIndex !== -1) vp.scrollToIndex(Math.max(0, rowIndex - 1), "auto");
564
+ return;
565
+ }
566
+ this.panelEl()?.nativeElement.querySelector(`[id="${row.id}"]`)?.scrollIntoView({ block: "nearest" });
567
+ }
568
+ removeAt(index) {
569
+ if (this.isDisabled() || this.readonly()) return;
570
+ const values = this.selectedValues();
571
+ if (index < 0 || index >= values.length) return;
572
+ const value = values[index];
573
+ const cached = this.selectionCache().find((e) => this.equals(e.value, value));
574
+ this.commit(values.filter((_, i) => i !== index));
575
+ this.selectionCache.update((cache) => cache.filter((e) => !this.equals(e.value, value)));
576
+ this.optionUnselect.emit(cached?.original ?? value);
577
+ const remaining = this.visibleTagRows().length;
578
+ if (remaining === 0) this.focusInput();
579
+ else this.focusTag(Math.min(index, remaining - 1));
580
+ }
581
+ onTagKeydown(event, index) {
582
+ if (this.isDisabled() || this.readonly()) return;
583
+ switch (event.key) {
584
+ case "ArrowLeft":
585
+ event.preventDefault();
586
+ if (index > 0) this.focusTag(index - 1);
587
+ return;
588
+ case "ArrowRight":
589
+ event.preventDefault();
590
+ if (index < this.visibleTagRows().length - 1) this.focusTag(index + 1);
591
+ else this.focusInput();
592
+ return;
593
+ case "Backspace":
594
+ case "Delete":
595
+ event.preventDefault();
596
+ this.removeAt(index);
597
+ return;
598
+ case "Home":
599
+ event.preventDefault();
600
+ this.focusTag(0);
601
+ return;
602
+ case "End":
603
+ event.preventDefault();
604
+ this.focusTag(this.visibleTagRows().length - 1);
605
+ return;
606
+ default: return;
607
+ }
608
+ }
609
+ onBoxMousedown(event) {
610
+ const target = event.target;
611
+ if (target.closest("button") || target.closest(".ui-autocomplete-tag") || target.closest("input")) return;
612
+ event.preventDefault();
613
+ this.focusInput();
614
+ }
615
+ focusTag(index) {
616
+ this.focusedTag.set(index);
617
+ setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
618
+ }
619
+ focusInput() {
620
+ this.focusedTag.set(-1);
621
+ this.focus();
622
+ }
623
+ labelOfSelected(value) {
624
+ const cached = this.selectionCache().find((e) => this.equals(e.value, value));
625
+ return cached ? cached.label : this.labelOfValue(value);
626
+ }
627
+ originalOfSelected(value) {
628
+ return this.selectionCache().find((e) => this.equals(e.value, value))?.original ?? value;
629
+ }
630
+ labelOfValue(value) {
631
+ if (value === null || value === void 0) return "";
632
+ const entry = this.entryOfValue(value);
633
+ if (entry) return entry.label;
634
+ return this.resolveLabel(value) ?? this.asText(value) ?? "";
635
+ }
636
+ entryOfValue(value) {
637
+ if (value === null || value === void 0) return void 0;
638
+ return this.flatEntries().find((e) => this.equals(e.value, value));
639
+ }
640
+ toEntry(option) {
641
+ return this.resolver.toEntry(option);
642
+ }
643
+ getField(target, path) {
644
+ return this.resolver.getField(target, path);
645
+ }
646
+ resolveValue(option) {
647
+ return this.resolver.resolveValue(option);
648
+ }
649
+ resolveLabel(option) {
650
+ return this.resolver.resolveLabel(option);
651
+ }
652
+ asText(value) {
653
+ return this.resolver.asText(value);
654
+ }
655
+ isValueSelected(value) {
656
+ if (this.multiple()) return this.selectedValues().some((v) => this.equals(v, value));
657
+ const current = this.modelValue();
658
+ return current !== null && current !== void 0 && this.equals(current, value);
659
+ }
660
+ equals(a, b) {
661
+ return this.resolver.equals(a, b);
662
+ }
663
+ entryLabelled(text) {
664
+ const wanted = this.normalize(text.trim());
665
+ return this.flatEntries().find((e) => !e.disabled && this.normalize(e.label) === wanted);
666
+ }
667
+ normalize(text) {
668
+ return text.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "");
669
+ }
670
+ static {
671
+ this.ɵfac = i0.ɵɵngDeclareFactory({
672
+ minVersion: "12.0.0",
673
+ version: "22.3.0",
674
+ ngImport: i0,
675
+ type: UiAutocomplete,
676
+ deps: [],
677
+ target: i0.ɵɵFactoryTarget.Component
678
+ });
679
+ }
680
+ static {
681
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
682
+ minVersion: "17.0.0",
683
+ version: "22.3.0",
684
+ type: UiAutocomplete,
685
+ isStandalone: true,
686
+ selector: "ui-autocomplete",
687
+ inputs: {
688
+ suggestions: {
689
+ classPropertyName: "suggestions",
690
+ publicName: "suggestions",
691
+ isSignal: true,
692
+ isRequired: false,
693
+ transformFunction: null
694
+ },
695
+ optionLabel: {
696
+ classPropertyName: "optionLabel",
697
+ publicName: "optionLabel",
698
+ isSignal: true,
699
+ isRequired: false,
700
+ transformFunction: null
701
+ },
702
+ optionValue: {
703
+ classPropertyName: "optionValue",
704
+ publicName: "optionValue",
705
+ isSignal: true,
706
+ isRequired: false,
707
+ transformFunction: null
708
+ },
709
+ optionDisabled: {
710
+ classPropertyName: "optionDisabled",
711
+ publicName: "optionDisabled",
712
+ isSignal: true,
713
+ isRequired: false,
714
+ transformFunction: null
715
+ },
716
+ dataKey: {
717
+ classPropertyName: "dataKey",
718
+ publicName: "dataKey",
719
+ isSignal: true,
720
+ isRequired: false,
721
+ transformFunction: null
722
+ },
723
+ group: {
724
+ classPropertyName: "group",
725
+ publicName: "group",
726
+ isSignal: true,
727
+ isRequired: false,
728
+ transformFunction: null
729
+ },
730
+ optionGroupLabel: {
731
+ classPropertyName: "optionGroupLabel",
732
+ publicName: "optionGroupLabel",
733
+ isSignal: true,
734
+ isRequired: false,
735
+ transformFunction: null
736
+ },
737
+ optionGroupChildren: {
738
+ classPropertyName: "optionGroupChildren",
739
+ publicName: "optionGroupChildren",
740
+ isSignal: true,
741
+ isRequired: false,
742
+ transformFunction: null
743
+ },
744
+ placeholder: {
745
+ classPropertyName: "placeholder",
746
+ publicName: "placeholder",
747
+ isSignal: true,
748
+ isRequired: false,
749
+ transformFunction: null
750
+ },
751
+ minLength: {
752
+ classPropertyName: "minLength",
753
+ publicName: "minLength",
754
+ isSignal: true,
755
+ isRequired: false,
756
+ transformFunction: null
757
+ },
758
+ delay: {
759
+ classPropertyName: "delay",
760
+ publicName: "delay",
761
+ isSignal: true,
762
+ isRequired: false,
763
+ transformFunction: null
764
+ },
765
+ completeOnFocus: {
766
+ classPropertyName: "completeOnFocus",
767
+ publicName: "completeOnFocus",
768
+ isSignal: true,
769
+ isRequired: false,
770
+ transformFunction: null
771
+ },
772
+ dropdown: {
773
+ classPropertyName: "dropdown",
774
+ publicName: "dropdown",
775
+ isSignal: true,
776
+ isRequired: false,
777
+ transformFunction: null
778
+ },
779
+ dropdownMode: {
780
+ classPropertyName: "dropdownMode",
781
+ publicName: "dropdownMode",
782
+ isSignal: true,
783
+ isRequired: false,
784
+ transformFunction: null
785
+ },
786
+ dropdownAriaLabel: {
787
+ classPropertyName: "dropdownAriaLabel",
788
+ publicName: "dropdownAriaLabel",
789
+ isSignal: true,
790
+ isRequired: false,
791
+ transformFunction: null
792
+ },
793
+ dropdownIcon: {
794
+ classPropertyName: "dropdownIcon",
795
+ publicName: "dropdownIcon",
796
+ isSignal: true,
797
+ isRequired: false,
798
+ transformFunction: null
799
+ },
800
+ forceSelection: {
801
+ classPropertyName: "forceSelection",
802
+ publicName: "forceSelection",
803
+ isSignal: true,
804
+ isRequired: false,
805
+ transformFunction: null
806
+ },
807
+ ripple: {
808
+ classPropertyName: "ripple",
809
+ publicName: "ripple",
810
+ isSignal: true,
811
+ isRequired: false,
812
+ transformFunction: null
813
+ },
814
+ multiple: {
815
+ classPropertyName: "multiple",
816
+ publicName: "multiple",
817
+ isSignal: true,
818
+ isRequired: false,
819
+ transformFunction: null
820
+ },
821
+ unique: {
822
+ classPropertyName: "unique",
823
+ publicName: "unique",
824
+ isSignal: true,
825
+ isRequired: false,
826
+ transformFunction: null
827
+ },
828
+ maxSelectedLabels: {
829
+ classPropertyName: "maxSelectedLabels",
830
+ publicName: "maxSelectedLabels",
831
+ isSignal: true,
832
+ isRequired: false,
833
+ transformFunction: null
834
+ },
835
+ overflowLabel: {
836
+ classPropertyName: "overflowLabel",
837
+ publicName: "overflowLabel",
838
+ isSignal: true,
839
+ isRequired: false,
840
+ transformFunction: null
841
+ },
842
+ removeTagLabel: {
843
+ classPropertyName: "removeTagLabel",
844
+ publicName: "removeTagLabel",
845
+ isSignal: true,
846
+ isRequired: false,
847
+ transformFunction: null
848
+ },
849
+ showClear: {
850
+ classPropertyName: "showClear",
851
+ publicName: "showClear",
852
+ isSignal: true,
853
+ isRequired: false,
854
+ transformFunction: null
855
+ },
856
+ clearAriaLabel: {
857
+ classPropertyName: "clearAriaLabel",
858
+ publicName: "clearAriaLabel",
859
+ isSignal: true,
860
+ isRequired: false,
861
+ transformFunction: null
862
+ },
863
+ loading: {
864
+ classPropertyName: "loading",
865
+ publicName: "loading",
866
+ isSignal: true,
867
+ isRequired: false,
868
+ transformFunction: null
869
+ },
870
+ emptyMessage: {
871
+ classPropertyName: "emptyMessage",
872
+ publicName: "emptyMessage",
873
+ isSignal: true,
874
+ isRequired: false,
875
+ transformFunction: null
876
+ },
877
+ showEmptyMessage: {
878
+ classPropertyName: "showEmptyMessage",
879
+ publicName: "showEmptyMessage",
880
+ isSignal: true,
881
+ isRequired: false,
882
+ transformFunction: null
883
+ },
884
+ autoOptionFocus: {
885
+ classPropertyName: "autoOptionFocus",
886
+ publicName: "autoOptionFocus",
887
+ isSignal: true,
888
+ isRequired: false,
889
+ transformFunction: null
890
+ },
891
+ selectOnFocus: {
892
+ classPropertyName: "selectOnFocus",
893
+ publicName: "selectOnFocus",
894
+ isSignal: true,
895
+ isRequired: false,
896
+ transformFunction: null
897
+ },
898
+ focusOnHover: {
899
+ classPropertyName: "focusOnHover",
900
+ publicName: "focusOnHover",
901
+ isSignal: true,
902
+ isRequired: false,
903
+ transformFunction: null
904
+ },
905
+ virtualScroll: {
906
+ classPropertyName: "virtualScroll",
907
+ publicName: "virtualScroll",
908
+ isSignal: true,
909
+ isRequired: false,
910
+ transformFunction: null
911
+ },
912
+ virtualScrollItemSize: {
913
+ classPropertyName: "virtualScrollItemSize",
914
+ publicName: "virtualScrollItemSize",
915
+ isSignal: true,
916
+ isRequired: false,
917
+ transformFunction: null
918
+ },
919
+ lazy: {
920
+ classPropertyName: "lazy",
921
+ publicName: "lazy",
922
+ isSignal: true,
923
+ isRequired: false,
924
+ transformFunction: null
925
+ },
926
+ scrollHeight: {
927
+ classPropertyName: "scrollHeight",
928
+ publicName: "scrollHeight",
929
+ isSignal: true,
930
+ isRequired: false,
931
+ transformFunction: null
932
+ },
933
+ autoFlip: {
934
+ classPropertyName: "autoFlip",
935
+ publicName: "autoFlip",
936
+ isSignal: true,
937
+ isRequired: false,
938
+ transformFunction: null
939
+ },
940
+ panelStyleClass: {
941
+ classPropertyName: "panelStyleClass",
942
+ publicName: "panelStyleClass",
943
+ isSignal: true,
944
+ isRequired: false,
945
+ transformFunction: null
946
+ }
947
+ },
948
+ outputs: {
949
+ completeMethod: "completeMethod",
950
+ valueChange: "valueChange",
951
+ optionSelect: "optionSelect",
952
+ optionUnselect: "optionUnselect",
953
+ opened: "opened",
954
+ closed: "closed",
955
+ cleared: "cleared",
956
+ dropdownClick: "dropdownClick",
957
+ lazyLoad: "lazyLoad",
958
+ inputFocus: "inputFocus",
959
+ inputBlur: "inputBlur"
960
+ },
961
+ providers: [{
962
+ provide: NG_VALUE_ACCESSOR,
963
+ useExisting: forwardRef(() => UiAutocomplete),
964
+ multi: true
965
+ }],
966
+ queries: [
967
+ {
968
+ propertyName: "itemTemplate",
969
+ first: true,
970
+ predicate: ["item"],
971
+ descendants: true,
972
+ isSignal: true
973
+ },
974
+ {
975
+ propertyName: "selectedItemTemplate",
976
+ first: true,
977
+ predicate: ["selectedItem"],
978
+ descendants: true,
979
+ isSignal: true
980
+ },
981
+ {
982
+ propertyName: "groupTemplate",
983
+ first: true,
984
+ predicate: ["group"],
985
+ descendants: true,
986
+ isSignal: true
987
+ },
988
+ {
989
+ propertyName: "headerTemplate",
990
+ first: true,
991
+ predicate: ["header"],
992
+ descendants: true,
993
+ isSignal: true
994
+ },
995
+ {
996
+ propertyName: "footerTemplate",
997
+ first: true,
998
+ predicate: ["footer"],
999
+ descendants: true,
1000
+ isSignal: true
1001
+ },
1002
+ {
1003
+ propertyName: "emptyTemplate",
1004
+ first: true,
1005
+ predicate: ["empty"],
1006
+ descendants: true,
1007
+ isSignal: true
1008
+ }
1009
+ ],
1010
+ viewQueries: [
1011
+ {
1012
+ propertyName: "containerEl",
1013
+ first: true,
1014
+ predicate: ["container"],
1015
+ descendants: true,
1016
+ isSignal: true
1017
+ },
1018
+ {
1019
+ propertyName: "inputEl",
1020
+ first: true,
1021
+ predicate: ["inputEl"],
1022
+ descendants: true,
1023
+ isSignal: true
1024
+ },
1025
+ {
1026
+ propertyName: "panelEl",
1027
+ first: true,
1028
+ predicate: ["panel"],
1029
+ descendants: true,
1030
+ isSignal: true
1031
+ },
1032
+ {
1033
+ propertyName: "viewport",
1034
+ first: true,
1035
+ predicate: CdkVirtualScrollViewport,
1036
+ descendants: true,
1037
+ isSignal: true
1038
+ },
1039
+ {
1040
+ propertyName: "tagEls",
1041
+ predicate: ["tagEl"],
1042
+ descendants: true,
1043
+ read: ElementRef,
1044
+ isSignal: true
1045
+ }
1046
+ ],
1047
+ usesInheritance: true,
1048
+ ngImport: i0,
1049
+ template: "<!-- One rendered row: group header or suggestion (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-autocomplete-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-autocomplete-option\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n selected: row.selected,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-autocomplete-option-label\">{{ row.entry.label }}</span>\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-autocomplete-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-autocomplete-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n </ng-container>\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-autocomplete-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n }\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-autocomplete-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyMessage() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field around a native combobox input. -->\n<div #container class=\"ui-autocomplete\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [autoHeight]=\"multiple()\"\n >\n <div class=\"ui-autocomplete-control\" (mousedown)=\"onBoxMousedown($event)\">\n @if (multiple()) {\n @if (selectedItemTemplate(); as tpl) {\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n }\n } @else {\n <!-- The listbox wraps ONLY the option tags: it may contain neither the combobox input\n nor the informative overflow chip. `display: contents` keeps the tags flowing in\n the box exactly as before. -->\n <div\n class=\"ui-autocomplete-tags\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of visibleTagRows(); track $index) {\n <ui-chip\n #tagEl\n class=\"ui-autocomplete-tag\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index)\"\n />\n }\n </div>\n }\n @if (overflowCount() > 0) {\n <!-- Collapsed remainder (`maxSelectedLabels`): informative only, not removable. -->\n <ui-chip\n class=\"ui-autocomplete-tag _overflow\"\n role=\"presentation\"\n [label]=\"overflowText()\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n />\n }\n }\n\n <input\n #inputEl\n uiBrowserFill\n type=\"text\"\n class=\"ui-autocomplete-input\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (browserFill)=\"onBrowserFill($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner\n uiFieldSuffix\n class=\"ui-autocomplete-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Recherche en cours\"\n />\n } @else if (dropdown()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-dropdown\"\n [class._open]=\"panelOpen()\"\n [disabled]=\"isDisabled()\"\n tabindex=\"-1\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-label]=\"dropdownAriaLabel()\"\n (click)=\"onDropdownClick($event)\"\n >\n <ui-icon [name]=\"dropdownIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (overlayOutsideClick)=\"close()\"\n (detach)=\"close()\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n",
1050
+ styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-autocomplete{display:block;--ui-field-box-cursor: text}.ui-autocomplete-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-autocomplete-tag-gap, var(--units-xs));min-width:0}.ui-autocomplete-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-autocomplete-tags{display:contents}.ui-autocomplete-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-autocomplete-tag-radius, var(--radius-full));transition: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-autocomplete-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-autocomplete-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-autocomplete-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-input{flex:1 1 var(--ui-autocomplete-input-min-width, 5rem);min-width:var(--ui-autocomplete-input-min-width, 5rem);width:auto}.ui-autocomplete-input._small{font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-autocomplete-clear-size, var(--size-components-2xs));height:var(--ui-autocomplete-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-autocomplete-clear-radius, var(--radius-full));background:none;color:var(--ui-autocomplete-clear-color, var(--form-low-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))),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-autocomplete-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:hover:not(:disabled){color:var(--ui-autocomplete-clear-color-hover, var(--form-high-content-hover))}.ui-autocomplete-clear:focus-visible{outline:none;color:var(--ui-autocomplete-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-clear:disabled{cursor:not-allowed;color:var(--ui-autocomplete-clear-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-autocomplete-dropdown:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{transition:rotate var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms);margin:0;padding:0;border:none;background:none;color:var(--ui-autocomplete-dropdown-color, var(--form-low-content-default));cursor:pointer}.ui-autocomplete-dropdown:hover:not(:disabled){color:var(--ui-autocomplete-dropdown-color-hover, var(--form-high-content-hover))}.ui-autocomplete-dropdown._open{rotate:180deg}.ui-autocomplete-dropdown:disabled{cursor:not-allowed;color:var(--ui-autocomplete-dropdown-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-loading{flex-shrink:0}.ui-autocomplete-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-autocomplete-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-autocomplete-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-autocomplete-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-autocomplete-panel-padding, var(--units-xs))}.ui-autocomplete-panel .ui-autocomplete-header,.ui-autocomplete-panel .ui-autocomplete-footer{padding:var(--ui-autocomplete-header-padding-y, var(--units-xs)) var(--ui-autocomplete-header-padding-x, var(--units-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));color:var(--ui-autocomplete-header-color, var(--form-high-content-default))}.ui-autocomplete-panel .ui-autocomplete-scroller{overflow:auto;max-height:var(--ui-autocomplete-scroller-max-height, 19.5rem)}.ui-autocomplete-panel .ui-autocomplete-scroller._small{max-height:var(--ui-autocomplete-scroller-max-height-small, 16rem)}.ui-autocomplete-panel .ui-autocomplete-viewport{width:100%}.ui-autocomplete-panel .ui-autocomplete-list{display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-list{gap:0}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group{height:var(--ui-autocomplete-option-height, 2.5rem)}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group._small{height:var(--ui-autocomplete-option-height-small, 2rem)}.ui-autocomplete-panel .ui-autocomplete-option{display:flex;align-items:center;gap:var(--ui-autocomplete-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-autocomplete-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));border-radius:var(--ui-autocomplete-option-radius, var(--radius-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select: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))),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-autocomplete-panel .ui-autocomplete-option._small{height:var(--ui-autocomplete-option-height-small, 2rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-panel .ui-autocomplete-option._focused,.ui-autocomplete-panel .ui-autocomplete-option:hover:not(._disabled){background-color:var(--ui-autocomplete-option-surface-hover, var(--global-background-default-hover))}.ui-autocomplete-panel .ui-autocomplete-option._selected{background-color:var(--ui-autocomplete-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-autocomplete-option-color-selected, var(--form-high-content-checked))}.ui-autocomplete-panel .ui-autocomplete-option._disabled{color:var(--ui-autocomplete-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-autocomplete-panel .ui-autocomplete-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-autocomplete-panel .ui-autocomplete-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-autocomplete-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-autocomplete-weight, var(--weight-bold));color:var(--ui-autocomplete-group-color, var(--form-low-content-default))}.ui-autocomplete-panel .ui-autocomplete-group._small{height:var(--ui-autocomplete-group-height-small, 1.5rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-group-font-size-small, var(--size-typography-text-sm))}.ui-autocomplete-panel .ui-autocomplete-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-autocomplete-option-height, 2.5rem);padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-empty-color, var(--form-low-content-default))}\n"],
1051
+ dependencies: [
1052
+ {
1053
+ kind: "directive",
1054
+ type: NgTemplateOutlet,
1055
+ selector: "[ngTemplateOutlet]",
1056
+ inputs: [
1057
+ "ngTemplateOutletContext",
1058
+ "ngTemplateOutlet",
1059
+ "ngTemplateOutletInjector"
1060
+ ]
1061
+ },
1062
+ {
1063
+ kind: "ngmodule",
1064
+ type: OverlayModule
1065
+ },
1066
+ {
1067
+ kind: "directive",
1068
+ type: i1.CdkConnectedOverlay,
1069
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
1070
+ inputs: [
1071
+ "cdkConnectedOverlayOrigin",
1072
+ "cdkConnectedOverlayPositions",
1073
+ "cdkConnectedOverlayPositionStrategy",
1074
+ "cdkConnectedOverlayOffsetX",
1075
+ "cdkConnectedOverlayOffsetY",
1076
+ "cdkConnectedOverlayWidth",
1077
+ "cdkConnectedOverlayHeight",
1078
+ "cdkConnectedOverlayMinWidth",
1079
+ "cdkConnectedOverlayMinHeight",
1080
+ "cdkConnectedOverlayBackdropClass",
1081
+ "cdkConnectedOverlayPanelClass",
1082
+ "cdkConnectedOverlayViewportMargin",
1083
+ "cdkConnectedOverlayScrollStrategy",
1084
+ "cdkConnectedOverlayOpen",
1085
+ "cdkConnectedOverlayDisableClose",
1086
+ "cdkConnectedOverlayTransformOriginOn",
1087
+ "cdkConnectedOverlayHasBackdrop",
1088
+ "cdkConnectedOverlayLockPosition",
1089
+ "cdkConnectedOverlayFlexibleDimensions",
1090
+ "cdkConnectedOverlayGrowAfterOpen",
1091
+ "cdkConnectedOverlayPush",
1092
+ "cdkConnectedOverlayDisposeOnNavigation",
1093
+ "cdkConnectedOverlayUsePopover",
1094
+ "cdkConnectedOverlayMatchWidth",
1095
+ "cdkConnectedOverlay"
1096
+ ],
1097
+ outputs: [
1098
+ "backdropClick",
1099
+ "positionChange",
1100
+ "attach",
1101
+ "detach",
1102
+ "overlayKeydown",
1103
+ "overlayOutsideClick"
1104
+ ],
1105
+ exportAs: ["cdkConnectedOverlay"]
1106
+ },
1107
+ {
1108
+ kind: "directive",
1109
+ type: i1.ɵɵCdkFixedSizeVirtualScroll,
1110
+ selector: "cdk-virtual-scroll-viewport[itemSize]",
1111
+ inputs: [
1112
+ "itemSize",
1113
+ "minBufferPx",
1114
+ "maxBufferPx"
1115
+ ]
1116
+ },
1117
+ {
1118
+ kind: "directive",
1119
+ type: i1.ɵɵCdkVirtualForOf,
1120
+ selector: "[cdkVirtualFor][cdkVirtualForOf]",
1121
+ inputs: [
1122
+ "cdkVirtualForOf",
1123
+ "cdkVirtualForTrackBy",
1124
+ "cdkVirtualForTemplate",
1125
+ "cdkVirtualForTemplateCacheSize"
1126
+ ]
1127
+ },
1128
+ {
1129
+ kind: "component",
1130
+ type: i1.ɵɵCdkVirtualScrollViewport,
1131
+ selector: "cdk-virtual-scroll-viewport",
1132
+ inputs: ["orientation", "appendOnly"],
1133
+ outputs: ["scrolledIndexChange"]
1134
+ },
1135
+ {
1136
+ kind: "ngmodule",
1137
+ type: ScrollingModule
1138
+ },
1139
+ {
1140
+ kind: "component",
1141
+ type: UiField,
1142
+ selector: "ui-field",
1143
+ inputs: [
1144
+ "label",
1145
+ "for",
1146
+ "required",
1147
+ "size",
1148
+ "level",
1149
+ "floatLabel",
1150
+ "filled",
1151
+ "disabled",
1152
+ "readonly",
1153
+ "multiline",
1154
+ "autoHeight",
1155
+ "message",
1156
+ "messageId",
1157
+ "showMessageIcon",
1158
+ "messageIcon",
1159
+ "hasFooter",
1160
+ "hasPrefix"
1161
+ ]
1162
+ },
1163
+ {
1164
+ kind: "component",
1165
+ type: UiIcon,
1166
+ selector: "ui-icon",
1167
+ inputs: [
1168
+ "name",
1169
+ "size",
1170
+ "type",
1171
+ "family",
1172
+ "decorative",
1173
+ "ariaLabel"
1174
+ ]
1175
+ },
1176
+ {
1177
+ kind: "component",
1178
+ type: UiSpinner,
1179
+ selector: "ui-spinner",
1180
+ inputs: [
1181
+ "size",
1182
+ "orientation",
1183
+ "label",
1184
+ "ariaLabel",
1185
+ "spinnerTemplate",
1186
+ "image",
1187
+ "imageAlt",
1188
+ "icon",
1189
+ "strokeWidth",
1190
+ "fill",
1191
+ "animationDuration",
1192
+ "delay"
1193
+ ]
1194
+ },
1195
+ {
1196
+ kind: "component",
1197
+ type: UiChip,
1198
+ selector: "ui-chip",
1199
+ inputs: [
1200
+ "label",
1201
+ "level",
1202
+ "subLevel",
1203
+ "size",
1204
+ "icon",
1205
+ "image",
1206
+ "alt",
1207
+ "rounded",
1208
+ "removable",
1209
+ "removeIcon",
1210
+ "disabled",
1211
+ "selectable",
1212
+ "selected",
1213
+ "selectedIcon",
1214
+ "ariaLabel",
1215
+ "ariaLabelledBy",
1216
+ "removeAriaLabel",
1217
+ "removeTabindex"
1218
+ ],
1219
+ outputs: [
1220
+ "selectedChange",
1221
+ "remove",
1222
+ "chipClick",
1223
+ "imageError"
1224
+ ]
1225
+ },
1226
+ {
1227
+ kind: "directive",
1228
+ type: UiMotion,
1229
+ selector: "[uiMotion]",
1230
+ inputs: [
1231
+ "uiMotion",
1232
+ "motionDuration",
1233
+ "motionDelay",
1234
+ "motionEasing",
1235
+ "motionEnterEasing",
1236
+ "motionLeaveEasing",
1237
+ "motionDistance",
1238
+ "motionScale",
1239
+ "motionDisabled",
1240
+ "motionOnInsert"
1241
+ ],
1242
+ exportAs: ["uiMotion"]
1243
+ },
1244
+ {
1245
+ kind: "directive",
1246
+ type: UiBrowserFill,
1247
+ selector: "[uiBrowserFill]",
1248
+ outputs: ["browserFill"]
1249
+ }
1250
+ ]
1251
+ });
1252
+ }
1253
+ };
1254
+ i0.ɵɵngDeclareClassMetadata({
1255
+ minVersion: "12.0.0",
1256
+ version: "22.3.0",
1257
+ ngImport: i0,
1258
+ type: UiAutocomplete,
1259
+ decorators: [{
1260
+ type: Component,
1261
+ args: [{
1262
+ selector: "ui-autocomplete",
1263
+ imports: [
1264
+ NgTemplateOutlet,
1265
+ OverlayModule,
1266
+ ScrollingModule,
1267
+ UiField,
1268
+ UiIcon,
1269
+ UiSpinner,
1270
+ UiChip,
1271
+ UiMotion,
1272
+ UiBrowserFill
1273
+ ],
1274
+ providers: [{
1275
+ provide: NG_VALUE_ACCESSOR,
1276
+ useExisting: forwardRef(() => UiAutocomplete),
1277
+ multi: true
1278
+ }],
1279
+ template: "<!-- One rendered row: group header or suggestion (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-autocomplete-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-autocomplete-option\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._selected]=\"row.selected\"\n [class._focused]=\"row.index === focusedIndex()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.selected\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n selected: row.selected,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-autocomplete-option-label\">{{ row.entry.label }}</span>\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-autocomplete-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-autocomplete-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n <ng-container *cdkVirtualFor=\"let row of visibleRows(); trackBy: trackRow\">\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n </ng-container>\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-autocomplete-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-autocomplete-list\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n }\n @if (showEmpty()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-autocomplete-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Empty state row. -->\n<ng-template #emptyTpl>\n <li class=\"ui-autocomplete-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyMessage() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field around a native combobox input. -->\n<div #container class=\"ui-autocomplete\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n [autoHeight]=\"multiple()\"\n >\n <div class=\"ui-autocomplete-control\" (mousedown)=\"onBoxMousedown($event)\">\n @if (multiple()) {\n @if (selectedItemTemplate(); as tpl) {\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"ctx\" />\n }\n } @else {\n <!-- The listbox wraps ONLY the option tags: it may contain neither the combobox input\n nor the informative overflow chip. `display: contents` keeps the tags flowing in\n the box exactly as before. -->\n <div\n class=\"ui-autocomplete-tags\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of visibleTagRows(); track $index) {\n <ui-chip\n #tagEl\n class=\"ui-autocomplete-tag\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index)\"\n />\n }\n </div>\n }\n @if (overflowCount() > 0) {\n <!-- Collapsed remainder (`maxSelectedLabels`): informative only, not removable. -->\n <ui-chip\n class=\"ui-autocomplete-tag _overflow\"\n role=\"presentation\"\n [label]=\"overflowText()\"\n size=\"small\"\n [disabled]=\"isDisabled()\"\n />\n }\n }\n\n <input\n #inputEl\n uiBrowserFill\n type=\"text\"\n class=\"ui-autocomplete-input\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (browserFill)=\"onBrowserFill($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClearClick($event)\"\n >\n <ui-icon name=\"xmark\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (loading()) {\n <ui-spinner\n uiFieldSuffix\n class=\"ui-autocomplete-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Recherche en cours\"\n />\n } @else if (dropdown()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-autocomplete-dropdown\"\n [class._open]=\"panelOpen()\"\n [disabled]=\"isDisabled()\"\n tabindex=\"-1\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? listboxId() : null\"\n [attr.aria-label]=\"dropdownAriaLabel()\"\n (click)=\"onDropdownClick($event)\"\n >\n <ui-icon [name]=\"dropdownIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n </ui-field>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (overlayOutsideClick)=\"close()\"\n (detach)=\"close()\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n",
1280
+ styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-autocomplete{display:block;--ui-field-box-cursor: text}.ui-autocomplete-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-autocomplete-tag-gap, var(--units-xs));min-width:0}.ui-autocomplete-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-autocomplete-tags{display:contents}.ui-autocomplete-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-autocomplete-tag-radius, var(--radius-full));transition: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-autocomplete-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-autocomplete-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-autocomplete-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-input{flex:1 1 var(--ui-autocomplete-input-min-width, 5rem);min-width:var(--ui-autocomplete-input-min-width, 5rem);width:auto}.ui-autocomplete-input._small{font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-autocomplete-clear-size, var(--size-components-2xs));height:var(--ui-autocomplete-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-autocomplete-clear-radius, var(--radius-full));background:none;color:var(--ui-autocomplete-clear-color, var(--form-low-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))),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-autocomplete-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-clear:hover:not(:disabled){color:var(--ui-autocomplete-clear-color-hover, var(--form-high-content-hover))}.ui-autocomplete-clear:focus-visible{outline:none;color:var(--ui-autocomplete-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-autocomplete-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-autocomplete-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-autocomplete-clear:disabled{cursor:not-allowed;color:var(--ui-autocomplete-clear-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-autocomplete-dropdown:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-dropdown._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-dropdown{transition:rotate var(--ui-motion-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-motion-easing, var(--motion-toggle-easing, var(--transition-easeinout))) var(--ui-motion-delay, 0ms);margin:0;padding:0;border:none;background:none;color:var(--ui-autocomplete-dropdown-color, var(--form-low-content-default));cursor:pointer}.ui-autocomplete-dropdown:hover:not(:disabled){color:var(--ui-autocomplete-dropdown-color-hover, var(--form-high-content-hover))}.ui-autocomplete-dropdown._open{rotate:180deg}.ui-autocomplete-dropdown:disabled{cursor:not-allowed;color:var(--ui-autocomplete-dropdown-color-disabled, var(--form-high-content-disabled))}.ui-autocomplete-loading{flex-shrink:0}.ui-autocomplete-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-autocomplete-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-autocomplete-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-autocomplete-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-autocomplete-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-autocomplete-panel-padding, var(--units-xs))}.ui-autocomplete-panel .ui-autocomplete-header,.ui-autocomplete-panel .ui-autocomplete-footer{padding:var(--ui-autocomplete-header-padding-y, var(--units-xs)) var(--ui-autocomplete-header-padding-x, var(--units-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));color:var(--ui-autocomplete-header-color, var(--form-high-content-default))}.ui-autocomplete-panel .ui-autocomplete-scroller{overflow:auto;max-height:var(--ui-autocomplete-scroller-max-height, 19.5rem)}.ui-autocomplete-panel .ui-autocomplete-scroller._small{max-height:var(--ui-autocomplete-scroller-max-height-small, 16rem)}.ui-autocomplete-panel .ui-autocomplete-viewport{width:100%}.ui-autocomplete-panel .ui-autocomplete-list{display:flex;flex-direction:column;gap:var(--ui-autocomplete-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-list{gap:0}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group{height:var(--ui-autocomplete-option-height, 2.5rem)}.ui-autocomplete-panel .ui-autocomplete-viewport .ui-autocomplete-group._small{height:var(--ui-autocomplete-option-height-small, 2rem)}.ui-autocomplete-panel .ui-autocomplete-option{display:flex;align-items:center;gap:var(--ui-autocomplete-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-autocomplete-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));border-radius:var(--ui-autocomplete-option-radius, var(--radius-sm));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select: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))),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-autocomplete-panel .ui-autocomplete-option._small{height:var(--ui-autocomplete-option-height-small, 2rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-font-size-small, var(--size-typography-text-md))}.ui-autocomplete-panel .ui-autocomplete-option._focused,.ui-autocomplete-panel .ui-autocomplete-option:hover:not(._disabled){background-color:var(--ui-autocomplete-option-surface-hover, var(--global-background-default-hover))}.ui-autocomplete-panel .ui-autocomplete-option._selected{background-color:var(--ui-autocomplete-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-autocomplete-option-color-selected, var(--form-high-content-checked))}.ui-autocomplete-panel .ui-autocomplete-option._disabled{color:var(--ui-autocomplete-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-autocomplete-panel .ui-autocomplete-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-autocomplete-panel .ui-autocomplete-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-autocomplete-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-autocomplete-weight, var(--weight-bold));color:var(--ui-autocomplete-group-color, var(--form-low-content-default))}.ui-autocomplete-panel .ui-autocomplete-group._small{height:var(--ui-autocomplete-group-height-small, 1.5rem);padding:0 var(--ui-autocomplete-option-padding-x-small, var(--units-md));font-size:var(--ui-autocomplete-group-font-size-small, var(--size-typography-text-sm))}.ui-autocomplete-panel .ui-autocomplete-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-autocomplete-option-height, 2.5rem);padding:0 var(--ui-autocomplete-option-padding-x, var(--units-default));font-family:var(--ui-autocomplete-font-family, var(--fontfamily-base));font-size:var(--ui-autocomplete-font-size, var(--size-typography-text-default));color:var(--ui-autocomplete-empty-color, var(--form-low-content-default))}\n"]
1281
+ }]
1282
+ }],
1283
+ ctorParameters: () => [],
1284
+ propDecorators: {
1285
+ suggestions: [{
1286
+ type: i0.Input,
1287
+ args: [{
1288
+ isSignal: true,
1289
+ alias: "suggestions",
1290
+ required: false
1291
+ }]
1292
+ }],
1293
+ optionLabel: [{
1294
+ type: i0.Input,
1295
+ args: [{
1296
+ isSignal: true,
1297
+ alias: "optionLabel",
1298
+ required: false
1299
+ }]
1300
+ }],
1301
+ optionValue: [{
1302
+ type: i0.Input,
1303
+ args: [{
1304
+ isSignal: true,
1305
+ alias: "optionValue",
1306
+ required: false
1307
+ }]
1308
+ }],
1309
+ optionDisabled: [{
1310
+ type: i0.Input,
1311
+ args: [{
1312
+ isSignal: true,
1313
+ alias: "optionDisabled",
1314
+ required: false
1315
+ }]
1316
+ }],
1317
+ dataKey: [{
1318
+ type: i0.Input,
1319
+ args: [{
1320
+ isSignal: true,
1321
+ alias: "dataKey",
1322
+ required: false
1323
+ }]
1324
+ }],
1325
+ group: [{
1326
+ type: i0.Input,
1327
+ args: [{
1328
+ isSignal: true,
1329
+ alias: "group",
1330
+ required: false
1331
+ }]
1332
+ }],
1333
+ optionGroupLabel: [{
1334
+ type: i0.Input,
1335
+ args: [{
1336
+ isSignal: true,
1337
+ alias: "optionGroupLabel",
1338
+ required: false
1339
+ }]
1340
+ }],
1341
+ optionGroupChildren: [{
1342
+ type: i0.Input,
1343
+ args: [{
1344
+ isSignal: true,
1345
+ alias: "optionGroupChildren",
1346
+ required: false
1347
+ }]
1348
+ }],
1349
+ placeholder: [{
1350
+ type: i0.Input,
1351
+ args: [{
1352
+ isSignal: true,
1353
+ alias: "placeholder",
1354
+ required: false
1355
+ }]
1356
+ }],
1357
+ minLength: [{
1358
+ type: i0.Input,
1359
+ args: [{
1360
+ isSignal: true,
1361
+ alias: "minLength",
1362
+ required: false
1363
+ }]
1364
+ }],
1365
+ delay: [{
1366
+ type: i0.Input,
1367
+ args: [{
1368
+ isSignal: true,
1369
+ alias: "delay",
1370
+ required: false
1371
+ }]
1372
+ }],
1373
+ completeOnFocus: [{
1374
+ type: i0.Input,
1375
+ args: [{
1376
+ isSignal: true,
1377
+ alias: "completeOnFocus",
1378
+ required: false
1379
+ }]
1380
+ }],
1381
+ dropdown: [{
1382
+ type: i0.Input,
1383
+ args: [{
1384
+ isSignal: true,
1385
+ alias: "dropdown",
1386
+ required: false
1387
+ }]
1388
+ }],
1389
+ dropdownMode: [{
1390
+ type: i0.Input,
1391
+ args: [{
1392
+ isSignal: true,
1393
+ alias: "dropdownMode",
1394
+ required: false
1395
+ }]
1396
+ }],
1397
+ dropdownAriaLabel: [{
1398
+ type: i0.Input,
1399
+ args: [{
1400
+ isSignal: true,
1401
+ alias: "dropdownAriaLabel",
1402
+ required: false
1403
+ }]
1404
+ }],
1405
+ dropdownIcon: [{
1406
+ type: i0.Input,
1407
+ args: [{
1408
+ isSignal: true,
1409
+ alias: "dropdownIcon",
1410
+ required: false
1411
+ }]
1412
+ }],
1413
+ forceSelection: [{
1414
+ type: i0.Input,
1415
+ args: [{
1416
+ isSignal: true,
1417
+ alias: "forceSelection",
1418
+ required: false
1419
+ }]
1420
+ }],
1421
+ ripple: [{
1422
+ type: i0.Input,
1423
+ args: [{
1424
+ isSignal: true,
1425
+ alias: "ripple",
1426
+ required: false
1427
+ }]
1428
+ }],
1429
+ multiple: [{
1430
+ type: i0.Input,
1431
+ args: [{
1432
+ isSignal: true,
1433
+ alias: "multiple",
1434
+ required: false
1435
+ }]
1436
+ }],
1437
+ unique: [{
1438
+ type: i0.Input,
1439
+ args: [{
1440
+ isSignal: true,
1441
+ alias: "unique",
1442
+ required: false
1443
+ }]
1444
+ }],
1445
+ maxSelectedLabels: [{
1446
+ type: i0.Input,
1447
+ args: [{
1448
+ isSignal: true,
1449
+ alias: "maxSelectedLabels",
1450
+ required: false
1451
+ }]
1452
+ }],
1453
+ overflowLabel: [{
1454
+ type: i0.Input,
1455
+ args: [{
1456
+ isSignal: true,
1457
+ alias: "overflowLabel",
1458
+ required: false
1459
+ }]
1460
+ }],
1461
+ removeTagLabel: [{
1462
+ type: i0.Input,
1463
+ args: [{
1464
+ isSignal: true,
1465
+ alias: "removeTagLabel",
1466
+ required: false
1467
+ }]
1468
+ }],
1469
+ showClear: [{
1470
+ type: i0.Input,
1471
+ args: [{
1472
+ isSignal: true,
1473
+ alias: "showClear",
1474
+ required: false
1475
+ }]
1476
+ }],
1477
+ clearAriaLabel: [{
1478
+ type: i0.Input,
1479
+ args: [{
1480
+ isSignal: true,
1481
+ alias: "clearAriaLabel",
1482
+ required: false
1483
+ }]
1484
+ }],
1485
+ loading: [{
1486
+ type: i0.Input,
1487
+ args: [{
1488
+ isSignal: true,
1489
+ alias: "loading",
1490
+ required: false
1491
+ }]
1492
+ }],
1493
+ emptyMessage: [{
1494
+ type: i0.Input,
1495
+ args: [{
1496
+ isSignal: true,
1497
+ alias: "emptyMessage",
1498
+ required: false
1499
+ }]
1500
+ }],
1501
+ showEmptyMessage: [{
1502
+ type: i0.Input,
1503
+ args: [{
1504
+ isSignal: true,
1505
+ alias: "showEmptyMessage",
1506
+ required: false
1507
+ }]
1508
+ }],
1509
+ autoOptionFocus: [{
1510
+ type: i0.Input,
1511
+ args: [{
1512
+ isSignal: true,
1513
+ alias: "autoOptionFocus",
1514
+ required: false
1515
+ }]
1516
+ }],
1517
+ selectOnFocus: [{
1518
+ type: i0.Input,
1519
+ args: [{
1520
+ isSignal: true,
1521
+ alias: "selectOnFocus",
1522
+ required: false
1523
+ }]
1524
+ }],
1525
+ focusOnHover: [{
1526
+ type: i0.Input,
1527
+ args: [{
1528
+ isSignal: true,
1529
+ alias: "focusOnHover",
1530
+ required: false
1531
+ }]
1532
+ }],
1533
+ virtualScroll: [{
1534
+ type: i0.Input,
1535
+ args: [{
1536
+ isSignal: true,
1537
+ alias: "virtualScroll",
1538
+ required: false
1539
+ }]
1540
+ }],
1541
+ virtualScrollItemSize: [{
1542
+ type: i0.Input,
1543
+ args: [{
1544
+ isSignal: true,
1545
+ alias: "virtualScrollItemSize",
1546
+ required: false
1547
+ }]
1548
+ }],
1549
+ lazy: [{
1550
+ type: i0.Input,
1551
+ args: [{
1552
+ isSignal: true,
1553
+ alias: "lazy",
1554
+ required: false
1555
+ }]
1556
+ }],
1557
+ scrollHeight: [{
1558
+ type: i0.Input,
1559
+ args: [{
1560
+ isSignal: true,
1561
+ alias: "scrollHeight",
1562
+ required: false
1563
+ }]
1564
+ }],
1565
+ autoFlip: [{
1566
+ type: i0.Input,
1567
+ args: [{
1568
+ isSignal: true,
1569
+ alias: "autoFlip",
1570
+ required: false
1571
+ }]
1572
+ }],
1573
+ panelStyleClass: [{
1574
+ type: i0.Input,
1575
+ args: [{
1576
+ isSignal: true,
1577
+ alias: "panelStyleClass",
1578
+ required: false
1579
+ }]
1580
+ }],
1581
+ completeMethod: [{
1582
+ type: i0.Output,
1583
+ args: ["completeMethod"]
1584
+ }],
1585
+ valueChange: [{
1586
+ type: i0.Output,
1587
+ args: ["valueChange"]
1588
+ }],
1589
+ optionSelect: [{
1590
+ type: i0.Output,
1591
+ args: ["optionSelect"]
1592
+ }],
1593
+ optionUnselect: [{
1594
+ type: i0.Output,
1595
+ args: ["optionUnselect"]
1596
+ }],
1597
+ opened: [{
1598
+ type: i0.Output,
1599
+ args: ["opened"]
1600
+ }],
1601
+ closed: [{
1602
+ type: i0.Output,
1603
+ args: ["closed"]
1604
+ }],
1605
+ cleared: [{
1606
+ type: i0.Output,
1607
+ args: ["cleared"]
1608
+ }],
1609
+ dropdownClick: [{
1610
+ type: i0.Output,
1611
+ args: ["dropdownClick"]
1612
+ }],
1613
+ lazyLoad: [{
1614
+ type: i0.Output,
1615
+ args: ["lazyLoad"]
1616
+ }],
1617
+ inputFocus: [{
1618
+ type: i0.Output,
1619
+ args: ["inputFocus"]
1620
+ }],
1621
+ inputBlur: [{
1622
+ type: i0.Output,
1623
+ args: ["inputBlur"]
1624
+ }],
1625
+ itemTemplate: [{
1626
+ type: i0.ContentChild,
1627
+ args: ["item", { isSignal: true }]
1628
+ }],
1629
+ selectedItemTemplate: [{
1630
+ type: i0.ContentChild,
1631
+ args: ["selectedItem", { isSignal: true }]
1632
+ }],
1633
+ groupTemplate: [{
1634
+ type: i0.ContentChild,
1635
+ args: ["group", { isSignal: true }]
1636
+ }],
1637
+ headerTemplate: [{
1638
+ type: i0.ContentChild,
1639
+ args: ["header", { isSignal: true }]
1640
+ }],
1641
+ footerTemplate: [{
1642
+ type: i0.ContentChild,
1643
+ args: ["footer", { isSignal: true }]
1644
+ }],
1645
+ emptyTemplate: [{
1646
+ type: i0.ContentChild,
1647
+ args: ["empty", { isSignal: true }]
1648
+ }],
1649
+ containerEl: [{
1650
+ type: i0.ViewChild,
1651
+ args: ["container", { isSignal: true }]
1652
+ }],
1653
+ inputEl: [{
1654
+ type: i0.ViewChild,
1655
+ args: ["inputEl", { isSignal: true }]
1656
+ }],
1657
+ panelEl: [{
1658
+ type: i0.ViewChild,
1659
+ args: ["panel", { isSignal: true }]
1660
+ }],
1661
+ viewport: [{
1662
+ type: i0.ViewChild,
1663
+ args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }]
1664
+ }],
1665
+ tagEls: [{
1666
+ type: i0.ViewChildren,
1667
+ args: ["tagEl", {
1668
+ read: ElementRef,
1669
+ isSignal: true
1670
+ }]
1671
+ }]
1672
+ }
1673
+ });
1000
1674
  export { UiAutocomplete };
1001
- //# sourceMappingURL=4sh-ui-kit-forms-ui-autocomplete.mjs.map
1675
+
1676
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-autocomplete.mjs.map