ngx-tethys 20.0.1-0 → 20.0.2

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 (241) hide show
  1. package/CHANGELOG.md +19 -2
  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 +6 -12
  6. package/arrow-switcher/index.d.ts +6 -6
  7. package/autocomplete/index.d.ts +23 -28
  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 +28 -65
  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 +48 -113
  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 +28 -27
  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-nav.mjs +27 -27
  113. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  114. package/fesm2022/ngx-tethys-notify.mjs +20 -20
  115. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-pagination.mjs +18 -18
  117. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  118. package/fesm2022/ngx-tethys-popover.mjs +22 -21
  119. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-progress.mjs +17 -17
  121. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
  123. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-property.mjs +12 -11
  125. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-radio.mjs +17 -17
  127. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-rate.mjs +12 -12
  129. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-resizable.mjs +21 -18
  131. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-result.mjs +11 -11
  133. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-segment.mjs +19 -16
  135. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-select.mjs +517 -433
  137. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys-shared.mjs +284 -258
  139. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  140. package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
  141. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  142. package/fesm2022/ngx-tethys-slide.mjs +37 -36
  143. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  144. package/fesm2022/ngx-tethys-slider.mjs +11 -11
  145. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-space.mjs +10 -10
  147. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  148. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-stepper.mjs +22 -22
  150. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  152. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  154. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-table.mjs +28 -28
  156. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  158. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-tag.mjs +11 -11
  160. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-testing.mjs +1 -1
  162. package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
  164. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-timeline.mjs +14 -14
  166. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-tooltip.mjs +19 -16
  168. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-transfer.mjs +15 -15
  170. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
  172. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-tree.mjs +50 -43
  174. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-typography.mjs +16 -16
  176. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-upload.mjs +26 -25
  178. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-util.mjs +11 -5
  180. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  182. package/fesm2022/ngx-tethys-watermark.mjs +18 -15
  183. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  184. package/fesm2022/ngx-tethys.mjs +1 -1
  185. package/fesm2022/ngx-tethys.mjs.map +1 -1
  186. package/flexible-text/index.d.ts +5 -5
  187. package/form/index.d.ts +26 -22
  188. package/fullscreen/index.d.ts +4 -4
  189. package/grid/index.d.ts +12 -12
  190. package/guider/index.d.ts +10 -10
  191. package/i18n/index.d.ts +1 -1
  192. package/icon/index.d.ts +3 -3
  193. package/image/index.d.ts +12 -12
  194. package/input/index.d.ts +22 -22
  195. package/input-number/index.d.ts +4 -4
  196. package/layout/index.d.ts +16 -16
  197. package/list/index.d.ts +16 -15
  198. package/mention/index.d.ts +4 -4
  199. package/menu/index.d.ts +7 -7
  200. package/message/index.d.ts +5 -5
  201. package/nav/index.d.ts +12 -12
  202. package/notify/index.d.ts +1 -1
  203. package/package.json +1 -1
  204. package/pagination/index.d.ts +21 -17
  205. package/popover/index.d.ts +8 -8
  206. package/progress/index.d.ts +18 -18
  207. package/property/index.d.ts +6 -6
  208. package/property-operation/index.d.ts +3 -3
  209. package/radio/index.d.ts +6 -6
  210. package/rate/index.d.ts +5 -5
  211. package/resizable/index.d.ts +2 -2
  212. package/result/index.d.ts +8 -8
  213. package/schematics/testing/test-workspace.js +1 -0
  214. package/schematics/version.d.ts +1 -1
  215. package/schematics/version.js +1 -1
  216. package/segment/index.d.ts +9 -9
  217. package/select/index.d.ts +91 -76
  218. package/shared/index.d.ts +152 -81
  219. package/shared/option/styles/option.mixin.scss +0 -10
  220. package/shared/option/styles/select-dropdown.scss +10 -9
  221. package/skeleton/index.d.ts +52 -52
  222. package/slide/index.d.ts +5 -5
  223. package/slider/index.d.ts +6 -6
  224. package/space/index.d.ts +1 -1
  225. package/statistic/index.d.ts +18 -18
  226. package/stepper/index.d.ts +8 -8
  227. package/switch/index.d.ts +2 -2
  228. package/table/index.d.ts +24 -24
  229. package/tabs/index.d.ts +6 -6
  230. package/testing/index.d.ts +1 -1
  231. package/time-picker/index.d.ts +21 -21
  232. package/timeline/index.d.ts +8 -8
  233. package/tooltip/index.d.ts +12 -12
  234. package/transfer/index.d.ts +16 -16
  235. package/tree/index.d.ts +28 -28
  236. package/tree-select/index.d.ts +13 -13
  237. package/typography/index.d.ts +3 -3
  238. package/upload/index.d.ts +4 -4
  239. package/util/index.d.ts +17 -7
  240. package/vote/index.d.ts +2 -2
  241. package/watermark/index.d.ts +2 -2
