ngx-tethys 19.1.0-next.6 → 19.1.0-next.8

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 (53) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/color-picker/coordinates.directive.d.ts +1 -2
  3. package/date-picker/abstract-picker.component.d.ts +1 -1
  4. package/date-picker/base-picker.component.d.ts +1 -0
  5. package/date-picker/picker.component.d.ts +4 -5
  6. package/dropdown/dropdown-menu.component.d.ts +1 -1
  7. package/dropdown/dropdown.directive.d.ts +2 -2
  8. package/fesm2022/ngx-tethys-cascader.mjs +1 -1
  9. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  10. package/fesm2022/ngx-tethys-color-picker.mjs +4 -6
  11. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  12. package/fesm2022/ngx-tethys-copy.mjs +2 -2
  13. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  14. package/fesm2022/ngx-tethys-date-picker.mjs +32 -32
  15. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  16. package/fesm2022/ngx-tethys-dropdown.mjs +7 -10
  17. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  18. package/fesm2022/ngx-tethys-flexible-text.mjs +4 -5
  19. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  20. package/fesm2022/ngx-tethys-image.mjs +5 -7
  21. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  22. package/fesm2022/ngx-tethys-list.mjs +140 -160
  23. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  24. package/fesm2022/ngx-tethys-message.mjs +1 -2
  25. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  26. package/fesm2022/ngx-tethys-select.mjs +1 -1
  27. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  28. package/fesm2022/ngx-tethys-shared.mjs +97 -123
  29. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  30. package/fesm2022/ngx-tethys-skeleton.mjs +1 -2
  31. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  32. package/fesm2022/ngx-tethys-table.mjs +1 -2
  33. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  34. package/fesm2022/ngx-tethys-tooltip.mjs +109 -93
  35. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-tree-select.mjs +1 -1
  37. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys.mjs +1 -1
  39. package/fesm2022/ngx-tethys.mjs.map +1 -1
  40. package/image/preview/image-preview.component.d.ts +2 -2
  41. package/list/selection/selection-list.d.ts +33 -46
  42. package/package.json +54 -54
  43. package/schematics/version.d.ts +1 -1
  44. package/schematics/version.js +1 -1
  45. package/shared/directives/thy-contextmenu.directive.d.ts +2 -2
  46. package/shared/directives/thy-ctrl-enter.directive.d.ts +2 -2
  47. package/shared/directives/thy-enter.directive.d.ts +2 -2
  48. package/shared/directives/thy-show.d.ts +2 -2
  49. package/shared/option/list-option/list-option.component.d.ts +5 -5
  50. package/shared/option/option.token.d.ts +4 -3
  51. package/shared/select/select-control/select-control.component.d.ts +8 -7
  52. package/table/table-column.component.d.ts +15 -5
  53. package/tooltip/tooltip.directive.d.ts +20 -22
@@ -1,15 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, inject, Renderer2, ElementRef, NgZone, ChangeDetectorRef, EventEmitter, forwardRef, Output, Input, ContentChildren, HostBinding, ChangeDetectionStrategy, contentChild, NgModule } from '@angular/core';
2
+ import { input, Component, inject, Renderer2, ElementRef, NgZone, ChangeDetectorRef, computed, output, effect, forwardRef, ContentChildren, ChangeDetectionStrategy, contentChild, NgModule } from '@angular/core';
3
3
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
4
4
  import { coerceBooleanProperty, dom, helpers, keycodes } from 'ngx-tethys/util';
5
5
  import { ScrollToService } from 'ngx-tethys/core';
6
6
  import { ThyListOption, THY_LIST_OPTION_PARENT_COMPONENT, ThyOptionModule } from 'ngx-tethys/shared';
7
- import { Subscription } from 'rxjs';
8
- import { startWith } from 'rxjs/operators';
9
7
  import { useHostRenderer } from '@tethys/cdk/dom';
10
8
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
11
9
  import { SelectionModel } from '@angular/cdk/collections';
