ngx-tethys 19.1.10 → 19.1.12
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.
- package/CHANGELOG.md +13 -0
- package/cascader/cascader.component.d.ts +8 -1
- package/cascader/cascader.pipe.d.ts +11 -0
- package/cascader/index.d.ts +1 -0
- package/cascader/module.d.ts +2 -1
- package/cascader/styles/cascader.scss +3 -0
- package/fesm2022/ngx-tethys-cascader.mjs +54 -20
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +2 -1
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [19.1.12](https://github.com/atinc/ngx-tethys/compare/19.1.11...19.1.12) (2025-11-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [19.1.11](https://github.com/atinc/ngx-tethys/compare/19.1.10...19.1.11) (2025-10-28)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **date-picker:** 可选时间时,优化为选择到分 #TINFR-2955 ([#3597](https://github.com/atinc/ngx-tethys/issues/3597)) ([0b12381](https://github.com/atinc/ngx-tethys/commit/0b123812a416e00b6f7382411587f447bfdc7a84)), closes [#TINFR-2955](https://github.com/atinc/ngx-tethys/issues/TINFR-2955)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
## [19.1.10](https://github.com/atinc/ngx-tethys/compare/19.1.9...19.1.10) (2025-10-28)
|
|
6
19
|
|
|
7
20
|
|
|
@@ -5,6 +5,7 @@ import { TabIndexDisabledControlValueAccessorMixin } from 'ngx-tethys/core';
|
|
|
5
5
|
import { SelectControlSize, SelectOptionBase } from 'ngx-tethys/shared';
|
|
6
6
|
import { ThyCascaderService } from './cascader.service';
|
|
7
7
|
import { ThyCascaderExpandTrigger, ThyCascaderOption, ThyCascaderSearchOption, ThyCascaderTriggerType } from './types';
|
|
8
|
+
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "ngx-tethys/util";
|
|
10
11
|
/**
|
|
@@ -138,6 +139,11 @@ export declare class ThyCascader extends TabIndexDisabledControlValueAccessorMix
|
|
|
138
139
|
* @default true
|
|
139
140
|
*/
|
|
140
141
|
readonly thyIsOnlySelectLeaf: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
142
|
+
/**
|
|
143
|
+
* 设置
|
|
144
|
+
* @default 140
|
|
145
|
+
*/
|
|
146
|
+
readonly thyWidth: import("@angular/core").InputSignalWithTransform<number, number>;
|
|
141
147
|
/**
|
|
142
148
|
* 初始化时,是否展开面板
|
|
143
149
|
*/
|
|
@@ -192,6 +198,7 @@ export declare class ThyCascader extends TabIndexDisabledControlValueAccessorMix
|
|
|
192
198
|
readonly trigger: Signal<ElementRef<any>>;
|
|
193
199
|
readonly input: Signal<ElementRef<any>>;
|
|
194
200
|
readonly menu: Signal<ElementRef<any>>;
|
|
201
|
+
readonly virtualScrollViewports: Signal<readonly CdkVirtualScrollViewport[]>;
|
|
195
202
|
dropDownPosition: string;
|
|
196
203
|
menuVisible: boolean;
|
|
197
204
|
triggerRect: DOMRect;
|
|
@@ -268,6 +275,6 @@ export declare class ThyCascader extends TabIndexDisabledControlValueAccessorMix
|
|
|
268
275
|
private unsubscribeTriggerResize;
|
|
269
276
|
ngOnDestroy(): void;
|
|
270
277
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyCascader, never>;
|
|
271
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ThyCascader, "thy-cascader,[thy-cascader]", never, { "thyValueProperty": { "alias": "thyValueProperty"; "required": false; "isSignal": true; }; "thyLabelProperty": { "alias": "thyLabelProperty"; "required": false; "isSignal": true; }; "thyPlaceholder": { "alias": "thyPlaceholder"; "required": false; "isSignal": true; }; "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyOptions": { "alias": "thyOptions"; "required": false; "isSignal": true; }; "thyCustomOptions": { "alias": "thyCustomOptions"; "required": false; "isSignal": true; }; "thyChangeOn": { "alias": "thyChangeOn"; "required": false; "isSignal": true; }; "thyChangeOnSelect": { "alias": "thyChangeOnSelect"; "required": false; "isSignal": true; }; "thyShowInput": { "alias": "thyShowInput"; "required": false; "isSignal": true; }; "thyOptionRender": { "alias": "thyOptionRender"; "required": false; "isSignal": true; }; "thyLabelRender": { "alias": "thyLabelRender"; "required": false; "isSignal": true; }; "thyLoadData": { "alias": "thyLoadData"; "required": false; "isSignal": true; }; "thyTriggerAction": { "alias": "thyTriggerAction"; "required": false; "isSignal": true; }; "thyExpandTriggerAction": { "alias": "thyExpandTriggerAction"; "required": false; "isSignal": true; }; "thyMenuStyle": { "alias": "thyMenuStyle"; "required": false; "isSignal": true; }; "thySearchListStyle": { "alias": "thySearchListStyle"; "required": false; "isSignal": true; }; "thyMenuClassName": { "alias": "thyMenuClassName"; "required": false; "isSignal": true; }; "thyColumnClassName": { "alias": "thyColumnClassName"; "required": false; "isSignal": true; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; "thyEmptyStateText": { "alias": "thyEmptyStateText"; "required": false; "isSignal": true; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; "isSignal": true; }; "thyMaxTagCount": { "alias": "thyMaxTagCount"; "required": false; "isSignal": true; }; "thyIsOnlySelectLeaf": { "alias": "thyIsOnlySelectLeaf"; "required": false; "isSignal": true; }; "thyAutoExpand": { "alias": "thyAutoExpand"; "required": false; "isSignal": true; }; "thyShowSearch": { "alias": "thyShowSearch"; "required": false; "isSignal": true; }; "thyPreset": { "alias": "thyPreset"; "required": false; "isSignal": true; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; "isSignal": true; }; }, { "thyChange": "thyChange"; "thySelectionChange": "thySelectionChange"; "thySelect": "thySelect"; "thyDeselect": "thyDeselect"; "thyClear": "thyClear"; "thyExpandStatusChange": "thyExpandStatusChange"; }, never, never, true, never>;
|
|
278
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ThyCascader, "thy-cascader,[thy-cascader]", never, { "thyValueProperty": { "alias": "thyValueProperty"; "required": false; "isSignal": true; }; "thyLabelProperty": { "alias": "thyLabelProperty"; "required": false; "isSignal": true; }; "thyPlaceholder": { "alias": "thyPlaceholder"; "required": false; "isSignal": true; }; "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyOptions": { "alias": "thyOptions"; "required": false; "isSignal": true; }; "thyCustomOptions": { "alias": "thyCustomOptions"; "required": false; "isSignal": true; }; "thyChangeOn": { "alias": "thyChangeOn"; "required": false; "isSignal": true; }; "thyChangeOnSelect": { "alias": "thyChangeOnSelect"; "required": false; "isSignal": true; }; "thyShowInput": { "alias": "thyShowInput"; "required": false; "isSignal": true; }; "thyOptionRender": { "alias": "thyOptionRender"; "required": false; "isSignal": true; }; "thyLabelRender": { "alias": "thyLabelRender"; "required": false; "isSignal": true; }; "thyLoadData": { "alias": "thyLoadData"; "required": false; "isSignal": true; }; "thyTriggerAction": { "alias": "thyTriggerAction"; "required": false; "isSignal": true; }; "thyExpandTriggerAction": { "alias": "thyExpandTriggerAction"; "required": false; "isSignal": true; }; "thyMenuStyle": { "alias": "thyMenuStyle"; "required": false; "isSignal": true; }; "thySearchListStyle": { "alias": "thySearchListStyle"; "required": false; "isSignal": true; }; "thyMenuClassName": { "alias": "thyMenuClassName"; "required": false; "isSignal": true; }; "thyColumnClassName": { "alias": "thyColumnClassName"; "required": false; "isSignal": true; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; "thyEmptyStateText": { "alias": "thyEmptyStateText"; "required": false; "isSignal": true; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; "isSignal": true; }; "thyMaxTagCount": { "alias": "thyMaxTagCount"; "required": false; "isSignal": true; }; "thyIsOnlySelectLeaf": { "alias": "thyIsOnlySelectLeaf"; "required": false; "isSignal": true; }; "thyWidth": { "alias": "thyWidth"; "required": false; "isSignal": true; }; "thyAutoExpand": { "alias": "thyAutoExpand"; "required": false; "isSignal": true; }; "thyShowSearch": { "alias": "thyShowSearch"; "required": false; "isSignal": true; }; "thyPreset": { "alias": "thyPreset"; "required": false; "isSignal": true; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; "isSignal": true; }; }, { "thyChange": "thyChange"; "thySelectionChange": "thySelectionChange"; "thySelect": "thySelect"; "thyDeselect": "thyDeselect"; "thyClear": "thyClear"; "thyExpandStatusChange": "thyExpandStatusChange"; }, never, never, true, never>;
|
|
272
279
|
static ngAcceptInputType_thyDisabled: i1.ThyBooleanInput;
|
|
273
280
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { ThyCascaderOption } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
export declare class ThyCascaderOptionsPipe implements PipeTransform {
|
|
8
|
+
transform(options: ThyCascaderOption[], customOptions?: ThyCascaderOption[]): ThyCascaderOption[];
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThyCascaderOptionsPipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ThyCascaderOptionsPipe, "cascaderOptions", true>;
|
|
11
|
+
}
|
package/cascader/index.d.ts
CHANGED
package/cascader/module.d.ts
CHANGED
|
@@ -11,8 +11,9 @@ import * as i9 from "ngx-tethys/flexible-text";
|
|
|
11
11
|
import * as i10 from "./cascader.component";
|
|
12
12
|
import * as i11 from "./cascader-li.component";
|
|
13
13
|
import * as i12 from "./cascader-search-option.component";
|
|
14
|
+
import * as i13 from "./cascader.pipe";
|
|
14
15
|
export declare class ThyCascaderModule {
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyCascaderModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ThyCascaderModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.OverlayModule, typeof i4.ThyInputModule, typeof i5.ThyIconModule, typeof i6.ThyEmptyModule, typeof i7.ThySelectCommonModule, typeof i8.ThyCheckboxModule, typeof i9.ThyFlexibleTextModule, typeof i10.ThyCascader, typeof i11.ThyCascaderOptionComponent, typeof i12.ThyCascaderSearchOptionComponent], [typeof i10.ThyCascader]>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ThyCascaderModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.OverlayModule, typeof i4.ThyInputModule, typeof i5.ThyIconModule, typeof i6.ThyEmptyModule, typeof i7.ThySelectCommonModule, typeof i8.ThyCheckboxModule, typeof i9.ThyFlexibleTextModule, typeof i10.ThyCascader, typeof i11.ThyCascaderOptionComponent, typeof i12.ThyCascaderSearchOptionComponent, typeof i13.ThyCascaderOptionsPipe], [typeof i10.ThyCascader]>;
|
|
17
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<ThyCascaderModule>;
|
|
18
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
2
2
|
import { NgTemplateOutlet, NgClass, isPlatformBrowser, NgStyle, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, computed, output, ViewEncapsulation, ChangeDetectionStrategy, Component, HostListener, Injectable, inject, PLATFORM_ID, ChangeDetectorRef, ElementRef, NgZone, TemplateRef, numberAttribute, viewChildren, viewChild, effect, forwardRef, Input, NgModule } from '@angular/core';
|
|
4
|
+
import { input, computed, output, ViewEncapsulation, ChangeDetectionStrategy, Component, HostListener, Injectable, Pipe, inject, PLATFORM_ID, ChangeDetectorRef, ElementRef, NgZone, TemplateRef, numberAttribute, viewChildren, viewChild, effect, forwardRef, Input, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { ThyCheckbox, ThyCheckboxModule } from 'ngx-tethys/checkbox';
|
|
@@ -14,12 +14,14 @@ import { ThyRadio } from 'ngx-tethys/radio';
|
|
|
14
14
|
import { coerceBooleanProperty, isEmpty, isArray, get, isUndefinedOrNull, helpers, set, elementMatchClosest } from 'ngx-tethys/util';
|
|
15
15
|
import { ThyBreadcrumb, ThyBreadcrumbItem } from 'ngx-tethys/breadcrumb';
|
|
16
16
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
17
|
-
import { TabIndexDisabledControlValueAccessorMixin, ThyClickDispatcher, injectPanelEmptyIcon, EXPANDED_DROPDOWN_POSITIONS,
|
|
17
|
+
import { TabIndexDisabledControlValueAccessorMixin, ThyClickDispatcher, injectPanelEmptyIcon, EXPANDED_DROPDOWN_POSITIONS, DebounceTimeWrapper, scaleYMotion } from 'ngx-tethys/core';
|
|
18
18
|
import { ThyDivider } from 'ngx-tethys/divider';
|
|
19
19
|
import { injectLocale } from 'ngx-tethys/i18n';
|
|
20
20
|
import { Subject, BehaviorSubject, timer, Observable } from 'rxjs';
|
|
21
|
-
import { map, debounceTime, takeUntil, take, distinctUntilChanged, filter } from 'rxjs/operators';
|
|
21
|
+
import { map, debounceTime, takeUntil, take, delay, distinctUntilChanged, filter } from 'rxjs/operators';
|
|
22
22
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
23
|
+
import * as i1$1 from '@angular/cdk/scrolling';
|
|
24
|
+
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* @internal
|
|
@@ -658,6 +660,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
658
660
|
type: Injectable
|
|
659
661
|
}] });
|
|
660
662
|
|
|
663
|
+
/**
|
|
664
|
+
* @private
|
|
665
|
+
*/
|
|
666
|
+
class ThyCascaderOptionsPipe {
|
|
667
|
+
transform(options, customOptions) {
|
|
668
|
+
if (!customOptions?.length) {
|
|
669
|
+
return options;
|
|
670
|
+
}
|
|
671
|
+
return [...customOptions, ...options];
|
|
672
|
+
}
|
|
673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCascaderOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
674
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: ThyCascaderOptionsPipe, isStandalone: true, name: "cascaderOptions" }); }
|
|
675
|
+
}
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCascaderOptionsPipe, decorators: [{
|
|
677
|
+
type: Pipe,
|
|
678
|
+
args: [{
|
|
679
|
+
name: 'cascaderOptions'
|
|
680
|
+
}]
|
|
681
|
+
}] });
|
|
682
|
+
|
|
661
683
|
/**
|
|
662
684
|
* 级联选择菜单
|
|
663
685
|
* @name thy-cascader
|
|
@@ -814,6 +836,15 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
814
836
|
* @default true
|
|
815
837
|
*/
|
|
816
838
|
this.thyIsOnlySelectLeaf = input(true, { transform: coerceBooleanProperty });
|
|
839
|
+
/**
|
|
840
|
+
* 设置
|
|
841
|
+
* @default 140
|
|
842
|
+
*/
|
|
843
|
+
this.thyWidth = input(140, {
|
|
844
|
+
transform: (value) => {
|
|
845
|
+
return numberAttribute(value, 140);
|
|
846
|
+
}
|
|
847
|
+
});
|
|
817
848
|
/**
|
|
818
849
|
* 初始化时,是否展开面板
|
|
819
850
|
*/
|
|
@@ -862,6 +893,7 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
862
893
|
this.trigger = viewChild('trigger');
|
|
863
894
|
this.input = viewChild('input');
|
|
864
895
|
this.menu = viewChild('menu');
|
|
896
|
+
this.virtualScrollViewports = viewChildren(CdkVirtualScrollViewport);
|
|
865
897
|
this.dropDownPosition = 'bottom';
|
|
866
898
|
this.menuVisible = false;
|
|
867
899
|
this.prefixCls = 'thy-cascader';
|
|
@@ -998,23 +1030,21 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
998
1030
|
attached() {
|
|
999
1031
|
this.cdr.detectChanges();
|
|
1000
1032
|
this.cdkConnectedOverlay()
|
|
1001
|
-
.positionChange.pipe(take(1), takeUntil(this.destroy$))
|
|
1033
|
+
.positionChange.pipe(take(1), delay(50), takeUntil(this.destroy$))
|
|
1002
1034
|
.subscribe(() => {
|
|
1003
1035
|
this.scrollActiveElementIntoView();
|
|
1004
1036
|
});
|
|
1005
1037
|
}
|
|
1006
1038
|
scrollActiveElementIntoView() {
|
|
1007
1039
|
if (!isEmpty(this.thyCascaderService.selectedOptions)) {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
ScrollToService.scrollToElement(activeOptions[index].nativeElement, item.nativeElement);
|
|
1015
|
-
this.cdr.detectChanges();
|
|
1040
|
+
for (let i = 0; i < this.virtualScrollViewports()?.length; i += 1) {
|
|
1041
|
+
for (let index = this.columns[i].length - 1; index > -1; index -= 1) {
|
|
1042
|
+
if (this.thyCascaderService.isActivatedOption(this.columns[i][index], i)) {
|
|
1043
|
+
this.virtualScrollViewports()[i]?.scrollToIndex(index);
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1016
1046
|
}
|
|
1017
|
-
}
|
|
1047
|
+
}
|
|
1018
1048
|
}
|
|
1019
1049
|
}
|
|
1020
1050
|
setMenuVisible(menuVisible) {
|
|
@@ -1264,14 +1294,14 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
1264
1294
|
this.destroy$.complete();
|
|
1265
1295
|
}
|
|
1266
1296
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCascader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1267
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCascader, isStandalone: true, selector: "thy-cascader,[thy-cascader]", inputs: { thyValueProperty: { classPropertyName: "thyValueProperty", publicName: "thyValueProperty", isSignal: true, isRequired: false, transformFunction: null }, thyLabelProperty: { classPropertyName: "thyLabelProperty", publicName: "thyLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, thyPlaceholder: { classPropertyName: "thyPlaceholder", publicName: "thyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyOptions: { classPropertyName: "thyOptions", publicName: "thyOptions", isSignal: true, isRequired: false, transformFunction: null }, thyCustomOptions: { classPropertyName: "thyCustomOptions", publicName: "thyCustomOptions", isSignal: true, isRequired: false, transformFunction: null }, thyChangeOn: { classPropertyName: "thyChangeOn", publicName: "thyChangeOn", isSignal: true, isRequired: false, transformFunction: null }, thyChangeOnSelect: { classPropertyName: "thyChangeOnSelect", publicName: "thyChangeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, thyShowInput: { classPropertyName: "thyShowInput", publicName: "thyShowInput", isSignal: true, isRequired: false, transformFunction: null }, thyOptionRender: { classPropertyName: "thyOptionRender", publicName: "thyOptionRender", isSignal: true, isRequired: false, transformFunction: null }, thyLabelRender: { classPropertyName: "thyLabelRender", publicName: "thyLabelRender", isSignal: true, isRequired: false, transformFunction: null }, thyLoadData: { classPropertyName: "thyLoadData", publicName: "thyLoadData", isSignal: true, isRequired: false, transformFunction: null }, thyTriggerAction: { classPropertyName: "thyTriggerAction", publicName: "thyTriggerAction", isSignal: true, isRequired: false, transformFunction: null }, thyExpandTriggerAction: { classPropertyName: "thyExpandTriggerAction", publicName: "thyExpandTriggerAction", isSignal: true, isRequired: false, transformFunction: null }, thyMenuStyle: { classPropertyName: "thyMenuStyle", publicName: "thyMenuStyle", isSignal: true, isRequired: false, transformFunction: null }, thySearchListStyle: { classPropertyName: "thySearchListStyle", publicName: "thySearchListStyle", isSignal: true, isRequired: false, transformFunction: null }, thyMenuClassName: { classPropertyName: "thyMenuClassName", publicName: "thyMenuClassName", isSignal: true, isRequired: false, transformFunction: null }, thyColumnClassName: { classPropertyName: "thyColumnClassName", publicName: "thyColumnClassName", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyEmptyStateText: { classPropertyName: "thyEmptyStateText", publicName: "thyEmptyStateText", isSignal: true, isRequired: false, transformFunction: null }, thyMultiple: { classPropertyName: "thyMultiple", publicName: "thyMultiple", isSignal: true, isRequired: false, transformFunction: null }, thyMaxTagCount: { classPropertyName: "thyMaxTagCount", publicName: "thyMaxTagCount", isSignal: true, isRequired: false, transformFunction: null }, thyIsOnlySelectLeaf: { classPropertyName: "thyIsOnlySelectLeaf", publicName: "thyIsOnlySelectLeaf", isSignal: true, isRequired: false, transformFunction: null }, thyAutoExpand: { classPropertyName: "thyAutoExpand", publicName: "thyAutoExpand", isSignal: true, isRequired: false, transformFunction: null }, thyShowSearch: { classPropertyName: "thyShowSearch", publicName: "thyShowSearch", isSignal: true, isRequired: false, transformFunction: null }, thyPreset: { classPropertyName: "thyPreset", publicName: "thyPreset", isSignal: true, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, 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: [
|
|
1297
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCascader, isStandalone: true, selector: "thy-cascader,[thy-cascader]", inputs: { thyValueProperty: { classPropertyName: "thyValueProperty", publicName: "thyValueProperty", isSignal: true, isRequired: false, transformFunction: null }, thyLabelProperty: { classPropertyName: "thyLabelProperty", publicName: "thyLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, thyPlaceholder: { classPropertyName: "thyPlaceholder", publicName: "thyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyOptions: { classPropertyName: "thyOptions", publicName: "thyOptions", isSignal: true, isRequired: false, transformFunction: null }, thyCustomOptions: { classPropertyName: "thyCustomOptions", publicName: "thyCustomOptions", isSignal: true, isRequired: false, transformFunction: null }, thyChangeOn: { classPropertyName: "thyChangeOn", publicName: "thyChangeOn", isSignal: true, isRequired: false, transformFunction: null }, thyChangeOnSelect: { classPropertyName: "thyChangeOnSelect", publicName: "thyChangeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, thyShowInput: { classPropertyName: "thyShowInput", publicName: "thyShowInput", isSignal: true, isRequired: false, transformFunction: null }, thyOptionRender: { classPropertyName: "thyOptionRender", publicName: "thyOptionRender", isSignal: true, isRequired: false, transformFunction: null }, thyLabelRender: { classPropertyName: "thyLabelRender", publicName: "thyLabelRender", isSignal: true, isRequired: false, transformFunction: null }, thyLoadData: { classPropertyName: "thyLoadData", publicName: "thyLoadData", isSignal: true, isRequired: false, transformFunction: null }, thyTriggerAction: { classPropertyName: "thyTriggerAction", publicName: "thyTriggerAction", isSignal: true, isRequired: false, transformFunction: null }, thyExpandTriggerAction: { classPropertyName: "thyExpandTriggerAction", publicName: "thyExpandTriggerAction", isSignal: true, isRequired: false, transformFunction: null }, thyMenuStyle: { classPropertyName: "thyMenuStyle", publicName: "thyMenuStyle", isSignal: true, isRequired: false, transformFunction: null }, thySearchListStyle: { classPropertyName: "thySearchListStyle", publicName: "thySearchListStyle", isSignal: true, isRequired: false, transformFunction: null }, thyMenuClassName: { classPropertyName: "thyMenuClassName", publicName: "thyMenuClassName", isSignal: true, isRequired: false, transformFunction: null }, thyColumnClassName: { classPropertyName: "thyColumnClassName", publicName: "thyColumnClassName", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyEmptyStateText: { classPropertyName: "thyEmptyStateText", publicName: "thyEmptyStateText", isSignal: true, isRequired: false, transformFunction: null }, thyMultiple: { classPropertyName: "thyMultiple", publicName: "thyMultiple", isSignal: true, isRequired: false, transformFunction: null }, thyMaxTagCount: { classPropertyName: "thyMaxTagCount", publicName: "thyMaxTagCount", isSignal: true, isRequired: false, transformFunction: null }, thyIsOnlySelectLeaf: { classPropertyName: "thyIsOnlySelectLeaf", publicName: "thyIsOnlySelectLeaf", isSignal: true, isRequired: false, transformFunction: null }, thyWidth: { classPropertyName: "thyWidth", publicName: "thyWidth", isSignal: true, isRequired: false, transformFunction: null }, thyAutoExpand: { classPropertyName: "thyAutoExpand", publicName: "thyAutoExpand", isSignal: true, isRequired: false, transformFunction: null }, thyShowSearch: { classPropertyName: "thyShowSearch", publicName: "thyShowSearch", isSignal: true, isRequired: false, transformFunction: null }, thyPreset: { classPropertyName: "thyPreset", publicName: "thyPreset", isSignal: true, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, 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: [
|
|
1268
1298
|
{
|
|
1269
1299
|
provide: NG_VALUE_ACCESSOR,
|
|
1270
1300
|
useExisting: forwardRef(() => ThyCascader),
|
|
1271
1301
|
multi: true
|
|
1272
1302
|
},
|
|
1273
1303
|
ThyCascaderService
|
|
1274
|
-
], viewQueries: [{ propertyName: "cascaderOptions", predicate: ["cascaderOptions"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "cascaderOptionContainers", predicate: ["cascaderOptionContainers"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n @if (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 @if (!isLabelRenderTemplate()) {\n <span [ngClass]=\"labelCls\">{{ value.labelText }}</span>\n } @else {\n <span [ngClass]=\"labelCls\">\n <ng-template [ngTemplateOutlet]=\"thyLabelRender()\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </span>\n }\n </ng-template>\n </div>\n }\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 @if (!isShowSearchPanel) {\n @if (columns.length > 0) {\n @for (options of columns; track $index; let i = $index; let isFirst = $first) {\n <ul #cascaderOptionContainers [ngClass]=\"menuColumnCls()\">\n @if (thyCascaderService.customOptions && thyCascaderService.customOptions.length > 0 && isFirst) {\n @for (customOpt of thyCascaderService.customOptions; track trackByFn($index, customOpt)) {\n <li\n #cascaderOptions\n thy-cascader-option\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 }\n <thy-divider class=\"my-1 mx-4\"></thy-divider>\n }\n @for (option of options; track trackByFn($index, option)) {\n <li\n #cascaderOptions\n thy-cascader-option\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 }\n </ul>\n }\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n @if (isShowSearchPanel) {\n @if (searchResultList.length) {\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle()\">\n @for (item of searchResultList; track $index) {\n <li\n thy-cascader-search-option\n [multiple]=\"thyMultiple()\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf()\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender()\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n }\n </ul>\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["inputValue", "thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["inputValueChange", "thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: 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: "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] }); }
|
|
1304
|
+
], viewQueries: [{ propertyName: "cascaderOptions", predicate: ["cascaderOptions"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "cascaderOptionContainers", predicate: ["cascaderOptionContainers"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }, { propertyName: "virtualScrollViewports", predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n @if (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 @if (!isLabelRenderTemplate()) {\n <span [ngClass]=\"labelCls\">{{ value.labelText }}</span>\n } @else {\n <span [ngClass]=\"labelCls\">\n <ng-template [ngTemplateOutlet]=\"thyLabelRender()\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </span>\n }\n </ng-template>\n </div>\n }\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 @if (!isShowSearchPanel) {\n @if (columns.length > 0) {\n @for (options of columns; track $index; let i = $index; let isFirst = $first) {\n <ul #cascaderOptionContainers [ngClass]=\"menuColumnCls()\" [ngStyle]=\"{ 'width.px': thyWidth() }\">\n @let allOptions = options | cascaderOptions: (isFirst ? thyCascaderService.customOptions : []);\n\n @if (allOptions.length > 0) {\n <cdk-virtual-scroll-viewport [itemSize]=\"36\" class=\"h-100\">\n <ng-container *cdkVirtualFor=\"let option of allOptions; let index = index; trackBy: trackByFn\">\n @if (\n thyCascaderService.customOptions &&\n thyCascaderService.customOptions.length > 0 &&\n isFirst &&\n index < thyCascaderService.customOptions.length\n ) {\n <li\n #cascaderOptions\n thy-cascader-option\n [option]=\"option\"\n [multiple]=\"thyMultiple()\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf()\"\n [labelProperty]=\"thyLabelProperty()\"\n [active]=\"isActivatedOption(option, 0)\"\n [halfSelected]=\"isHalfSelectedOption(option, 0)\"\n [selected]=\"isSelectedOption(option, 0)\"\n (toggleSelectChange)=\"clickCustomOption(option, 0, $event)\"\n (click)=\"clickCustomOption(option, 0, $event)\"\n (mouseover)=\"mouseoverOption(option, 0, $event)\"></li>\n @if (index === thyCascaderService.customOptions.length - 1) {\n <thy-divider class=\"my-1 mx-4\"></thy-divider>\n }\n } @else {\n <li\n #cascaderOptions\n thy-cascader-option\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 }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </ul>\n }\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n @if (isShowSearchPanel) {\n @if (searchResultList.length) {\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle()\">\n @for (item of searchResultList; track $index) {\n <li\n thy-cascader-search-option\n [multiple]=\"thyMultiple()\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf()\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender()\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n }\n </ul>\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["inputValue", "thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["inputValueChange", "thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: 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: "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"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "pipe", type: ThyCascaderOptionsPipe, name: "cascaderOptions" }], animations: [scaleYMotion] }); }
|
|
1275
1305
|
}
|
|
1276
1306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCascader, decorators: [{
|
|
1277
1307
|
type: Component,
|
|
@@ -1296,8 +1326,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1296
1326
|
ThyCascaderOptionComponent,
|
|
1297
1327
|
ThyCascaderSearchOptionComponent,
|
|
1298
1328
|
ThyEmpty,
|
|
1299
|
-
ThyDivider
|
|
1300
|
-
|
|
1329
|
+
ThyDivider,
|
|
1330
|
+
ScrollingModule,
|
|
1331
|
+
ThyCascaderOptionsPipe
|
|
1332
|
+
], animations: [scaleYMotion], template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" #trigger>\n @if (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 @if (!isLabelRenderTemplate()) {\n <span [ngClass]=\"labelCls\">{{ value.labelText }}</span>\n } @else {\n <span [ngClass]=\"labelCls\">\n <ng-template [ngTemplateOutlet]=\"thyLabelRender()\" [ngTemplateOutletContext]=\"value.labelRenderContext\"></ng-template>\n </span>\n }\n </ng-template>\n </div>\n }\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 @if (!isShowSearchPanel) {\n @if (columns.length > 0) {\n @for (options of columns; track $index; let i = $index; let isFirst = $first) {\n <ul #cascaderOptionContainers [ngClass]=\"menuColumnCls()\" [ngStyle]=\"{ 'width.px': thyWidth() }\">\n @let allOptions = options | cascaderOptions: (isFirst ? thyCascaderService.customOptions : []);\n\n @if (allOptions.length > 0) {\n <cdk-virtual-scroll-viewport [itemSize]=\"36\" class=\"h-100\">\n <ng-container *cdkVirtualFor=\"let option of allOptions; let index = index; trackBy: trackByFn\">\n @if (\n thyCascaderService.customOptions &&\n thyCascaderService.customOptions.length > 0 &&\n isFirst &&\n index < thyCascaderService.customOptions.length\n ) {\n <li\n #cascaderOptions\n thy-cascader-option\n [option]=\"option\"\n [multiple]=\"thyMultiple()\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf()\"\n [labelProperty]=\"thyLabelProperty()\"\n [active]=\"isActivatedOption(option, 0)\"\n [halfSelected]=\"isHalfSelectedOption(option, 0)\"\n [selected]=\"isSelectedOption(option, 0)\"\n (toggleSelectChange)=\"clickCustomOption(option, 0, $event)\"\n (click)=\"clickCustomOption(option, 0, $event)\"\n (mouseover)=\"mouseoverOption(option, 0, $event)\"></li>\n @if (index === thyCascaderService.customOptions.length - 1) {\n <thy-divider class=\"my-1 mx-4\"></thy-divider>\n }\n } @else {\n <li\n #cascaderOptions\n thy-cascader-option\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 }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </ul>\n }\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n @if (isShowSearchPanel) {\n @if (searchResultList.length) {\n <ul class=\"thy-cascader-search-list py-3\" [ngStyle]=\"thySearchListStyle()\">\n @for (item of searchResultList; track $index) {\n <li\n thy-cascader-search-option\n [multiple]=\"thyMultiple()\"\n [isOnlySelectLeaf]=\"thyIsOnlySelectLeaf()\"\n [option]=\"item\"\n [active]=\"item.selected\"\n [optionRender]=\"thyOptionRender()\"\n (toggleSelectChange)=\"selectSearchResult($event)\"></li>\n }\n </ul>\n } @else {\n <div class=\"thy-cascader-empty-container\" [ngStyle]=\"{ 'width.px': triggerRect?.width }\">\n <thy-empty\n class=\"thy-select-empty-content\"\n thySize=\"sm\"\n [thyMessage]=\"thyEmptyStateText()\"\n [thyIconName]=\"emptyIcon()\"></thy-empty>\n </div>\n }\n }\n </div>\n</ng-template>\n" }]
|
|
1301
1333
|
}], ctorParameters: () => [], propDecorators: { thyDisabled: [{
|
|
1302
1334
|
type: Input,
|
|
1303
1335
|
args: [{ transform: coerceBooleanProperty }]
|
|
@@ -1325,7 +1357,8 @@ class ThyCascaderModule {
|
|
|
1325
1357
|
ThyFlexibleTextModule,
|
|
1326
1358
|
ThyCascader,
|
|
1327
1359
|
ThyCascaderOptionComponent,
|
|
1328
|
-
ThyCascaderSearchOptionComponent
|
|
1360
|
+
ThyCascaderSearchOptionComponent,
|
|
1361
|
+
ThyCascaderOptionsPipe], exports: [ThyCascader] }); }
|
|
1329
1362
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCascaderModule, imports: [CommonModule,
|
|
1330
1363
|
FormsModule,
|
|
1331
1364
|
OverlayModule,
|
|
@@ -1354,7 +1387,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1354
1387
|
ThyFlexibleTextModule,
|
|
1355
1388
|
ThyCascader,
|
|
1356
1389
|
ThyCascaderOptionComponent,
|
|
1357
|
-
ThyCascaderSearchOptionComponent
|
|
1390
|
+
ThyCascaderSearchOptionComponent,
|
|
1391
|
+
ThyCascaderOptionsPipe
|
|
1358
1392
|
],
|
|
1359
1393
|
exports: [ThyCascader]
|
|
1360
1394
|
}]
|
|
@@ -1364,5 +1398,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1364
1398
|
* Generated bundle index. Do not edit.
|
|
1365
1399
|
*/
|
|
1366
1400
|
|
|
1367
|
-
export { ThyCascader, ThyCascaderModule, ThyCascaderOptionComponent };
|
|
1401
|
+
export { ThyCascader, ThyCascaderModule, ThyCascaderOptionComponent, ThyCascaderOptionsPipe };
|
|
1368
1402
|
//# sourceMappingURL=ngx-tethys-cascader.mjs.map
|