ngx-tethys 17.0.2 → 17.0.4

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 (99) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/autocomplete/autocomplete.component.d.ts +2 -5
  3. package/cascader/cascader.component.d.ts +9 -1
  4. package/cascader/cascader.service.d.ts +3 -0
  5. package/drag-drop/drag.directive.d.ts +1 -4
  6. package/drag-drop/drop-container.directive.d.ts +4 -5
  7. package/dropdown/dropdown-submenu.component.d.ts +3 -6
  8. package/esm2022/autocomplete/autocomplete.component.mjs +7 -14
  9. package/esm2022/button/button-group.component.mjs +2 -2
  10. package/esm2022/cascader/cascader.component.mjs +27 -5
  11. package/esm2022/cascader/cascader.service.mjs +33 -3
  12. package/esm2022/core/behaviors/disabled.mjs +2 -2
  13. package/esm2022/date-picker/abstract-picker.directive.mjs +3 -3
  14. package/esm2022/date-picker/base-picker.component.mjs +3 -2
  15. package/esm2022/drag-drop/drag.directive.mjs +3 -7
  16. package/esm2022/drag-drop/drop-container.directive.mjs +9 -7
  17. package/esm2022/dropdown/dropdown-submenu.component.mjs +7 -12
  18. package/esm2022/form/form.directive.mjs +3 -2
  19. package/esm2022/grid/thy-grid-item.component.mjs +7 -11
  20. package/esm2022/image/preview/image-preview.component.mjs +9 -13
  21. package/esm2022/input/input-count.component.mjs +9 -10
  22. package/esm2022/input/input-group.component.mjs +9 -9
  23. package/esm2022/nav/nav-item.directive.mjs +7 -13
  24. package/esm2022/nav/nav.component.mjs +8 -13
  25. package/esm2022/radio/button/radio-button.component.mjs +2 -2
  26. package/esm2022/radio/group/radio-group.component.mjs +6 -1
  27. package/esm2022/radio/radio.component.mjs +2 -2
  28. package/esm2022/resizable/resizable.directive.mjs +11 -14
  29. package/esm2022/resizable/resize-handle.component.mjs +8 -13
  30. package/esm2022/shared/directives/thy-drag-drop.directive.mjs +8 -8
  31. package/esm2022/space/space.component.mjs +7 -9
  32. package/esm2022/table/table-column.component.mjs +3 -2
  33. package/esm2022/table/table.component.mjs +11 -12
  34. package/esm2022/tabs/tabs.component.mjs +8 -10
  35. package/esm2022/time-picker/time-picker.utils.mjs +8 -8
  36. package/esm2022/util/helpers/helpers.mjs +10 -1
  37. package/esm2022/version.mjs +2 -2
  38. package/esm2022/watermark/watermark.directive.mjs +9 -14
  39. package/fesm2022/ngx-tethys-autocomplete.mjs +8 -14
  40. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  41. package/fesm2022/ngx-tethys-button.mjs +2 -1
  42. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  43. package/fesm2022/ngx-tethys-cascader.mjs +58 -6
  44. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-core.mjs +2 -2
  46. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-date-picker.mjs +2 -2
  48. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-drag-drop.mjs +9 -10
  50. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-dropdown.mjs +8 -11
  52. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-form.mjs +2 -1
  54. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-grid.mjs +6 -10
  56. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-image.mjs +10 -12
  58. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  59. package/fesm2022/ngx-tethys-input.mjs +13 -14
  60. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-nav.mjs +11 -21
  62. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-radio.mjs +6 -1
  64. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-resizable.mjs +15 -22
  66. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-shared.mjs +8 -7
  68. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-space.mjs +7 -8
  70. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-table.mjs +12 -12
  72. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-tabs.mjs +7 -9
  74. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-time-picker.mjs +8 -7
  76. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-util.mjs +9 -0
  78. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-watermark.mjs +8 -13
  80. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys.mjs +1 -1
  82. package/fesm2022/ngx-tethys.mjs.map +1 -1
  83. package/grid/thy-grid-item.component.d.ts +3 -6
  84. package/image/preview/image-preview.component.d.ts +3 -6
  85. package/input/input-count.component.d.ts +2 -4
  86. package/input/input-group.component.d.ts +3 -4
  87. package/nav/nav-item.directive.d.ts +3 -6
  88. package/nav/nav.component.d.ts +3 -6
  89. package/package.json +1 -1
  90. package/resizable/resizable.directive.d.ts +2 -4
  91. package/resizable/resize-handle.component.d.ts +3 -6
  92. package/schematics/version.d.ts +1 -1
  93. package/schematics/version.js +1 -1
  94. package/shared/directives/thy-drag-drop.directive.d.ts +2 -4
  95. package/space/space.component.d.ts +2 -4
  96. package/table/table.component.d.ts +3 -3
  97. package/tabs/tabs.component.d.ts +2 -4
  98. package/util/helpers/helpers.d.ts +12 -0
  99. package/watermark/watermark.directive.d.ts +3 -6
