cmat 0.0.87 → 0.0.88
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 -9
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +98 -80
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +26 -34
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +467 -556
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +270 -259
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +200 -116
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +85 -38
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +841 -0
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-custom-formly.mjs +1395 -838
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +996 -0
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-date-range.mjs +310 -264
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +16 -20
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +120 -137
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +17 -24
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +18 -24
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +30 -39
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +12 -12
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +10 -10
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +48 -41
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +104 -107
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +12 -15
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +118 -75
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +196 -178
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +26 -41
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +81 -80
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +1212 -1287
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +467 -450
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +143 -132
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +68 -83
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +18 -24
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +220 -136
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +262 -215
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +227 -195
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +15 -34
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +95 -88
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +70 -67
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +23 -26
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +190 -159
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +276 -213
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +178 -128
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +44 -28
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +107 -163
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +29 -36
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +14 -18
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +111 -118
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +65 -66
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +130 -160
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +32 -39
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +186 -176
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +25 -28
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +85 -92
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +49 -50
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +16 -19
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +60 -69
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +31 -30
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +7 -13
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +26 -27
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +14 -23
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +8 -8
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +6 -10
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +30 -47
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +43 -34
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +11 -11
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat.mjs +9228 -7507
- package/fesm2022/cmat.mjs.map +1 -1
- package/icons/material-icons/heroicons-outline.svg +3 -0
- package/icons/material-icons/heroicons-solid.svg +3 -0
- package/package.json +10 -1
- package/styles/components/bundle.scss +21 -0
- package/styles/overrides/angular-material.scss +22 -1
- package/tailwind/plugins/theming.js +183 -183
- package/types/cmat-components-breadcrumb.d.ts +40 -37
- package/types/cmat-components-card.d.ts +11 -13
- package/types/cmat-components-carousel.d.ts +87 -113
- package/types/cmat-components-cascade.d.ts +84 -65
- package/types/cmat-components-chip-input.d.ts +29 -24
- package/types/cmat-components-code-editor.d.ts +28 -12
- package/types/cmat-components-color-picker.d.ts +236 -0
- package/types/cmat-components-custom-formly.d.ts +316 -184
- package/types/cmat-components-data-picker.d.ts +372 -0
- package/types/cmat-components-date-range.d.ts +31 -36
- package/types/cmat-components-date-time-display.d.ts +8 -8
- package/types/cmat-components-drawer.d.ts +30 -32
- package/types/cmat-components-empty-state.d.ts +9 -10
- package/types/cmat-components-file-preview.d.ts +9 -9
- package/types/cmat-components-filter-toolbar.d.ts +15 -15
- package/types/cmat-components-form-actions.d.ts +5 -5
- package/types/cmat-components-fullscreen.d.ts +5 -5
- package/types/cmat-components-highlight.d.ts +13 -14
- package/types/cmat-components-image-viewer.d.ts +29 -33
- package/types/cmat-components-inline-loading.d.ts +6 -6
- package/types/cmat-components-json-editor.d.ts +15 -17
- package/types/cmat-components-knob-input.d.ts +58 -55
- package/types/cmat-components-masonry.d.ts +9 -12
- package/types/cmat-components-material-color-picker.d.ts +16 -21
- package/types/cmat-components-material-datetimepicker.d.ts +174 -216
- package/types/cmat-components-navigation.d.ts +34 -39
- package/types/cmat-components-opt-input.d.ts +35 -33
- package/types/cmat-components-org-chart.d.ts +8 -9
- package/types/cmat-components-page-header.d.ts +9 -9
- package/types/cmat-components-pagination.d.ts +36 -40
- package/types/cmat-components-password-strength.d.ts +58 -64
- package/types/cmat-components-popover.d.ts +22 -32
- package/types/cmat-components-progress-bar.d.ts +7 -10
- package/types/cmat-components-qrcode.d.ts +22 -22
- package/types/cmat-components-rating.d.ts +17 -19
- package/types/cmat-components-rich-text-editor.d.ts +11 -12
- package/types/cmat-components-select-search.d.ts +48 -36
- package/types/cmat-components-select-table.d.ts +38 -34
- package/types/cmat-components-select-tree.d.ts +17 -15
- package/types/cmat-components-skeleton.d.ts +27 -10
- package/types/cmat-components-speed-dial.d.ts +24 -33
- package/types/cmat-components-status-tag.d.ts +19 -9
- package/types/cmat-components-table-toolbar.d.ts +7 -7
- package/types/cmat-components-timeline.d.ts +33 -34
- package/types/cmat-components-toast.d.ts +26 -30
- package/types/cmat-components-transfer-picker.d.ts +51 -56
- package/types/cmat-components-treetable.d.ts +12 -13
- package/types/cmat-components-upload.d.ts +33 -38
- package/types/cmat-components-x6-angular-shape.d.ts +1 -1
- package/types/cmat-directives-animate-on-scroll.d.ts +7 -7
- package/types/cmat-directives-arrow-cursor.d.ts +18 -20
- package/types/cmat-directives-data-exporter.d.ts +10 -10
- package/types/cmat-directives-debounce.d.ts +5 -5
- package/types/cmat-directives-digit-only.d.ts +13 -13
- package/types/cmat-directives-seamless-auto-scroll.d.ts +7 -7
- package/types/cmat-pipes-secure.d.ts +1 -3
- package/types/cmat-services-alert.d.ts +11 -12
- package/types/cmat-services-config.d.ts +2 -7
- package/types/cmat-services-confirmation.d.ts +2 -2
- package/types/cmat-services-data.d.ts +0 -1
- package/types/cmat-services-loading.d.ts +14 -22
- package/types/cmat-services-media-watcher.d.ts +5 -5
- package/types/cmat-services-translation.d.ts +4 -5
- package/types/cmat.d.ts +2167 -1746
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import * as i6 from '@angular/cdk/overlay';
|
|
2
|
-
import { Overlay, OverlayConfig, OverlayModule
|
|
2
|
+
import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
3
3
|
import * as i4 from '@angular/cdk/portal';
|
|
4
4
|
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 { signal, Injectable,
|
|
8
|
+
import { signal, Injectable, input, viewChild, inject, ChangeDetectionStrategy, ViewEncapsulation, Component, computed, effect, untracked, output, Injector, afterNextRender } 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 { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
16
15
|
import * as i3$1 from '@angular/forms';
|
|
17
16
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
18
17
|
import * as i1$1 from '@angular/material/form-field';
|
|
19
18
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
20
19
|
import * as i5$1 from '@angular/material/input';
|
|
21
20
|
import { MatInputModule } from '@angular/material/input';
|
|
22
|
-
import { debounceTime, distinctUntilChanged
|
|
21
|
+
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
23
22
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
24
23
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
25
24
|
import * as i1$2 from '@angular/material/card';
|
|
@@ -32,19 +31,25 @@ import { of } from 'rxjs';
|
|
|
32
31
|
import * as i2$2 from '@angular/material/list';
|
|
33
32
|
import { MatListModule } from '@angular/material/list';
|
|
34
33
|
|
|
34
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
35
35
|
class CmatTransferPickerService {
|
|
36
36
|
constructor() {
|
|
37
|
-
this._dataSourceChange = signal([],
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
|
|
41
|
-
this.
|
|
37
|
+
this._dataSourceChange = signal([], /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "_dataSourceChange" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this._refreshDataSourceChange = signal({ clear: true, nonce: 0 }, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "_refreshDataSourceChange" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this._filtersChange = signal([], /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "_filtersChange" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this._sourceOptionsChange = signal(void 0, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "_sourceOptionsChange" }] : /* istanbul ignore next */ []));
|
|
45
|
+
this._selectedValuesChange = signal([], /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "_selectedValuesChange" }] : /* istanbul ignore next */ []));
|
|
42
47
|
this._refreshNonce = 0;
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
48
|
+
this.dataSourceChange = this._dataSourceChange.asReadonly();
|
|
49
|
+
this.refreshDataSourceChange = this._refreshDataSourceChange.asReadonly();
|
|
50
|
+
this.filtersChange = this._filtersChange.asReadonly();
|
|
51
|
+
this.sourceOptionsChange = this._sourceOptionsChange.asReadonly();
|
|
52
|
+
this.selectedValuesChange = this._selectedValuesChange.asReadonly();
|
|
48
53
|
this._compareMap = new Map([
|
|
49
54
|
['0', (a, b) => a === b],
|
|
50
55
|
['1', (a, b) => a !== b],
|
|
@@ -66,21 +71,6 @@ class CmatTransferPickerService {
|
|
|
66
71
|
}).result],
|
|
67
72
|
]);
|
|
68
73
|
}
|
|
69
|
-
get dataSourceChange() {
|
|
70
|
-
return this._dataSourceChange$;
|
|
71
|
-
}
|
|
72
|
-
get refreshDataSourceChange() {
|
|
73
|
-
return this._refreshDataSourceChange$;
|
|
74
|
-
}
|
|
75
|
-
get filtersChange() {
|
|
76
|
-
return this._filtersChange$;
|
|
77
|
-
}
|
|
78
|
-
get sourceOptionsChange() {
|
|
79
|
-
return this._sourceOptionsChange$;
|
|
80
|
-
}
|
|
81
|
-
get selectedValuesChange() {
|
|
82
|
-
return this._selectedValuesChange$;
|
|
83
|
-
}
|
|
84
74
|
get dataSource() {
|
|
85
75
|
return this._dataSource;
|
|
86
76
|
}
|
|
@@ -177,10 +167,10 @@ class CmatTransferPickerService {
|
|
|
177
167
|
}
|
|
178
168
|
});
|
|
179
169
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
181
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
171
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerService, providedIn: 'root' }); }
|
|
182
172
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerService, decorators: [{
|
|
184
174
|
type: Injectable,
|
|
185
175
|
args: [{
|
|
186
176
|
providedIn: 'root'
|
|
@@ -189,6 +179,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
189
179
|
|
|
190
180
|
class CmatTransferPickerFilterComponent {
|
|
191
181
|
constructor() {
|
|
182
|
+
this.filters = input(/* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [undefined, { debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
184
|
+
this._overlayOrigin = viewChild(CdkOverlayOrigin, /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "_overlayOrigin" }] : /* istanbul ignore next */ []));
|
|
186
|
+
this._filterTemplate = viewChild('filterTemplate', /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "_filterTemplate" }] : /* istanbul ignore next */ []));
|
|
192
188
|
this._overlay = inject(Overlay);
|
|
193
189
|
this._service = inject(CmatTransferPickerService);
|
|
194
190
|
this.filterData = {
|
|
@@ -204,7 +200,7 @@ class CmatTransferPickerFilterComponent {
|
|
|
204
200
|
});
|
|
205
201
|
config.positionStrategy = this._overlay
|
|
206
202
|
.position()
|
|
207
|
-
.flexibleConnectedTo(this.
|
|
203
|
+
.flexibleConnectedTo(this._overlayOrigin().elementRef).withPositions([
|
|
208
204
|
{
|
|
209
205
|
originX: 'end', originY: 'bottom', overlayX: 'end',
|
|
210
206
|
overlayY: 'top', offsetX: 5
|
|
@@ -226,7 +222,7 @@ class CmatTransferPickerFilterComponent {
|
|
|
226
222
|
this.overlayRef.detach();
|
|
227
223
|
}
|
|
228
224
|
else {
|
|
229
|
-
this.overlayRef.attach(this.
|
|
225
|
+
this.overlayRef.attach(this._filterTemplate());
|
|
230
226
|
}
|
|
231
227
|
}
|
|
232
228
|
onFilterClick(filter) {
|
|
@@ -252,45 +248,37 @@ class CmatTransferPickerFilterComponent {
|
|
|
252
248
|
this.overlayRef.dispose();
|
|
253
249
|
}
|
|
254
250
|
}
|
|
255
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
256
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatTransferPickerFilterComponent, isStandalone: true, selector: "cmat-transfer-picker-filter", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }, { propertyName: "_filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, isSignal: 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 }); }
|
|
257
253
|
}
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerFilterComponent, decorators: [{
|
|
259
255
|
type: Component,
|
|
260
|
-
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"] }]
|
|
261
|
-
}], ctorParameters: () => [], propDecorators: { filters: [{
|
|
262
|
-
type: Input
|
|
263
|
-
}], overlayOrigin: [{
|
|
264
|
-
type: ViewChild,
|
|
265
|
-
args: [CdkOverlayOrigin, { static: true }]
|
|
266
|
-
}], filterTemplate: [{
|
|
267
|
-
type: ViewChild,
|
|
268
|
-
args: ['filterTemplate', { static: true }]
|
|
269
|
-
}] } });
|
|
256
|
+
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"] }]
|
|
257
|
+
}], ctorParameters: () => [], propDecorators: { filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], _overlayOrigin: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }] }], _filterTemplate: [{ type: i0.ViewChild, args: ['filterTemplate', { isSignal: true }] }] } });
|
|
270
258
|
|
|
271
259
|
class CmatTransferPickerSearchComponent {
|
|
272
260
|
constructor() {
|
|
261
|
+
this.searchPlaceholder = input(/* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [undefined, { debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
273
263
|
this._service = inject(CmatTransferPickerService);
|
|
274
264
|
this.keyword = new FormControl();
|
|
275
265
|
}
|
|
276
266
|
ngOnInit() {
|
|
277
267
|
this.keyword
|
|
278
268
|
.valueChanges
|
|
279
|
-
.pipe(debounceTime(
|
|
269
|
+
.pipe(debounceTime(300), distinctUntilChanged())
|
|
280
270
|
.subscribe((keyword) => this._service.filterDataSource({ keyword: keyword ?? '' }));
|
|
281
271
|
}
|
|
282
272
|
reset() {
|
|
283
273
|
this.keyword.setValue('');
|
|
284
274
|
}
|
|
285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
286
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
276
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatTransferPickerSearchComponent, isStandalone: true, selector: "cmat-transfer-picker-search", inputs: { searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["cmatTransferPickerSearch"], ngImport: i0, template: "<mat-form-field appearance=\"fill\">\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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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 }); }
|
|
287
277
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerSearchComponent, decorators: [{
|
|
289
279
|
type: Component,
|
|
290
|
-
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"] }]
|
|
291
|
-
}], ctorParameters: () => [], propDecorators: { searchPlaceholder: [{
|
|
292
|
-
type: Input
|
|
293
|
-
}] } });
|
|
280
|
+
args: [{ selector: 'cmat-transfer-picker-search', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerSearch', imports: [MatFormFieldModule, MatIconModule, ReactiveFormsModule, MatButtonModule, MatInputModule], template: "<mat-form-field appearance=\"fill\">\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"] }]
|
|
281
|
+
}], ctorParameters: () => [], propDecorators: { searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }] } });
|
|
294
282
|
|
|
295
283
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
296
284
|
class CmatTransferItemNode {
|
|
@@ -308,21 +296,25 @@ var CmatTransferFilterCondition;
|
|
|
308
296
|
class CmatTransferPickerSourceComponent {
|
|
309
297
|
constructor() {
|
|
310
298
|
this.nestedNodeMap = new Map();
|
|
311
|
-
this.
|
|
312
|
-
|
|
299
|
+
this.dataFlatNodes = signal([], /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "dataFlatNodes" }] : /* istanbul ignore next */ []));
|
|
313
301
|
this.checklistSelection = new SelectionModel(true /* multiple */);
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
321
|
-
this.committedSelection = signal([], ...(ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []));
|
|
322
|
-
this.committedValueSet = computed(() => new Set(this.committedSelection().map(node => node.value)), ...(ngDevMode ? [{ debugName: "committedValueSet" }] : /* istanbul ignore next */ []));
|
|
302
|
+
this.committedSelection = signal([], /* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []));
|
|
304
|
+
this.committedValueSet = computed(() => new Set(this.committedSelection().map(node => node.value)), /* @ts-ignore */
|
|
305
|
+
...(ngDevMode ? [{ debugName: "committedValueSet" }] : /* istanbul ignore next */ []));
|
|
306
|
+
this._tree = viewChild('componentTree', /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "_tree" }] : /* istanbul ignore next */ []));
|
|
323
308
|
this._flatNodeByValue = new Map();
|
|
324
309
|
this._service = inject(CmatTransferPickerService);
|
|
325
|
-
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
311
|
+
this.dataSource = this._service.dataSourceChange;
|
|
312
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
313
|
+
this.refreshDataSourceChange = this._service.refreshDataSourceChange;
|
|
314
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
315
|
+
this.options = this._service.sourceOptionsChange;
|
|
316
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
317
|
+
this.selectedValuesChange = this._service.selectedValuesChange;
|
|
326
318
|
this.childrenAccessor = (node) => node.children ?? [];
|
|
327
319
|
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
328
320
|
this._getLevel = (node) => node.level;
|
|
@@ -341,46 +333,37 @@ class CmatTransferPickerSourceComponent {
|
|
|
341
333
|
this._flatNodeByValue.set(node.value, flatNode);
|
|
342
334
|
return flatNode;
|
|
343
335
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
.subscribe((data) => {
|
|
351
|
-
this.dataSource.set(data);
|
|
352
|
-
this._flatNodeByValue.clear();
|
|
353
|
-
this.dataFlatNodes.set(this._getFlattenNodes(this.dataSource()));
|
|
336
|
+
effect(() => {
|
|
337
|
+
const data = this.dataSource();
|
|
338
|
+
untracked(() => {
|
|
339
|
+
this._flatNodeByValue.clear();
|
|
340
|
+
this.dataFlatNodes.set(this._getFlattenNodes(data));
|
|
341
|
+
});
|
|
354
342
|
});
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
343
|
+
effect(() => {
|
|
344
|
+
const clear = this.refreshDataSourceChange();
|
|
345
|
+
untracked(() => {
|
|
346
|
+
if (clear) {
|
|
347
|
+
this.checklistSelection.clear();
|
|
348
|
+
this.committedSelection.set([]);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
this._selectNodesByValues(this.checklistSelection.selected.map(node => node.value));
|
|
352
|
+
this.commitSelection();
|
|
353
|
+
}
|
|
354
|
+
});
|
|
366
355
|
});
|
|
367
|
-
|
|
368
|
-
.selectedValuesChange
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.commitSelection();
|
|
356
|
+
effect(() => {
|
|
357
|
+
const values = this.selectedValuesChange();
|
|
358
|
+
untracked(() => {
|
|
359
|
+
this._selectNodesByValues(values);
|
|
360
|
+
this.commitSelection();
|
|
361
|
+
});
|
|
374
362
|
});
|
|
375
|
-
this._service
|
|
376
|
-
.sourceOptionsChange
|
|
377
|
-
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
378
|
-
.subscribe((options) => { if (options)
|
|
379
|
-
this.options.set(options); });
|
|
380
363
|
}
|
|
381
364
|
ngAfterViewInit() {
|
|
382
365
|
// 初始化时展开整棵树
|
|
383
|
-
this.
|
|
366
|
+
this._tree()?.expandAll();
|
|
384
367
|
}
|
|
385
368
|
getCommittedSelection() {
|
|
386
369
|
return this.committedSelection();
|
|
@@ -507,69 +490,75 @@ class CmatTransferPickerSourceComponent {
|
|
|
507
490
|
}
|
|
508
491
|
}
|
|
509
492
|
}
|
|
510
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
511
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerSourceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
494
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatTransferPickerSourceComponent, isStandalone: true, selector: "cmat-transfer-picker-source", viewQueries: [{ propertyName: "_tree", first: true, predicate: ["componentTree"], descendants: true, isSignal: 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]=\"isNodeDisabled(nestedNodeMap.get(node)!)\" (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)!)||committedValueSet().has(nestedNodeMap.get(node)!.value)\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\" [disabled]=\"isNodeDisabled(nestedNodeMap.get(node)!)\"\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 }); }
|
|
512
495
|
}
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerSourceComponent, decorators: [{
|
|
514
497
|
type: Component,
|
|
515
498
|
args: [{ selector: 'cmat-transfer-picker-source', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatTransferPickerSource', imports: [MatCardModule, MatTreeModule, MatCheckboxModule, MatIconModule, MatButtonModule,
|
|
516
|
-
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()
|
|
517
|
-
}], propDecorators: {
|
|
518
|
-
type: ViewChild,
|
|
519
|
-
args: ['componentTree', { static: false }]
|
|
520
|
-
}] } });
|
|
499
|
+
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]=\"isNodeDisabled(nestedNodeMap.get(node)!)\" (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)!)||committedValueSet().has(nestedNodeMap.get(node)!.value)\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\" [disabled]=\"isNodeDisabled(nestedNodeMap.get(node)!)\"\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"] }]
|
|
500
|
+
}], ctorParameters: () => [], propDecorators: { _tree: [{ type: i0.ViewChild, args: ['componentTree', { isSignal: true }] }] } });
|
|
521
501
|
|
|
522
502
|
class CmatTransferPickerTargetComponent {
|
|
523
503
|
constructor() {
|
|
524
|
-
this.
|
|
504
|
+
this.committedSelection = input([], /* @ts-ignore */
|
|
505
|
+
...(ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []));
|
|
506
|
+
this.clearItemChange = output();
|
|
525
507
|
}
|
|
526
508
|
clearItem(item) {
|
|
527
509
|
this.clearItemChange.emit(item);
|
|
528
510
|
}
|
|
529
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
530
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
511
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerTargetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
512
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatTransferPickerTargetComponent, isStandalone: true, selector: "cmat-transfer-picker-target", inputs: { committedSelection: { classPropertyName: "committedSelection", publicName: "committedSelection", isSignal: true, isRequired: false, transformFunction: null } }, 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 {{committedSelection().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 committedSelection(); 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 (!committedSelection().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>\r\n", 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 }); }
|
|
531
513
|
}
|
|
532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerTargetComponent, decorators: [{
|
|
533
515
|
type: Component,
|
|
534
|
-
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 {{committedSelection.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 committedSelection; 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 (!committedSelection.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>\r\n", 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"] }]
|
|
535
|
-
}],
|
|
536
|
-
type: Input
|
|
537
|
-
}], clearItemChange: [{
|
|
538
|
-
type: Output
|
|
539
|
-
}] } });
|
|
516
|
+
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 {{committedSelection().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 committedSelection(); 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 (!committedSelection().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>\r\n", 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"] }]
|
|
517
|
+
}], propDecorators: { committedSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "committedSelection", required: false }] }], clearItemChange: [{ type: i0.Output, args: ["clearItemChange"] }] } });
|
|
540
518
|
|
|
541
519
|
class CmatTransferPickerComponent {
|
|
542
520
|
constructor() {
|
|
543
|
-
this.
|
|
521
|
+
this.title = input(/* @ts-ignore */
|
|
522
|
+
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
523
|
+
this.filterable = input(true, /* @ts-ignore */
|
|
524
|
+
...(ngDevMode ? [{ debugName: "filterable" }] : /* istanbul ignore next */ []));
|
|
525
|
+
this.searchable = input(false, /* @ts-ignore */
|
|
526
|
+
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
527
|
+
this.searchPlaceholder = input('请输入关键字', /* @ts-ignore */
|
|
528
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
529
|
+
this.dataSource = input([], /* @ts-ignore */
|
|
530
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
531
|
+
this.filters = input([], /* @ts-ignore */
|
|
532
|
+
...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
533
|
+
this.selectedValues = input([], /* @ts-ignore */
|
|
534
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
535
|
+
this.selectChange = output();
|
|
536
|
+
this.committedSelection = signal([], /* @ts-ignore */
|
|
537
|
+
...(ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []));
|
|
538
|
+
this.source = viewChild.required(CmatTransferPickerSourceComponent);
|
|
544
539
|
this._service = inject(CmatTransferPickerService);
|
|
545
540
|
this._injector = inject(Injector);
|
|
546
|
-
this.filterable = true;
|
|
547
|
-
this.dataSource = [];
|
|
548
|
-
this.filters = [];
|
|
549
|
-
this.committedSelection.set([]);
|
|
550
|
-
this.selectedValues = [];
|
|
551
541
|
}
|
|
552
542
|
ngOnInit() {
|
|
553
|
-
this._service.dataSource = this.dataSource;
|
|
554
|
-
this._service.selectedValues = this.selectedValues;
|
|
543
|
+
this._service.dataSource = this.dataSource();
|
|
544
|
+
this._service.selectedValues = this.selectedValues();
|
|
555
545
|
this._service.sourceOptions = {
|
|
556
|
-
title: this.title
|
|
557
|
-
filterable: this.filterable || true,
|
|
558
|
-
searchable: this.searchable || true,
|
|
559
|
-
searchPlaceholder: this.searchPlaceholder || '搜索关键字',
|
|
560
|
-
filters: this.filters || []
|
|
546
|
+
title: this.title() ?? '数据源',
|
|
547
|
+
filterable: this.filterable() || true,
|
|
548
|
+
searchable: this.searchable() || true,
|
|
549
|
+
searchPlaceholder: this.searchPlaceholder() || '搜索关键字',
|
|
550
|
+
filters: this.filters() || []
|
|
561
551
|
};
|
|
562
|
-
this.selectChange = new EventEmitter();
|
|
563
552
|
}
|
|
564
553
|
ngAfterViewInit() {
|
|
565
|
-
if (this.selectedValues.length) {
|
|
554
|
+
if (this.selectedValues().length) {
|
|
566
555
|
afterNextRender(() => {
|
|
567
556
|
this.pick();
|
|
568
557
|
}, { injector: this._injector });
|
|
569
558
|
}
|
|
570
559
|
}
|
|
571
560
|
pick() {
|
|
572
|
-
this._commitSelection(this.source.commitSelection());
|
|
561
|
+
this._commitSelection(this.source().commitSelection());
|
|
573
562
|
}
|
|
574
563
|
reset() {
|
|
575
564
|
if (this.committedSelection().length) {
|
|
@@ -579,8 +568,8 @@ class CmatTransferPickerComponent {
|
|
|
579
568
|
}
|
|
580
569
|
onClearItemChange(item) {
|
|
581
570
|
if (item) {
|
|
582
|
-
this.source.resetSelectedItem(item);
|
|
583
|
-
this._commitSelection(this.source.getCommittedSelection());
|
|
571
|
+
this.source().resetSelectedItem(item);
|
|
572
|
+
this._commitSelection(this.source().getCommittedSelection());
|
|
584
573
|
}
|
|
585
574
|
}
|
|
586
575
|
_commitSelection(selectedList) {
|
|
@@ -590,32 +579,13 @@ class CmatTransferPickerComponent {
|
|
|
590
579
|
_emitterChange() {
|
|
591
580
|
this.selectChange.emit(this.committedSelection());
|
|
592
581
|
}
|
|
593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
582
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.2", type: CmatTransferPickerComponent, isStandalone: true, selector: "cmat-transfer-picker", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, selectedValues: { classPropertyName: "selectedValues", publicName: "selectedValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectChange: "selectChange" }, viewQueries: [{ propertyName: "source", first: true, predicate: CmatTransferPickerSourceComponent, descendants: true, isSignal: 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 [committedSelection]=\"committedSelection()\" (clearItemChange)=\"onClearItemChange($event)\">\r\n</cmat-transfer-picker-target>\r\n", 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: ["committedSelection"], outputs: ["clearItemChange"], exportAs: ["cmatTransferPickerTarget"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
595
584
|
}
|
|
596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatTransferPickerComponent, decorators: [{
|
|
597
586
|
type: Component,
|
|
598
587
|
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 [committedSelection]=\"committedSelection()\" (clearItemChange)=\"onClearItemChange($event)\">\r\n</cmat-transfer-picker-target>\r\n", 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"] }]
|
|
599
|
-
}],
|
|
600
|
-
type: Input
|
|
601
|
-
}], filterable: [{
|
|
602
|
-
type: Input
|
|
603
|
-
}], searchable: [{
|
|
604
|
-
type: Input
|
|
605
|
-
}], searchPlaceholder: [{
|
|
606
|
-
type: Input
|
|
607
|
-
}], dataSource: [{
|
|
608
|
-
type: Input
|
|
609
|
-
}], filters: [{
|
|
610
|
-
type: Input
|
|
611
|
-
}], selectedValues: [{
|
|
612
|
-
type: Input
|
|
613
|
-
}], selectChange: [{
|
|
614
|
-
type: Output
|
|
615
|
-
}], source: [{
|
|
616
|
-
type: ViewChild,
|
|
617
|
-
args: [CmatTransferPickerSourceComponent, { static: true }]
|
|
618
|
-
}] } });
|
|
588
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], selectedValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValues", required: false }] }], selectChange: [{ type: i0.Output, args: ["selectChange"] }], source: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CmatTransferPickerSourceComponent), { isSignal: true }] }] } });
|
|
619
589
|
|
|
620
590
|
/**
|
|
621
591
|
* Generated bundle index. Do not edit.
|