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
|
@@ -5,21 +5,21 @@ import { PortalModule } from '@angular/cdk/portal';
|
|
|
5
5
|
import * as i3 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Injectable, inject, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, ChangeDetectorRef, EventEmitter, Output } from '@angular/core';
|
|
8
|
+
import { signal, Injectable, inject, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, ChangeDetectorRef, DestroyRef, EventEmitter, Output } from '@angular/core';
|
|
9
9
|
import * as i5 from '@angular/material/button';
|
|
10
10
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
11
|
import * as i1 from '@angular/material/button-toggle';
|
|
12
12
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
13
13
|
import * as i2 from '@angular/material/icon';
|
|
14
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
15
|
-
import {
|
|
15
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
16
16
|
import * as i3$1 from '@angular/forms';
|
|
17
17
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
18
18
|
import * as i1$1 from '@angular/material/form-field';
|
|
19
19
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
20
20
|
import * as i5$1 from '@angular/material/input';
|
|
21
21
|
import { MatInputModule } from '@angular/material/input';
|
|
22
|
-
import { debounceTime, distinctUntilChanged,
|
|
22
|
+
import { debounceTime, distinctUntilChanged, filter } from 'rxjs/operators';
|
|
23
23
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
24
24
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
25
25
|
import * as i1$2 from '@angular/material/card';
|
|
@@ -28,16 +28,22 @@ import * as i3$2 from '@angular/material/checkbox';
|
|
|
28
28
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
29
29
|
import * as i2$1 from '@angular/material/tree';
|
|
30
30
|
import { MatTreeModule } from '@angular/material/tree';
|
|
31
|
+
import { of } from 'rxjs';
|
|
31
32
|
import * as i2$2 from '@angular/material/list';
|
|
32
33
|
import { MatListModule } from '@angular/material/list';
|
|
33
34
|
|
|
34
35
|
class CmatTransferPickerService {
|
|
35
36
|
constructor() {
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
37
|
+
this._dataSourceChange = signal([], ...(ngDevMode ? [{ debugName: "_dataSourceChange" }] : /* istanbul ignore next */ []));
|
|
38
|
+
this._refreshDataSourceChange = signal(true, ...(ngDevMode ? [{ debugName: "_refreshDataSourceChange" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this._filtersChange = signal([], ...(ngDevMode ? [{ debugName: "_filtersChange" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this._sourceOptionsChange = signal(void 0, ...(ngDevMode ? [{ debugName: "_sourceOptionsChange" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this._selectedValuesChange = signal([], ...(ngDevMode ? [{ debugName: "_selectedValuesChange" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this._dataSourceChange$ = toObservable(this._dataSourceChange);
|
|
43
|
+
this._refreshDataSourceChange$ = toObservable(this._refreshDataSourceChange);
|
|
44
|
+
this._filtersChange$ = toObservable(this._filtersChange);
|
|
45
|
+
this._sourceOptionsChange$ = toObservable(this._sourceOptionsChange);
|
|
46
|
+
this._selectedValuesChange$ = toObservable(this._selectedValuesChange);
|
|
41
47
|
this._compareMap = new Map([
|
|
42
48
|
['0', (a, b) => a === b],
|
|
43
49
|
['1', (a, b) => a !== b],
|
|
@@ -59,6 +65,21 @@ class CmatTransferPickerService {
|
|
|
59
65
|
}).result],
|
|
60
66
|
]);
|
|
61
67
|
}
|
|
68
|
+
get dataSourceChange() {
|
|
69
|
+
return this._dataSourceChange$;
|
|
70
|
+
}
|
|
71
|
+
get refreshDataSourceChange() {
|
|
72
|
+
return this._refreshDataSourceChange$;
|
|
73
|
+
}
|
|
74
|
+
get filtersChange() {
|
|
75
|
+
return this._filtersChange$;
|
|
76
|
+
}
|
|
77
|
+
get sourceOptionsChange() {
|
|
78
|
+
return this._sourceOptionsChange$;
|
|
79
|
+
}
|
|
80
|
+
get selectedValuesChange() {
|
|
81
|
+
return this._selectedValuesChange$;
|
|
82
|
+
}
|
|
62
83
|
get dataSource() {
|
|
63
84
|
return this._dataSource;
|
|
64
85
|
}
|
|
@@ -67,13 +88,13 @@ class CmatTransferPickerService {
|
|
|
67
88
|
if (!this._originalDataSource) {
|
|
68
89
|
this._originalDataSource = JSON.parse(JSON.stringify(data));
|
|
69
90
|
}
|
|
70
|
-
this.
|
|
91
|
+
this._dataSourceChange.set(data);
|
|
71
92
|
}
|
|
72
93
|
set sourceOptions(value) {
|
|
73
|
-
this.
|
|
94
|
+
this._sourceOptionsChange.set(value);
|
|
74
95
|
}
|
|
75
96
|
set selectedValues(value) {
|
|
76
|
-
this.
|
|
97
|
+
this._selectedValuesChange.set(value);
|
|
77
98
|
}
|
|
78
99
|
filterDataSource({ filterData, keyword }) {
|
|
79
100
|
this._filterData = filterData ?? this._filterData;
|
|
@@ -108,7 +129,7 @@ class CmatTransferPickerService {
|
|
|
108
129
|
resetDataSource(clear) {
|
|
109
130
|
this.dataSource = this._originalDataSource;
|
|
110
131
|
this._filteredDataSource = [];
|
|
111
|
-
this.
|
|
132
|
+
this._refreshDataSourceChange.set(clear);
|
|
112
133
|
}
|
|
113
134
|
_filterDataSourceByType(dataSource, type) {
|
|
114
135
|
this._filteredDataSource = [];
|
|
@@ -121,7 +142,7 @@ class CmatTransferPickerService {
|
|
|
121
142
|
break;
|
|
122
143
|
}
|
|
123
144
|
this.dataSource = this._filteredDataSource;
|
|
124
|
-
this.
|
|
145
|
+
this._refreshDataSourceChange.set(false);
|
|
125
146
|
}
|
|
126
147
|
_setFilteredDataSourceByFilters(dataSource) {
|
|
127
148
|
dataSource.map((data) => {
|
|
@@ -155,10 +176,10 @@ class CmatTransferPickerService {
|
|
|
155
176
|
}
|
|
156
177
|
});
|
|
157
178
|
}
|
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
159
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
180
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerService, providedIn: 'root' }); }
|
|
160
181
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerService, decorators: [{
|
|
162
183
|
type: Injectable,
|
|
163
184
|
args: [{
|
|
164
185
|
providedIn: 'root'
|
|
@@ -225,10 +246,10 @@ class CmatTransferPickerFilterComponent {
|
|
|
225
246
|
changeFilterData() {
|
|
226
247
|
this._service.filterDataSource({ filterData: this.filterData });
|
|
227
248
|
}
|
|
228
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
229
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
250
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTransferPickerFilterComponent, isStandalone: true, selector: "cmat-transfer-picker-filter", inputs: { filters: "filters" }, viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }], exportAs: ["cmatTransferPickerFilter"], ngImport: i0, template: "<button type=\"button\" class=\"mr-2 mt-1\" matIconButton cdk-overlay-origin (click)=\"toggleFilter()\">\r\n <mat-icon svgIcon=\"mat_outline:filter_list\"></mat-icon>\r\n</button>\r\n<ng-template #filterTemplate=\"cdkPortal\" cdkPortal>\r\n <div\r\n class=\"transfer-picker-filter-panel bg-card flex flex-col flex-nowrap place-content-start box-border items-start w-full shadow\">\r\n <mat-button-toggle-group name=\"condition\" [hideSingleSelectionIndicator]=\"true\" (change)=\"onConditionChange($event.value)\">\r\n <mat-button-toggle value=\"or\" [checked]=\"filterData.condition === 'or'\">\u6216</mat-button-toggle>\r\n <mat-button-toggle value=\"and\" [checked]=\"filterData.condition === 'and'\">\u4E14</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n\r\n <div class=\"chip-list\">\r\n @for (item of filters; track $index) {\r\n <div class=\"chip-wrapper\" role=\"presentation\"\r\n (click)=\"onFilterClick(item)\">\r\n <span class=\"chip\" [ngClass]=\"{selected: item?.selected}\">{{item.label}}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".transfer-picker-filter-panel{min-width:276px;padding:10px 0;border-width:1px}.transfer-picker-filter-panel .mat-button-toggle-group{font-size:12px;margin-right:15px;margin-bottom:20px;align-self:flex-end}.transfer-picker-filter-panel .mat-button-toggle-group .mat-button-toggle-label-content{line-height:1.8}.transfer-picker-filter-panel .chip-list{width:276px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;box-sizing:border-box}.transfer-picker-filter-panel .chip-list:after{content:\"\";flex:1 1 0%;max-width:33.333333%}.transfer-picker-filter-panel .chip-list .chip-wrapper{flex:1 1 0%;box-sizing:border-box;max-width:33.333333%;text-align:center;margin-bottom:20px}.transfer-picker-filter-panel .chip-list .chip-wrapper .chip{display:inline-block;min-width:50%;cursor:pointer;padding:5px 10px;font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { 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: OverlayModule }, { kind: "directive", type: i6.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
230
251
|
}
|
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerFilterComponent, decorators: [{
|
|
232
253
|
type: Component,
|
|
233
254
|
args: [{ selector: 'cmat-transfer-picker-filter', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerFilter', imports: [MatButtonToggleModule, MatIconModule, CommonModule, PortalModule, MatButtonModule, OverlayModule], template: "<button type=\"button\" class=\"mr-2 mt-1\" matIconButton cdk-overlay-origin (click)=\"toggleFilter()\">\r\n <mat-icon svgIcon=\"mat_outline:filter_list\"></mat-icon>\r\n</button>\r\n<ng-template #filterTemplate=\"cdkPortal\" cdkPortal>\r\n <div\r\n class=\"transfer-picker-filter-panel bg-card flex flex-col flex-nowrap place-content-start box-border items-start w-full shadow\">\r\n <mat-button-toggle-group name=\"condition\" [hideSingleSelectionIndicator]=\"true\" (change)=\"onConditionChange($event.value)\">\r\n <mat-button-toggle value=\"or\" [checked]=\"filterData.condition === 'or'\">\u6216</mat-button-toggle>\r\n <mat-button-toggle value=\"and\" [checked]=\"filterData.condition === 'and'\">\u4E14</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n\r\n <div class=\"chip-list\">\r\n @for (item of filters; track $index) {\r\n <div class=\"chip-wrapper\" role=\"presentation\"\r\n (click)=\"onFilterClick(item)\">\r\n <span class=\"chip\" [ngClass]=\"{selected: item?.selected}\">{{item.label}}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".transfer-picker-filter-panel{min-width:276px;padding:10px 0;border-width:1px}.transfer-picker-filter-panel .mat-button-toggle-group{font-size:12px;margin-right:15px;margin-bottom:20px;align-self:flex-end}.transfer-picker-filter-panel .mat-button-toggle-group .mat-button-toggle-label-content{line-height:1.8}.transfer-picker-filter-panel .chip-list{width:276px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;box-sizing:border-box}.transfer-picker-filter-panel .chip-list:after{content:\"\";flex:1 1 0%;max-width:33.333333%}.transfer-picker-filter-panel .chip-list .chip-wrapper{flex:1 1 0%;box-sizing:border-box;max-width:33.333333%;text-align:center;margin-bottom:20px}.transfer-picker-filter-panel .chip-list .chip-wrapper .chip{display:inline-block;min-width:50%;cursor:pointer;padding:5px 10px;font-size:12px}\n"] }]
|
|
234
255
|
}], ctorParameters: () => [], propDecorators: { filters: [{
|
|
@@ -255,10 +276,10 @@ class CmatTransferPickerSearchComponent {
|
|
|
255
276
|
reset() {
|
|
256
277
|
this.keyword.setValue('');
|
|
257
278
|
}
|
|
258
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
259
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
280
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTransferPickerSearchComponent, isStandalone: true, selector: "cmat-transfer-picker-search", inputs: { searchPlaceholder: "searchPlaceholder" }, exportAs: ["cmatTransferPickerSearch"], ngImport: i0, template: "<mat-form-field>\r\n <input placeholder=\"{{searchPlaceholder}}\" matInput type=\"text\" [formControl]=\"keyword\">\r\n @if (keyword.value) {\r\n <button type=\"button\" matSuffix matIconButton (click)=\"reset()\">\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n </button>\r\n }\r\n</mat-form-field>", styles: ["cmat-transfer-picker-search{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}cmat-transfer-picker-search .mat-mdc-form-field{width:88%}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: MatInputModule }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
260
281
|
}
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerSearchComponent, decorators: [{
|
|
262
283
|
type: Component,
|
|
263
284
|
args: [{ selector: 'cmat-transfer-picker-search', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerSearch', imports: [MatFormFieldModule, MatIconModule, ReactiveFormsModule, MatButtonModule, MatInputModule], template: "<mat-form-field>\r\n <input placeholder=\"{{searchPlaceholder}}\" matInput type=\"text\" [formControl]=\"keyword\">\r\n @if (keyword.value) {\r\n <button type=\"button\" matSuffix matIconButton (click)=\"reset()\">\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n </button>\r\n }\r\n</mat-form-field>", styles: ["cmat-transfer-picker-search{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}cmat-transfer-picker-search .mat-mdc-form-field{width:88%}\n"] }]
|
|
264
285
|
}], ctorParameters: () => [], propDecorators: { searchPlaceholder: [{
|
|
@@ -266,12 +287,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
266
287
|
}] } });
|
|
267
288
|
|
|
268
289
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
269
|
-
/**
|
|
270
|
-
* Node for Transfer item
|
|
271
|
-
*/
|
|
272
290
|
class CmatTransferItemNode {
|
|
273
291
|
}
|
|
274
|
-
/** Flat Transfer item node with expandable and level information */
|
|
275
292
|
class CmatTransferItemFlatNode {
|
|
276
293
|
}
|
|
277
294
|
var CmatTransferFilterCondition;
|
|
@@ -284,21 +301,27 @@ var CmatTransferFilterCondition;
|
|
|
284
301
|
|
|
285
302
|
class CmatTransferPickerSourceComponent {
|
|
286
303
|
constructor() {
|
|
287
|
-
/** Map from nested node to flattened node. This helps us to keep the same object for selection */
|
|
288
304
|
this.nestedNodeMap = new Map();
|
|
289
|
-
|
|
305
|
+
this.dataSource = [];
|
|
306
|
+
this.dataFlatNodes = [];
|
|
290
307
|
this.checklistSelection = new SelectionModel(true /* multiple */);
|
|
308
|
+
this.options = {
|
|
309
|
+
title: '',
|
|
310
|
+
filterable: false,
|
|
311
|
+
searchable: false,
|
|
312
|
+
searchPlaceholder: '',
|
|
313
|
+
filters: []
|
|
314
|
+
};
|
|
315
|
+
this.selectedList = [];
|
|
316
|
+
this._flatNodeByValue = new Map();
|
|
291
317
|
this._service = inject(CmatTransferPickerService);
|
|
292
318
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
293
|
-
this.
|
|
319
|
+
this._destroyRef = inject(DestroyRef);
|
|
294
320
|
this.childrenAccessor = (node) => node.children ?? [];
|
|
295
321
|
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
296
322
|
this._getLevel = (node) => node.level;
|
|
297
323
|
this._isExpandable = (node) => node.expandable;
|
|
298
324
|
this._getChildren = (node) => of(node.children ?? []);
|
|
299
|
-
/**
|
|
300
|
-
* Transformer to convert nested node to flat node. Record the nodes in maps for later use.
|
|
301
|
-
*/
|
|
302
325
|
this._transformer = (node, level) => {
|
|
303
326
|
const flatNode = this.nestedNodeMap.has(node) && this.nestedNodeMap.get(node)?.value === node.value
|
|
304
327
|
? this.nestedNodeMap.get(node)
|
|
@@ -309,114 +332,113 @@ class CmatTransferPickerSourceComponent {
|
|
|
309
332
|
flatNode.level = level;
|
|
310
333
|
flatNode.expandable = !!node.children;
|
|
311
334
|
this.nestedNodeMap.set(node, flatNode);
|
|
335
|
+
this._flatNodeByValue.set(node.value, flatNode);
|
|
312
336
|
return flatNode;
|
|
313
337
|
};
|
|
314
338
|
}
|
|
315
339
|
ngOnInit() {
|
|
340
|
+
// 监听数据源变化并重建平铺节点
|
|
316
341
|
this._service
|
|
317
342
|
.dataSourceChange
|
|
318
|
-
.pipe(
|
|
343
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
319
344
|
.subscribe((data) => {
|
|
320
345
|
this.dataSource = data;
|
|
346
|
+
this._flatNodeByValue.clear();
|
|
321
347
|
this.dataFlatNodes = this._getFlattenNodes(this.dataSource);
|
|
322
348
|
this._changeDetectorRef.markForCheck();
|
|
323
349
|
});
|
|
324
|
-
this._service.refreshDataSourceChange.pipe(
|
|
350
|
+
this._service.refreshDataSourceChange.pipe(takeUntilDestroyed(this._destroyRef))
|
|
325
351
|
.subscribe((state) => {
|
|
352
|
+
// 刷新时按状态重置或恢复选择
|
|
326
353
|
if (state) {
|
|
327
354
|
this.checklistSelection.clear();
|
|
328
355
|
this._changeDetectorRef.markForCheck();
|
|
329
356
|
}
|
|
330
357
|
else {
|
|
331
|
-
this.checklistSelection.selected
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
}
|
|
358
|
+
const selectedNodes = [...this.checklistSelection.selected];
|
|
359
|
+
for (const selectedNode of selectedNodes) {
|
|
360
|
+
const matchedNode = this._flatNodeByValue.get(selectedNode.value);
|
|
361
|
+
if (matchedNode) {
|
|
362
|
+
this.checklistSelection.deselect(selectedNode);
|
|
363
|
+
this.checklistSelection.select(matchedNode);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
339
366
|
this.getSelectedList();
|
|
340
367
|
}
|
|
341
368
|
});
|
|
342
369
|
this._service
|
|
343
370
|
.selectedValuesChange
|
|
344
|
-
.pipe(filter((values) => !!values.length),
|
|
371
|
+
.pipe(filter((values) => !!values.length), takeUntilDestroyed(this._destroyRef))
|
|
345
372
|
.subscribe((values) => {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
}
|
|
373
|
+
// 根据外部值同步选中节点
|
|
374
|
+
for (const value of values) {
|
|
375
|
+
const node = this._flatNodeByValue.get(value);
|
|
376
|
+
if (node) {
|
|
377
|
+
this.checklistSelection.select(node);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
353
380
|
this._changeDetectorRef.markForCheck();
|
|
354
381
|
});
|
|
355
382
|
this._service
|
|
356
383
|
.sourceOptionsChange
|
|
357
|
-
.pipe(
|
|
384
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
358
385
|
.subscribe((options) => { if (options)
|
|
359
386
|
this.options = options; this._changeDetectorRef.markForCheck(); });
|
|
360
387
|
}
|
|
361
388
|
ngAfterViewInit() {
|
|
389
|
+
// 初始化时展开整棵树
|
|
362
390
|
this.tree.expandAll();
|
|
363
391
|
}
|
|
364
|
-
ngOnDestroy() {
|
|
365
|
-
this._unsubscribeAll.next(void (0));
|
|
366
|
-
this._unsubscribeAll.complete();
|
|
367
|
-
}
|
|
368
392
|
getSelectedList() {
|
|
393
|
+
// 同步并返回当前选中列表
|
|
369
394
|
this.selectedList = this.checklistSelection.selected;
|
|
370
395
|
if (this.selectedList.length) {
|
|
371
|
-
this.selectedList
|
|
372
|
-
/* 禁用 */
|
|
396
|
+
for (const item of this.selectedList) {
|
|
373
397
|
item.disabled = true;
|
|
374
|
-
/* 选中 */
|
|
375
398
|
this.checklistSelection.select(item);
|
|
376
|
-
}
|
|
399
|
+
}
|
|
377
400
|
}
|
|
378
401
|
this._changeDetectorRef.markForCheck();
|
|
379
402
|
return this.selectedList;
|
|
380
403
|
}
|
|
381
404
|
resetSelectedItem(item) {
|
|
382
|
-
|
|
405
|
+
// 取消单个节点的禁用与选中状态
|
|
406
|
+
const s = this._flatNodeByValue.get(item.value) ?? this.checklistSelection.selected.find(i => i.value === item.value);
|
|
383
407
|
if (s) {
|
|
384
|
-
/* 取消禁用 */
|
|
385
408
|
s.disabled = false;
|
|
386
|
-
/* 取消选中 */
|
|
387
409
|
this.checklistSelection.deselect(s);
|
|
388
410
|
this._changeDetectorRef.markForCheck();
|
|
389
411
|
}
|
|
390
412
|
}
|
|
391
|
-
/** Whether all the descendants of the node are selected */
|
|
392
413
|
descendantsAllSelected(node) {
|
|
414
|
+
// 判断后代是否全部选中
|
|
393
415
|
const descendants = this._getDescendants(node);
|
|
394
416
|
return descendants.every(child => this.checklistSelection.isSelected(child));
|
|
395
417
|
}
|
|
396
|
-
/** Whether part of the descendants are selected */
|
|
397
418
|
descendantsPartiallySelected(node) {
|
|
419
|
+
// 判断后代是否部分选中
|
|
398
420
|
const descendants = this._getDescendants(node);
|
|
399
421
|
const result = descendants.some(child => this.checklistSelection.isSelected(child));
|
|
400
422
|
return result && !this.descendantsAllSelected(node);
|
|
401
423
|
}
|
|
402
|
-
/** Toggle the transfer item selection. Select/deselect all the descendants node */
|
|
403
424
|
transferItemSelectionToggle(node) {
|
|
425
|
+
// 切换分支节点选择状态
|
|
404
426
|
this.checklistSelection.toggle(node);
|
|
405
427
|
let descendants = this._getDescendants(node);
|
|
406
428
|
descendants = descendants.filter(n => !n.disabled);
|
|
407
429
|
this.checklistSelection.isSelected(node)
|
|
408
430
|
? this.checklistSelection.select(...descendants)
|
|
409
431
|
: this.checklistSelection.deselect(...descendants);
|
|
410
|
-
// Force update for the parent
|
|
411
432
|
descendants.every(child => this.checklistSelection.isSelected(child));
|
|
412
433
|
this._checkAllParentsSelection(node);
|
|
413
434
|
}
|
|
414
|
-
/** Toggle a leaf transfer item selection. Check all the parents to see if they changed */
|
|
415
435
|
transferLeafItemSelectionToggle(node) {
|
|
436
|
+
// 切换叶子节点选择状态
|
|
416
437
|
this.checklistSelection.toggle(node);
|
|
417
438
|
this._checkAllParentsSelection(node);
|
|
418
439
|
}
|
|
419
440
|
_getDescendants(dataNode) {
|
|
441
|
+
// 收集当前节点的所有后代节点
|
|
420
442
|
const startIndex = this.dataFlatNodes.findIndex(j => j === dataNode);
|
|
421
443
|
const results = [];
|
|
422
444
|
for (let i = startIndex + 1; i < this.dataFlatNodes.length && this._getLevel(dataNode) < this._getLevel(this.dataFlatNodes[i]); i++) {
|
|
@@ -425,6 +447,7 @@ class CmatTransferPickerSourceComponent {
|
|
|
425
447
|
return results;
|
|
426
448
|
}
|
|
427
449
|
_getFlattenNodes(nodes, i = 0) {
|
|
450
|
+
// 将树结构转换为平铺节点
|
|
428
451
|
const flattenedNodes = [];
|
|
429
452
|
for (const node of nodes) {
|
|
430
453
|
flattenedNodes.push(this._transformer(node, i));
|
|
@@ -434,16 +457,16 @@ class CmatTransferPickerSourceComponent {
|
|
|
434
457
|
}
|
|
435
458
|
return flattenedNodes;
|
|
436
459
|
}
|
|
437
|
-
/* Checks all the parents when a leaf node is selected/unselected */
|
|
438
460
|
_checkAllParentsSelection(node) {
|
|
461
|
+
// 逐级回溯父节点并更新选择状态
|
|
439
462
|
let parent = this._getParentNode(node);
|
|
440
463
|
while (parent) {
|
|
441
464
|
this._checkRootNodeSelection(parent);
|
|
442
465
|
parent = this._getParentNode(parent);
|
|
443
466
|
}
|
|
444
467
|
}
|
|
445
|
-
/** Check root node checked state and change it accordingly */
|
|
446
468
|
_checkRootNodeSelection(node) {
|
|
469
|
+
// 根据子节点状态更新当前节点
|
|
447
470
|
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
448
471
|
const descendants = this._getDescendants(node);
|
|
449
472
|
const descAllSelected = descendants.every(child => this.checklistSelection.isSelected(child));
|
|
@@ -454,8 +477,8 @@ class CmatTransferPickerSourceComponent {
|
|
|
454
477
|
this.checklistSelection.select(node);
|
|
455
478
|
}
|
|
456
479
|
}
|
|
457
|
-
/* Get the parent node of a node */
|
|
458
480
|
_getParentNode(node) {
|
|
481
|
+
// 获取当前节点的父节点
|
|
459
482
|
const currentLevel = this._getLevel(node);
|
|
460
483
|
if (currentLevel < 1) {
|
|
461
484
|
return null;
|
|
@@ -469,13 +492,13 @@ class CmatTransferPickerSourceComponent {
|
|
|
469
492
|
}
|
|
470
493
|
return null;
|
|
471
494
|
}
|
|
472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
473
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerSourceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTransferPickerSourceComponent, isStandalone: true, selector: "cmat-transfer-picker-source", viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true }], exportAs: ["cmatTransferPickerSource"], ngImport: i0, template: "<mat-card class=\"transfer-picker-source shadow\">\r\n <mat-card-header class=\"pb-3 items-center\">\r\n <mat-card-title class=\"transfer-picker-source-title\">{{options?.title}}</mat-card-title>\r\n @if (options?.filterable) {\r\n <cmat-transfer-picker-filter\r\n [filters]=\"options?.filters\"></cmat-transfer-picker-filter>\r\n }\r\n </mat-card-header>\r\n <mat-card-content class=\"transfer-picker-source-content\">\r\n @if (options?.searchable) {\r\n <cmat-transfer-picker-search\r\n [searchPlaceholder]=\"options?.searchPlaceholder\"></cmat-transfer-picker-search>\r\n }\r\n\r\n <cdk-virtual-scroll-viewport itemSize=\"48\"\r\n class=\"transfer-picker-source-scroll-wrapper overflow-y-auto scrollbar-custom\">\r\n <mat-tree #componentTree [dataSource]=\"dataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" [matTreeNodePadding]=\"nestedNodeMap.get(node)?.level\">\r\n <button type=\"button\" matIconButton disabled> </button>\r\n <mat-checkbox class=\"checklist-leaf-node\" [checked]=\"checklistSelection.isSelected(nestedNodeMap.get(node)!)\"\r\n [disabled]=\"nestedNodeMap.get(node)?.disabled\" (change)=\"transferLeafItemSelectionToggle(nestedNodeMap.get(node)!);\">\r\n {{node.label}}\r\n </mat-checkbox>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" [matTreeNodePadding]=\"nestedNodeMap.get(node)?.level\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle>\r\n <mat-icon svgIcon=\"{{componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'}}\"\r\n class=\"mat-icon-rtl-mirror\">\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)||nestedNodeMap.get(node)?.disabled\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\" [disabled]=\"nestedNodeMap.get(node)?.disabled\"\r\n (change)=\"transferItemSelectionToggle(nestedNodeMap.get(node)!)\">\r\n {{node.label}}\r\n </mat-checkbox>\r\n </mat-tree-node>\r\n </mat-tree>\r\n @if (!dataSource.length) {\r\n <div class=\"transfer-picker-source-empty\">\u6682\u65E0\u6570\u636E</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n", styles: [".transfer-picker-source{width:276px;height:100%;padding:0}.transfer-picker-source .mat-mdc-card-header{display:flex;flex-direction:row;flex-wrap:nowrap;box-sizing:border-box;place-content:space-between;align-items:flex-start;margin-bottom:-8px}.transfer-picker-source-title{font-size:1rem;margin-bottom:0}.transfer-picker-source-scroll-wrapper{height:300px}.transfer-picker-source-empty{text-align:center;font-size:1rem;margin-top:20px;color:#00000040}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i2$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i2$1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i2$1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i2$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i2$1.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$2.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: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: CmatTransferPickerFilterComponent, selector: "cmat-transfer-picker-filter", inputs: ["filters"], exportAs: ["cmatTransferPickerFilter"] }, { kind: "component", type: CmatTransferPickerSearchComponent, selector: "cmat-transfer-picker-search", inputs: ["searchPlaceholder"], exportAs: ["cmatTransferPickerSearch"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i6.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "component", type: i6.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
474
497
|
}
|
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerSourceComponent, decorators: [{
|
|
476
499
|
type: Component,
|
|
477
500
|
args: [{ selector: 'cmat-transfer-picker-source', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerSource', imports: [MatCardModule, MatTreeModule, MatCheckboxModule, MatIconModule, MatButtonModule,
|
|
478
|
-
CmatTransferPickerFilterComponent, CmatTransferPickerSearchComponent, ScrollingModule], template: "<mat-card class=\"transfer-picker-source shadow\">\r\n <mat-card-header class=\"pb-3 items-center\">\r\n <mat-card-title class=\"transfer-picker-source-title\">{{options
|
|
501
|
+
CmatTransferPickerFilterComponent, CmatTransferPickerSearchComponent, ScrollingModule], template: "<mat-card class=\"transfer-picker-source shadow\">\r\n <mat-card-header class=\"pb-3 items-center\">\r\n <mat-card-title class=\"transfer-picker-source-title\">{{options?.title}}</mat-card-title>\r\n @if (options?.filterable) {\r\n <cmat-transfer-picker-filter\r\n [filters]=\"options?.filters\"></cmat-transfer-picker-filter>\r\n }\r\n </mat-card-header>\r\n <mat-card-content class=\"transfer-picker-source-content\">\r\n @if (options?.searchable) {\r\n <cmat-transfer-picker-search\r\n [searchPlaceholder]=\"options?.searchPlaceholder\"></cmat-transfer-picker-search>\r\n }\r\n\r\n <cdk-virtual-scroll-viewport itemSize=\"48\"\r\n class=\"transfer-picker-source-scroll-wrapper overflow-y-auto scrollbar-custom\">\r\n <mat-tree #componentTree [dataSource]=\"dataSource\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" [matTreeNodePadding]=\"nestedNodeMap.get(node)?.level\">\r\n <button type=\"button\" matIconButton disabled> </button>\r\n <mat-checkbox class=\"checklist-leaf-node\" [checked]=\"checklistSelection.isSelected(nestedNodeMap.get(node)!)\"\r\n [disabled]=\"nestedNodeMap.get(node)?.disabled\" (change)=\"transferLeafItemSelectionToggle(nestedNodeMap.get(node)!);\">\r\n {{node.label}}\r\n </mat-checkbox>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" [matTreeNodePadding]=\"nestedNodeMap.get(node)?.level\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle>\r\n <mat-icon svgIcon=\"{{componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'}}\"\r\n class=\"mat-icon-rtl-mirror\">\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)||nestedNodeMap.get(node)?.disabled\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\" [disabled]=\"nestedNodeMap.get(node)?.disabled\"\r\n (change)=\"transferItemSelectionToggle(nestedNodeMap.get(node)!)\">\r\n {{node.label}}\r\n </mat-checkbox>\r\n </mat-tree-node>\r\n </mat-tree>\r\n @if (!dataSource.length) {\r\n <div class=\"transfer-picker-source-empty\">\u6682\u65E0\u6570\u636E</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n", styles: [".transfer-picker-source{width:276px;height:100%;padding:0}.transfer-picker-source .mat-mdc-card-header{display:flex;flex-direction:row;flex-wrap:nowrap;box-sizing:border-box;place-content:space-between;align-items:flex-start;margin-bottom:-8px}.transfer-picker-source-title{font-size:1rem;margin-bottom:0}.transfer-picker-source-scroll-wrapper{height:300px}.transfer-picker-source-empty{text-align:center;font-size:1rem;margin-top:20px;color:#00000040}\n"] }]
|
|
479
502
|
}], propDecorators: { tree: [{
|
|
480
503
|
type: ViewChild,
|
|
481
504
|
args: ['componentTree', { static: false }]
|
|
@@ -489,10 +512,10 @@ class CmatTransferPickerTargetComponent {
|
|
|
489
512
|
this.selectedList.splice(this.selectedList.findIndex(j => j === item), 1);
|
|
490
513
|
this.clearItemChange.emit(item);
|
|
491
514
|
}
|
|
492
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
493
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
515
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerTargetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
516
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTransferPickerTargetComponent, isStandalone: true, selector: "cmat-transfer-picker-target", inputs: { selectedList: "selectedList" }, outputs: { clearItemChange: "clearItemChange" }, exportAs: ["cmatTransferPickerTarget"], ngImport: i0, template: "<mat-card class=\"transfer-picker-target shadow\">\r\n <mat-card-header class=\"pb-3 items-center\">\r\n <mat-card-title class=\"transfer-picker-target-title\">\u5DF2\u9009\u62E9 {{selectedList.length}} \u9879</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <cdk-virtual-scroll-viewport itemSize=\"40\"\r\n class=\"transfer-picker-target-scroll-wrapper overflow-y-auto scrollbar-custom\">\r\n <mat-list dense>\r\n @for (item of selectedList; track $index) {\r\n <mat-list-item class=\"transfer-picker-target-item\">\r\n <div mat-line class=\"flex flex-row items-center\">\r\n <div class=\"flex-1\">{{item.label}}</div>\r\n <button type=\"button\" matIconButton (click)=\"clearItem(item)\">\r\n <mat-icon svgIcon=\"heroicons_solid:x-circle\"></mat-icon>\r\n </button>\r\n </div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n @if (!selectedList.length) {\r\n <div class=\"transfer-picker-target-empty\">\u6682\u65E0\u6570\u636E</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>", styles: [".transfer-picker-target{height:100%;padding:0;width:276px}.transfer-picker-target .mat-mdc-card-header{margin-bottom:-8px}.transfer-picker-target-title{font-size:1rem;margin-bottom:0;padding:12px 0}.transfer-picker-target-item{width:100%}.transfer-picker-target-scroll-wrapper{height:356px}.transfer-picker-target-empty{text-align:center;margin-top:20px;color:#00000040}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$2.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i6.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "component", type: i6.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
494
517
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerTargetComponent, decorators: [{
|
|
496
519
|
type: Component,
|
|
497
520
|
args: [{ selector: 'cmat-transfer-picker-target', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerTarget', imports: [MatCardModule, MatListModule, MatIconModule, ScrollingModule, MatButtonModule], template: "<mat-card class=\"transfer-picker-target shadow\">\r\n <mat-card-header class=\"pb-3 items-center\">\r\n <mat-card-title class=\"transfer-picker-target-title\">\u5DF2\u9009\u62E9 {{selectedList.length}} \u9879</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <cdk-virtual-scroll-viewport itemSize=\"40\"\r\n class=\"transfer-picker-target-scroll-wrapper overflow-y-auto scrollbar-custom\">\r\n <mat-list dense>\r\n @for (item of selectedList; track $index) {\r\n <mat-list-item class=\"transfer-picker-target-item\">\r\n <div mat-line class=\"flex flex-row items-center\">\r\n <div class=\"flex-1\">{{item.label}}</div>\r\n <button type=\"button\" matIconButton (click)=\"clearItem(item)\">\r\n <mat-icon svgIcon=\"heroicons_solid:x-circle\"></mat-icon>\r\n </button>\r\n </div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n @if (!selectedList.length) {\r\n <div class=\"transfer-picker-target-empty\">\u6682\u65E0\u6570\u636E</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>", styles: [".transfer-picker-target{height:100%;padding:0;width:276px}.transfer-picker-target .mat-mdc-card-header{margin-bottom:-8px}.transfer-picker-target-title{font-size:1rem;margin-bottom:0;padding:12px 0}.transfer-picker-target-item{width:100%}.transfer-picker-target-scroll-wrapper{height:356px}.transfer-picker-target-empty{text-align:center;margin-top:20px;color:#00000040}\n"] }]
|
|
498
521
|
}], ctorParameters: () => [], propDecorators: { selectedList: [{
|
|
@@ -549,10 +572,10 @@ class CmatTransferPickerComponent {
|
|
|
549
572
|
this.selectChange.emit(this.selectedList);
|
|
550
573
|
this._changeDetectorRef.detectChanges();
|
|
551
574
|
}
|
|
552
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
553
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
575
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
576
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatTransferPickerComponent, isStandalone: true, selector: "cmat-transfer-picker", inputs: { title: "title", filterable: "filterable", searchable: "searchable", searchPlaceholder: "searchPlaceholder", dataSource: "dataSource", filters: "filters", selectedValues: "selectedValues" }, outputs: { selectChange: "selectChange" }, viewQueries: [{ propertyName: "source", first: true, predicate: CmatTransferPickerSourceComponent, descendants: true, static: true }], exportAs: ["cmatTransferPicker"], ngImport: i0, template: "<cmat-transfer-picker-source></cmat-transfer-picker-source>\r\n<div class=\"cmat-transfer-picker-operation flex flex-col flex-nowrap gap-2 mx-2\">\r\n <button type=\"button\" class=\"pl-2\" matButton=\"filled\" color=\"primary\" (click)=\"pick()\">\r\n \u9009\u62E9<mat-icon svgIcon=\"mat_outline:chevron_right\"></mat-icon>\r\n </button>\r\n <button type=\"button\" class=\"pl-2\" matButton=\"filled\" color=\"primary\" (click)=\"reset()\">\r\n <mat-icon svgIcon=\"mat_outline:chevron_left\"></mat-icon>\u91CD\u7F6E\r\n </button>\r\n</div>\r\n<cmat-transfer-picker-target [selectedList]=\"selectedList\" (clearItemChange)=\"onClearItemChange($event)\">\r\n</cmat-transfer-picker-target>", styles: ["cmat-transfer-picker{height:100%;overflow:hidden;padding:1rem;display:flex;flex-wrap:nowrap;justify-items:center;align-items:center;gap:.5rem}cmat-transfer-picker cmat-transfer-picker-source,cmat-transfer-picker cmat-transfer-picker-target{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatTransferPickerSourceComponent, selector: "cmat-transfer-picker-source", exportAs: ["cmatTransferPickerSource"] }, { kind: "component", type: CmatTransferPickerTargetComponent, selector: "cmat-transfer-picker-target", inputs: ["selectedList"], outputs: ["clearItemChange"], exportAs: ["cmatTransferPickerTarget"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
554
577
|
}
|
|
555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTransferPickerComponent, decorators: [{
|
|
556
579
|
type: Component,
|
|
557
580
|
args: [{ selector: 'cmat-transfer-picker', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPicker', imports: [MatIconModule, MatButtonModule, CmatTransferPickerSourceComponent, CmatTransferPickerTargetComponent], template: "<cmat-transfer-picker-source></cmat-transfer-picker-source>\r\n<div class=\"cmat-transfer-picker-operation flex flex-col flex-nowrap gap-2 mx-2\">\r\n <button type=\"button\" class=\"pl-2\" matButton=\"filled\" color=\"primary\" (click)=\"pick()\">\r\n \u9009\u62E9<mat-icon svgIcon=\"mat_outline:chevron_right\"></mat-icon>\r\n </button>\r\n <button type=\"button\" class=\"pl-2\" matButton=\"filled\" color=\"primary\" (click)=\"reset()\">\r\n <mat-icon svgIcon=\"mat_outline:chevron_left\"></mat-icon>\u91CD\u7F6E\r\n </button>\r\n</div>\r\n<cmat-transfer-picker-target [selectedList]=\"selectedList\" (clearItemChange)=\"onClearItemChange($event)\">\r\n</cmat-transfer-picker-target>", styles: ["cmat-transfer-picker{height:100%;overflow:hidden;padding:1rem;display:flex;flex-wrap:nowrap;justify-items:center;align-items:center;gap:.5rem}cmat-transfer-picker cmat-transfer-picker-source,cmat-transfer-picker cmat-transfer-picker-target{height:100%}\n"] }]
|
|
558
581
|
}], ctorParameters: () => [], propDecorators: { title: [{
|