ngx-tethys 20.0.1 → 20.0.3

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 (245) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/action/index.d.ts +3 -3
  3. package/affix/index.d.ts +1 -1
  4. package/alert/index.d.ts +3 -3
  5. package/anchor/index.d.ts +12 -6
  6. package/arrow-switcher/index.d.ts +6 -6
  7. package/autocomplete/index.d.ts +7 -7
  8. package/avatar/index.d.ts +9 -9
  9. package/back-top/index.d.ts +3 -3
  10. package/badge/index.d.ts +6 -6
  11. package/breadcrumb/index.d.ts +7 -7
  12. package/button/index.d.ts +19 -19
  13. package/calendar/index.d.ts +8 -8
  14. package/card/index.d.ts +6 -6
  15. package/carousel/index.d.ts +4 -4
  16. package/cascader/index.d.ts +24 -24
  17. package/collapse/index.d.ts +4 -4
  18. package/color-picker/index.d.ts +16 -16
  19. package/comment/index.d.ts +3 -3
  20. package/copy/index.d.ts +2 -2
  21. package/core/index.d.ts +22 -22
  22. package/date-picker/index.d.ts +111 -111
  23. package/date-range/index.d.ts +5 -5
  24. package/dialog/index.d.ts +18 -18
  25. package/divider/index.d.ts +3 -3
  26. package/drag-drop/index.d.ts +7 -7
  27. package/dropdown/index.d.ts +10 -10
  28. package/empty/index.d.ts +12 -12
  29. package/fesm2022/ngx-tethys-action.mjs +14 -12
  30. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-affix.mjs +7 -7
  32. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-alert.mjs +10 -10
  34. package/fesm2022/ngx-tethys-anchor.mjs +65 -28
  35. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  37. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-autocomplete.mjs +19 -18
  39. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-avatar.mjs +23 -22
  41. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  43. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  44. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  46. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-button.mjs +16 -16
  48. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-calendar.mjs +16 -16
  50. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-card.mjs +13 -13
  52. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-carousel.mjs +15 -15
  54. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-cascader.mjs +41 -34
  56. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  58. package/fesm2022/ngx-tethys-collapse.mjs +10 -10
  59. package/fesm2022/ngx-tethys-color-picker.mjs +65 -57
  60. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-comment.mjs +13 -13
  62. package/fesm2022/ngx-tethys-copy.mjs +10 -10
  63. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys-core.mjs +30 -25
  65. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  66. package/fesm2022/ngx-tethys-date-picker.mjs +184 -174
  67. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  68. package/fesm2022/ngx-tethys-date-range.mjs +16 -16
  69. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  70. package/fesm2022/ngx-tethys-dialog.mjs +24 -24
  71. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  72. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  73. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  74. package/fesm2022/ngx-tethys-dot.mjs +7 -7
  75. package/fesm2022/ngx-tethys-drag-drop.mjs +24 -24
  76. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-dropdown.mjs +48 -47
  78. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-empty.mjs +13 -13
  80. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
  82. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-form.mjs +64 -61
  84. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-fullscreen.mjs +18 -15
  86. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-grid.mjs +34 -33
  88. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-guider.mjs +25 -24
  90. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-i18n.mjs +3 -3
  92. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-icon.mjs +15 -13
  94. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-image.mjs +31 -29
  96. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-input-number.mjs +17 -10
  98. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-input.mjs +27 -26
  100. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-layout.mjs +63 -63
  102. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-list.mjs +21 -18
  104. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  106. package/fesm2022/ngx-tethys-mention.mjs +35 -31
  107. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-menu.mjs +26 -26
  109. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  110. package/fesm2022/ngx-tethys-message.mjs +24 -24
  111. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  112. package/fesm2022/ngx-tethys-native-table.mjs +1119 -0
  113. package/fesm2022/ngx-tethys-native-table.mjs.map +1 -0
  114. package/fesm2022/ngx-tethys-nav.mjs +27 -27
  115. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-notify.mjs +20 -20
  117. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  118. package/fesm2022/ngx-tethys-pagination.mjs +18 -18
  119. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-popover.mjs +22 -21
  121. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-progress.mjs +17 -17
  123. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
  125. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-property.mjs +15 -12
  127. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-radio.mjs +17 -17
  129. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-rate.mjs +12 -12
  131. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-resizable.mjs +21 -18
  133. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-result.mjs +11 -11
  135. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-segment.mjs +19 -16
  137. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys-select.mjs +95 -46
  139. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  140. package/fesm2022/ngx-tethys-shared.mjs +85 -81
  141. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  142. package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
  143. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  144. package/fesm2022/ngx-tethys-slide.mjs +37 -36
  145. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-slider.mjs +11 -11
  147. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  148. package/fesm2022/ngx-tethys-space.mjs +10 -10
  149. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  150. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-stepper.mjs +22 -22
  152. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  154. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  156. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-table.mjs +28 -28
  158. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  160. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-tag.mjs +11 -11
  162. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-testing.mjs +1 -1
  164. package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
  166. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-timeline.mjs +14 -14
  168. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-tooltip.mjs +36 -29
  170. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-transfer.mjs +15 -15
  172. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
  174. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-tree.mjs +50 -43
  176. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-typography.mjs +16 -16
  178. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-upload.mjs +26 -25
  180. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-util.mjs +11 -5
  182. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  183. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  184. package/fesm2022/ngx-tethys-watermark.mjs +18 -15
  185. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  186. package/fesm2022/ngx-tethys.mjs +1 -1
  187. package/fesm2022/ngx-tethys.mjs.map +1 -1
  188. package/flexible-text/index.d.ts +5 -5
  189. package/form/index.d.ts +26 -22
  190. package/fullscreen/index.d.ts +4 -4
  191. package/grid/index.d.ts +12 -12
  192. package/guider/index.d.ts +10 -10
  193. package/i18n/index.d.ts +1 -1
  194. package/icon/index.d.ts +3 -3
  195. package/image/index.d.ts +12 -12
  196. package/input/index.d.ts +23 -23
  197. package/input-number/index.d.ts +4 -4
  198. package/layout/index.d.ts +16 -16
  199. package/list/index.d.ts +16 -15
  200. package/mention/index.d.ts +4 -4
  201. package/menu/index.d.ts +7 -7
  202. package/message/index.d.ts +5 -5
  203. package/native-table/index.d.ts +305 -0
  204. package/native-table/styles/native-table.scss +174 -0
  205. package/nav/index.d.ts +12 -12
  206. package/notify/index.d.ts +1 -1
  207. package/package.json +5 -1
  208. package/pagination/index.d.ts +21 -17
  209. package/popover/index.d.ts +8 -8
  210. package/progress/index.d.ts +18 -18
  211. package/property/index.d.ts +6 -6
  212. package/property-operation/index.d.ts +3 -3
  213. package/radio/index.d.ts +6 -6
  214. package/rate/index.d.ts +5 -5
  215. package/resizable/index.d.ts +2 -2
  216. package/result/index.d.ts +8 -8
  217. package/schematics/testing/test-workspace.js +1 -0
  218. package/schematics/version.d.ts +1 -1
  219. package/schematics/version.js +1 -1
  220. package/segment/index.d.ts +9 -9
  221. package/select/index.d.ts +28 -22
  222. package/shared/index.d.ts +31 -30
  223. package/shared/option/styles/select-dropdown.scss +5 -2
  224. package/skeleton/index.d.ts +52 -52
  225. package/slide/index.d.ts +5 -5
  226. package/slider/index.d.ts +6 -6
  227. package/space/index.d.ts +1 -1
  228. package/statistic/index.d.ts +18 -18
  229. package/stepper/index.d.ts +8 -8
  230. package/styles/index.scss +1 -0
  231. package/switch/index.d.ts +2 -2
  232. package/table/index.d.ts +24 -24
  233. package/tabs/index.d.ts +6 -6
  234. package/testing/index.d.ts +1 -1
  235. package/time-picker/index.d.ts +21 -21
  236. package/timeline/index.d.ts +8 -8
  237. package/tooltip/index.d.ts +12 -12
  238. package/transfer/index.d.ts +16 -16
  239. package/tree/index.d.ts +28 -28
  240. package/tree-select/index.d.ts +13 -13
  241. package/typography/index.d.ts +3 -3
  242. package/upload/index.d.ts +4 -4
  243. package/util/index.d.ts +17 -7
  244. package/vote/index.d.ts +2 -2
  245. package/watermark/index.d.ts +2 -2
