ngx-tethys 20.0.1 → 20.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/action/index.d.ts +3 -3
- package/affix/index.d.ts +1 -1
- package/alert/index.d.ts +3 -3
- package/anchor/index.d.ts +12 -6
- package/arrow-switcher/index.d.ts +6 -6
- package/autocomplete/index.d.ts +7 -7
- package/avatar/index.d.ts +9 -9
- package/back-top/index.d.ts +3 -3
- package/badge/index.d.ts +6 -6
- package/breadcrumb/index.d.ts +7 -7
- package/button/index.d.ts +19 -19
- package/calendar/index.d.ts +8 -8
- package/card/index.d.ts +6 -6
- package/carousel/index.d.ts +4 -4
- package/cascader/index.d.ts +24 -24
- package/collapse/index.d.ts +4 -4
- package/color-picker/index.d.ts +16 -16
- package/comment/index.d.ts +3 -3
- package/copy/index.d.ts +2 -2
- package/core/index.d.ts +22 -22
- package/date-picker/index.d.ts +111 -111
- package/date-range/index.d.ts +5 -5
- package/dialog/index.d.ts +18 -18
- package/divider/index.d.ts +3 -3
- package/drag-drop/index.d.ts +7 -7
- package/dropdown/index.d.ts +10 -10
- package/empty/index.d.ts +12 -12
- package/fesm2022/ngx-tethys-action.mjs +14 -12
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +7 -7
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +10 -10
- package/fesm2022/ngx-tethys-anchor.mjs +65 -28
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +19 -18
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +23 -22
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +7 -7
- package/fesm2022/ngx-tethys-badge.mjs +7 -7
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +16 -16
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +16 -16
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +13 -13
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +15 -15
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +41 -34
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
- package/fesm2022/ngx-tethys-collapse.mjs +10 -10
- package/fesm2022/ngx-tethys-color-picker.mjs +65 -57
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +13 -13
- package/fesm2022/ngx-tethys-copy.mjs +10 -10
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +30 -25
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +184 -174
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +16 -16
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +24 -24
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +7 -7
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +7 -7
- package/fesm2022/ngx-tethys-drag-drop.mjs +24 -24
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +48 -47
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +13 -13
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +64 -61
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +18 -15
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +34 -33
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +25 -24
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +3 -3
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +15 -13
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +31 -29
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +17 -10
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +27 -26
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +63 -63
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +21 -18
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +7 -7
- package/fesm2022/ngx-tethys-mention.mjs +35 -31
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +26 -26
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +24 -24
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-native-table.mjs +1119 -0
- package/fesm2022/ngx-tethys-native-table.mjs.map +1 -0
- package/fesm2022/ngx-tethys-nav.mjs +27 -27
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +20 -20
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +18 -18
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +22 -21
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +17 -17
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +15 -12
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +17 -17
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +12 -12
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +21 -18
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +11 -11
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +19 -16
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +95 -46
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +85 -81
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +37 -36
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +11 -11
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +10 -10
- package/fesm2022/ngx-tethys-statistic.mjs +7 -7
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +22 -22
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +7 -7
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +7 -7
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +28 -28
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +13 -13
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +11 -11
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-testing.mjs +1 -1
- package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +14 -14
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +36 -29
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +15 -15
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +50 -43
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +16 -16
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +26 -25
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs +11 -5
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +7 -7
- package/fesm2022/ngx-tethys-watermark.mjs +18 -15
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/flexible-text/index.d.ts +5 -5
- package/form/index.d.ts +26 -22
- package/fullscreen/index.d.ts +4 -4
- package/grid/index.d.ts +12 -12
- package/guider/index.d.ts +10 -10
- package/i18n/index.d.ts +1 -1
- package/icon/index.d.ts +3 -3
- package/image/index.d.ts +12 -12
- package/input/index.d.ts +23 -23
- package/input-number/index.d.ts +4 -4
- package/layout/index.d.ts +16 -16
- package/list/index.d.ts +16 -15
- package/mention/index.d.ts +4 -4
- package/menu/index.d.ts +7 -7
- package/message/index.d.ts +5 -5
- package/native-table/index.d.ts +305 -0
- package/native-table/styles/native-table.scss +174 -0
- package/nav/index.d.ts +12 -12
- package/notify/index.d.ts +1 -1
- package/package.json +5 -1
- package/pagination/index.d.ts +21 -17
- package/popover/index.d.ts +8 -8
- package/progress/index.d.ts +18 -18
- package/property/index.d.ts +6 -6
- package/property-operation/index.d.ts +3 -3
- package/radio/index.d.ts +6 -6
- package/rate/index.d.ts +5 -5
- package/resizable/index.d.ts +2 -2
- package/result/index.d.ts +8 -8
- package/schematics/testing/test-workspace.js +1 -0
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/index.d.ts +9 -9
- package/select/index.d.ts +28 -22
- package/shared/index.d.ts +31 -30
- package/shared/option/styles/select-dropdown.scss +5 -2
- package/skeleton/index.d.ts +52 -52
- package/slide/index.d.ts +5 -5
- package/slider/index.d.ts +6 -6
- package/space/index.d.ts +1 -1
- package/statistic/index.d.ts +18 -18
- package/stepper/index.d.ts +8 -8
- package/styles/index.scss +1 -0
- package/switch/index.d.ts +2 -2
- package/table/index.d.ts +24 -24
- package/tabs/index.d.ts +6 -6
- package/testing/index.d.ts +1 -1
- package/time-picker/index.d.ts +21 -21
- package/timeline/index.d.ts +8 -8
- package/tooltip/index.d.ts +12 -12
- package/transfer/index.d.ts +16 -16
- package/tree/index.d.ts +28 -28
- package/tree-select/index.d.ts +13 -13
- package/typography/index.d.ts +3 -3
- package/upload/index.d.ts +4 -4
- package/util/index.d.ts +17 -7
- package/vote/index.d.ts +2 -2
- package/watermark/index.d.ts +2 -2
|
@@ -36,8 +36,8 @@ class ThyCascaderOptionComponent {
|
|
|
36
36
|
this.active = input(false, ...(ngDevMode ? [{ debugName: "active", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
37
37
|
this.halfSelected = input(false, ...(ngDevMode ? [{ debugName: "halfSelected", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
38
38
|
this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
39
|
-
this.disabled = computed(() => this.option()
|
|
40
|
-
this.expand = computed(() => this.option() && !this.option().isLeaf, ...(ngDevMode ? [{ debugName: "expand" }] : []));
|
|
39
|
+
this.disabled = computed(() => !!this.option()?.disabled, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
40
|
+
this.expand = computed(() => !!(this.option() && !this.option().isLeaf), ...(ngDevMode ? [{ debugName: "expand" }] : []));
|
|
41
41
|
this.labelProperty = input('label', ...(ngDevMode ? [{ debugName: "labelProperty" }] : []));
|
|
42
42
|
this.toggleSelectChange = output();
|
|
43
43
|
}
|
|
@@ -45,17 +45,17 @@ class ThyCascaderOptionComponent {
|
|
|
45
45
|
toggleOption(value) {
|
|
46
46
|
this.toggleSelectChange.emit(value);
|
|
47
47
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
49
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyCascaderOptionComponent, isStandalone: true, selector: "[thy-cascader-option]", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, isOnlySelectLeaf: { classPropertyName: "isOnlySelectLeaf", publicName: "isOnlySelectLeaf", isSignal: true, isRequired: false, transformFunction: null }, optionRender: { classPropertyName: "optionRender", publicName: "optionRender", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, halfSelected: { classPropertyName: "halfSelected", publicName: "halfSelected", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, labelProperty: { classPropertyName: "labelProperty", publicName: "labelProperty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleSelectChange: "toggleSelectChange" }, host: { properties: { "class.thy-cascader-menu-item-active": "active()", "class.thy-cascader-menu-item-disabled": "disabled()", "class.thy-cascader-menu-item-expand": "expand()" }, classAttribute: "d-flex thy-cascader-menu-item" }, ngImport: i0, template: "@if (!option()!.readonly) {\n <div thyStopPropagation>\n @if (multiple()) {\n <label\n class=\"mr-2\"\n thyCheckbox\n [disabled]=\"option().disabled\"\n [name]=\"option().value || option()._id\"\n [thyIndeterminate]=\"halfSelected()\"\n [ngModel]=\"selected()\"\n (ngModelChange)=\"toggleOption($event)\"></label>\n }\n @if (!multiple() && !isOnlySelectLeaf()) {\n <label\n class=\"mr-2\"\n thyRadio\n [disabled]=\"option().disabled\"\n [name]=\"option().value || option()._id\"\n [ngModel]=\"selected()\"\n (ngModelChange)=\"toggleOption($event)\"></label>\n }\n </div>\n}\n\n@if (!optionRender()) {\n <span thyFlexibleText [thyTooltipContent]=\"option()[labelProperty()] || ''\"> {{ option()[labelProperty()] || '' }}</span>\n} @else {\n <ng-template [ngTemplateOutlet]=\"optionRender()\" [ngTemplateOutletContext]=\"{ option: option() }\"></ng-template>\n}\n\n@if (!option()?.isLeaf || (option()?.children && option()!.children?.length) || option()?.loading) {\n <span class=\"wtf wtf-angle-right thy-cascader-menu-item-expand-icon\"> </span>\n}\n", dependencies: [{ kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "component", type: ThyCheckbox, selector: "thy-checkbox,[thy-checkbox],[thyCheckbox]", inputs: ["thyIndeterminate"] }, { kind: "component", type: ThyRadio, selector: "[thy-radio],[thyRadio]", inputs: ["thyValue"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderOptionComponent, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: '[thy-cascader-option]', imports: [ThyFlexibleText, ThyCheckbox, ThyRadio, FormsModule, ThyStopPropagationDirective, NgTemplateOutlet], host: {
|
|
54
54
|
class: 'd-flex thy-cascader-menu-item',
|
|
55
55
|
'[class.thy-cascader-menu-item-active]': 'active()',
|
|
56
56
|
'[class.thy-cascader-menu-item-disabled]': 'disabled()',
|
|
57
57
|
'[class.thy-cascader-menu-item-expand]': 'expand()'
|
|
58
|
-
}, template: "@if (!option()
|
|
58
|
+
}, template: "@if (!option()!.readonly) {\n <div thyStopPropagation>\n @if (multiple()) {\n <label\n class=\"mr-2\"\n thyCheckbox\n [disabled]=\"option().disabled\"\n [name]=\"option().value || option()._id\"\n [thyIndeterminate]=\"halfSelected()\"\n [ngModel]=\"selected()\"\n (ngModelChange)=\"toggleOption($event)\"></label>\n }\n @if (!multiple() && !isOnlySelectLeaf()) {\n <label\n class=\"mr-2\"\n thyRadio\n [disabled]=\"option().disabled\"\n [name]=\"option().value || option()._id\"\n [ngModel]=\"selected()\"\n (ngModelChange)=\"toggleOption($event)\"></label>\n }\n </div>\n}\n\n@if (!optionRender()) {\n <span thyFlexibleText [thyTooltipContent]=\"option()[labelProperty()] || ''\"> {{ option()[labelProperty()] || '' }}</span>\n} @else {\n <ng-template [ngTemplateOutlet]=\"optionRender()\" [ngTemplateOutletContext]=\"{ option: option() }\"></ng-template>\n}\n\n@if (!option()?.isLeaf || (option()?.children && option()!.children?.length) || option()?.loading) {\n <span class=\"wtf wtf-angle-right thy-cascader-menu-item-expand-icon\"> </span>\n}\n" }]
|
|
59
59
|
}], ctorParameters: () => [], propDecorators: { option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], isOnlySelectLeaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOnlySelectLeaf", required: false }] }], optionRender: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionRender", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], halfSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "halfSelected", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], labelProperty: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelProperty", required: false }] }], toggleSelectChange: [{ type: i0.Output, args: ["toggleSelectChange"] }] } });
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -73,7 +73,7 @@ class ThyCascaderSearchOptionComponent {
|
|
|
73
73
|
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
74
74
|
this.isOnlySelectLeaf = input(true, ...(ngDevMode ? [{ debugName: "isOnlySelectLeaf", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
75
75
|
this.active = input(false, ...(ngDevMode ? [{ debugName: "active", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
76
|
-
this.optionRender = input(
|
|
76
|
+
this.optionRender = input(...(ngDevMode ? [undefined, { debugName: "optionRender" }] : []));
|
|
77
77
|
this.toggleSelectChange = output();
|
|
78
78
|
}
|
|
79
79
|
ngOnInit() { }
|
|
@@ -87,16 +87,16 @@ class ThyCascaderSearchOptionComponent {
|
|
|
87
87
|
toggleOption(value) {
|
|
88
88
|
this.toggleSelectChange.emit(this.option());
|
|
89
89
|
}
|
|
90
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
91
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderSearchOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyCascaderSearchOptionComponent, isStandalone: true, selector: "[thy-cascader-search-option]", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, isOnlySelectLeaf: { classPropertyName: "isOnlySelectLeaf", publicName: "isOnlySelectLeaf", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, optionRender: { classPropertyName: "optionRender", publicName: "optionRender", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleSelectChange: "toggleSelectChange" }, host: { listeners: { "click": "toggleClick($event)" }, properties: { "class.multiple": "multiple()", "class.active": "active()" }, classAttribute: "thy-cascader-search-list-item px-4 d-flex align-items-center cursor-pointer" }, ngImport: i0, template: "@if (multiple()) {\n <label\n class=\"mr-1\"\n thyCheckbox\n [disabled]=\"option().thyRowValue[option().thyRowValue.length - 1].disabled\"\n [ngModel]=\"active()\"\n (click)=\"clickCheckbox($event)\"\n (ngModelChange)=\"toggleOption($event)\"\n [thyLabelText]=\"''\"></label>\n}\n\n<thy-breadcrumb thySeparator=\"slash\">\n @for (label of option()!.labelList; track $index; let i = $index) {\n <thy-breadcrumb-item [ngClass]=\"{ 'text-muted': !(option().thyRowValue[i].isLeaf && isOnlySelectLeaf()) }\">\n @if (!optionRender()) {\n <span class=\"option-label-item\" thyFlexibleText [thyTooltipContent]=\"label\">{{ label }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"optionRender()\" [ngTemplateOutletContext]=\"{ option: option().thyRowValue[i] }\"> </ng-template>\n }\n </thy-breadcrumb-item>\n }\n</thy-breadcrumb>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "component", type: ThyCheckbox, selector: "thy-checkbox,[thy-checkbox],[thyCheckbox]", inputs: ["thyIndeterminate"] }, { kind: "component", type: ThyBreadcrumb, selector: "thy-breadcrumb", inputs: ["thyIcon", "thySeparator", "thyItems", "thyMaxCount", "thyExpandable"], exportAs: ["ThyBreadcrumb"] }, { kind: "component", type: ThyBreadcrumbItem, selector: "thy-breadcrumb-item,[thyBreadcrumbItem]", exportAs: ["ThyBreadcrumbItem"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
92
92
|
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderSearchOptionComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
95
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: '[thy-cascader-search-option]', imports: [NgClass, ThyFlexibleText, ThyCheckbox, ThyBreadcrumb, ThyBreadcrumbItem, FormsModule, NgTemplateOutlet], host: {
|
|
96
96
|
class: 'thy-cascader-search-list-item px-4 d-flex align-items-center cursor-pointer',
|
|
97
97
|
'[class.multiple]': 'multiple()',
|
|
98
98
|
'[class.active]': 'active()'
|
|
99
|
-
}, template: "@if (multiple()) {\n <label\n class=\"mr-1\"\n thyCheckbox\n [disabled]=\"option().thyRowValue[option().thyRowValue.length - 1].disabled\"\n [ngModel]=\"active()\"\n (click)=\"clickCheckbox($event)\"\n (ngModelChange)=\"toggleOption($event)\"\n [thyLabelText]=\"''\"></label>\n}\n\n<thy-breadcrumb thySeparator=\"slash\">\n @for (label of option()
|
|
99
|
+
}, template: "@if (multiple()) {\n <label\n class=\"mr-1\"\n thyCheckbox\n [disabled]=\"option().thyRowValue[option().thyRowValue.length - 1].disabled\"\n [ngModel]=\"active()\"\n (click)=\"clickCheckbox($event)\"\n (ngModelChange)=\"toggleOption($event)\"\n [thyLabelText]=\"''\"></label>\n}\n\n<thy-breadcrumb thySeparator=\"slash\">\n @for (label of option()!.labelList; track $index; let i = $index) {\n <thy-breadcrumb-item [ngClass]=\"{ 'text-muted': !(option().thyRowValue[i].isLeaf && isOnlySelectLeaf()) }\">\n @if (!optionRender()) {\n <span class=\"option-label-item\" thyFlexibleText [thyTooltipContent]=\"label\">{{ label }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"optionRender()\" [ngTemplateOutletContext]=\"{ option: option().thyRowValue[i] }\"> </ng-template>\n }\n </thy-breadcrumb-item>\n }\n</thy-breadcrumb>\n" }]
|
|
100
100
|
}], ctorParameters: () => [], propDecorators: { option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], isOnlySelectLeaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOnlySelectLeaf", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], optionRender: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionRender", required: false }] }], toggleClick: [{
|
|
101
101
|
type: HostListener,
|
|
102
102
|
args: ['click', ['$event']]
|
|
@@ -115,6 +115,7 @@ class ThyCascaderService {
|
|
|
115
115
|
this.leafNodes = [];
|
|
116
116
|
this.isLoading = false;
|
|
117
117
|
this.searchResultList = [];
|
|
118
|
+
this.defaultValue = null;
|
|
118
119
|
this.prevSelectedOptions = new Set();
|
|
119
120
|
this.valueChange$ = new Subject();
|
|
120
121
|
}
|
|
@@ -186,7 +187,7 @@ class ThyCascaderService {
|
|
|
186
187
|
this.toggleAllChildren(option, index, event, selectFn);
|
|
187
188
|
}
|
|
188
189
|
else {
|
|
189
|
-
this.setActiveOption(option, index, isSelect, true, selectFn);
|
|
190
|
+
this.setActiveOption(option, index, !!isSelect, true, selectFn);
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
setActiveOption(option, index, select, loadChildren = true, selectFn) {
|
|
@@ -212,7 +213,7 @@ class ThyCascaderService {
|
|
|
212
213
|
else if (index < this.columns.length - 1) {
|
|
213
214
|
this.columns = this.columns.slice(0, index + 1);
|
|
214
215
|
}
|
|
215
|
-
if (select) {
|
|
216
|
+
if (select && selectFn) {
|
|
216
217
|
selectFn(option, index);
|
|
217
218
|
}
|
|
218
219
|
}
|
|
@@ -290,7 +291,7 @@ class ThyCascaderService {
|
|
|
290
291
|
while (allLeafs.length) {
|
|
291
292
|
const { option, index } = allLeafs.shift();
|
|
292
293
|
option.selected = !selected;
|
|
293
|
-
this.setActiveOption(option, index, true,
|
|
294
|
+
this.setActiveOption(option, index, true, undefined, selectFn);
|
|
294
295
|
}
|
|
295
296
|
for (let i = 0; i < this.activatedOptions.length; i++) {
|
|
296
297
|
const option = this.activatedOptions[i];
|
|
@@ -412,8 +413,10 @@ class ThyCascaderService {
|
|
|
412
413
|
const currentItem = selectedItems.find(i => {
|
|
413
414
|
return helpers.shallowEqual(i.thyValue, item.thyValue);
|
|
414
415
|
});
|
|
415
|
-
|
|
416
|
-
|
|
416
|
+
if (currentItem) {
|
|
417
|
+
this.deselectOption(currentItem);
|
|
418
|
+
this.selectionModel.deselect(currentItem);
|
|
419
|
+
}
|
|
417
420
|
// update selectedOptions
|
|
418
421
|
const updatedSelectedItems = this.selectionModel.selected;
|
|
419
422
|
if (isArray(updatedSelectedItems) && updatedSelectedItems.length) {
|
|
@@ -463,7 +466,9 @@ class ThyCascaderService {
|
|
|
463
466
|
return false;
|
|
464
467
|
}
|
|
465
468
|
});
|
|
466
|
-
|
|
469
|
+
if (currentItem) {
|
|
470
|
+
this.selectionModel.deselect(currentItem);
|
|
471
|
+
}
|
|
467
472
|
}
|
|
468
473
|
this.valueChange$.next();
|
|
469
474
|
}
|
|
@@ -501,6 +506,7 @@ class ThyCascaderService {
|
|
|
501
506
|
labelRenderContext = { labels, selectedOptions };
|
|
502
507
|
}
|
|
503
508
|
else {
|
|
509
|
+
// @ts-ignore
|
|
504
510
|
labelRenderText = defaultDisplayRender.call(this, labels, selectedOptions);
|
|
505
511
|
this.labelRenderText = labelRenderText;
|
|
506
512
|
}
|
|
@@ -570,9 +576,8 @@ class ThyCascaderService {
|
|
|
570
576
|
return false;
|
|
571
577
|
}
|
|
572
578
|
getValues() {
|
|
573
|
-
let selectedItems;
|
|
574
579
|
const selected = this.selectionModel.selected;
|
|
575
|
-
selectedItems = selected.map(item => this.getSubmitValue(item.thyRawValue.value));
|
|
580
|
+
const selectedItems = selected.map(item => this.getSubmitValue(item.thyRawValue.value));
|
|
576
581
|
return this.cascaderOptions?.isMultiple ? selectedItems : (selectedItems[0] ?? selectedItems);
|
|
577
582
|
}
|
|
578
583
|
updatePrevSelectedOptions(option, isActivateInit, index) {
|
|
@@ -621,7 +626,7 @@ class ThyCascaderService {
|
|
|
621
626
|
if (!isArray(this.customOptions) || this.customOptions.length === 0) {
|
|
622
627
|
return;
|
|
623
628
|
}
|
|
624
|
-
|
|
629
|
+
const selectedCustomOptions = this.getSelectedCustomOptions();
|
|
625
630
|
selectedCustomOptions.forEach(item => {
|
|
626
631
|
this.removeSelectedItem(item);
|
|
627
632
|
});
|
|
@@ -654,10 +659,10 @@ class ThyCascaderService {
|
|
|
654
659
|
}
|
|
655
660
|
return array1.every((element, index) => element === array2[index]);
|
|
656
661
|
}
|
|
657
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
658
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
663
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderService }); }
|
|
659
664
|
}
|
|
660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderService, decorators: [{
|
|
661
666
|
type: Injectable
|
|
662
667
|
}] });
|
|
663
668
|
|
|
@@ -671,10 +676,10 @@ class ThyCascaderOptionsPipe {
|
|
|
671
676
|
}
|
|
672
677
|
return [...customOptions, ...options];
|
|
673
678
|
}
|
|
674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
675
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
679
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
680
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderOptionsPipe, isStandalone: true, name: "cascaderOptions" }); }
|
|
676
681
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderOptionsPipe, decorators: [{
|
|
678
683
|
type: Pipe,
|
|
679
684
|
args: [{
|
|
680
685
|
name: 'cascaderOptions'
|
|
@@ -901,7 +906,7 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
901
906
|
this.cascaderOptions = viewChildren('cascaderOptions', ...(ngDevMode ? [{ debugName: "cascaderOptions", read: ElementRef }] : [{ read: ElementRef }]));
|
|
902
907
|
this.cascaderOptionContainers = viewChildren('cascaderOptionContainers', ...(ngDevMode ? [{ debugName: "cascaderOptionContainers", read: ElementRef }] : [{ read: ElementRef }]));
|
|
903
908
|
this.cdkConnectedOverlay = viewChild(CdkConnectedOverlay, ...(ngDevMode ? [{ debugName: "cdkConnectedOverlay" }] : []));
|
|
904
|
-
this.trigger = viewChild('trigger'
|
|
909
|
+
this.trigger = viewChild.required('trigger');
|
|
905
910
|
this.input = viewChild('input', ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
906
911
|
this.menu = viewChild('menu', ...(ngDevMode ? [{ debugName: "menu" }] : []));
|
|
907
912
|
this.virtualScrollViewports = viewChildren(CdkVirtualScrollViewport, ...(ngDevMode ? [{ debugName: "virtualScrollViewports" }] : []));
|
|
@@ -920,6 +925,8 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
920
925
|
* 会导致恢复级联状态再变为搜索状态
|
|
921
926
|
*/
|
|
922
927
|
this.isSelectingSearchState = false;
|
|
928
|
+
this.afterChangeFn = null;
|
|
929
|
+
this.resizeSubscription = null;
|
|
923
930
|
this.selectOption = (option, index) => {
|
|
924
931
|
const isOnlySelectLeaf = this.thyIsOnlySelectLeaf();
|
|
925
932
|
if ((option.isLeaf || !isOnlySelectLeaf) && !this.thyMultiple()) {
|
|
@@ -1304,8 +1311,8 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
1304
1311
|
this.destroy$.next();
|
|
1305
1312
|
this.destroy$.complete();
|
|
1306
1313
|
}
|
|
1307
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1308
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1314
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1315
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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 }, thyLoadingDone: { classPropertyName: "thyLoadingDone", publicName: "thyLoadingDone", 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: [
|
|
1309
1316
|
{
|
|
1310
1317
|
provide: NG_VALUE_ACCESSOR,
|
|
1311
1318
|
useExisting: forwardRef(() => ThyCascader),
|
|
@@ -1314,7 +1321,7 @@ class ThyCascader extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
1314
1321
|
ThyCascaderService
|
|
1315
1322
|
], 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 [class.thy-cascader-loading]=\"!thyLoadingDone()\">\n @if (thyLoadingDone()) {\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 } @else {\n <thy-loading [ngStyle]=\"{ 'width.px': thyWidth() }\" [thyDone]=\"thyLoadingDone()\" thySize=\"sm\"></thy-loading>\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: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "pipe", type: ThyCascaderOptionsPipe, name: "cascaderOptions" }], animations: [scaleYMotion] }); }
|
|
1316
1323
|
}
|
|
1317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascader, decorators: [{
|
|
1318
1325
|
type: Component,
|
|
1319
1326
|
args: [{ selector: 'thy-cascader,[thy-cascader]', providers: [
|
|
1320
1327
|
{
|
|
@@ -1357,8 +1364,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1357
1364
|
}] } });
|
|
1358
1365
|
|
|
1359
1366
|
class ThyCascaderModule {
|
|
1360
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1361
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1367
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1368
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderModule, imports: [CommonModule,
|
|
1362
1369
|
FormsModule,
|
|
1363
1370
|
OverlayModule,
|
|
1364
1371
|
ThyInputModule,
|
|
@@ -1371,7 +1378,7 @@ class ThyCascaderModule {
|
|
|
1371
1378
|
ThyCascaderOptionComponent,
|
|
1372
1379
|
ThyCascaderSearchOptionComponent,
|
|
1373
1380
|
ThyCascaderOptionsPipe], exports: [ThyCascader] }); }
|
|
1374
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1381
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderModule, imports: [CommonModule,
|
|
1375
1382
|
FormsModule,
|
|
1376
1383
|
OverlayModule,
|
|
1377
1384
|
ThyInputModule,
|
|
@@ -1384,7 +1391,7 @@ class ThyCascaderModule {
|
|
|
1384
1391
|
ThyCascaderOptionComponent,
|
|
1385
1392
|
ThyCascaderSearchOptionComponent] }); }
|
|
1386
1393
|
}
|
|
1387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyCascaderModule, decorators: [{
|
|
1388
1395
|
type: NgModule,
|
|
1389
1396
|
args: [{
|
|
1390
1397
|
imports: [
|