@testgorilla/tgo-ui 11.22.3 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +335 -229
  2. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +547 -465
  4. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
  5. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +160 -75
  6. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  7. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +678 -278
  8. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  9. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +337 -274
  10. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +351 -192
  12. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  13. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1950 -960
  14. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
  15. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1206 -1044
  16. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +328 -182
  18. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  19. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +383 -203
  20. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +553 -261
  22. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +709 -739
  24. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  25. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +219 -184
  26. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +515 -458
  28. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +423 -162
  30. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +10784 -10996
  32. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +810 -533
  34. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +473 -116
  36. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +1149 -540
  38. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +148 -84
  40. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +239 -142
  42. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +599 -467
  44. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +126 -70
  46. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +324 -329
  48. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +969 -648
  50. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +553 -419
  52. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +847 -452
  54. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +398 -302
  56. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +162 -95
  58. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1825 -1795
  60. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  61. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +1018 -672
  62. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +758 -368
  64. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  65. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +204 -212
  66. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  67. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +183 -48
  68. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  69. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +243 -79
  70. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +751 -361
  72. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  73. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +1122 -385
  74. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +689 -413
  76. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +227 -92
  78. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +174 -113
  80. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +367 -165
  82. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +253 -118
  84. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +730 -444
  86. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +533 -221
  88. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +274 -76
  90. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +184 -124
  92. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1223 -574
  94. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +249 -160
  96. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  97. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +447 -439
  98. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  99. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +226 -150
  100. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  101. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +255 -67
  102. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  103. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +205 -162
  104. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  105. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +245 -153
  106. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +274 -140
  108. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +319 -147
  110. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +286 -84
  112. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +660 -208
  114. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +579 -320
  116. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +419 -200
  118. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +132 -80
  120. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  121. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +741 -390
  122. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
  123. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +455 -329
  124. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  125. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +543 -514
  126. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  127. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +193 -104
  128. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  129. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +760 -524
  130. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  131. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +714 -415
  132. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  133. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +847 -438
  134. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  135. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +535 -275
  136. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  137. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +316 -246
  138. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  139. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +404 -284
  140. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  141. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +664 -383
  142. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  143. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +201 -112
  144. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  145. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1014 -458
  146. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
  147. package/fesm2022/testgorilla-tgo-ui.mjs +147 -155
  148. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  149. package/mcp/catalog.json +1 -1
  150. package/package.json +16 -17
  151. package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
  152. package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
  153. package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
  154. package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
  155. package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
  156. package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
  157. package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
  158. package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
  159. package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
  160. package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
  161. package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
  162. package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
  163. package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
  164. package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
  165. package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
  166. package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
  167. package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
  168. package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
  169. package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
  170. package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
  171. package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
  172. package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
  173. package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
  174. package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
  175. package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
  176. package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
  177. package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
  178. package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
  179. package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
  180. package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
  181. package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
  182. package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
  183. package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
  184. package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
  185. package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
  186. package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
  187. package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
  188. package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
  189. package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
  190. package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
  191. package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
  192. package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
  193. package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
  194. package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
  195. package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
  196. package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
  197. package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
  198. package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
  199. package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
  200. package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
  201. package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
  202. package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
  203. package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
  204. package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
  205. package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
  206. package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
  207. package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
  208. package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
  209. package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
  210. package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
  211. package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
  212. package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
  213. package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
  214. package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
  215. package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
  216. package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
  217. package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
  218. package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
  219. package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
  220. package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
  221. package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
  222. package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
  223. package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
  224. package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
  225. package/types/testgorilla-tgo-ui.d.ts +52 -45