@@ -1,23 +1,24 @@
1
1
  import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
2
2
  import { isPlatformBrowser, NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, inject, NgZone, ElementRef, ChangeDetectorRef, PLATFORM_ID, computed, input, signal, DestroyRef, viewChild, output, contentChild, numberAttribute, contentChildren, linkedSignal, afterRenderEffect, untracked, forwardRef, HostListener, ViewChildren, ViewChild, Input, ChangeDetectionStrategy, Component, model, NgModule } from '@angular/core';
4
+ import { InjectionToken, inject, NgZone, ElementRef, ChangeDetectorRef, PLATFORM_ID, computed, input, numberAttribute, signal, DestroyRef, viewChild, output, contentChild, contentChildren, linkedSignal, afterRenderEffect, untracked, forwardRef, HostListener, ViewChildren, ViewChild, Input, ChangeDetectionStrategy, Component, model, NgModule } from '@angular/core';
5
5
  import * as i1$1 from '@angular/forms';
6
6
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
7
  import { ThyEmpty, ThyEmptyModule } from 'ngx-tethys/empty';
8
8
  import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
9
9
  import { ThyInputDirective, ThyInputModule } from 'ngx-tethys/input';
10
10
  import { ThyLoading, ThyLoadingModule } from 'ngx-tethys/loading';
11
- import { ThyOption, ThySelectOptionGroup, ThySelectControl, ThyStopPropagationDirective, ThyOptionRender, ThyOptionGroupRender, ThyOptionModule, ThySharedModule, ThySelectCommonModule } from 'ngx-tethys/shared';
12
- import { TabIndexDisabledControlValueAccessorMixin, ThyClickDispatcher, injectPanelEmptyIcon, getFlexiblePositions, scaleXMotion, scaleYMotion, scaleMotion } from 'ngx-tethys/core';
11
+ import { ThyOption, ThySelectOptionGroup, ThySelectControl, ThyStopPropagationDirective, ThyOptionRender, ThyOptionGroupRender, ThyViewOutletDirective, ThyScrollDirective, ThyOptionModule, ThySharedModule, ThySelectCommonModule } from 'ngx-tethys/shared';
12
+ import { TabIndexDisabledControlValueAccessorMixin, ThyClickDispatcher, injectPanelEmptyIcon, getFlexiblePositions, ScrollToService, scaleXMotion, scaleYMotion, scaleMotion } from 'ngx-tethys/core';
13
13
  import { ENTER, isFunction, coerceBooleanProperty, helpers, elementMatchClosest, SPACE, DOWN_ARROW, UP_ARROW, hasModifierKey, HOME, END, A, TAB } from 'ngx-tethys/util';
14
14
  import { timer, Observable } from 'rxjs';
15
15
  import { map, filter, startWith, take, distinctUntilChanged } from 'rxjs/operators';
16
16
  import { coerceElement } from '@angular/cdk/coercion';
17
17
  import { injectLocale } from 'ngx-tethys/i18n';
18
18
  import * as i1 from '@angular/cdk/scrolling';
19
- import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
19
+ import { CdkVirtualScrollViewport, ScrollingModule, ScrollDispatcher } from '@angular/cdk/scrolling';
20
20
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
21
+ import { isUndefinedOrNull } from '@tethys/cdk/is';
21
22
  import { useHostRenderer } from '@tethys/cdk/dom';
22
23
 
23
24
  const THY_SELECT_SCROLL_STRATEGY = new InjectionToken('thy-select-scroll-strategy');
@@ -70,7 +71,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
70
71
  this.handleKeydown(event);
71
72
  }
72
73
  get optionsChanges$() {
73
- let previousOptions = this.optionRenders.toArray();
74
+ let previousOptions = this.optionRenders?.toArray();
74
75
  return this.optionRenders.changes.pipe(map(data => {
75
76
  return this.optionRenders.toArray();
76
77
  }), filter(data => {
@@ -135,16 +136,18 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
135
136
  this.dropDownPositions = computed(() => {
136
137
  return getFlexiblePositions(this.placement(), this.defaultOffset);
137
138
  }, ...(ngDevMode ? [{ debugName: "dropDownPositions" }] : []));
138
- this.itemSize = SELECT_OPTION_MAX_HEIGHT;
139
+ this.thyItemSize = input(SELECT_OPTION_MAX_HEIGHT, ...(ngDevMode ? [{ debugName: "thyItemSize", transform: value => numberAttribute(value) }] : [{ transform: value => numberAttribute(value) }]));
139
140
  this.virtualHeight = computed(() => {
140
141
  const maxVirtualHeight = SELECT_PANEL_MAX_HEIGHT - SELECT_PANEL_PADDING_TOP - SELECT_PANEL_PADDING_BOTTOM;
141
- const height = this.filteredGroupsAndOptions().length * this.itemSize;
142
+ const height = this.filteredGroupsAndOptions().length * this.thyItemSize();
142
143
  return Math.min(height, maxVirtualHeight);
143
144
  }, ...(ngDevMode ? [{ debugName: "virtualHeight" }] : []));
144
145
  /**
145
- * 视觉上能看到的最大选项个数
146
+ * 出现滚动条时,视觉上能看到的最大选项个数
146
147
  */
147
- this.maxItemLength = 7;
148
+ this.maxItemLength = computed(() => {
149
+ return Math.round(this.virtualHeight() / this.thyItemSize());
150
+ }, ...(ngDevMode ? [{ debugName: "maxItemLength" }] : []));
148
151
  this.triggerRectWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "triggerRectWidth" }] : []));