package/select/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, ElementRef, InjectionToken, AfterViewInit, AfterContentInit, OnDestroy, Signal, TemplateRef, QueryList } from '@angular/core';
2
+ import { OnInit, ElementRef, InjectionToken, AfterViewInit, OnDestroy, Signal, WritableSignal, TemplateRef, QueryList } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import * as i2 from '@angular/forms';
5
5
  import { ControlValueAccessor } from '@angular/forms';
@@ -8,15 +8,15 @@ import * as i4 from '@angular/cdk/overlay';
8
8
  import { ScrollStrategy, Overlay, ConnectionPositionPair, CdkConnectedOverlay } from '@angular/cdk/overlay';
9
9
  import * as i5 from 'ngx-tethys/loading';
10
10
  import * as i6 from 'ngx-tethys/shared';
11
- import { IThyOptionParentComponent, ThyOption, ThyOptionSelectionChangeEvent, SelectControlSize, ThySelectOptionGroup } from 'ngx-tethys/shared';
11
+ import { SelectControlSize, ThyOption, SelectOptionBase, ThyOptionRender } from 'ngx-tethys/shared';
12
12
  import * as i7 from 'ngx-tethys/icon';
13
13
  import * as i8 from 'ngx-tethys/empty';
14
14
  import { TabIndexDisabledControlValueAccessorMixin, ThyPlacement } from 'ngx-tethys/core';
15
- import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
16
- import { SelectionModel } from '@angular/cdk/collections';
17
15
  import * as i1 from 'ngx-tethys/util';
18
16
  import { FunctionProp } from 'ngx-tethys/util';
19
17
  import { Observable } from 'rxjs';
18
+ import { SafeAny } from 'ngx-tethys/types';
19
+ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
20
20
 
21
21
  type InputSize = 'xs' | 'sm' | 'md' | 'lg' | '';
22
22
  /**
@@ -29,8 +29,8 @@ declare class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin
29
29
  readonly innerValue: _angular_core.ModelSignal<any>;
30
30
  readonly disabled: _angular_core.WritableSignal<boolean>;
31
31
  private hostRenderer;
32
- readonly thySize: _angular_core.InputSignal<InputSize>;
33
- readonly name: _angular_core.InputSignal<string>;
32
+ readonly thySize: _angular_core.InputSignal<InputSize | undefined>;
33
+ readonly name: _angular_core.InputSignal<string | undefined>;
34
34
  readonly thyAllowClear: _angular_core.InputSignalWithTransform<boolean, unknown>;
35
35
  writeValue(obj: any): void;
36
36
  setDisabledState?(isDisabled: boolean): void;
@@ -84,15 +84,23 @@ interface ThySelectOptionModel {
84
84
  icon?: string;
85
85
  groupLabel?: string;
86
86
  }
87
- interface ThyOptionGroupModel extends ThySelectOptionModel {
88
- children?: ThySelectOptionModel[];
87
+ interface ThySelectFlattedItem {
88
+ type: 'option' | 'group';
89
+ value?: string | number;
90
+ rawValue?: any;
91
+ label?: string;
92
+ showOptionCustom?: boolean;
93
+ template?: TemplateRef<any>;
94
+ disabled?: boolean;
95
+ searchKey?: string;
96
+ groupLabel?: string;
89
97
  }
90
98
  /**
91
99
  * 下拉选择组件
92
100
  * @name thy-select,thy-custom-select
93
101
  * @order 10
94
102
  */