@@ -1,1054 +1,1216 @@
1
- import { FocusMonitor } from '@angular/cdk/a11y';
2
- import * as i9 from '@angular/cdk/scrolling';
3
- import { CdkVirtualScrollViewport, CdkVirtualForOf, CdkFixedSizeVirtualScroll } from '@angular/cdk/scrolling';
4
- import * as i1 from '@angular/common';
5
- import { isPlatformBrowser, CommonModule } from '@angular/common';
6
- import * as i0 from '@angular/core';
7
- import { HostListener, Input, Directive, Pipe, EventEmitter, inject, ChangeDetectorRef, PLATFORM_ID, ElementRef, DestroyRef, NgZone, signal, booleanAttribute, ViewChild, Output, HostBinding, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
8
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
- import * as i5 from '@angular/forms';
10
- import { NgControl, FormsModule } from '@angular/forms';
11
- import { take, map, filter, throttleTime, BehaviorSubject, ReplaySubject, startWith } from 'rxjs';
12
- import * as i13 from '@testgorilla/tgo-ui/components/core';
13
- import { AutocompleteUtils, IKeyboardEvent, UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';
14
- import * as i2 from '@angular/material/form-field';
15
- import { MatFormFieldModule } from '@angular/material/form-field';
16
- import * as i3 from '@angular/material/autocomplete';
17
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
18
- import * as i4 from '@angular/material/input';
19
- import { MatInputModule } from '@angular/material/input';
20
- import * as i6 from '@testgorilla/tgo-ui/components/tag';
21
- import { TagComponentModule } from '@testgorilla/tgo-ui/components/tag';
22
- import * as i7 from '@testgorilla/tgo-ui/components/icon';
23
- import { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';
24
- import * as i8 from '@testgorilla/tgo-ui/components/validation-error';
25
- import { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';
26
- import * as i11 from '@testgorilla/tgo-ui/components/spinner';
27
- import { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';
28
- import { MatChipsModule } from '@angular/material/chips';
29
-
1
+ import { FocusMonitor } from "@angular/cdk/a11y";
2
+ import * as i9 from "@angular/cdk/scrolling";
3
+ import { CdkFixedSizeVirtualScroll, CdkVirtualForOf, CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
4
+ import * as i1 from "@angular/common";
5
+ import { CommonModule, isPlatformBrowser } from "@angular/common";
6
+ import * as i0 from "@angular/core";
7
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, NgModule, NgZone, Output, PLATFORM_ID, Pipe, ViewChild, booleanAttribute, inject, signal } from "@angular/core";
8
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
9
+ import * as i5 from "@angular/forms";
10
+ import { FormsModule, NgControl } from "@angular/forms";
11
+ import { BehaviorSubject, ReplaySubject, filter, map, startWith, take, throttleTime } from "rxjs";
12
+ import * as i13 from "@testgorilla/tgo-ui/components/core";
13
+ import { AutocompleteUtils, HasValidationErrorPipe, IKeyboardEvent, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
14
+ import * as i2 from "@angular/material/form-field";
15
+ import { MatFormFieldModule } from "@angular/material/form-field";
16
+ import * as i3 from "@angular/material/autocomplete";
17
+ import { MatAutocompleteModule } from "@angular/material/autocomplete";
18
+ import * as i4 from "@angular/material/input";
19
+ import { MatInputModule } from "@angular/material/input";
20
+ import * as i6 from "@testgorilla/tgo-ui/components/tag";
21
+ import { TagComponentModule } from "@testgorilla/tgo-ui/components/tag";
22
+ import * as i7 from "@testgorilla/tgo-ui/components/icon";
23
+ import { IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
24
+ import * as i8 from "@testgorilla/tgo-ui/components/validation-error";
25
+ import { ValidationErrorModule } from "@testgorilla/tgo-ui/components/validation-error";
26
+ import * as i11 from "@testgorilla/tgo-ui/components/spinner";
27
+ import { SpinnerComponentModule } from "@testgorilla/tgo-ui/components/spinner";
28
+ import { MatChipsModule } from "@angular/material/chips";
30
29
  var Autocomplete;
31
- (function (Autocomplete) {
32
- Autocomplete["SINGLE"] = "single";
33
- Autocomplete["MULTI"] = "multi";
34
- Autocomplete["LARGE"] = "large";
30
+ (function(Autocomplete) {
31
+ Autocomplete["SINGLE"] = "single";
32
+ Autocomplete["MULTI"] = "multi";
33
+ Autocomplete["LARGE"] = "large";
35
34
  })(Autocomplete || (Autocomplete = {}));
36
35
  var Padding;
37
- (function (Padding) {
38
- Padding[Padding["AUTOCOMPLETE_CONTAINER"] = 40] = "AUTOCOMPLETE_CONTAINER";
39
- Padding[Padding["DROPDOWN_CONTAINER"] = 60] = "DROPDOWN_CONTAINER";
40
- Padding[Padding["AUTOCOMPLETE_SPACE_CONTAINER"] = 65] = "AUTOCOMPLETE_SPACE_CONTAINER";
41
- Padding[Padding["DROPDOWN_SPACE_CONTAINER"] = 85] = "DROPDOWN_SPACE_CONTAINER";
36
+ (function(Padding) {
37
+ Padding[Padding["AUTOCOMPLETE_CONTAINER"] = 40] = "AUTOCOMPLETE_CONTAINER";
38
+ Padding[Padding["DROPDOWN_CONTAINER"] = 60] = "DROPDOWN_CONTAINER";
39
+ Padding[Padding["AUTOCOMPLETE_SPACE_CONTAINER"] = 65] = "AUTOCOMPLETE_SPACE_CONTAINER";
40
+ Padding[Padding["DROPDOWN_SPACE_CONTAINER"] = 85] = "DROPDOWN_SPACE_CONTAINER";
42
41
  })(Padding || (Padding = {}));
43
42
  const AMOUNT_TAG_WIDTH = 33;
44
43
  var Timeout;
45
- (function (Timeout) {
46
- Timeout[Timeout["VIEW_INITIALIZED_AFTER_ACTION"] = 150] = "VIEW_INITIALIZED_AFTER_ACTION";
47
- Timeout[Timeout["VIEW_INITIALIZED_COMPONENT_LOAD"] = 600] = "VIEW_INITIALIZED_COMPONENT_LOAD";
44
+ (function(Timeout) {
45
+ Timeout[Timeout["VIEW_INITIALIZED_AFTER_ACTION"] = 150] = "VIEW_INITIALIZED_AFTER_ACTION";
46
+ Timeout[Timeout["VIEW_INITIALIZED_COMPONENT_LOAD"] = 600] = "VIEW_INITIALIZED_COMPONENT_LOAD";
48
47
  })(Timeout || (Timeout = {}));
49
48
  var DropdownVariation;
50
- (function (DropdownVariation) {
51
- DropdownVariation["AUTOCOMPLETE"] = "autocomplete";
52
- DropdownVariation["DROPDOWN"] = "dropdown";
49
+ (function(DropdownVariation) {
50
+ DropdownVariation["AUTOCOMPLETE"] = "autocomplete";
51
+ DropdownVariation["DROPDOWN"] = "dropdown";
53
52
  })(DropdownVariation || (DropdownVariation = {}));
54
-
55
- class PreventInputDirective {
56
- onKeyDown(event) {
57
- const allowedKeys = [
58
- 'ArrowLeft',
59
- 'ArrowRight',
60
- 'ArrowUp',
61
- 'ArrowDown',
62
- 'Backspace',
63
- 'Tab',
64
- 'Delete',
65
- 'Control',
66
- 'Shift',
67
- 'Alt',
68
- ];
69
- if (!allowedKeys.includes(event.key) && !event.ctrlKey && !event.metaKey && this.uiPreventInput) {
70
- event.preventDefault();
71
- }
72
- }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PreventInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PreventInputDirective, isStandalone: true, selector: "[uiPreventInput]", inputs: { uiPreventInput: "uiPreventInput" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PreventInputDirective, decorators: [{
77
- type: Directive,
78
- args: [{
79
- selector: '[uiPreventInput]',
80
- standalone: true,
81
- }]
82
- }], propDecorators: { uiPreventInput: [{
83
- type: Input
84
- }], onKeyDown: [{
85
- type: HostListener,
86
- args: ['keydown', ['$event']]
87
- }] } });
88
-
89
- /**
90
- * the SelectTextDirective provides a dynamic way to highlight or style specific text within an element.
91
- */
92
- class SelectTextDirective {
93
- constructor(el) {
94
- this.el = el;
95
- }
96
- /**
97
- * this method utilizes setTimeout to defer the execution until the next tick of the event loop.
98
- * The text content of the element is modified by wrapping occurrences of the specified selectText with a <span> element,
99
- * applying a bold font-weight style.
100
- */
101
- setTextColor() {
102
- const textElement = this.el.nativeElement;
103
- setTimeout(() => {
104
- const { textContent } = textElement;
105
- if (this.selectText && textContent) {
106
- // eslint-disable-next-line no-unsanitized/property -- SECURITY: source is the element's own textContent (plain text, browser-escaped); only matches are wrapped in a static <span> for highlighting, so no untrusted markup is introduced.
107
- textElement.innerHTML = textContent.replace(new RegExp(this.selectText, 'gmi'), match => `<span style="font-weight: bold" >${match}</span>`);
108
- }
109
- }, 0);
110
- }
111
- ngOnChanges() {
112
- if (this.selectText) {
113
- this.setTextColor();
114
- }
115
- }
116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectTextDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
117
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: SelectTextDirective, isStandalone: false, selector: "[selectText]", inputs: { selectText: "selectText" }, usesOnChanges: true, ngImport: i0 }); }
118
- }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectTextDirective, decorators: [{
120
- type: Directive,
121
- args: [{
122
- // eslint-disable-next-line @angular-eslint/directive-selector -- public directive selector; ui-prefix rename is breaking, deferred to the breaking-change MAJOR (see plan)
123
- selector: '[selectText]',
124
- standalone: false,
125
- }]
126
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { selectText: [{
127
- type: Input
128
- }] } });
129
-
130
- /**
131
- * the TransformItemPipe is designed to selectively extract and return values from objects based on a specified field,
132
- * providing a way to transform and display data a template.
133
- */
134
- class TransformItemPipe {
135
- transform(value, field, getValueList = false) {
136
- if (getValueList) {
137
- return AutocompleteUtils.isArray(value)
138
- ? value.map((item) => (field ? item[field] : item))
139
- : field
140
- ? value?.[field]
141
- : value;
142
- }
143
- if (AutocompleteUtils.isPrimitive(value)) {
144
- return value;
145
- }
146
- else if (!AutocompleteUtils.isPrimitive(value) && field && (value?.[field] || value[0][field])) {
147
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- a falsy field value falls back to the first item field
148
- return value?.[field] || value[0][field];
149
- }
150
- else {
151
- AutocompleteUtils.throwInvalidSetupError();
152
- }
153
- }
154
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TransformItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
155
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: TransformItemPipe, isStandalone: false, name: "transformItem" }); }
156
- }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TransformItemPipe, decorators: [{
158
- type: Pipe,
159
- args: [{
160
- name: 'transformItem',
161
- standalone: false,
162
- }]
163
- }] });
164
-
165
- /**
166
- * The purpose of this pipe is to determine if the value is present in the values array.
167
- * If values is an array, the method uses the includes method to check for inclusion.
168
- * If values is not an array, it checks for strict equality between value and values.
169
- */
170
- class IncludesPipe {
171
- transform(value, values, valueField) {
172
- return Array.isArray(values)
173
- ? Boolean(values?.find(v => (valueField ? v?.[valueField] === value?.[valueField] : value === v)))
174
- : valueField
175
- ? value?.[valueField] === values?.[valueField]
176
- : value === values;
177
- }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: IncludesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
179
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: IncludesPipe, isStandalone: false, name: "includes" }); }
180
- }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: IncludesPipe, decorators: [{
182
- type: Pipe,
183
- args: [{
184
- name: 'includes',
185
- standalone: false,
186
- }]
187
- }] });
188
-
189
- /* eslint-disable @angular-eslint/no-conflicting-lifecycle */
190
- class AutocompleteComponent {
191
- /**
192
- * @property value
193
- * @description The selected value(s) in the autocomplete.
194
- * @memberof AutocompleteComponent
195
- */
196
- set itemValue(v) {
197
- this.value = AutocompleteUtils.isArray(v) ? v : v ? [v] : [];
198
- }
199
- /**
200
- * Input field errors
201
- *
202
- * @type {string[]}
203
- * @memberof AutocompleteComponent
204
- */
205
- set errors(errors) {
206
- this.safeErrors = errors?.filter(Boolean) ?? [];
207
- }
208
- set cdkVirtualScrollViewport(viewport) {
209
- if (this.savedVirtualScrollSubscription) {
210
- this.savedVirtualScrollSubscription.unsubscribe();
211
- }
212
- if (viewport) {
213
- this.savedVirtualScrollViewport = viewport;
214
- if (this.infiniteScroll) {
215
- setTimeout(() => {
216
- this.inputValueSearch$.pipe(take(1)).subscribe(searchValue => {
217
- this.isFilteredViewport = !!searchValue;
218
- });
219
- }, 0);
220
- this.savedVirtualScrollSubscription = this.savedVirtualScrollViewport
221
- .elementScrolled()
222
- .pipe(map(() => this.savedVirtualScrollViewport.measureScrollOffset('bottom')), filter(offset => offset < this.savedVirtualScrollViewport.getViewportSize() * 0.2), throttleTime(200), takeUntilDestroyed(this.destroyRef))
223
- .subscribe(() => {
224
- if (this.isFilteredViewport) {
225
- this.scrollViewportBottomReachedFiltered.emit();
226
- }
227
- else {
228
- this.scrollViewportBottomReached.emit();
229
- }
230
- });
231
- }
232
- }
233
- }
234
- constructor() {
235
- /**
236
- * @property itemsList
237
- * @description The list of items to display in the autocomplete.
238
- * @memberof AutocompleteComponent
239
- */
240
- this.itemsList = [];
241
- /**
242
- * @property suggestionsList
243
- * @description The list of suggestions to display in the autocomplete.
244
- * @memberof AutocompleteComponent
245
- */
246
- this.suggestionsList = [];
247
- /**
248
- * @property disabled
249
- * @description If `true`, the autocomplete is disabled.
250
- * @memberof AutocompleteComponent
251
- */
252
- this.disabled = false;
253
- /**
254
- * @property allowAdd
255
- * @description If `true`, allows adding new values to the autocomplete.
256
- * @memberof AutocompleteComponent
257
- */
258
- this.allowAdd = true;
259
- /**
260
- * @property textField
261
- * @description The field to be used as the display text in the autocomplete.
262
- * @memberof AutocompleteComponent
263
- */
264
- this.textField = '';
265
- /**
266
- * @property valueField
267
- * @description The field to be used as the value in the autocomplete.
268
- * @memberof AutocompleteComponent
269
- */
270
- this.valueField = '';
271
- /**
272
- * @property label
273
- * @description The label for the autocomplete input.
274
- * @memberof AutocompleteComponent
275
- */
276
- this.label = '';
277
- /**
278
- * @property placeholder
279
- * @description The placeholder for the autocomplete input.
280
- * @memberof AutocompleteComponent
281
- */
282
- this.placeholder = '';
283
- this.testId = null;
284
- /**
285
- * @property type
286
- * @description The type of the autocomplete ('single', 'multi', etc.).
287
- * @memberof AutocompleteComponent
288
- */
289
- this.type = 'multi';
290
- /**
291
- * @property minCharactersSearch
292
- * @description The minimum characters to trigger search.
293
- * @memberof AutocompleteComponent
294
- */
295
- this.minCharactersSearch = 3;
296
- /**
297
- * @property variant
298
- * @description The variant of Autocomplete
299
- * @memberof AutocompleteComponent
300
- */
301
- this.variant = DropdownVariation.AUTOCOMPLETE;
302
- /**
303
- * Show reserved content below form field
304
- * @property showBottomContent
305
- * @type {boolean}
306
- * @memberof AutocompleteComponent
307
- */
308
- this.showBottomContent = true;
309
- /**
310
- * Return full object if true
311
- * @property valuePrimitive
312
- * @type {boolean}
313
- * @memberof AutocompleteComponent
314
- */
315
- this.valuePrimitive = false;
316
- /**
317
- * Indicator of the autocomplete width
318
- * @property fullWidth
319
- * @type {boolean}
320
- * @memberof AutocompleteComponent
321
- */
322
- this.fullWidth = false;
323
- /**
324
- *
325
- * Defines the application theme
326
- *
327
- * @type {ApplicationTheme}
328
- * @memberof AutocompleteComponent
329
- */
330
- this.applicationTheme = 'light';
331
- /**
332
- * Color of the option hover.
333
- * Defaults to Test Gorilla primary color.
334
- *
335
- * @type {string}
336
- * @memberof AutocompleteComponent
337
- */
338
- this.companyColor = '#FFF2FC';
339
- /**
340
- * Hide in-build errors for Reactive Forms
341
- *
342
- * @type {number}
343
- * @memberof AutocompleteComponent
344
- */
345
- this.hideBuiltInErrors = false;
346
- /**
347
- * Hide label in errors
348
- *
349
- * @type {number}
350
- * @memberof AutocompleteComponent
351
- */
352
- this.hideLabelInErrors = false;
353
- /**
354
- * Sets dropdown list to virtual scroll mode
355
- *
356
- * @type {boolean}
357
- * @memberof AutocompleteComponent
358
- */
359
- this.virtualScroll = false;
360
- /**
361
- * @property dropdownPanelClass
362
- * @description Sets class on autocomplete dropdown
363
- * @memberof AutocompleteComponent
364
- */
365
- this.dropdownPanelClass = '';
366
- /**
367
- * @property closeOnScroll
368
- * @description Defines if dropdown should be closed on page scroll
369
- * @memberof AutocompleteComponent
370
- */
371
- this.closeOnScroll = false;
372
- /**
373
- * @property AutocompleteSize
374
- * @description Defines the size of the autocomplete. Small changes the tags to counter; medium is default.
375
- * @memberof AutocompleteComponent
376
- */
377
- this.size = 'medium';
378
- /**
379
- * @property allowUserInput
380
- * @description If `true`, allows the user to input custom values in the autocomplete.
381
- * @type {boolean}
382
- * @memberof AutocompleteComponent
383
- */
384
- this.allowUserInput = true;
385
- /**
386
- * @property clearable
387
- * @description If `true`, allows the user to clear the input values
388
- * @type {boolean}
389
- * @memberof AutocompleteComponent
390
- */
391
- this.clearable = true;
392
- /**
393
- * @property exactMatchSelect
394
- * @description If `true`, allows to select the exact match from the suggestions list
395
- * @type {boolean}
396
- * @memberof AutocompleteComponent
397
- */
398
- this.exactMatchSelect = true;
399
- /**
400
- * @property maxItemSelected
401
- * @description Sets the maximum number of items that can be selected in the autocomplete
402
- * @type {boolean}
403
- * @memberof AutocompleteComponent
404
- */
405
- this.maxItemSelected = Infinity;
406
- this.isDynamicFilteringEnabled = false;
407
- this.dynamicFilterLoading = false;
408
- this.dynamicFilteredList = null;
409
- this.infiniteScroll = false;
410
- this.hasMoreOptionsForInfiniteScroll = true;
411
- this.selectionChange = new EventEmitter();
412
- this.searchTextChange = new EventEmitter();
413
- // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)
414
- this.blur = new EventEmitter();
415
- // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)
416
- this.focus = new EventEmitter();
417
- /**
418
- * @property scrollViewportBottomReached
419
- * @description Emits when the bottom of the unfiltered list is reached during infinite scroll
420
- * @memberof AutocompleteComponent
421
- */
422
- this.scrollViewportBottomReached = new EventEmitter();
423
- /**
424
- * @property scrollViewportBottomReachedFiltered
425
- * @description Emits when the bottom of the filtered list is reached during infinite scroll
426
- * @memberof AutocompleteComponent
427
- */
428
- this.scrollViewportBottomReachedFiltered = new EventEmitter();
429
- this.safeErrors = [];
430
- this.inputValue = '';
431
- this.isInputFocus = false;
432
- this.autocompleteType = Autocomplete;
433
- this.isOverLapping = false;
434
- this.isOverlapChecking = true;
435
- this.overlapIndex = 0;
436
- this.inputOpacity = 1;
437
- this.firstTagMaxWidth = 0;
438
- this.inputValueSearch$ = new BehaviorSubject('');
439
- this.userInput$ = new ReplaySubject(1);
440
- this.dynamicFilteredList$ = new BehaviorSubject(null);
441
- this.filteredItemsList$ = this.inputValueSearch$.pipe(startWith(''), map(inputValue => inputValue.length
442
- ? AutocompleteUtils.filterItems(this.itemsList, inputValue, this.textField, this.isGrouped)
443
- : null));
444
- this.filteredSuggestionList$ = this.inputValueSearch$.pipe(map(inputValue => inputValue.length ? AutocompleteUtils.filterItems(this.suggestionsList, inputValue, this.textField) : null));
445
- this.isFilteredViewport = false;
446
- this.scrollEvent = (event) => {
447
- const isNotAutocompleteScroll = !event.target?.id?.includes('mat-autocomplete-') &&
448
- !event.target?.parentElement?.id?.includes('mat-autocomplete-') &&
449
- !event.target?.classList?.contains('mat-mdc-autocomplete-trigger');
450
- if (this.autocomplete.panelOpen && isNotAutocompleteScroll) {
451
- this.autocomplete.closePanel();
452
- }
453
- };
454
- this.searchResult$ = this.inputValueSearch$.pipe(map(inputValue => !!inputValue.trim()));
455
- this.translationContext = 'AUTOCOMPLETE.';
456
- this.AutocompleteUtils = AutocompleteUtils;
457
- this.defaultAppTheme = inject('CANOPYUI_DEFAULT_APPLICATION_THEME', {
458
- optional: true,
459
- });
460
- this.cdr = inject(ChangeDetectorRef);
461
- this.ngControl = inject(NgControl, { optional: true, self: true });
462
- this.platformId = inject(PLATFORM_ID);
463
- this.el = inject(ElementRef);
464
- this.focusMonitor = inject(FocusMonitor);
465
- this.destroyRef = inject(DestroyRef);
466
- this.ngZone = inject(NgZone);
467
- this.isPlatform = isPlatformBrowser(this.platformId);
468
- this.keyboardFocused = signal(false, ...(ngDevMode ? [{ debugName: "keyboardFocused" }] : /* istanbul ignore next */ []));
469
- this.isAlreadyAdded = false;
470
- this.onChange = (_) => { };
471
- this.onTouch = () => { };
472
- this.trackByFn = (index, value) => value;
473
- if (this.ngControl != null) {
474
- this.ngControl.valueAccessor = this;
475
- }
476
- if (this.defaultAppTheme) {
477
- this.applicationTheme = this.defaultAppTheme;
478
- }
479
- this.subscriberDisplayChange();
480
- }
481
- ngOnInit() {
482
- if (this.isDynamicFilteringEnabled) {
483
- this.filteredItemsList$ = this.dynamicFilteredList$;
484
- }
485
- }
486
- /**
487
- * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors
488
- * to display validation errors that might happen (e.g. required)
489
- */
490
- ngDoCheck() {
491
- if (this.ngControl?.touched || this.ngControl?.errors) {
492
- this.cdr.markForCheck();
493
- }
494
- }
495
- ngOnChanges(changes) {
496
- if (this.isDynamicFilteringEnabled) {
497
- const dynamicFilteredList = changes['dynamicFilteredList']?.currentValue;
498
- if (dynamicFilteredList) {
499
- this.dynamicFilteredList$.next(dynamicFilteredList);
500
- }
501
- return;
502
- }
503
- if (changes['itemsList'] || changes['suggestionsList'] || changes['valueField']) {
504
- this.itemsList = this.isGrouped
505
- ? this.itemsList
506
- : AutocompleteUtils.excludeSuggestions(this.itemsList, this.suggestionsList, this.valueField);
507
- this.initValue();
508
- }
509
- if (this.isPlatform && changes['companyColor']) {
510
- this.setCompanyColorVariable();
511
- }
512
- }
513
- ngAfterViewInit() {
514
- if (this.type !== Autocomplete.LARGE) {
515
- this.checkOverlap(Timeout.VIEW_INITIALIZED_COMPONENT_LOAD, true);
516
- }
517
- if (this.isPlatform) {
518
- this.setCompanyColorVariable();
519
- }
520
- if (this.closeOnScroll) {
521
- window.addEventListener('scroll', this.scrollEvent, true);
522
- }
523
- this.focusMonitor
524
- .monitor(this.matInput)
525
- .pipe(takeUntilDestroyed(this.destroyRef))
526
- .subscribe(origin => this.ngZone.run(() => {
527
- this.keyboardFocused.set(origin === 'keyboard');
528
- }));
529
- this.matInput.nativeElement.onkeydown = this.onKeydown.bind(this);
530
- }
531
- ngOnDestroy() {
532
- window.removeEventListener('scroll', this.scrollEvent, true);
533
- if (this.observer) {
534
- this.observer.disconnect();
535
- }
536
- }
537
- registerOnChange(fn) {
538
- this.onChange = fn;
539
- }
540
- registerOnTouched(fn) {
541
- this.onTouch = fn;
542
- }
543
- setDisabledState(isDisabled) {
544
- this.disabled = isDisabled;
545
- this.cdr.markForCheck();
546
- }
547
- writeValue(value) {
548
- if (this.valuePrimitive && this.textField && this.valueField) {
549
- if (this.type === Autocomplete.SINGLE) {
550
- this.value = this.itemsList.find(item => item[this.valueField] === value);
551
- }
552
- else {
553
- this.value = AutocompleteUtils.isArray(value)
554
- ? this.itemsList.filter(item => value.find((v) => v === item[this.valueField]))
555
- : [this.itemsList.find(item => item[this.valueField] === value)];
556
- this.value = this.value.filter(Boolean).length ? this.value : null;
557
- }
558
- }
559
- else {
560
- this.value = value;
561
- }
562
- this.initValue();
563
- this.cdr.markForCheck();
564
- }
565
- get isGrouped() {
566
- return this.itemsList?.some((item) => item.isGroup);
567
- }
568
- onOptionSelected(event) {
569
- const inputValue = event.option.value;
570
- const itemValue = AutocompleteUtils.createValueItem(inputValue, this.textField, this.valueField);
571
- this.addNewValue(itemValue);
572
- if (this.type === this.autocompleteType.MULTI) {
573
- this.checkOverlap();
574
- }
575
- queueMicrotask(() => {
576
- if (this.type !== this.autocompleteType.SINGLE) {
577
- this.inputValue = '';
578
- }
579
- else {
580
- this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
581
- }
582
- this.cdr.markForCheck();
583
- });
584
- this.onUpdate();
585
- }
586
- onOptionRemoved(option) {
587
- setTimeout(() => this.autocomplete.closePanel(), 0);
588
- const foundValue = this.value.find((v) => (this.compareWith ? this.compareWith(v, option) : v === option));
589
- if (foundValue) {
590
- this.value = this.value.filter((v) => (this.compareWith ? !this.compareWith(v, option) : v !== option));
591
- this.matAutocomplete.options.forEach(matOption => {
592
- if (matOption.value?.value === foundValue.value) {
593
- matOption.deselect();
594
- }
595
- });
596
- }
597
- if (this.type === this.autocompleteType.MULTI) {
598
- this.checkOverlap();
599
- }
600
- if (!this.value.length) {
601
- this.inputValue = '';
602
- }
603
- this.onUpdate();
604
- }
605
- onInputChange(event) {
606
- const inputValue = event.target.value;
607
- this.userInput$.next(inputValue);
608
- if (inputValue.length >= this.minCharactersSearch) {
609
- this.inputValueSearch$.next(inputValue);
610
- this.searchTextChange.emit(inputValue);
611
- const itemList = this.isGrouped ? this.itemsList.flatMap(groups => groups.items) : this.itemsList.flat();
612
- const findValue = [...this.suggestionsList, ...itemList].find(v => inputValue === (this.textField ? v[this.textField] : v));
613
- const count = AutocompleteUtils.countMatchingWords([...this.suggestionsList, ...itemList], this.inputValue, this.textField);
614
- if (findValue && count === 1 && this.exactMatchSelect) {
615
- this.onOptionSelected({ option: { value: findValue } });
616
- }
617
- }
618
- else {
619
- this.inputValueSearch$.next('');
620
- this.userInput$.next('');
621
- }
622
- this.isAlreadyAdded = !!(this.compareWith
623
- ? this.value.find((v) => this.compareWith(v, inputValue))
624
- : AutocompleteUtils.findDuplicate(this.value, inputValue, this.textField));
625
- }
626
- onClear() {
627
- this.inputValue = '';
628
- this.value = AutocompleteUtils.isArray(this.value) ? [] : '';
629
- this.isOverLapping = false;
630
- this.overlapIndex = 0;
631
- this.onUpdate();
632
- this.matAutocomplete?.options.forEach(option => option.deselect());
633
- this.onTouch();
634
- }
635
- refillInput() {
636
- setTimeout(() => {
637
- if (this.value && this.type === this.autocompleteType.SINGLE && !this.inputValue) {
638
- this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
639
- }
640
- else if (!this.inputValue && this.value?.length) {
641
- this.inputValue = ' ';
642
- }
643
- else if (this.inputValue &&
644
- this.type === Autocomplete.SINGLE &&
645
- this.value &&
646
- Object.keys(this.value).length) {
647
- this.inputValue = AutocompleteUtils.transformDisplayValue(AutocompleteUtils.isArray(this.value) ? this.value[0] : this.value, this.textField);
648
- }
649
- else if (this.inputValue) {
650
- this.inputValue = ' ';
651
- }
652
- this.inputValueSearch$.next('');
653
- this.userInput$.next('');
654
- this.isInputFocus = false;
655
- this.onTouch();
656
- this.blur.emit();
657
- }, 0);
658
- }
659
- gotoUp() {
660
- if (this.savedVirtualScrollViewport) {
661
- this.savedVirtualScrollViewport.scrollToIndex(0);
662
- this.savedVirtualScrollViewport.checkViewportSize();
663
- }
664
- }
665
- onFocus() {
666
- this.isInputFocus = true;
667
- const inputValue = AutocompleteUtils.isArray(this.inputValue) ? this.inputValue[0] : this.inputValue;
668
- if (AutocompleteUtils.isPrimitive(inputValue)) {
669
- if (typeof inputValue !== 'number' && inputValue?.match(/^\s+/gm)) {
670
- this.inputValue = inputValue.trimStart();
671
- }
672
- }
673
- else {
674
- if (inputValue[this.textField]?.match(/^\s+/gm)) {
675
- this.inputValue = inputValue[this.textField].trimStart();
676
- }
677
- }
678
- this.focus.emit();
679
- }
680
- checkOverlap(delay = Timeout.VIEW_INITIALIZED_AFTER_ACTION, init = false) {
681
- this.isOverLapping = false;
682
- this.isOverlapChecking = true;
683
- this.inputOpacity = 0;
684
- setTimeout(() => {
685
- const inputWidth = this.inputWidth;
686
- const tags = this.tagContainer?.nativeElement.querySelectorAll('.value-tag');
687
- if (tags) {
688
- let width = 0;
689
- tags.forEach((tag, index) => {
690
- width += tag.getBoundingClientRect().width;
691
- const inpWidth = this.formFieldElement?.nativeElement.getBoundingClientRect().width - 20;
692
- this.firstTagMaxWidth =
693
- tags.length > 1
694
- ? inpWidth -
695
- (this.variant === DropdownVariation.DROPDOWN
696
- ? Padding.DROPDOWN_SPACE_CONTAINER
697
- : Padding.AUTOCOMPLETE_SPACE_CONTAINER)
698
- : inpWidth;
699
- if (!this.isOverLapping && width > inputWidth && index > 0) {
700
- this.isOverLapping = true;
701
- this.overlapIndex = index;
702
- }
703
- });
704
- this.isOverlapChecking = false;
705
- if (init) {
706
- if (this.type === this.autocompleteType.SINGLE) {
707
- this.inputValue = AutocompleteUtils.transformDisplayValue(this.value[0], this.textField);
708
- }
709
- else if (this.value?.length) {
710
- this.inputValue = ' ';
711
- }
712
- }
713
- const tagContainerWidth = this.tagContainer.nativeElement.getBoundingClientRect().width;
714
- this.tagContainer.nativeElement.style.maxWidth = tagContainerWidth / 100 ? '100%' : `${tagContainerWidth}px`;
715
- this.cdr.markForCheck();
716
- }
717
- this.inputOpacity = 1;
718
- }, delay);
719
- }
720
- onUpdate() {
721
- this.inputValueSearch$.next('');
722
- this.userInput$.next('');
723
- if (!this.valuePrimitive) {
724
- this.onChange(this.value);
725
- }
726
- else {
727
- if (this.type === Autocomplete.SINGLE) {
728
- this.onChange(this.value[this.valueField]);
729
- }
730
- else {
731
- this.onChange(this.value.map((v) => v[this.valueField]));
732
- }
733
- }
734
- this.updateControlMaxLengthValidity();
735
- this.selectionChange.emit(this.value);
736
- }
737
- updateControlMaxLengthValidity() {
738
- const control = this.ngControl?.control;
739
- if (!control) {
740
- return;
741
- }
742
- if (this.type !== Autocomplete.SINGLE) {
743
- const existingErrors = control.errors ?? {};
744
- if (this.value.length > this.maxItemSelected) {
745
- control.setErrors({
746
- ...existingErrors,
747
- maxItemSelected: {
748
- expected: this.maxItemSelected,
749
- actual: this.value.length,
750
- },
751
- });
752
- control.markAsTouched();
753
- }
754
- else {
755
- if (existingErrors['maxItemSelected']) {
756
- delete existingErrors['maxItemSelected'];
757
- control.setErrors(Object.keys(existingErrors).length ? existingErrors : null);
758
- }
759
- }
760
- }
761
- }
762
- initValue() {
763
- if (this.type === this.autocompleteType.SINGLE &&
764
- this.variant !== DropdownVariation.DROPDOWN) {
765
- if (AutocompleteUtils.isArray(this.value)) {
766
- this.inputValue = AutocompleteUtils.transformDisplayValue(this.value[0], this.textField);
767
- }
768
- else {
769
- this.inputValue = this.value ? AutocompleteUtils.transformDisplayValue(this.value, this.textField) : '';
770
- }
771
- }
772
- else if (this.variant === DropdownVariation.DROPDOWN) {
773
- this.inputValue =
774
- (AutocompleteUtils.isArray(this.value) && !this.value?.length) || !this.value
775
- ? ''
776
- : this.type === Autocomplete.SINGLE
777
- ? AutocompleteUtils.transformDisplayValue(AutocompleteUtils.isArray(this.value) ? this.value[0] : this.value, this.textField)
778
- : ' ';
779
- }
780
- else {
781
- this.inputValue = this.value?.length ? ' ' : '';
782
- }
783
- if (this.type === this.autocompleteType.MULTI) {
784
- this.checkOverlap();
785
- }
786
- }
787
- addNewValue(newValue) {
788
- if (this.type !== this.autocompleteType.SINGLE && !this.value) {
789
- this.value = [];
790
- }
791
- const foundDuplicate = this.compareWith
792
- ? this.value.find((v) => this.compareWith(v, newValue))
793
- : AutocompleteUtils.findDuplicate(this.value, newValue, this.textField);
794
- if (this.type !== this.autocompleteType.SINGLE) {
795
- this.value = foundDuplicate
796
- ? this.value.filter((v) => this.compareWith ? !this.compareWith(v, foundDuplicate) : v !== foundDuplicate)
797
- : [...this.value, newValue];
798
- }
799
- else {
800
- this.value = newValue;
801
- }
802
- }
803
- get isDropdown() {
804
- return this.variant === DropdownVariation.DROPDOWN;
805
- }
806
- onChevronClick(autocomplete) {
807
- if (autocomplete.isOpen) {
808
- setTimeout(() => {
809
- this.autocomplete.closePanel();
810
- }, 0);
811
- }
812
- }
813
- get inputWidth() {
814
- return (this.formFieldElement?.nativeElement.getBoundingClientRect().width -
815
- (this.isDropdown ? Padding.DROPDOWN_CONTAINER : Padding.AUTOCOMPLETE_CONTAINER));
816
- }
817
- /**
818
- * Adding company color variable to the body to style overlay container that's out of the component scope.
819
- */
820
- setCompanyColorVariable() {
821
- document.body.style.setProperty('--ui-autocomplete-option-color', `${this.companyColor}`);
822
- }
823
- subscriberDisplayChange() {
824
- const autocompleteHostElement = this.el.nativeElement;
825
- this.observer = new MutationObserver(mutations => {
826
- mutations.forEach(mutation => {
827
- if (mutation.attributeName === 'style') {
828
- const displayStyle = getComputedStyle(autocompleteHostElement).display;
829
- if (displayStyle !== 'none') {
830
- this.checkOverlap();
831
- }
832
- }
833
- });
834
- });
835
- this.observer.observe(autocompleteHostElement, {
836
- attributes: true,
837
- attributeFilter: ['style'],
838
- });
839
- }
840
- get hasObjectValue() {
841
- return this.value ? !!Object.keys(this.value).length : false;
842
- }
843
- onKeydown($event) {
844
- /* eslint-disable no-underscore-dangle -- MatAutocomplete internals (_keyManager/_setScrollTop) drive keyboard nav */
845
- const optionHeight = 48;
846
- if ($event.key === IKeyboardEvent.HOME) {
847
- this.matAutocomplete._keyManager.setFirstItemActive();
848
- }
849
- else if ($event.key === IKeyboardEvent.END) {
850
- this.matAutocomplete._keyManager.setLastItemActive();
851
- }
852
- else if ($event.key === IKeyboardEvent.PAGE_DOWN) {
853
- this.matAutocomplete._keyManager.setNextItemActive();
854
- this.matAutocomplete._keyManager.setNextItemActive();
855
- this.matAutocomplete._keyManager.setNextItemActive();
856
- }
857
- else if ($event.key === IKeyboardEvent.PAGE_UP) {
858
- this.matAutocomplete._keyManager.setPreviousItemActive();
859
- this.matAutocomplete._keyManager.setPreviousItemActive();
860
- this.matAutocomplete._keyManager.setPreviousItemActive();
861
- }
862
- this.matAutocomplete._setScrollTop((this.matAutocomplete._keyManager.activeItemIndex ?? 0) * optionHeight);
863
- /* eslint-enable no-underscore-dangle */
864
- }
865
- getVirtualScrollHeight(itemCount) {
866
- const itemHeight = 48;
867
- const maxHeight = 200;
868
- const minHeight = 48;
869
- const calculatedHeight = itemCount * itemHeight;
870
- return Math.min(Math.max(calculatedHeight, minHeight), maxHeight);
871
- }
872
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
873
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: AutocompleteComponent, isStandalone: false, selector: "ui-autocomplete", inputs: { itemsList: "itemsList", suggestionsList: "suggestionsList", disabled: "disabled", allowAdd: "allowAdd", textField: "textField", valueField: "valueField", label: "label", placeholder: "placeholder", testId: "testId", itemValue: "itemValue", type: "type", minCharactersSearch: "minCharactersSearch", variant: "variant", showBottomContent: "showBottomContent", valuePrimitive: "valuePrimitive", fullWidth: "fullWidth", applicationTheme: "applicationTheme", required: "required", errors: "errors", companyColor: "companyColor", hideBuiltInErrors: "hideBuiltInErrors", hideLabelInErrors: "hideLabelInErrors", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], compareWith: "compareWith", dropdownPanelClass: "dropdownPanelClass", closeOnScroll: "closeOnScroll", size: "size", allowUserInput: "allowUserInput", clearable: "clearable", exactMatchSelect: "exactMatchSelect", maxItemSelected: "maxItemSelected", maxLength: "maxLength", isDynamicFilteringEnabled: "isDynamicFilteringEnabled", dynamicFilterLoading: "dynamicFilterLoading", dynamicFilteredList: "dynamicFilteredList", infiniteScroll: "infiniteScroll", hasMoreOptionsForInfiniteScroll: "hasMoreOptionsForInfiniteScroll" }, outputs: { selectionChange: "selectionChange", searchTextChange: "searchTextChange", blur: "blur", focus: "focus", scrollViewportBottomReached: "scrollViewportBottomReached", scrollViewportBottomReachedFiltered: "scrollViewportBottomReachedFiltered" }, host: { properties: { "class.full-width": "this.fullWidth", "attr.theme": "this.applicationTheme" } }, viewQueries: [{ propertyName: "formFieldElement", first: true, predicate: ["formField"], descendants: true }, { propertyName: "tagContainer", first: true, predicate: ["tagContainer"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["autocomplete"], descendants: true }, { propertyName: "matInput", first: true, predicate: ["matInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div class=\"autocomplete-wrapper\" [ngClass]=\"{ 'full-width': fullWidth, disabled: disabled }\">\n <mat-form-field\n [color]=\"\n safeErrors.length ||\n (ngControl?.errors && ngControl?.touched) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ? 'warn'\n : 'accent'\n \"\n [appearance]=\"'outline'\"\n [ngClass]=\"{\n 'large-size': type === autocompleteType.LARGE,\n 'hide-bottom-content': !showBottomContent,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n @if (label) {\n <mat-label\n >{{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n }\n <div #formField class=\"input-container\">\n @if (textField ? value?.[textField] : value === inputValue) {\n <span style=\"position: absolute; left: -9999px\" aria-live=\"polite\">{{\n ('SELECTED' | uiTranslate | async) + ' ' + inputValue\n }}</span>\n }\n\n <input\n [attr.data-testid]=\"testId ?? 'autocomplete-input'\"\n #trigger=\"matAutocompleteTrigger\"\n #matInput\n [attr.maxlength]=\"maxLength !== null && maxLength !== undefined ? maxLength : null\"\n [uiPreventInput]=\"!allowUserInput\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': value && type === autocompleteType.LARGE, 'no-caret': !allowUserInput }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n [attr.aria-label]=\"\n (translationContext + 'SELECTED' | uiTranslate | async) + ' ' + (value | transformItem: textField : true)\n \"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n matInput\n [placeholder]=\"value && value.length ? '' : placeholder\"\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n @if (\n (type === autocompleteType.LARGE && value) ||\n (!(inputValue && isInputFocus) && value && type !== autocompleteType.SINGLE)\n ) {\n <div class=\"selected-items\" #tagContainer>\n @for (valueItem of value; track valueItem; let i = $index) {\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [isDisabled]=\"disabled\"\n [applicationTheme]=\"applicationTheme\"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n [style.display]=\"\n (isOverLapping && i > 0 && i >= overlapIndex) || (size === 'small' && value.length > 1)\n ? 'none'\n : 'block'\n \"\n [ngStyle]=\"{\n '--tag-max-width': type === autocompleteType.LARGE ? 'fit-content' : firstTagMaxWidth + 'px',\n }\"\n [ngClass]=\"{\n 'overlap-tag':\n isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI,\n }\"\n (close)=\"onOptionRemoved(valueItem)\"\n ></ui-tag>\n }\n @if (size === 'small') {\n @if (value.length > 1) {\n <div class=\"selected-count\">\n {{\n translationContext + 'SELECTED_AMOUNT'\n | uiTranslate: { numberSelected: (value | slice: overlapIndex).length }\n | async\n }}\n </div>\n }\n } @else {\n @if (value.length > 1 && isOverLapping) {\n <div class=\"overlap-count\">\n <ui-tag\n [applicationTheme]=\"applicationTheme\"\n [isDisabled]=\"disabled\"\n [label]=\"'+' + (value.length - overlapIndex)\"\n ></ui-tag>\n </div>\n }\n }\n </div>\n }\n </div>\n\n @if (\n (clearable && type === autocompleteType.SINGLE && (value?.length || hasObjectValue)) ||\n (type !== autocompleteType.SINGLE &&\n value &&\n value.length > 1 &&\n ((AutocompleteUtils.isPrimitive(value) && value.length) ||\n (!AutocompleteUtils.isPrimitive(value) &&\n ((AutocompleteUtils.isArray(value) && value.length) ||\n (!AutocompleteUtils.isArray(value) && !value.length)))))\n ) {\n <ui-icon\n class=\"remove-selected\"\n [tabIndex]=\"disabled ? -1 : 0\"\n (keydown.enter)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n (keydown.space)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [size]=\"'24'\"\n [color]=\"applicationTheme === 'classic' ? 'inherit' : 'rebrand-black'\"\n [attr.aria-label]=\"'COMMON.CLEAR' | uiTranslate | async\"\n [name]=\"applicationTheme === 'classic' ? 'Close' : 'Close-in-line'\"\n ></ui-icon>\n }\n\n @if (isDropdown) {\n <ui-icon\n class=\"arrow-state\"\n [ngClass]=\"{ opened: autocomplete.isOpen, 'large-input-icon': type === autocompleteType.LARGE }\"\n [size]=\"'24'\"\n [name]=\"applicationTheme !== 'classic' ? 'Arrow-chevron-down-in-line' : 'Arrow_down'\"\n (click)=\"onChevronClick(autocomplete)\"\n ></ui-icon>\n }\n\n <mat-autocomplete\n #autocomplete\n [class]=\"applicationTheme + ' ' + dropdownPanelClass\"\n (optionSelected)=\"onOptionSelected($event)\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [hideSingleSelectionIndicator]=\"false\"\n (opened)=\"gotoUp()\"\n >\n @if (type !== autocompleteType.MULTI || value?.length < maxItemSelected) {\n @if ((searchResult$ | async) === false) {\n @if (!isDropdown) {\n @if (suggestionsList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (suggested of suggestionsList; track suggested) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': suggested | includes: value : valueField }\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"userInput$ | async\">{{ suggested | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (value?.length && type !== autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n @for (item of value; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (isGrouped) {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (value?.length && type === autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n <mat-option (mousedown)=\"$event.preventDefault()\" [class]=\"'selected-option'\" [value]=\"value\">\n <span [selectText]=\"userInput$ | async\">{{ value | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n } @else {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(itemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (!isGrouped) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of itemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n @if (infiniteScroll && hasMoreOptionsForInfiniteScroll) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (!isGrouped) {\n @for (item of itemsList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n }\n }\n }\n\n @if (filteredSuggestionList$ | async; as filteredSuggestionList) {\n @if (filteredItemsList$ | async; as filteredItemsList) {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(filteredItemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (item of filteredSuggestionList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n }\n }\n }\n }\n </mat-autocomplete>\n @if (\n safeErrors.length ||\n (ngControl?.errors | hasValidationError) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <mat-hint class=\"error\">\n @if (\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContext + 'MAX_SELECTED_ERROR' | uiTranslate: { max: maxItemSelected } | async\n }}</span>\n </div>\n }\n @if (safeErrors.length) {\n @for (error of safeErrors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:320px;display:block}:host.full-width{width:100%}:host ui-tag{height:32px;margin:4px}:host ui-tag ::ng-deep .tag-container{margin:0!important}:host ui-tag ::ng-deep .tag-wrapper{max-width:fit-content}.large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:flex;flex-direction:column-reverse}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled *{pointer-events:none}.input-container{width:100%;margin:auto;display:flex;flex-direction:row-reverse}.input-container .selected-items{display:flex;padding-left:4px}.input-container .selected-items .selected-count{white-space:nowrap}.input-container .selected-items .value-tag{max-width:var(--tag-max-width)}.input-container .selected-items .value-tag ::ng-deep .tag-container{max-width:var(--tag-max-width)}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px}.input-container .selected-items .overlap-count ui-tag{display:block}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:6px}.input-container input.unset-margin{margin-top:unset}.input-container input.no-caret{cursor:pointer;caret-color:transparent!important}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer;margin-right:2px;border-radius:50px;height:fit-content}.remove-selected.large-input-icon{margin-top:10px}.arrow-state{height:24px;cursor:pointer}.arrow-state.large-input-icon{margin-top:10px}.arrow-state.opened{transform:rotateX(180deg)}::ng-deep .autocomplete-wrapper .mat-mdc-form-field{width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#cb7b7a}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors ui-icon{margin-right:8px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-bottom-align:before{height:0}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper{padding:0 0 12px;font-size:12px;line-height:16px;position:relative}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper .mat-form-field-hint-spacer{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field.hide-bottom-content .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper{padding-left:12px!important;height:unset!important;max-height:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-infix,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#e9f0f1!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option{background:#e9f0f1}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mat-mdc-optgroup-label{font-weight:700!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}.active-field .mdc-notched-outline__leading{border-left-width:2px;border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__notch{border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__trailing{border-top-width:2px;border-bottom-width:2px;border-right-width:2px}.loading-option{display:flex}.loading-option .loading-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;position:absolute;top:0;left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.TagComponent, selector: "ui-tag", inputs: ["label", "icon", "allowClose", "readOnly", "isSelected", "showIconWhenSelected", "pinnedBackground", "constrainWidth", "isDisabled", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "showBadge", "notificationsAmount"], outputs: ["isSelectedChange", "close", "press"] }, { kind: "component", type: i7.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i8.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme", "customErrors"] }, { kind: "directive", type: i9.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i9.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i9.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: PreventInputDirective, selector: "[uiPreventInput]", inputs: ["uiPreventInput"] }, { kind: "component", type: i11.SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }, { kind: "directive", type: SelectTextDirective, selector: "[selectText]", inputs: ["selectText"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i13.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i13.HasValidationErrorPipe, name: "hasValidationError" }, { kind: "pipe", type: TransformItemPipe, name: "transformItem" }, { kind: "pipe", type: IncludesPipe, name: "includes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
874
- }
875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponent, decorators: [{
876
- type: Component,
877
- args: [{ selector: 'ui-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container>\n <div class=\"autocomplete-wrapper\" [ngClass]=\"{ 'full-width': fullWidth, disabled: disabled }\">\n <mat-form-field\n [color]=\"\n safeErrors.length ||\n (ngControl?.errors && ngControl?.touched) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ? 'warn'\n : 'accent'\n \"\n [appearance]=\"'outline'\"\n [ngClass]=\"{\n 'large-size': type === autocompleteType.LARGE,\n 'hide-bottom-content': !showBottomContent,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n @if (label) {\n <mat-label\n >{{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n }\n <div #formField class=\"input-container\">\n @if (textField ? value?.[textField] : value === inputValue) {\n <span style=\"position: absolute; left: -9999px\" aria-live=\"polite\">{{\n ('SELECTED' | uiTranslate | async) + ' ' + inputValue\n }}</span>\n }\n\n <input\n [attr.data-testid]=\"testId ?? 'autocomplete-input'\"\n #trigger=\"matAutocompleteTrigger\"\n #matInput\n [attr.maxlength]=\"maxLength !== null && maxLength !== undefined ? maxLength : null\"\n [uiPreventInput]=\"!allowUserInput\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': value && type === autocompleteType.LARGE, 'no-caret': !allowUserInput }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n [attr.aria-label]=\"\n (translationContext + 'SELECTED' | uiTranslate | async) + ' ' + (value | transformItem: textField : true)\n \"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n matInput\n [placeholder]=\"value && value.length ? '' : placeholder\"\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n @if (\n (type === autocompleteType.LARGE && value) ||\n (!(inputValue && isInputFocus) && value && type !== autocompleteType.SINGLE)\n ) {\n <div class=\"selected-items\" #tagContainer>\n @for (valueItem of value; track valueItem; let i = $index) {\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [isDisabled]=\"disabled\"\n [applicationTheme]=\"applicationTheme\"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n [style.display]=\"\n (isOverLapping && i > 0 && i >= overlapIndex) || (size === 'small' && value.length > 1)\n ? 'none'\n : 'block'\n \"\n [ngStyle]=\"{\n '--tag-max-width': type === autocompleteType.LARGE ? 'fit-content' : firstTagMaxWidth + 'px',\n }\"\n [ngClass]=\"{\n 'overlap-tag':\n isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI,\n }\"\n (close)=\"onOptionRemoved(valueItem)\"\n ></ui-tag>\n }\n @if (size === 'small') {\n @if (value.length > 1) {\n <div class=\"selected-count\">\n {{\n translationContext + 'SELECTED_AMOUNT'\n | uiTranslate: { numberSelected: (value | slice: overlapIndex).length }\n | async\n }}\n </div>\n }\n } @else {\n @if (value.length > 1 && isOverLapping) {\n <div class=\"overlap-count\">\n <ui-tag\n [applicationTheme]=\"applicationTheme\"\n [isDisabled]=\"disabled\"\n [label]=\"'+' + (value.length - overlapIndex)\"\n ></ui-tag>\n </div>\n }\n }\n </div>\n }\n </div>\n\n @if (\n (clearable && type === autocompleteType.SINGLE && (value?.length || hasObjectValue)) ||\n (type !== autocompleteType.SINGLE &&\n value &&\n value.length > 1 &&\n ((AutocompleteUtils.isPrimitive(value) && value.length) ||\n (!AutocompleteUtils.isPrimitive(value) &&\n ((AutocompleteUtils.isArray(value) && value.length) ||\n (!AutocompleteUtils.isArray(value) && !value.length)))))\n ) {\n <ui-icon\n class=\"remove-selected\"\n [tabIndex]=\"disabled ? -1 : 0\"\n (keydown.enter)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n (keydown.space)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [size]=\"'24'\"\n [color]=\"applicationTheme === 'classic' ? 'inherit' : 'rebrand-black'\"\n [attr.aria-label]=\"'COMMON.CLEAR' | uiTranslate | async\"\n [name]=\"applicationTheme === 'classic' ? 'Close' : 'Close-in-line'\"\n ></ui-icon>\n }\n\n @if (isDropdown) {\n <ui-icon\n class=\"arrow-state\"\n [ngClass]=\"{ opened: autocomplete.isOpen, 'large-input-icon': type === autocompleteType.LARGE }\"\n [size]=\"'24'\"\n [name]=\"applicationTheme !== 'classic' ? 'Arrow-chevron-down-in-line' : 'Arrow_down'\"\n (click)=\"onChevronClick(autocomplete)\"\n ></ui-icon>\n }\n\n <mat-autocomplete\n #autocomplete\n [class]=\"applicationTheme + ' ' + dropdownPanelClass\"\n (optionSelected)=\"onOptionSelected($event)\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [hideSingleSelectionIndicator]=\"false\"\n (opened)=\"gotoUp()\"\n >\n @if (type !== autocompleteType.MULTI || value?.length < maxItemSelected) {\n @if ((searchResult$ | async) === false) {\n @if (!isDropdown) {\n @if (suggestionsList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (suggested of suggestionsList; track suggested) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': suggested | includes: value : valueField }\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"userInput$ | async\">{{ suggested | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (value?.length && type !== autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n @for (item of value; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (isGrouped) {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (value?.length && type === autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n <mat-option (mousedown)=\"$event.preventDefault()\" [class]=\"'selected-option'\" [value]=\"value\">\n <span [selectText]=\"userInput$ | async\">{{ value | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n } @else {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(itemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (!isGrouped) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of itemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n @if (infiniteScroll && hasMoreOptionsForInfiniteScroll) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (!isGrouped) {\n @for (item of itemsList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n }\n }\n }\n\n @if (filteredSuggestionList$ | async; as filteredSuggestionList) {\n @if (filteredItemsList$ | async; as filteredItemsList) {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(filteredItemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (item of filteredSuggestionList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n }\n }\n }\n }\n </mat-autocomplete>\n @if (\n safeErrors.length ||\n (ngControl?.errors | hasValidationError) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <mat-hint class=\"error\">\n @if (\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContext + 'MAX_SELECTED_ERROR' | uiTranslate: { max: maxItemSelected } | async\n }}</span>\n </div>\n }\n @if (safeErrors.length) {\n @for (error of safeErrors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:320px;display:block}:host.full-width{width:100%}:host ui-tag{height:32px;margin:4px}:host ui-tag ::ng-deep .tag-container{margin:0!important}:host ui-tag ::ng-deep .tag-wrapper{max-width:fit-content}.large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:flex;flex-direction:column-reverse}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled *{pointer-events:none}.input-container{width:100%;margin:auto;display:flex;flex-direction:row-reverse}.input-container .selected-items{display:flex;padding-left:4px}.input-container .selected-items .selected-count{white-space:nowrap}.input-container .selected-items .value-tag{max-width:var(--tag-max-width)}.input-container .selected-items .value-tag ::ng-deep .tag-container{max-width:var(--tag-max-width)}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px}.input-container .selected-items .overlap-count ui-tag{display:block}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:6px}.input-container input.unset-margin{margin-top:unset}.input-container input.no-caret{cursor:pointer;caret-color:transparent!important}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer;margin-right:2px;border-radius:50px;height:fit-content}.remove-selected.large-input-icon{margin-top:10px}.arrow-state{height:24px;cursor:pointer}.arrow-state.large-input-icon{margin-top:10px}.arrow-state.opened{transform:rotateX(180deg)}::ng-deep .autocomplete-wrapper .mat-mdc-form-field{width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#cb7b7a}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors ui-icon{margin-right:8px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-bottom-align:before{height:0}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper{padding:0 0 12px;font-size:12px;line-height:16px;position:relative}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper .mat-form-field-hint-spacer{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field.hide-bottom-content .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper{padding-left:12px!important;height:unset!important;max-height:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-infix,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#e9f0f1!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option{background:#e9f0f1}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mat-mdc-optgroup-label{font-weight:700!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}.active-field .mdc-notched-outline__leading{border-left-width:2px;border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__notch{border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__trailing{border-top-width:2px;border-bottom-width:2px;border-right-width:2px}.loading-option{display:flex}.loading-option .loading-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;position:absolute;top:0;left:0}\n"] }]
878
- }], ctorParameters: () => [], propDecorators: { itemsList: [{
879
- type: Input
880
- }], suggestionsList: [{
881
- type: Input
882
- }], disabled: [{
883
- type: Input
884
- }], allowAdd: [{
885
- type: Input
886
- }], textField: [{
887
- type: Input
888
- }], valueField: [{
889
- type: Input
890
- }], label: [{
891
- type: Input
892
- }], placeholder: [{
893
- type: Input
894
- }], testId: [{
895
- type: Input
896
- }], itemValue: [{
897
- type: Input
898
- }], type: [{
899
- type: Input
900
- }], minCharactersSearch: [{
901
- type: Input
902
- }], variant: [{
903
- type: Input,
904
- args: [{ required: true }]
905
- }], showBottomContent: [{
906
- type: Input
907
- }], valuePrimitive: [{
908
- type: Input
909
- }], fullWidth: [{
910
- type: HostBinding,
911
- args: ['class.full-width']
912
- }, {
913
- type: Input
914
- }], applicationTheme: [{
915
- type: HostBinding,
916
- args: ['attr.theme']
917
- }, {
918
- type: Input
919
- }], required: [{
920
- type: Input
921
- }], errors: [{
922
- type: Input
923
- }], companyColor: [{
924
- type: Input
925
- }], hideBuiltInErrors: [{
926
- type: Input
927
- }], hideLabelInErrors: [{
928
- type: Input
929
- }], virtualScroll: [{
930
- type: Input,
931
- args: [{ transform: booleanAttribute }]
932
- }], compareWith: [{
933
- type: Input
934
- }], dropdownPanelClass: [{
935
- type: Input
936
- }], closeOnScroll: [{
937
- type: Input
938
- }], size: [{
939
- type: Input
940
- }], allowUserInput: [{
941
- type: Input
942
- }], clearable: [{
943
- type: Input
944
- }], exactMatchSelect: [{
945
- type: Input
946
- }], maxItemSelected: [{
947
- type: Input
948
- }], maxLength: [{
949
- type: Input
950
- }], isDynamicFilteringEnabled: [{
951
- type: Input
952
- }], dynamicFilterLoading: [{
953
- type: Input
954
- }], dynamicFilteredList: [{
955
- type: Input
956
- }], infiniteScroll: [{
957
- type: Input
958
- }], hasMoreOptionsForInfiniteScroll: [{
959
- type: Input
960
- }], selectionChange: [{
961
- type: Output
962
- }], searchTextChange: [{
963
- type: Output
964
- }], blur: [{
965
- type: Output
966
- }], focus: [{
967
- type: Output
968
- }], scrollViewportBottomReached: [{
969
- type: Output
970
- }], scrollViewportBottomReachedFiltered: [{
971
- type: Output
972
- }], formFieldElement: [{
973
- type: ViewChild,
974
- args: ['formField']
975
- }], tagContainer: [{
976
- type: ViewChild,
977
- args: ['tagContainer']
978
- }], autocomplete: [{
979
- type: ViewChild,
980
- args: ['trigger']
981
- }], cdkVirtualScrollViewport: [{
982
- type: ViewChild,
983
- args: [CdkVirtualScrollViewport, { static: false }]
984
- }], matAutocomplete: [{
985
- type: ViewChild,
986
- args: ['autocomplete']
987
- }], matInput: [{
988
- type: ViewChild,
989
- args: ['matInput']
990
- }] } });
991
-
992
- class AutocompleteComponentModule {
993
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
994
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponentModule, declarations: [AutocompleteComponent, TransformItemPipe, IncludesPipe, SelectTextDirective], imports: [CommonModule,
995
- MatFormFieldModule,
996
- MatAutocompleteModule,
997
- MatInputModule,
998
- FormsModule,
999
- TagComponentModule,
1000
- MatChipsModule,
1001
- IconComponentModule,
1002
- UiTranslatePipe,
1003
- ValidationErrorModule,
1004
- HasValidationErrorPipe,
1005
- CdkVirtualForOf,
1006
- CdkVirtualScrollViewport,
1007
- CdkFixedSizeVirtualScroll,
1008
- PreventInputDirective,
1009
- SpinnerComponentModule], exports: [AutocompleteComponent] }); }
1010
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponentModule, providers: [TransformItemPipe, IncludesPipe, SelectTextDirective], imports: [CommonModule,
1011
- MatFormFieldModule,
1012
- MatAutocompleteModule,
1013
- MatInputModule,
1014
- FormsModule,
1015
- TagComponentModule,
1016
- MatChipsModule,
1017
- IconComponentModule,
1018
- ValidationErrorModule,
1019
- CdkVirtualScrollViewport,
1020
- SpinnerComponentModule] }); }
1021
- }
1022
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: AutocompleteComponentModule, decorators: [{
1023
- type: NgModule,
1024
- args: [{
1025
- declarations: [AutocompleteComponent, TransformItemPipe, IncludesPipe, SelectTextDirective],
1026
- imports: [
1027
- CommonModule,
1028
- MatFormFieldModule,
1029
- MatAutocompleteModule,
1030
- MatInputModule,
1031
- FormsModule,
1032
- TagComponentModule,
1033
- MatChipsModule,
1034
- IconComponentModule,
1035
- UiTranslatePipe,
1036
- ValidationErrorModule,
1037
- HasValidationErrorPipe,
1038
- CdkVirtualForOf,
1039
- CdkVirtualScrollViewport,
1040
- CdkFixedSizeVirtualScroll,
1041
- PreventInputDirective,
1042
- SpinnerComponentModule,
1043
- ],
1044
- exports: [AutocompleteComponent],
1045
- providers: [TransformItemPipe, IncludesPipe, SelectTextDirective],
1046
- }]
1047
- }] });
1048
-
1049
- /**
1050
- * Generated bundle index. Do not edit.
1051
- */
1052
-
53
+ var PreventInputDirective = class PreventInputDirective {
54
+ onKeyDown(event) {
55
+ if (![
56
+ "ArrowLeft",
57
+ "ArrowRight",
58
+ "ArrowUp",
59
+ "ArrowDown",
60
+ "Backspace",
61
+ "Tab",
62
+ "Delete",
63
+ "Control",
64
+ "Shift",
65
+ "Alt"
66
+ ].includes(event.key) && !event.ctrlKey && !event.metaKey && this.uiPreventInput) event.preventDefault();
67
+ }
68
+ static {
69
+ this.ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.4",
72
+ ngImport: i0,
73
+ type: PreventInputDirective,
74
+ deps: [],
75
+ target: i0.ɵɵFactoryTarget.Directive
76
+ });
77
+ }
78
+ static {
79
+ this.ɵdir = i0.ɵɵngDeclareDirective({
80
+ minVersion: "14.0.0",
81
+ version: "22.2.4",
82
+ type: PreventInputDirective,
83
+ isStandalone: true,
84
+ selector: "[uiPreventInput]",
85
+ inputs: { uiPreventInput: "uiPreventInput" },
86
+ host: { listeners: { "keydown": "onKeyDown($event)" } },
87
+ ngImport: i0
88
+ });
89
+ }
90
+ };
91
+ i0.ɵɵngDeclareClassMetadata({
92
+ minVersion: "12.0.0",
93
+ version: "22.2.4",
94
+ ngImport: i0,
95
+ type: PreventInputDirective,
96
+ decorators: [{
97
+ type: Directive,
98
+ args: [{
99
+ selector: "[uiPreventInput]",
100
+ standalone: true
101
+ }]
102
+ }],
103
+ propDecorators: {
104
+ uiPreventInput: [{ type: Input }],
105
+ onKeyDown: [{
106
+ type: HostListener,
107
+ args: ["keydown", ["$event"]]
108
+ }]
109
+ }
110
+ });
111
+ var SelectTextDirective = class SelectTextDirective {
112
+ constructor(el) {
113
+ this.el = el;
114
+ }
115
+ setTextColor() {
116
+ const textElement = this.el.nativeElement;
117
+ setTimeout(() => {
118
+ const { textContent } = textElement;
119
+ if (this.selectText && textContent) textElement.innerHTML = textContent.replace(new RegExp(this.selectText, "gmi"), (match) => `<span style="font-weight: bold" >${match}</span>`);
120
+ }, 0);
121
+ }
122
+ ngOnChanges() {
123
+ if (this.selectText) this.setTextColor();
124
+ }
125
+ static {
126
+ this.ɵfac = i0.ɵɵngDeclareFactory({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.4",
129
+ ngImport: i0,
130
+ type: SelectTextDirective,
131
+ deps: [{ token: i0.ElementRef }],
132
+ target: i0.ɵɵFactoryTarget.Directive
133
+ });
134
+ }
135
+ static {
136
+ this.ɵdir = i0.ɵɵngDeclareDirective({
137
+ minVersion: "14.0.0",
138
+ version: "22.2.4",
139
+ type: SelectTextDirective,
140
+ isStandalone: false,
141
+ selector: "[selectText]",
142
+ inputs: { selectText: "selectText" },
143
+ usesOnChanges: true,
144
+ ngImport: i0
145
+ });
146
+ }
147
+ };
148
+ i0.ɵɵngDeclareClassMetadata({
149
+ minVersion: "12.0.0",
150
+ version: "22.2.4",
151
+ ngImport: i0,
152
+ type: SelectTextDirective,
153
+ decorators: [{
154
+ type: Directive,
155
+ args: [{
156
+ selector: "[selectText]",
157
+ standalone: false
158
+ }]
159
+ }],
160
+ ctorParameters: () => [{ type: i0.ElementRef }],
161
+ propDecorators: { selectText: [{ type: Input }] }
162
+ });
163
+ var TransformItemPipe = class TransformItemPipe {
164
+ transform(value, field, getValueList = false) {
165
+ if (getValueList) return AutocompleteUtils.isArray(value) ? value.map((item) => field ? item[field] : item) : field ? value?.[field] : value;
166
+ if (AutocompleteUtils.isPrimitive(value)) return value;
167
+ else if (!AutocompleteUtils.isPrimitive(value) && field && (value?.[field] || value[0][field])) return value?.[field] || value[0][field];
168
+ else AutocompleteUtils.throwInvalidSetupError();
169
+ }
170
+ static {
171
+ this.ɵfac = i0.ɵɵngDeclareFactory({
172
+ minVersion: "12.0.0",
173
+ version: "22.2.4",
174
+ ngImport: i0,
175
+ type: TransformItemPipe,
176
+ deps: [],
177
+ target: i0.ɵɵFactoryTarget.Pipe
178
+ });
179
+ }
180
+ static {
181
+ this.ɵpipe = i0.ɵɵngDeclarePipe({
182
+ minVersion: "14.0.0",
183
+ version: "22.2.4",
184
+ ngImport: i0,
185
+ type: TransformItemPipe,
186
+ isStandalone: false,
187
+ name: "transformItem"
188
+ });
189
+ }
190
+ };
191
+ i0.ɵɵngDeclareClassMetadata({
192
+ minVersion: "12.0.0",
193
+ version: "22.2.4",
194
+ ngImport: i0,
195
+ type: TransformItemPipe,
196
+ decorators: [{
197
+ type: Pipe,
198
+ args: [{
199
+ name: "transformItem",
200
+ standalone: false
201
+ }]
202
+ }]
203
+ });
204
+ var IncludesPipe = class IncludesPipe {
205
+ transform(value, values, valueField) {
206
+ return Array.isArray(values) ? Boolean(values?.find((v) => valueField ? v?.[valueField] === value?.[valueField] : value === v)) : valueField ? value?.[valueField] === values?.[valueField] : value === values;
207
+ }
208
+ static {
209
+ this.ɵfac = i0.ɵɵngDeclareFactory({
210
+ minVersion: "12.0.0",
211
+ version: "22.2.4",
212
+ ngImport: i0,
213
+ type: IncludesPipe,
214
+ deps: [],
215
+ target: i0.ɵɵFactoryTarget.Pipe
216
+ });
217
+ }
218
+ static {
219
+ this.ɵpipe = i0.ɵɵngDeclarePipe({
220
+ minVersion: "14.0.0",
221
+ version: "22.2.4",
222
+ ngImport: i0,
223
+ type: IncludesPipe,
224
+ isStandalone: false,
225
+ name: "includes"
226
+ });
227
+ }
228
+ };
229
+ i0.ɵɵngDeclareClassMetadata({
230
+ minVersion: "12.0.0",
231
+ version: "22.2.4",
232
+ ngImport: i0,
233
+ type: IncludesPipe,
234
+ decorators: [{
235
+ type: Pipe,
236
+ args: [{
237
+ name: "includes",
238
+ standalone: false
239
+ }]
240
+ }]
241
+ });
242
+ var AutocompleteComponent = class AutocompleteComponent {
243
+ set itemValue(v) {
244
+ this.value = AutocompleteUtils.isArray(v) ? v : v ? [v] : [];
245
+ }
246
+ set errors(errors) {
247
+ this.safeErrors = errors?.filter(Boolean) ?? [];
248
+ }
249
+ set cdkVirtualScrollViewport(viewport) {
250
+ if (this.savedVirtualScrollSubscription) this.savedVirtualScrollSubscription.unsubscribe();
251
+ if (viewport) {
252
+ this.savedVirtualScrollViewport = viewport;
253
+ if (this.infiniteScroll) {
254
+ setTimeout(() => {
255
+ this.inputValueSearch$.pipe(take(1)).subscribe((searchValue) => {
256
+ this.isFilteredViewport = !!searchValue;
257
+ });
258
+ }, 0);
259
+ this.savedVirtualScrollSubscription = this.savedVirtualScrollViewport.elementScrolled().pipe(map(() => this.savedVirtualScrollViewport.measureScrollOffset("bottom")), filter((offset) => offset < this.savedVirtualScrollViewport.getViewportSize() * .2), throttleTime(200), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
260
+ if (this.isFilteredViewport) this.scrollViewportBottomReachedFiltered.emit();
261
+ else this.scrollViewportBottomReached.emit();
262
+ });
263
+ }
264
+ }
265
+ }
266
+ constructor() {
267
+ this.itemsList = [];
268
+ this.suggestionsList = [];
269
+ this.disabled = false;
270
+ this.allowAdd = true;
271
+ this.textField = "";
272
+ this.valueField = "";
273
+ this.label = "";
274
+ this.placeholder = "";
275
+ this.testId = null;
276
+ this.type = "multi";
277
+ this.minCharactersSearch = 3;
278
+ this.variant = DropdownVariation.AUTOCOMPLETE;
279
+ this.showBottomContent = true;
280
+ this.valuePrimitive = false;
281
+ this.fullWidth = false;
282
+ this.applicationTheme = "light";
283
+ this.companyColor = "#FFF2FC";
284
+ this.hideBuiltInErrors = false;
285
+ this.hideLabelInErrors = false;
286
+ this.virtualScroll = false;
287
+ this.dropdownPanelClass = "";
288
+ this.closeOnScroll = false;
289
+ this.size = "medium";
290
+ this.allowUserInput = true;
291
+ this.clearable = true;
292
+ this.exactMatchSelect = true;
293
+ this.maxItemSelected = Infinity;
294
+ this.isDynamicFilteringEnabled = false;
295
+ this.dynamicFilterLoading = false;
296
+ this.dynamicFilteredList = null;
297
+ this.infiniteScroll = false;
298
+ this.hasMoreOptionsForInfiniteScroll = true;
299
+ this.selectionChange = new EventEmitter();
300
+ this.searchTextChange = new EventEmitter();
301
+ this.blur = new EventEmitter();
302
+ this.focus = new EventEmitter();
303
+ this.scrollViewportBottomReached = new EventEmitter();
304
+ this.scrollViewportBottomReachedFiltered = new EventEmitter();
305
+ this.safeErrors = [];
306
+ this.inputValue = "";
307
+ this.isInputFocus = false;
308
+ this.autocompleteType = Autocomplete;
309
+ this.isOverLapping = false;
310
+ this.isOverlapChecking = true;
311
+ this.overlapIndex = 0;
312
+ this.inputOpacity = 1;
313
+ this.firstTagMaxWidth = 0;
314
+ this.inputValueSearch$ = new BehaviorSubject("");
315
+ this.userInput$ = new ReplaySubject(1);
316
+ this.dynamicFilteredList$ = new BehaviorSubject(null);
317
+ this.filteredItemsList$ = this.inputValueSearch$.pipe(startWith(""), map((inputValue) => inputValue.length ? AutocompleteUtils.filterItems(this.itemsList, inputValue, this.textField, this.isGrouped) : null));
318
+ this.filteredSuggestionList$ = this.inputValueSearch$.pipe(map((inputValue) => inputValue.length ? AutocompleteUtils.filterItems(this.suggestionsList, inputValue, this.textField) : null));
319
+ this.isFilteredViewport = false;
320
+ this.scrollEvent = (event) => {
321
+ const isNotAutocompleteScroll = !event.target?.id?.includes("mat-autocomplete-") && !event.target?.parentElement?.id?.includes("mat-autocomplete-") && !event.target?.classList?.contains("mat-mdc-autocomplete-trigger");
322
+ if (this.autocomplete.panelOpen && isNotAutocompleteScroll) this.autocomplete.closePanel();
323
+ };
324
+ this.searchResult$ = this.inputValueSearch$.pipe(map((inputValue) => !!inputValue.trim()));
325
+ this.translationContext = "AUTOCOMPLETE.";
326
+ this.AutocompleteUtils = AutocompleteUtils;
327
+ this.defaultAppTheme = inject("CANOPYUI_DEFAULT_APPLICATION_THEME", { optional: true });
328
+ this.cdr = inject(ChangeDetectorRef);
329
+ this.ngControl = inject(NgControl, {
330
+ optional: true,
331
+ self: true
332
+ });
333
+ this.platformId = inject(PLATFORM_ID);
334
+ this.el = inject(ElementRef);
335
+ this.focusMonitor = inject(FocusMonitor);
336
+ this.destroyRef = inject(DestroyRef);
337
+ this.ngZone = inject(NgZone);
338
+ this.isPlatform = isPlatformBrowser(this.platformId);
339
+ this.keyboardFocused = signal(false, ...ngDevMode ? [{ debugName: "keyboardFocused" }] : /* istanbul ignore next */ []);
340
+ this.isAlreadyAdded = false;
341
+ this.onChange = (_) => {};
342
+ this.onTouch = () => {};
343
+ this.trackByFn = (index, value) => value;
344
+ if (this.ngControl != null) this.ngControl.valueAccessor = this;
345
+ if (this.defaultAppTheme) this.applicationTheme = this.defaultAppTheme;
346
+ this.subscriberDisplayChange();
347
+ }
348
+ ngOnInit() {
349
+ if (this.isDynamicFilteringEnabled) this.filteredItemsList$ = this.dynamicFilteredList$;
350
+ }
351
+ ngDoCheck() {
352
+ if (this.ngControl?.touched || this.ngControl?.errors) this.cdr.markForCheck();
353
+ }
354
+ ngOnChanges(changes) {
355
+ if (this.isDynamicFilteringEnabled) {
356
+ const dynamicFilteredList = changes["dynamicFilteredList"]?.currentValue;
357
+ if (dynamicFilteredList) this.dynamicFilteredList$.next(dynamicFilteredList);
358
+ return;
359
+ }
360
+ if (changes["itemsList"] || changes["suggestionsList"] || changes["valueField"]) {
361
+ this.itemsList = this.isGrouped ? this.itemsList : AutocompleteUtils.excludeSuggestions(this.itemsList, this.suggestionsList, this.valueField);
362
+ this.initValue();
363
+ }
364
+ if (this.isPlatform && changes["companyColor"]) this.setCompanyColorVariable();
365
+ }
366
+ ngAfterViewInit() {
367
+ if (this.type !== Autocomplete.LARGE) this.checkOverlap(Timeout.VIEW_INITIALIZED_COMPONENT_LOAD, true);
368
+ if (this.isPlatform) this.setCompanyColorVariable();
369
+ if (this.closeOnScroll) window.addEventListener("scroll", this.scrollEvent, true);
370
+ this.focusMonitor.monitor(this.matInput).pipe(takeUntilDestroyed(this.destroyRef)).subscribe((origin) => this.ngZone.run(() => {
371
+ this.keyboardFocused.set(origin === "keyboard");
372
+ }));
373
+ this.matInput.nativeElement.onkeydown = this.onKeydown.bind(this);
374
+ }
375
+ ngOnDestroy() {
376
+ window.removeEventListener("scroll", this.scrollEvent, true);
377
+ if (this.observer) this.observer.disconnect();
378
+ }
379
+ registerOnChange(fn) {
380
+ this.onChange = fn;
381
+ }
382
+ registerOnTouched(fn) {
383
+ this.onTouch = fn;
384
+ }
385
+ setDisabledState(isDisabled) {
386
+ this.disabled = isDisabled;
387
+ this.cdr.markForCheck();
388
+ }
389
+ writeValue(value) {
390
+ if (this.valuePrimitive && this.textField && this.valueField) {
391
+ if (this.type === Autocomplete.SINGLE) this.value = this.itemsList.find((item) => item[this.valueField] === value);
392
+ else {
393
+ this.value = AutocompleteUtils.isArray(value) ? this.itemsList.filter((item) => value.find((v) => v === item[this.valueField])) : [this.itemsList.find((item) => item[this.valueField] === value)];
394
+ this.value = this.value.filter(Boolean).length ? this.value : null;
395
+ }
396
+ } else this.value = value;
397
+ this.initValue();
398
+ this.cdr.markForCheck();
399
+ }
400
+ get isGrouped() {
401
+ return this.itemsList?.some((item) => item.isGroup);
402
+ }
403
+ onOptionSelected(event) {
404
+ const inputValue = event.option.value;
405
+ const itemValue = AutocompleteUtils.createValueItem(inputValue, this.textField, this.valueField);
406
+ this.addNewValue(itemValue);
407
+ if (this.type === this.autocompleteType.MULTI) this.checkOverlap();
408
+ queueMicrotask(() => {
409
+ if (this.type !== this.autocompleteType.SINGLE) this.inputValue = "";
410
+ else this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
411
+ this.cdr.markForCheck();
412
+ });
413
+ this.onUpdate();
414
+ }
415
+ onOptionRemoved(option) {
416
+ setTimeout(() => this.autocomplete.closePanel(), 0);
417
+ const foundValue = this.value.find((v) => this.compareWith ? this.compareWith(v, option) : v === option);
418
+ if (foundValue) {
419
+ this.value = this.value.filter((v) => this.compareWith ? !this.compareWith(v, option) : v !== option);
420
+ this.matAutocomplete.options.forEach((matOption) => {
421
+ if (matOption.value?.value === foundValue.value) matOption.deselect();
422
+ });
423
+ }
424
+ if (this.type === this.autocompleteType.MULTI) this.checkOverlap();
425
+ if (!this.value.length) this.inputValue = "";
426
+ this.onUpdate();
427
+ }
428
+ onInputChange(event) {
429
+ const inputValue = event.target.value;
430
+ this.userInput$.next(inputValue);
431
+ if (inputValue.length >= this.minCharactersSearch) {
432
+ this.inputValueSearch$.next(inputValue);
433
+ this.searchTextChange.emit(inputValue);
434
+ const itemList = this.isGrouped ? this.itemsList.flatMap((groups) => groups.items) : this.itemsList.flat();
435
+ const findValue = [...this.suggestionsList, ...itemList].find((v) => inputValue === (this.textField ? v[this.textField] : v));
436
+ const count = AutocompleteUtils.countMatchingWords([...this.suggestionsList, ...itemList], this.inputValue, this.textField);
437
+ if (findValue && count === 1 && this.exactMatchSelect) this.onOptionSelected({ option: { value: findValue } });
438
+ } else {
439
+ this.inputValueSearch$.next("");
440
+ this.userInput$.next("");
441
+ }
442
+ this.isAlreadyAdded = !!(this.compareWith ? this.value.find((v) => this.compareWith(v, inputValue)) : AutocompleteUtils.findDuplicate(this.value, inputValue, this.textField));
443
+ }
444
+ onClear() {
445
+ this.inputValue = "";
446
+ this.value = AutocompleteUtils.isArray(this.value) ? [] : "";
447
+ this.isOverLapping = false;
448
+ this.overlapIndex = 0;
449
+ this.onUpdate();
450
+ this.matAutocomplete?.options.forEach((option) => option.deselect());
451
+ this.onTouch();
452
+ }
453
+ refillInput() {
454
+ setTimeout(() => {
455
+ if (this.value && this.type === this.autocompleteType.SINGLE && !this.inputValue) this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
456
+ else if (!this.inputValue && this.value?.length) this.inputValue = " ";
457
+ else if (this.inputValue && this.type === Autocomplete.SINGLE && this.value && Object.keys(this.value).length) this.inputValue = AutocompleteUtils.transformDisplayValue(AutocompleteUtils.isArray(this.value) ? this.value[0] : this.value, this.textField);
458
+ else if (this.inputValue) this.inputValue = " ";
459
+ this.inputValueSearch$.next("");
460
+ this.userInput$.next("");
461
+ this.isInputFocus = false;
462
+ this.onTouch();
463
+ this.blur.emit();
464
+ }, 0);
465
+ }
466
+ gotoUp() {
467
+ if (this.savedVirtualScrollViewport) {
468
+ this.savedVirtualScrollViewport.scrollToIndex(0);
469
+ this.savedVirtualScrollViewport.checkViewportSize();
470
+ }
471
+ }
472
+ onFocus() {
473
+ this.isInputFocus = true;
474
+ const inputValue = AutocompleteUtils.isArray(this.inputValue) ? this.inputValue[0] : this.inputValue;
475
+ if (AutocompleteUtils.isPrimitive(inputValue)) {
476
+ if (typeof inputValue !== "number" && inputValue?.match(/^\s+/gm)) this.inputValue = inputValue.trimStart();
477
+ } else if (inputValue[this.textField]?.match(/^\s+/gm)) this.inputValue = inputValue[this.textField].trimStart();
478
+ this.focus.emit();
479
+ }
480
+ checkOverlap(delay = Timeout.VIEW_INITIALIZED_AFTER_ACTION, init = false) {
481
+ this.isOverLapping = false;
482
+ this.isOverlapChecking = true;
483
+ this.inputOpacity = 0;
484
+ setTimeout(() => {
485
+ const inputWidth = this.inputWidth;
486
+ const tags = this.tagContainer?.nativeElement.querySelectorAll(".value-tag");
487
+ if (tags) {
488
+ let width = 0;
489
+ tags.forEach((tag, index) => {
490
+ width += tag.getBoundingClientRect().width;
491
+ const inpWidth = this.formFieldElement?.nativeElement.getBoundingClientRect().width - 20;
492
+ this.firstTagMaxWidth = tags.length > 1 ? inpWidth - (this.variant === DropdownVariation.DROPDOWN ? Padding.DROPDOWN_SPACE_CONTAINER : Padding.AUTOCOMPLETE_SPACE_CONTAINER) : inpWidth;
493
+ if (!this.isOverLapping && width > inputWidth && index > 0) {
494
+ this.isOverLapping = true;
495
+ this.overlapIndex = index;
496
+ }
497
+ });
498
+ this.isOverlapChecking = false;
499
+ if (init) {
500
+ if (this.type === this.autocompleteType.SINGLE) this.inputValue = AutocompleteUtils.transformDisplayValue(this.value[0], this.textField);
501
+ else if (this.value?.length) this.inputValue = " ";
502
+ }
503
+ const tagContainerWidth = this.tagContainer.nativeElement.getBoundingClientRect().width;
504
+ this.tagContainer.nativeElement.style.maxWidth = tagContainerWidth / 100 ? "100%" : `${tagContainerWidth}px`;
505
+ this.cdr.markForCheck();
506
+ }
507
+ this.inputOpacity = 1;
508
+ }, delay);
509
+ }
510
+ onUpdate() {
511
+ this.inputValueSearch$.next("");
512
+ this.userInput$.next("");
513
+ if (!this.valuePrimitive) this.onChange(this.value);
514
+ else if (this.type === Autocomplete.SINGLE) this.onChange(this.value[this.valueField]);
515
+ else this.onChange(this.value.map((v) => v[this.valueField]));
516
+ this.updateControlMaxLengthValidity();
517
+ this.selectionChange.emit(this.value);
518
+ }
519
+ updateControlMaxLengthValidity() {
520
+ const control = this.ngControl?.control;
521
+ if (!control) return;
522
+ if (this.type !== Autocomplete.SINGLE) {
523
+ const existingErrors = control.errors ?? {};
524
+ if (this.value.length > this.maxItemSelected) {
525
+ control.setErrors({
526
+ ...existingErrors,
527
+ maxItemSelected: {
528
+ expected: this.maxItemSelected,
529
+ actual: this.value.length
530
+ }
531
+ });
532
+ control.markAsTouched();
533
+ } else if (existingErrors["maxItemSelected"]) {
534
+ delete existingErrors["maxItemSelected"];
535
+ control.setErrors(Object.keys(existingErrors).length ? existingErrors : null);
536
+ }
537
+ }
538
+ }
539
+ initValue() {
540
+ if (this.type === this.autocompleteType.SINGLE && this.variant !== DropdownVariation.DROPDOWN) {
541
+ if (AutocompleteUtils.isArray(this.value)) this.inputValue = AutocompleteUtils.transformDisplayValue(this.value[0], this.textField);
542
+ else this.inputValue = this.value ? AutocompleteUtils.transformDisplayValue(this.value, this.textField) : "";
543
+ } else if (this.variant === DropdownVariation.DROPDOWN) this.inputValue = AutocompleteUtils.isArray(this.value) && !this.value?.length || !this.value ? "" : this.type === Autocomplete.SINGLE ? AutocompleteUtils.transformDisplayValue(AutocompleteUtils.isArray(this.value) ? this.value[0] : this.value, this.textField) : " ";
544
+ else this.inputValue = this.value?.length ? " " : "";
545
+ if (this.type === this.autocompleteType.MULTI) this.checkOverlap();
546
+ }
547
+ addNewValue(newValue) {
548
+ if (this.type !== this.autocompleteType.SINGLE && !this.value) this.value = [];
549
+ const foundDuplicate = this.compareWith ? this.value.find((v) => this.compareWith(v, newValue)) : AutocompleteUtils.findDuplicate(this.value, newValue, this.textField);
550
+ if (this.type !== this.autocompleteType.SINGLE) this.value = foundDuplicate ? this.value.filter((v) => this.compareWith ? !this.compareWith(v, foundDuplicate) : v !== foundDuplicate) : [...this.value, newValue];
551
+ else this.value = newValue;
552
+ }
553
+ get isDropdown() {
554
+ return this.variant === DropdownVariation.DROPDOWN;
555
+ }
556
+ onChevronClick(autocomplete) {
557
+ if (autocomplete.isOpen) setTimeout(() => {
558
+ this.autocomplete.closePanel();
559
+ }, 0);
560
+ }
561
+ get inputWidth() {
562
+ return this.formFieldElement?.nativeElement.getBoundingClientRect().width - (this.isDropdown ? Padding.DROPDOWN_CONTAINER : Padding.AUTOCOMPLETE_CONTAINER);
563
+ }
564
+ setCompanyColorVariable() {
565
+ document.body.style.setProperty("--ui-autocomplete-option-color", `${this.companyColor}`);
566
+ }
567
+ subscriberDisplayChange() {
568
+ const autocompleteHostElement = this.el.nativeElement;
569
+ this.observer = new MutationObserver((mutations) => {
570
+ mutations.forEach((mutation) => {
571
+ if (mutation.attributeName === "style") {
572
+ if (getComputedStyle(autocompleteHostElement).display !== "none") this.checkOverlap();
573
+ }
574
+ });
575
+ });
576
+ this.observer.observe(autocompleteHostElement, {
577
+ attributes: true,
578
+ attributeFilter: ["style"]
579
+ });
580
+ }
581
+ get hasObjectValue() {
582
+ return this.value ? !!Object.keys(this.value).length : false;
583
+ }
584
+ onKeydown($event) {
585
+ const optionHeight = 48;
586
+ if ($event.key === IKeyboardEvent.HOME) this.matAutocomplete._keyManager.setFirstItemActive();
587
+ else if ($event.key === IKeyboardEvent.END) this.matAutocomplete._keyManager.setLastItemActive();
588
+ else if ($event.key === IKeyboardEvent.PAGE_DOWN) {
589
+ this.matAutocomplete._keyManager.setNextItemActive();
590
+ this.matAutocomplete._keyManager.setNextItemActive();
591
+ this.matAutocomplete._keyManager.setNextItemActive();
592
+ } else if ($event.key === IKeyboardEvent.PAGE_UP) {
593
+ this.matAutocomplete._keyManager.setPreviousItemActive();
594
+ this.matAutocomplete._keyManager.setPreviousItemActive();
595
+ this.matAutocomplete._keyManager.setPreviousItemActive();
596
+ }
597
+ this.matAutocomplete._setScrollTop((this.matAutocomplete._keyManager.activeItemIndex ?? 0) * optionHeight);
598
+ }
599
+ getVirtualScrollHeight(itemCount) {
600
+ const itemHeight = 48;
601
+ const maxHeight = 200;
602
+ const minHeight = 48;
603
+ const calculatedHeight = itemCount * itemHeight;
604
+ return Math.min(Math.max(calculatedHeight, minHeight), maxHeight);
605
+ }
606
+ static {
607
+ this.ɵfac = i0.ɵɵngDeclareFactory({
608
+ minVersion: "12.0.0",
609
+ version: "22.2.4",
610
+ ngImport: i0,
611
+ type: AutocompleteComponent,
612
+ deps: [],
613
+ target: i0.ɵɵFactoryTarget.Component
614
+ });
615
+ }
616
+ static {
617
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
618
+ minVersion: "17.0.0",
619
+ version: "22.2.4",
620
+ type: AutocompleteComponent,
621
+ isStandalone: false,
622
+ selector: "ui-autocomplete",
623
+ inputs: {
624
+ itemsList: "itemsList",
625
+ suggestionsList: "suggestionsList",
626
+ disabled: "disabled",
627
+ allowAdd: "allowAdd",
628
+ textField: "textField",
629
+ valueField: "valueField",
630
+ label: "label",
631
+ placeholder: "placeholder",
632
+ testId: "testId",
633
+ itemValue: "itemValue",
634
+ type: "type",
635
+ minCharactersSearch: "minCharactersSearch",
636
+ variant: "variant",
637
+ showBottomContent: "showBottomContent",
638
+ valuePrimitive: "valuePrimitive",
639
+ fullWidth: "fullWidth",
640
+ applicationTheme: "applicationTheme",
641
+ required: "required",
642
+ errors: "errors",
643
+ companyColor: "companyColor",
644
+ hideBuiltInErrors: "hideBuiltInErrors",
645
+ hideLabelInErrors: "hideLabelInErrors",
646
+ virtualScroll: [
647
+ "virtualScroll",
648
+ "virtualScroll",
649
+ booleanAttribute
650
+ ],
651
+ compareWith: "compareWith",
652
+ dropdownPanelClass: "dropdownPanelClass",
653
+ closeOnScroll: "closeOnScroll",
654
+ size: "size",
655
+ allowUserInput: "allowUserInput",
656
+ clearable: "clearable",
657
+ exactMatchSelect: "exactMatchSelect",
658
+ maxItemSelected: "maxItemSelected",
659
+ maxLength: "maxLength",
660
+ isDynamicFilteringEnabled: "isDynamicFilteringEnabled",
661
+ dynamicFilterLoading: "dynamicFilterLoading",
662
+ dynamicFilteredList: "dynamicFilteredList",
663
+ infiniteScroll: "infiniteScroll",
664
+ hasMoreOptionsForInfiniteScroll: "hasMoreOptionsForInfiniteScroll"
665
+ },
666
+ outputs: {
667
+ selectionChange: "selectionChange",
668
+ searchTextChange: "searchTextChange",
669
+ blur: "blur",
670
+ focus: "focus",
671
+ scrollViewportBottomReached: "scrollViewportBottomReached",
672
+ scrollViewportBottomReachedFiltered: "scrollViewportBottomReachedFiltered"
673
+ },
674
+ host: { properties: {
675
+ "class.full-width": "this.fullWidth",
676
+ "attr.theme": "this.applicationTheme"
677
+ } },
678
+ viewQueries: [
679
+ {
680
+ propertyName: "formFieldElement",
681
+ first: true,
682
+ predicate: ["formField"],
683
+ descendants: true
684
+ },
685
+ {
686
+ propertyName: "tagContainer",
687
+ first: true,
688
+ predicate: ["tagContainer"],
689
+ descendants: true
690
+ },
691
+ {
692
+ propertyName: "autocomplete",
693
+ first: true,
694
+ predicate: ["trigger"],
695
+ descendants: true
696
+ },
697
+ {
698
+ propertyName: "cdkVirtualScrollViewport",
699
+ first: true,
700
+ predicate: CdkVirtualScrollViewport,
701
+ descendants: true
702
+ },
703
+ {
704
+ propertyName: "matAutocomplete",
705
+ first: true,
706
+ predicate: ["autocomplete"],
707
+ descendants: true
708
+ },
709
+ {
710
+ propertyName: "matInput",
711
+ first: true,
712
+ predicate: ["matInput"],
713
+ descendants: true
714
+ }
715
+ ],
716
+ usesOnChanges: true,
717
+ ngImport: i0,
718
+ template: "<ng-container>\n <div class=\"autocomplete-wrapper\" [ngClass]=\"{ 'full-width': fullWidth, disabled: disabled }\">\n <mat-form-field\n [color]=\"\n safeErrors.length ||\n (ngControl?.errors && ngControl?.touched) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ? 'warn'\n : 'accent'\n \"\n [appearance]=\"'outline'\"\n [ngClass]=\"{\n 'large-size': type === autocompleteType.LARGE,\n 'hide-bottom-content': !showBottomContent,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n @if (label) {\n <mat-label\n >{{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n }\n <div #formField class=\"input-container\">\n @if (textField ? value?.[textField] : value === inputValue) {\n <span style=\"position: absolute; left: -9999px\" aria-live=\"polite\">{{\n ('SELECTED' | uiTranslate | async) + ' ' + inputValue\n }}</span>\n }\n\n <input\n [attr.data-testid]=\"testId ?? 'autocomplete-input'\"\n #trigger=\"matAutocompleteTrigger\"\n #matInput\n [attr.maxlength]=\"maxLength !== null && maxLength !== undefined ? maxLength : null\"\n [uiPreventInput]=\"!allowUserInput\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': value && type === autocompleteType.LARGE, 'no-caret': !allowUserInput }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n [attr.aria-label]=\"\n (translationContext + 'SELECTED' | uiTranslate | async) + ' ' + (value | transformItem: textField : true)\n \"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n matInput\n [placeholder]=\"value && value.length ? '' : placeholder\"\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n @if (\n (type === autocompleteType.LARGE && value) ||\n (!(inputValue && isInputFocus) && value && type !== autocompleteType.SINGLE)\n ) {\n <div class=\"selected-items\" #tagContainer>\n @for (valueItem of value; track valueItem; let i = $index) {\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [isDisabled]=\"disabled\"\n [applicationTheme]=\"applicationTheme\"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n [style.display]=\"\n (isOverLapping && i > 0 && i >= overlapIndex) || (size === 'small' && value.length > 1)\n ? 'none'\n : 'block'\n \"\n [ngStyle]=\"{\n '--tag-max-width': type === autocompleteType.LARGE ? 'fit-content' : firstTagMaxWidth + 'px',\n }\"\n [ngClass]=\"{\n 'overlap-tag':\n isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI,\n }\"\n (close)=\"onOptionRemoved(valueItem)\"\n ></ui-tag>\n }\n @if (size === 'small') {\n @if (value.length > 1) {\n <div class=\"selected-count\">\n {{\n translationContext + 'SELECTED_AMOUNT'\n | uiTranslate: { numberSelected: (value | slice: overlapIndex).length }\n | async\n }}\n </div>\n }\n } @else {\n @if (value.length > 1 && isOverLapping) {\n <div class=\"overlap-count\">\n <ui-tag\n [applicationTheme]=\"applicationTheme\"\n [isDisabled]=\"disabled\"\n [label]=\"'+' + (value.length - overlapIndex)\"\n ></ui-tag>\n </div>\n }\n }\n </div>\n }\n </div>\n\n @if (\n (clearable && type === autocompleteType.SINGLE && (value?.length || hasObjectValue)) ||\n (type !== autocompleteType.SINGLE &&\n value &&\n value.length > 1 &&\n ((AutocompleteUtils.isPrimitive(value) && value.length) ||\n (!AutocompleteUtils.isPrimitive(value) &&\n ((AutocompleteUtils.isArray(value) && value.length) ||\n (!AutocompleteUtils.isArray(value) && !value.length)))))\n ) {\n <ui-icon\n class=\"remove-selected\"\n [tabIndex]=\"disabled ? -1 : 0\"\n (keydown.enter)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n (keydown.space)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [size]=\"'24'\"\n [color]=\"applicationTheme === 'classic' ? 'inherit' : 'rebrand-black'\"\n [attr.aria-label]=\"'COMMON.CLEAR' | uiTranslate | async\"\n [name]=\"applicationTheme === 'classic' ? 'Close' : 'Close-in-line'\"\n ></ui-icon>\n }\n\n @if (isDropdown) {\n <ui-icon\n class=\"arrow-state\"\n [ngClass]=\"{ opened: autocomplete.isOpen, 'large-input-icon': type === autocompleteType.LARGE }\"\n [size]=\"'24'\"\n [name]=\"applicationTheme !== 'classic' ? 'Arrow-chevron-down-in-line' : 'Arrow_down'\"\n (click)=\"onChevronClick(autocomplete)\"\n ></ui-icon>\n }\n\n <mat-autocomplete\n #autocomplete\n [class]=\"applicationTheme + ' ' + dropdownPanelClass\"\n (optionSelected)=\"onOptionSelected($event)\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [hideSingleSelectionIndicator]=\"false\"\n (opened)=\"gotoUp()\"\n >\n @if (type !== autocompleteType.MULTI || value?.length < maxItemSelected) {\n @if ((searchResult$ | async) === false) {\n @if (!isDropdown) {\n @if (suggestionsList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (suggested of suggestionsList; track suggested) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': suggested | includes: value : valueField }\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"userInput$ | async\">{{ suggested | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (value?.length && type !== autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n @for (item of value; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (isGrouped) {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (value?.length && type === autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n <mat-option (mousedown)=\"$event.preventDefault()\" [class]=\"'selected-option'\" [value]=\"value\">\n <span [selectText]=\"userInput$ | async\">{{ value | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n } @else {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(itemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (!isGrouped) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of itemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n @if (infiniteScroll && hasMoreOptionsForInfiniteScroll) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (!isGrouped) {\n @for (item of itemsList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n }\n }\n }\n\n @if (filteredSuggestionList$ | async; as filteredSuggestionList) {\n @if (filteredItemsList$ | async; as filteredItemsList) {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(filteredItemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (item of filteredSuggestionList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n }\n }\n }\n }\n </mat-autocomplete>\n @if (\n safeErrors.length ||\n ($safeNavigationMigration(ngControl?.errors) | hasValidationError) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <mat-hint class=\"error\">\n @if (\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContext + 'MAX_SELECTED_ERROR' | uiTranslate: { max: maxItemSelected } | async\n }}</span>\n </div>\n }\n @if (safeErrors.length) {\n @for (error of safeErrors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n </div>\n</ng-container>\n",
719
+ styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:320px;display:block}:host.full-width{width:100%}:host ui-tag{height:32px;margin:4px}:host ui-tag ::ng-deep .tag-container{margin:0!important}:host ui-tag ::ng-deep .tag-wrapper{max-width:fit-content}.large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:flex;flex-direction:column-reverse}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled *{pointer-events:none}.input-container{width:100%;margin:auto;display:flex;flex-direction:row-reverse}.input-container .selected-items{display:flex;padding-left:4px}.input-container .selected-items .selected-count{white-space:nowrap}.input-container .selected-items .value-tag{max-width:var(--tag-max-width)}.input-container .selected-items .value-tag ::ng-deep .tag-container{max-width:var(--tag-max-width)}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px}.input-container .selected-items .overlap-count ui-tag{display:block}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:6px}.input-container input.unset-margin{margin-top:unset}.input-container input.no-caret{cursor:pointer;caret-color:transparent!important}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer;margin-right:2px;border-radius:50px;height:fit-content}.remove-selected.large-input-icon{margin-top:10px}.arrow-state{height:24px;cursor:pointer}.arrow-state.large-input-icon{margin-top:10px}.arrow-state.opened{transform:rotateX(180deg)}::ng-deep .autocomplete-wrapper .mat-mdc-form-field{width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#cb7b7a}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors ui-icon{margin-right:8px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-bottom-align:before{height:0}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper{padding:0 0 12px;font-size:12px;line-height:16px;position:relative}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper .mat-form-field-hint-spacer{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field.hide-bottom-content .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper{padding-left:12px!important;height:unset!important;max-height:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-infix,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#e9f0f1!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option{background:#e9f0f1}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mat-mdc-optgroup-label{font-weight:700!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}.active-field .mdc-notched-outline__leading{border-left-width:2px;border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__notch{border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__trailing{border-top-width:2px;border-bottom-width:2px;border-right-width:2px}.loading-option{display:flex}.loading-option .loading-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;position:absolute;top:0;left:0}\n"],
720
+ dependencies: [
721
+ {
722
+ kind: "directive",
723
+ type: i1.NgClass,
724
+ selector: "[ngClass]",
725
+ inputs: ["class", "ngClass"]
726
+ },
727
+ {
728
+ kind: "directive",
729
+ type: i1.NgStyle,
730
+ selector: "[ngStyle]",
731
+ inputs: ["ngStyle"]
732
+ },
733
+ {
734
+ kind: "component",
735
+ type: i2.MatFormField,
736
+ selector: "mat-form-field",
737
+ inputs: [
738
+ "hideRequiredMarker",
739
+ "color",
740
+ "floatLabel",
741
+ "appearance",
742
+ "subscriptSizing",
743
+ "hintLabel"
744
+ ],
745
+ exportAs: ["matFormField"]
746
+ },
747
+ {
748
+ kind: "directive",
749
+ type: i2.MatLabel,
750
+ selector: "mat-label"
751
+ },
752
+ {
753
+ kind: "directive",
754
+ type: i2.MatHint,
755
+ selector: "mat-hint",
756
+ inputs: ["align", "id"]
757
+ },
758
+ {
759
+ kind: "component",
760
+ type: i3.MatAutocomplete,
761
+ selector: "mat-autocomplete",
762
+ inputs: [
763
+ "aria-label",
764
+ "aria-labelledby",
765
+ "displayWith",
766
+ "autoActiveFirstOption",
767
+ "autoSelectActiveOption",
768
+ "requireSelection",
769
+ "panelWidth",
770
+ "disableRipple",
771
+ "class",
772
+ "hideSingleSelectionIndicator"
773
+ ],
774
+ outputs: [
775
+ "optionSelected",
776
+ "opened",
777
+ "closed",
778
+ "optionActivated"
779
+ ],
780
+ exportAs: ["matAutocomplete"]
781
+ },
782
+ {
783
+ kind: "component",
784
+ type: i3.MatOption,
785
+ selector: "mat-option",
786
+ inputs: [
787
+ "value",
788
+ "id",
789
+ "disabled"
790
+ ],
791
+ outputs: ["onSelectionChange"],
792
+ exportAs: ["matOption"]
793
+ },
794
+ {
795
+ kind: "component",
796
+ type: i3.MatOptgroup,
797
+ selector: "mat-optgroup",
798
+ inputs: ["label", "disabled"],
799
+ exportAs: ["matOptgroup"]
800
+ },
801
+ {
802
+ kind: "directive",
803
+ type: i3.MatAutocompleteTrigger,
804
+ selector: "input[matAutocomplete], textarea[matAutocomplete]",
805
+ inputs: [
806
+ "matAutocomplete",
807
+ "matAutocompletePosition",
808
+ "matAutocompleteConnectedTo",
809
+ "autocomplete",
810
+ "matAutocompleteDisabled"
811
+ ],
812
+ exportAs: ["matAutocompleteTrigger"]
813
+ },
814
+ {
815
+ kind: "directive",
816
+ type: i4.MatInput,
817
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
818
+ inputs: [
819
+ "disabled",
820
+ "id",
821
+ "placeholder",
822
+ "name",
823
+ "required",
824
+ "type",
825
+ "errorStateMatcher",
826
+ "aria-describedby",
827
+ "value",
828
+ "readonly",
829
+ "disabledInteractive"
830
+ ],
831
+ exportAs: ["matInput"]
832
+ },
833
+ {
834
+ kind: "directive",
835
+ type: i5.DefaultValueAccessor,
836
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
837
+ },
838
+ {
839
+ kind: "directive",
840
+ type: i5.NgControlStatus,
841
+ selector: "[formControlName],[ngModel],[formControl]"
842
+ },
843
+ {
844
+ kind: "directive",
845
+ type: i5.NgModel,
846
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
847
+ inputs: [
848
+ "name",
849
+ "disabled",
850
+ "ngModel",
851
+ "ngModelOptions"
852
+ ],
853
+ outputs: ["ngModelChange"],
854
+ exportAs: ["ngModel"]
855
+ },
856
+ {
857
+ kind: "component",
858
+ type: i6.TagComponent,
859
+ selector: "ui-tag",
860
+ inputs: [
861
+ "label",
862
+ "icon",
863
+ "allowClose",
864
+ "readOnly",
865
+ "isSelected",
866
+ "showIconWhenSelected",
867
+ "pinnedBackground",
868
+ "constrainWidth",
869
+ "isDisabled",
870
+ "applicationTheme",
871
+ "ariaLabel",
872
+ "testId",
873
+ "ariaRequired",
874
+ "showBadge",
875
+ "notificationsAmount"
876
+ ],
877
+ outputs: [
878
+ "isSelectedChange",
879
+ "close",
880
+ "press"
881
+ ]
882
+ },
883
+ {
884
+ kind: "component",
885
+ type: i7.IconComponent,
886
+ selector: "ui-icon",
887
+ inputs: [
888
+ "size",
889
+ "cssClass",
890
+ "name",
891
+ "color",
892
+ "filled",
893
+ "toggleIconStyle",
894
+ "applicationTheme",
895
+ "useFullIconName"
896
+ ]
897
+ },
898
+ {
899
+ kind: "component",
900
+ type: i8.ValidationErrorComponent,
901
+ selector: "ui-validation-error",
902
+ inputs: [
903
+ "ngControl",
904
+ "touchedOn",
905
+ "errorMessage",
906
+ "label",
907
+ "applicationTheme",
908
+ "customErrors"
909
+ ]
910
+ },
911
+ {
912
+ kind: "directive",
913
+ type: i9.CdkVirtualForOf,
914
+ selector: "[cdkVirtualFor][cdkVirtualForOf]",
915
+ inputs: [
916
+ "cdkVirtualForOf",
917
+ "cdkVirtualForTrackBy",
918
+ "cdkVirtualForTemplate",
919
+ "cdkVirtualForTemplateCacheSize"
920
+ ]
921
+ },
922
+ {
923
+ kind: "component",
924
+ type: i9.CdkVirtualScrollViewport,
925
+ selector: "cdk-virtual-scroll-viewport",
926
+ inputs: ["orientation", "appendOnly"],
927
+ outputs: ["scrolledIndexChange"]
928
+ },
929
+ {
930
+ kind: "directive",
931
+ type: i9.CdkFixedSizeVirtualScroll,
932
+ selector: "cdk-virtual-scroll-viewport[itemSize]",
933
+ inputs: [
934
+ "itemSize",
935
+ "minBufferPx",
936
+ "maxBufferPx"
937
+ ]
938
+ },
939
+ {
940
+ kind: "directive",
941
+ type: PreventInputDirective,
942
+ selector: "[uiPreventInput]",
943
+ inputs: ["uiPreventInput"]
944
+ },
945
+ {
946
+ kind: "component",
947
+ type: i11.SpinnerComponent,
948
+ selector: "ui-spinner",
949
+ inputs: [
950
+ "size",
951
+ "isLoader",
952
+ "text",
953
+ "applicationTheme",
954
+ "iconName",
955
+ "iconSize"
956
+ ]
957
+ },
958
+ {
959
+ kind: "directive",
960
+ type: SelectTextDirective,
961
+ selector: "[selectText]",
962
+ inputs: ["selectText"]
963
+ },
964
+ {
965
+ kind: "pipe",
966
+ type: i1.AsyncPipe,
967
+ name: "async"
968
+ },
969
+ {
970
+ kind: "pipe",
971
+ type: i1.UpperCasePipe,
972
+ name: "uppercase"
973
+ },
974
+ {
975
+ kind: "pipe",
976
+ type: i1.SlicePipe,
977
+ name: "slice"
978
+ },
979
+ {
980
+ kind: "pipe",
981
+ type: i13.UiTranslatePipe,
982
+ name: "uiTranslate"
983
+ },
984
+ {
985
+ kind: "pipe",
986
+ type: i13.HasValidationErrorPipe,
987
+ name: "hasValidationError"
988
+ },
989
+ {
990
+ kind: "pipe",
991
+ type: TransformItemPipe,
992
+ name: "transformItem"
993
+ },
994
+ {
995
+ kind: "pipe",
996
+ type: IncludesPipe,
997
+ name: "includes"
998
+ }
999
+ ],
1000
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1001
+ });
1002
+ }
1003
+ };
1004
+ i0.ɵɵngDeclareClassMetadata({
1005
+ minVersion: "12.0.0",
1006
+ version: "22.2.4",
1007
+ ngImport: i0,
1008
+ type: AutocompleteComponent,
1009
+ decorators: [{
1010
+ type: Component,
1011
+ args: [{
1012
+ selector: "ui-autocomplete",
1013
+ changeDetection: ChangeDetectionStrategy.OnPush,
1014
+ standalone: false,
1015
+ template: "<ng-container>\n <div class=\"autocomplete-wrapper\" [ngClass]=\"{ 'full-width': fullWidth, disabled: disabled }\">\n <mat-form-field\n [color]=\"\n safeErrors.length ||\n (ngControl?.errors && ngControl?.touched) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ? 'warn'\n : 'accent'\n \"\n [appearance]=\"'outline'\"\n [ngClass]=\"{\n 'large-size': type === autocompleteType.LARGE,\n 'hide-bottom-content': !showBottomContent,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n @if (label) {\n <mat-label\n >{{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n }\n <div #formField class=\"input-container\">\n @if (textField ? value?.[textField] : value === inputValue) {\n <span style=\"position: absolute; left: -9999px\" aria-live=\"polite\">{{\n ('SELECTED' | uiTranslate | async) + ' ' + inputValue\n }}</span>\n }\n\n <input\n [attr.data-testid]=\"testId ?? 'autocomplete-input'\"\n #trigger=\"matAutocompleteTrigger\"\n #matInput\n [attr.maxlength]=\"maxLength !== null && maxLength !== undefined ? maxLength : null\"\n [uiPreventInput]=\"!allowUserInput\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': value && type === autocompleteType.LARGE, 'no-caret': !allowUserInput }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n [attr.aria-label]=\"\n (translationContext + 'SELECTED' | uiTranslate | async) + ' ' + (value | transformItem: textField : true)\n \"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n matInput\n [placeholder]=\"value && value.length ? '' : placeholder\"\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n @if (\n (type === autocompleteType.LARGE && value) ||\n (!(inputValue && isInputFocus) && value && type !== autocompleteType.SINGLE)\n ) {\n <div class=\"selected-items\" #tagContainer>\n @for (valueItem of value; track valueItem; let i = $index) {\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [isDisabled]=\"disabled\"\n [applicationTheme]=\"applicationTheme\"\n [style.opacity]=\"type === autocompleteType.MULTI ? inputOpacity : 1\"\n [style.display]=\"\n (isOverLapping && i > 0 && i >= overlapIndex) || (size === 'small' && value.length > 1)\n ? 'none'\n : 'block'\n \"\n [ngStyle]=\"{\n '--tag-max-width': type === autocompleteType.LARGE ? 'fit-content' : firstTagMaxWidth + 'px',\n }\"\n [ngClass]=\"{\n 'overlap-tag':\n isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI,\n }\"\n (close)=\"onOptionRemoved(valueItem)\"\n ></ui-tag>\n }\n @if (size === 'small') {\n @if (value.length > 1) {\n <div class=\"selected-count\">\n {{\n translationContext + 'SELECTED_AMOUNT'\n | uiTranslate: { numberSelected: (value | slice: overlapIndex).length }\n | async\n }}\n </div>\n }\n } @else {\n @if (value.length > 1 && isOverLapping) {\n <div class=\"overlap-count\">\n <ui-tag\n [applicationTheme]=\"applicationTheme\"\n [isDisabled]=\"disabled\"\n [label]=\"'+' + (value.length - overlapIndex)\"\n ></ui-tag>\n </div>\n }\n }\n </div>\n }\n </div>\n\n @if (\n (clearable && type === autocompleteType.SINGLE && (value?.length || hasObjectValue)) ||\n (type !== autocompleteType.SINGLE &&\n value &&\n value.length > 1 &&\n ((AutocompleteUtils.isPrimitive(value) && value.length) ||\n (!AutocompleteUtils.isPrimitive(value) &&\n ((AutocompleteUtils.isArray(value) && value.length) ||\n (!AutocompleteUtils.isArray(value) && !value.length)))))\n ) {\n <ui-icon\n class=\"remove-selected\"\n [tabIndex]=\"disabled ? -1 : 0\"\n (keydown.enter)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n (keydown.space)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear(); $event.preventDefault(); $event.stopPropagation()\"\n [size]=\"'24'\"\n [color]=\"applicationTheme === 'classic' ? 'inherit' : 'rebrand-black'\"\n [attr.aria-label]=\"'COMMON.CLEAR' | uiTranslate | async\"\n [name]=\"applicationTheme === 'classic' ? 'Close' : 'Close-in-line'\"\n ></ui-icon>\n }\n\n @if (isDropdown) {\n <ui-icon\n class=\"arrow-state\"\n [ngClass]=\"{ opened: autocomplete.isOpen, 'large-input-icon': type === autocompleteType.LARGE }\"\n [size]=\"'24'\"\n [name]=\"applicationTheme !== 'classic' ? 'Arrow-chevron-down-in-line' : 'Arrow_down'\"\n (click)=\"onChevronClick(autocomplete)\"\n ></ui-icon>\n }\n\n <mat-autocomplete\n #autocomplete\n [class]=\"applicationTheme + ' ' + dropdownPanelClass\"\n (optionSelected)=\"onOptionSelected($event)\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [hideSingleSelectionIndicator]=\"false\"\n (opened)=\"gotoUp()\"\n >\n @if (type !== autocompleteType.MULTI || value?.length < maxItemSelected) {\n @if ((searchResult$ | async) === false) {\n @if (!isDropdown) {\n @if (suggestionsList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (suggested of suggestionsList; track suggested) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': suggested | includes: value : valueField }\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"userInput$ | async\">{{ suggested | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (value?.length && type !== autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n @for (item of value; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (isGrouped) {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (value?.length && type === autocompleteType.SINGLE) {\n <mat-optgroup [label]=\"(translationContext + 'SELECTED' | uiTranslate | async)! | uppercase\">\n <mat-option (mousedown)=\"$event.preventDefault()\" [class]=\"'selected-option'\" [value]=\"value\">\n <span [selectText]=\"userInput$ | async\">{{ value | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n } @else {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(itemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (!isGrouped) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of itemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n @if (infiniteScroll && hasMoreOptionsForInfiniteScroll) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.items\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (!isGrouped) {\n @for (item of itemsList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @for (group of itemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.items; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n }\n }\n }\n\n @if (filteredSuggestionList$ | async; as filteredSuggestionList) {\n @if (filteredItemsList$ | async; as filteredItemsList) {\n @if (virtualScroll || infiniteScroll) {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"48\"\n [style.height.px]=\"getVirtualScrollHeight(filteredItemsList.length)\"\n class=\"virtual-scroll\"\n >\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n } @else {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of group.filteredItems\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n *cdkVirtualFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (isGrouped && filteredItemsList.length) {\n @for (group of filteredItemsList; track group) {\n @if (group.groupName) {\n <mat-optgroup [label]=\"group.groupName\">\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n @for (item of group.filteredItems; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n }\n }\n }\n @if (filteredSuggestionList.length) {\n <mat-optgroup [label]=\"(translationContext + 'SUGGESTED' | uiTranslate | async)! | uppercase\">\n @for (item of filteredSuggestionList; track item) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n @if (!filteredSuggestionList.length && !isGrouped) {\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n } @else {\n @if (filteredItemsList.length && !isGrouped) {\n <mat-optgroup [label]=\"(translationContext + 'ALL_ITEMS' | uiTranslate | async)! | uppercase\">\n @for (item of filteredItemsList; let idx = $index; track item[valueField] || idx) {\n <mat-option\n (mousedown)=\"$event.preventDefault()\"\n [ngClass]=\"{ 'selected-option': item | includes: value : valueField }\"\n [value]=\"item\"\n >\n <span [selectText]=\"userInput$ | async\">{{ item | transformItem: textField }}</span>\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Check' : 'Check-in-line'\"\n ></ui-icon>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n @if (isDynamicFilteringEnabled && dynamicFilterLoading) {\n <mat-option class=\"loading-option\" [style.pointer-events]=\"'none'\">\n <div class=\"loading-container\">\n <ui-spinner size=\"small\" [isLoader]=\"false\"></ui-spinner>\n </div>\n </mat-option>\n } @else if (inputValue) {\n @if (allowAdd && !isAlreadyAdded) {\n <mat-option (mousedown)=\"$event.preventDefault()\" [value]=\"inputValue\">\n <span>{{ 'COMMON.ADD' | uiTranslate | async }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n } @else if (!filteredItemsList.length && !filteredSuggestionList.length) {\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ translationContext + 'NO_RESULTS_FOUND' | uiTranslate | async }}</span>\n </mat-option>\n }\n }\n }\n }\n }\n }\n </mat-autocomplete>\n @if (\n safeErrors.length ||\n ($safeNavigationMigration(ngControl?.errors) | hasValidationError) ||\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <mat-hint class=\"error\">\n @if (\n (AutocompleteUtils.isArray(value) && value.length) > maxItemSelected ||\n ((AutocompleteUtils.isArray(value) && value.length) >= maxItemSelected && inputValue && inputValue !== ' ')\n ) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContext + 'MAX_SELECTED_ERROR' | uiTranslate: { max: maxItemSelected } | async\n }}</span>\n </div>\n }\n @if (safeErrors.length) {\n @for (error of safeErrors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n </div>\n</ng-container>\n",
1016
+ styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:320px;display:block}:host.full-width{width:100%}:host ui-tag{height:32px;margin:4px}:host ui-tag ::ng-deep .tag-container{margin:0!important}:host ui-tag ::ng-deep .tag-wrapper{max-width:fit-content}.large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:flex;flex-direction:column-reverse}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled *{pointer-events:none}.input-container{width:100%;margin:auto;display:flex;flex-direction:row-reverse}.input-container .selected-items{display:flex;padding-left:4px}.input-container .selected-items .selected-count{white-space:nowrap}.input-container .selected-items .value-tag{max-width:var(--tag-max-width)}.input-container .selected-items .value-tag ::ng-deep .tag-container{max-width:var(--tag-max-width)}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px}.input-container .selected-items .overlap-count ui-tag{display:block}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:6px}.input-container input.unset-margin{margin-top:unset}.input-container input.no-caret{cursor:pointer;caret-color:transparent!important}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer;margin-right:2px;border-radius:50px;height:fit-content}.remove-selected.large-input-icon{margin-top:10px}.arrow-state{height:24px;cursor:pointer}.arrow-state.large-input-icon{margin-top:10px}.arrow-state.opened{transform:rotateX(180deg)}::ng-deep .autocomplete-wrapper .mat-mdc-form-field{width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#cb7b7a}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors ui-icon{margin-right:8px}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint.error svg{color:#e02800!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-bottom-align:before{height:0}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper{padding:0 0 12px;font-size:12px;line-height:16px;position:relative}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-hint-wrapper .mat-form-field-hint-spacer{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field.hide-bottom-content .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-text-field-wrapper{padding-left:12px!important;height:unset!important;max-height:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-infix,::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .autocomplete-wrapper .mat-mdc-form-field .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#e9f0f1!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option{background:#e9f0f1}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mat-mdc-optgroup-label{font-weight:700!important}::ng-deep .mat-mdc-autocomplete-panel .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}.active-field .mdc-notched-outline__leading{border-left-width:2px;border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__notch{border-top-width:2px;border-bottom-width:2px}.active-field .mdc-notched-outline__trailing{border-top-width:2px;border-bottom-width:2px;border-right-width:2px}.loading-option{display:flex}.loading-option .loading-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;position:absolute;top:0;left:0}\n"]
1017
+ }]
1018
+ }],
1019
+ ctorParameters: () => [],
1020
+ propDecorators: {
1021
+ itemsList: [{ type: Input }],
1022
+ suggestionsList: [{ type: Input }],
1023
+ disabled: [{ type: Input }],
1024
+ allowAdd: [{ type: Input }],
1025
+ textField: [{ type: Input }],
1026
+ valueField: [{ type: Input }],
1027
+ label: [{ type: Input }],
1028
+ placeholder: [{ type: Input }],
1029
+ testId: [{ type: Input }],
1030
+ itemValue: [{ type: Input }],
1031
+ type: [{ type: Input }],
1032
+ minCharactersSearch: [{ type: Input }],
1033
+ variant: [{
1034
+ type: Input,
1035
+ args: [{ required: true }]
1036
+ }],
1037
+ showBottomContent: [{ type: Input }],
1038
+ valuePrimitive: [{ type: Input }],
1039
+ fullWidth: [{
1040
+ type: HostBinding,
1041
+ args: ["class.full-width"]
1042
+ }, { type: Input }],
1043
+ applicationTheme: [{
1044
+ type: HostBinding,
1045
+ args: ["attr.theme"]
1046
+ }, { type: Input }],
1047
+ required: [{ type: Input }],
1048
+ errors: [{ type: Input }],
1049
+ companyColor: [{ type: Input }],
1050
+ hideBuiltInErrors: [{ type: Input }],
1051
+ hideLabelInErrors: [{ type: Input }],
1052
+ virtualScroll: [{
1053
+ type: Input,
1054
+ args: [{ transform: booleanAttribute }]
1055
+ }],
1056
+ compareWith: [{ type: Input }],
1057
+ dropdownPanelClass: [{ type: Input }],
1058
+ closeOnScroll: [{ type: Input }],
1059
+ size: [{ type: Input }],
1060
+ allowUserInput: [{ type: Input }],
1061
+ clearable: [{ type: Input }],
1062
+ exactMatchSelect: [{ type: Input }],
1063
+ maxItemSelected: [{ type: Input }],
1064
+ maxLength: [{ type: Input }],
1065
+ isDynamicFilteringEnabled: [{ type: Input }],
1066
+ dynamicFilterLoading: [{ type: Input }],
1067
+ dynamicFilteredList: [{ type: Input }],
1068
+ infiniteScroll: [{ type: Input }],
1069
+ hasMoreOptionsForInfiniteScroll: [{ type: Input }],
1070
+ selectionChange: [{ type: Output }],
1071
+ searchTextChange: [{ type: Output }],
1072
+ blur: [{ type: Output }],
1073
+ focus: [{ type: Output }],
1074
+ scrollViewportBottomReached: [{ type: Output }],
1075
+ scrollViewportBottomReachedFiltered: [{ type: Output }],
1076
+ formFieldElement: [{
1077
+ type: ViewChild,
1078
+ args: ["formField"]
1079
+ }],
1080
+ tagContainer: [{
1081
+ type: ViewChild,
1082
+ args: ["tagContainer"]
1083
+ }],
1084
+ autocomplete: [{
1085
+ type: ViewChild,
1086
+ args: ["trigger"]
1087
+ }],
1088
+ cdkVirtualScrollViewport: [{
1089
+ type: ViewChild,
1090
+ args: [CdkVirtualScrollViewport, { static: false }]
1091
+ }],
1092
+ matAutocomplete: [{
1093
+ type: ViewChild,
1094
+ args: ["autocomplete"]
1095
+ }],
1096
+ matInput: [{
1097
+ type: ViewChild,
1098
+ args: ["matInput"]
1099
+ }]
1100
+ }
1101
+ });
1102
+ var AutocompleteComponentModule = class AutocompleteComponentModule {
1103
+ static {
1104
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1105
+ minVersion: "12.0.0",
1106
+ version: "22.2.4",
1107
+ ngImport: i0,
1108
+ type: AutocompleteComponentModule,
1109
+ deps: [],
1110
+ target: i0.ɵɵFactoryTarget.NgModule
1111
+ });
1112
+ }
1113
+ static {
1114
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
1115
+ minVersion: "14.0.0",
1116
+ version: "22.2.4",
1117
+ ngImport: i0,
1118
+ type: AutocompleteComponentModule,
1119
+ declarations: [
1120
+ AutocompleteComponent,
1121
+ TransformItemPipe,
1122
+ IncludesPipe,
1123
+ SelectTextDirective
1124
+ ],
1125
+ imports: [
1126
+ CommonModule,
1127
+ MatFormFieldModule,
1128
+ MatAutocompleteModule,
1129
+ MatInputModule,
1130
+ FormsModule,
1131
+ TagComponentModule,
1132
+ MatChipsModule,
1133
+ IconComponentModule,
1134
+ UiTranslatePipe,
1135
+ ValidationErrorModule,
1136
+ HasValidationErrorPipe,
1137
+ CdkVirtualForOf,
1138
+ CdkVirtualScrollViewport,
1139
+ CdkFixedSizeVirtualScroll,
1140
+ PreventInputDirective,
1141
+ SpinnerComponentModule
1142
+ ],
1143
+ exports: [AutocompleteComponent]
1144
+ });
1145
+ }
1146
+ static {
1147
+ this.ɵinj = i0.ɵɵngDeclareInjector({
1148
+ minVersion: "12.0.0",
1149
+ version: "22.2.4",
1150
+ ngImport: i0,
1151
+ type: AutocompleteComponentModule,
1152
+ providers: [
1153
+ TransformItemPipe,
1154
+ IncludesPipe,
1155
+ SelectTextDirective
1156
+ ],
1157
+ imports: [
1158
+ CommonModule,
1159
+ MatFormFieldModule,
1160
+ MatAutocompleteModule,
1161
+ MatInputModule,
1162
+ FormsModule,
1163
+ TagComponentModule,
1164
+ MatChipsModule,
1165
+ IconComponentModule,
1166
+ ValidationErrorModule,
1167
+ CdkVirtualScrollViewport,
1168
+ SpinnerComponentModule
1169
+ ]
1170
+ });
1171
+ }
1172
+ };
1173
+ i0.ɵɵngDeclareClassMetadata({
1174
+ minVersion: "12.0.0",
1175
+ version: "22.2.4",
1176
+ ngImport: i0,
1177
+ type: AutocompleteComponentModule,
1178
+ decorators: [{
1179
+ type: NgModule,
1180
+ args: [{
1181
+ declarations: [
1182
+ AutocompleteComponent,
1183
+ TransformItemPipe,
1184
+ IncludesPipe,
1185
+ SelectTextDirective
1186
+ ],
1187
+ imports: [
1188
+ CommonModule,
1189
+ MatFormFieldModule,
1190
+ MatAutocompleteModule,
1191
+ MatInputModule,
1192
+ FormsModule,
1193
+ TagComponentModule,
1194
+ MatChipsModule,
1195
+ IconComponentModule,
1196
+ UiTranslatePipe,
1197
+ ValidationErrorModule,
1198
+ HasValidationErrorPipe,
1199
+ CdkVirtualForOf,
1200
+ CdkVirtualScrollViewport,
1201
+ CdkFixedSizeVirtualScroll,
1202
+ PreventInputDirective,
1203
+ SpinnerComponentModule
1204
+ ],
1205
+ exports: [AutocompleteComponent],
1206
+ providers: [
1207
+ TransformItemPipe,
1208
+ IncludesPipe,
1209
+ SelectTextDirective
1210
+ ]
1211
+ }]
1212
+ }]
1213
+ });
1053
1214
  export { AMOUNT_TAG_WIDTH, Autocomplete, AutocompleteComponent, AutocompleteComponentModule, DropdownVariation, Padding, Timeout };
1054
- //# sourceMappingURL=testgorilla-tgo-ui-components-autocomplete.mjs.map
1215
+
1216
+ //# sourceMappingURL=testgorilla-tgo-ui-components-autocomplete.mjs.map