149
152
  /**
150
153
  * 手动聚焦中的标识
@@ -263,6 +266,11 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
263
266
  * 是否隐藏选择框边框
264
267
  */
265
268
  this.thyBorderless = input(false, ...(ngDevMode ? [{ debugName: "thyBorderless", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
269
+ this.panel = viewChild('panel', ...(ngDevMode ? [{ debugName: "panel" }] : []));
270
+ /**
271
+ * 是否启用虚拟滚动,默认值为 false
272
+ */
273
+ this.thyVirtualScroll = input(false, ...(ngDevMode ? [{ debugName: "thyVirtualScroll", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
266
274
  this.scrolledIndex = 0;
267
275
  this.cdkVirtualScrollViewport = viewChild(CdkVirtualScrollViewport, ...(ngDevMode ? [{ debugName: "cdkVirtualScrollViewport" }] : []));
268
276
  this.shouldActivateOption = false;
@@ -307,7 +315,12 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
307
315
  return this.filteredGroupsAndOptions().filter(item => item.type === 'option');
308
316
  }, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
309
317
  this.filteredOptionsMap = computed(() => {
310
- return helpers.keyBy(this.filteredOptions(), 'value');
318
+ return this.filteredOptions().reduce((map, item) => {
319
+ if (!isUndefinedOrNull(item.value)) {
320
+ map.set(item.value, item);
321
+ }
322
+ return map;
323
+ }, new Map());
311
324
  }, ...(ngDevMode ? [{ debugName: "filteredOptionsMap" }] : []));
312
325
  /**
313
326
  * 当前选中的值
@@ -322,7 +335,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
322
335
  }
323
336
  }]));
324
337
  this.selectedValuesMap = computed(() => {
325
- return new Map(this.selectedValues().map(value => [value, true]));
338
+ return new Map((this.selectedValues() || []).map(value => [value, true]));
326
339
  }, ...(ngDevMode ? [{ debugName: "selectedValuesMap" }] : []));
327
340
  /**
328
341
  * 传给 selectControl 指令的选中值
@@ -415,7 +428,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
415
428
  }
416
429
  buildAllGroupsAndOptions() {
417
430
  let allGroupsAndOptions;
418
- const isReactiveDriven = this.thyOptions()?.length > 0;
431
+ const isReactiveDriven = this.thyOptions() && this.thyOptions().length > 0;
419
432
  if (isReactiveDriven) {
420
433
  allGroupsAndOptions = this.allGroupsAndOptionsByReactive();
421
434
  }
@@ -428,7 +441,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
428
441
  const options = this.thyOptions();
429
442
  const groupMap = new Map();
430
443
  const ungroupedOptions = [];
431
- let groupsAndOptions = [];
444
+ const groupsAndOptions = [];
432
445
  for (const option of options) {
433
446
  if (option.groupLabel) {
434
447
  if (!groupMap.has(option.groupLabel)) {
@@ -475,7 +488,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
475
488
  let groupsAndOptions = [];
476
489
  if (options && options.length > 0) {
477
490
  groupsAndOptions = options.map((option) => {
478
- const { thyValue, thyRawValue, thyLabelText, thyShowOptionCustom, thyDisabled, template, thySearchKey, groupLabel } = option;
491
+ const { thyValue, thyRawValue, thyLabelText, thyShowOptionCustom, thyDisabled, template, suffixTemplate, thySearchKey, groupLabel } = option;
479
492
  return {
480
493
  type: 'option',
481
494
  value: thyValue(),
@@ -484,6 +497,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
484
497
  showOptionCustom: thyShowOptionCustom(),
485
498
  disabled: thyDisabled(),
486
499
  template: template(),
500
+ suffixTemplate: suffixTemplate(),
487
501
  searchKey: thySearchKey(),
488
502
  groupLabel: groupLabel
489
503
  };
@@ -508,14 +522,14 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
508
522
  const keywords = this.keywords();
509
523
  const isServerSearch = this.thyServerSearch();
510
524
  const allGroupsAndOptions = this.allGroupsAndOptions();
511
- let filteredGroupsAndOptions = [];
525
+ const filteredGroupsAndOptions = [];
512
526
  if (keywords && !isServerSearch) {
513
527
  const lowerKeywords = keywords.toLowerCase();
514
528
  const matchedOptions = new Set();
515
529
  const matchedGroupLabels = new Set();
516
530
  for (const item of allGroupsAndOptions) {
517
531
  if (item.type === 'option') {
518
- const isMatch = (item.searchKey || item.label).toLowerCase().indexOf(lowerKeywords) > -1;
532
+ const isMatch = (item.searchKey || item.label) && (item.searchKey || item.label).toLowerCase().indexOf(lowerKeywords) > -1;
519
533
  if (isMatch) {
520
534
  matchedOptions.add(item.value);
521
535
  if (item.groupLabel) {
@@ -539,7 +553,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
539
553
  updateSelectedOptions() {
540
554
  const selectedValues = this.selectedValues();
541
555
  const isMultiple = untracked(() => this.isMultiple());
542
- let newOptions = [];
556
+ const newOptions = [];
543
557
  if (selectedValues.length) {
544
558
  const filteredOptionsMap = this.filteredOptionsMap();
545
559
  const oldSelectedOptionsMap = untracked(() => {
@@ -557,7 +571,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
557
571
  return helpers.keyBy(oldSelectedOptions, 'thyValue');
558
572
  });
559
573
  selectedValues.forEach(value => {
560
- let option = filteredOptionsMap[value];
574
+ const option = filteredOptionsMap.get(value);
561
575
  if (option) {
562
576
  newOptions.push({
563
577
  thyLabelText: option.label,
@@ -575,15 +589,23 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
575
589
  this.selectedOptions.set(isMultiple ? [] : null);
576
590
  }
577
591
  }
578
- optionsScrolled(index) {
592
+ optionsVirtualScrolled(index) {
579
593
  this.scrolledIndex = index;
580
594
  if (this.thyEnableScrollLoad()) {
581
- const isScrollToBottom = index + this.maxItemLength >= this.filteredGroupsAndOptions().length;
595
+ const isScrollToBottom = index + this.maxItemLength() >= this.filteredGroupsAndOptions().length;
582
596
  if (isScrollToBottom) {
583
597
  this.thyOnScrollToBottom.emit();
584
598
  }
585
599
  }
586
600
  }
601
+ optionsScrolled(elementRef) {
602
+ const scroll = elementRef.nativeElement.scrollTop, height = elementRef.nativeElement.clientHeight, scrollHeight = elementRef.nativeElement.scrollHeight;
603
+ if (scroll + height + 10 >= scrollHeight) {
604
+ this.ngZone.run(() => {
605
+ this.thyOnScrollToBottom.emit();
606
+ });
607
+ }
608
+ }
587
609
  search(keywords) {
588
610
  this.shouldActivateOption = true;
589
611
  this.activatedValue.set(null);
@@ -704,9 +726,20 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
704
726
  return;
705
727
  }
706
728
  let toActivatedValue = this.activatedValue();
707
- if (!toActivatedValue || !this.filteredOptionsMap()[toActivatedValue]) {
708
- if (this.selectedValues().length > 0) {
709
- toActivatedValue = this.selectedValues()[0];
729
+ const filteredOptionsMap = this.filteredOptionsMap();
730
+ if (!toActivatedValue || !filteredOptionsMap.has(toActivatedValue)) {
731
+ let selectedValues = this.selectedValues();
732
+ const lowerKeywords = this.keywords()?.trim()?.toLowerCase();
733
+ if (lowerKeywords) {
734
+ selectedValues = selectedValues.filter(value => {
735
+ const option = filteredOptionsMap.get(value);
736
+ return (option &&
737
+ (option.searchKey || option.label) &&
738
+ (option.searchKey || option.label).toLowerCase().indexOf(lowerKeywords) > -1);
739
+ });
740
+ }
741
+ if (selectedValues.length > 0) {
742
+ toActivatedValue = selectedValues[0];
710
743
  }
711
744
  else {
712
745
  if (this.thyAutoActiveFirstItem()) {
@@ -722,8 +755,19 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
722
755
  if (targetIndex === -1) {
723
756
  return;
724
757
  }
725
- if (targetIndex < this.scrolledIndex || targetIndex >= this.scrolledIndex + this.maxItemLength) {
726
- this.cdkVirtualScrollViewport()?.scrollToIndex(targetIndex || 0);
758
+ if (this.thyVirtualScroll()) {
759
+ if (targetIndex < this.scrolledIndex || targetIndex >= this.scrolledIndex + this.maxItemLength()) {
760
+ this.cdkVirtualScrollViewport()?.scrollToIndex(targetIndex || 0);
761
+ }
762
+ }
763
+ else {
764
+ const panelElement = this.panel()?.nativeElement;
765
+ if (panelElement) {
766
+ const optionElement = panelElement.querySelector(`[data-option-value="${toActivatedValue}"]`);
767
+ if (optionElement) {
768
+ ScrollToService.scrollToElement(optionElement, panelElement);
769
+ }
770
+ }
727
771
  }
728
772
  if (needSelect) {
729
773
  this.optionRenders.find(option => option.thyValue() === toActivatedValue)?.selectViaInteraction();
@@ -751,7 +795,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
751
795
  if (keyCode === DOWN_ARROW || keyCode === UP_ARROW) {
752
796
  event.preventDefault();
753
797
  const activatedValue = this.activatedValue();
754
- const currentOption = this.filteredOptionsMap()[activatedValue];
798
+ const currentOption = this.filteredOptionsMap().get(activatedValue);
755
799
  if (!currentOption) {
756
800
  return;
757
801
  }
@@ -834,18 +878,18 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
834
878
  else {
835
879
  selectedValues.push(value);
836
880
  }
837
- if (this.thySortComparator()) {
881
+ const thySortComparator = this.thySortComparator();
882
+ if (thySortComparator) {
838
883
  selectedValues.sort((a, b) => {
839
884
  const aOption = options.find(option => option.thyValue() === a);
840
885
  const bOption = options.find(option => option.thyValue() === b);
841
- return this.thySortComparator()(aOption, bOption, [...options]);
886
+ return thySortComparator(aOption, bOption, [...options]);
842
887
  });
843
888
  }
844
889
  this.selectedValues.set([...selectedValues]);
845
890
  }
846
891
  else {
847
892
  this.selectedValues.set([value]);
848
- this.close();
849
893
  }
850
894
  const option = options.find(option => option.thyValue() === value);
851
895
  if (option) {
@@ -856,6 +900,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
856
900
  this.emitModelValueChange();
857
901
  if (!this.isMultiple()) {
858
902
  this.onTouchedFn();
903
+ this.close();
859
904
  }
860
905
  }
861
906
  optionHover(value) {
@@ -905,23 +950,25 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
905
950
  ngOnDestroy() {
906
951
  this.unsubscribeTriggerResize();
907
952
  }
908
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThySelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
909
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThySelect, isStandalone: true, selector: "thy-select,thy-custom-select", inputs: { thyDropdownWidthMode: { classPropertyName: "thyDropdownWidthMode", publicName: "thyDropdownWidthMode", isSignal: true, isRequired: false, transformFunction: null }, thyShowSearch: { classPropertyName: "thyShowSearch", publicName: "thyShowSearch", isSignal: true, isRequired: false, transformFunction: null }, thyPlaceHolder: { classPropertyName: "thyPlaceHolder", publicName: "thyPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, thyServerSearch: { classPropertyName: "thyServerSearch", publicName: "thyServerSearch", isSignal: true, isRequired: false, transformFunction: null }, thyLoadState: { classPropertyName: "thyLoadState", publicName: "thyLoadState", isSignal: true, isRequired: false, transformFunction: null }, thyAutoActiveFirstItem: { classPropertyName: "thyAutoActiveFirstItem", publicName: "thyAutoActiveFirstItem", isSignal: true, isRequired: false, transformFunction: null }, thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyEmptyStateText: { classPropertyName: "thyEmptyStateText", publicName: "thyEmptyStateText", isSignal: true, isRequired: false, transformFunction: null }, thyEmptySearchMessageText: { classPropertyName: "thyEmptySearchMessageText", publicName: "thyEmptySearchMessageText", isSignal: true, isRequired: false, transformFunction: null }, thyEnableScrollLoad: { classPropertyName: "thyEnableScrollLoad", publicName: "thyEnableScrollLoad", isSignal: true, isRequired: false, transformFunction: null }, thyAllowClear: { classPropertyName: "thyAllowClear", publicName: "thyAllowClear", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thySortComparator: { classPropertyName: "thySortComparator", publicName: "thySortComparator", isSignal: true, isRequired: false, transformFunction: null }, thyFooterTemplate: { classPropertyName: "thyFooterTemplate", publicName: "thyFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, thyPlacement: { classPropertyName: "thyPlacement", publicName: "thyPlacement", isSignal: true, isRequired: false, transformFunction: null }, thyOrigin: { classPropertyName: "thyOrigin", publicName: "thyOrigin", isSignal: true, isRequired: false, transformFunction: null }, thyFooterClass: { classPropertyName: "thyFooterClass", publicName: "thyFooterClass", isSignal: true, isRequired: false, transformFunction: null }, thyAutoExpand: { classPropertyName: "thyAutoExpand", publicName: "thyAutoExpand", isSignal: true, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, thyMaxTagCount: { classPropertyName: "thyMaxTagCount", publicName: "thyMaxTagCount", isSignal: true, isRequired: false, transformFunction: null }, thyBorderless: { classPropertyName: "thyBorderless", publicName: "thyBorderless", isSignal: true, isRequired: false, transformFunction: null }, thyOptions: { classPropertyName: "thyOptions", publicName: "thyOptions", isSignal: true, isRequired: false, transformFunction: null }, thyPreset: { classPropertyName: "thyPreset", publicName: "thyPreset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnSearch: "thyOnSearch", thyOnScrollToBottom: "thyOnScrollToBottom", thyOnExpandStatusChange: "thyOnExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "keydown": "keydown($event)" }, properties: { "class.thy-select-custom": "true", "class.thy-select": "true", "class.menu-is-opened": "panelOpen", "attr.tabindex": "tabIndex" } }, providers: [
953
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThySelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
954
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThySelect, isStandalone: true, selector: "thy-select,thy-custom-select", inputs: { thyDropdownWidthMode: { classPropertyName: "thyDropdownWidthMode", publicName: "thyDropdownWidthMode", isSignal: true, isRequired: false, transformFunction: null }, thyItemSize: { classPropertyName: "thyItemSize", publicName: "thyItemSize", isSignal: true, isRequired: false, transformFunction: null }, thyShowSearch: { classPropertyName: "thyShowSearch", publicName: "thyShowSearch", isSignal: true, isRequired: false, transformFunction: null }, thyPlaceHolder: { classPropertyName: "thyPlaceHolder", publicName: "thyPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, thyServerSearch: { classPropertyName: "thyServerSearch", publicName: "thyServerSearch", isSignal: true, isRequired: false, transformFunction: null }, thyLoadState: { classPropertyName: "thyLoadState", publicName: "thyLoadState", isSignal: true, isRequired: false, transformFunction: null }, thyAutoActiveFirstItem: { classPropertyName: "thyAutoActiveFirstItem", publicName: "thyAutoActiveFirstItem", isSignal: true, isRequired: false, transformFunction: null }, thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyEmptyStateText: { classPropertyName: "thyEmptyStateText", publicName: "thyEmptyStateText", isSignal: true, isRequired: false, transformFunction: null }, thyEmptySearchMessageText: { classPropertyName: "thyEmptySearchMessageText", publicName: "thyEmptySearchMessageText", isSignal: true, isRequired: false, transformFunction: null }, thyEnableScrollLoad: { classPropertyName: "thyEnableScrollLoad", publicName: "thyEnableScrollLoad", isSignal: true, isRequired: false, transformFunction: null }, thyAllowClear: { classPropertyName: "thyAllowClear", publicName: "thyAllowClear", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thySortComparator: { classPropertyName: "thySortComparator", publicName: "thySortComparator", isSignal: true, isRequired: false, transformFunction: null }, thyFooterTemplate: { classPropertyName: "thyFooterTemplate", publicName: "thyFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, thyPlacement: { classPropertyName: "thyPlacement", publicName: "thyPlacement", isSignal: true, isRequired: false, transformFunction: null }, thyOrigin: { classPropertyName: "thyOrigin", publicName: "thyOrigin", isSignal: true, isRequired: false, transformFunction: null }, thyFooterClass: { classPropertyName: "thyFooterClass", publicName: "thyFooterClass", isSignal: true, isRequired: false, transformFunction: null }, thyAutoExpand: { classPropertyName: "thyAutoExpand", publicName: "thyAutoExpand", isSignal: true, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, thyMaxTagCount: { classPropertyName: "thyMaxTagCount", publicName: "thyMaxTagCount", isSignal: true, isRequired: false, transformFunction: null }, thyBorderless: { classPropertyName: "thyBorderless", publicName: "thyBorderless", isSignal: true, isRequired: false, transformFunction: null }, thyVirtualScroll: { classPropertyName: "thyVirtualScroll", publicName: "thyVirtualScroll", isSignal: true, isRequired: false, transformFunction: null }, thyOptions: { classPropertyName: "thyOptions", publicName: "thyOptions", isSignal: true, isRequired: false, transformFunction: null }, thyPreset: { classPropertyName: "thyPreset", publicName: "thyPreset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnSearch: "thyOnSearch", thyOnScrollToBottom: "thyOnScrollToBottom", thyOnExpandStatusChange: "thyOnExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "keydown": "keydown($event)" }, properties: { "class.thy-select-custom": "true", "class.thy-select": "true", "class.menu-is-opened": "panelOpen", "attr.tabindex": "tabIndex" } }, providers: [
910
955
  {
911
956
  provide: NG_VALUE_ACCESSOR,
912
957
  useExisting: forwardRef(() => ThySelect),
913
958
  multi: true
914
- }
915
- ], queries: [{ propertyName: "selectedValueDisplayRef", first: true, predicate: ["selectedDisplay"], descendants: true, isSignal: true }, { propertyName: "options", predicate: ThyOption, descendants: true, isSignal: true }, { propertyName: "groups", predicate: ThySelectOptionGroup, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "optionRenders", predicate: ThyOptionRender, descendants: true }], exportAs: ["thySelect"], usesInheritance: true, ngImport: i0, template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selectedOptions()\"\n [thyIsMultiple]=\"isMultiple()\"\n [thyShowSearch]=\"thyShowSearch()\"\n [thyAllowClear]=\"thyAllowClear()\"\n [thySize]=\"thySize()\"\n [thyPlaceholder]=\"thyPlaceHolder()\"\n [customDisplayTemplate]=\"selectedValueDisplayRef()\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless()\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"search($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount()\"\n [thyPreset]=\"thyPreset()\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions()\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin() || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth()\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass()\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'top' && placement() !== 'bottom' && placement() !== 'left' && placement() !== 'right' ? 'enter' : 'void'\n \">\n @if (filteredGroupsAndOptions()?.length > 0) {\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }} thy-select-dropdown-options-with-virtual-scroll\">\n <cdk-virtual-scroll-viewport\n class=\"thy-select-scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.height.px]=\"virtualHeight()\"\n (scrolledIndexChange)=\"optionsScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n <ng-template cdkVirtualFor [cdkVirtualForOf]=\"filteredGroupsAndOptions()\" [cdkVirtualForTrackBy]=\"trackByFn\" let-item>\n @if (item.type === 'group') {\n <thy-option-group-render [thyGroupLabel]=\"item.label\"></thy-option-group-render>\n } @else {\n <thy-option-render\n [thyValue]=\"item.value\"\n [thyRawValue]=\"item.rawValue\"\n [thyLabelText]=\"item.label\"\n [thyShowOptionCustom]=\"item.showOptionCustom\"\n [thySearchKey]=\"item.searchKey\"\n [thyDisabled]=\"item.disabled\"\n [thyTemplate]=\"item.template\"\n [thyShowCheckedIcon]=\"isMultiple()\"\n [thySelectedValuesMap]=\"selectedValuesMap()\"\n [thyActivatedValue]=\"activatedValue()\"\n (optionHover)=\"optionHover($event)\"\n (optionClick)=\"optionClick($event)\">\n </thy-option-render>\n }\n </ng-template>\n </cdk-virtual-scroll-viewport>\n <ng-content></ng-content>\n </div>\n } @else {\n <thy-loading [thyDone]=\"thyLoadState()\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState()) {\n @let isSearching = keywords();\n <thy-empty\n [thyMessage]=\"isSearching ? thyEmptySearchMessageText() : thyEmptyStateText()\"\n thySize=\"sm\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate()) {\n <div [class]=\"thyFooterClass() ? thyFooterClass() : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate()\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["inputValue", "thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["inputValueChange", "thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: ThyOptionRender, selector: "thy-option-render", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thySearchKey", "thyDisabled", "thyShowOptionCustom", "thyTemplate", "thyTemplateContext", "thyShowCheckedIcon", "thySelectedValuesMap", "thyActivatedValue"], outputs: ["optionClick", "optionHover"] }, { kind: "component", type: ThyOptionGroupRender, selector: "thy-option-group-render", inputs: ["thyGroupLabel", "thyDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
959
+ },
960
+ ScrollDispatcher
961
+ ], queries: [{ propertyName: "selectedValueDisplayRef", first: true, predicate: ["selectedDisplay"], descendants: true, isSignal: true }, { propertyName: "options", predicate: ThyOption, descendants: true, isSignal: true }, { propertyName: "groups", predicate: ThySelectOptionGroup, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "optionRenders", predicate: ThyOptionRender, descendants: true }], exportAs: ["thySelect"], usesInheritance: true, ngImport: i0, template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selectedOptions()\"\n [thyIsMultiple]=\"isMultiple()\"\n [thyShowSearch]=\"thyShowSearch()\"\n [thyAllowClear]=\"thyAllowClear()\"\n [thySize]=\"thySize()\"\n [thyPlaceholder]=\"thyPlaceHolder()\"\n [customDisplayTemplate]=\"selectedValueDisplayRef()\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless()\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"search($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount()\"\n [thyPreset]=\"thyPreset()\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions()\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin() || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth()\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass()\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'top' && placement() !== 'bottom' && placement() !== 'left' && placement() !== 'right' ? 'enter' : 'void'\n \">\n @if (filteredGroupsAndOptions()?.length > 0) {\n @if (thyVirtualScroll()) {\n <ng-container *thyViewOutlet=\"virtualScrollTemplate\"> </ng-container>\n } @else {\n <ng-container *thyViewOutlet=\"defaultTemplate\"> </ng-container>\n }\n } @else {\n <thy-loading [thyDone]=\"thyLoadState()\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState()) {\n @let isSearching = keywords();\n <thy-empty\n [thyMessage]=\"isSearching ? thyEmptySearchMessageText() : thyEmptyStateText()\"\n thySize=\"sm\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate()) {\n <div [class]=\"thyFooterClass() ? thyFooterClass() : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate()\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #virtualScrollTemplate>\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }} thy-select-dropdown-options-with-virtual-scroll\">\n <cdk-virtual-scroll-viewport\n class=\"thy-select-scroll-viewport\"\n [itemSize]=\"thyItemSize()\"\n [style.height.px]=\"virtualHeight()\"\n (scrolledIndexChange)=\"optionsVirtualScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n <ng-template\n cdkVirtualFor\n [cdkVirtualForOf]=\"filteredGroupsAndOptions()\"\n [cdkVirtualForTrackBy]=\"trackByFn\"\n [cdkVirtualForTemplateCacheSize]=\"0\"\n let-item>\n <ng-container\n *thyViewOutlet=\"\n renderTemplate;\n context: {\n $implicit: item\n }\n \">\n </ng-container>\n </ng-template>\n </cdk-virtual-scroll-viewport>\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultTemplate>\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }}\"\n thyScroll\n [thyEnable]=\"thyEnableScrollLoad()\"\n (thyOnScrolled)=\"optionsScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n @for (item of filteredGroupsAndOptions(); track trackByFn($index, item)) {\n <ng-container\n *thyViewOutlet=\"\n renderTemplate;\n context: {\n $implicit: item\n }\n \">\n </ng-container>\n }\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #renderTemplate let-item>\n @if (item.type === 'group') {\n <thy-option-group-render [thyGroupLabel]=\"item.label\"></thy-option-group-render>\n } @else {\n <thy-option-render\n [attr.data-option-value]=\"item.value\"\n [thyValue]=\"item.value\"\n [thyRawValue]=\"item.rawValue\"\n [thyLabelText]=\"item.label\"\n [thyShowOptionCustom]=\"item.showOptionCustom\"\n [thySearchKey]=\"item.searchKey\"\n [thyDisabled]=\"item.disabled\"\n [thyTemplate]=\"item.template\"\n [thyShowCheckedIcon]=\"isMultiple()\"\n [thySelectedValuesMap]=\"selectedValuesMap()\"\n [thyActivatedValue]=\"activatedValue()\"\n (optionHover)=\"optionHover($event)\"\n (optionClick)=\"optionClick($event)\">\n </thy-option-render>\n\n @if (item.suffixTemplate) {\n <ng-container *thyViewOutlet=\"item.suffixTemplate\"> </ng-container>\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["inputValue", "thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["inputValueChange", "thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: ThyOptionRender, selector: "thy-option-render", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thySearchKey", "thyDisabled", "thyShowOptionCustom", "thyTemplate", "thyTemplateContext", "thyShowCheckedIcon", "thySelectedValuesMap", "thyActivatedValue"], outputs: ["optionClick", "optionHover"] }, { kind: "component", type: ThyOptionGroupRender, selector: "thy-option-group-render", inputs: ["thyGroupLabel", "thyDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyViewOutletDirective, selector: "[thyViewOutlet]", inputs: ["thyViewOutlet", "thyViewOutletContext"] }, { kind: "directive", type: ThyScrollDirective, selector: "[thyScroll]", inputs: ["thyEnable"], outputs: ["thyOnScrolled"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
916
962
  }
917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThySelect, decorators: [{
963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThySelect, decorators: [{
918
964
  type: Component,
919
965
  args: [{ selector: 'thy-select,thy-custom-select', exportAs: 'thySelect', providers: [
920
966
  {
921
967
  provide: NG_VALUE_ACCESSOR,
922
968
  useExisting: forwardRef(() => ThySelect),
923
969
  multi: true
924
- }
970
+ },
971
+ ScrollDispatcher
925
972
  ], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
926
973
  CdkOverlayOrigin,
927
974
  ThySelectControl,
@@ -933,6 +980,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
933
980
  ThyOptionRender,
934
981
  ThyOptionGroupRender,
935
982
  NgTemplateOutlet,
983
+ ThyViewOutletDirective,
984
+ ThyScrollDirective,
936
985
  ScrollingModule
937
986
  ], host: {
938
987
  '[class.thy-select-custom]': 'true',
@@ -941,11 +990,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
941
990
  '[attr.tabindex]': 'tabIndex',
942
991
  '(focus)': 'onFocus($event)',
943
992
  '(blur)': 'onBlur($event)'
944
- }, animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selectedOptions()\"\n [thyIsMultiple]=\"isMultiple()\"\n [thyShowSearch]=\"thyShowSearch()\"\n [thyAllowClear]=\"thyAllowClear()\"\n [thySize]=\"thySize()\"\n [thyPlaceholder]=\"thyPlaceHolder()\"\n [customDisplayTemplate]=\"selectedValueDisplayRef()\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless()\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"search($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount()\"\n [thyPreset]=\"thyPreset()\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions()\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin() || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth()\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass()\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'top' && placement() !== 'bottom' && placement() !== 'left' && placement() !== 'right' ? 'enter' : 'void'\n \">\n @if (filteredGroupsAndOptions()?.length > 0) {\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }} thy-select-dropdown-options-with-virtual-scroll\">\n <cdk-virtual-scroll-viewport\n class=\"thy-select-scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.height.px]=\"virtualHeight()\"\n (scrolledIndexChange)=\"optionsScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n <ng-template cdkVirtualFor [cdkVirtualForOf]=\"filteredGroupsAndOptions()\" [cdkVirtualForTrackBy]=\"trackByFn\" let-item>\n @if (item.type === 'group') {\n <thy-option-group-render [thyGroupLabel]=\"item.label\"></thy-option-group-render>\n } @else {\n <thy-option-render\n [thyValue]=\"item.value\"\n [thyRawValue]=\"item.rawValue\"\n [thyLabelText]=\"item.label\"\n [thyShowOptionCustom]=\"item.showOptionCustom\"\n [thySearchKey]=\"item.searchKey\"\n [thyDisabled]=\"item.disabled\"\n [thyTemplate]=\"item.template\"\n [thyShowCheckedIcon]=\"isMultiple()\"\n [thySelectedValuesMap]=\"selectedValuesMap()\"\n [thyActivatedValue]=\"activatedValue()\"\n (optionHover)=\"optionHover($event)\"\n (optionClick)=\"optionClick($event)\">\n </thy-option-render>\n }\n </ng-template>\n </cdk-virtual-scroll-viewport>\n <ng-content></ng-content>\n </div>\n } @else {\n <thy-loading [thyDone]=\"thyLoadState()\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState()) {\n @let isSearching = keywords();\n <thy-empty\n [thyMessage]=\"isSearching ? thyEmptySearchMessageText() : thyEmptyStateText()\"\n thySize=\"sm\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate()) {\n <div [class]=\"thyFooterClass() ? thyFooterClass() : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate()\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n" }]
945
- }], ctorParameters: () => [], propDecorators: { thyDropdownWidthMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDropdownWidthMode", required: false }] }], cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }], thyOnSearch: [{ type: i0.Output, args: ["thyOnSearch"] }], thyOnScrollToBottom: [{ type: i0.Output, args: ["thyOnScrollToBottom"] }], thyOnExpandStatusChange: [{ type: i0.Output, args: ["thyOnExpandStatusChange"] }], thyShowSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyShowSearch", required: false }] }], thyPlaceHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPlaceHolder", required: false }] }], thyServerSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyServerSearch", required: false }] }], thyLoadState: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLoadState", required: false }] }], thyAutoActiveFirstItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAutoActiveFirstItem", required: false }] }], thyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyMode", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }], thyEmptyStateText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEmptyStateText", required: false }] }], thyEmptySearchMessageText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEmptySearchMessageText", required: false }] }], thyEnableScrollLoad: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEnableScrollLoad", required: false }] }], thyAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAllowClear", required: false }] }], thyDisabled: [{
993
+ }, animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selectedOptions()\"\n [thyIsMultiple]=\"isMultiple()\"\n [thyShowSearch]=\"thyShowSearch()\"\n [thyAllowClear]=\"thyAllowClear()\"\n [thySize]=\"thySize()\"\n [thyPlaceholder]=\"thyPlaceHolder()\"\n [customDisplayTemplate]=\"selectedValueDisplayRef()\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless()\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"search($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount()\"\n [thyPreset]=\"thyPreset()\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions()\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin() || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth()\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass()\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'top' && placement() !== 'bottom' && placement() !== 'left' && placement() !== 'right' ? 'enter' : 'void'\n \">\n @if (filteredGroupsAndOptions()?.length > 0) {\n @if (thyVirtualScroll()) {\n <ng-container *thyViewOutlet=\"virtualScrollTemplate\"> </ng-container>\n } @else {\n <ng-container *thyViewOutlet=\"defaultTemplate\"> </ng-container>\n }\n } @else {\n <thy-loading [thyDone]=\"thyLoadState()\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState()) {\n @let isSearching = keywords();\n <thy-empty\n [thyMessage]=\"isSearching ? thyEmptySearchMessageText() : thyEmptyStateText()\"\n thySize=\"sm\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate()) {\n <div [class]=\"thyFooterClass() ? thyFooterClass() : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate()\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #virtualScrollTemplate>\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }} thy-select-dropdown-options-with-virtual-scroll\">\n <cdk-virtual-scroll-viewport\n class=\"thy-select-scroll-viewport\"\n [itemSize]=\"thyItemSize()\"\n [style.height.px]=\"virtualHeight()\"\n (scrolledIndexChange)=\"optionsVirtualScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n <ng-template\n cdkVirtualFor\n [cdkVirtualForOf]=\"filteredGroupsAndOptions()\"\n [cdkVirtualForTrackBy]=\"trackByFn\"\n [cdkVirtualForTemplateCacheSize]=\"0\"\n let-item>\n <ng-container\n *thyViewOutlet=\"\n renderTemplate;\n context: {\n $implicit: item\n }\n \">\n </ng-container>\n </ng-template>\n </cdk-virtual-scroll-viewport>\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultTemplate>\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ thySize() }}\"\n thyScroll\n [thyEnable]=\"thyEnableScrollLoad()\"\n (thyOnScrolled)=\"optionsScrolled($event)\"\n (mouseleave)=\"mouseLeaveOptions()\">\n @for (item of filteredGroupsAndOptions(); track trackByFn($index, item)) {\n <ng-container\n *thyViewOutlet=\"\n renderTemplate;\n context: {\n $implicit: item\n }\n \">\n </ng-container>\n }\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #renderTemplate let-item>\n @if (item.type === 'group') {\n <thy-option-group-render [thyGroupLabel]=\"item.label\"></thy-option-group-render>\n } @else {\n <thy-option-render\n [attr.data-option-value]=\"item.value\"\n [thyValue]=\"item.value\"\n [thyRawValue]=\"item.rawValue\"\n [thyLabelText]=\"item.label\"\n [thyShowOptionCustom]=\"item.showOptionCustom\"\n [thySearchKey]=\"item.searchKey\"\n [thyDisabled]=\"item.disabled\"\n [thyTemplate]=\"item.template\"\n [thyShowCheckedIcon]=\"isMultiple()\"\n [thySelectedValuesMap]=\"selectedValuesMap()\"\n [thyActivatedValue]=\"activatedValue()\"\n (optionHover)=\"optionHover($event)\"\n (optionClick)=\"optionClick($event)\">\n </thy-option-render>\n\n @if (item.suffixTemplate) {\n <ng-container *thyViewOutlet=\"item.suffixTemplate\"> </ng-container>\n }\n }\n</ng-template>\n" }]
994
+ }], ctorParameters: () => [], propDecorators: { thyDropdownWidthMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDropdownWidthMode", required: false }] }], thyItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyItemSize", required: false }] }], cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }], thyOnSearch: [{ type: i0.Output, args: ["thyOnSearch"] }], thyOnScrollToBottom: [{ type: i0.Output, args: ["thyOnScrollToBottom"] }], thyOnExpandStatusChange: [{ type: i0.Output, args: ["thyOnExpandStatusChange"] }], thyShowSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyShowSearch", required: false }] }], thyPlaceHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPlaceHolder", required: false }] }], thyServerSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyServerSearch", required: false }] }], thyLoadState: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLoadState", required: false }] }], thyAutoActiveFirstItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAutoActiveFirstItem", required: false }] }], thyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyMode", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }], thyEmptyStateText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEmptyStateText", required: false }] }], thyEmptySearchMessageText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEmptySearchMessageText", required: false }] }], thyEnableScrollLoad: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEnableScrollLoad", required: false }] }], thyAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAllowClear", required: false }] }], thyDisabled: [{
946
995
  type: Input,
947
996
  args: [{ transform: coerceBooleanProperty }]
948
- }], thySortComparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySortComparator", required: false }] }], thyFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFooterTemplate", required: false }] }], thyPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPlacement", required: false }] }], thyOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOrigin", required: false }] }], thyFooterClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFooterClass", required: false }] }], selectedValueDisplayRef: [{ type: i0.ContentChild, args: ['selectedDisplay', { isSignal: true }] }], thyAutoExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAutoExpand", required: false }] }], thyHasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyHasBackdrop", required: false }] }], thyMaxTagCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyMaxTagCount", required: false }] }], thyBorderless: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyBorderless", required: false }] }], cdkVirtualScrollViewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], thyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOptions", required: false }] }], thyPreset: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreset", required: false }] }], trigger: [{
997
+ }], thySortComparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySortComparator", required: false }] }], thyFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFooterTemplate", required: false }] }], thyPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPlacement", required: false }] }], thyOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOrigin", required: false }] }], thyFooterClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFooterClass", required: false }] }], selectedValueDisplayRef: [{ type: i0.ContentChild, args: ['selectedDisplay', { isSignal: true }] }], thyAutoExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAutoExpand", required: false }] }], thyHasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyHasBackdrop", required: false }] }], thyMaxTagCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyMaxTagCount", required: false }] }], thyBorderless: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyBorderless", required: false }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], thyVirtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyVirtualScroll", required: false }] }], cdkVirtualScrollViewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], thyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOptions", required: false }] }], thyPreset: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreset", required: false }] }], trigger: [{
949
998
  type: ViewChild,
950
999
  args: ['trigger', { read: ElementRef, static: true }]
951
1000
  }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ThyOption), { ...{ descendants: true }, isSignal: true }] }], groups: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ThySelectOptionGroup), { ...{ descendants: true }, isSignal: true }] }], optionRenders: [{
@@ -973,7 +1022,7 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
973
1022
  }
974
1023
  constructor() {
975
1024
  super();
976
- this.selectElement = viewChild('select', ...(ngDevMode ? [{ debugName: "selectElement" }] : []));
1025
+ this.selectElement = viewChild.required('select');
977
1026
  this.innerValue = model(null, ...(ngDevMode ? [{ debugName: "innerValue" }] : []));
978
1027
  this.disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
979
1028
  this.hostRenderer = useHostRenderer();
@@ -1004,8 +1053,8 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
1004
1053
  this.innerValue.set('');
1005
1054
  this.onChangeFn(this.innerValue());
1006
1055
  }
1007
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1008
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyNativeSelect, isStandalone: true, selector: "thy-native-select", inputs: { innerValue: { classPropertyName: "innerValue", publicName: "innerValue", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, thyAllowClear: { classPropertyName: "thyAllowClear", publicName: "thyAllowClear", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { innerValue: "innerValueChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex" }, classAttribute: "thy-select" }, providers: [
1056
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1057
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyNativeSelect, isStandalone: true, selector: "thy-native-select", inputs: { innerValue: { classPropertyName: "innerValue", publicName: "innerValue", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, thyAllowClear: { classPropertyName: "thyAllowClear", publicName: "thyAllowClear", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { innerValue: "innerValueChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex" }, classAttribute: "thy-select" }, providers: [
1009
1058
  {
1010
1059
  provide: NG_VALUE_ACCESSOR,
1011
1060
  useExisting: forwardRef(() => ThyNativeSelect),
@@ -1013,7 +1062,7 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
1013
1062
  }
1014
1063
  ], viewQueries: [{ propertyName: "selectElement", first: true, predicate: ["select"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"thySize()\"\n [disabled]=\"disabled()\"\n [(ngModel)]=\"innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear()\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n@if (thyAllowClear() && innerValue()) {\n <a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
1015
1064
  }
1016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyNativeSelect, decorators: [{
1065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyNativeSelect, decorators: [{
1017
1066
  type: Component,
1018
1067
  args: [{ selector: 'thy-native-select', providers: [
1019
1068
  {
@@ -1030,8 +1079,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1030
1079
  }], ctorParameters: () => [], propDecorators: { selectElement: [{ type: i0.ViewChild, args: ['select', { isSignal: true }] }], innerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "innerValue", required: false }] }, { type: i0.Output, args: ["innerValueChange"] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], thyAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAllowClear", required: false }] }] } });
1031
1080
 
1032
1081
  class ThySelectModule {
1033
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1034
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThySelectModule, imports: [CommonModule,
1082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1083
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThySelectModule, imports: [CommonModule,
1035
1084
  FormsModule,
1036
1085
  ThyInputModule,
1037
1086
  OverlayModule,
@@ -1043,7 +1092,7 @@ class ThySelectModule {
1043
1092
  ThyOptionModule,
1044
1093
  ThyNativeSelect,
1045
1094
  ThySelect], exports: [ThyNativeSelect, ThySelect, ThyOptionModule] }); }
1046
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThySelectModule, providers: [THY_SELECT_SCROLL_STRATEGY_PROVIDER, THY_SELECT_CONFIG_PROVIDER], imports: [CommonModule,
1095
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThySelectModule, providers: [THY_SELECT_SCROLL_STRATEGY_PROVIDER, THY_SELECT_CONFIG_PROVIDER], imports: [CommonModule,
1047
1096
  FormsModule,
1048
1097
  ThyInputModule,
1049
1098
  OverlayModule,
@@ -1056,7 +1105,7 @@ class ThySelectModule {
1056
1105
  ThyNativeSelect,
1057
1106
  ThySelect, ThyOptionModule] }); }
1058
1107
  }
1059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThySelectModule, decorators: [{
1108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThySelectModule, decorators: [{
1060
1109
  type: NgModule,
1061
1110
  args: [{
1062
1111
  imports: [