@@ -14,11 +14,12 @@ import { ThyRadio } from 'ngx-tethys/radio';
14
14
  import { ThyBreadcrumb, ThyBreadcrumbItem } from 'ngx-tethys/breadcrumb';
15
15
  import * as i1$1 from 'ngx-tethys/core';
16
16
  import { TabIndexDisabledControlValueAccessorMixin, EXPANDED_DROPDOWN_POSITIONS, ScrollToService, scaleYMotion } from 'ngx-tethys/core';
17
- import { isEmpty, isArray, helpers, set, elementMatchClosest } from 'ngx-tethys/util';
17
+ import { isEmpty, isArray, get, isUndefinedOrNull, helpers, set, elementMatchClosest } from 'ngx-tethys/util';
18
18
  import { Subject, timer, BehaviorSubject, Observable } from 'rxjs';
19
19
  import { map, debounceTime, takeUntil, take, distinctUntilChanged, filter } from 'rxjs/operators';
20
20
  import { useHostRenderer } from '@tethys/cdk/dom';
21
21
  import { SelectionModel } from '@angular/cdk/collections';
22
+ import { ThyDivider } from 'ngx-tethys/divider';
22
23
 
23
24
  /**
24
25
  * @internal
@@ -294,7 +295,13 @@ class ThyCascaderService {
294
295
  }
295
296
  }
296
297
  activateOnInit(index, value) {
297
- let option = this.findOption(value, index);
298
+ let option;
299
+ if (isArray(this.customOptions) && this.customOptions.length > 0) {
300
+ option = this.customOptions.find(item => get(item, this.cascaderOptions.valueProperty) === value);
301
+ }
302
+ if (isUndefinedOrNull(option)) {
303
+ option = this.findOption(value, index);
304
+ }
298
305
  if (!option) {
299
306
  option =
300
307
  typeof value === 'object'
@@ -642,6 +649,10 @@ class ThyCascaderService {
642
649
  this.prevSelectedOptions.add(option);
643
650
  }
644
651
  handleActivateInit(option) {
652
+ if (isArray(this.customOptions) && this.customOptions.length > 0) {
653
+ const valueKey = this.cascaderOptions.valueProperty;
654
+ this.customOptions.some(item => get(item, valueKey) == get(option, valueKey)) && set(option, 'selected', true);
655
+ }
645
656
  if (this.cascaderOptions.isOnlySelectLeaf && option.isLeaf) {
646
657
  set(option, 'selected', true);
647
658
  }
@@ -664,6 +675,26 @@ class ThyCascaderService {
664
675
  getOptionValue(option) {
665
676
  return option[this.cascaderOptions.valueProperty || 'value'];
666
677
  }
678
+ removeCustomOption() {
679
+ if (!isArray(this.customOptions) || this.customOptions.length === 0) {
680
+ return;
681
+ }
682
+ let selectedCustomOptions = this.getSelectedCustomOptions();
683
+ selectedCustomOptions.forEach(item => {
684
+ this.removeSelectedItem(item);
685
+ });
686
+ }
687
+ getSelectedCustomOptions() {
688
+ const selected = this.cascaderOptions.isMultiple ? this.selectionModel.selected : this.selectionModel.selected[0];
689
+ if (!isArray(selected)) {
690
+ return [];
691
+ }
692
+ const valueKey = this.cascaderOptions.valueProperty;
693
+ return selected.filter(item => {
694
+ const selectedId = get(item, `thyRawValue.value.0.${valueKey}`);
695
+ return this.customOptions.some(option => get(option, valueKey) === selectedId);
696
+ });
697
+ }
667
698
  toArray(value) {
668
699
  if (value == null) {
669
700
  return [];
@@ -705,6 +736,17 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
705
736
  this.thyCascaderService.initOptions(0);
706
737
  }
707
738
  }
739
+ /**
740
+ * 自定义选项
741
+ * @type ThyCascaderOption[]
742
+ * @default []
743
+ */
744
+ set thyCustomOptions(options) {
745
+ this.thyCascaderService.customOptions = (options || []).map(item => ({ ...item }));
746
+ }
747
+ get thyCustomOptions() {
748
+ return this.thyCascaderService.customOptions;
749
+ }
708
750
  /**
709
751
  * 用户自定义模板
710
752
  * @type TemplateRef
@@ -1002,7 +1044,14 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
1002
1044
  }
1003
1045
  this.setMenuVisible(false);
1004
1046
  }
1047
+ clickCustomOption(option, index, event) {
1048
+ if (event === true) {
1049
+ this.thyCascaderService.clearSelection();
1050
+ }
1051
+ this.thyCascaderService.clickOption(option, index, event, this.selectOption);
1052
+ }
1005
1053
  clickOption(option, index, event) {
1054
+ this.thyCascaderService.removeCustomOption();
1006
1055
  this.thyCascaderService.clickOption(option, index, event, this.selectOption);
1007
1056
  }
1008
1057
  mouseoverOption(option, index, event) {
@@ -1271,14 +1320,14 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
1271
1320
  this.destroy$.complete();
1272
1321
  }
1273
1322
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyCascader, deps: [{ token: PLATFORM_ID }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$1.ThyClickDispatcher }, { token: i0.NgZone }, { token: ThyCascaderService }], target: i0.ɵɵFactoryTarget.Component }); }
1274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyCascader, isStandalone: true, selector: "thy-cascader,[thy-cascader]", inputs: { thyValueProperty: "thyValueProperty", thyLabelProperty: "thyLabelProperty", thyPlaceholder: "thyPlaceholder", thySize: "thySize", thyOptions: "thyOptions", thyChangeOn: "thyChangeOn", thyChangeOnSelect: ["thyChangeOnSelect", "thyChangeOnSelect", booleanAttribute], thyShowInput: ["thyShowInput", "thyShowInput", booleanAttribute], thyOptionRender: "thyOptionRender", thyLabelRender: "thyLabelRender", thyLoadData: "thyLoadData", thyTriggerAction: "thyTriggerAction", thyExpandTriggerAction: "thyExpandTriggerAction", thyMenuStyle: "thyMenuStyle", thySearchListStyle: "thySearchListStyle", thyMenuClassName: "thyMenuClassName", thyColumnClassName: "thyColumnClassName", thyDisabled: ["thyDisabled", "thyDisabled", booleanAttribute], thyEmptyStateText: "thyEmptyStateText", thyMultiple: ["thyMultiple", "thyMultiple", booleanAttribute], thyMaxTagCount: ["thyMaxTagCount", "thyMaxTagCount", numberAttribute], thyIsOnlySelectLeaf: ["thyIsOnlySelectLeaf", "thyIsOnlySelectLeaf", booleanAttribute], thyAutoExpand: ["thyAutoExpand", "thyAutoExpand", booleanAttribute], thyShowSearch: ["thyShowSearch", "thyShowSearch", booleanAttribute], thyPreset: "thyPreset", thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", booleanAttribute] }, outputs: { thyChange: "thyChange", thySelectionChange: "thySelectionChange", thySelect: "thySelect", thyDeselect: "thyDeselect", thyClear: "thyClear", thyExpandStatusChange: "thyExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "click": "toggleClick($event)", "mouseenter": "toggleMouseEnter($event)", "mouseleave": "toggleMouseLeave($event)" }, properties: { "attr.tabindex": "tabIndex" } }, providers: [
1323
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyCascader, isStandalone: true, selector: "thy-cascader,[thy-cascader]", inputs: { thyValueProperty: "thyValueProperty", thyLabelProperty: "thyLabelProperty", thyPlaceholder: "thyPlaceholder", thySize: "thySize", thyOptions: "thyOptions", thyCustomOptions: "thyCustomOptions", thyChangeOn: "thyChangeOn", thyChangeOnSelect: ["thyChangeOnSelect", "thyChangeOnSelect", booleanAttribute], thyShowInput: ["thyShowInput", "thyShowInput", booleanAttribute], thyOptionRender: "thyOptionRender", thyLabelRender: "thyLabelRender", thyLoadData: "thyLoadData", thyTriggerAction: "thyTriggerAction", thyExpandTriggerAction: "thyExpandTriggerAction", thyMenuStyle: "thyMenuStyle", thySearchListStyle: "thySearchListStyle", thyMenuClassName: "thyMenuClassName", thyColumnClassName: "thyColumnClassName", thyDisabled: ["thyDisabled", "thyDisabled", booleanAttribute], thyEmptyStateText: "thyEmptyStateText", thyMultiple: ["thyMultiple", "thyMultiple", booleanAttribute], thyMaxTagCount: ["thyMaxTagCount", "thyMaxTagCount", numberAttribute], thyIsOnlySelectLeaf: ["thyIsOnlySelectLeaf", "thyIsOnlySelectLeaf", booleanAttribute], thyAutoExpand: ["thyAutoExpand", "thyAutoExpand", booleanAttribute], thyShowSearch: ["thyShowSearch", "thyShowSearch", booleanAttribute], thyPreset: "thyPreset", thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", booleanAttribute] }, outputs: { thyChange: "thyChange", thySelectionChange: "thySelectionChange", thySelect: "thySelect", thyDeselect: "thyDeselect", thyClear: "thyClear", thyExpandStatusChange: "thyExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "click": "toggleClick($event)", "mouseenter": "toggleMouseEnter($event)", "mouseleave": "toggleMouseLeave($event)" }, properties: { "attr.tabindex": "tabIndex" } }, providers: [
1275
1324
  {
1276
1325
  provide: NG_VALUE_ACCESSOR,
1277
1326
  useExisting: forwardRef(() => ThyCascader),
1278
1327
  multi: true
1279
1328
  },
1280
1329
  ThyCascaderService
1281
- ], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true }, { propertyName: "cascaderOptions", predicate: ["cascaderOptions"], descendants: true, read: ElementRef }, { propertyName: "cascaderOptionContainers", predicate: ["cascaderOptionContainers"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n <ng-container *ngIf=\"thyShowInput\">\n <div\n thySelectControl\n [thyShowSearch]=\"thyShowSearch\"\n [thySize]=\"thySize\"\n [thyAllowClear]=\"true\"\n [thySelectedOptions]=\"selected\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n (thyOnRemove)=\"removeSelectedItem($event)\"\n (thyOnClear)=\"clearSelection($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n (thyOnSearch)=\"searchFilter($event)\"\n [thyDisabled]=\"disabled\"\n [thyIsMultiple]=\"thyMultiple\"\n [thyPanelOpened]=\"menuVisible\"\n [thyPlaceholder]=\"thyPlaceholder\"\n [customDisplayTemplate]=\"customDisplayTemplate\"\n [thyPreset]=\"thyPreset\">\n <ng-template #customDisplayTemplate let-value>\n <span [ngClass]=\"labelCls\">\n <ng-container *ngIf=\"!isLabelRenderTemplate; else labelTemplate\">{{ value.labelText }}</ng-container>\n <ng-template #labelTemplate>\n <ng-template [ngTemplateOutlet]=\"thyLabelRender\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </ng-template>\n </span>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n cdkConnectedOverlayBackdropClass=\"thy-cascader-backdrop\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"menuMinWidth\"\n cdkConnectedOverlayTransformOriginOn=\".thy-cascader-menus\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n (attach)=\"attached()\"\n (positionChange)=\"positionChange($event)\"\n [cdkConnectedOverlayOpen]=\"menuVisible\">\n <div\n [attr.tabindex]=\"-1\"\n #menu\n [ngClass]=\"menuCls\"\n [ngStyle]=\"thyMenuStyle\"\n (mouseleave)=\"toggleMouseLeave($event)\"\n [@scaleYMotion]=\"'enter'\">\n <ng-container *ngIf=\"!isShowSearchPanel\">\n <ng-container *ngIf=\"columns.length > 0; else emptyPlaceholder\">\n <ul #cascaderOptionContainers *ngFor=\"let options of columns; let i = index\" [ngClass]=\"menuColumnCls\">\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let option of options; trackBy: trackByFn\"\n [option]=\"option\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(option, i)\"\n [halfSelected]=\"isHalfSelectedOption(option, i)\"\n [selected]=\"isSelectedOption(option, i)\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"clickOption(option, i, $event)\"\n (click)=\"clickOption(option, i, $event)\"\n (mouseover)=\"mouseoverOption(option, i, $event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isShowSearchPanel\">\n <ng-container *ngIf=\"searchResultList.length; else emptyPlaceholder\">\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle\">\n <li\n thy-cascader-search-option\n *ngFor=\"let item of searchResultList\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #emptyPlaceholder>\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty class=\"thy-select-empty-content\" thySize=\"sm\" [thyMessage]=\"emptyStateText\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ThyCascaderOptionComponent, selector: "[thy-cascader-option]", inputs: ["option", "multiple", "isOnlySelectLeaf", "optionRender", "active", "halfSelected", "selected", "labelProperty"], outputs: ["toggleSelectChange"] }, { kind: "component", type: ThyCascaderSearchOptionComponent, selector: "[thy-cascader-search-option]", inputs: ["option", "multiple", "isOnlySelectLeaf", "active", "optionRender"], outputs: ["toggleSelectChange"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }], animations: [scaleYMotion] }); }
1330
+ ], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true }, { propertyName: "cascaderOptions", predicate: ["cascaderOptions"], descendants: true, read: ElementRef }, { propertyName: "cascaderOptionContainers", predicate: ["cascaderOptionContainers"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n <ng-container *ngIf=\"thyShowInput\">\n <div\n thySelectControl\n [thyShowSearch]=\"thyShowSearch\"\n [thySize]=\"thySize\"\n [thyAllowClear]=\"true\"\n [thySelectedOptions]=\"selected\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n (thyOnRemove)=\"removeSelectedItem($event)\"\n (thyOnClear)=\"clearSelection($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n (thyOnSearch)=\"searchFilter($event)\"\n [thyDisabled]=\"disabled\"\n [thyIsMultiple]=\"thyMultiple\"\n [thyPanelOpened]=\"menuVisible\"\n [thyPlaceholder]=\"thyPlaceholder\"\n [customDisplayTemplate]=\"customDisplayTemplate\"\n [thyPreset]=\"thyPreset\">\n <ng-template #customDisplayTemplate let-value>\n <span [ngClass]=\"labelCls\">\n <ng-container *ngIf=\"!isLabelRenderTemplate; else labelTemplate\">{{ value.labelText }}</ng-container>\n <ng-template #labelTemplate>\n <ng-template [ngTemplateOutlet]=\"thyLabelRender\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </ng-template>\n </span>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n cdkConnectedOverlayBackdropClass=\"thy-cascader-backdrop\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"menuMinWidth\"\n cdkConnectedOverlayTransformOriginOn=\".thy-cascader-menus\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n (attach)=\"attached()\"\n (positionChange)=\"positionChange($event)\"\n [cdkConnectedOverlayOpen]=\"menuVisible\">\n <div\n [attr.tabindex]=\"-1\"\n #menu\n [ngClass]=\"menuCls\"\n [ngStyle]=\"thyMenuStyle\"\n (mouseleave)=\"toggleMouseLeave($event)\"\n [@scaleYMotion]=\"'enter'\">\n <ng-container *ngIf=\"!isShowSearchPanel\">\n <ng-container *ngIf=\"columns.length > 0; else emptyPlaceholder\">\n <ul #cascaderOptionContainers *ngFor=\"let options of columns; let i = index; let isFirst = first\" [ngClass]=\"menuColumnCls\">\n <ng-container *ngIf=\"thyCustomOptions && isFirst\">\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let customOpt of thyCustomOptions; trackBy: trackByFn\"\n [option]=\"customOpt\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(customOpt, 0)\"\n [halfSelected]=\"isHalfSelectedOption(customOpt, 0)\"\n [selected]=\"isSelectedOption(customOpt, 0)\"\n (toggleSelectChange)=\"clickCustomOption(customOpt, 0, $event)\"\n (click)=\"clickCustomOption(customOpt, 0, $event)\"\n (mouseover)=\"mouseoverOption(customOpt, 0, $event)\"></li>\n <thy-divider class=\"my-1 mx-4\"></thy-divider>\n </ng-container>\n\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let option of options; trackBy: trackByFn\"\n [option]=\"option\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(option, i)\"\n [halfSelected]=\"isHalfSelectedOption(option, i)\"\n [selected]=\"isSelectedOption(option, i)\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"clickOption(option, i, $event)\"\n (click)=\"clickOption(option, i, $event)\"\n (mouseover)=\"mouseoverOption(option, i, $event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isShowSearchPanel\">\n <ng-container *ngIf=\"searchResultList.length; else emptyPlaceholder\">\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle\">\n <li\n thy-cascader-search-option\n *ngFor=\"let item of searchResultList\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #emptyPlaceholder>\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty class=\"thy-select-empty-content\" thySize=\"sm\" [thyMessage]=\"emptyStateText\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ThyCascaderOptionComponent, selector: "[thy-cascader-option]", inputs: ["option", "multiple", "isOnlySelectLeaf", "optionRender", "active", "halfSelected", "selected", "labelProperty"], outputs: ["toggleSelectChange"] }, { kind: "component", type: ThyCascaderSearchOptionComponent, selector: "[thy-cascader-search-option]", inputs: ["option", "multiple", "isOnlySelectLeaf", "active", "optionRender"], outputs: ["toggleSelectChange"] }, { 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: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], animations: [scaleYMotion] }); }
1282
1331
  }
1283
1332
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyCascader, decorators: [{
1284
1333
  type: Component,
@@ -1305,8 +1354,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
1305
1354
  ThyCascaderOptionComponent,
1306
1355
  ThyCascaderSearchOptionComponent,
1307
1356
  ThyEmpty,
1308
- ThyIcon
1309
- ], animations: [scaleYMotion], template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n <ng-container *ngIf=\"thyShowInput\">\n <div\n thySelectControl\n [thyShowSearch]=\"thyShowSearch\"\n [thySize]=\"thySize\"\n [thyAllowClear]=\"true\"\n [thySelectedOptions]=\"selected\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n (thyOnRemove)=\"removeSelectedItem($event)\"\n (thyOnClear)=\"clearSelection($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n (thyOnSearch)=\"searchFilter($event)\"\n [thyDisabled]=\"disabled\"\n [thyIsMultiple]=\"thyMultiple\"\n [thyPanelOpened]=\"menuVisible\"\n [thyPlaceholder]=\"thyPlaceholder\"\n [customDisplayTemplate]=\"customDisplayTemplate\"\n [thyPreset]=\"thyPreset\">\n <ng-template #customDisplayTemplate let-value>\n <span [ngClass]=\"labelCls\">\n <ng-container *ngIf=\"!isLabelRenderTemplate; else labelTemplate\">{{ value.labelText }}</ng-container>\n <ng-template #labelTemplate>\n <ng-template [ngTemplateOutlet]=\"thyLabelRender\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </ng-template>\n </span>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n cdkConnectedOverlayBackdropClass=\"thy-cascader-backdrop\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"menuMinWidth\"\n cdkConnectedOverlayTransformOriginOn=\".thy-cascader-menus\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n (attach)=\"attached()\"\n (positionChange)=\"positionChange($event)\"\n [cdkConnectedOverlayOpen]=\"menuVisible\">\n <div\n [attr.tabindex]=\"-1\"\n #menu\n [ngClass]=\"menuCls\"\n [ngStyle]=\"thyMenuStyle\"\n (mouseleave)=\"toggleMouseLeave($event)\"\n [@scaleYMotion]=\"'enter'\">\n <ng-container *ngIf=\"!isShowSearchPanel\">\n <ng-container *ngIf=\"columns.length > 0; else emptyPlaceholder\">\n <ul #cascaderOptionContainers *ngFor=\"let options of columns; let i = index\" [ngClass]=\"menuColumnCls\">\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let option of options; trackBy: trackByFn\"\n [option]=\"option\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(option, i)\"\n [halfSelected]=\"isHalfSelectedOption(option, i)\"\n [selected]=\"isSelectedOption(option, i)\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"clickOption(option, i, $event)\"\n (click)=\"clickOption(option, i, $event)\"\n (mouseover)=\"mouseoverOption(option, i, $event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isShowSearchPanel\">\n <ng-container *ngIf=\"searchResultList.length; else emptyPlaceholder\">\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle\">\n <li\n thy-cascader-search-option\n *ngFor=\"let item of searchResultList\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #emptyPlaceholder>\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty class=\"thy-select-empty-content\" thySize=\"sm\" [thyMessage]=\"emptyStateText\"></thy-empty>\n </div>\n</ng-template>\n" }]
1357
+ ThyIcon,
1358
+ ThyDivider
1359
+ ], animations: [scaleYMotion], template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n <ng-container *ngIf=\"thyShowInput\">\n <div\n thySelectControl\n [thyShowSearch]=\"thyShowSearch\"\n [thySize]=\"thySize\"\n [thyAllowClear]=\"true\"\n [thySelectedOptions]=\"selected\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n (thyOnRemove)=\"removeSelectedItem($event)\"\n (thyOnClear)=\"clearSelection($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n (thyOnSearch)=\"searchFilter($event)\"\n [thyDisabled]=\"disabled\"\n [thyIsMultiple]=\"thyMultiple\"\n [thyPanelOpened]=\"menuVisible\"\n [thyPlaceholder]=\"thyPlaceholder\"\n [customDisplayTemplate]=\"customDisplayTemplate\"\n [thyPreset]=\"thyPreset\">\n <ng-template #customDisplayTemplate let-value>\n <span [ngClass]=\"labelCls\">\n <ng-container *ngIf=\"!isLabelRenderTemplate; else labelTemplate\">{{ value.labelText }}</ng-container>\n <ng-template #labelTemplate>\n <ng-template [ngTemplateOutlet]=\"thyLabelRender\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </ng-template>\n </span>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n cdkConnectedOverlayBackdropClass=\"thy-cascader-backdrop\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"menuMinWidth\"\n cdkConnectedOverlayTransformOriginOn=\".thy-cascader-menus\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n (attach)=\"attached()\"\n (positionChange)=\"positionChange($event)\"\n [cdkConnectedOverlayOpen]=\"menuVisible\">\n <div\n [attr.tabindex]=\"-1\"\n #menu\n [ngClass]=\"menuCls\"\n [ngStyle]=\"thyMenuStyle\"\n (mouseleave)=\"toggleMouseLeave($event)\"\n [@scaleYMotion]=\"'enter'\">\n <ng-container *ngIf=\"!isShowSearchPanel\">\n <ng-container *ngIf=\"columns.length > 0; else emptyPlaceholder\">\n <ul #cascaderOptionContainers *ngFor=\"let options of columns; let i = index; let isFirst = first\" [ngClass]=\"menuColumnCls\">\n <ng-container *ngIf=\"thyCustomOptions && isFirst\">\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let customOpt of thyCustomOptions; trackBy: trackByFn\"\n [option]=\"customOpt\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(customOpt, 0)\"\n [halfSelected]=\"isHalfSelectedOption(customOpt, 0)\"\n [selected]=\"isSelectedOption(customOpt, 0)\"\n (toggleSelectChange)=\"clickCustomOption(customOpt, 0, $event)\"\n (click)=\"clickCustomOption(customOpt, 0, $event)\"\n (mouseover)=\"mouseoverOption(customOpt, 0, $event)\"></li>\n <thy-divider class=\"my-1 mx-4\"></thy-divider>\n </ng-container>\n\n <li\n #cascaderOptions\n thy-cascader-option\n *ngFor=\"let option of options; trackBy: trackByFn\"\n [option]=\"option\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [labelProperty]=\"thyLabelProperty\"\n [active]=\"isActivatedOption(option, i)\"\n [halfSelected]=\"isHalfSelectedOption(option, i)\"\n [selected]=\"isSelectedOption(option, i)\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"clickOption(option, i, $event)\"\n (click)=\"clickOption(option, i, $event)\"\n (mouseover)=\"mouseoverOption(option, i, $event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isShowSearchPanel\">\n <ng-container *ngIf=\"searchResultList.length; else emptyPlaceholder\">\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle\">\n <li\n thy-cascader-search-option\n *ngFor=\"let item of searchResultList\"\n [multiple]=\"thyMultiple\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n </ul>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #emptyPlaceholder>\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty class=\"thy-select-empty-content\" thySize=\"sm\" [thyMessage]=\"emptyStateText\"></thy-empty>\n </div>\n</ng-template>\n" }]
1310
1360
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1311
1361
  type: Inject,
1312
1362
  args: [PLATFORM_ID]
@@ -1320,6 +1370,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
1320
1370
  type: Input
1321
1371
  }], thyOptions: [{
1322
1372
  type: Input
1373
+ }], thyCustomOptions: [{
1374
+ type: Input
1323
1375
  }], thyChangeOn: [{
1324
1376
  type: Input
1325
1377
  }], thyChangeOnSelect: [{