cmat 0.0.78 → 0.0.79
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/fesm2022/cmat-components-adapter.mjs +9 -46
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +104 -205
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +4 -8
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs +14 -20
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +21 -21
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +4 -22
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +153 -220
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +5 -177
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +3 -15
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -96
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +4 -25
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +3 -21
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +7 -50
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +3 -9
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +6 -31
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +3 -12
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +3 -12
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +10 -13
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +18 -12
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +3 -9
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -23
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +49 -397
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +183 -725
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +7 -10
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +11 -11
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +8 -19
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +96 -93
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +10 -11
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +15 -149
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +9 -16
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +5 -11
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-rich-text-editor.mjs +4 -25
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +46 -72
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +193 -150
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +124 -78
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +4 -22
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +9 -11
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +3 -18
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +3 -15
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +18 -21
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +16 -14
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +103 -80
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +21 -36
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -27
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +7 -9
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +24 -33
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +14 -17
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +6 -23
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +4 -11
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -43
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -5
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +8 -12
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-config.mjs +50 -26
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +9 -11
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +56 -101
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +4 -32
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +49 -40
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +19 -25
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -10
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +8 -13
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +8 -12
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +5 -27
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +0 -8
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat.mjs +3159 -3441
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind/plugins/helpers.js +1 -10
- package/tailwind/plugins/scrollbar/index.js +0 -1
- package/tailwind/plugins/scrollbar/typedefs.js +1 -7
- package/tailwind/plugins/scrollbar/utilities.js +9 -58
- package/tailwind/plugins/scrollbar/variants.js +2 -17
- package/tailwind/plugins/theming.js +1 -57
- package/tailwind/utils/generate-contrasts.js +1 -12
- package/tailwind/utils/generate-palette.js +1 -32
- package/types/cmat-components-adapter.d.ts +0 -25
- package/types/cmat-components-breadcrumb.d.ts +25 -175
- package/types/cmat-components-carousel.d.ts +0 -18
- package/types/cmat-components-cascade.d.ts +1 -1
- package/types/cmat-components-chip-input.d.ts +4 -3
- package/types/cmat-components-code-editor.d.ts +0 -18
- package/types/cmat-components-custom-formly.d.ts +22 -28
- package/types/cmat-components-date-range.d.ts +0 -71
- package/types/cmat-components-date-time-display.d.ts +0 -15
- package/types/cmat-components-drawer.d.ts +0 -42
- package/types/cmat-components-empty-state.d.ts +0 -21
- package/types/cmat-components-file-preview.d.ts +0 -18
- package/types/cmat-components-filter-toolbar.d.ts +3 -43
- package/types/cmat-components-form-actions.d.ts +0 -6
- package/types/cmat-components-image-viewer.d.ts +0 -12
- package/types/cmat-components-inline-loading.d.ts +0 -9
- package/types/cmat-components-knob-input.d.ts +1 -1
- package/types/cmat-components-material-datetimepicker.d.ts +0 -263
- package/types/cmat-components-navigation.d.ts +24 -164
- package/types/cmat-components-opt-input.d.ts +1 -1
- package/types/cmat-components-page-header.d.ts +2 -16
- package/types/cmat-components-pagination.d.ts +22 -24
- package/types/cmat-components-popover.d.ts +1 -109
- package/types/cmat-components-progress-bar.d.ts +3 -4
- package/types/cmat-components-rich-text-editor.d.ts +0 -21
- package/types/cmat-components-select-search.d.ts +3 -19
- package/types/cmat-components-select-table.d.ts +17 -4
- package/types/cmat-components-select-tree.d.ts +20 -19
- package/types/cmat-components-skeleton.d.ts +0 -18
- package/types/cmat-components-status-tag.d.ts +0 -15
- package/types/cmat-components-table-toolbar.d.ts +0 -12
- package/types/cmat-components-timeline.d.ts +3 -4
- package/types/cmat-components-toast.d.ts +1 -0
- package/types/cmat-components-transfer-picker.d.ts +23 -27
- package/types/cmat-components-upload.d.ts +7 -10
- package/types/cmat-components-x6-angular-shape.d.ts +0 -1
- package/types/cmat-directives-arrow-cursor.d.ts +1 -1
- package/types/cmat-directives-debounce.d.ts +3 -4
- package/types/cmat-pipes-secure.d.ts +3 -4
- package/types/cmat-services-config.d.ts +35 -13
- package/types/cmat-services-data.d.ts +13 -12
- package/types/cmat-services-export-as.d.ts +0 -22
- package/types/cmat-services-loading.d.ts +15 -10
- package/types/cmat-services-media-watcher.d.ts +10 -13
- package/types/cmat-services-splash-screen.d.ts +2 -4
- package/types/cmat-services-title.d.ts +3 -5
- package/types/cmat.d.ts +655 -1308
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
|
-
import { NgClass
|
|
3
|
+
import { NgClass } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, ChangeDetectorRef, Input, HostListener, ViewChild, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { inject, ChangeDetectorRef, DestroyRef, Input, HostListener, ViewChild, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
7
|
import * as i3 from '@angular/forms';
|
|
7
8
|
import { FormControl, NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
9
|
import * as i5 from '@angular/material/button';
|
|
@@ -18,8 +19,7 @@ import * as i4 from '@angular/material/tree';
|
|
|
18
19
|
import { MatTreeModule } from '@angular/material/tree';
|
|
19
20
|
import { CmatSelectSearchComponent } from 'cmat/components/select-search';
|
|
20
21
|
import { isUndefined, isNil } from 'lodash-es';
|
|
21
|
-
import {
|
|
22
|
-
import { takeUntil, debounceTime } from 'rxjs/operators';
|
|
22
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
23
23
|
|
|
24
24
|
class CmatSelectTreeFlatNode {
|
|
25
25
|
}
|
|
@@ -40,20 +40,22 @@ class CmatSelectTreeComponent {
|
|
|
40
40
|
};
|
|
41
41
|
this.flatNodeMap = new Map();
|
|
42
42
|
this.nestedNodeMap = new Map();
|
|
43
|
-
this.
|
|
43
|
+
this._flatNodeById = new Map();
|
|
44
|
+
this._parentFlatNodeById = new Map();
|
|
45
|
+
this._selectedFlatNodeIds = new Set();
|
|
44
46
|
this.checklistSelection = new SelectionModel(true);
|
|
45
47
|
this.overallFilterControl = new FormControl();
|
|
46
48
|
this.isIndeterminate = false;
|
|
47
49
|
this.isChecked = false;
|
|
48
50
|
this.checkCount = 0;
|
|
49
51
|
this.selectControl = new FormControl();
|
|
50
|
-
this.matSelectData =
|
|
52
|
+
this.matSelectData = [];
|
|
51
53
|
this.stateChanges = new Subject();
|
|
52
54
|
this.focused = false;
|
|
53
55
|
this.touched = false;
|
|
54
56
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
55
57
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
56
|
-
this.
|
|
58
|
+
this._destroyRef = inject(DestroyRef);
|
|
57
59
|
this.getLevel = (dataNode) => dataNode.level;
|
|
58
60
|
this.childrenAccessor = (node) => node.children ?? [];
|
|
59
61
|
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
@@ -64,7 +66,8 @@ class CmatSelectTreeComponent {
|
|
|
64
66
|
this._onModelChange = () => { };
|
|
65
67
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
66
68
|
this._onTouchedChange = () => { };
|
|
67
|
-
this._transformer = (node, level) => {
|
|
69
|
+
this._transformer = (node, level, parent = null) => {
|
|
70
|
+
// 构建平铺节点并缓存映射关系
|
|
68
71
|
const existingNode = this.nestedNodeMap.get(node);
|
|
69
72
|
const flatNode = existingNode?.name === node.name
|
|
70
73
|
? existingNode
|
|
@@ -75,6 +78,8 @@ class CmatSelectTreeComponent {
|
|
|
75
78
|
flatNode.expandable = !!node.children && node.children.length > 0;
|
|
76
79
|
this.flatNodeMap.set(flatNode, node);
|
|
77
80
|
this.nestedNodeMap.set(node, flatNode);
|
|
81
|
+
this._flatNodeById.set(flatNode.id, flatNode);
|
|
82
|
+
this._parentFlatNodeById.set(flatNode.id, parent);
|
|
78
83
|
return flatNode;
|
|
79
84
|
};
|
|
80
85
|
if (this.ngControl != null) {
|
|
@@ -96,16 +101,22 @@ class CmatSelectTreeComponent {
|
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
ngOnChanges(changes) {
|
|
104
|
+
// 数据源变化时,重建节点索引和缓存
|
|
99
105
|
if (changes['dataSource']) {
|
|
106
|
+
this.flatNodeMap.clear();
|
|
107
|
+
this.nestedNodeMap.clear();
|
|
108
|
+
this._flatNodeById.clear();
|
|
109
|
+
this._parentFlatNodeById.clear();
|
|
100
110
|
this.treeDataSource = this.dataSource;
|
|
101
111
|
this.dataFlatNodes = this._getFlattenNodes(this.dataSource);
|
|
102
|
-
this.matSelectData.
|
|
112
|
+
this.matSelectData.splice(0, this.matSelectData.length, ...this.dataFlatNodes);
|
|
103
113
|
if (this.dataSource.length > 0) {
|
|
104
114
|
this._init(this.value);
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
}
|
|
108
118
|
ngAfterViewInit() {
|
|
119
|
+
// 初始化下拉面板样式,并监听筛选输入变化
|
|
109
120
|
let panelClass = ['overflow-y-auto', 'scrollbar-custom'];
|
|
110
121
|
if (this._matSelect.panelClass) {
|
|
111
122
|
if (Array.isArray(this._matSelect.panelClass)) {
|
|
@@ -115,28 +126,30 @@ class CmatSelectTreeComponent {
|
|
|
115
126
|
this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
|
|
116
127
|
}
|
|
117
128
|
else if (typeof this._matSelect.panelClass === 'object') {
|
|
129
|
+
const panelClassEntries = this._matSelect.panelClass;
|
|
118
130
|
panelClass.forEach((i) => {
|
|
119
|
-
|
|
131
|
+
panelClassEntries[i] = true;
|
|
120
132
|
});
|
|
121
133
|
}
|
|
122
134
|
}
|
|
123
135
|
else {
|
|
124
136
|
this._matSelect.panelClass = panelClass;
|
|
125
137
|
}
|
|
126
|
-
|
|
127
|
-
.pipe(
|
|
138
|
+
this.overallFilterControl.valueChanges
|
|
139
|
+
.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(200))
|
|
128
140
|
.subscribe(() => {
|
|
129
|
-
const
|
|
141
|
+
const filterValue = `${this.overallFilterControl.value ?? ''}`.toLowerCase();
|
|
142
|
+
const dataClone = this._cloneTreeNodes(this.dataSource);
|
|
130
143
|
const arr = [];
|
|
131
144
|
for (let i = dataClone.length - 1; i >= 0; i--) {
|
|
132
|
-
if (!this._applyColumnLevelFilters(dataClone[i],
|
|
145
|
+
if (!this._applyColumnLevelFilters(dataClone[i], filterValue)) {
|
|
133
146
|
arr.push(i);
|
|
134
147
|
}
|
|
135
148
|
}
|
|
136
149
|
arr.forEach((v) => { dataClone.splice(v, 1); });
|
|
137
150
|
this.treeDataSource = dataClone;
|
|
138
151
|
this.dataFlatNodes = this._getFlattenNodes(dataClone);
|
|
139
|
-
this.matSelectData.
|
|
152
|
+
this.matSelectData.splice(0, this.matSelectData.length, ...this.dataFlatNodes);
|
|
140
153
|
if (this.expandable) {
|
|
141
154
|
this.tree.expandAll();
|
|
142
155
|
}
|
|
@@ -146,8 +159,6 @@ class CmatSelectTreeComponent {
|
|
|
146
159
|
}
|
|
147
160
|
ngOnDestroy() {
|
|
148
161
|
this.stateChanges.complete();
|
|
149
|
-
this._unsubscribeAll.next(void 0);
|
|
150
|
-
this._unsubscribeAll.complete();
|
|
151
162
|
}
|
|
152
163
|
get placeholder() {
|
|
153
164
|
return this._placeholder;
|
|
@@ -240,7 +251,15 @@ class CmatSelectTreeComponent {
|
|
|
240
251
|
return `${node.id}`;
|
|
241
252
|
}
|
|
242
253
|
let atLeastPartialSubstitution = false;
|
|
243
|
-
const
|
|
254
|
+
const nodeRecord = node;
|
|
255
|
+
const substitution = this.customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
|
|
256
|
+
const nodeValue = nodeRecord[key];
|
|
257
|
+
if (isNil(nodeValue) || (typeof nodeValue !== 'string' && typeof nodeValue !== 'number' && typeof nodeValue !== 'boolean' && typeof nodeValue !== 'bigint')) {
|
|
258
|
+
return '';
|
|
259
|
+
}
|
|
260
|
+
atLeastPartialSubstitution = true;
|
|
261
|
+
return String(nodeValue);
|
|
262
|
+
});
|
|
244
263
|
if (atLeastPartialSubstitution === false) {
|
|
245
264
|
return `${node.id}`;
|
|
246
265
|
}
|
|
@@ -248,6 +267,7 @@ class CmatSelectTreeComponent {
|
|
|
248
267
|
}).join(', ');
|
|
249
268
|
}
|
|
250
269
|
openedChange(opened) {
|
|
270
|
+
// 面板打开/关闭时,同步树节点和选中值
|
|
251
271
|
if (opened) {
|
|
252
272
|
if (this.multiple) {
|
|
253
273
|
this.checklistSelection.selected.forEach((node) => {
|
|
@@ -289,85 +309,90 @@ class CmatSelectTreeComponent {
|
|
|
289
309
|
}, 100);
|
|
290
310
|
}
|
|
291
311
|
}
|
|
292
|
-
/** Whether all the descendants of the node are selected. */
|
|
293
312
|
descendantsAllSelected(node) {
|
|
313
|
+
// 判断当前节点的所有后代是否都已选中
|
|
294
314
|
const descendants = this._getDescendants(node);
|
|
295
|
-
return descendants.every(child => this.
|
|
315
|
+
return descendants.every(child => this._selectedFlatNodeIds.has(child.id));
|
|
296
316
|
}
|
|
297
|
-
/** Whether part of the descendants are selected */
|
|
298
317
|
descendantsPartiallySelected(node) {
|
|
318
|
+
// 判断当前节点是否处于半选状态
|
|
299
319
|
const descendants = this._getDescendants(node);
|
|
300
|
-
const result = descendants.some(child => this.
|
|
301
|
-
return result && !descendants.every(child => this.
|
|
320
|
+
const result = descendants.some(child => this._selectedFlatNodeIds.has(child.id));
|
|
321
|
+
return result && !descendants.every(child => this._selectedFlatNodeIds.has(child.id));
|
|
302
322
|
}
|
|
303
|
-
/** Toggle the to-do item selection. Select/deselect all the descendants node */
|
|
304
323
|
todoItemSelectionToggle(event, node) {
|
|
324
|
+
// 切换分支节点的选中状态
|
|
305
325
|
event.stopPropagation();
|
|
306
326
|
if (this.multiple) {
|
|
307
327
|
this.checklistSelection.toggle(node);
|
|
308
328
|
const descendants = this._getDescendants(node);
|
|
309
|
-
const diffCount = descendants.filter(child => this.checklistSelection.isSelected(child)).length;
|
|
310
329
|
if (this.checklistSelection.isSelected(node)) {
|
|
311
330
|
this.checklistSelection.select(...descendants);
|
|
312
|
-
this.checkCount = this.checkCount + 1 + descendants.length - diffCount;
|
|
313
331
|
}
|
|
314
332
|
else {
|
|
315
333
|
this.checklistSelection.deselect(...descendants);
|
|
316
|
-
this.checkCount = this.checkCount - 1 - descendants.length;
|
|
317
334
|
}
|
|
318
335
|
this._checkAllParentsSelection(node);
|
|
336
|
+
this._syncSelectedFlatNodeIds();
|
|
319
337
|
this._updateCheckState();
|
|
320
338
|
}
|
|
321
339
|
else {
|
|
322
340
|
this.checklistSelection.clear();
|
|
323
341
|
this.checklistSelection.select(node);
|
|
342
|
+
this._syncSelectedFlatNodeIds();
|
|
324
343
|
this._matSelect.close();
|
|
325
344
|
}
|
|
326
345
|
}
|
|
327
|
-
/** Toggle a leaf to-do item selection. Check all the parents to see if they changed */
|
|
328
346
|
todoLeafItemSelectionToggle(event, node) {
|
|
347
|
+
// 切换叶子节点的选中状态
|
|
329
348
|
event.stopPropagation();
|
|
330
349
|
if (this.multiple) {
|
|
331
350
|
this.checklistSelection.toggle(node);
|
|
332
|
-
this.checklistSelection.isSelected(node) ? this.checkCount += 1 : this.checkCount -= 1;
|
|
333
351
|
this._checkAllParentsSelection(node);
|
|
352
|
+
this._syncSelectedFlatNodeIds();
|
|
334
353
|
this._updateCheckState();
|
|
335
354
|
}
|
|
336
355
|
else {
|
|
337
356
|
this.checklistSelection.clear();
|
|
338
357
|
this.checklistSelection.select(node);
|
|
358
|
+
this._syncSelectedFlatNodeIds();
|
|
339
359
|
this._matSelect.close();
|
|
340
360
|
}
|
|
341
361
|
}
|
|
342
362
|
clearSelection() {
|
|
363
|
+
// 清空所有选择
|
|
343
364
|
this.checklistSelection.clear();
|
|
344
365
|
this.isChecked = false;
|
|
345
366
|
this.isIndeterminate = false;
|
|
346
367
|
this.checkCount = 0;
|
|
368
|
+
this._selectedFlatNodeIds.clear();
|
|
347
369
|
this.value = null;
|
|
348
370
|
this._matSelect.writeValue(null);
|
|
349
371
|
this._matSelect._onChange(null);
|
|
350
372
|
}
|
|
351
373
|
toggleSelectAll(selectAllValue) {
|
|
374
|
+
// 全选或取消全选
|
|
352
375
|
if (selectAllValue) {
|
|
353
|
-
this.
|
|
354
|
-
this.checklistSelection.select(node);
|
|
355
|
-
});
|
|
376
|
+
this.checklistSelection.select(...this.dataFlatNodes);
|
|
356
377
|
this.isIndeterminate = false;
|
|
357
378
|
this.isChecked = true;
|
|
358
|
-
this.
|
|
379
|
+
this._syncSelectedFlatNodeIds();
|
|
359
380
|
}
|
|
360
381
|
else {
|
|
361
382
|
this.checklistSelection.clear();
|
|
362
383
|
this.isChecked = false;
|
|
363
384
|
this.isIndeterminate = false;
|
|
364
385
|
this.checkCount = 0;
|
|
386
|
+
this._selectedFlatNodeIds.clear();
|
|
365
387
|
}
|
|
366
388
|
}
|
|
367
389
|
getChecklistSelectionIsSelected(i) {
|
|
368
|
-
|
|
390
|
+
// 根据原始节点判断是否已选中
|
|
391
|
+
const flatNode = this.nestedNodeMap.get(i);
|
|
392
|
+
return !!flatNode && this._selectedFlatNodeIds.has(flatNode.id);
|
|
369
393
|
}
|
|
370
394
|
_init(v) {
|
|
395
|
+
// 初始化内部值和选中状态
|
|
371
396
|
if (this.dataSource.length > 0 && this.treeDataSource && this._matSelect) {
|
|
372
397
|
if (this.expandable) {
|
|
373
398
|
this.tree.expandAll();
|
|
@@ -378,7 +403,7 @@ class CmatSelectTreeComponent {
|
|
|
378
403
|
else {
|
|
379
404
|
this.checklistSelection.clear();
|
|
380
405
|
}
|
|
381
|
-
if (v && v.length > 0) {
|
|
406
|
+
if (Array.isArray(v) && v.length > 0) {
|
|
382
407
|
if (this.multiple) {
|
|
383
408
|
const findOutNode = [];
|
|
384
409
|
this.checklistSelection.selected.forEach((node) => {
|
|
@@ -390,17 +415,14 @@ class CmatSelectTreeComponent {
|
|
|
390
415
|
findOutNode.forEach((node) => {
|
|
391
416
|
this.checklistSelection.deselect(node);
|
|
392
417
|
});
|
|
393
|
-
this.value = this.checklistSelection.selected;
|
|
394
|
-
this.checkCount = this.checklistSelection.selected.length;
|
|
418
|
+
this.value = [...this.checklistSelection.selected];
|
|
395
419
|
}
|
|
396
420
|
else {
|
|
397
|
-
this.value = this.checklistSelection.selected;
|
|
398
|
-
this.checkCount = 1;
|
|
421
|
+
this.value = this.checklistSelection.selected.length > 0 ? { ...this.checklistSelection.selected[0] } : null;
|
|
399
422
|
}
|
|
400
423
|
}
|
|
401
424
|
else {
|
|
402
425
|
this.value = v;
|
|
403
|
-
this.checkCount = 0;
|
|
404
426
|
}
|
|
405
427
|
this._matSelect.writeValue(this.value);
|
|
406
428
|
this._matSelect._onChange(this.value);
|
|
@@ -411,8 +433,8 @@ class CmatSelectTreeComponent {
|
|
|
411
433
|
this.value = v;
|
|
412
434
|
}
|
|
413
435
|
}
|
|
414
|
-
/* Checks all the parents when a leaf node is selected/unselected */
|
|
415
436
|
_checkAllParentsSelection(node) {
|
|
437
|
+
// 级联更新父节点的选中状态
|
|
416
438
|
let parent = this._getParentNode(node);
|
|
417
439
|
while (parent) {
|
|
418
440
|
parent.expandable = true;
|
|
@@ -421,60 +443,49 @@ class CmatSelectTreeComponent {
|
|
|
421
443
|
parent = this._getParentNode(parent);
|
|
422
444
|
}
|
|
423
445
|
}
|
|
424
|
-
/** Check root node checked state and change it accordingly */
|
|
425
446
|
_checkRootNodeSelection(node) {
|
|
447
|
+
// 根据子节点状态同步父节点选中状态
|
|
426
448
|
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
427
449
|
const descendants = this._getDescendants(node);
|
|
428
450
|
const descAllSelected = descendants.every(child => this.checklistSelection.isSelected(child));
|
|
429
451
|
if (nodeSelected && !descAllSelected) {
|
|
430
452
|
this.checklistSelection.deselect(node);
|
|
431
|
-
this.checkCount -= 1;
|
|
432
453
|
}
|
|
433
454
|
else if (!nodeSelected && (descAllSelected || descendants.length === 0)) {
|
|
434
455
|
this.checklistSelection.select(node);
|
|
435
|
-
this.checkCount += 1;
|
|
436
456
|
}
|
|
457
|
+
this._updateCheckState();
|
|
437
458
|
}
|
|
438
|
-
/* Get the parent node of a node */
|
|
439
459
|
_getParentNode(node) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return null;
|
|
443
|
-
}
|
|
444
|
-
const startIndex = this.dataFlatNodes.findIndex(j => j === node) - 1;
|
|
445
|
-
for (let i = startIndex; i >= 0; i--) {
|
|
446
|
-
const currentNode = this.dataFlatNodes[i];
|
|
447
|
-
if (this.getLevel(currentNode) < currentLevel) {
|
|
448
|
-
return currentNode;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
return null;
|
|
460
|
+
// 通过缓存获取父节点
|
|
461
|
+
return this._parentFlatNodeById.get(node.id) ?? null;
|
|
452
462
|
}
|
|
453
463
|
_updateChecklistSelection(value) {
|
|
464
|
+
// 根据外部值同步内部选择状态
|
|
454
465
|
this.checklistSelection.clear();
|
|
455
466
|
if (!isNil(value)) {
|
|
456
467
|
const valueArray = !Array.isArray(value) ? [value] : value;
|
|
457
468
|
valueArray.forEach((item) => {
|
|
458
|
-
const nodeFound = this.
|
|
469
|
+
const nodeFound = this._flatNodeById.get(item.id);
|
|
459
470
|
if (isNil(nodeFound)) {
|
|
460
471
|
return;
|
|
461
472
|
}
|
|
462
473
|
this.checklistSelection.select(nodeFound);
|
|
463
474
|
});
|
|
475
|
+
this._syncSelectedFlatNodeIds();
|
|
464
476
|
}
|
|
465
477
|
}
|
|
466
478
|
_updateSelect(value) {
|
|
479
|
+
// 根据当前值同步显示选择
|
|
467
480
|
if (!isNil(value)) {
|
|
468
481
|
const valueArray = !Array.isArray(value) ? [value] : value;
|
|
469
|
-
this.
|
|
470
|
-
if (this.overallSearchEnabled) //有搜索功能,转化选中节点为当前数据源节点
|
|
482
|
+
if (this.overallSearchEnabled) // 有搜索功能时,将选中节点转换为当前数据源节点
|
|
471
483
|
{
|
|
472
484
|
valueArray.forEach((item) => {
|
|
473
|
-
const nodeFound = this.
|
|
485
|
+
const nodeFound = this._flatNodeById.get(item.id);
|
|
474
486
|
if (isNil(nodeFound)) {
|
|
475
487
|
return;
|
|
476
488
|
}
|
|
477
|
-
this.checkCount += 1;
|
|
478
489
|
this.checklistSelection.deselect(item);
|
|
479
490
|
this.checklistSelection.select(nodeFound);
|
|
480
491
|
});
|
|
@@ -484,10 +495,12 @@ class CmatSelectTreeComponent {
|
|
|
484
495
|
this._checkAllParentsSelection(item);
|
|
485
496
|
});
|
|
486
497
|
}
|
|
498
|
+
this._syncSelectedFlatNodeIds();
|
|
487
499
|
this._updateCheckState();
|
|
488
500
|
}
|
|
489
501
|
}
|
|
490
502
|
_applyColumnLevelFilters(node, filter) {
|
|
503
|
+
// 递归过滤节点及其子节点
|
|
491
504
|
let result = false;
|
|
492
505
|
if (node?.children && node.children.length > 0) {
|
|
493
506
|
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
@@ -501,43 +514,76 @@ class CmatSelectTreeComponent {
|
|
|
501
514
|
if (node?.children?.length === 0) {
|
|
502
515
|
node.children = null;
|
|
503
516
|
}
|
|
504
|
-
const cellValue = node
|
|
517
|
+
const cellValue = node.name.toLowerCase();
|
|
505
518
|
if (cellValue.includes(filter)) {
|
|
506
519
|
result = true;
|
|
507
520
|
}
|
|
508
521
|
return result;
|
|
509
522
|
}
|
|
510
523
|
_updateCheckState() {
|
|
524
|
+
// 更新全选与半选状态
|
|
511
525
|
if (this.showToggleAllCheckbox && this.dataSource.length > 0) {
|
|
512
|
-
|
|
513
|
-
this.
|
|
526
|
+
const selectedCount = this._selectedFlatNodeIds.size;
|
|
527
|
+
this.checkCount = selectedCount;
|
|
528
|
+
this.isIndeterminate = selectedCount < this.dataFlatNodes.length && selectedCount > 0;
|
|
529
|
+
this.isChecked = selectedCount === this.dataFlatNodes.length && selectedCount > 0;
|
|
514
530
|
}
|
|
515
531
|
}
|
|
516
|
-
_getFlattenNodes(nodes, i = 0) {
|
|
532
|
+
_getFlattenNodes(nodes, i = 0, parent = null) {
|
|
533
|
+
// 将树结构平铺为节点列表
|
|
517
534
|
const flattenedNodes = [];
|
|
518
535
|
for (const node of nodes) {
|
|
519
|
-
|
|
536
|
+
const flatNode = this._transformer(node, i, parent);
|
|
537
|
+
flattenedNodes.push(flatNode);
|
|
520
538
|
if (node.children) {
|
|
521
|
-
flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1));
|
|
539
|
+
flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1, flatNode));
|
|
522
540
|
}
|
|
523
541
|
}
|
|
524
542
|
return flattenedNodes;
|
|
525
543
|
}
|
|
544
|
+
_cloneTreeNodes(nodes) {
|
|
545
|
+
return nodes.map(node => ({
|
|
546
|
+
id: node.id,
|
|
547
|
+
name: node.name,
|
|
548
|
+
children: node.children ? this._cloneTreeNodes(node.children) : null
|
|
549
|
+
}));
|
|
550
|
+
}
|
|
551
|
+
_syncSelectedFlatNodeIds() {
|
|
552
|
+
// 同步选中节点 ID 缓存
|
|
553
|
+
this._selectedFlatNodeIds.clear();
|
|
554
|
+
this.checklistSelection.selected.forEach((node) => {
|
|
555
|
+
this._selectedFlatNodeIds.add(node.id);
|
|
556
|
+
});
|
|
557
|
+
this.checkCount = this._selectedFlatNodeIds.size;
|
|
558
|
+
}
|
|
526
559
|
_getDescendants(dataNode) {
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
|
|
560
|
+
// 收集当前节点的所有后代
|
|
561
|
+
const node = this.flatNodeMap.get(dataNode);
|
|
562
|
+
if (!node?.children?.length) {
|
|
563
|
+
return [];
|
|
564
|
+
}
|
|
565
|
+
const descendants = [];
|
|
566
|
+
const collect = (children) => {
|
|
567
|
+
for (const child of children) {
|
|
568
|
+
const flatNode = this.nestedNodeMap.get(child);
|
|
569
|
+
if (flatNode) {
|
|
570
|
+
descendants.push(flatNode);
|
|
571
|
+
}
|
|
572
|
+
if (child.children?.length) {
|
|
573
|
+
collect(child.children);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
collect(node.children);
|
|
578
|
+
return descendants;
|
|
533
579
|
}
|
|
534
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
535
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", canNull: "canNull", customTriggerLabelFn: "customTriggerLabelFn", customTriggerLabelTemplate: "customTriggerLabelTemplate", expandable: "expandable", showToggleAllCheckbox: "showToggleAllCheckbox", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (openedChange)=\"openedChange($event)\" (focusin)=\"onFocusIn()\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\r\n }\r\n @else{\r\n {{customTriggerLabelFn}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData | async ; track $index) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox class=\"text-current\" [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n@else {\r\n<mat-select #componentSelect [placeholder]=\"placeholder\"\r\n [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\r\n }\r\n @else{\r\n {{customTriggerLabelFn}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"false\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull&&treeDataSource.length!==0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData | async ; track $index) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
580
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
581
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", canNull: "canNull", customTriggerLabelFn: "customTriggerLabelFn", customTriggerLabelTemplate: "customTriggerLabelTemplate", expandable: "expandable", showToggleAllCheckbox: "showToggleAllCheckbox", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (openedChange)=\"openedChange($event)\" (focusin)=\"onFocusIn()\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData; track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox class=\"text-current\" [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n@else {\r\n<mat-select #componentSelect [placeholder]=\"placeholder\"\r\n [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"false\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull&&treeDataSource.length!==0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData; track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
536
582
|
}
|
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
|
|
538
584
|
type: Component,
|
|
539
585
|
args: [{ selector: 'cmat-select-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], exportAs: 'cmatSelectTree', imports: [MatIconModule, MatSelectModule, CmatSelectSearchComponent,
|
|
540
|
-
ReactiveFormsModule, MatTreeModule, NgClass, MatButtonModule, MatCheckboxModule
|
|
586
|
+
ReactiveFormsModule, MatTreeModule, NgClass, MatButtonModule, MatCheckboxModule], template: "@if(multiple){\r\n<mat-select #componentSelect multiple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (openedChange)=\"openedChange($event)\" (focusin)=\"onFocusIn()\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData; track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox class=\"text-current\" [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n@else {\r\n<mat-select #componentSelect [placeholder]=\"placeholder\"\r\n [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled) {\r\n <mat-option>\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n [showToggleAllCheckbox]=\"false\" (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull&&treeDataSource.length!==0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData; track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\r\n }\r\n\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"] }]
|
|
541
587
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
542
588
|
type: HostBinding,
|
|
543
589
|
args: ['attr.id']
|