12
10
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
11
+ import { startWith } from 'rxjs/operators';
13
12
  import { ThyAvatar, ThyAvatarModule } from 'ngx-tethys/avatar';
14
13
 
15
14
  /**
@@ -71,62 +70,68 @@ class ThySelectionList {
71
70
  this.elementRef = inject(ElementRef);
72
71
  this.ngZone = inject(NgZone);
73
72
  this.changeDetectorRef = inject(ChangeDetectorRef);
74
- this._selectionChangesUnsubscribe$ = Subscription.EMPTY;
75
73
  this.hostRenderer = useHostRenderer();
76
- this.layout = 'list';
77
- this._isList = true;
78
- this._isSelectionList = true;
79
- this.multiple = true;
80
- this.isLayoutGrid = false;
81
- this.spaceEnabled = true;
74
+ /**
75
+ * 改变 grid item 的选择模式,使其支持多选
76
+ */
77
+ this.multiple = input(true, { alias: 'thyMultiple', transform: coerceBooleanProperty });
78
+ /**
79
+ * 绑定键盘事件的容器
80
+ * @type HTMLElement | ElementRef | string
81
+ * @default thy-selection-list 组件绑定的元素
82
+ */
83
+ this.thyBindKeyEventContainer = input();
84
+ /**
85
+ * 出现滚动条的容器
86
+ * @type HTMLElement | ElementRef | string
87
+ * @default thy-selection-list 组件绑定的元素
88
+ */
89
+ this.thyScrollContainer = input();
90
+ /**
91
+ * 键盘事件触发 Before 调用,如果返回 false 则停止继续执行
92
+ */
93
+ this.thyBeforeKeydown = input();
94
+ /**
95
+ * Option Value 唯一的 Key,用于存储哪些选择被选中的唯一值,只有 Option 的 thyValue 是对象的时才可以传入该选项
96
+ */
97
+ this.thyUniqueKey = input();
98
+ /**
99
+ * 比较2个选项的 Value 是否相同
100
+ */
101
+ this.thyCompareWith = input();
102
+ /**
103
+ * grid item 的展示样式
104
+ * @type list | grid
105
+ */
106
+ this.layout = input('list', { alias: 'thyLayout' });
107
+ this.isLayoutGrid = computed(() => this.layout() === 'grid');
108
+ /**
109
+ * 是否自动激活第一项
110
+ */
111
+ this.thyAutoActiveFirstItem = input(false, { transform: coerceBooleanProperty });
112
+ /**
113
+ * 改变 grid item 的大小,支持默认以及 sm 两种大小
114
+ * @type sm | md | lg
115
+ */
116
+ this.thySize = input();
117
+ /**
118
+ * 是否按下空格切换聚焦选项
119
+ */
120
+ this.thySpaceKeyEnabled = input(true, { transform: coerceBooleanProperty });
82
121
  /**
83
122
  * 每当选项的选定状态发生更改时,都会触发更改事件
84
- * @type EventEmitter<ThySelectionListChange>
85
123
  */
86
- this.thySelectionChange = new EventEmitter();
87
- this._onTouched = () => { };
88
- this._onChange = (_) => { };
89
- }
90
- /**
91
- * 改变 grid item 的选择模式,使其支持多选
92
- * @default true
93
- */
94
- set thyMultiple(value) {
95
- const previousValue = this.multiple;
96
- this.multiple = value;
97
- if (previousValue !== this.multiple) {
98
- this._instanceSelectionModel();
99
- }
124
+ this.thySelectionChange = output();
125
+ this.onTouched = () => { };
126
+ this.onChange = (_) => { };
127
+ effect(() => {
128
+ this.setListSize();
129
+ });
130
+ effect(() => {
131
+ this.instanceSelectionModel();
132
+ });
100
133
  }
