@4sh/ui-kit 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,889 +1,1553 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, numberAttribute, output, contentChild, viewChild, signal, computed, effect, 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 } 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 { UiMotion } from '@4sh/ui-kit/motion';
13
- import { closeOnNavigation } from '@4sh/ui-kit/overlay';
14
-
15
- /**
16
- * ui-select — headless dropdown list built on the `ui-field` shell
17
- * (label + box + helper) with a token-styled options panel in a CDK overlay.
18
- *
19
- * The trigger is a native element following the WAI-ARIA combobox pattern
20
- * (`role="combobox"` + `aria-activedescendant`: focus never leaves the trigger
21
- * or the filter input, options are only visually focused). Supports primitive
22
- * or object options (`optionLabel` / `optionValue` / `optionDisabled`), grouped
23
- * options, single or `multiple` selection (checkmark / checkbox display),
24
- * built-in filtering, an `editable` free-text mode, `showClear`, `loading`, and
25
- * CDK virtual scrolling (plus lazy loading of huge lists) — all wired through
26
- * `ControlValueAccessor` on {@link BaseFormField} (shared label / helper /
27
- * level / validation / states).
28
- *
29
- * Customisation: the `#item`, `#selectedItem`, `#group`, `#header`, `#footer`
30
- * and `#empty` templates, `panelStyleClass`, and the local SCSS variables.
31
- *
32
- * @example
33
- * ```html
34
- * <ui-select label="Ville" [options]="cities" optionLabel="name" optionValue="code" [(ngModel)]="city" />
35
- * ```
36
- */
37
- class UiSelect extends BaseFormField {
38
- constructor() {
39
- super();
40
- /** Options to display. Primitives, objects, or groups (see `group`). */
41
- this.options = input([], /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
43
- /** Field name (dot-path) to read a label from, when options are objects. */
44
- this.optionLabel = input(/* @ts-ignore */
45
- ...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
46
- /** Field name (dot-path) to read the value from, when options are objects. */
47
- this.optionValue = input(/* @ts-ignore */
48
- ...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
49
- /** Field name (dot-path) to read the disabled flag from, when options are objects. */
50
- this.optionDisabled = input(/* @ts-ignore */
51
- ...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
52
- /** Treat `options` as groups (`optionGroupLabel` + `optionGroupChildren`). */
53
- this.group = input(false, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
54
- /** Field name of a group's label. */
55
- this.optionGroupLabel = input('label', /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
57
- /** Field name of a group's children array. */
58
- this.optionGroupChildren = input('items', /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
60
- /** Property used to compare object values for equality (selection matching). */
61
- this.dataKey = input(/* @ts-ignore */
62
- ...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
63
- /** Allow selecting several values (the model becomes an array, the panel stays open). */
64
- this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
65
- /** Display a check indicator on the selected option(s). */
66
- this.checkmark = input(false, { ...(ngDevMode ? { debugName: "checkmark" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
67
- /** Display a checkbox in front of each option (`multiple` mode). */
68
- this.checkbox = input(false, { ...(ngDevMode ? { debugName: "checkbox" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
69
- /** Max number of selected items rendered in the trigger (`multiple`); the rest collapses into `overflowLabel`. */
70
- this.maxSelectedLabels = input(/* @ts-ignore */
71
- ...(ngDevMode ? [undefined, { debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []));
72
- /** Collapsed-count indicator — `{0}` is replaced by the number of hidden items. */
73
- this.overflowLabel = input('(+{0} autres)', /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []));
75
- /** Placeholder shown in the trigger when nothing is selected. */
76
- this.placeholder = input(/* @ts-ignore */
77
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
78
- /** Show a clear (×) action in the trigger when a value is set. */
79
- this.showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
80
- /** Accessible name of the clear action. */
81
- this.clearAriaLabel = input('Effacer la sélection', /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []));
83
- /** FontAwesome icon of the dropdown chevron. */
84
- this.icon = input('angle-down', /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
86
- /** Show the dropdown chevron (the trigger stays a combobox without it). */
87
- this.showIcon = input(true, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
88
- /** Show the built-in filter input inside the panel. */
89
- this.filter = input(false, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
90
- /** Placeholder of the filter input. */
91
- this.filterPlaceholder = input(/* @ts-ignore */
92
- ...(ngDevMode ? [undefined, { debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
93
- /** Accessible name of the filter input. */
94
- this.filterAriaLabel = input('Filtrer les options', /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "filterAriaLabel" }] : /* istanbul ignore next */ []));
96
- /** Comma-separated field names (dot-paths) the filter matches against (defaults to the label). */
97
- this.filterBy = input(/* @ts-ignore */
98
- ...(ngDevMode ? [undefined, { debugName: "filterBy" }] : /* istanbul ignore next */ []));
99
- /** Move the focus into the filter input when the panel opens. */
100
- this.autofocusFilter = input(true, { ...(ngDevMode ? { debugName: "autofocusFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
101
- /** Reset the filter text when the panel closes. */
102
- this.resetFilterOnHide = input(false, { ...(ngDevMode ? { debugName: "resetFilterOnHide" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
103
- /** Ripple Effect */
104
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
105
- /** Message shown when there is no option. */
106
- this.emptyMessage = input('Aucune option disponible', /* @ts-ignore */
107
- ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
108
- /** Message shown when the filter matches nothing. */
109
- this.emptyFilterMessage = input('Aucun résultat', /* @ts-ignore */
110
- ...(ngDevMode ? [{ debugName: "emptyFilterMessage" }] : /* istanbul ignore next */ []));
111
- /** Free-text mode: the trigger becomes a real `<input>`, typing sets the value directly. */
112
- this.editable = input(false, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
113
- /** Loading state: a spinner replaces the chevron and the options are not interactive. */
114
- this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
115
- /** Visually focus the first option when the panel opens. */
116
- this.autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
117
- /** Select an option as soon as it is visually focused with the keyboard (single mode). */
118
- this.selectOnFocus = input(false, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
119
- /** Visually focus the option under the mouse pointer. */
120
- this.focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
121
- /** Render the options through a CDK virtual-scroll viewport. */
122
- this.virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
123
- /** Fixed height (px) of one row — required by the virtual scroller. */
124
- this.virtualScrollItemSize = input(40, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
125
- /** With `virtualScroll`: emit `lazyLoad` with the rendered range (lazy loading). */
126
- this.lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
127
- /** Max height of the options list (CSS size, e.g. `'320px'`). Defaults from the SCSS. */
128
- this.scrollHeight = input(/* @ts-ignore */
129
- ...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
130
- /**
131
- * Auto-flip the panel above the trigger when there isn't enough room below
132
- * (default). Set `false` to lock it below the trigger regardless of space.
133
- */
134
- this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
135
- /** Extra class(es) applied to the panel (scoped custom styling). */
136
- this.panelStyleClass = input(/* @ts-ignore */
137
- ...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
138
- /**
139
- * Panel width. By default it matches the field, which is too narrow when the
140
- * field is compact (a phone dialling code in a `ui-input-group`, say) but the
141
- * options are not. `'auto'` sizes the panel to its content while keeping the
142
- * field width as a floor; any CSS size (`'260px'`) pins it.
143
- */
144
- this.panelWidth = input(/* @ts-ignore */
145
- ...(ngDevMode ? [undefined, { debugName: "panelWidth" }] : /* istanbul ignore next */ []));
146
- /** Emitted whenever the value changes (selection, typing, clear). */
147
- this.valueChange = output();
148
- /** Emitted when the panel opens. */
149
- this.opened = output();
150
- /** Emitted when the panel closes. */
151
- this.closed = output();
152
- /** Emitted when the value is cleared. */
153
- this.cleared = output();
154
- /** Emitted on each filter keystroke. */
155
- this.filterChange = output();
156
- /** Emitted when the virtual viewport's rendered range changes (`virtualScroll` + `lazy`). */
157
- this.lazyLoad = output();
158
- /** Emitted when the trigger receives focus. */
159
- this.inputFocus = output();
160
- /** Emitted when the trigger loses focus. */
161
- this.inputBlur = output();
162
- /** Custom option template: `<ng-template #item let-option let-selected="selected">`. */
163
- this.itemTemplate = contentChild('item', /* @ts-ignore */
164
- ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
165
- /** Custom selected-value template (per selected option): `<ng-template #selectedItem let-option>`. */
166
- this.selectedItemTemplate = contentChild('selectedItem', /* @ts-ignore */
167
- ...(ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []));
168
- /** Custom group-header template: `<ng-template #group let-group>`. */
169
- this.groupTemplate = contentChild('group', /* @ts-ignore */
170
- ...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
171
- /** Free content pinned above the list (before the filter). */
172
- this.headerTemplate = contentChild('header', /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
174
- /** Free content pinned under the list. */
175
- this.footerTemplate = contentChild('footer', /* @ts-ignore */
176
- ...(ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []));
177
- /** Custom empty-state template. */
178
- this.emptyTemplate = contentChild('empty', /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
180
- /** @ignore Component root (overlay origin + outside-focus detection). */
181
- this.containerEl = viewChild.required('container', /* @ts-ignore */
182
- ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
183
- /** @ignore Focusable trigger (combobox button or editable input). */
184
- this.triggerEl = viewChild('trigger', /* @ts-ignore */
185
- ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
186
- /** @ignore Panel root element (for scrolling the focused option into view). */
187
- this.panelEl = viewChild('panel', /* @ts-ignore */
188
- ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
189
- /** @ignore Filter input (auto-focused on open). */
190
- this.filterInputEl = viewChild('filterInput', /* @ts-ignore */
191
- ...(ngDevMode ? [{ debugName: "filterInputEl" }] : /* istanbul ignore next */ []));
192
- /** @ignore Virtual-scroll viewport (lazy range + scrollToIndex). */
193
- this.viewport = viewChild(CdkVirtualScrollViewport, /* @ts-ignore */
194
- ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
195
- /** @ignore */
196
- this.panelOpen = signal(false, /* @ts-ignore */
197
- ...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
198
- /** @ignore Element the overlay is anchored to (the field box). */
199
- this.overlayOrigin = signal(null, /* @ts-ignore */
200
- ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
201
- /** @ignore Field box width, measured on open. */
202
- this.overlayWidth = signal(null, /* @ts-ignore */
203
- ...(ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []));
204
- /** @ignore Current filter text. */
205
- this.filterValue = signal('', /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []));
207
- /** @ignore Raw text typed in the editable trigger (`null` when not typing) — filters the list. */
208
- this.editableQuery = signal(null, /* @ts-ignore */
209
- ...(ngDevMode ? [{ debugName: "editableQuery" }] : /* istanbul ignore next */ []));
210
- /** @ignore Index of the visually focused option among the visible options (-1 = none). */
211
- this.focusedIndex = signal(-1, /* @ts-ignore */
212
- ...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
213
- /** @ignore Type-ahead buffer. */
214
- this.searchBuffer = '';
215
- // --- Derived state -----------------------------------------------------
216
- /** @ignore Effective free-text mode (`multiple` wins over `editable`). */
217
- this.isEditable = computed(() => this.editable() && !this.multiple(), /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []));
219
- /** @ignore */
220
- this.listboxId = computed(() => `${this.resolvedId()}-list`, /* @ts-ignore */
221
- ...(ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []));
222
- /** @ignore Icon size aligned with the field size. */
223
- this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
224
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
225
- /** @ignore Flat, unfiltered entries (no groups). */
226
- this.flatEntries = computed(() => {
227
- if (this.group())
228
- return this.groupEntries().flatMap((g) => g.entries);
229
- return (this.options() ?? []).map((option) => this.toEntry(option));
230
- }, /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []));
232
- /** @ignore Unfiltered groups (when `group` is enabled). */
233
- this.groupEntries = computed(() => {
234
- if (!this.group())
235
- return [];
236
- return (this.options() ?? []).map((groupOption) => {
237
- const children = this.getField(groupOption, this.optionGroupChildren());
238
- return {
239
- label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? '',
240
- original: groupOption,
241
- entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option)),
242
- };
243
- });
244
- }, /* @ts-ignore */
245
- ...(ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []));
246
- /** @ignore Normalized filter text ('' = no filtering). */
247
- this.normalizedFilter = computed(() => this.normalize(this.filterValue().trim()), /* @ts-ignore */
248
- ...(ngDevMode ? [{ debugName: "normalizedFilter" }] : /* istanbul ignore next */ []));
249
- /** @ignore Normalized editable-typing text ('' = no filtering). */
250
- this.normalizedEditableQuery = computed(() => {
251
- const query = this.editableQuery();
252
- return this.isEditable() && query ? this.normalize(query.trim()) : '';
253
- }, /* @ts-ignore */
254
- ...(ngDevMode ? [{ debugName: "normalizedEditableQuery" }] : /* istanbul ignore next */ []));
255
- /** @ignore Rendered rows: filtered options + their group headers, with stable ids. */
256
- this.visibleRows = computed(() => {
257
- const rows = [];
258
- let index = 0;
259
- const pushOption = (entry) => {
260
- rows.push({
261
- kind: 'option',
262
- key: `${this.listboxId()}-${index}`,
263
- id: `${this.resolvedId()}-option-${index}`,
264
- index,
265
- entry,
266
- selected: this.isValueSelected(entry.value),
267
- });
268
- index++;
269
- };
270
- if (this.group()) {
271
- this.groupEntries().forEach((g, gi) => {
272
- const entries = g.entries.filter((e) => this.matchesFilter(e));
273
- if (!entries.length)
274
- return;
275
- rows.push({
276
- kind: 'group',
277
- key: `${this.listboxId()}-group-${gi}`,
278
- label: g.label,
279
- original: g.original,
280
- });
281
- entries.forEach(pushOption);
282
- });
283
- }
284
- else {
285
- this.flatEntries()
286
- .filter((e) => this.matchesFilter(e))
287
- .forEach(pushOption);
288
- }
289
- return rows;
290
- }, /* @ts-ignore */
291
- ...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
292
- /** @ignore Visible option rows only (visual-focus / type-ahead space). */
293
- this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === 'option'), /* @ts-ignore */
294
- ...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
295
- /** @ignore aria-setsize of the visible listbox. */
296
- this.optionCount = computed(() => this.visibleOptions().length, /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []));
298
- /** @ignore trackBy of the virtual list. */
299
- this.trackRow = (_, row) => row.key;
300
- /** @ignore Empty state: no option at all, or nothing matches the filter / typed text. */
301
- this.emptyLabel = computed(() => this.normalizedFilter() || this.normalizedEditableQuery()
302
- ? this.emptyFilterMessage()
303
- : this.emptyMessage(), /* @ts-ignore */
304
- ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
305
- /** @ignore Selected values as an array (whatever the mode). */
306
- this.selectedValues = computed(() => {
307
- const v = this.modelValue();
308
- if (v === null || v === undefined)
309
- return [];
310
- return this.multiple() ? (Array.isArray(v) ? v : []) : [v];
311
- }, /* @ts-ignore */
312
- ...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
313
- /** @ignore Selected options resolved against the (unfiltered) entries. Falls back to the raw value. */
314
- this.selectedEntries = computed(() => this.selectedValues().map((value) => this.flatEntries().find((e) => this.equals(e.value, value)) ?? {
315
- value,
316
- label: this.asText(value) ?? '',
317
- disabled: false,
318
- original: value,
319
- }), /* @ts-ignore */
320
- ...(ngDevMode ? [{ debugName: "selectedEntries" }] : /* istanbul ignore next */ []));
321
- /** @ignore A value is currently set. */
322
- this.hasValue = computed(() => {
323
- if (this.multiple())
324
- return this.selectedValues().length > 0;
325
- const v = this.modelValue();
326
- return v !== null && v !== undefined && v !== '';
327
- }, /* @ts-ignore */
328
- ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
329
- /** @ignore Selected entries actually rendered in the trigger (`maxSelectedLabels` cap). */
330
- this.displayedSelectedEntries = computed(() => {
331
- const all = this.selectedEntries();
332
- const max = this.maxSelectedLabels();
333
- return this.multiple() && max != null && max > 0 && all.length > max ? all.slice(0, max) : all;
334
- }, /* @ts-ignore */
335
- ...(ngDevMode ? [{ debugName: "displayedSelectedEntries" }] : /* istanbul ignore next */ []));
336
- /** @ignore Number of selected items collapsed behind the overflow indicator. */
337
- this.overflowCount = computed(() => this.selectedEntries().length - this.displayedSelectedEntries().length, /* @ts-ignore */
338
- ...(ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []));
339
- /** @ignore Rendered overflow indicator (e.g. `(+2 autres)`). */
340
- this.overflowText = computed(() => formatLabel(this.overflowLabel(), this.overflowCount()), /* @ts-ignore */
341
- ...(ngDevMode ? [{ debugName: "overflowText" }] : /* istanbul ignore next */ []));
342
- /** @ignore Contexts handed to the `#selectedItem` template (one per displayed selection). */
343
- this.selectedItemContexts = computed(() => this.displayedSelectedEntries().map((entry, index) => ({
344
- $implicit: entry.original,
345
- option: entry.original,
346
- index,
347
- remove: () => this.removeValue(entry.value),
348
- })), /* @ts-ignore */
349
- ...(ngDevMode ? [{ debugName: "selectedItemContexts" }] : /* istanbul ignore next */ []));
350
- /** @ignore Text rendered in the trigger (and in the editable input). */
351
- this.selectedLabel = computed(() => {
352
- const shown = this.displayedSelectedEntries()
353
- .map((e) => e.label)
354
- .join(', ');
355
- return this.overflowCount() > 0 ? `${shown} ${this.overflowText()}` : shown;
356
- }, /* @ts-ignore */
357
- ...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
358
- /** @ignore At rest the floating label already holds that spot. */
359
- this.effectivePlaceholder = computed(() => this.hasFloatLabel() ? '' : (this.placeholder() ?? ''), /* @ts-ignore */
360
- ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
361
- /** @ignore The clear action is shown. */
362
- this.showClearButton = computed(() => this.showClear() && this.hasValue() && !this.isDisabled() && !this.readonly(), /* @ts-ignore */
363
- ...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
364
- /** @ignore id of the visually focused option (for aria-activedescendant). */
365
- this.activeDescendant = computed(() => {
366
- if (!this.panelOpen())
367
- return null;
368
- return this.visibleOptions()[this.focusedIndex()]?.id ?? null;
369
- }, /* @ts-ignore */
370
- ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
371
- /** @ignore Below the trigger, flipping above when `autoFlip` and space is lacking. */
372
- this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
373
- ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
374
- /** @ignore Panel width: `panelWidth` when set, the field width otherwise. */
375
- this.panelStyleWidth = computed(() => {
376
- const width = this.panelWidth();
377
- if (width)
378
- return width === 'auto' ? null : width;
379
- const measured = this.overlayWidth();
380
- return measured === null ? null : `${measured}px`;
381
- }, /* @ts-ignore */
382
- ...(ngDevMode ? [{ debugName: "panelStyleWidth" }] : /* istanbul ignore next */ []));
383
- /** @ignore `panelWidth="auto"`: the field width becomes a floor, the content sets the rest. */
384
- this.panelStyleMinWidth = computed(() => {
385
- if (this.panelWidth() !== 'auto')
386
- return null;
387
- const measured = this.overlayWidth();
388
- return measured === null ? null : `${measured}px`;
389
- }, /* @ts-ignore */
390
- ...(ngDevMode ? [{ debugName: "panelStyleMinWidth" }] : /* istanbul ignore next */ []));
391
- /** @ignore Concrete viewport height (px) for the virtual scroller. */
392
- this.viewportHeight = computed(() => {
393
- const rows = this.visibleRows().length || 1;
394
- const max = this.scrollHeightPx();
395
- return `${Math.min(rows * this.virtualScrollItemSize(), max)}px`;
396
- }, /* @ts-ignore */
397
- ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
398
- /** @ignore `scrollHeight` parsed to px, with size-based defaults (matches the SCSS). */
399
- this.scrollHeightPx = computed(() => {
400
- const parsed = Number.parseFloat(this.scrollHeight() ?? '');
401
- if (!Number.isNaN(parsed) && parsed > 0)
402
- return parsed;
403
- return this.size() === 'small' ? 256 : 312;
404
- }, /* @ts-ignore */
405
- ...(ngDevMode ? [{ debugName: "scrollHeightPx" }] : /* istanbul ignore next */ []));
406
- // --- Option resolution ----------------------------------------------------------
407
- /** @ignore Shared option resolution (see `option-resolver.ts`). */
408
- this.resolver = createOptionResolver({
409
- optionValue: this.optionValue,
410
- optionLabel: this.optionLabel,
411
- optionDisabled: this.optionDisabled,
412
- dataKey: this.dataKey,
413
- });
414
- // Never carry an open panel over to the next page (the field can live in
415
- // an app shell that survives the navigation).
416
- closeOnNavigation(() => this.close(false));
417
- // Forward the rendered range of the virtual viewport (lazy loading).
418
- effect((onCleanup) => {
419
- const vp = this.viewport();
420
- if (!vp || !this.lazy())
421
- return;
422
- const sub = vp.renderedRangeStream.subscribe((range) => this.lazyLoad.emit({ first: range.start, last: range.end }));
423
- onCleanup(() => sub.unsubscribe());
424
- });
425
- // Re-measure the virtual viewport once it exists: it initialises while the
426
- // overlay panel is still laying out and can capture a 0 viewport size,
427
- // which freezes the rendered range on the first rows.
428
- effect(() => {
429
- const vp = this.viewport();
430
- if (!vp)
431
- return;
432
- setTimeout(() => {
433
- vp.checkViewportSize();
434
- this.scrollFocusedIntoView();
435
- });
436
- });
437
- // A11y / API safeguards (dev only).
438
- if (isDevMode()) {
439
- effect(() => {
440
- if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) {
441
- console.warn('[ui-select] Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.');
442
- }
443
- if (this.editable() && this.multiple()) {
444
- console.warn('[ui-select] `editable` is ignored in `multiple` mode (free-text entry is single-value only).');
445
- }
446
- if (this.checkbox() && !this.multiple()) {
447
- console.warn('[ui-select] `checkbox` is meant for `multiple` mode (one checkbox per option).');
448
- }
449
- });
450
- }
451
- }
452
- // --- CVA -----------------------------------------------------------------
453
- writeValue(value) {
454
- this.modelValue.set(value);
455
- }
456
- /** Moves focus to the trigger. */
457
- focus(options) {
458
- this.triggerEl()?.nativeElement.focus(options);
459
- }
460
- // --- Panel open/close ----------------------------------------------------
461
- open() {
462
- if (this.isDisabled() || this.readonly() || this.panelOpen())
463
- return;
464
- const origin = this.containerEl().nativeElement.querySelector('.ui-field-box') ??
465
- this.containerEl().nativeElement;
466
- this.overlayOrigin.set(origin);
467
- this.overlayWidth.set(origin.getBoundingClientRect().width);
468
- this.focusedIndex.set(this.initialFocusIndex());
469
- this.panelOpen.set(true);
470
- this.opened.emit();
471
- this.queueAfterOpen();
472
- }
473
- close(focusTrigger = true) {
474
- if (!this.panelOpen())
475
- return;
476
- this.panelOpen.set(false);
477
- this.clearSearchBuffer();
478
- this.editableQuery.set(null);
479
- if (this.resetFilterOnHide())
480
- this.filterValue.set('');
481
- this.emitTouch();
482
- this.closed.emit();
483
- if (focusTrigger)
484
- this.focus();
485
- }
486
- /** @ignore */
487
- toggle() {
488
- this.panelOpen() ? this.close() : this.open();
489
- }
490
- /** @ignore First visually focused option when the panel opens. */
491
- initialFocusIndex() {
492
- const options = this.visibleOptions();
493
- const selected = options.findIndex((o) => o.selected && !o.entry.disabled);
494
- if (selected !== -1)
495
- return selected;
496
- if (this.autoOptionFocus())
497
- return options.findIndex((o) => !o.entry.disabled);
498
- return -1;
499
- }
500
- /**
501
- * @ignore Post-open work once the overlay is attached: focus the filter,
502
- * scroll the focused option into view (the virtual viewport is re-measured
503
- * by its own effect). `setTimeout` (not rAF) so it also runs in
504
- * throttled/background tabs.
505
- */
506
- queueAfterOpen() {
507
- setTimeout(() => {
508
- // Never steal the focus from the editable input while the user types.
509
- if (this.filter() && this.autofocusFilter() && !this.isEditable())
510
- this.filterInputEl()?.nativeElement.focus();
511
- this.scrollFocusedIntoView();
512
- });
513
- }
514
- // --- Trigger interactions --------------------------------------------------
515
- /** @ignore Container click: open (button mode) or toggle from the chevron (editable mode). */
516
- onContainerClick(event) {
517
- if (this.isDisabled() || this.readonly())
518
- return;
519
- const target = event.target;
520
- // Inner actions (clear, chip remove buttons in `#selectedItem`…) handle themselves.
521
- if (target.closest('button') && !target.closest('.ui-select-trigger'))
522
- return;
523
- if (this.isEditable()) {
524
- if (target.closest('.ui-select-chevron'))
525
- this.toggle();
526
- return;
527
- }
528
- this.open();
529
- }
530
- /** @ignore Clear action (does not bubble to the container, which would re-open). */
531
- onClearClick(event) {
532
- event.stopPropagation();
533
- this.clear();
534
- }
535
- /** Clears the value. */
536
- clear() {
537
- this.commit(null);
538
- // Editable mode: drop any typed text still filtering the list — the
539
- // trigger just went blank, the panel (if open) must show every option again,
540
- // not the stale query's matches (same reset `selectRow`/`close` already do).
541
- this.editableQuery.set(null);
542
- this.cleared.emit();
543
- this.focus();
544
- }
545
- /**
546
- * @ignore Editable mode: typing sets the value directly (view → form) and
547
- * surfaces the matching options (the panel opens and filters as you type).
548
- */
549
- onEditableInput(event) {
550
- const value = event.target.value;
551
- this.editableQuery.set(value);
552
- // An emptied input commits `null` (same normalization as `clear()`).
553
- this.commit(value === '' ? null : value);
554
- if (!this.panelOpen())
555
- this.open();
556
- // Re-anchor the visual focus on the first matching option.
557
- this.focusedIndex.set(this.visibleOptions().findIndex((o) => !o.entry.disabled));
558
- }
559
- /** Deselects one value (`multiple`) or clears the value (single). */
560
- removeValue(value) {
561
- if (this.isDisabled() || this.readonly())
562
- return;
563
- if (!this.multiple()) {
564
- this.commit(null);
565
- return;
566
- }
567
- const current = this.selectedValues().filter((v) => !this.equals(v, value));
568
- this.commit(current);
569
- }
570
- /** @ignore */
571
- onTriggerFocus(event) {
572
- this.inputFocus.emit(event);
573
- }
574
- /** @ignore Mark touched when focus leaves the component (trigger → outside, not into the panel). */
575
- onTriggerBlur(event) {
576
- const next = event.relatedTarget;
577
- if (!next || !this.panelEl()?.nativeElement.contains(next))
578
- this.emitTouch();
579
- this.inputBlur.emit(event);
580
- }
581
- /** @ignore Keyboard on the trigger (combobox pattern). */
582
- onTriggerKeydown(event) {
583
- if (this.isDisabled() || this.readonly())
584
- return;
585
- // Multiple: Backspace deselects the last selected item (chip-removal keyboard path).
586
- if (event.key === 'Backspace' && !this.isEditable() && this.multiple() && this.hasValue()) {
587
- event.preventDefault();
588
- const values = this.selectedValues();
589
- this.removeValue(values[values.length - 1]);
590
- return;
591
- }
592
- if (this.handleNavigationKey(event))
593
- return;
594
- // Type-ahead (button trigger only — the editable input types for real).
595
- if (!this.isEditable() &&
596
- event.key.length === 1 &&
597
- !event.ctrlKey &&
598
- !event.metaKey &&
599
- !event.altKey) {
600
- event.preventDefault();
601
- if (!this.panelOpen())
602
- this.open();
603
- this.searchOption(event.key);
604
- }
605
- }
606
- /** @ignore Keyboard inside the filter input (navigation delegated, typing kept native). */
607
- onFilterKeydown(event) {
608
- if (event.key === 'Home' || event.key === 'End')
609
- return; // keep caret moves native
610
- this.handleNavigationKey(event);
611
- }
612
- /**
613
- * @ignore Shared open/navigate/select/close keys. Returns true when handled.
614
- * Focus stays on the trigger / filter input; options are focused visually
615
- * through `aria-activedescendant`.
616
- */
617
- handleNavigationKey(event) {
618
- switch (event.key) {
619
- case 'ArrowDown':
620
- event.preventDefault();
621
- if (!this.panelOpen()) {
622
- this.open();
623
- if (this.focusedIndex() === -1)
624
- this.moveFocus(1);
625
- }
626
- else {
627
- this.moveFocus(1);
628
- }
629
- return true;
630
- case 'ArrowUp':
631
- event.preventDefault();
632
- if (event.altKey) {
633
- this.close();
634
- }
635
- else if (!this.panelOpen()) {
636
- this.open();
637
- if (this.focusedIndex() === -1)
638
- this.moveFocus(-1);
639
- }
640
- else {
641
- this.moveFocus(-1);
642
- }
643
- return true;
644
- case 'Home':
645
- case 'End':
646
- if (!this.panelOpen())
647
- return false;
648
- event.preventDefault();
649
- this.focusEdge(event.key === 'Home' ? 1 : -1);
650
- return true;
651
- case 'Enter':
652
- if (!this.panelOpen())
653
- return false; // closed: native click (button) / form submit (input)
654
- event.preventDefault();
655
- this.selectFocused();
656
- return true;
657
- case ' ':
658
- if (this.isEditable() ||
659
- (this.filter() && event.target === this.filterInputEl()?.nativeElement)) {
660
- return false; // space types in the inputs
661
- }
662
- if (!this.panelOpen())
663
- return false; // closed button: native click opens
664
- event.preventDefault();
665
- this.selectFocused();
666
- return true;
667
- case 'Escape':
668
- if (!this.panelOpen())
669
- return false;
670
- event.preventDefault();
671
- event.stopPropagation();
672
- this.close();
673
- return true;
674
- case 'Tab':
675
- if (this.panelOpen())
676
- this.close(false);
677
- return false; // let the focus move on
678
- default:
679
- return false;
680
- }
681
- }
682
- // --- Options interactions --------------------------------------------------
683
- /** @ignore */
684
- onOptionClick(row, event) {
685
- event.preventDefault();
686
- if (this.loading())
687
- return;
688
- this.selectRow(row);
689
- }
690
- /** @ignore Keep the focus on the trigger / filter input when clicking an option. */
691
- onOptionMousedown(event) {
692
- event.preventDefault();
693
- }
694
- /** @ignore */
695
- onOptionMouseEnter(row) {
696
- if (this.focusOnHover() && !row.entry.disabled)
697
- this.focusedIndex.set(row.index);
698
- }
699
- /** @ignore Select (single) or toggle (multiple) an option. */
700
- selectRow(row, keepOpen = false) {
701
- if (row.entry.disabled || this.readonly())
702
- return;
703
- this.focusedIndex.set(row.index);
704
- this.editableQuery.set(null); // picking an option ends the typing session (display shows the label)
705
- if (this.multiple()) {
706
- const current = [...this.selectedValues()];
707
- const at = current.findIndex((v) => this.equals(v, row.entry.value));
708
- if (at !== -1)
709
- current.splice(at, 1);
710
- else
711
- current.push(row.entry.value);
712
- this.commit(current);
713
- return; // multiple: the panel stays open
714
- }
715
- this.commit(row.entry.value);
716
- if (!keepOpen)
717
- this.close();
718
- }
719
- /** @ignore */
720
- selectFocused() {
721
- const row = this.visibleOptions()[this.focusedIndex()];
722
- if (row)
723
- this.selectRow(row);
724
- else if (!this.multiple())
725
- this.close();
726
- }
727
- /** @ignore Propagate a user-driven value change (view → form). */
728
- commit(value) {
729
- this.modelValue.set(value);
730
- this.emitChange(value);
731
- this.valueChange.emit(value);
732
- }
733
- // --- Visual focus ------------------------------------------------------------
734
- /** @ignore Move the visual focus, skipping disabled options (no wrap). */
735
- moveFocus(delta) {
736
- const options = this.visibleOptions();
737
- if (!options.length)
738
- return;
739
- let i = this.focusedIndex();
740
- if (i === -1)
741
- i = delta === 1 ? -1 : options.length;
742
- for (i += delta; i >= 0 && i < options.length; i += delta) {
743
- if (!options[i].entry.disabled) {
744
- this.setFocusedIndex(i);
745
- return;
746
- }
747
- }
748
- }
749
- /** @ignore Focus the first (`1`) or last (`-1`) enabled option. */
750
- focusEdge(direction) {
751
- const options = this.visibleOptions();
752
- const from = direction === 1 ? 0 : options.length - 1;
753
- for (let i = from; i >= 0 && i < options.length; i += direction) {
754
- if (!options[i].entry.disabled) {
755
- this.setFocusedIndex(i);
756
- return;
757
- }
758
- }
759
- }
760
- /** @ignore Apply a visual-focus move (+ select-on-focus, + scroll into view). */
761
- setFocusedIndex(index) {
762
- this.focusedIndex.set(index);
763
- if (this.selectOnFocus() && !this.multiple()) {
764
- const row = this.visibleOptions()[index];
765
- if (row)
766
- this.selectRow(row, true);
767
- }
768
- this.scrollFocusedIntoView();
769
- }
770
- /** @ignore Keep the visually focused option visible ('auto' — smooth is unreliable in throttled tabs). */
771
- scrollFocusedIntoView() {
772
- const row = this.visibleOptions()[this.focusedIndex()];
773
- if (!row)
774
- return;
775
- const vp = this.viewport();
776
- if (vp) {
777
- const rowIndex = this.visibleRows().findIndex((r) => r.kind === 'option' && r.index === row.index);
778
- if (rowIndex !== -1)
779
- vp.scrollToIndex(Math.max(0, rowIndex - 1), 'auto');
780
- return;
781
- }
782
- this.panelEl()
783
- ?.nativeElement.querySelector(`[id="${row.id}"]`)
784
- ?.scrollIntoView({ block: 'nearest' });
785
- }
786
- // --- Type-ahead ---------------------------------------------------------------
787
- /** @ignore Accumulate printable characters and focus the first matching option. */
788
- searchOption(char) {
789
- this.searchBuffer += char.toLowerCase();
790
- if (this.searchTimeout)
791
- clearTimeout(this.searchTimeout);
792
- this.searchTimeout = setTimeout(() => this.clearSearchBuffer(), 500);
793
- const options = this.visibleOptions();
794
- if (!options.length)
795
- return;
796
- const needle = this.normalize(this.searchBuffer);
797
- // Restart the scan below the focused option only for a fresh (1-char) search.
798
- const from = this.searchBuffer.length === 1 ? this.focusedIndex() + 1 : Math.max(0, this.focusedIndex());
799
- for (let k = 0; k < options.length; k++) {
800
- const i = (from + k) % options.length;
801
- const option = options[i];
802
- if (!option.entry.disabled && this.normalize(option.entry.label).startsWith(needle)) {
803
- this.setFocusedIndex(i);
804
- return;
805
- }
806
- }
807
- }
808
- /** @ignore */
809
- clearSearchBuffer() {
810
- this.searchBuffer = '';
811
- if (this.searchTimeout) {
812
- clearTimeout(this.searchTimeout);
813
- this.searchTimeout = undefined;
814
- }
815
- }
816
- // --- Filter -------------------------------------------------------------------
817
- /** @ignore */
818
- onFilterInput(event) {
819
- const value = event.target.value;
820
- this.filterValue.set(value);
821
- this.filterChange.emit({ originalEvent: event, filter: value });
822
- // Re-anchor the visual focus on the first matching option.
823
- const first = this.visibleOptions().findIndex((o) => !o.entry.disabled);
824
- this.focusedIndex.set(first);
825
- }
826
- /** @ignore An entry passes the current filter(s): panel filter and/or editable typing. */
827
- matchesFilter(entry) {
828
- const needles = [this.normalizedFilter(), this.normalizedEditableQuery()].filter(Boolean);
829
- if (!needles.length)
830
- return true;
831
- const fields = this.filterBy()
832
- ?.split(',')
833
- .map((f) => f.trim())
834
- .filter(Boolean);
835
- const haystacks = fields?.length
836
- ? fields.map((f) => this.asText(this.getField(entry.original, f)) ?? '')
837
- : [entry.label];
838
- return needles.every((needle) => haystacks.some((text) => this.normalize(text).includes(needle)));
839
- }
840
- /** @ignore Case- and diacritics-insensitive comparison text. */
841
- normalize(text) {
842
- return text.toLowerCase().normalize('NFD').replace(/[̀-ͯ]/g, '');
843
- }
844
- /** @ignore */
845
- toEntry(option) {
846
- return this.resolver.toEntry(option);
847
- }
848
- /** @ignore Read a (dot-path) field from an object. */
849
- getField(target, path) {
850
- return this.resolver.getField(target, path);
851
- }
852
- /** @ignore */
853
- resolveValue(option) {
854
- return this.resolver.resolveValue(option);
855
- }
856
- /** @ignore */
857
- resolveLabel(option) {
858
- return this.resolver.resolveLabel(option);
859
- }
860
- /** @ignore */
861
- asText(value) {
862
- return this.resolver.asText(value);
863
- }
864
- /** @ignore Whether a resolved value is part of the current model. */
865
- isValueSelected(value) {
866
- return this.selectedValues().some((v) => this.equals(v, value));
867
- }
868
- /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
869
- equals(a, b) {
870
- return this.resolver.equals(a, b);
871
- }
872
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
873
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiSelect, isStandalone: true, selector: "ui-select", inputs: { options: { classPropertyName: "options", publicName: "options", 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 }, 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 }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterAriaLabel: { classPropertyName: "filterAriaLabel", publicName: "filterAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", 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 }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", opened: "opened", closed: "closed", cleared: "cleared", filterChange: "filterChange", lazyLoad: "lazyLoad", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], 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: "triggerEl", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "filterInputEl", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-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 trigger 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-select-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 (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\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-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : 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 (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-select-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-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-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div\n #container\n class=\"ui-select\"\n [class._editable]=\"isEditable()\"\n (click)=\"onContainerClick($event)\"\n>\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"hasValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\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-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"ctx\"\n />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{\n overflowText()\n }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\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 (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"selectedItemContexts()[0]\"\n />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ effectivePlaceholder() }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-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-select-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Chargement des options\"\n />\n } @else if (showIcon()) {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\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(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-trigger-color, var(--form-high-content-default));cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--ui-select-trigger-color-disabled, var(--form-high-content-disabled))}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--ui-select-placeholder-color, var(--form-low-content-default))}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;align-self:stretch;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0;padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-overflow{flex-shrink:0;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-overflow-color, var(--form-low-content-default));white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{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-select-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--ui-select-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-select-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:hover:not(:disabled){color:var(--ui-select-clear-color-hover, var(--form-high-content-hover))}.ui-select-clear:focus-visible{outline:none;color:var(--ui-select-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-select-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--ui-select-clear-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-select-chevron:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{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);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-select-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-select-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-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-header-color, var(--form-high-content-default))}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--ui-select-filter-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--ui-select-filter-surface, var(--form-high-surface-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--ui-select-filter-stroke-hover, var(--form-high-stroke-hover))}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--ui-select-filter-stroke-focus, var(--form-high-stroke-focused))}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--ui-select-filter-icon-color, var(--form-low-content-default))}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-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-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-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-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--ui-select-option-surface-hover, var(--global-background-default-hover))}.ui-select-panel .ui-select-option._selected{background-color:var(--ui-select-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-select-option-color-selected, var(--form-high-content-checked))}.ui-select-panel .ui-select-option._disabled{color:var(--ui-select-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--ui-select-checkmark-color, var(--form-high-content-checked))}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-select-checkbox-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--ui-select-checkbox-surface, var(--form-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--ui-select-checkbox-marker-color, var(--form-high-content-checked));opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),transform var(--ui-control-transition-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-toggle-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--ui-select-checkbox-stroke-checked, var(--form-high-stroke-checked))}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--ui-select-checkbox-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-select-checkbox-surface-disabled, var(--form-high-surface-disabled))}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-select-weight, var(--weight-bold));color:var(--ui-select-group-color, var(--form-low-content-default))}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-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: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
874
- }
875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiSelect, decorators: [{
876
- type: Component,
877
- args: [{ selector: 'ui-select', imports: [NgTemplateOutlet, OverlayModule, ScrollingModule, UiField, UiIcon, UiSpinner, UiMotion], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiSelect), multi: true }], template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-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 trigger 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-select-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 (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\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-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : 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 (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-select-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-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-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div\n #container\n class=\"ui-select\"\n [class._editable]=\"isEditable()\"\n (click)=\"onContainerClick($event)\"\n>\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"hasValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\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-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"ctx\"\n />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{\n overflowText()\n }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\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 (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"selectedItemContexts()[0]\"\n />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ effectivePlaceholder() }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-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-select-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Chargement des options\"\n />\n } @else if (showIcon()) {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\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(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n", styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-trigger-color, var(--form-high-content-default));cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--ui-select-trigger-color-disabled, var(--form-high-content-disabled))}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--ui-select-placeholder-color, var(--form-low-content-default))}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;align-self:stretch;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0;padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-overflow{flex-shrink:0;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-overflow-color, var(--form-low-content-default));white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{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-select-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--ui-select-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-select-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:hover:not(:disabled){color:var(--ui-select-clear-color-hover, var(--form-high-content-hover))}.ui-select-clear:focus-visible{outline:none;color:var(--ui-select-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-select-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--ui-select-clear-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-select-chevron:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{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);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-select-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-select-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-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-header-color, var(--form-high-content-default))}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--ui-select-filter-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--ui-select-filter-surface, var(--form-high-surface-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--ui-select-filter-stroke-hover, var(--form-high-stroke-hover))}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--ui-select-filter-stroke-focus, var(--form-high-stroke-focused))}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--ui-select-filter-icon-color, var(--form-low-content-default))}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-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-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-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-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--ui-select-option-surface-hover, var(--global-background-default-hover))}.ui-select-panel .ui-select-option._selected{background-color:var(--ui-select-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-select-option-color-selected, var(--form-high-content-checked))}.ui-select-panel .ui-select-option._disabled{color:var(--ui-select-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--ui-select-checkmark-color, var(--form-high-content-checked))}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-select-checkbox-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--ui-select-checkbox-surface, var(--form-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--ui-select-checkbox-marker-color, var(--form-high-content-checked));opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),transform var(--ui-control-transition-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-toggle-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--ui-select-checkbox-stroke-checked, var(--form-high-stroke-checked))}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--ui-select-checkbox-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-select-checkbox-surface-disabled, var(--form-high-surface-disabled))}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-select-weight, var(--weight-bold));color:var(--ui-select-group-color, var(--form-low-content-default))}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-empty-color, var(--form-low-content-default))}\n"] }]
878
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }], 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 }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], checkbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkbox", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterAriaLabel", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", 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 }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], 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 }] }], triggerEl: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], filterInputEl: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
879
-
880
- /*
881
- * Public API Surface of ui-kit/ui-select
882
- */
883
-
884
- /**
885
- * Generated bundle index. Do not edit.
886
- */
887
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, contentChild, effect, forwardRef, input, isDevMode, numberAttribute, output, signal, viewChild } 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, createOptionResolver, dropdownOverlayPositions, formatLabel } 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 { UiMotion } from "@4sh/ui-kit/motion";
13
+ import { closeOnNavigation } from "@4sh/ui-kit/overlay";
14
+ var UiSelect = class UiSelect extends BaseFormField {
15
+ constructor() {
16
+ super();
17
+ this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
18
+ this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
19
+ this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
20
+ this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
21
+ this.group = input(false, {
22
+ ...ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {},
23
+ transform: booleanAttribute
24
+ });
25
+ this.optionGroupLabel = input("label", ...ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []);
26
+ this.optionGroupChildren = input("items", ...ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []);
27
+ this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
28
+ this.multiple = input(false, {
29
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
30
+ transform: booleanAttribute
31
+ });
32
+ this.checkmark = input(false, {
33
+ ...ngDevMode ? { debugName: "checkmark" } : /* istanbul ignore next */ {},
34
+ transform: booleanAttribute
35
+ });
36
+ this.checkbox = input(false, {
37
+ ...ngDevMode ? { debugName: "checkbox" } : /* istanbul ignore next */ {},
38
+ transform: booleanAttribute
39
+ });
40
+ this.maxSelectedLabels = input(...ngDevMode ? [void 0, { debugName: "maxSelectedLabels" }] : /* istanbul ignore next */ []);
41
+ this.overflowLabel = input("(+{0} autres)", ...ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []);
42
+ this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
43
+ this.showClear = input(false, {
44
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
45
+ transform: booleanAttribute
46
+ });
47
+ this.clearAriaLabel = input("Effacer la sélection", ...ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []);
48
+ this.icon = input("angle-down", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
49
+ this.showIcon = input(true, {
50
+ ...ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {},
51
+ transform: booleanAttribute
52
+ });
53
+ this.filter = input(false, {
54
+ ...ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {},
55
+ transform: booleanAttribute
56
+ });
57
+ this.filterPlaceholder = input(...ngDevMode ? [void 0, { debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []);
58
+ this.filterAriaLabel = input("Filtrer les options", ...ngDevMode ? [{ debugName: "filterAriaLabel" }] : /* istanbul ignore next */ []);
59
+ this.filterBy = input(...ngDevMode ? [void 0, { debugName: "filterBy" }] : /* istanbul ignore next */ []);
60
+ this.autofocusFilter = input(true, {
61
+ ...ngDevMode ? { debugName: "autofocusFilter" } : /* istanbul ignore next */ {},
62
+ transform: booleanAttribute
63
+ });
64
+ this.resetFilterOnHide = input(false, {
65
+ ...ngDevMode ? { debugName: "resetFilterOnHide" } : /* istanbul ignore next */ {},
66
+ transform: booleanAttribute
67
+ });
68
+ this.ripple = input(true, {
69
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
70
+ transform: booleanAttribute
71
+ });
72
+ this.emptyMessage = input("Aucune option disponible", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
73
+ this.emptyFilterMessage = input("Aucun résultat", ...ngDevMode ? [{ debugName: "emptyFilterMessage" }] : /* istanbul ignore next */ []);
74
+ this.editable = input(false, {
75
+ ...ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {},
76
+ transform: booleanAttribute
77
+ });
78
+ this.loading = input(false, {
79
+ ...ngDevMode ? { debugName: "loading" } : /* 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.panelWidth = input(...ngDevMode ? [void 0, { debugName: "panelWidth" }] : /* istanbul ignore next */ []);
113
+ this.valueChange = output();
114
+ this.opened = output();
115
+ this.closed = output();
116
+ this.cleared = output();
117
+ this.filterChange = output();
118
+ this.lazyLoad = output();
119
+ this.inputFocus = output();
120
+ this.inputBlur = output();
121
+ this.itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
122
+ this.selectedItemTemplate = contentChild("selectedItem", ...ngDevMode ? [{ debugName: "selectedItemTemplate" }] : /* istanbul ignore next */ []);
123
+ this.groupTemplate = contentChild("group", ...ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []);
124
+ this.headerTemplate = contentChild("header", ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
125
+ this.footerTemplate = contentChild("footer", ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
126
+ this.emptyTemplate = contentChild("empty", ...ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []);
127
+ this.containerEl = viewChild.required("container", ...ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []);
128
+ this.triggerEl = viewChild("trigger", ...ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []);
129
+ this.panelEl = viewChild("panel", ...ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []);
130
+ this.filterInputEl = viewChild("filterInput", ...ngDevMode ? [{ debugName: "filterInputEl" }] : /* istanbul ignore next */ []);
131
+ this.viewport = viewChild(CdkVirtualScrollViewport, ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
132
+ this.panelOpen = signal(false, ...ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []);
133
+ this.overlayOrigin = signal(null, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
134
+ this.overlayWidth = signal(null, ...ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []);
135
+ this.filterValue = signal("", ...ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []);
136
+ this.editableQuery = signal(null, ...ngDevMode ? [{ debugName: "editableQuery" }] : /* istanbul ignore next */ []);
137
+ this.focusedIndex = signal(-1, ...ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []);
138
+ this.searchBuffer = "";
139
+ this.isEditable = computed(() => this.editable() && !this.multiple(), ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
140
+ this.listboxId = computed(() => `${this.resolvedId()}-list`, ...ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []);
141
+ this.iconSize = computed(() => this.size() === "small" ? "sm" : "md", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
142
+ this.flatEntries = computed(() => {
143
+ if (this.group()) return this.groupEntries().flatMap((g) => g.entries);
144
+ return (this.options() ?? []).map((option) => this.toEntry(option));
145
+ }, ...ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []);
146
+ this.groupEntries = computed(() => {
147
+ if (!this.group()) return [];
148
+ return (this.options() ?? []).map((groupOption) => {
149
+ const children = this.getField(groupOption, this.optionGroupChildren());
150
+ return {
151
+ label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? "",
152
+ original: groupOption,
153
+ entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option))
154
+ };
155
+ });
156
+ }, ...ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []);
157
+ this.normalizedFilter = computed(() => this.normalize(this.filterValue().trim()), ...ngDevMode ? [{ debugName: "normalizedFilter" }] : /* istanbul ignore next */ []);
158
+ this.normalizedEditableQuery = computed(() => {
159
+ const query = this.editableQuery();
160
+ return this.isEditable() && query ? this.normalize(query.trim()) : "";
161
+ }, ...ngDevMode ? [{ debugName: "normalizedEditableQuery" }] : /* istanbul ignore next */ []);
162
+ this.visibleRows = computed(() => {
163
+ const rows = [];
164
+ let index = 0;
165
+ const pushOption = (entry) => {
166
+ rows.push({
167
+ kind: "option",
168
+ key: `${this.listboxId()}-${index}`,
169
+ id: `${this.resolvedId()}-option-${index}`,
170
+ index,
171
+ entry,
172
+ selected: this.isValueSelected(entry.value)
173
+ });
174
+ index++;
175
+ };
176
+ if (this.group()) this.groupEntries().forEach((g, gi) => {
177
+ const entries = g.entries.filter((e) => this.matchesFilter(e));
178
+ if (!entries.length) return;
179
+ rows.push({
180
+ kind: "group",
181
+ key: `${this.listboxId()}-group-${gi}`,
182
+ label: g.label,
183
+ original: g.original
184
+ });
185
+ entries.forEach(pushOption);
186
+ });
187
+ else this.flatEntries().filter((e) => this.matchesFilter(e)).forEach(pushOption);
188
+ return rows;
189
+ }, ...ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []);
190
+ this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === "option"), ...ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []);
191
+ this.optionCount = computed(() => this.visibleOptions().length, ...ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []);
192
+ this.trackRow = (_, row) => row.key;
193
+ this.emptyLabel = computed(() => this.normalizedFilter() || this.normalizedEditableQuery() ? this.emptyFilterMessage() : this.emptyMessage(), ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
194
+ this.selectedValues = computed(() => {
195
+ const v = this.modelValue();
196
+ if (v === null || v === void 0) return [];
197
+ return this.multiple() ? Array.isArray(v) ? v : [] : [v];
198
+ }, ...ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []);
199
+ this.selectedEntries = computed(() => this.selectedValues().map((value) => this.flatEntries().find((e) => this.equals(e.value, value)) ?? {
200
+ value,
201
+ label: this.asText(value) ?? "",
202
+ disabled: false,
203
+ original: value
204
+ }), ...ngDevMode ? [{ debugName: "selectedEntries" }] : /* istanbul ignore next */ []);
205
+ this.hasValue = computed(() => {
206
+ if (this.multiple()) return this.selectedValues().length > 0;
207
+ const v = this.modelValue();
208
+ return v !== null && v !== void 0 && v !== "";
209
+ }, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
210
+ this.displayedSelectedEntries = computed(() => {
211
+ const all = this.selectedEntries();
212
+ const max = this.maxSelectedLabels();
213
+ return this.multiple() && max != null && max > 0 && all.length > max ? all.slice(0, max) : all;
214
+ }, ...ngDevMode ? [{ debugName: "displayedSelectedEntries" }] : /* istanbul ignore next */ []);
215
+ this.overflowCount = computed(() => this.selectedEntries().length - this.displayedSelectedEntries().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.displayedSelectedEntries().map((entry, index) => ({
218
+ $implicit: entry.original,
219
+ option: entry.original,
220
+ index,
221
+ remove: () => this.removeValue(entry.value)
222
+ })), ...ngDevMode ? [{ debugName: "selectedItemContexts" }] : /* istanbul ignore next */ []);
223
+ this.selectedLabel = computed(() => {
224
+ const shown = this.displayedSelectedEntries().map((e) => e.label).join(", ");
225
+ return this.overflowCount() > 0 ? `${shown} ${this.overflowText()}` : shown;
226
+ }, ...ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []);
227
+ this.effectivePlaceholder = computed(() => this.hasFloatLabel() ? "" : this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
228
+ this.showClearButton = computed(() => this.showClear() && this.hasValue() && !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []);
229
+ this.activeDescendant = computed(() => {
230
+ if (!this.panelOpen()) return null;
231
+ return this.visibleOptions()[this.focusedIndex()]?.id ?? null;
232
+ }, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
233
+ this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
234
+ this.panelStyleWidth = computed(() => {
235
+ const width = this.panelWidth();
236
+ if (width) return width === "auto" ? null : width;
237
+ const measured = this.overlayWidth();
238
+ return measured === null ? null : `${measured}px`;
239
+ }, ...ngDevMode ? [{ debugName: "panelStyleWidth" }] : /* istanbul ignore next */ []);
240
+ this.panelStyleMinWidth = computed(() => {
241
+ if (this.panelWidth() !== "auto") return null;
242
+ const measured = this.overlayWidth();
243
+ return measured === null ? null : `${measured}px`;
244
+ }, ...ngDevMode ? [{ debugName: "panelStyleMinWidth" }] : /* istanbul ignore next */ []);
245
+ this.viewportHeight = computed(() => {
246
+ const rows = this.visibleRows().length || 1;
247
+ const max = this.scrollHeightPx();
248
+ return `${Math.min(rows * this.virtualScrollItemSize(), max)}px`;
249
+ }, ...ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []);
250
+ this.scrollHeightPx = computed(() => {
251
+ const parsed = Number.parseFloat(this.scrollHeight() ?? "");
252
+ if (!Number.isNaN(parsed) && parsed > 0) return parsed;
253
+ return this.size() === "small" ? 256 : 312;
254
+ }, ...ngDevMode ? [{ debugName: "scrollHeightPx" }] : /* istanbul ignore next */ []);
255
+ this.resolver = createOptionResolver({
256
+ optionValue: this.optionValue,
257
+ optionLabel: this.optionLabel,
258
+ optionDisabled: this.optionDisabled,
259
+ dataKey: this.dataKey
260
+ });
261
+ closeOnNavigation(() => this.close(false));
262
+ effect((onCleanup) => {
263
+ const vp = this.viewport();
264
+ if (!vp || !this.lazy()) return;
265
+ const sub = vp.renderedRangeStream.subscribe((range) => this.lazyLoad.emit({
266
+ first: range.start,
267
+ last: range.end
268
+ }));
269
+ onCleanup(() => sub.unsubscribe());
270
+ });
271
+ effect(() => {
272
+ const vp = this.viewport();
273
+ if (!vp) return;
274
+ setTimeout(() => {
275
+ vp.checkViewportSize();
276
+ this.scrollFocusedIntoView();
277
+ });
278
+ });
279
+ if (isDevMode()) effect(() => {
280
+ if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) console.warn("[ui-select] Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.");
281
+ if (this.editable() && this.multiple()) console.warn("[ui-select] `editable` is ignored in `multiple` mode (free-text entry is single-value only).");
282
+ if (this.checkbox() && !this.multiple()) console.warn("[ui-select] `checkbox` is meant for `multiple` mode (one checkbox per option).");
283
+ });
284
+ }
285
+ writeValue(value) {
286
+ this.modelValue.set(value);
287
+ }
288
+ focus(options) {
289
+ this.triggerEl()?.nativeElement.focus(options);
290
+ }
291
+ open() {
292
+ if (this.isDisabled() || this.readonly() || this.panelOpen()) return;
293
+ const origin = this.containerEl().nativeElement.querySelector(".ui-field-box") ?? this.containerEl().nativeElement;
294
+ this.overlayOrigin.set(origin);
295
+ this.overlayWidth.set(origin.getBoundingClientRect().width);
296
+ this.focusedIndex.set(this.initialFocusIndex());
297
+ this.panelOpen.set(true);
298
+ this.opened.emit();
299
+ this.queueAfterOpen();
300
+ }
301
+ close(focusTrigger = true) {
302
+ if (!this.panelOpen()) return;
303
+ this.panelOpen.set(false);
304
+ this.clearSearchBuffer();
305
+ this.editableQuery.set(null);
306
+ if (this.resetFilterOnHide()) this.filterValue.set("");
307
+ this.emitTouch();
308
+ this.closed.emit();
309
+ if (focusTrigger) this.focus();
310
+ }
311
+ toggle() {
312
+ this.panelOpen() ? this.close() : this.open();
313
+ }
314
+ initialFocusIndex() {
315
+ const options = this.visibleOptions();
316
+ const selected = options.findIndex((o) => o.selected && !o.entry.disabled);
317
+ if (selected !== -1) return selected;
318
+ if (this.autoOptionFocus()) return options.findIndex((o) => !o.entry.disabled);
319
+ return -1;
320
+ }
321
+ queueAfterOpen() {
322
+ setTimeout(() => {
323
+ if (this.filter() && this.autofocusFilter() && !this.isEditable()) this.filterInputEl()?.nativeElement.focus();
324
+ this.scrollFocusedIntoView();
325
+ });
326
+ }
327
+ onContainerClick(event) {
328
+ if (this.isDisabled() || this.readonly()) return;
329
+ const target = event.target;
330
+ if (target.closest("button") && !target.closest(".ui-select-trigger")) return;
331
+ if (this.isEditable()) {
332
+ if (target.closest(".ui-select-chevron")) this.toggle();
333
+ return;
334
+ }
335
+ this.open();
336
+ }
337
+ onClearClick(event) {
338
+ event.stopPropagation();
339
+ this.clear();
340
+ }
341
+ clear() {
342
+ this.commit(null);
343
+ this.editableQuery.set(null);
344
+ this.cleared.emit();
345
+ this.focus();
346
+ }
347
+ onEditableInput(event) {
348
+ const value = event.target.value;
349
+ this.editableQuery.set(value);
350
+ this.commit(value === "" ? null : value);
351
+ if (!this.panelOpen()) this.open();
352
+ this.focusedIndex.set(this.visibleOptions().findIndex((o) => !o.entry.disabled));
353
+ }
354
+ removeValue(value) {
355
+ if (this.isDisabled() || this.readonly()) return;
356
+ if (!this.multiple()) {
357
+ this.commit(null);
358
+ return;
359
+ }
360
+ const current = this.selectedValues().filter((v) => !this.equals(v, value));
361
+ this.commit(current);
362
+ }
363
+ onTriggerFocus(event) {
364
+ this.inputFocus.emit(event);
365
+ }
366
+ onTriggerBlur(event) {
367
+ const next = event.relatedTarget;
368
+ if (!next || !this.panelEl()?.nativeElement.contains(next)) this.emitTouch();
369
+ this.inputBlur.emit(event);
370
+ }
371
+ onTriggerKeydown(event) {
372
+ if (this.isDisabled() || this.readonly()) return;
373
+ if (event.key === "Backspace" && !this.isEditable() && this.multiple() && this.hasValue()) {
374
+ event.preventDefault();
375
+ const values = this.selectedValues();
376
+ this.removeValue(values[values.length - 1]);
377
+ return;
378
+ }
379
+ if (this.handleNavigationKey(event)) return;
380
+ if (!this.isEditable() && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
381
+ event.preventDefault();
382
+ if (!this.panelOpen()) this.open();
383
+ this.searchOption(event.key);
384
+ }
385
+ }
386
+ onFilterKeydown(event) {
387
+ if (event.key === "Home" || event.key === "End") return;
388
+ this.handleNavigationKey(event);
389
+ }
390
+ handleNavigationKey(event) {
391
+ switch (event.key) {
392
+ case "ArrowDown":
393
+ event.preventDefault();
394
+ if (!this.panelOpen()) {
395
+ this.open();
396
+ if (this.focusedIndex() === -1) this.moveFocus(1);
397
+ } else this.moveFocus(1);
398
+ return true;
399
+ case "ArrowUp":
400
+ event.preventDefault();
401
+ if (event.altKey) this.close();
402
+ else if (!this.panelOpen()) {
403
+ this.open();
404
+ if (this.focusedIndex() === -1) this.moveFocus(-1);
405
+ } else this.moveFocus(-1);
406
+ return true;
407
+ case "Home":
408
+ case "End":
409
+ if (!this.panelOpen()) return false;
410
+ event.preventDefault();
411
+ this.focusEdge(event.key === "Home" ? 1 : -1);
412
+ return true;
413
+ case "Enter":
414
+ if (!this.panelOpen()) return false;
415
+ event.preventDefault();
416
+ this.selectFocused();
417
+ return true;
418
+ case " ":
419
+ if (this.isEditable() || this.filter() && event.target === this.filterInputEl()?.nativeElement) return false;
420
+ if (!this.panelOpen()) return false;
421
+ event.preventDefault();
422
+ this.selectFocused();
423
+ return true;
424
+ case "Escape":
425
+ if (!this.panelOpen()) return false;
426
+ event.preventDefault();
427
+ event.stopPropagation();
428
+ this.close();
429
+ return true;
430
+ case "Tab":
431
+ if (this.panelOpen()) this.close(false);
432
+ return false;
433
+ default: return false;
434
+ }
435
+ }
436
+ onOptionClick(row, event) {
437
+ event.preventDefault();
438
+ if (this.loading()) return;
439
+ this.selectRow(row);
440
+ }
441
+ onOptionMousedown(event) {
442
+ event.preventDefault();
443
+ }
444
+ onOptionMouseEnter(row) {
445
+ if (this.focusOnHover() && !row.entry.disabled) this.focusedIndex.set(row.index);
446
+ }
447
+ selectRow(row, keepOpen = false) {
448
+ if (row.entry.disabled || this.readonly()) return;
449
+ this.focusedIndex.set(row.index);
450
+ this.editableQuery.set(null);
451
+ if (this.multiple()) {
452
+ const current = [...this.selectedValues()];
453
+ const at = current.findIndex((v) => this.equals(v, row.entry.value));
454
+ if (at !== -1) current.splice(at, 1);
455
+ else current.push(row.entry.value);
456
+ this.commit(current);
457
+ return;
458
+ }
459
+ this.commit(row.entry.value);
460
+ if (!keepOpen) this.close();
461
+ }
462
+ selectFocused() {
463
+ const row = this.visibleOptions()[this.focusedIndex()];
464
+ if (row) this.selectRow(row);
465
+ else if (!this.multiple()) this.close();
466
+ }
467
+ commit(value) {
468
+ this.modelValue.set(value);
469
+ this.emitChange(value);
470
+ this.valueChange.emit(value);
471
+ }
472
+ moveFocus(delta) {
473
+ const options = this.visibleOptions();
474
+ if (!options.length) return;
475
+ let i = this.focusedIndex();
476
+ if (i === -1) i = delta === 1 ? -1 : options.length;
477
+ for (i += delta; i >= 0 && i < options.length; i += delta) if (!options[i].entry.disabled) {
478
+ this.setFocusedIndex(i);
479
+ return;
480
+ }
481
+ }
482
+ focusEdge(direction) {
483
+ const options = this.visibleOptions();
484
+ const from = direction === 1 ? 0 : options.length - 1;
485
+ for (let i = from; i >= 0 && i < options.length; i += direction) if (!options[i].entry.disabled) {
486
+ this.setFocusedIndex(i);
487
+ return;
488
+ }
489
+ }
490
+ setFocusedIndex(index) {
491
+ this.focusedIndex.set(index);
492
+ if (this.selectOnFocus() && !this.multiple()) {
493
+ const row = this.visibleOptions()[index];
494
+ if (row) this.selectRow(row, true);
495
+ }
496
+ this.scrollFocusedIntoView();
497
+ }
498
+ scrollFocusedIntoView() {
499
+ const row = this.visibleOptions()[this.focusedIndex()];
500
+ if (!row) return;
501
+ const vp = this.viewport();
502
+ if (vp) {
503
+ const rowIndex = this.visibleRows().findIndex((r) => r.kind === "option" && r.index === row.index);
504
+ if (rowIndex !== -1) vp.scrollToIndex(Math.max(0, rowIndex - 1), "auto");
505
+ return;
506
+ }
507
+ this.panelEl()?.nativeElement.querySelector(`[id="${row.id}"]`)?.scrollIntoView({ block: "nearest" });
508
+ }
509
+ searchOption(char) {
510
+ this.searchBuffer += char.toLowerCase();
511
+ if (this.searchTimeout) clearTimeout(this.searchTimeout);
512
+ this.searchTimeout = setTimeout(() => this.clearSearchBuffer(), 500);
513
+ const options = this.visibleOptions();
514
+ if (!options.length) return;
515
+ const needle = this.normalize(this.searchBuffer);
516
+ const from = this.searchBuffer.length === 1 ? this.focusedIndex() + 1 : Math.max(0, this.focusedIndex());
517
+ for (let k = 0; k < options.length; k++) {
518
+ const i = (from + k) % options.length;
519
+ const option = options[i];
520
+ if (!option.entry.disabled && this.normalize(option.entry.label).startsWith(needle)) {
521
+ this.setFocusedIndex(i);
522
+ return;
523
+ }
524
+ }
525
+ }
526
+ clearSearchBuffer() {
527
+ this.searchBuffer = "";
528
+ if (this.searchTimeout) {
529
+ clearTimeout(this.searchTimeout);
530
+ this.searchTimeout = void 0;
531
+ }
532
+ }
533
+ onFilterInput(event) {
534
+ const value = event.target.value;
535
+ this.filterValue.set(value);
536
+ this.filterChange.emit({
537
+ originalEvent: event,
538
+ filter: value
539
+ });
540
+ const first = this.visibleOptions().findIndex((o) => !o.entry.disabled);
541
+ this.focusedIndex.set(first);
542
+ }
543
+ matchesFilter(entry) {
544
+ const needles = [this.normalizedFilter(), this.normalizedEditableQuery()].filter(Boolean);
545
+ if (!needles.length) return true;
546
+ const fields = this.filterBy()?.split(",").map((f) => f.trim()).filter(Boolean);
547
+ const haystacks = fields?.length ? fields.map((f) => this.asText(this.getField(entry.original, f)) ?? "") : [entry.label];
548
+ return needles.every((needle) => haystacks.some((text) => this.normalize(text).includes(needle)));
549
+ }
550
+ normalize(text) {
551
+ return text.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "");
552
+ }
553
+ toEntry(option) {
554
+ return this.resolver.toEntry(option);
555
+ }
556
+ getField(target, path) {
557
+ return this.resolver.getField(target, path);
558
+ }
559
+ resolveValue(option) {
560
+ return this.resolver.resolveValue(option);
561
+ }
562
+ resolveLabel(option) {
563
+ return this.resolver.resolveLabel(option);
564
+ }
565
+ asText(value) {
566
+ return this.resolver.asText(value);
567
+ }
568
+ isValueSelected(value) {
569
+ return this.selectedValues().some((v) => this.equals(v, value));
570
+ }
571
+ equals(a, b) {
572
+ return this.resolver.equals(a, b);
573
+ }
574
+ static {
575
+ this.ɵfac = i0.ɵɵngDeclareFactory({
576
+ minVersion: "12.0.0",
577
+ version: "22.3.0",
578
+ ngImport: i0,
579
+ type: UiSelect,
580
+ deps: [],
581
+ target: i0.ɵɵFactoryTarget.Component
582
+ });
583
+ }
584
+ static {
585
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
586
+ minVersion: "17.0.0",
587
+ version: "22.3.0",
588
+ type: UiSelect,
589
+ isStandalone: true,
590
+ selector: "ui-select",
591
+ inputs: {
592
+ options: {
593
+ classPropertyName: "options",
594
+ publicName: "options",
595
+ isSignal: true,
596
+ isRequired: false,
597
+ transformFunction: null
598
+ },
599
+ optionLabel: {
600
+ classPropertyName: "optionLabel",
601
+ publicName: "optionLabel",
602
+ isSignal: true,
603
+ isRequired: false,
604
+ transformFunction: null
605
+ },
606
+ optionValue: {
607
+ classPropertyName: "optionValue",
608
+ publicName: "optionValue",
609
+ isSignal: true,
610
+ isRequired: false,
611
+ transformFunction: null
612
+ },
613
+ optionDisabled: {
614
+ classPropertyName: "optionDisabled",
615
+ publicName: "optionDisabled",
616
+ isSignal: true,
617
+ isRequired: false,
618
+ transformFunction: null
619
+ },
620
+ group: {
621
+ classPropertyName: "group",
622
+ publicName: "group",
623
+ isSignal: true,
624
+ isRequired: false,
625
+ transformFunction: null
626
+ },
627
+ optionGroupLabel: {
628
+ classPropertyName: "optionGroupLabel",
629
+ publicName: "optionGroupLabel",
630
+ isSignal: true,
631
+ isRequired: false,
632
+ transformFunction: null
633
+ },
634
+ optionGroupChildren: {
635
+ classPropertyName: "optionGroupChildren",
636
+ publicName: "optionGroupChildren",
637
+ isSignal: true,
638
+ isRequired: false,
639
+ transformFunction: null
640
+ },
641
+ dataKey: {
642
+ classPropertyName: "dataKey",
643
+ publicName: "dataKey",
644
+ isSignal: true,
645
+ isRequired: false,
646
+ transformFunction: null
647
+ },
648
+ multiple: {
649
+ classPropertyName: "multiple",
650
+ publicName: "multiple",
651
+ isSignal: true,
652
+ isRequired: false,
653
+ transformFunction: null
654
+ },
655
+ checkmark: {
656
+ classPropertyName: "checkmark",
657
+ publicName: "checkmark",
658
+ isSignal: true,
659
+ isRequired: false,
660
+ transformFunction: null
661
+ },
662
+ checkbox: {
663
+ classPropertyName: "checkbox",
664
+ publicName: "checkbox",
665
+ isSignal: true,
666
+ isRequired: false,
667
+ transformFunction: null
668
+ },
669
+ maxSelectedLabels: {
670
+ classPropertyName: "maxSelectedLabels",
671
+ publicName: "maxSelectedLabels",
672
+ isSignal: true,
673
+ isRequired: false,
674
+ transformFunction: null
675
+ },
676
+ overflowLabel: {
677
+ classPropertyName: "overflowLabel",
678
+ publicName: "overflowLabel",
679
+ isSignal: true,
680
+ isRequired: false,
681
+ transformFunction: null
682
+ },
683
+ placeholder: {
684
+ classPropertyName: "placeholder",
685
+ publicName: "placeholder",
686
+ isSignal: true,
687
+ isRequired: false,
688
+ transformFunction: null
689
+ },
690
+ showClear: {
691
+ classPropertyName: "showClear",
692
+ publicName: "showClear",
693
+ isSignal: true,
694
+ isRequired: false,
695
+ transformFunction: null
696
+ },
697
+ clearAriaLabel: {
698
+ classPropertyName: "clearAriaLabel",
699
+ publicName: "clearAriaLabel",
700
+ isSignal: true,
701
+ isRequired: false,
702
+ transformFunction: null
703
+ },
704
+ icon: {
705
+ classPropertyName: "icon",
706
+ publicName: "icon",
707
+ isSignal: true,
708
+ isRequired: false,
709
+ transformFunction: null
710
+ },
711
+ showIcon: {
712
+ classPropertyName: "showIcon",
713
+ publicName: "showIcon",
714
+ isSignal: true,
715
+ isRequired: false,
716
+ transformFunction: null
717
+ },
718
+ filter: {
719
+ classPropertyName: "filter",
720
+ publicName: "filter",
721
+ isSignal: true,
722
+ isRequired: false,
723
+ transformFunction: null
724
+ },
725
+ filterPlaceholder: {
726
+ classPropertyName: "filterPlaceholder",
727
+ publicName: "filterPlaceholder",
728
+ isSignal: true,
729
+ isRequired: false,
730
+ transformFunction: null
731
+ },
732
+ filterAriaLabel: {
733
+ classPropertyName: "filterAriaLabel",
734
+ publicName: "filterAriaLabel",
735
+ isSignal: true,
736
+ isRequired: false,
737
+ transformFunction: null
738
+ },
739
+ filterBy: {
740
+ classPropertyName: "filterBy",
741
+ publicName: "filterBy",
742
+ isSignal: true,
743
+ isRequired: false,
744
+ transformFunction: null
745
+ },
746
+ autofocusFilter: {
747
+ classPropertyName: "autofocusFilter",
748
+ publicName: "autofocusFilter",
749
+ isSignal: true,
750
+ isRequired: false,
751
+ transformFunction: null
752
+ },
753
+ resetFilterOnHide: {
754
+ classPropertyName: "resetFilterOnHide",
755
+ publicName: "resetFilterOnHide",
756
+ isSignal: true,
757
+ isRequired: false,
758
+ transformFunction: null
759
+ },
760
+ ripple: {
761
+ classPropertyName: "ripple",
762
+ publicName: "ripple",
763
+ isSignal: true,
764
+ isRequired: false,
765
+ transformFunction: null
766
+ },
767
+ emptyMessage: {
768
+ classPropertyName: "emptyMessage",
769
+ publicName: "emptyMessage",
770
+ isSignal: true,
771
+ isRequired: false,
772
+ transformFunction: null
773
+ },
774
+ emptyFilterMessage: {
775
+ classPropertyName: "emptyFilterMessage",
776
+ publicName: "emptyFilterMessage",
777
+ isSignal: true,
778
+ isRequired: false,
779
+ transformFunction: null
780
+ },
781
+ editable: {
782
+ classPropertyName: "editable",
783
+ publicName: "editable",
784
+ isSignal: true,
785
+ isRequired: false,
786
+ transformFunction: null
787
+ },
788
+ loading: {
789
+ classPropertyName: "loading",
790
+ publicName: "loading",
791
+ isSignal: true,
792
+ isRequired: false,
793
+ transformFunction: null
794
+ },
795
+ autoOptionFocus: {
796
+ classPropertyName: "autoOptionFocus",
797
+ publicName: "autoOptionFocus",
798
+ isSignal: true,
799
+ isRequired: false,
800
+ transformFunction: null
801
+ },
802
+ selectOnFocus: {
803
+ classPropertyName: "selectOnFocus",
804
+ publicName: "selectOnFocus",
805
+ isSignal: true,
806
+ isRequired: false,
807
+ transformFunction: null
808
+ },
809
+ focusOnHover: {
810
+ classPropertyName: "focusOnHover",
811
+ publicName: "focusOnHover",
812
+ isSignal: true,
813
+ isRequired: false,
814
+ transformFunction: null
815
+ },
816
+ virtualScroll: {
817
+ classPropertyName: "virtualScroll",
818
+ publicName: "virtualScroll",
819
+ isSignal: true,
820
+ isRequired: false,
821
+ transformFunction: null
822
+ },
823
+ virtualScrollItemSize: {
824
+ classPropertyName: "virtualScrollItemSize",
825
+ publicName: "virtualScrollItemSize",
826
+ isSignal: true,
827
+ isRequired: false,
828
+ transformFunction: null
829
+ },
830
+ lazy: {
831
+ classPropertyName: "lazy",
832
+ publicName: "lazy",
833
+ isSignal: true,
834
+ isRequired: false,
835
+ transformFunction: null
836
+ },
837
+ scrollHeight: {
838
+ classPropertyName: "scrollHeight",
839
+ publicName: "scrollHeight",
840
+ isSignal: true,
841
+ isRequired: false,
842
+ transformFunction: null
843
+ },
844
+ autoFlip: {
845
+ classPropertyName: "autoFlip",
846
+ publicName: "autoFlip",
847
+ isSignal: true,
848
+ isRequired: false,
849
+ transformFunction: null
850
+ },
851
+ panelStyleClass: {
852
+ classPropertyName: "panelStyleClass",
853
+ publicName: "panelStyleClass",
854
+ isSignal: true,
855
+ isRequired: false,
856
+ transformFunction: null
857
+ },
858
+ panelWidth: {
859
+ classPropertyName: "panelWidth",
860
+ publicName: "panelWidth",
861
+ isSignal: true,
862
+ isRequired: false,
863
+ transformFunction: null
864
+ }
865
+ },
866
+ outputs: {
867
+ valueChange: "valueChange",
868
+ opened: "opened",
869
+ closed: "closed",
870
+ cleared: "cleared",
871
+ filterChange: "filterChange",
872
+ lazyLoad: "lazyLoad",
873
+ inputFocus: "inputFocus",
874
+ inputBlur: "inputBlur"
875
+ },
876
+ providers: [{
877
+ provide: NG_VALUE_ACCESSOR,
878
+ useExisting: forwardRef(() => UiSelect),
879
+ multi: true
880
+ }],
881
+ queries: [
882
+ {
883
+ propertyName: "itemTemplate",
884
+ first: true,
885
+ predicate: ["item"],
886
+ descendants: true,
887
+ isSignal: true
888
+ },
889
+ {
890
+ propertyName: "selectedItemTemplate",
891
+ first: true,
892
+ predicate: ["selectedItem"],
893
+ descendants: true,
894
+ isSignal: true
895
+ },
896
+ {
897
+ propertyName: "groupTemplate",
898
+ first: true,
899
+ predicate: ["group"],
900
+ descendants: true,
901
+ isSignal: true
902
+ },
903
+ {
904
+ propertyName: "headerTemplate",
905
+ first: true,
906
+ predicate: ["header"],
907
+ descendants: true,
908
+ isSignal: true
909
+ },
910
+ {
911
+ propertyName: "footerTemplate",
912
+ first: true,
913
+ predicate: ["footer"],
914
+ descendants: true,
915
+ isSignal: true
916
+ },
917
+ {
918
+ propertyName: "emptyTemplate",
919
+ first: true,
920
+ predicate: ["empty"],
921
+ descendants: true,
922
+ isSignal: true
923
+ }
924
+ ],
925
+ viewQueries: [
926
+ {
927
+ propertyName: "containerEl",
928
+ first: true,
929
+ predicate: ["container"],
930
+ descendants: true,
931
+ isSignal: true
932
+ },
933
+ {
934
+ propertyName: "triggerEl",
935
+ first: true,
936
+ predicate: ["trigger"],
937
+ descendants: true,
938
+ isSignal: true
939
+ },
940
+ {
941
+ propertyName: "panelEl",
942
+ first: true,
943
+ predicate: ["panel"],
944
+ descendants: true,
945
+ isSignal: true
946
+ },
947
+ {
948
+ propertyName: "filterInputEl",
949
+ first: true,
950
+ predicate: ["filterInput"],
951
+ descendants: true,
952
+ isSignal: true
953
+ },
954
+ {
955
+ propertyName: "viewport",
956
+ first: true,
957
+ predicate: CdkVirtualScrollViewport,
958
+ descendants: true,
959
+ isSignal: true
960
+ }
961
+ ],
962
+ usesInheritance: true,
963
+ ngImport: i0,
964
+ template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-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 trigger 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-select-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 (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\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-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : 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 (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-select-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-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-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div\n #container\n class=\"ui-select\"\n [class._editable]=\"isEditable()\"\n (click)=\"onContainerClick($event)\"\n>\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"hasValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\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-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"ctx\"\n />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{\n overflowText()\n }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\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 (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"selectedItemContexts()[0]\"\n />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ effectivePlaceholder() }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-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-select-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Chargement des options\"\n />\n } @else if (showIcon()) {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\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(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n",
965
+ styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-trigger-color, var(--form-high-content-default));cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--ui-select-trigger-color-disabled, var(--form-high-content-disabled))}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--ui-select-placeholder-color, var(--form-low-content-default))}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;align-self:stretch;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0;padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-overflow{flex-shrink:0;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-overflow-color, var(--form-low-content-default));white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{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-select-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--ui-select-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-select-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:hover:not(:disabled){color:var(--ui-select-clear-color-hover, var(--form-high-content-hover))}.ui-select-clear:focus-visible{outline:none;color:var(--ui-select-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-select-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--ui-select-clear-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-select-chevron:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{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);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-select-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-select-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-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-header-color, var(--form-high-content-default))}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--ui-select-filter-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--ui-select-filter-surface, var(--form-high-surface-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--ui-select-filter-stroke-hover, var(--form-high-stroke-hover))}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--ui-select-filter-stroke-focus, var(--form-high-stroke-focused))}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--ui-select-filter-icon-color, var(--form-low-content-default))}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-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-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-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-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--ui-select-option-surface-hover, var(--global-background-default-hover))}.ui-select-panel .ui-select-option._selected{background-color:var(--ui-select-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-select-option-color-selected, var(--form-high-content-checked))}.ui-select-panel .ui-select-option._disabled{color:var(--ui-select-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--ui-select-checkmark-color, var(--form-high-content-checked))}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-select-checkbox-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--ui-select-checkbox-surface, var(--form-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--ui-select-checkbox-marker-color, var(--form-high-content-checked));opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),transform var(--ui-control-transition-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-toggle-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--ui-select-checkbox-stroke-checked, var(--form-high-stroke-checked))}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--ui-select-checkbox-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-select-checkbox-surface-disabled, var(--form-high-surface-disabled))}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-select-weight, var(--weight-bold));color:var(--ui-select-group-color, var(--form-low-content-default))}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-empty-color, var(--form-low-content-default))}\n"],
966
+ dependencies: [
967
+ {
968
+ kind: "directive",
969
+ type: NgTemplateOutlet,
970
+ selector: "[ngTemplateOutlet]",
971
+ inputs: [
972
+ "ngTemplateOutletContext",
973
+ "ngTemplateOutlet",
974
+ "ngTemplateOutletInjector"
975
+ ]
976
+ },
977
+ {
978
+ kind: "ngmodule",
979
+ type: OverlayModule
980
+ },
981
+ {
982
+ kind: "directive",
983
+ type: i1.CdkConnectedOverlay,
984
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
985
+ inputs: [
986
+ "cdkConnectedOverlayOrigin",
987
+ "cdkConnectedOverlayPositions",
988
+ "cdkConnectedOverlayPositionStrategy",
989
+ "cdkConnectedOverlayOffsetX",
990
+ "cdkConnectedOverlayOffsetY",
991
+ "cdkConnectedOverlayWidth",
992
+ "cdkConnectedOverlayHeight",
993
+ "cdkConnectedOverlayMinWidth",
994
+ "cdkConnectedOverlayMinHeight",
995
+ "cdkConnectedOverlayBackdropClass",
996
+ "cdkConnectedOverlayPanelClass",
997
+ "cdkConnectedOverlayViewportMargin",
998
+ "cdkConnectedOverlayScrollStrategy",
999
+ "cdkConnectedOverlayOpen",
1000
+ "cdkConnectedOverlayDisableClose",
1001
+ "cdkConnectedOverlayTransformOriginOn",
1002
+ "cdkConnectedOverlayHasBackdrop",
1003
+ "cdkConnectedOverlayLockPosition",
1004
+ "cdkConnectedOverlayFlexibleDimensions",
1005
+ "cdkConnectedOverlayGrowAfterOpen",
1006
+ "cdkConnectedOverlayPush",
1007
+ "cdkConnectedOverlayDisposeOnNavigation",
1008
+ "cdkConnectedOverlayUsePopover",
1009
+ "cdkConnectedOverlayMatchWidth",
1010
+ "cdkConnectedOverlay"
1011
+ ],
1012
+ outputs: [
1013
+ "backdropClick",
1014
+ "positionChange",
1015
+ "attach",
1016
+ "detach",
1017
+ "overlayKeydown",
1018
+ "overlayOutsideClick"
1019
+ ],
1020
+ exportAs: ["cdkConnectedOverlay"]
1021
+ },
1022
+ {
1023
+ kind: "directive",
1024
+ type: i1.ɵɵCdkFixedSizeVirtualScroll,
1025
+ selector: "cdk-virtual-scroll-viewport[itemSize]",
1026
+ inputs: [
1027
+ "itemSize",
1028
+ "minBufferPx",
1029
+ "maxBufferPx"
1030
+ ]
1031
+ },
1032
+ {
1033
+ kind: "directive",
1034
+ type: i1.ɵɵCdkVirtualForOf,
1035
+ selector: "[cdkVirtualFor][cdkVirtualForOf]",
1036
+ inputs: [
1037
+ "cdkVirtualForOf",
1038
+ "cdkVirtualForTrackBy",
1039
+ "cdkVirtualForTemplate",
1040
+ "cdkVirtualForTemplateCacheSize"
1041
+ ]
1042
+ },
1043
+ {
1044
+ kind: "component",
1045
+ type: i1.ɵɵCdkVirtualScrollViewport,
1046
+ selector: "cdk-virtual-scroll-viewport",
1047
+ inputs: ["orientation", "appendOnly"],
1048
+ outputs: ["scrolledIndexChange"]
1049
+ },
1050
+ {
1051
+ kind: "ngmodule",
1052
+ type: ScrollingModule
1053
+ },
1054
+ {
1055
+ kind: "component",
1056
+ type: UiField,
1057
+ selector: "ui-field",
1058
+ inputs: [
1059
+ "label",
1060
+ "for",
1061
+ "required",
1062
+ "size",
1063
+ "level",
1064
+ "floatLabel",
1065
+ "filled",
1066
+ "disabled",
1067
+ "readonly",
1068
+ "multiline",
1069
+ "autoHeight",
1070
+ "message",
1071
+ "messageId",
1072
+ "showMessageIcon",
1073
+ "messageIcon",
1074
+ "hasFooter",
1075
+ "hasPrefix"
1076
+ ]
1077
+ },
1078
+ {
1079
+ kind: "component",
1080
+ type: UiIcon,
1081
+ selector: "ui-icon",
1082
+ inputs: [
1083
+ "name",
1084
+ "size",
1085
+ "type",
1086
+ "family",
1087
+ "decorative",
1088
+ "ariaLabel"
1089
+ ]
1090
+ },
1091
+ {
1092
+ kind: "component",
1093
+ type: UiSpinner,
1094
+ selector: "ui-spinner",
1095
+ inputs: [
1096
+ "size",
1097
+ "orientation",
1098
+ "label",
1099
+ "ariaLabel",
1100
+ "spinnerTemplate",
1101
+ "image",
1102
+ "imageAlt",
1103
+ "icon",
1104
+ "strokeWidth",
1105
+ "fill",
1106
+ "animationDuration",
1107
+ "delay"
1108
+ ]
1109
+ },
1110
+ {
1111
+ kind: "directive",
1112
+ type: UiMotion,
1113
+ selector: "[uiMotion]",
1114
+ inputs: [
1115
+ "uiMotion",
1116
+ "motionDuration",
1117
+ "motionDelay",
1118
+ "motionEasing",
1119
+ "motionEnterEasing",
1120
+ "motionLeaveEasing",
1121
+ "motionDistance",
1122
+ "motionScale",
1123
+ "motionDisabled",
1124
+ "motionOnInsert"
1125
+ ],
1126
+ exportAs: ["uiMotion"]
1127
+ }
1128
+ ]
1129
+ });
1130
+ }
1131
+ };
1132
+ i0.ɵɵngDeclareClassMetadata({
1133
+ minVersion: "12.0.0",
1134
+ version: "22.3.0",
1135
+ ngImport: i0,
1136
+ type: UiSelect,
1137
+ decorators: [{
1138
+ type: Component,
1139
+ args: [{
1140
+ selector: "ui-select",
1141
+ imports: [
1142
+ NgTemplateOutlet,
1143
+ OverlayModule,
1144
+ ScrollingModule,
1145
+ UiField,
1146
+ UiIcon,
1147
+ UiSpinner,
1148
+ UiMotion
1149
+ ],
1150
+ providers: [{
1151
+ provide: NG_VALUE_ACCESSOR,
1152
+ useExisting: forwardRef(() => UiSelect),
1153
+ multi: true
1154
+ }],
1155
+ template: "<!-- One rendered row: group header or option (shared by the plain and virtual lists). -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-select-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 trigger 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-select-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 (checkbox() && multiple()) {\n <!-- Purely visual checkbox: the option itself carries the aria-selected state. -->\n <span class=\"ui-select-checkbox\" [class._checked]=\"row.selected\" aria-hidden=\"true\">\n <ui-icon class=\"ui-select-checkbox-icon\" name=\"check\" size=\"sm\" />\n </span>\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-select-option-label\">{{ row.entry.label }}</span>\n }\n @if (checkmark() && row.selected) {\n <ui-icon class=\"ui-select-checkmark\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Options panel (CDK overlay). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-select-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width]=\"panelStyleWidth()\"\n [style.min-width]=\"panelStyleMinWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n @if (headerTemplate(); as tpl) {\n <div class=\"ui-select-header\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (filter()) {\n <div class=\"ui-select-filter\" [class._small]=\"size() === 'small'\">\n <ui-icon class=\"ui-select-filter-icon\" name=\"magnifying-glass\" size=\"sm\" />\n <input\n #filterInput\n type=\"text\"\n class=\"ui-select-filter-input\"\n autocomplete=\"off\"\n role=\"searchbox\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder() ?? ''\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilterInput($event)\"\n (keydown)=\"onFilterKeydown($event)\"\n />\n </div>\n }\n\n @if (virtualScroll()) {\n <cdk-virtual-scroll-viewport\n class=\"ui-select-viewport\"\n [itemSize]=\"virtualScrollItemSize()\"\n [style.height]=\"viewportHeight()\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : 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 (!visibleRows().length) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </cdk-virtual-scroll-viewport>\n } @else {\n <div\n class=\"ui-select-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-select-list\"\n role=\"listbox\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <ng-container [ngTemplateOutlet]=\"emptyTpl\" />\n }\n </ul>\n </div>\n }\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-select-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-select-empty\" role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ emptyLabel() }}\n }\n </li>\n</ng-template>\n\n<!-- Trigger: composed field. Clicking the box opens the panel (backdrop closes it). -->\n<!-- Convenience click on the wrapper: focus and keyboard are carried by\n the inner trigger role=\"combobox\". -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div\n #container\n class=\"ui-select\"\n [class._editable]=\"isEditable()\"\n (click)=\"onContainerClick($event)\"\n>\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"hasValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"multiple()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n @if (isEditable()) {\n <input\n #trigger\n type=\"text\"\n class=\"ui-select-native\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [id]=\"resolvedId()\"\n [value]=\"selectedLabel()\"\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-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onEditableInput($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n />\n } @else {\n <!-- Multiple + #selectedItem: the values (e.g. removable chips) live OUTSIDE the\n combobox button so their own buttons stay valid, interactive HTML. -->\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <div class=\"ui-select-values\">\n @for (ctx of selectedItemContexts(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"ctx\"\n />\n }\n @if (overflowCount() > 0) {\n <span class=\"ui-select-overflow\" [class._small]=\"size() === 'small'\">{{\n overflowText()\n }}</span>\n }\n </div>\n }\n <button\n #trigger\n type=\"button\"\n class=\"ui-select-trigger\"\n [class._small]=\"size() === 'small'\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\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 (keydown)=\"onTriggerKeydown($event)\"\n (focus)=\"onTriggerFocus($event)\"\n (blur)=\"onTriggerBlur($event)\"\n >\n @if (multiple() && selectedItemTemplate() && hasValue()) {\n <!-- Accessible value of the combobox (the visual value is the chips next to it). -->\n <span class=\"ui-select-sr\">{{ selectedLabel() }}</span>\n } @else if (!multiple() && selectedItemTemplate() && hasValue()) {\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate()!\"\n [ngTemplateOutletContext]=\"selectedItemContexts()[0]\"\n />\n } @else if (hasValue()) {\n <span class=\"ui-select-value\" [class._wrap]=\"multiple()\">{{ selectedLabel() }}</span>\n } @else {\n <span class=\"ui-select-placeholder\">{{ effectivePlaceholder() }}</span>\n }\n </button>\n }\n\n @if (showClearButton()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-select-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-select-loading\"\n size=\"small\"\n orientation=\"horizontal\"\n ariaLabel=\"Chargement des options\"\n />\n } @else if (showIcon()) {\n <ui-icon\n uiFieldSuffix\n class=\"ui-select-chevron\"\n [class._open]=\"panelOpen()\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"icon()\"\n [size]=\"iconSize()\"\n />\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(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n>\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n</ng-template>\n",
1156
+ styles: [".ui-select{display:block;cursor:pointer;--ui-field-box-cursor: pointer}.ui-select._editable{--ui-field-box-cursor: text}.ui-select-trigger{display:flex;align-items:center;flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;text-align:left;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-trigger-color, var(--form-high-content-default));cursor:pointer}.ui-select-trigger:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-trigger{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-trigger._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-trigger:disabled{cursor:not-allowed;color:var(--ui-select-trigger-color-disabled, var(--form-high-content-disabled))}.ui-select-value,.ui-select-placeholder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-placeholder{color:var(--ui-select-placeholder-color, var(--form-low-content-default))}.ui-select-value._wrap{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.ui-select-values{display:flex;align-items:center;align-self:stretch;flex-wrap:wrap;gap:var(--ui-select-values-gap, var(--units-xs));min-width:0;padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-overflow{flex-shrink:0;font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-overflow-color, var(--form-low-content-default));white-space:nowrap}.ui-select-overflow._small{font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.ui-select-native{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-select-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-native._small{font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-clear{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-clear-size, var(--size-components-2xs));height:var(--ui-select-clear-size, var(--size-components-2xs));flex-shrink:0;margin:0;padding:0;border:none;border-radius:var(--ui-select-clear-radius, var(--radius-full));background:none;color:var(--ui-select-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-select-clear:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-clear:hover:not(:disabled){color:var(--ui-select-clear-color-hover, var(--form-high-content-hover))}.ui-select-clear:focus-visible{outline:none;color:var(--ui-select-clear-color-focus, var(--form-high-content-focused));box-shadow:0 0 0 var(--ui-select-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-select-clear-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-select-clear:disabled{cursor:not-allowed;color:var(--ui-select-clear-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-select-chevron:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-chevron._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-select-chevron{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);cursor:pointer}.ui-select-chevron._open{rotate:180deg}.ui-select-loading{flex-shrink:0}.ui-select-loading:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-loading:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-select-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-select-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-select-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-select-panel-gap, var(--units-xs));box-sizing:border-box;max-width:var(--ui-select-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-select-panel-padding, var(--units-xs))}.ui-select-panel .ui-select-header,.ui-select-panel .ui-select-footer{padding:var(--ui-select-header-padding-y, var(--units-xs)) var(--ui-select-header-padding-x, var(--units-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));color:var(--ui-select-header-color, var(--form-high-content-default))}.ui-select-panel .ui-select-filter{display:flex;align-items:center;gap:var(--ui-select-filter-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-filter-height, var(--size-components-sm));flex-shrink:0;padding:0;border:var(--ui-select-filter-stroke-width, var(--stroke-sm)) solid var(--ui-select-filter-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));background-color:var(--ui-select-filter-surface, var(--form-high-surface-default));transition:border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-filter:hover:not(:focus-within){border-color:var(--ui-select-filter-stroke-hover, var(--form-high-stroke-hover))}.ui-select-panel .ui-select-filter:focus-within{border-color:var(--ui-select-filter-stroke-focus, var(--form-high-stroke-focused))}.ui-select-panel .ui-select-filter._small{height:var(--ui-select-filter-height-small, var(--size-components-xs))}.ui-select-panel .ui-select-filter-icon{flex-shrink:0;color:var(--ui-select-filter-icon-color, var(--form-low-content-default))}.ui-select-panel .ui-select-filter-icon:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-icon:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-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-select-panel .ui-select-filter-input:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-select-filter-padding-x, var(--units-sm)))}.ui-select-panel .ui-select-filter-input{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-select-panel .ui-select-filter-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-select-panel .ui-select-filter-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-select-panel .ui-select-filter-input{font-size:var(--ui-select-group-font-size, var(--size-typography-text-md))}.ui-select-panel .ui-select-scroller{overflow:auto;max-height:var(--ui-select-scroller-max-height, 19.5rem)}.ui-select-panel .ui-select-scroller._small{max-height:var(--ui-select-scroller-max-height-small, 16rem)}.ui-select-panel .ui-select-viewport{width:100%}.ui-select-panel .ui-select-list{display:flex;flex-direction:column;gap:var(--ui-select-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-select-panel .ui-select-viewport .ui-select-list{gap:0}.ui-select-panel .ui-select-viewport .ui-select-group{height:var(--ui-select-option-height, 2.5rem)}.ui-select-panel .ui-select-viewport .ui-select-group._small{height:var(--ui-select-option-height-small, 2rem)}.ui-select-panel .ui-select-option{display:flex;align-items:center;gap:var(--ui-select-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-select-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));border-radius:var(--ui-select-option-radius, var(--radius-sm));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-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-select-panel .ui-select-option._small{height:var(--ui-select-option-height-small, 2rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-font-size-small, var(--size-typography-text-md))}.ui-select-panel .ui-select-option._focused,.ui-select-panel .ui-select-option:hover:not(._disabled){background-color:var(--ui-select-option-surface-hover, var(--global-background-default-hover))}.ui-select-panel .ui-select-option._selected{background-color:var(--ui-select-option-surface-selected, var(--form-high-surface-hover));color:var(--ui-select-option-color-selected, var(--form-high-content-checked))}.ui-select-panel .ui-select-option._disabled{color:var(--ui-select-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-select-panel .ui-select-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-panel .ui-select-checkmark{flex-shrink:0;margin-left:auto;color:var(--ui-select-checkmark-color, var(--form-high-content-checked))}.ui-select-panel .ui-select-checkbox{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-select-checkbox-size, 1.125rem);height:var(--ui-select-checkbox-size, 1.125rem);flex-shrink:0;border:var(--ui-select-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-select-checkbox-stroke, var(--form-high-stroke-default));border-radius:var(--ui-select-checkbox-radius, var(--radius-xs));background-color:var(--ui-select-checkbox-surface, var(--form-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox .ui-select-checkbox-icon{--ui-icon-size: var(--ui-select-checkbox-icon-size, var(--ui-icon-size-sm, var(--size-typography-icon-sm)));color:var(--ui-select-checkbox-marker-color, var(--form-high-content-checked));opacity:0;transform:scale(.6);transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),transform var(--ui-control-transition-duration, var(--motion-toggle-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-toggle-easing, var(--transition-easeinout)))}.ui-select-panel .ui-select-checkbox._checked{border-color:var(--ui-select-checkbox-stroke-checked, var(--form-high-stroke-checked))}.ui-select-panel .ui-select-checkbox._checked .ui-select-checkbox-icon{opacity:1;transform:scale(1)}.ui-select-panel .ui-select-option._disabled .ui-select-checkbox{border-color:var(--ui-select-checkbox-stroke-disabled, var(--form-high-stroke-disabled));background-color:var(--ui-select-checkbox-surface-disabled, var(--form-high-surface-disabled))}.ui-select-panel .ui-select-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-select-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-select-weight, var(--weight-bold));color:var(--ui-select-group-color, var(--form-low-content-default))}.ui-select-panel .ui-select-group._small{height:var(--ui-select-group-height-small, 1.5rem);padding:0 var(--ui-select-option-padding-x-small, var(--units-md));font-size:var(--ui-select-group-font-size-small, var(--size-typography-text-sm))}.ui-select-panel .ui-select-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-select-option-height, 2.5rem);padding:0 var(--ui-select-option-padding-x, var(--units-default));font-family:var(--ui-select-font-family, var(--fontfamily-base));font-size:var(--ui-select-font-size, var(--size-typography-text-default));color:var(--ui-select-empty-color, var(--form-low-content-default))}\n"]
1157
+ }]
1158
+ }],
1159
+ ctorParameters: () => [],
1160
+ propDecorators: {
1161
+ options: [{
1162
+ type: i0.Input,
1163
+ args: [{
1164
+ isSignal: true,
1165
+ alias: "options",
1166
+ required: false
1167
+ }]
1168
+ }],
1169
+ optionLabel: [{
1170
+ type: i0.Input,
1171
+ args: [{
1172
+ isSignal: true,
1173
+ alias: "optionLabel",
1174
+ required: false
1175
+ }]
1176
+ }],
1177
+ optionValue: [{
1178
+ type: i0.Input,
1179
+ args: [{
1180
+ isSignal: true,
1181
+ alias: "optionValue",
1182
+ required: false
1183
+ }]
1184
+ }],
1185
+ optionDisabled: [{
1186
+ type: i0.Input,
1187
+ args: [{
1188
+ isSignal: true,
1189
+ alias: "optionDisabled",
1190
+ required: false
1191
+ }]
1192
+ }],
1193
+ group: [{
1194
+ type: i0.Input,
1195
+ args: [{
1196
+ isSignal: true,
1197
+ alias: "group",
1198
+ required: false
1199
+ }]
1200
+ }],
1201
+ optionGroupLabel: [{
1202
+ type: i0.Input,
1203
+ args: [{
1204
+ isSignal: true,
1205
+ alias: "optionGroupLabel",
1206
+ required: false
1207
+ }]
1208
+ }],
1209
+ optionGroupChildren: [{
1210
+ type: i0.Input,
1211
+ args: [{
1212
+ isSignal: true,
1213
+ alias: "optionGroupChildren",
1214
+ required: false
1215
+ }]
1216
+ }],
1217
+ dataKey: [{
1218
+ type: i0.Input,
1219
+ args: [{
1220
+ isSignal: true,
1221
+ alias: "dataKey",
1222
+ required: false
1223
+ }]
1224
+ }],
1225
+ multiple: [{
1226
+ type: i0.Input,
1227
+ args: [{
1228
+ isSignal: true,
1229
+ alias: "multiple",
1230
+ required: false
1231
+ }]
1232
+ }],
1233
+ checkmark: [{
1234
+ type: i0.Input,
1235
+ args: [{
1236
+ isSignal: true,
1237
+ alias: "checkmark",
1238
+ required: false
1239
+ }]
1240
+ }],
1241
+ checkbox: [{
1242
+ type: i0.Input,
1243
+ args: [{
1244
+ isSignal: true,
1245
+ alias: "checkbox",
1246
+ required: false
1247
+ }]
1248
+ }],
1249
+ maxSelectedLabels: [{
1250
+ type: i0.Input,
1251
+ args: [{
1252
+ isSignal: true,
1253
+ alias: "maxSelectedLabels",
1254
+ required: false
1255
+ }]
1256
+ }],
1257
+ overflowLabel: [{
1258
+ type: i0.Input,
1259
+ args: [{
1260
+ isSignal: true,
1261
+ alias: "overflowLabel",
1262
+ required: false
1263
+ }]
1264
+ }],
1265
+ placeholder: [{
1266
+ type: i0.Input,
1267
+ args: [{
1268
+ isSignal: true,
1269
+ alias: "placeholder",
1270
+ required: false
1271
+ }]
1272
+ }],
1273
+ showClear: [{
1274
+ type: i0.Input,
1275
+ args: [{
1276
+ isSignal: true,
1277
+ alias: "showClear",
1278
+ required: false
1279
+ }]
1280
+ }],
1281
+ clearAriaLabel: [{
1282
+ type: i0.Input,
1283
+ args: [{
1284
+ isSignal: true,
1285
+ alias: "clearAriaLabel",
1286
+ required: false
1287
+ }]
1288
+ }],
1289
+ icon: [{
1290
+ type: i0.Input,
1291
+ args: [{
1292
+ isSignal: true,
1293
+ alias: "icon",
1294
+ required: false
1295
+ }]
1296
+ }],
1297
+ showIcon: [{
1298
+ type: i0.Input,
1299
+ args: [{
1300
+ isSignal: true,
1301
+ alias: "showIcon",
1302
+ required: false
1303
+ }]
1304
+ }],
1305
+ filter: [{
1306
+ type: i0.Input,
1307
+ args: [{
1308
+ isSignal: true,
1309
+ alias: "filter",
1310
+ required: false
1311
+ }]
1312
+ }],
1313
+ filterPlaceholder: [{
1314
+ type: i0.Input,
1315
+ args: [{
1316
+ isSignal: true,
1317
+ alias: "filterPlaceholder",
1318
+ required: false
1319
+ }]
1320
+ }],
1321
+ filterAriaLabel: [{
1322
+ type: i0.Input,
1323
+ args: [{
1324
+ isSignal: true,
1325
+ alias: "filterAriaLabel",
1326
+ required: false
1327
+ }]
1328
+ }],
1329
+ filterBy: [{
1330
+ type: i0.Input,
1331
+ args: [{
1332
+ isSignal: true,
1333
+ alias: "filterBy",
1334
+ required: false
1335
+ }]
1336
+ }],
1337
+ autofocusFilter: [{
1338
+ type: i0.Input,
1339
+ args: [{
1340
+ isSignal: true,
1341
+ alias: "autofocusFilter",
1342
+ required: false
1343
+ }]
1344
+ }],
1345
+ resetFilterOnHide: [{
1346
+ type: i0.Input,
1347
+ args: [{
1348
+ isSignal: true,
1349
+ alias: "resetFilterOnHide",
1350
+ required: false
1351
+ }]
1352
+ }],
1353
+ ripple: [{
1354
+ type: i0.Input,
1355
+ args: [{
1356
+ isSignal: true,
1357
+ alias: "ripple",
1358
+ required: false
1359
+ }]
1360
+ }],
1361
+ emptyMessage: [{
1362
+ type: i0.Input,
1363
+ args: [{
1364
+ isSignal: true,
1365
+ alias: "emptyMessage",
1366
+ required: false
1367
+ }]
1368
+ }],
1369
+ emptyFilterMessage: [{
1370
+ type: i0.Input,
1371
+ args: [{
1372
+ isSignal: true,
1373
+ alias: "emptyFilterMessage",
1374
+ required: false
1375
+ }]
1376
+ }],
1377
+ editable: [{
1378
+ type: i0.Input,
1379
+ args: [{
1380
+ isSignal: true,
1381
+ alias: "editable",
1382
+ required: false
1383
+ }]
1384
+ }],
1385
+ loading: [{
1386
+ type: i0.Input,
1387
+ args: [{
1388
+ isSignal: true,
1389
+ alias: "loading",
1390
+ required: false
1391
+ }]
1392
+ }],
1393
+ autoOptionFocus: [{
1394
+ type: i0.Input,
1395
+ args: [{
1396
+ isSignal: true,
1397
+ alias: "autoOptionFocus",
1398
+ required: false
1399
+ }]
1400
+ }],
1401
+ selectOnFocus: [{
1402
+ type: i0.Input,
1403
+ args: [{
1404
+ isSignal: true,
1405
+ alias: "selectOnFocus",
1406
+ required: false
1407
+ }]
1408
+ }],
1409
+ focusOnHover: [{
1410
+ type: i0.Input,
1411
+ args: [{
1412
+ isSignal: true,
1413
+ alias: "focusOnHover",
1414
+ required: false
1415
+ }]
1416
+ }],
1417
+ virtualScroll: [{
1418
+ type: i0.Input,
1419
+ args: [{
1420
+ isSignal: true,
1421
+ alias: "virtualScroll",
1422
+ required: false
1423
+ }]
1424
+ }],
1425
+ virtualScrollItemSize: [{
1426
+ type: i0.Input,
1427
+ args: [{
1428
+ isSignal: true,
1429
+ alias: "virtualScrollItemSize",
1430
+ required: false
1431
+ }]
1432
+ }],
1433
+ lazy: [{
1434
+ type: i0.Input,
1435
+ args: [{
1436
+ isSignal: true,
1437
+ alias: "lazy",
1438
+ required: false
1439
+ }]
1440
+ }],
1441
+ scrollHeight: [{
1442
+ type: i0.Input,
1443
+ args: [{
1444
+ isSignal: true,
1445
+ alias: "scrollHeight",
1446
+ required: false
1447
+ }]
1448
+ }],
1449
+ autoFlip: [{
1450
+ type: i0.Input,
1451
+ args: [{
1452
+ isSignal: true,
1453
+ alias: "autoFlip",
1454
+ required: false
1455
+ }]
1456
+ }],
1457
+ panelStyleClass: [{
1458
+ type: i0.Input,
1459
+ args: [{
1460
+ isSignal: true,
1461
+ alias: "panelStyleClass",
1462
+ required: false
1463
+ }]
1464
+ }],
1465
+ panelWidth: [{
1466
+ type: i0.Input,
1467
+ args: [{
1468
+ isSignal: true,
1469
+ alias: "panelWidth",
1470
+ required: false
1471
+ }]
1472
+ }],
1473
+ valueChange: [{
1474
+ type: i0.Output,
1475
+ args: ["valueChange"]
1476
+ }],
1477
+ opened: [{
1478
+ type: i0.Output,
1479
+ args: ["opened"]
1480
+ }],
1481
+ closed: [{
1482
+ type: i0.Output,
1483
+ args: ["closed"]
1484
+ }],
1485
+ cleared: [{
1486
+ type: i0.Output,
1487
+ args: ["cleared"]
1488
+ }],
1489
+ filterChange: [{
1490
+ type: i0.Output,
1491
+ args: ["filterChange"]
1492
+ }],
1493
+ lazyLoad: [{
1494
+ type: i0.Output,
1495
+ args: ["lazyLoad"]
1496
+ }],
1497
+ inputFocus: [{
1498
+ type: i0.Output,
1499
+ args: ["inputFocus"]
1500
+ }],
1501
+ inputBlur: [{
1502
+ type: i0.Output,
1503
+ args: ["inputBlur"]
1504
+ }],
1505
+ itemTemplate: [{
1506
+ type: i0.ContentChild,
1507
+ args: ["item", { isSignal: true }]
1508
+ }],
1509
+ selectedItemTemplate: [{
1510
+ type: i0.ContentChild,
1511
+ args: ["selectedItem", { isSignal: true }]
1512
+ }],
1513
+ groupTemplate: [{
1514
+ type: i0.ContentChild,
1515
+ args: ["group", { isSignal: true }]
1516
+ }],
1517
+ headerTemplate: [{
1518
+ type: i0.ContentChild,
1519
+ args: ["header", { isSignal: true }]
1520
+ }],
1521
+ footerTemplate: [{
1522
+ type: i0.ContentChild,
1523
+ args: ["footer", { isSignal: true }]
1524
+ }],
1525
+ emptyTemplate: [{
1526
+ type: i0.ContentChild,
1527
+ args: ["empty", { isSignal: true }]
1528
+ }],
1529
+ containerEl: [{
1530
+ type: i0.ViewChild,
1531
+ args: ["container", { isSignal: true }]
1532
+ }],
1533
+ triggerEl: [{
1534
+ type: i0.ViewChild,
1535
+ args: ["trigger", { isSignal: true }]
1536
+ }],
1537
+ panelEl: [{
1538
+ type: i0.ViewChild,
1539
+ args: ["panel", { isSignal: true }]
1540
+ }],
1541
+ filterInputEl: [{
1542
+ type: i0.ViewChild,
1543
+ args: ["filterInput", { isSignal: true }]
1544
+ }],
1545
+ viewport: [{
1546
+ type: i0.ViewChild,
1547
+ args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }]
1548
+ }]
1549
+ }
1550
+ });
888
1551
  export { UiSelect };
889
- //# sourceMappingURL=4sh-ui-kit-forms-ui-select.mjs.map
1552
+
1553
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-select.mjs.map