@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,698 +1,1278 @@
1
- import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, output, contentChild, viewChild, viewChildren, ElementRef, signal, computed, isDevMode, effect, 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 { BaseFormField, formatLabel, dropdownOverlayPositions, createOptionResolver, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
8
- import { UiField } from '@4sh/ui-kit/forms/ui-field';
9
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
10
- import { UiChip } from '@4sh/ui-kit/informative/ui-chip';
11
- import { UiMotion } from '@4sh/ui-kit/motion';
12
- import { closeOnNavigation } from '@4sh/ui-kit/overlay';
13
-
14
- /**
15
- * ui-input-tags — headless multi-value tag entry built on the `ui-field` shell
16
- * (label + box + helper). Tags are entered by typing and pressing `Enter`
17
- * (and/or a `delimiter`), and removed with `Backspace` / the × action.
18
- *
19
- * The model is an **array** driven through {@link BaseFormField}
20
- * (`ControlValueAccessor`) — compatible with `[(ngModel)]`, Reactive Forms and
21
- * Signal Forms (`[formField]`, stable since Angular 22). Options: `max`,
22
- * `allowDuplicate`, `addOnBlur` / `addOnTab` / `addOnPaste`, and a `typeahead`
23
- * mode (a CDK-overlay suggestions panel fed by the parent via `completeMethod`).
24
- *
25
- * A11y: the tag list is a `role="listbox"` (`aria-orientation="horizontal"`);
26
- * each tag is a `role="option"` with roving focus (`←` / `→` between tags,
27
- * `Backspace` / `Delete` to delete). The editable input follows the combobox
28
- * pattern in `typeahead` mode.
29
- *
30
- * @example
31
- * ```html
32
- * <ui-input-tags label="Mots-clés" [(ngModel)]="keywords" placeholder="Ajouter…" />
33
- * ```
34
- */
35
- class UiInputTags extends BaseFormField {
36
- constructor() {
37
- super();
38
- /** Native placeholder shown when the input is empty (and no tag exists). */
39
- this.placeholder = input(/* @ts-ignore */
40
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
41
- /** Maximum number of tags allowed (`undefined` = unlimited). */
42
- this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
43
- /** Delimiter that splits typed/pasted text into several tags (in addition to `Enter`). */
44
- this.delimiter = input(/* @ts-ignore */
45
- ...(ngDevMode ? [undefined, { debugName: "delimiter" }] : /* istanbul ignore next */ []));
46
- /** Allow the same value to be added several times. */
47
- this.allowDuplicate = input(false, { ...(ngDevMode ? { debugName: "allowDuplicate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
48
- /** Add the current input as a tag when the field loses focus. */
49
- this.addOnBlur = input(false, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
50
- /** Add the current input as a tag on `Tab`. */
51
- this.addOnTab = input(false, { ...(ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
- /** Split pasted text with the `delimiter` (or whitespace/newlines) and add each part. */
53
- this.addOnPaste = input(false, { ...(ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
54
- /** Max character length of a single typed tag. */
55
- this.maxLength = input(undefined, { ...(ngDevMode ? { debugName: "maxLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
56
- /** Color family of the default `ui-chip` tags (ignored when an `#item` template is used). */
57
- this.chipLevel = input('default', /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "chipLevel" }] : /* istanbul ignore next */ []));
59
- /** Intensity of the default `ui-chip` tags: `low` (subtle, default) or `high` (solid). */
60
- this.chipSubLevel = input('low', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "chipSubLevel" }] : /* istanbul ignore next */ []));
62
- /** Pill shape (default) vs rounded-rectangle for the default `ui-chip` tags. */
63
- this.chipRounded = input(true, { ...(ngDevMode ? { debugName: "chipRounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
64
- /** Show a suggestions dropdown as the user types (fed via `completeMethod`). */
65
- this.typeahead = input(false, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
66
- /** Suggestions to display — set by the parent in response to `completeMethod`. */
67
- this.suggestions = input([], /* @ts-ignore */
68
- ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
69
- /** Field name (dot-path) read as a suggestion label. */
70
- this.optionLabel = input(/* @ts-ignore */
71
- ...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
72
- /** Field name (dot-path) read as the value added to the model. */
73
- this.optionValue = input(/* @ts-ignore */
74
- ...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
75
- /** Field name (dot-path) read as a suggestion's disabled flag. */
76
- this.optionDisabled = input(/* @ts-ignore */
77
- ...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
78
- /** Property compared for value equality (duplicate detection on objects). */
79
- this.dataKey = input(/* @ts-ignore */
80
- ...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
81
- /** Treat `suggestions` as groups. */
82
- this.group = input(false, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
83
- /** Field name of a group's label. */
84
- this.optionGroupLabel = input('label', /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
86
- /** Field name of a group's children array. */
87
- this.optionGroupChildren = input('items', /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
89
- /** Minimum number of characters before `completeMethod` is emitted. */
90
- this.minLength = input(1, { ...(ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
91
- /** Debounce (ms) between the last keystroke and `completeMethod`. */
92
- this.delay = input(300, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
93
- /** Emit a query as soon as the input is focused (before any typing). */
94
- this.completeOnFocus = input(false, { ...(ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
95
- /** Max height of the suggestions list (CSS size). Defaults from the SCSS. */
96
- this.scrollHeight = input(/* @ts-ignore */
97
- ...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
98
- /** Visually focus the first suggestion when the panel opens. */
99
- this.autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
100
- /** Visually focus the suggestion under the mouse pointer. */
101
- this.focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
102
- /** Auto-flip the panel above the input when space is lacking below. */
103
- this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
104
- /** Extra class(es) applied to the suggestions panel. */
105
- this.panelStyleClass = input(/* @ts-ignore */
106
- ...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
107
- /** Message shown when a query returns no suggestion. */
108
- this.emptyMessage = input('Aucun résultat', /* @ts-ignore */
109
- ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
110
- /** Accessible label of each tag's remove action — `{0}` is the tag label. */
111
- this.removeTagLabel = input('Supprimer {0}', /* @ts-ignore */
112
- ...(ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []));
113
- /** Emitted when a tag is added. */
114
- this.tagAdd = output();
115
- /** Emitted when a tag is removed. */
116
- this.tagRemove = output();
117
- /** Emitted whenever the model changes. */
118
- this.valueChange = output();
119
- /** Emitted (debounced) when a typeahead query should run. */
120
- this.completeMethod = output();
121
- /** Emitted when a suggestion is selected. */
122
- this.optionSelect = output();
123
- /** Emitted when the suggestions panel opens. */
124
- this.opened = output();
125
- /** Emitted when the suggestions panel closes. */
126
- this.closed = output();
127
- /** Emitted when the input receives focus. */
128
- this.inputFocus = output();
129
- /** Emitted when the input loses focus. */
130
- this.inputBlur = output();
131
- /** Custom tag template: `<ng-template #item let-value let-remove="onRemove">`. */
132
- this.itemTemplate = contentChild('item', /* @ts-ignore */
133
- ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
134
- /** Custom suggestion template: `<ng-template #option let-option>`. */
135
- this.optionTemplate = contentChild('option', /* @ts-ignore */
136
- ...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
137
- /** Custom group-header template: `<ng-template #group let-group>`. */
138
- this.groupTemplate = contentChild('group', /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
140
- /** @ignore Component root (overlay origin). */
141
- this.containerEl = viewChild.required('container', /* @ts-ignore */
142
- ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
143
- /** @ignore Editable input. */
144
- this.inputEl = viewChild('inputEl', /* @ts-ignore */
145
- ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
146
- /** @ignore Panel root element. */
147
- this.panelEl = viewChild('panel', /* @ts-ignore */
148
- ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
149
- /** @ignore Tag option elements (roving focus). `read: ElementRef` covers both the
150
- * plain `<span>` (template mode) and the `<ui-chip>` host (default mode). */
151
- this.tagEls = viewChildren('tagEl', { ...(ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {}), read: ElementRef });
152
- /** @ignore */
153
- this.panelOpen = signal(false, /* @ts-ignore */
154
- ...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
155
- /** @ignore */
156
- this.overlayOrigin = signal(null, /* @ts-ignore */
157
- ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
158
- /** @ignore */
159
- this.overlayWidth = signal(null, /* @ts-ignore */
160
- ...(ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []));
161
- /** @ignore Text currently typed in the input. */
162
- this.inputText = signal('', /* @ts-ignore */
163
- ...(ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []));
164
- /** @ignore Index of the roving-focused tag (-1 = the input holds focus). */
165
- this.focusedTag = signal(-1, /* @ts-ignore */
166
- ...(ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []));
167
- /** @ignore Index of the visually focused suggestion (-1 = none). */
168
- this.focusedOption = signal(-1, /* @ts-ignore */
169
- ...(ngDevMode ? [{ debugName: "focusedOption" }] : /* istanbul ignore next */ []));
170
- /** @ignore A query has been emitted and is awaiting fresh suggestions. */
171
- this.queryDirty = false;
172
- // --- Derived state -----------------------------------------------------
173
- /** @ignore Current tags. */
174
- this.tagValues = computed(() => this.modelValue() ?? [], /* @ts-ignore */
175
- ...(ngDevMode ? [{ debugName: "tagValues" }] : /* istanbul ignore next */ []));
176
- /** @ignore Tags as display rows (value + resolved label). */
177
- this.tagRows = computed(() => this.tagValues().map((value, index) => {
178
- const label = this.labelOfValue(value);
179
- return { value, index, label, removeAriaLabel: formatLabel(this.removeTagLabel(), label) };
180
- }), /* @ts-ignore */
181
- ...(ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []));
182
- /** @ignore */
183
- this.listboxId = computed(() => `${this.resolvedId()}-tags`, /* @ts-ignore */
184
- ...(ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []));
185
- /** @ignore */
186
- this.panelListId = computed(() => `${this.resolvedId()}-list`, /* @ts-ignore */
187
- ...(ngDevMode ? [{ debugName: "panelListId" }] : /* istanbul ignore next */ []));
188
- /** @ignore Icon size aligned with the field size. */
189
- this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
190
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
191
- /** @ignore Tags can be removed (not disabled / read-only). */
192
- this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), /* @ts-ignore */
193
- ...(ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []));
194
- /** @ignore The tag cap has been reached. */
195
- this.isFull = computed(() => {
196
- const max = this.max();
197
- return max != null && max > 0 && this.tagValues().length >= max;
198
- }, /* @ts-ignore */
199
- ...(ngDevMode ? [{ debugName: "isFull" }] : /* istanbul ignore next */ []));
200
- /** @ignore The input accepts typing. */
201
- this.canType = computed(() => !this.isDisabled() && !this.readonly() && !this.isFull(), /* @ts-ignore */
202
- ...(ngDevMode ? [{ debugName: "canType" }] : /* istanbul ignore next */ []));
203
- /** @ignore The placeholder is shown only while there is no tag, and never
204
- * under a floating label at rest: it already holds that spot. */
205
- this.effectivePlaceholder = computed(() => this.hasFloatLabel() || this.tagValues().length ? '' : (this.placeholder() ?? ''), /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
207
- /** @ignore Keeps a floating label raised once focus leaves. */
208
- this.isFilled = computed(() => this.tagValues().length > 0 || this.inputText() !== '', /* @ts-ignore */
209
- ...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
210
- /** @ignore Flat entries (no groups). */
211
- this.flatEntries = computed(() => {
212
- if (this.group())
213
- return this.groupEntries().flatMap((g) => g.entries);
214
- return (this.suggestions() ?? []).map((option) => this.toEntry(option));
215
- }, /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []));
217
- /** @ignore Groups of entries. */
218
- this.groupEntries = computed(() => {
219
- if (!this.group())
220
- return [];
221
- return (this.suggestions() ?? []).map((groupOption) => {
222
- const children = this.getField(groupOption, this.optionGroupChildren());
223
- return {
224
- label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? '',
225
- original: groupOption,
226
- entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option)),
227
- };
228
- });
229
- }, /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []));
231
- /** @ignore Rendered suggestion rows (already-added values are marked present/disabled). */
232
- this.visibleRows = computed(() => {
233
- const rows = [];
234
- let index = 0;
235
- const pushOption = (entry) => {
236
- const present = this.isPresent(entry.value);
237
- rows.push({
238
- kind: 'option',
239
- key: `${this.panelListId()}-${index}`,
240
- id: `${this.resolvedId()}-option-${index}`,
241
- index,
242
- entry: { ...entry, disabled: entry.disabled || (present && !this.allowDuplicate()) },
243
- present,
244
- });
245
- index++;
246
- };
247
- if (this.group()) {
248
- this.groupEntries().forEach((g, gi) => {
249
- if (!g.entries.length)
250
- return;
251
- rows.push({
252
- kind: 'group',
253
- key: `${this.panelListId()}-group-${gi}`,
254
- label: g.label,
255
- original: g.original,
256
- });
257
- g.entries.forEach(pushOption);
258
- });
259
- }
260
- else {
261
- this.flatEntries().forEach(pushOption);
262
- }
263
- return rows;
264
- }, /* @ts-ignore */
265
- ...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
266
- /** @ignore Visible option rows only (visual-focus space). */
267
- this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === 'option'), /* @ts-ignore */
268
- ...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
269
- /** @ignore */
270
- this.optionCount = computed(() => this.visibleOptions().length, /* @ts-ignore */
271
- ...(ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []));
272
- /** @ignore */
273
- this.showEmpty = computed(() => this.panelOpen() && !this.visibleRows().length, /* @ts-ignore */
274
- ...(ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []));
275
- /** @ignore id of the visually focused suggestion (aria-activedescendant). */
276
- this.activeDescendant = computed(() => {
277
- if (!this.panelOpen())
278
- return null;
279
- return this.visibleOptions()[this.focusedOption()]?.id ?? null;
280
- }, /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
282
- /** @ignore */
283
- this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
284
- ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
285
- /** @ignore Shared option resolution (see `option-resolver.ts`). */
286
- this.resolver = createOptionResolver({
287
- optionValue: this.optionValue,
288
- optionLabel: this.optionLabel,
289
- optionDisabled: this.optionDisabled,
290
- dataKey: this.dataKey,
291
- });
292
- // Never carry an open panel over to the next page (the field can live in
293
- // an app shell that survives the navigation).
294
- closeOnNavigation(() => this.close(false));
295
- if (isDevMode()) {
296
- effect(() => {
297
- if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) {
298
- warnMissingAccessibleName('ui-input-tags', 'Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.');
299
- }
300
- });
301
- }
302
- }
303
- // --- CVA -----------------------------------------------------------------
304
- writeValue(value) {
305
- this.modelValue.set(Array.isArray(value) ? value : []);
306
- }
307
- /** Moves focus to the input. */
308
- focus(options) {
309
- this.inputEl()?.nativeElement.focus(options);
310
- }
311
- // --- Tag mutations -------------------------------------------------------
312
- /** @ignore Add one value as a tag (respects `max` and `allowDuplicate`). Returns true if added. */
313
- addValue(value, event) {
314
- if (!this.canType())
315
- return false;
316
- if (!this.allowDuplicate() && this.isPresent(value))
317
- return false;
318
- this.commit([...this.tagValues(), value]);
319
- this.tagAdd.emit({ originalEvent: event, value });
320
- return true;
321
- }
322
- /** @ignore Add the typed text (or its delimiter-split parts) as tag(s). */
323
- addFromInput(event) {
324
- const parts = this.split(this.inputText())
325
- .map((p) => p.trim())
326
- .filter(Boolean);
327
- let added = false;
328
- for (const part of parts) {
329
- if (this.addValue(part, event))
330
- added = true;
331
- if (this.isFull())
332
- break;
333
- }
334
- if (added || parts.length)
335
- this.inputText.set('');
336
- }
337
- /** Removes the tag at `index`. */
338
- removeAt(index, event) {
339
- if (this.isDisabled() || this.readonly())
340
- return;
341
- const tags = this.tagValues();
342
- if (index < 0 || index >= tags.length)
343
- return;
344
- const value = tags[index];
345
- this.commit(tags.filter((_, i) => i !== index));
346
- this.tagRemove.emit({ originalEvent: event, value, index });
347
- // Keep the roving focus coherent after removal.
348
- const nextCount = tags.length - 1;
349
- if (nextCount === 0)
350
- this.focusInput();
351
- else
352
- this.focusTag(Math.min(index, nextCount - 1));
353
- }
354
- /** @ignore Propagate a user-driven value change (view → form). */
355
- commit(value) {
356
- this.modelValue.set(value);
357
- this.emitChange(value);
358
- this.valueChange.emit(value);
359
- }
360
- // --- Input interactions --------------------------------------------------
361
- /** @ignore */
362
- onInput(event) {
363
- const value = event.target.value;
364
- this.inputText.set(value);
365
- // A typed delimiter flushes the completed part(s) into tags.
366
- if (this.delimiter() && this.split(value).length > 1) {
367
- this.flushDelimited(event);
368
- return;
369
- }
370
- if (!this.typeahead())
371
- return;
372
- if (this.searchTimeout)
373
- clearTimeout(this.searchTimeout);
374
- const query = this.inputText();
375
- if (query.length < this.minLength()) {
376
- this.close(false);
377
- return;
378
- }
379
- this.focusedOption.set(-1);
380
- this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
381
- }
382
- /** @ignore Split the text, add every completed part, keep the trailing remainder in the input. */
383
- flushDelimited(event) {
384
- const parts = this.split(this.inputText());
385
- const remainder = parts.pop() ?? '';
386
- parts
387
- .map((p) => p.trim())
388
- .filter(Boolean)
389
- .forEach((p) => this.addValue(p, event));
390
- this.inputText.set(remainder);
391
- }
392
- /** @ignore */
393
- onKeydown(event) {
394
- if (this.isDisabled() || this.readonly())
395
- return;
396
- const input = this.inputEl()?.nativeElement;
397
- const atStart = !input || (input.selectionStart === 0 && input.selectionEnd === 0);
398
- switch (event.key) {
399
- case 'Enter':
400
- event.preventDefault();
401
- if (this.panelOpen() && this.focusedOption() !== -1)
402
- this.selectFocusedOption(event);
403
- else
404
- this.addFromInput(event);
405
- return;
406
- case 'Backspace':
407
- if (this.inputText().length === 0 && this.tagValues().length) {
408
- event.preventDefault();
409
- this.removeAt(this.tagValues().length - 1, event);
410
- }
411
- return;
412
- case 'ArrowLeft':
413
- if (atStart && this.tagValues().length) {
414
- event.preventDefault();
415
- this.focusTag(this.tagValues().length - 1);
416
- }
417
- return;
418
- case 'ArrowDown':
419
- if (this.typeahead()) {
420
- event.preventDefault();
421
- this.panelOpen() ? this.moveOption(1) : this.reopen();
422
- }
423
- return;
424
- case 'ArrowUp':
425
- if (this.typeahead() && this.panelOpen()) {
426
- event.preventDefault();
427
- this.moveOption(-1);
428
- }
429
- return;
430
- case 'Escape':
431
- if (this.panelOpen()) {
432
- event.preventDefault();
433
- event.stopPropagation();
434
- this.close();
435
- }
436
- return;
437
- case 'Tab':
438
- if (this.addOnTab() && this.inputText().trim()) {
439
- event.preventDefault();
440
- this.addFromInput(event);
441
- }
442
- if (this.panelOpen())
443
- this.close(false);
444
- return;
445
- default:
446
- return;
447
- }
448
- }
449
- /** @ignore */
450
- onPaste(event) {
451
- if (!this.addOnPaste() || !this.canType())
452
- return;
453
- const text = event.clipboardData?.getData('text') ?? '';
454
- if (!text)
455
- return;
456
- event.preventDefault();
457
- const parts = (this.delimiter() ? this.split(text) : text.split(/[\r\n\t,;]+/))
458
- .map((p) => p.trim())
459
- .filter(Boolean);
460
- for (const part of parts) {
461
- this.addValue(part, event);
462
- if (this.isFull())
463
- break;
464
- }
465
- }
466
- /** @ignore */
467
- onInputFocus(event) {
468
- if (this.isDisabled())
469
- return;
470
- this.focusedTag.set(-1);
471
- if (this.typeahead() && !this.queryDirty && this.completeOnFocus())
472
- this.runSearch(event, this.inputText());
473
- this.inputFocus.emit(event);
474
- }
475
- /** @ignore */
476
- onInputBlur(event) {
477
- const next = event.relatedTarget;
478
- const insideComponent = this.containerEl().nativeElement.contains(next);
479
- const insidePanel = this.panelEl()?.nativeElement.contains(next);
480
- if (!insideComponent && !insidePanel) {
481
- if (this.addOnBlur() && this.inputText().trim())
482
- this.addFromInput(event);
483
- this.emitTouch();
484
- }
485
- this.inputBlur.emit(event);
486
- }
487
- /** @ignore Focus / clicks on the field box (but not a tag / button) land on the input. */
488
- onBoxMousedown(event) {
489
- const target = event.target;
490
- if (target.closest('button') || target.closest('.ui-input-tags-tag') || target.closest('input'))
491
- return;
492
- event.preventDefault();
493
- this.focusInput();
494
- }
495
- // --- Roving tag focus ----------------------------------------------------
496
- /** @ignore */
497
- onTagKeydown(event, index) {
498
- if (this.isDisabled() || this.readonly())
499
- return;
500
- switch (event.key) {
501
- case 'ArrowLeft':
502
- event.preventDefault();
503
- if (index > 0)
504
- this.focusTag(index - 1);
505
- return;
506
- case 'ArrowRight':
507
- event.preventDefault();
508
- if (index < this.tagValues().length - 1)
509
- this.focusTag(index + 1);
510
- else
511
- this.focusInput();
512
- return;
513
- case 'Backspace':
514
- case 'Delete':
515
- event.preventDefault();
516
- this.removeAt(index, event);
517
- return;
518
- case 'Home':
519
- event.preventDefault();
520
- this.focusTag(0);
521
- return;
522
- case 'End':
523
- event.preventDefault();
524
- this.focusTag(this.tagValues().length - 1);
525
- return;
526
- default:
527
- return;
528
- }
529
- }
530
- /** @ignore */
531
- focusTag(index) {
532
- this.focusedTag.set(index);
533
- setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
534
- }
535
- /** @ignore */
536
- focusInput() {
537
- this.focusedTag.set(-1);
538
- this.focus();
539
- }
540
- // --- Typeahead panel -----------------------------------------------------
541
- /** @ignore */
542
- runSearch(event, query) {
543
- this.queryDirty = true;
544
- this.completeMethod.emit({ originalEvent: event, query });
545
- this.open();
546
- }
547
- /** @ignore */
548
- open() {
549
- if (!this.canType() || this.panelOpen())
550
- return;
551
- const origin = this.containerEl().nativeElement.querySelector('.ui-field-box') ??
552
- this.containerEl().nativeElement;
553
- this.overlayOrigin.set(origin);
554
- this.overlayWidth.set(origin.getBoundingClientRect().width);
555
- this.focusedOption.set(this.autoOptionFocus() ? this.visibleOptions().findIndex((o) => !o.entry.disabled) : -1);
556
- this.panelOpen.set(true);
557
- this.opened.emit();
558
- }
559
- /** @ignore */
560
- close(focusInput = true) {
561
- if (!this.panelOpen())
562
- return;
563
- this.panelOpen.set(false);
564
- this.focusedOption.set(-1);
565
- this.queryDirty = false;
566
- this.closed.emit();
567
- if (focusInput)
568
- this.focus();
569
- }
570
- /** @ignore */
571
- reopen() {
572
- if (!this.visibleRows().length)
573
- return;
574
- this.open();
575
- if (this.focusedOption() === -1)
576
- this.moveOption(1);
577
- }
578
- /** @ignore */
579
- onOptionClick(row, event) {
580
- event.preventDefault();
581
- this.selectRow(row, event);
582
- }
583
- /** @ignore Keep focus on the input when clicking an option. */
584
- onOptionMousedown(event) {
585
- event.preventDefault();
586
- }
587
- /** @ignore */
588
- onOptionMouseEnter(row) {
589
- if (this.focusOnHover() && !row.entry.disabled)
590
- this.focusedOption.set(row.index);
591
- }
592
- /** @ignore */
593
- selectRow(row, event) {
594
- if (row.entry.disabled)
595
- return;
596
- if (this.addValue(row.entry.value, event)) {
597
- this.optionSelect.emit({ originalEvent: event, value: row.entry.original });
598
- }
599
- this.inputText.set('');
600
- this.close();
601
- }
602
- /** @ignore */
603
- selectFocusedOption(event) {
604
- const row = this.visibleOptions()[this.focusedOption()];
605
- if (row)
606
- this.selectRow(row, event);
607
- else
608
- this.addFromInput(event);
609
- }
610
- /** @ignore Move the visual focus, skipping disabled options (no wrap). */
611
- moveOption(delta) {
612
- const options = this.visibleOptions();
613
- if (!options.length)
614
- return;
615
- let i = this.focusedOption();
616
- if (i === -1)
617
- i = delta === 1 ? -1 : options.length;
618
- for (i += delta; i >= 0 && i < options.length; i += delta) {
619
- if (!options[i].entry.disabled) {
620
- this.focusedOption.set(i);
621
- this.scrollOptionIntoView(options[i].id);
622
- return;
623
- }
624
- }
625
- }
626
- /** @ignore */
627
- scrollOptionIntoView(id) {
628
- this.panelEl()
629
- ?.nativeElement.querySelector(`[id="${id}"]`)
630
- ?.scrollIntoView({ block: 'nearest' });
631
- }
632
- // --- Option resolution ---------------------------------------------------
633
- /** @ignore Display label for a tag value. */
634
- labelOfValue(value) {
635
- if (value === null || value === undefined)
636
- return '';
637
- const entry = this.flatEntries().find((e) => this.equals(e.value, value));
638
- if (entry)
639
- return entry.label;
640
- return this.resolveLabel(value) ?? this.asText(value) ?? '';
641
- }
642
- /** @ignore */
643
- toEntry(option) {
644
- return this.resolver.toEntry(option);
645
- }
646
- /** @ignore Read a (dot-path) field from an object. */
647
- getField(target, path) {
648
- return this.resolver.getField(target, path);
649
- }
650
- /** @ignore */
651
- resolveValue(option) {
652
- return this.resolver.resolveValue(option);
653
- }
654
- /** @ignore */
655
- resolveLabel(option) {
656
- return this.resolver.resolveLabel(option);
657
- }
658
- /** @ignore */
659
- asText(value) {
660
- return this.resolver.asText(value);
661
- }
662
- /** @ignore Whether a value is already a tag. */
663
- isPresent(value) {
664
- return this.tagValues().some((v) => this.equals(v, value));
665
- }
666
- /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
667
- equals(a, b) {
668
- return this.resolver.equals(a, b);
669
- }
670
- /** @ignore Split text by the delimiter (string or regex); whole text when none. */
671
- split(text) {
672
- const d = this.delimiter();
673
- if (!d)
674
- return [text];
675
- return text.split(d);
676
- }
677
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputTags, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
678
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiInputTags, isStandalone: true, selector: "ui-input-tags", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, delimiter: { classPropertyName: "delimiter", publicName: "delimiter", isSignal: true, isRequired: false, transformFunction: null }, allowDuplicate: { classPropertyName: "allowDuplicate", publicName: "allowDuplicate", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: true, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "addOnPaste", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, chipLevel: { classPropertyName: "chipLevel", publicName: "chipLevel", isSignal: true, isRequired: false, transformFunction: null }, chipSubLevel: { classPropertyName: "chipSubLevel", publicName: "chipSubLevel", isSignal: true, isRequired: false, transformFunction: null }, chipRounded: { classPropertyName: "chipRounded", publicName: "chipRounded", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", 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 }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, removeTagLabel: { classPropertyName: "removeTagLabel", publicName: "removeTagLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tagAdd: "tagAdd", tagRemove: "tagRemove", valueChange: "valueChange", completeMethod: "completeMethod", optionSelect: "optionSelect", opened: "opened", closed: "closed", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
679
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true },
680
- ], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-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-input-tags-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;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-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: "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: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
681
- }
682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiInputTags, decorators: [{
683
- type: Component,
684
- args: [{ selector: 'ui-input-tags', imports: [NgTemplateOutlet, OverlayModule, UiField, UiIcon, UiChip, UiMotion], providers: [
685
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true },
686
- ], template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-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-input-tags-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;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"] }]
687
- }], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], delimiter: [{ type: i0.Input, args: [{ isSignal: true, alias: "delimiter", required: false }] }], allowDuplicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDuplicate", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], addOnTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnTab", required: false }] }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnPaste", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], chipLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipLevel", required: false }] }], chipSubLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipSubLevel", required: false }] }], chipRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipRounded", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], removeTagLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeTagLabel", required: false }] }], tagAdd: [{ type: i0.Output, args: ["tagAdd"] }], tagRemove: [{ type: i0.Output, args: ["tagRemove"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], optionSelect: [{ type: i0.Output, args: ["optionSelect"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], containerEl: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], tagEls: [{ type: i0.ViewChildren, args: ['tagEl', { ...{ read: ElementRef }, isSignal: true }] }] } });
688
-
689
- /*
690
- * Public API Surface of ui-kit/ui-input-tags
691
- */
692
-
693
- /**
694
- * Generated bundle index. Do not edit.
695
- */
696
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ElementRef, booleanAttribute, computed, contentChild, effect, forwardRef, input, isDevMode, numberAttribute, output, signal, viewChild, viewChildren } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import * as i1 from "@angular/cdk/overlay";
6
+ import { OverlayModule } from "@angular/cdk/overlay";
7
+ import { BaseFormField, createOptionResolver, dropdownOverlayPositions, formatLabel, warnMissingAccessibleName } from "@4sh/ui-kit/forms";
8
+ import { UiField } from "@4sh/ui-kit/forms/ui-field";
9
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
10
+ import { UiChip } from "@4sh/ui-kit/informative/ui-chip";
11
+ import { UiMotion } from "@4sh/ui-kit/motion";
12
+ import { closeOnNavigation } from "@4sh/ui-kit/overlay";
13
+ var UiInputTags = class UiInputTags extends BaseFormField {
14
+ constructor() {
15
+ super();
16
+ this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
17
+ this.max = input(void 0, {
18
+ ...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
19
+ transform: numberAttribute
20
+ });
21
+ this.delimiter = input(...ngDevMode ? [void 0, { debugName: "delimiter" }] : /* istanbul ignore next */ []);
22
+ this.allowDuplicate = input(false, {
23
+ ...ngDevMode ? { debugName: "allowDuplicate" } : /* istanbul ignore next */ {},
24
+ transform: booleanAttribute
25
+ });
26
+ this.addOnBlur = input(false, {
27
+ ...ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {},
28
+ transform: booleanAttribute
29
+ });
30
+ this.addOnTab = input(false, {
31
+ ...ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {},
32
+ transform: booleanAttribute
33
+ });
34
+ this.addOnPaste = input(false, {
35
+ ...ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {},
36
+ transform: booleanAttribute
37
+ });
38
+ this.maxLength = input(void 0, {
39
+ ...ngDevMode ? { debugName: "maxLength" } : /* istanbul ignore next */ {},
40
+ transform: numberAttribute
41
+ });
42
+ this.chipLevel = input("default", ...ngDevMode ? [{ debugName: "chipLevel" }] : /* istanbul ignore next */ []);
43
+ this.chipSubLevel = input("low", ...ngDevMode ? [{ debugName: "chipSubLevel" }] : /* istanbul ignore next */ []);
44
+ this.chipRounded = input(true, {
45
+ ...ngDevMode ? { debugName: "chipRounded" } : /* istanbul ignore next */ {},
46
+ transform: booleanAttribute
47
+ });
48
+ this.typeahead = input(false, {
49
+ ...ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {},
50
+ transform: booleanAttribute
51
+ });
52
+ this.suggestions = input([], ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
53
+ this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
54
+ this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
55
+ this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
56
+ this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
57
+ this.group = input(false, {
58
+ ...ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {},
59
+ transform: booleanAttribute
60
+ });
61
+ this.optionGroupLabel = input("label", ...ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []);
62
+ this.optionGroupChildren = input("items", ...ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []);
63
+ this.minLength = input(1, {
64
+ ...ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {},
65
+ transform: numberAttribute
66
+ });
67
+ this.delay = input(300, {
68
+ ...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
69
+ transform: numberAttribute
70
+ });
71
+ this.completeOnFocus = input(false, {
72
+ ...ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {},
73
+ transform: booleanAttribute
74
+ });
75
+ this.scrollHeight = input(...ngDevMode ? [void 0, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []);
76
+ this.autoOptionFocus = input(false, {
77
+ ...ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {},
78
+ transform: booleanAttribute
79
+ });
80
+ this.focusOnHover = input(true, {
81
+ ...ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {},
82
+ transform: booleanAttribute
83
+ });
84
+ this.autoFlip = input(true, {
85
+ ...ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {},
86
+ transform: booleanAttribute
87
+ });
88
+ this.panelStyleClass = input(...ngDevMode ? [void 0, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []);
89
+ this.emptyMessage = input("Aucun résultat", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
90
+ this.removeTagLabel = input("Supprimer {0}", ...ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []);
91
+ this.tagAdd = output();
92
+ this.tagRemove = output();
93
+ this.valueChange = output();
94
+ this.completeMethod = output();
95
+ this.optionSelect = output();
96
+ this.opened = output();
97
+ this.closed = output();
98
+ this.inputFocus = output();
99
+ this.inputBlur = output();
100
+ this.itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
101
+ this.optionTemplate = contentChild("option", ...ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []);
102
+ this.groupTemplate = contentChild("group", ...ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []);
103
+ this.containerEl = viewChild.required("container", ...ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []);
104
+ this.inputEl = viewChild("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
105
+ this.panelEl = viewChild("panel", ...ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []);
106
+ this.tagEls = viewChildren("tagEl", {
107
+ ...ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {},
108
+ read: ElementRef
109
+ });
110
+ this.panelOpen = signal(false, ...ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []);
111
+ this.overlayOrigin = signal(null, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
112
+ this.overlayWidth = signal(null, ...ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []);
113
+ this.inputText = signal("", ...ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []);
114
+ this.focusedTag = signal(-1, ...ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []);
115
+ this.focusedOption = signal(-1, ...ngDevMode ? [{ debugName: "focusedOption" }] : /* istanbul ignore next */ []);
116
+ this.queryDirty = false;
117
+ this.tagValues = computed(() => this.modelValue() ?? [], ...ngDevMode ? [{ debugName: "tagValues" }] : /* istanbul ignore next */ []);
118
+ this.tagRows = computed(() => this.tagValues().map((value, index) => {
119
+ const label = this.labelOfValue(value);
120
+ return {
121
+ value,
122
+ index,
123
+ label,
124
+ removeAriaLabel: formatLabel(this.removeTagLabel(), label)
125
+ };
126
+ }), ...ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []);
127
+ this.listboxId = computed(() => `${this.resolvedId()}-tags`, ...ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []);
128
+ this.panelListId = computed(() => `${this.resolvedId()}-list`, ...ngDevMode ? [{ debugName: "panelListId" }] : /* istanbul ignore next */ []);
129
+ this.iconSize = computed(() => this.size() === "small" ? "sm" : "md", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
130
+ this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []);
131
+ this.isFull = computed(() => {
132
+ const max = this.max();
133
+ return max != null && max > 0 && this.tagValues().length >= max;
134
+ }, ...ngDevMode ? [{ debugName: "isFull" }] : /* istanbul ignore next */ []);
135
+ this.canType = computed(() => !this.isDisabled() && !this.readonly() && !this.isFull(), ...ngDevMode ? [{ debugName: "canType" }] : /* istanbul ignore next */ []);
136
+ this.effectivePlaceholder = computed(() => this.hasFloatLabel() || this.tagValues().length ? "" : this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
137
+ this.isFilled = computed(() => this.tagValues().length > 0 || this.inputText() !== "", ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
138
+ this.flatEntries = computed(() => {
139
+ if (this.group()) return this.groupEntries().flatMap((g) => g.entries);
140
+ return (this.suggestions() ?? []).map((option) => this.toEntry(option));
141
+ }, ...ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []);
142
+ this.groupEntries = computed(() => {
143
+ if (!this.group()) return [];
144
+ return (this.suggestions() ?? []).map((groupOption) => {
145
+ const children = this.getField(groupOption, this.optionGroupChildren());
146
+ return {
147
+ label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? "",
148
+ original: groupOption,
149
+ entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option))
150
+ };
151
+ });
152
+ }, ...ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []);
153
+ this.visibleRows = computed(() => {
154
+ const rows = [];
155
+ let index = 0;
156
+ const pushOption = (entry) => {
157
+ const present = this.isPresent(entry.value);
158
+ rows.push({
159
+ kind: "option",
160
+ key: `${this.panelListId()}-${index}`,
161
+ id: `${this.resolvedId()}-option-${index}`,
162
+ index,
163
+ entry: {
164
+ ...entry,
165
+ disabled: entry.disabled || present && !this.allowDuplicate()
166
+ },
167
+ present
168
+ });
169
+ index++;
170
+ };
171
+ if (this.group()) this.groupEntries().forEach((g, gi) => {
172
+ if (!g.entries.length) return;
173
+ rows.push({
174
+ kind: "group",
175
+ key: `${this.panelListId()}-group-${gi}`,
176
+ label: g.label,
177
+ original: g.original
178
+ });
179
+ g.entries.forEach(pushOption);
180
+ });
181
+ else this.flatEntries().forEach(pushOption);
182
+ return rows;
183
+ }, ...ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []);
184
+ this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === "option"), ...ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []);
185
+ this.optionCount = computed(() => this.visibleOptions().length, ...ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []);
186
+ this.showEmpty = computed(() => this.panelOpen() && !this.visibleRows().length, ...ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []);
187
+ this.activeDescendant = computed(() => {
188
+ if (!this.panelOpen()) return null;
189
+ return this.visibleOptions()[this.focusedOption()]?.id ?? null;
190
+ }, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
191
+ this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
192
+ this.resolver = createOptionResolver({
193
+ optionValue: this.optionValue,
194
+ optionLabel: this.optionLabel,
195
+ optionDisabled: this.optionDisabled,
196
+ dataKey: this.dataKey
197
+ });
198
+ closeOnNavigation(() => this.close(false));
199
+ if (isDevMode()) effect(() => {
200
+ if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-input-tags", "Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.");
201
+ });
202
+ }
203
+ writeValue(value) {
204
+ this.modelValue.set(Array.isArray(value) ? value : []);
205
+ }
206
+ focus(options) {
207
+ this.inputEl()?.nativeElement.focus(options);
208
+ }
209
+ addValue(value, event) {
210
+ if (!this.canType()) return false;
211
+ if (!this.allowDuplicate() && this.isPresent(value)) return false;
212
+ this.commit([...this.tagValues(), value]);
213
+ this.tagAdd.emit({
214
+ originalEvent: event,
215
+ value
216
+ });
217
+ return true;
218
+ }
219
+ addFromInput(event) {
220
+ const parts = this.split(this.inputText()).map((p) => p.trim()).filter(Boolean);
221
+ let added = false;
222
+ for (const part of parts) {
223
+ if (this.addValue(part, event)) added = true;
224
+ if (this.isFull()) break;
225
+ }
226
+ if (added || parts.length) this.inputText.set("");
227
+ }
228
+ removeAt(index, event) {
229
+ if (this.isDisabled() || this.readonly()) return;
230
+ const tags = this.tagValues();
231
+ if (index < 0 || index >= tags.length) return;
232
+ const value = tags[index];
233
+ this.commit(tags.filter((_, i) => i !== index));
234
+ this.tagRemove.emit({
235
+ originalEvent: event,
236
+ value,
237
+ index
238
+ });
239
+ const nextCount = tags.length - 1;
240
+ if (nextCount === 0) this.focusInput();
241
+ else this.focusTag(Math.min(index, nextCount - 1));
242
+ }
243
+ commit(value) {
244
+ this.modelValue.set(value);
245
+ this.emitChange(value);
246
+ this.valueChange.emit(value);
247
+ }
248
+ onInput(event) {
249
+ const value = event.target.value;
250
+ this.inputText.set(value);
251
+ if (this.delimiter() && this.split(value).length > 1) {
252
+ this.flushDelimited(event);
253
+ return;
254
+ }
255
+ if (!this.typeahead()) return;
256
+ if (this.searchTimeout) clearTimeout(this.searchTimeout);
257
+ const query = this.inputText();
258
+ if (query.length < this.minLength()) {
259
+ this.close(false);
260
+ return;
261
+ }
262
+ this.focusedOption.set(-1);
263
+ this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
264
+ }
265
+ flushDelimited(event) {
266
+ const parts = this.split(this.inputText());
267
+ const remainder = parts.pop() ?? "";
268
+ parts.map((p) => p.trim()).filter(Boolean).forEach((p) => this.addValue(p, event));
269
+ this.inputText.set(remainder);
270
+ }
271
+ onKeydown(event) {
272
+ if (this.isDisabled() || this.readonly()) return;
273
+ const input = this.inputEl()?.nativeElement;
274
+ const atStart = !input || input.selectionStart === 0 && input.selectionEnd === 0;
275
+ switch (event.key) {
276
+ case "Enter":
277
+ event.preventDefault();
278
+ if (this.panelOpen() && this.focusedOption() !== -1) this.selectFocusedOption(event);
279
+ else this.addFromInput(event);
280
+ return;
281
+ case "Backspace":
282
+ if (this.inputText().length === 0 && this.tagValues().length) {
283
+ event.preventDefault();
284
+ this.removeAt(this.tagValues().length - 1, event);
285
+ }
286
+ return;
287
+ case "ArrowLeft":
288
+ if (atStart && this.tagValues().length) {
289
+ event.preventDefault();
290
+ this.focusTag(this.tagValues().length - 1);
291
+ }
292
+ return;
293
+ case "ArrowDown":
294
+ if (this.typeahead()) {
295
+ event.preventDefault();
296
+ this.panelOpen() ? this.moveOption(1) : this.reopen();
297
+ }
298
+ return;
299
+ case "ArrowUp":
300
+ if (this.typeahead() && this.panelOpen()) {
301
+ event.preventDefault();
302
+ this.moveOption(-1);
303
+ }
304
+ return;
305
+ case "Escape":
306
+ if (this.panelOpen()) {
307
+ event.preventDefault();
308
+ event.stopPropagation();
309
+ this.close();
310
+ }
311
+ return;
312
+ case "Tab":
313
+ if (this.addOnTab() && this.inputText().trim()) {
314
+ event.preventDefault();
315
+ this.addFromInput(event);
316
+ }
317
+ if (this.panelOpen()) this.close(false);
318
+ return;
319
+ default: return;
320
+ }
321
+ }
322
+ onPaste(event) {
323
+ if (!this.addOnPaste() || !this.canType()) return;
324
+ const text = event.clipboardData?.getData("text") ?? "";
325
+ if (!text) return;
326
+ event.preventDefault();
327
+ const parts = (this.delimiter() ? this.split(text) : text.split(/[\r\n\t,;]+/)).map((p) => p.trim()).filter(Boolean);
328
+ for (const part of parts) {
329
+ this.addValue(part, event);
330
+ if (this.isFull()) break;
331
+ }
332
+ }
333
+ onInputFocus(event) {
334
+ if (this.isDisabled()) return;
335
+ this.focusedTag.set(-1);
336
+ if (this.typeahead() && !this.queryDirty && this.completeOnFocus()) this.runSearch(event, this.inputText());
337
+ this.inputFocus.emit(event);
338
+ }
339
+ onInputBlur(event) {
340
+ const next = event.relatedTarget;
341
+ const insideComponent = this.containerEl().nativeElement.contains(next);
342
+ const insidePanel = this.panelEl()?.nativeElement.contains(next);
343
+ if (!insideComponent && !insidePanel) {
344
+ if (this.addOnBlur() && this.inputText().trim()) this.addFromInput(event);
345
+ this.emitTouch();
346
+ }
347
+ this.inputBlur.emit(event);
348
+ }
349
+ onBoxMousedown(event) {
350
+ const target = event.target;
351
+ if (target.closest("button") || target.closest(".ui-input-tags-tag") || target.closest("input")) return;
352
+ event.preventDefault();
353
+ this.focusInput();
354
+ }
355
+ onTagKeydown(event, index) {
356
+ if (this.isDisabled() || this.readonly()) return;
357
+ switch (event.key) {
358
+ case "ArrowLeft":
359
+ event.preventDefault();
360
+ if (index > 0) this.focusTag(index - 1);
361
+ return;
362
+ case "ArrowRight":
363
+ event.preventDefault();
364
+ if (index < this.tagValues().length - 1) this.focusTag(index + 1);
365
+ else this.focusInput();
366
+ return;
367
+ case "Backspace":
368
+ case "Delete":
369
+ event.preventDefault();
370
+ this.removeAt(index, event);
371
+ return;
372
+ case "Home":
373
+ event.preventDefault();
374
+ this.focusTag(0);
375
+ return;
376
+ case "End":
377
+ event.preventDefault();
378
+ this.focusTag(this.tagValues().length - 1);
379
+ return;
380
+ default: return;
381
+ }
382
+ }
383
+ focusTag(index) {
384
+ this.focusedTag.set(index);
385
+ setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
386
+ }
387
+ focusInput() {
388
+ this.focusedTag.set(-1);
389
+ this.focus();
390
+ }
391
+ runSearch(event, query) {
392
+ this.queryDirty = true;
393
+ this.completeMethod.emit({
394
+ originalEvent: event,
395
+ query
396
+ });
397
+ this.open();
398
+ }
399
+ open() {
400
+ if (!this.canType() || this.panelOpen()) return;
401
+ const origin = this.containerEl().nativeElement.querySelector(".ui-field-box") ?? this.containerEl().nativeElement;
402
+ this.overlayOrigin.set(origin);
403
+ this.overlayWidth.set(origin.getBoundingClientRect().width);
404
+ this.focusedOption.set(this.autoOptionFocus() ? this.visibleOptions().findIndex((o) => !o.entry.disabled) : -1);
405
+ this.panelOpen.set(true);
406
+ this.opened.emit();
407
+ }
408
+ close(focusInput = true) {
409
+ if (!this.panelOpen()) return;
410
+ this.panelOpen.set(false);
411
+ this.focusedOption.set(-1);
412
+ this.queryDirty = false;
413
+ this.closed.emit();
414
+ if (focusInput) this.focus();
415
+ }
416
+ reopen() {
417
+ if (!this.visibleRows().length) return;
418
+ this.open();
419
+ if (this.focusedOption() === -1) this.moveOption(1);
420
+ }
421
+ onOptionClick(row, event) {
422
+ event.preventDefault();
423
+ this.selectRow(row, event);
424
+ }
425
+ onOptionMousedown(event) {
426
+ event.preventDefault();
427
+ }
428
+ onOptionMouseEnter(row) {
429
+ if (this.focusOnHover() && !row.entry.disabled) this.focusedOption.set(row.index);
430
+ }
431
+ selectRow(row, event) {
432
+ if (row.entry.disabled) return;
433
+ if (this.addValue(row.entry.value, event)) this.optionSelect.emit({
434
+ originalEvent: event,
435
+ value: row.entry.original
436
+ });
437
+ this.inputText.set("");
438
+ this.close();
439
+ }
440
+ selectFocusedOption(event) {
441
+ const row = this.visibleOptions()[this.focusedOption()];
442
+ if (row) this.selectRow(row, event);
443
+ else this.addFromInput(event);
444
+ }
445
+ moveOption(delta) {
446
+ const options = this.visibleOptions();
447
+ if (!options.length) return;
448
+ let i = this.focusedOption();
449
+ if (i === -1) i = delta === 1 ? -1 : options.length;
450
+ for (i += delta; i >= 0 && i < options.length; i += delta) if (!options[i].entry.disabled) {
451
+ this.focusedOption.set(i);
452
+ this.scrollOptionIntoView(options[i].id);
453
+ return;
454
+ }
455
+ }
456
+ scrollOptionIntoView(id) {
457
+ this.panelEl()?.nativeElement.querySelector(`[id="${id}"]`)?.scrollIntoView({ block: "nearest" });
458
+ }
459
+ labelOfValue(value) {
460
+ if (value === null || value === void 0) return "";
461
+ const entry = this.flatEntries().find((e) => this.equals(e.value, value));
462
+ if (entry) return entry.label;
463
+ return this.resolveLabel(value) ?? this.asText(value) ?? "";
464
+ }
465
+ toEntry(option) {
466
+ return this.resolver.toEntry(option);
467
+ }
468
+ getField(target, path) {
469
+ return this.resolver.getField(target, path);
470
+ }
471
+ resolveValue(option) {
472
+ return this.resolver.resolveValue(option);
473
+ }
474
+ resolveLabel(option) {
475
+ return this.resolver.resolveLabel(option);
476
+ }
477
+ asText(value) {
478
+ return this.resolver.asText(value);
479
+ }
480
+ isPresent(value) {
481
+ return this.tagValues().some((v) => this.equals(v, value));
482
+ }
483
+ equals(a, b) {
484
+ return this.resolver.equals(a, b);
485
+ }
486
+ split(text) {
487
+ const d = this.delimiter();
488
+ if (!d) return [text];
489
+ return text.split(d);
490
+ }
491
+ static {
492
+ this.ɵfac = i0.ɵɵngDeclareFactory({
493
+ minVersion: "12.0.0",
494
+ version: "22.3.0",
495
+ ngImport: i0,
496
+ type: UiInputTags,
497
+ deps: [],
498
+ target: i0.ɵɵFactoryTarget.Component
499
+ });
500
+ }
501
+ static {
502
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
503
+ minVersion: "17.0.0",
504
+ version: "22.3.0",
505
+ type: UiInputTags,
506
+ isStandalone: true,
507
+ selector: "ui-input-tags",
508
+ inputs: {
509
+ placeholder: {
510
+ classPropertyName: "placeholder",
511
+ publicName: "placeholder",
512
+ isSignal: true,
513
+ isRequired: false,
514
+ transformFunction: null
515
+ },
516
+ max: {
517
+ classPropertyName: "max",
518
+ publicName: "max",
519
+ isSignal: true,
520
+ isRequired: false,
521
+ transformFunction: null
522
+ },
523
+ delimiter: {
524
+ classPropertyName: "delimiter",
525
+ publicName: "delimiter",
526
+ isSignal: true,
527
+ isRequired: false,
528
+ transformFunction: null
529
+ },
530
+ allowDuplicate: {
531
+ classPropertyName: "allowDuplicate",
532
+ publicName: "allowDuplicate",
533
+ isSignal: true,
534
+ isRequired: false,
535
+ transformFunction: null
536
+ },
537
+ addOnBlur: {
538
+ classPropertyName: "addOnBlur",
539
+ publicName: "addOnBlur",
540
+ isSignal: true,
541
+ isRequired: false,
542
+ transformFunction: null
543
+ },
544
+ addOnTab: {
545
+ classPropertyName: "addOnTab",
546
+ publicName: "addOnTab",
547
+ isSignal: true,
548
+ isRequired: false,
549
+ transformFunction: null
550
+ },
551
+ addOnPaste: {
552
+ classPropertyName: "addOnPaste",
553
+ publicName: "addOnPaste",
554
+ isSignal: true,
555
+ isRequired: false,
556
+ transformFunction: null
557
+ },
558
+ maxLength: {
559
+ classPropertyName: "maxLength",
560
+ publicName: "maxLength",
561
+ isSignal: true,
562
+ isRequired: false,
563
+ transformFunction: null
564
+ },
565
+ chipLevel: {
566
+ classPropertyName: "chipLevel",
567
+ publicName: "chipLevel",
568
+ isSignal: true,
569
+ isRequired: false,
570
+ transformFunction: null
571
+ },
572
+ chipSubLevel: {
573
+ classPropertyName: "chipSubLevel",
574
+ publicName: "chipSubLevel",
575
+ isSignal: true,
576
+ isRequired: false,
577
+ transformFunction: null
578
+ },
579
+ chipRounded: {
580
+ classPropertyName: "chipRounded",
581
+ publicName: "chipRounded",
582
+ isSignal: true,
583
+ isRequired: false,
584
+ transformFunction: null
585
+ },
586
+ typeahead: {
587
+ classPropertyName: "typeahead",
588
+ publicName: "typeahead",
589
+ isSignal: true,
590
+ isRequired: false,
591
+ transformFunction: null
592
+ },
593
+ suggestions: {
594
+ classPropertyName: "suggestions",
595
+ publicName: "suggestions",
596
+ isSignal: true,
597
+ isRequired: false,
598
+ transformFunction: null
599
+ },
600
+ optionLabel: {
601
+ classPropertyName: "optionLabel",
602
+ publicName: "optionLabel",
603
+ isSignal: true,
604
+ isRequired: false,
605
+ transformFunction: null
606
+ },
607
+ optionValue: {
608
+ classPropertyName: "optionValue",
609
+ publicName: "optionValue",
610
+ isSignal: true,
611
+ isRequired: false,
612
+ transformFunction: null
613
+ },
614
+ optionDisabled: {
615
+ classPropertyName: "optionDisabled",
616
+ publicName: "optionDisabled",
617
+ isSignal: true,
618
+ isRequired: false,
619
+ transformFunction: null
620
+ },
621
+ dataKey: {
622
+ classPropertyName: "dataKey",
623
+ publicName: "dataKey",
624
+ isSignal: true,
625
+ isRequired: false,
626
+ transformFunction: null
627
+ },
628
+ group: {
629
+ classPropertyName: "group",
630
+ publicName: "group",
631
+ isSignal: true,
632
+ isRequired: false,
633
+ transformFunction: null
634
+ },
635
+ optionGroupLabel: {
636
+ classPropertyName: "optionGroupLabel",
637
+ publicName: "optionGroupLabel",
638
+ isSignal: true,
639
+ isRequired: false,
640
+ transformFunction: null
641
+ },
642
+ optionGroupChildren: {
643
+ classPropertyName: "optionGroupChildren",
644
+ publicName: "optionGroupChildren",
645
+ isSignal: true,
646
+ isRequired: false,
647
+ transformFunction: null
648
+ },
649
+ minLength: {
650
+ classPropertyName: "minLength",
651
+ publicName: "minLength",
652
+ isSignal: true,
653
+ isRequired: false,
654
+ transformFunction: null
655
+ },
656
+ delay: {
657
+ classPropertyName: "delay",
658
+ publicName: "delay",
659
+ isSignal: true,
660
+ isRequired: false,
661
+ transformFunction: null
662
+ },
663
+ completeOnFocus: {
664
+ classPropertyName: "completeOnFocus",
665
+ publicName: "completeOnFocus",
666
+ isSignal: true,
667
+ isRequired: false,
668
+ transformFunction: null
669
+ },
670
+ scrollHeight: {
671
+ classPropertyName: "scrollHeight",
672
+ publicName: "scrollHeight",
673
+ isSignal: true,
674
+ isRequired: false,
675
+ transformFunction: null
676
+ },
677
+ autoOptionFocus: {
678
+ classPropertyName: "autoOptionFocus",
679
+ publicName: "autoOptionFocus",
680
+ isSignal: true,
681
+ isRequired: false,
682
+ transformFunction: null
683
+ },
684
+ focusOnHover: {
685
+ classPropertyName: "focusOnHover",
686
+ publicName: "focusOnHover",
687
+ isSignal: true,
688
+ isRequired: false,
689
+ transformFunction: null
690
+ },
691
+ autoFlip: {
692
+ classPropertyName: "autoFlip",
693
+ publicName: "autoFlip",
694
+ isSignal: true,
695
+ isRequired: false,
696
+ transformFunction: null
697
+ },
698
+ panelStyleClass: {
699
+ classPropertyName: "panelStyleClass",
700
+ publicName: "panelStyleClass",
701
+ isSignal: true,
702
+ isRequired: false,
703
+ transformFunction: null
704
+ },
705
+ emptyMessage: {
706
+ classPropertyName: "emptyMessage",
707
+ publicName: "emptyMessage",
708
+ isSignal: true,
709
+ isRequired: false,
710
+ transformFunction: null
711
+ },
712
+ removeTagLabel: {
713
+ classPropertyName: "removeTagLabel",
714
+ publicName: "removeTagLabel",
715
+ isSignal: true,
716
+ isRequired: false,
717
+ transformFunction: null
718
+ }
719
+ },
720
+ outputs: {
721
+ tagAdd: "tagAdd",
722
+ tagRemove: "tagRemove",
723
+ valueChange: "valueChange",
724
+ completeMethod: "completeMethod",
725
+ optionSelect: "optionSelect",
726
+ opened: "opened",
727
+ closed: "closed",
728
+ inputFocus: "inputFocus",
729
+ inputBlur: "inputBlur"
730
+ },
731
+ providers: [{
732
+ provide: NG_VALUE_ACCESSOR,
733
+ useExisting: forwardRef(() => UiInputTags),
734
+ multi: true
735
+ }],
736
+ queries: [
737
+ {
738
+ propertyName: "itemTemplate",
739
+ first: true,
740
+ predicate: ["item"],
741
+ descendants: true,
742
+ isSignal: true
743
+ },
744
+ {
745
+ propertyName: "optionTemplate",
746
+ first: true,
747
+ predicate: ["option"],
748
+ descendants: true,
749
+ isSignal: true
750
+ },
751
+ {
752
+ propertyName: "groupTemplate",
753
+ first: true,
754
+ predicate: ["group"],
755
+ descendants: true,
756
+ isSignal: true
757
+ }
758
+ ],
759
+ viewQueries: [
760
+ {
761
+ propertyName: "containerEl",
762
+ first: true,
763
+ predicate: ["container"],
764
+ descendants: true,
765
+ isSignal: true
766
+ },
767
+ {
768
+ propertyName: "inputEl",
769
+ first: true,
770
+ predicate: ["inputEl"],
771
+ descendants: true,
772
+ isSignal: true
773
+ },
774
+ {
775
+ propertyName: "panelEl",
776
+ first: true,
777
+ predicate: ["panel"],
778
+ descendants: true,
779
+ isSignal: true
780
+ },
781
+ {
782
+ propertyName: "tagEls",
783
+ predicate: ["tagEl"],
784
+ descendants: true,
785
+ read: ElementRef,
786
+ isSignal: true
787
+ }
788
+ ],
789
+ usesInheritance: true,
790
+ ngImport: i0,
791
+ template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n",
792
+ styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-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-input-tags-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;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"],
793
+ dependencies: [
794
+ {
795
+ kind: "directive",
796
+ type: NgTemplateOutlet,
797
+ selector: "[ngTemplateOutlet]",
798
+ inputs: [
799
+ "ngTemplateOutletContext",
800
+ "ngTemplateOutlet",
801
+ "ngTemplateOutletInjector"
802
+ ]
803
+ },
804
+ {
805
+ kind: "ngmodule",
806
+ type: OverlayModule
807
+ },
808
+ {
809
+ kind: "directive",
810
+ type: i1.CdkConnectedOverlay,
811
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
812
+ inputs: [
813
+ "cdkConnectedOverlayOrigin",
814
+ "cdkConnectedOverlayPositions",
815
+ "cdkConnectedOverlayPositionStrategy",
816
+ "cdkConnectedOverlayOffsetX",
817
+ "cdkConnectedOverlayOffsetY",
818
+ "cdkConnectedOverlayWidth",
819
+ "cdkConnectedOverlayHeight",
820
+ "cdkConnectedOverlayMinWidth",
821
+ "cdkConnectedOverlayMinHeight",
822
+ "cdkConnectedOverlayBackdropClass",
823
+ "cdkConnectedOverlayPanelClass",
824
+ "cdkConnectedOverlayViewportMargin",
825
+ "cdkConnectedOverlayScrollStrategy",
826
+ "cdkConnectedOverlayOpen",
827
+ "cdkConnectedOverlayDisableClose",
828
+ "cdkConnectedOverlayTransformOriginOn",
829
+ "cdkConnectedOverlayHasBackdrop",
830
+ "cdkConnectedOverlayLockPosition",
831
+ "cdkConnectedOverlayFlexibleDimensions",
832
+ "cdkConnectedOverlayGrowAfterOpen",
833
+ "cdkConnectedOverlayPush",
834
+ "cdkConnectedOverlayDisposeOnNavigation",
835
+ "cdkConnectedOverlayUsePopover",
836
+ "cdkConnectedOverlayMatchWidth",
837
+ "cdkConnectedOverlay"
838
+ ],
839
+ outputs: [
840
+ "backdropClick",
841
+ "positionChange",
842
+ "attach",
843
+ "detach",
844
+ "overlayKeydown",
845
+ "overlayOutsideClick"
846
+ ],
847
+ exportAs: ["cdkConnectedOverlay"]
848
+ },
849
+ {
850
+ kind: "component",
851
+ type: UiField,
852
+ selector: "ui-field",
853
+ inputs: [
854
+ "label",
855
+ "for",
856
+ "required",
857
+ "size",
858
+ "level",
859
+ "floatLabel",
860
+ "filled",
861
+ "disabled",
862
+ "readonly",
863
+ "multiline",
864
+ "autoHeight",
865
+ "message",
866
+ "messageId",
867
+ "showMessageIcon",
868
+ "messageIcon",
869
+ "hasFooter",
870
+ "hasPrefix"
871
+ ]
872
+ },
873
+ {
874
+ kind: "component",
875
+ type: UiIcon,
876
+ selector: "ui-icon",
877
+ inputs: [
878
+ "name",
879
+ "size",
880
+ "type",
881
+ "family",
882
+ "decorative",
883
+ "ariaLabel"
884
+ ]
885
+ },
886
+ {
887
+ kind: "component",
888
+ type: UiChip,
889
+ selector: "ui-chip",
890
+ inputs: [
891
+ "label",
892
+ "level",
893
+ "subLevel",
894
+ "size",
895
+ "icon",
896
+ "image",
897
+ "alt",
898
+ "rounded",
899
+ "removable",
900
+ "removeIcon",
901
+ "disabled",
902
+ "selectable",
903
+ "selected",
904
+ "selectedIcon",
905
+ "ariaLabel",
906
+ "ariaLabelledBy",
907
+ "removeAriaLabel",
908
+ "removeTabindex"
909
+ ],
910
+ outputs: [
911
+ "selectedChange",
912
+ "remove",
913
+ "chipClick",
914
+ "imageError"
915
+ ]
916
+ },
917
+ {
918
+ kind: "directive",
919
+ type: UiMotion,
920
+ selector: "[uiMotion]",
921
+ inputs: [
922
+ "uiMotion",
923
+ "motionDuration",
924
+ "motionDelay",
925
+ "motionEasing",
926
+ "motionEnterEasing",
927
+ "motionLeaveEasing",
928
+ "motionDistance",
929
+ "motionScale",
930
+ "motionDisabled",
931
+ "motionOnInsert"
932
+ ],
933
+ exportAs: ["uiMotion"]
934
+ }
935
+ ]
936
+ });
937
+ }
938
+ };
939
+ i0.ɵɵngDeclareClassMetadata({
940
+ minVersion: "12.0.0",
941
+ version: "22.3.0",
942
+ ngImport: i0,
943
+ type: UiInputTags,
944
+ decorators: [{
945
+ type: Component,
946
+ args: [{
947
+ selector: "ui-input-tags",
948
+ imports: [
949
+ NgTemplateOutlet,
950
+ OverlayModule,
951
+ UiField,
952
+ UiIcon,
953
+ UiChip,
954
+ UiMotion
955
+ ],
956
+ providers: [{
957
+ provide: NG_VALUE_ACCESSOR,
958
+ useExisting: forwardRef(() => UiInputTags),
959
+ multi: true
960
+ }],
961
+ template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\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 (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\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}\n",
962
+ styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-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-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-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-input-tags-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;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-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-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"]
963
+ }]
964
+ }],
965
+ ctorParameters: () => [],
966
+ propDecorators: {
967
+ placeholder: [{
968
+ type: i0.Input,
969
+ args: [{
970
+ isSignal: true,
971
+ alias: "placeholder",
972
+ required: false
973
+ }]
974
+ }],
975
+ max: [{
976
+ type: i0.Input,
977
+ args: [{
978
+ isSignal: true,
979
+ alias: "max",
980
+ required: false
981
+ }]
982
+ }],
983
+ delimiter: [{
984
+ type: i0.Input,
985
+ args: [{
986
+ isSignal: true,
987
+ alias: "delimiter",
988
+ required: false
989
+ }]
990
+ }],
991
+ allowDuplicate: [{
992
+ type: i0.Input,
993
+ args: [{
994
+ isSignal: true,
995
+ alias: "allowDuplicate",
996
+ required: false
997
+ }]
998
+ }],
999
+ addOnBlur: [{
1000
+ type: i0.Input,
1001
+ args: [{
1002
+ isSignal: true,
1003
+ alias: "addOnBlur",
1004
+ required: false
1005
+ }]
1006
+ }],
1007
+ addOnTab: [{
1008
+ type: i0.Input,
1009
+ args: [{
1010
+ isSignal: true,
1011
+ alias: "addOnTab",
1012
+ required: false
1013
+ }]
1014
+ }],
1015
+ addOnPaste: [{
1016
+ type: i0.Input,
1017
+ args: [{
1018
+ isSignal: true,
1019
+ alias: "addOnPaste",
1020
+ required: false
1021
+ }]
1022
+ }],
1023
+ maxLength: [{
1024
+ type: i0.Input,
1025
+ args: [{
1026
+ isSignal: true,
1027
+ alias: "maxLength",
1028
+ required: false
1029
+ }]
1030
+ }],
1031
+ chipLevel: [{
1032
+ type: i0.Input,
1033
+ args: [{
1034
+ isSignal: true,
1035
+ alias: "chipLevel",
1036
+ required: false
1037
+ }]
1038
+ }],
1039
+ chipSubLevel: [{
1040
+ type: i0.Input,
1041
+ args: [{
1042
+ isSignal: true,
1043
+ alias: "chipSubLevel",
1044
+ required: false
1045
+ }]
1046
+ }],
1047
+ chipRounded: [{
1048
+ type: i0.Input,
1049
+ args: [{
1050
+ isSignal: true,
1051
+ alias: "chipRounded",
1052
+ required: false
1053
+ }]
1054
+ }],
1055
+ typeahead: [{
1056
+ type: i0.Input,
1057
+ args: [{
1058
+ isSignal: true,
1059
+ alias: "typeahead",
1060
+ required: false
1061
+ }]
1062
+ }],
1063
+ suggestions: [{
1064
+ type: i0.Input,
1065
+ args: [{
1066
+ isSignal: true,
1067
+ alias: "suggestions",
1068
+ required: false
1069
+ }]
1070
+ }],
1071
+ optionLabel: [{
1072
+ type: i0.Input,
1073
+ args: [{
1074
+ isSignal: true,
1075
+ alias: "optionLabel",
1076
+ required: false
1077
+ }]
1078
+ }],
1079
+ optionValue: [{
1080
+ type: i0.Input,
1081
+ args: [{
1082
+ isSignal: true,
1083
+ alias: "optionValue",
1084
+ required: false
1085
+ }]
1086
+ }],
1087
+ optionDisabled: [{
1088
+ type: i0.Input,
1089
+ args: [{
1090
+ isSignal: true,
1091
+ alias: "optionDisabled",
1092
+ required: false
1093
+ }]
1094
+ }],
1095
+ dataKey: [{
1096
+ type: i0.Input,
1097
+ args: [{
1098
+ isSignal: true,
1099
+ alias: "dataKey",
1100
+ required: false
1101
+ }]
1102
+ }],
1103
+ group: [{
1104
+ type: i0.Input,
1105
+ args: [{
1106
+ isSignal: true,
1107
+ alias: "group",
1108
+ required: false
1109
+ }]
1110
+ }],
1111
+ optionGroupLabel: [{
1112
+ type: i0.Input,
1113
+ args: [{
1114
+ isSignal: true,
1115
+ alias: "optionGroupLabel",
1116
+ required: false
1117
+ }]
1118
+ }],
1119
+ optionGroupChildren: [{
1120
+ type: i0.Input,
1121
+ args: [{
1122
+ isSignal: true,
1123
+ alias: "optionGroupChildren",
1124
+ required: false
1125
+ }]
1126
+ }],
1127
+ minLength: [{
1128
+ type: i0.Input,
1129
+ args: [{
1130
+ isSignal: true,
1131
+ alias: "minLength",
1132
+ required: false
1133
+ }]
1134
+ }],
1135
+ delay: [{
1136
+ type: i0.Input,
1137
+ args: [{
1138
+ isSignal: true,
1139
+ alias: "delay",
1140
+ required: false
1141
+ }]
1142
+ }],
1143
+ completeOnFocus: [{
1144
+ type: i0.Input,
1145
+ args: [{
1146
+ isSignal: true,
1147
+ alias: "completeOnFocus",
1148
+ required: false
1149
+ }]
1150
+ }],
1151
+ scrollHeight: [{
1152
+ type: i0.Input,
1153
+ args: [{
1154
+ isSignal: true,
1155
+ alias: "scrollHeight",
1156
+ required: false
1157
+ }]
1158
+ }],
1159
+ autoOptionFocus: [{
1160
+ type: i0.Input,
1161
+ args: [{
1162
+ isSignal: true,
1163
+ alias: "autoOptionFocus",
1164
+ required: false
1165
+ }]
1166
+ }],
1167
+ focusOnHover: [{
1168
+ type: i0.Input,
1169
+ args: [{
1170
+ isSignal: true,
1171
+ alias: "focusOnHover",
1172
+ required: false
1173
+ }]
1174
+ }],
1175
+ autoFlip: [{
1176
+ type: i0.Input,
1177
+ args: [{
1178
+ isSignal: true,
1179
+ alias: "autoFlip",
1180
+ required: false
1181
+ }]
1182
+ }],
1183
+ panelStyleClass: [{
1184
+ type: i0.Input,
1185
+ args: [{
1186
+ isSignal: true,
1187
+ alias: "panelStyleClass",
1188
+ required: false
1189
+ }]
1190
+ }],
1191
+ emptyMessage: [{
1192
+ type: i0.Input,
1193
+ args: [{
1194
+ isSignal: true,
1195
+ alias: "emptyMessage",
1196
+ required: false
1197
+ }]
1198
+ }],
1199
+ removeTagLabel: [{
1200
+ type: i0.Input,
1201
+ args: [{
1202
+ isSignal: true,
1203
+ alias: "removeTagLabel",
1204
+ required: false
1205
+ }]
1206
+ }],
1207
+ tagAdd: [{
1208
+ type: i0.Output,
1209
+ args: ["tagAdd"]
1210
+ }],
1211
+ tagRemove: [{
1212
+ type: i0.Output,
1213
+ args: ["tagRemove"]
1214
+ }],
1215
+ valueChange: [{
1216
+ type: i0.Output,
1217
+ args: ["valueChange"]
1218
+ }],
1219
+ completeMethod: [{
1220
+ type: i0.Output,
1221
+ args: ["completeMethod"]
1222
+ }],
1223
+ optionSelect: [{
1224
+ type: i0.Output,
1225
+ args: ["optionSelect"]
1226
+ }],
1227
+ opened: [{
1228
+ type: i0.Output,
1229
+ args: ["opened"]
1230
+ }],
1231
+ closed: [{
1232
+ type: i0.Output,
1233
+ args: ["closed"]
1234
+ }],
1235
+ inputFocus: [{
1236
+ type: i0.Output,
1237
+ args: ["inputFocus"]
1238
+ }],
1239
+ inputBlur: [{
1240
+ type: i0.Output,
1241
+ args: ["inputBlur"]
1242
+ }],
1243
+ itemTemplate: [{
1244
+ type: i0.ContentChild,
1245
+ args: ["item", { isSignal: true }]
1246
+ }],
1247
+ optionTemplate: [{
1248
+ type: i0.ContentChild,
1249
+ args: ["option", { isSignal: true }]
1250
+ }],
1251
+ groupTemplate: [{
1252
+ type: i0.ContentChild,
1253
+ args: ["group", { isSignal: true }]
1254
+ }],
1255
+ containerEl: [{
1256
+ type: i0.ViewChild,
1257
+ args: ["container", { isSignal: true }]
1258
+ }],
1259
+ inputEl: [{
1260
+ type: i0.ViewChild,
1261
+ args: ["inputEl", { isSignal: true }]
1262
+ }],
1263
+ panelEl: [{
1264
+ type: i0.ViewChild,
1265
+ args: ["panel", { isSignal: true }]
1266
+ }],
1267
+ tagEls: [{
1268
+ type: i0.ViewChildren,
1269
+ args: ["tagEl", {
1270
+ read: ElementRef,
1271
+ isSignal: true
1272
+ }]
1273
+ }]
1274
+ }
1275
+ });
697
1276
  export { UiInputTags };
698
- //# sourceMappingURL=4sh-ui-kit-forms-ui-input-tags.mjs.map
1277
+
1278
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-input-tags.mjs.map