101
- /**
102
- * grid item 的展示样式
103
- * @type list | grid
104
- * @default list
105
- */
106
- set thyLayout(value) {
107
- this.layout = value;
108
- this.isLayoutGrid = value === 'grid';
109
- }
110
- /**
111
- * 是否自动激活第一项
112
- */
113
- set thyAutoActiveFirstItem(value) {
114
- this.autoActiveFirstItem = value;
115
- }
116
- /**
117
- * 改变 grid item 的大小,支持默认以及 sm 两种大小
118
- * @type sm | md | lg
119
- */
120
- set thySize(value) {
121
- this._setListSize(value);
122
- }
123
- /**
124
- * 是否按下空格切换聚焦选项
125
- */
126
- set thySpaceKeyEnabled(value) {
127
- this.spaceEnabled = value;
128
- }
129
- _emitChangeEvent(option, event) {
134
+ emitChangeEvent(option, event) {
130
135
  this.thySelectionChange.emit({
131
136
  source: this,
132
137
  value: option.thyValue(),
@@ -135,86 +140,91 @@ class ThySelectionList {
135
140
  selected: this.isSelected(option)
136
141
  });
137
142
  }
138
- _emitModelValueChange() {
143
+ emitModelValueChange() {
144
+ const uniqueKey = this.thyUniqueKey();
139
145
  if (this.options) {
140
146
  let selectedValues = this.selectionModel.selected;
141
- if (this.thyUniqueKey) {
147
+ if (uniqueKey) {
142
148
  selectedValues = selectedValues.map(selectedValue => {
143
149
  const selectedOption = this.options.find(option => {
144
- return option.thyValue()[this.thyUniqueKey] === selectedValue;
150
+ return option.thyValue()[uniqueKey] === selectedValue;
145
151
  });
146
152
  if (selectedOption) {
147
153
  return selectedOption.thyValue();
148
154
  }
149
155
  else {
150
- return this._modelValues.find(value => {
151
- return value[this.thyUniqueKey] === selectedValue;
156
+ return this.modelValues.find(value => {
157
+ return value[uniqueKey] === selectedValue;
152
158
  });
153
159
  }
154
160
  });
155
161
  }
156
- this._modelValues = selectedValues;
162
+ this.modelValues = selectedValues;
157
163
  let changeValue = selectedValues;
158
- if (!this.multiple && selectedValues && selectedValues.length > 0) {
164
+ if (!this.multiple() && selectedValues && selectedValues.length > 0) {
159
165
  changeValue = selectedValues[0];
160
166
  }
161
- this._onChange(changeValue);
167
+ this.onChange(changeValue);
162
168
  }
163
169
  }
164
- _toggleFocusedOption(event) {
165
- if (this._keyManager.activeItem) {
170
+ toggleFocusedOption(event) {
171
+ if (this.keyManager.activeItem) {
166
172
  this.ngZone.run(() => {
167
- this.toggleOption(this._keyManager.activeItem, event);
173
+ this.toggleOption(this.keyManager.activeItem, event);
168
174
  });
169
175
  }
170
176
  }
171
- _initializeFocusKeyManager() {
172
- this._keyManager = new ActiveDescendantKeyManager(this.options)
177
+ initializeFocusKeyManager() {
178
+ this.keyManager = new ActiveDescendantKeyManager(this.options)
173
179
  .withWrap()
174
180
  // .withTypeAhead()
175
181
  // Allow disabled items to be focusable. For accessibility reasons, there must be a way for
176
182
  // screenreader users, that allows reading the different options of the list.
177
183
  .skipPredicate(() => false);
178
184
  }
179
- _instanceSelectionModel() {
180
- this.selectionModel = new SelectionModel(this.multiple);
185
+ instanceSelectionModel() {
186
+ this.selectionModel = new SelectionModel(this.multiple());
181
187
  }
182
- _getElementBySelector(element) {
188
+ getElementBySelector(element) {
183
189
  return dom.getHTMLElementBySelector(element, this.elementRef);
184
190
  }
185
- _compareValue(value1, value2) {
186
- if (this.thyCompareWith) {
187
- const compareFn = this.thyCompareWith;
191
+ compareValue(value1, value2) {
192
+ const thyUniqueKey = this.thyUniqueKey();
193
+ const thyCompareWith = this.thyCompareWith();
194
+ if (thyCompareWith) {
195
+ const compareFn = thyCompareWith;
188
196
  return compareFn(value1, value2);
189
197
  }
190
- else if (this.thyUniqueKey) {
191
- return value1 && value1[this.thyUniqueKey] === value2 && value2[this.thyUniqueKey];
198
+ else if (thyUniqueKey) {
199
+ return value1 && value1[thyUniqueKey] === value2 && value2[thyUniqueKey];
192
200
  }
193
201
  else {
194
202
  return value1 === value2;
195
203
  }
196
204
  }
197
- _getOptionSelectionValue(option) {
205
+ getOptionSelectionValue(option) {
198
206
  const thyValue = option.thyValue();
199
207
  if (thyValue) {
200
- return this.thyUniqueKey ? thyValue[this.thyUniqueKey] : thyValue;
208
+ const thyUniqueKey = this.thyUniqueKey();
209
+ return thyUniqueKey ? thyValue[thyUniqueKey] : thyValue;
201
210
  }
202
211
  else {
203
212
  return option;
204
213
  }
205
214
  }
206
- _setSelectionByValues(values) {
215
+ setSelectionByValues(values) {
207
216
  this.selectionModel.clear();
208
217
  values.forEach(value => {
209
- if (this.thyUniqueKey) {
210
- this.selectionModel.select(value[this.thyUniqueKey]);
218
+ const thyUniqueKey = this.thyUniqueKey();
219
+ if (thyUniqueKey) {
220
+ this.selectionModel.select(value[thyUniqueKey]);
211
221
  }
212
222
  else {
213
223
  this.selectionModel.select(value);
214
224
  }
215
225
  });
216
226
  }
217
- _setAllOptionsSelected(toIsSelected) {
227
+ setAllOptionsSelected(toIsSelected) {
218
228
  // Keep track of whether anything changed, because we only want to
219
229
  // emit the changed event when something actually changed.
220
230
  let hasChanged = false;
@@ -226,23 +236,24 @@ class ThySelectionList {
226
236
  }
227
237
  });
228
238
  if (hasChanged) {
229
- this._emitModelValueChange();
239
+ this.emitModelValueChange();
230
240
  }
231
241
  }
232
- _getOptionByValue(value) {
242
+ getOptionByValue(value) {
233
243
  return this.options.find(option => {
234
- return this._compareValue(option.thyValue(), value);
244
+ return this.compareValue(option.thyValue(), value);
235
245
  });
236
246
  }
237
- _getActiveOption() {
238
- if (this._keyManager.activeItem) {
239
- return this._getOptionByValue(this._keyManager.activeItem.thyValue());
247
+ getActiveOption() {
248
+ if (this.keyManager.activeItem) {
249
+ return this.getOptionByValue(this.keyManager.activeItem.thyValue());
240
250
  }
241
251
  else {
242
252
  return null;
243
253
  }
244
254
  }
245
- _setListSize(size) {
255
+ setListSize() {
256
+ const size = this.thySize();
246
257
  for (const key in listSizesMap) {
247
258
  if (listSizesMap.hasOwnProperty(key)) {
248
259
  this.hostRenderer.removeClass(listSizesMap[key]);
@@ -253,55 +264,57 @@ class ThySelectionList {
253
264
  }
254
265
  }
255
266
  ngOnInit() {
256
- const bindKeyEventElement = this._getElementBySelector(this.thyBindKeyEventContainer);
267
+ const bindKeyEventElement = this.getElementBySelector(this.thyBindKeyEventContainer());
257
268
  this.ngZone.runOutsideAngular(() => {
258
- this._bindKeyEventUnsubscribe = this.renderer.listen(bindKeyEventElement, 'keydown', this.onKeydown.bind(this));
269
+ this.bindKeyEventUnsubscribe = this.renderer.listen(bindKeyEventElement, 'keydown', this.onKeydown.bind(this));
259
270
  });
260
- this._instanceSelectionModel();
271
+ this.instanceSelectionModel();
261
272
  }
262
273
  writeValue(value) {
263
274
  if ((typeof ngDevMode === 'undefined' || ngDevMode) && value) {
264
- if (this.multiple && !helpers.isArray(value)) {
275
+ const multiple = this.multiple();
276
+ if (multiple && !helpers.isArray(value)) {
265
277
  throw new Error(`The multiple selection ngModel must be an array.`);
266
278
  }
267
- if (!this.multiple && helpers.isArray(value)) {
279
+ if (!multiple && helpers.isArray(value)) {
268
280
  throw new Error(`The single selection ngModel should not be an array.`);
269
281
  }
270
282
  }
271
283
  const values = helpers.isArray(value) ? value : value ? [value] : [];
272
- this._modelValues = values;
284
+ this.modelValues = values;
273
285
  if (this.options) {
274
- this._setSelectionByValues(values);
286
+ this.setSelectionByValues(values);
275
287
  }
276
288
  this.changeDetectorRef.markForCheck();
277
289
  }
278
290
  registerOnChange(fn) {
279
- this._onChange = fn;
291
+ this.onChange = fn;
280
292
  }
281
293
  registerOnTouched(fn) {
282
- this._onTouched = fn;
294
+ this.onTouched = fn;
283
295
  }
284
296
  setDisabledState(isDisabled) {
285
297
  this.disabled = isDisabled;
286
298
  }
287
299
  onKeydown(event) {
288
- if (this.thyBeforeKeydown) {
300
+ const thyBeforeKeydown = this.thyBeforeKeydown();
301
+ if (thyBeforeKeydown) {
289
302
  // stop key down event
290
- const isContinue = this.thyBeforeKeydown(event);
303
+ const isContinue = thyBeforeKeydown(event);
291
304
  if (!isContinue) {
292
305
  return;
293
306
  }
294
307
  }
295
308
  const keyCode = event.keyCode || event.which;
296
- const manager = this._keyManager;
309
+ const manager = this.keyManager;
297
310
  const previousFocusIndex = manager.activeItemIndex;
298
311
  switch (keyCode) {
299
312
  case keycodes.SPACE:
300
313
  case keycodes.ENTER:
301
- if (keyCode === keycodes.SPACE && !this.spaceEnabled) {
314
+ if (keyCode === keycodes.SPACE && !this.thySpaceKeyEnabled()) {
302
315
  return;
303
316
  }
304
- this._toggleFocusedOption(event);
317
+ this.toggleFocusedOption(event);
305
318
  // Always prevent space from scrolling the page since the list has focus
306
319
  event.preventDefault();
307
320
  break;
@@ -311,64 +324,63 @@ class ThySelectionList {
311
324
  if ((keyCode === keycodes.UP_ARROW || keyCode === keycodes.DOWN_ARROW) &&
312
325
  event.shiftKey &&
313
326
  manager.activeItemIndex !== previousFocusIndex) {
314
- this._toggleFocusedOption(event);
327
+ this.toggleFocusedOption(event);
315
328
  }
316
329
  }
317
330
  toggleOption(option, event) {
318
331
  if (option && !option.thyDisabled()) {
319
- this.selectionModel.toggle(this._getOptionSelectionValue(option));
332
+ this.selectionModel.toggle(this.getOptionSelectionValue(option));
320
333
  // Emit a change event because the focused option changed its state through user
321
334
  // interaction.
322
- this._emitModelValueChange();
323
- this._emitChangeEvent(option, event);
335
+ this.emitModelValueChange();
336
+ this.emitChangeEvent(option, event);
324
337
  }
325
338
  }
326
339
  setActiveOption(option) {
327
- this._keyManager.updateActiveItem(option); // .updateActiveItemIndex(this._getOptionIndex(option));
340
+ this.keyManager.updateActiveItem(option); // .updateActiveItemIndex(this._getOptionIndex(option));
328
341
  }
329
342
  scrollIntoView(option) {
330
- const scrollContainerElement = dom.getHTMLElementBySelector(this.thyScrollContainer, this.elementRef);
343
+ const scrollContainerElement = dom.getHTMLElementBySelector(this.thyScrollContainer(), this.elementRef);
331
344
  ScrollToService.scrollToElement(option.element.nativeElement, scrollContainerElement);
332
345
  }
333
346
  isSelected(option) {
334
- return this.selectionModel.isSelected(this._getOptionSelectionValue(option));
347
+ return this.selectionModel.isSelected(this.getOptionSelectionValue(option));
335
348
  }
336
349
  clearActiveItem() {
337
- if (this._keyManager.activeItem) {
338
- this._keyManager.setActiveItem(-1);
350
+ if (this.keyManager.activeItem) {
351
+ this.keyManager.setActiveItem(-1);
339
352
  }
340
353
  }
341
354
  determineClearActiveItem() {
342
- if (!this._getActiveOption()) {
355
+ if (!this.getActiveOption()) {
343
356
  this.clearActiveItem();
344
357
  }
345
358
  }
346
359
  /** Selects all of the options. */
347
360
  selectAll() {
348
- this._setAllOptionsSelected(true);
361
+ this.setAllOptionsSelected(true);
349
362
  }
350
363
  /** Deselects all of the options. */
351
364
  deselectAll() {
352
- this._setAllOptionsSelected(false);
365
+ this.setAllOptionsSelected(false);
353
366
  }
354
367
  ngAfterContentInit() {
355
- this._initializeFocusKeyManager();
368
+ this.initializeFocusKeyManager();
356
369
  this.options.changes.pipe(startWith(true)).subscribe(() => {
357
- if (this.autoActiveFirstItem) {
358
- if (!this._keyManager.activeItem || this.options.toArray().indexOf(this._keyManager.activeItem) < 0) {
359
- this._keyManager.setFirstItemActive();
370
+ if (this.thyAutoActiveFirstItem()) {
371
+ if (!this.keyManager.activeItem || this.options.toArray().indexOf(this.keyManager.activeItem) < 0) {
372
+ this.keyManager.setFirstItemActive();
360
373
  }
361
374
  }
362
375
  });
363
376
  }
364
377
  ngOnDestroy() {
365
- this._selectionChangesUnsubscribe$.unsubscribe();
366
- if (this._bindKeyEventUnsubscribe) {
367
- this._bindKeyEventUnsubscribe();
378
+ if (this.bindKeyEventUnsubscribe) {
379
+ this.bindKeyEventUnsubscribe();
368
380
  }
369
381
  }
370
382
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThySelectionList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
371
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.8", type: ThySelectionList, isStandalone: true, selector: "thy-selection-list,[thy-selection-list]", inputs: { thyMultiple: ["thyMultiple", "thyMultiple", coerceBooleanProperty], thyBindKeyEventContainer: "thyBindKeyEventContainer", thyScrollContainer: "thyScrollContainer", thyBeforeKeydown: "thyBeforeKeydown", thyUniqueKey: "thyUniqueKey", thyCompareWith: "thyCompareWith", thyLayout: "thyLayout", thyAutoActiveFirstItem: ["thyAutoActiveFirstItem", "thyAutoActiveFirstItem", coerceBooleanProperty], thySize: "thySize", thySpaceKeyEnabled: ["thySpaceKeyEnabled", "thySpaceKeyEnabled", coerceBooleanProperty] }, outputs: { thySelectionChange: "thySelectionChange" }, host: { properties: { "class.thy-list": "this._isList", "class.thy-selection-list": "this._isSelectionList", "class.thy-multiple-selection-list": "this.multiple", "class.thy-grid-list": "this.isLayoutGrid" } }, providers: [
383
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThySelectionList, isStandalone: true, selector: "thy-selection-list,[thy-selection-list]", inputs: { multiple: { classPropertyName: "multiple", publicName: "thyMultiple", isSignal: true, isRequired: false, transformFunction: null }, thyBindKeyEventContainer: { classPropertyName: "thyBindKeyEventContainer", publicName: "thyBindKeyEventContainer", isSignal: true, isRequired: false, transformFunction: null }, thyScrollContainer: { classPropertyName: "thyScrollContainer", publicName: "thyScrollContainer", isSignal: true, isRequired: false, transformFunction: null }, thyBeforeKeydown: { classPropertyName: "thyBeforeKeydown", publicName: "thyBeforeKeydown", isSignal: true, isRequired: false, transformFunction: null }, thyUniqueKey: { classPropertyName: "thyUniqueKey", publicName: "thyUniqueKey", isSignal: true, isRequired: false, transformFunction: null }, thyCompareWith: { classPropertyName: "thyCompareWith", publicName: "thyCompareWith", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "thyLayout", isSignal: true, isRequired: false, transformFunction: null }, thyAutoActiveFirstItem: { classPropertyName: "thyAutoActiveFirstItem", publicName: "thyAutoActiveFirstItem", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thySpaceKeyEnabled: { classPropertyName: "thySpaceKeyEnabled", publicName: "thySpaceKeyEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thySelectionChange: "thySelectionChange" }, host: { properties: { "class.thy-multiple-selection-list": "multiple()", "class.thy-grid-list": "isLayoutGrid()" }, classAttribute: "thy-list thy-selection-list" }, providers: [
372
384
  {
373
385
  provide: THY_LIST_OPTION_PARENT_COMPONENT,
374
386
  useExisting: ThySelectionList
@@ -396,48 +408,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
396
408
  multi: true
397
409
  }
398
410
  ],
411
+ host: {
412
+ class: 'thy-list thy-selection-list',
413
+ '[class.thy-multiple-selection-list]': 'multiple()',
414
+ '[class.thy-grid-list]': 'isLayoutGrid()'
415
+ },
399
416
  changeDetection: ChangeDetectionStrategy.OnPush
400
417
  }]
401
- }], propDecorators: { _isList: [{
402
- type: HostBinding,
403
- args: [`class.thy-list`]
404
- }], _isSelectionList: [{
405
- type: HostBinding,
406
- args: [`class.thy-selection-list`]
407
- }], multiple: [{
408
- type: HostBinding,
409
- args: [`class.thy-multiple-selection-list`]
410
- }], isLayoutGrid: [{
411
- type: HostBinding,
412
- args: [`class.thy-grid-list`]
413
- }], options: [{
418
+ }], ctorParameters: () => [], propDecorators: { options: [{
414
419
  type: ContentChildren,
415
420
  args: [ThyListOption, { descendants: true }]
416
- }], thyMultiple: [{
417
- type: Input,
418
- args: [{ transform: coerceBooleanProperty }]
419
- }], thyBindKeyEventContainer: [{
420
- type: Input
421
- }], thyScrollContainer: [{
422
- type: Input
423
- }], thyBeforeKeydown: [{
424
- type: Input
425
- }], thyUniqueKey: [{
426
- type: Input
427
- }], thyCompareWith: [{
428
- type: Input
429
- }], thyLayout: [{
430
- type: Input
431
- }], thyAutoActiveFirstItem: [{
432
- type: Input,
433
- args: [{ transform: coerceBooleanProperty }]
434
- }], thySize: [{
435
- type: Input
436
- }], thySpaceKeyEnabled: [{
437
- type: Input,
438
- args: [{ transform: coerceBooleanProperty }]
439
- }], thySelectionChange: [{
440
- type: Output
441
421
  }] } });
442
422
 
443
423
  /**