95
- declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implements ControlValueAccessor, IThyOptionParentComponent, OnInit, AfterViewInit, AfterContentInit, OnDestroy {
103
+ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
96
104
  private ngZone;
97
105
  private elementRef;
98
106
  private changeDetectorRef;
@@ -106,32 +114,34 @@ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implem
106
114
  disabled: boolean;
107
115
  mode: SelectMode;
108
116
  scrollTop: number;
109
- modalValue: any;
110
117
  defaultOffset: number;
111
- dropDownClass: {
118
+ readonly dropDownClass: Signal<{
112
119
  [key: string]: boolean;
113
- };
114
- dropDownMinWidth: number | null;
120
+ }>;
121
+ readonly dropDownMinWidth: Signal<number | null>;
115
122
  /**
116
123
  * 设置下拉框的最小宽度,默认值 `match-select`,表示与输入框的宽度一致;`min-width` 表示最小宽度为200px;支持自定义最小宽度,比如传 `{minWidth: 150}` 表示最小宽度为150px
117
124
  * @default match-select
118
125
  */
119
- readonly thyDropdownWidthMode: _angular_core.InputSignal<ThyDropdownWidthMode>;
120
- dropDownPositions: ConnectionPositionPair[];
121
- selectionModel: SelectionModel<ThyOption>;
122
- triggerRectWidth: number;
123
- scrollStrategy: ScrollStrategy;
124
- private resizeSubscription;
125
- private selectionModelSubscription;
126
+ readonly thyDropdownWidthMode: _angular_core.InputSignal<ThyDropdownWidthMode | undefined>;
127
+ readonly placement: Signal<ThyPlacement>;
128
+ readonly dropDownPositions: Signal<ConnectionPositionPair[]>;
129
+ thyItemSize: _angular_core.InputSignalWithTransform<number, unknown>;
130
+ readonly virtualHeight: Signal<number>;
131
+ /**
132
+ * 出现滚动条时,视觉上能看到的最大选项个数
133
+ */
134
+ private maxItemLength;
135
+ triggerRectWidth: WritableSignal<number | undefined>;
136
+ scrollStrategy?: ScrollStrategy;
137
+ private resizeSubscription?;
126
138
  /**
127
139
  * 手动聚焦中的标识
128
140
  */
129
141
  private manualFocusing;
130
142
  private config;
131
- private readonly destroy$;
132
- readonly optionSelectionChanges: Observable<ThyOptionSelectionChangeEvent>;
133
- readonly cdkConnectedOverlay: Signal<CdkConnectedOverlay>;
134
- keyManager: ActiveDescendantKeyManager<ThyOption>;
143
+ private destroyRef;
144
+ readonly cdkConnectedOverlay: Signal<CdkConnectedOverlay | undefined>;
135
145
  panelOpen: boolean;
136
146
  /**
137
147
  * 搜索时回调
@@ -175,7 +185,7 @@ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implem
175
185
  * @type primary | success | danger | warning
176
186
  * @default primary
177
187
  */
178
- readonly thySize: _angular_core.InputSignal<SelectControlSize>;
188
+ readonly thySize: _angular_core.InputSignal<SelectControlSize | undefined>;
179
189
  /**
180
190
  * 数据为空时显示的提示文字
181
191
  */
@@ -201,20 +211,20 @@ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implem
201
211
  /**
202
212
  * 排序比较函数
203
213
  */
204
- readonly thySortComparator: _angular_core.InputSignal<(a: ThyOption, b: ThyOption, options: ThyOption[]) => number>;
214
+ readonly thySortComparator: _angular_core.InputSignal<((a: ThyOption, b: ThyOption, options: ThyOption[]) => number) | undefined>;
205
215
  /**
206
216
  * Footer 模板,默认值为空不显示 Footer
207
217
  */
208
- readonly thyFooterTemplate: _angular_core.InputSignal<TemplateRef<any>>;
218
+ readonly thyFooterTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
209
219
  /**
210
220
  * 弹出位置
211
221
  * @type ThyPlacement
212
222
  */
213
- readonly thyPlacement: _angular_core.InputSignal<ThyPlacement>;
223
+ readonly thyPlacement: _angular_core.InputSignal<ThyPlacement | undefined>;
214
224
  /**
215
225
  * 自定义 Overlay Origin
216
226
  */
217
- readonly thyOrigin: _angular_core.InputSignal<HTMLElement | ElementRef<any>>;
227
+ readonly thyOrigin: _angular_core.InputSignal<HTMLElement | ElementRef<any> | undefined>;
218
228
  /**
219
229
  * 自定义 Footer 模板容器 class
220
230
  */
@@ -222,7 +232,7 @@ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implem
222
232
  /**
223
233
  * @private
224
234
  */
225
- readonly selectedValueDisplayRef: Signal<TemplateRef<any>>;
235
+ readonly selectedValueDisplayRef: Signal<TemplateRef<any> | undefined>;
226
236
  /**
227
237
  * 初始化时,是否展开面板
228
238
  */
@@ -239,86 +249,91 @@ declare class ThySelect extends TabIndexDisabledControlValueAccessorMixin implem
239
249
  * 是否隐藏选择框边框
240
250
  */
241
251
  readonly thyBorderless: _angular_core.InputSignalWithTransform<boolean, unknown>;
242
- isReactiveDriven: boolean;
243
- innerOptions: ThySelectOptionModel[];
244
- optionGroups: ThyOptionGroupModel[];
252
+ private scrolledIndex;
253
+ readonly cdkVirtualScrollViewport: Signal<CdkVirtualScrollViewport | undefined>;
254
+ private shouldActivateOption;
245
255
  /**
246
256
  * option 列表
247
257
  */
248
- readonly thyOptions: _angular_core.InputSignalWithTransform<ThySelectOptionModel[], ThySelectOptionModel[]>;
249
- options: QueryList<ThyOption>;
258
+ readonly thyOptions: _angular_core.InputSignalWithTransform<ThySelectOptionModel[] | undefined, ThySelectOptionModel[]>;
259
+ readonly keywords: WritableSignal<string>;
250
260
  /**
251
261
  * 目前只支持多选选中项的展示,默认为空,渲染文字模板,传入tag,渲染展示模板,
252
262
  * @default ''|tag
253
263
  */
254
264
  readonly thyPreset: _angular_core.InputSignal<string>;
255
265
  trigger: ElementRef<HTMLElement>;
256
- readonly panel: Signal<ElementRef<HTMLElement>>;
266
+ private readonly options;
267
+ private readonly groups;
257
268
  /**
258
- * @private
269
+ * 所有分组和选项
259
270
  */
260
- contentOptions: QueryList<ThyOption>;
261
- viewOptions: QueryList<ThyOption>;
271
+ private readonly allGroupsAndOptions;
262
272
  /**
263
- * @private
273
+ * 渲染的分组和选项,基于 keywords 过滤后
264
274
  */
265
- readonly contentGroups: Signal<readonly ThySelectOptionGroup[]>;
266
- readonly viewGroups: Signal<readonly ThySelectOptionGroup[]>;
267
- handleKeydown(event: KeyboardEvent): void;
268
- get optionsChanges$(): Observable<ThyOption[]>;
275
+ readonly filteredGroupsAndOptions: Signal<ThySelectFlattedItem[]>;
276
+ /**
277
+ * 渲染的选项
278
+ */
279
+ private readonly filteredOptions;
280
+ private readonly filteredOptionsMap;
281
+ /**
282
+ * 当前选中的值
283
+ */
284
+ readonly selectedValues: WritableSignal<any[]>;
285
+ readonly selectedValuesMap: Signal<Map<any, boolean>>;
286
+ /**
287
+ * 传给 selectControl 指令的选中值
288
+ */
289
+ readonly selectedOptions: WritableSignal<SelectOptionBase | SelectOptionBase[] | null>;
290
+ optionRenders: QueryList<ThyOptionRender>;
291
+ keydown(event: KeyboardEvent): void;
292
+ get optionsChanges$(): Observable<ThyOptionRender[]>;
269
293
  private buildScrollStrategy;
270
- private isSearching;
271
- groupBy: (item: ThySelectOptionModel) => string;
272
- get placement(): ThyPlacement;
273
294
  constructor();
274
- writeValue(value: any): void;
295
+ writeValue(value: SafeAny): void;
275
296
  ngOnInit(): void;
276
- buildOptionGroups(options: ThySelectOptionModel[]): ThyOptionGroupModel[];
277
- buildReactiveOptions(): void;
278
- getDropdownMinWidth(): number | null;
279
297
  ngAfterViewInit(): void;
280
- ngAfterContentInit(): void;
281
- setup(): void;
282
- get isHiddenOptions(): boolean;
283
- onAttached(): void;
284
- dropDownMouseMove(event: MouseEvent): void;
285
- onOptionsScrolled(elementRef: ElementRef): void;
286
- onSearchFilter(searchText: string): void;
298
+ private setup;
299
+ private buildAllGroupsAndOptions;
300
+ private allGroupsAndOptionsByReactive;
301
+ private allGroupsAndOptionsByTemplate;
302
+ private buildFilteredGroupsAndOptions;
303
+ private updateSelectedOptions;
304
+ optionsScrolled(index: number): void;
305
+ search(keywords: string): void;
287
306
  onBlur(event?: FocusEvent): void;
288
307
  onFocus(event?: FocusEvent): void;
289
308
  focus(options?: FocusOptions): void;
290
309
  remove($event: {
291
- item: ThyOption;
310
+ item: SelectOptionBase;
292
311
  $eventOrigin: Event;
293
312
  }): void;
294
313
  clearSelectValue(event?: Event): void;
295
314
  updateCdkConnectedOverlayPositions(): void;
296
- get selected(): ThyOption | ThyOption[];
297
- get isMultiple(): boolean;
298
- get empty(): boolean;
299
- getItemCount(): number;
315
+ readonly isMultiple: Signal<boolean>;
316
+ readonly empty: Signal<boolean>;
317
+ activatedValue: WritableSignal<string | string[] | number | null | undefined>;
300
318
  toggle(event: MouseEvent): void;
301
319
  open(): void;
302
320
  close(): void;
303
321
  private emitModelValueChange;
304
- private highlightCorrectOption;
305
- private initKeyManager;
306
- private handleClosedKeydown;
307
- private handleOpenKeydown;
308
- private getPositions;
309
- private instanceSelectionModel;
310
- private resetOptions;
311
- private initializeSelection;
312
- private setDropDownClass;
313
- private setSelectionByModelValue;
314
- private onSelect;
315
- private sortValues;
322
+ private scrollToActivatedOption;
323
+ private handleKeydown;
324
+ optionClick(event: {
325
+ value: SafeAny;
326
+ isUserInput: boolean;
327
+ }): void;
328
+ optionHover(value: SafeAny): void;
329
+ mouseLeaveOptions(): void;
316
330
  private getOriginRectWidth;
317
331
  private subscribeTriggerResize;
318
332
  private unsubscribeTriggerResize;
333
+ trackByFn(index: number, item: ThySelectFlattedItem): SafeAny;
319
334
  ngOnDestroy(): void;
320
335
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThySelect, never>;
321
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThySelect, "thy-select,thy-custom-select", ["thySelect"], { "thyDropdownWidthMode": { "alias": "thyDropdownWidthMode"; "required": false; "isSignal": true; }; "thyShowSearch": { "alias": "thyShowSearch"; "required": false; "isSignal": true; }; "thyPlaceHolder": { "alias": "thyPlaceHolder"; "required": false; "isSignal": true; }; "thyServerSearch": { "alias": "thyServerSearch"; "required": false; "isSignal": true; }; "thyLoadState": { "alias": "thyLoadState"; "required": false; "isSignal": true; }; "thyAutoActiveFirstItem": { "alias": "thyAutoActiveFirstItem"; "required": false; "isSignal": true; }; "thyMode": { "alias": "thyMode"; "required": false; "isSignal": true; }; "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyEmptyStateText": { "alias": "thyEmptyStateText"; "required": false; "isSignal": true; }; "thyEmptySearchMessageText": { "alias": "thyEmptySearchMessageText"; "required": false; "isSignal": true; }; "thyEnableScrollLoad": { "alias": "thyEnableScrollLoad"; "required": false; "isSignal": true; }; "thyAllowClear": { "alias": "thyAllowClear"; "required": false; "isSignal": true; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; "thySortComparator": { "alias": "thySortComparator"; "required": false; "isSignal": true; }; "thyFooterTemplate": { "alias": "thyFooterTemplate"; "required": false; "isSignal": true; }; "thyPlacement": { "alias": "thyPlacement"; "required": false; "isSignal": true; }; "thyOrigin": { "alias": "thyOrigin"; "required": false; "isSignal": true; }; "thyFooterClass": { "alias": "thyFooterClass"; "required": false; "isSignal": true; }; "thyAutoExpand": { "alias": "thyAutoExpand"; "required": false; "isSignal": true; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; "isSignal": true; }; "thyMaxTagCount": { "alias": "thyMaxTagCount"; "required": false; "isSignal": true; }; "thyBorderless": { "alias": "thyBorderless"; "required": false; "isSignal": true; }; "thyOptions": { "alias": "thyOptions"; "required": false; "isSignal": true; }; "thyPreset": { "alias": "thyPreset"; "required": false; "isSignal": true; }; }, { "thyOnSearch": "thyOnSearch"; "thyOnScrollToBottom": "thyOnScrollToBottom"; "thyOnExpandStatusChange": "thyOnExpandStatusChange"; }, ["selectedValueDisplayRef", "contentGroups", "contentOptions"], ["*"], true, never>;
336
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThySelect, "thy-select,thy-custom-select", ["thySelect"], { "thyDropdownWidthMode": { "alias": "thyDropdownWidthMode"; "required": false; "isSignal": true; }; "thyItemSize": { "alias": "thyItemSize"; "required": false; "isSignal": true; }; "thyShowSearch": { "alias": "thyShowSearch"; "required": false; "isSignal": true; }; "thyPlaceHolder": { "alias": "thyPlaceHolder"; "required": false; "isSignal": true; }; "thyServerSearch": { "alias": "thyServerSearch"; "required": false; "isSignal": true; }; "thyLoadState": { "alias": "thyLoadState"; "required": false; "isSignal": true; }; "thyAutoActiveFirstItem": { "alias": "thyAutoActiveFirstItem"; "required": false; "isSignal": true; }; "thyMode": { "alias": "thyMode"; "required": false; "isSignal": true; }; "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyEmptyStateText": { "alias": "thyEmptyStateText"; "required": false; "isSignal": true; }; "thyEmptySearchMessageText": { "alias": "thyEmptySearchMessageText"; "required": false; "isSignal": true; }; "thyEnableScrollLoad": { "alias": "thyEnableScrollLoad"; "required": false; "isSignal": true; }; "thyAllowClear": { "alias": "thyAllowClear"; "required": false; "isSignal": true; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; "thySortComparator": { "alias": "thySortComparator"; "required": false; "isSignal": true; }; "thyFooterTemplate": { "alias": "thyFooterTemplate"; "required": false; "isSignal": true; }; "thyPlacement": { "alias": "thyPlacement"; "required": false; "isSignal": true; }; "thyOrigin": { "alias": "thyOrigin"; "required": false; "isSignal": true; }; "thyFooterClass": { "alias": "thyFooterClass"; "required": false; "isSignal": true; }; "thyAutoExpand": { "alias": "thyAutoExpand"; "required": false; "isSignal": true; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; "isSignal": true; }; "thyMaxTagCount": { "alias": "thyMaxTagCount"; "required": false; "isSignal": true; }; "thyBorderless": { "alias": "thyBorderless"; "required": false; "isSignal": true; }; "thyOptions": { "alias": "thyOptions"; "required": false; "isSignal": true; }; "thyPreset": { "alias": "thyPreset"; "required": false; "isSignal": true; }; }, { "thyOnSearch": "thyOnSearch"; "thyOnScrollToBottom": "thyOnScrollToBottom"; "thyOnExpandStatusChange": "thyOnExpandStatusChange"; }, ["selectedValueDisplayRef", "options", "groups"], ["*"], true, never>;
322
337
  static ngAcceptInputType_thyDisabled: i1.ThyBooleanInput;
323
338
  }
324
339