cmat 0.0.110 → 0.0.112
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 +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2751 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +985 -669
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39806 -22071
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1131 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -92
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5194
|
@@ -1,596 +1,1430 @@
|
|
|
1
|
-
import * as i6 from
|
|
2
|
-
import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from
|
|
3
|
-
import * as i4 from
|
|
4
|
-
import { PortalModule } from
|
|
5
|
-
import * as i3 from
|
|
6
|
-
import { CommonModule } from
|
|
7
|
-
import * as i0 from
|
|
8
|
-
import {
|
|
9
|
-
import * as i5 from
|
|
10
|
-
import { MatButtonModule } from
|
|
11
|
-
import * as i1 from
|
|
12
|
-
import { MatButtonToggleModule } from
|
|
13
|
-
import * as i2 from
|
|
14
|
-
import { MatIconModule } from
|
|
15
|
-
import * as i3$1 from
|
|
16
|
-
import { FormControl, ReactiveFormsModule } from
|
|
17
|
-
import * as i1$1 from
|
|
18
|
-
import { MatFormFieldModule } from
|
|
19
|
-
import * as i5
|
|
20
|
-
import { MatInputModule } from
|
|
21
|
-
import { debounceTime, distinctUntilChanged } from
|
|
22
|
-
import { SelectionModel } from
|
|
23
|
-
import { ScrollingModule } from
|
|
24
|
-
import * as i1
|
|
25
|
-
import { MatCardModule } from
|
|
26
|
-
import * as i3
|
|
27
|
-
import { MatCheckboxModule } from
|
|
28
|
-
import * as i2$1 from
|
|
29
|
-
import { MatTreeModule } from
|
|
30
|
-
import { of } from
|
|
31
|
-
import * as i2
|
|
32
|
-
import { MatListModule } from
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
1
|
+
import * as i6 from "@angular/cdk/overlay";
|
|
2
|
+
import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from "@angular/cdk/overlay";
|
|
3
|
+
import * as i4 from "@angular/cdk/portal";
|
|
4
|
+
import { PortalModule } from "@angular/cdk/portal";
|
|
5
|
+
import * as i3$2 from "@angular/common";
|
|
6
|
+
import { CommonModule } from "@angular/common";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import { ChangeDetectionStrategy, Component, Injectable, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
9
|
+
import * as i5$1 from "@angular/material/button";
|
|
10
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
11
|
+
import * as i1$2 from "@angular/material/button-toggle";
|
|
12
|
+
import { MatButtonToggleModule } from "@angular/material/button-toggle";
|
|
13
|
+
import * as i2$2 from "@angular/material/icon";
|
|
14
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
15
|
+
import * as i3$1 from "@angular/forms";
|
|
16
|
+
import { FormControl, ReactiveFormsModule } from "@angular/forms";
|
|
17
|
+
import * as i1$1 from "@angular/material/form-field";
|
|
18
|
+
import { MatFormFieldModule } from "@angular/material/form-field";
|
|
19
|
+
import * as i5 from "@angular/material/input";
|
|
20
|
+
import { MatInputModule } from "@angular/material/input";
|
|
21
|
+
import { debounceTime, distinctUntilChanged } from "rxjs/operators";
|
|
22
|
+
import { SelectionModel } from "@angular/cdk/collections";
|
|
23
|
+
import { ScrollingModule } from "@angular/cdk/scrolling";
|
|
24
|
+
import * as i1 from "@angular/material/card";
|
|
25
|
+
import { MatCardModule } from "@angular/material/card";
|
|
26
|
+
import * as i3 from "@angular/material/checkbox";
|
|
27
|
+
import { MatCheckboxModule } from "@angular/material/checkbox";
|
|
28
|
+
import * as i2$1 from "@angular/material/tree";
|
|
29
|
+
import { MatTreeModule } from "@angular/material/tree";
|
|
30
|
+
import { of } from "rxjs";
|
|
31
|
+
import * as i2 from "@angular/material/list";
|
|
32
|
+
import { MatListModule } from "@angular/material/list";
|
|
33
|
+
var CmatTransferPickerService = class CmatTransferPickerService {
|
|
34
|
+
constructor() {
|
|
35
|
+
this._dataSourceChange = signal([], ...ngDevMode ? [{ debugName: "_dataSourceChange" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this._refreshDataSourceChange = signal({
|
|
37
|
+
clear: true,
|
|
38
|
+
nonce: 0
|
|
39
|
+
}, ...ngDevMode ? [{ debugName: "_refreshDataSourceChange" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this._filtersChange = signal([], ...ngDevMode ? [{ debugName: "_filtersChange" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this._sourceOptionsChange = signal(void 0, ...ngDevMode ? [{ debugName: "_sourceOptionsChange" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this._selectedValuesChange = signal([], ...ngDevMode ? [{ debugName: "_selectedValuesChange" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this._refreshNonce = 0;
|
|
44
|
+
this.dataSourceChange = this._dataSourceChange.asReadonly();
|
|
45
|
+
this.refreshDataSourceChange = this._refreshDataSourceChange.asReadonly();
|
|
46
|
+
this.filtersChange = this._filtersChange.asReadonly();
|
|
47
|
+
this.sourceOptionsChange = this._sourceOptionsChange.asReadonly();
|
|
48
|
+
this.selectedValuesChange = this._selectedValuesChange.asReadonly();
|
|
49
|
+
this._compareMap = /* @__PURE__ */ new Map([
|
|
50
|
+
["0", (a, b) => a === b],
|
|
51
|
+
["1", (a, b) => a !== b],
|
|
52
|
+
["2", (a, b) => a > b],
|
|
53
|
+
["3", (a, b) => a < b],
|
|
54
|
+
["0,2", (a, b) => a >= b],
|
|
55
|
+
["0,3", (a, b) => a <= b]
|
|
56
|
+
]);
|
|
57
|
+
this._conditionMap = /* @__PURE__ */ new Map([["or", (arr) => arr.reduce((o, item) => (o.result = o.result || item || o.prev, o.prev = item, o), {
|
|
58
|
+
result: false,
|
|
59
|
+
prev: arr[0]
|
|
60
|
+
}).result], ["and", (arr) => arr.reduce((o, item) => (o.result = o.result && item && o.prev, o.prev = item, o), {
|
|
61
|
+
result: true,
|
|
62
|
+
prev: arr[0]
|
|
63
|
+
}).result]]);
|
|
64
|
+
}
|
|
65
|
+
get dataSource() {
|
|
66
|
+
return this._dataSource;
|
|
67
|
+
}
|
|
68
|
+
set dataSource(data) {
|
|
69
|
+
this._dataSource = data;
|
|
70
|
+
if (!this._originalDataSource) this._originalDataSource = JSON.parse(JSON.stringify(data));
|
|
71
|
+
this._dataSourceChange.set(data);
|
|
72
|
+
}
|
|
73
|
+
set sourceOptions(value) {
|
|
74
|
+
this._sourceOptionsChange.set(value);
|
|
75
|
+
}
|
|
76
|
+
set selectedValues(value) {
|
|
77
|
+
this._selectedValuesChange.set(value);
|
|
78
|
+
}
|
|
79
|
+
filterDataSource({ filterData, keyword }) {
|
|
80
|
+
this._filterData = filterData ?? this._filterData;
|
|
81
|
+
this._keyword = keyword === void 0 ? this._keyword : keyword;
|
|
82
|
+
if (filterData?.filters.length) {
|
|
83
|
+
this._filterDataSourceByType(this._keyword ? this._filteredDataSource : this._originalDataSource, "Filters");
|
|
84
|
+
return;
|
|
85
|
+
} else if (filterData && !filterData.filters.length) {
|
|
86
|
+
if (this._keyword) this._filterDataSourceByType(this._originalDataSource, "Keyword");
|
|
87
|
+
else this.resetDataSource(false);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (keyword) {
|
|
91
|
+
this._filterDataSourceByType(this._filterData?.filters.length ? this._filteredDataSource : this._originalDataSource, "Keyword");
|
|
92
|
+
return;
|
|
93
|
+
} else if (!keyword) {
|
|
94
|
+
if (this._filterData?.filters.length) this._filterDataSourceByType(this._originalDataSource, "Filters");
|
|
95
|
+
else this.resetDataSource(false);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
resetDataSource(clear) {
|
|
100
|
+
this.dataSource = this._originalDataSource;
|
|
101
|
+
this._filteredDataSource = [];
|
|
102
|
+
this._refreshDataSourceChange.set({
|
|
103
|
+
clear,
|
|
104
|
+
nonce: ++this._refreshNonce
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
_filterDataSourceByType(dataSource, type) {
|
|
108
|
+
this._filteredDataSource = [];
|
|
109
|
+
switch (type) {
|
|
110
|
+
case "Filters":
|
|
111
|
+
this._setFilteredDataSourceByFilters(dataSource);
|
|
112
|
+
break;
|
|
113
|
+
case "Keyword": this._setFilteredDataSourceByKeyword(dataSource);
|
|
114
|
+
}
|
|
115
|
+
this.dataSource = this._filteredDataSource;
|
|
116
|
+
this._refreshDataSourceChange.set({
|
|
117
|
+
clear: false,
|
|
118
|
+
nonce: ++this._refreshNonce
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
_setFilteredDataSourceByFilters(dataSource) {
|
|
122
|
+
dataSource.map((data) => {
|
|
123
|
+
const compareResultArr = [];
|
|
124
|
+
this._filterData.filters.map((filter) => {
|
|
125
|
+
if (Object.prototype.hasOwnProperty.call(data, filter.field)) {
|
|
126
|
+
const compare = this._compareMap.get(filter.condition.sort().toString())?.(filter.value, data[filter.field]);
|
|
127
|
+
if (this._filterData.filters.length < 2 && compare) this._filteredDataSource.push(data);
|
|
128
|
+
else compareResultArr.push(compare ?? false);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
if (compareResultArr.length && this._conditionMap.get(this._filterData.condition)?.(compareResultArr)) this._filteredDataSource.push(data);
|
|
132
|
+
if (data.children && data.children.length > 0) this._setFilteredDataSourceByFilters(data.children);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
_setFilteredDataSourceByKeyword(dataSource) {
|
|
136
|
+
dataSource.map((data) => {
|
|
137
|
+
if (data.label.includes(this._keyword)) this._filteredDataSource.push(data);
|
|
138
|
+
else if (data.children && data.children.length > 0) this._setFilteredDataSourceByKeyword(data.children);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
static {
|
|
142
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
143
|
+
minVersion: "12.0.0",
|
|
144
|
+
version: "22.2.3",
|
|
145
|
+
ngImport: i0,
|
|
146
|
+
type: CmatTransferPickerService,
|
|
147
|
+
deps: [],
|
|
148
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
static {
|
|
152
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "22.2.3",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: CmatTransferPickerService,
|
|
157
|
+
providedIn: "root"
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
162
|
+
minVersion: "12.0.0",
|
|
163
|
+
version: "22.2.3",
|
|
164
|
+
ngImport: i0,
|
|
165
|
+
type: CmatTransferPickerService,
|
|
166
|
+
decorators: [{
|
|
167
|
+
type: Injectable,
|
|
168
|
+
args: [{ providedIn: "root" }]
|
|
169
|
+
}],
|
|
170
|
+
ctorParameters: () => []
|
|
171
|
+
});
|
|
172
|
+
var CmatTransferPickerFilterComponent = class CmatTransferPickerFilterComponent {
|
|
173
|
+
constructor() {
|
|
174
|
+
this.filters = input(...ngDevMode ? [void 0, { debugName: "filters" }] : /* istanbul ignore next */ []);
|
|
175
|
+
this._overlayOrigin = viewChild(CdkOverlayOrigin, ...ngDevMode ? [{ debugName: "_overlayOrigin" }] : /* istanbul ignore next */ []);
|
|
176
|
+
this._filterTemplate = viewChild("filterTemplate", ...ngDevMode ? [{ debugName: "_filterTemplate" }] : /* istanbul ignore next */ []);
|
|
177
|
+
this._overlay = inject(Overlay);
|
|
178
|
+
this._service = inject(CmatTransferPickerService);
|
|
179
|
+
this.filterData = {
|
|
180
|
+
condition: "or",
|
|
181
|
+
filters: []
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
ngOnInit() {
|
|
185
|
+
const config = new OverlayConfig({
|
|
186
|
+
hasBackdrop: true,
|
|
187
|
+
backdropClass: "cdk-overlay-transparent-backdrop",
|
|
188
|
+
scrollStrategy: this._overlay.scrollStrategies.block()
|
|
189
|
+
});
|
|
190
|
+
config.positionStrategy = this._overlay.position().flexibleConnectedTo(this._overlayOrigin().elementRef).withPositions([{
|
|
191
|
+
originX: "end",
|
|
192
|
+
originY: "bottom",
|
|
193
|
+
overlayX: "end",
|
|
194
|
+
overlayY: "top",
|
|
195
|
+
offsetX: 5
|
|
196
|
+
}, {
|
|
197
|
+
originX: "end",
|
|
198
|
+
originY: "bottom",
|
|
199
|
+
overlayX: "end",
|
|
200
|
+
overlayY: "top",
|
|
201
|
+
offsetX: -5
|
|
202
|
+
}]);
|
|
203
|
+
this.overlayRef = this._overlay.create(config);
|
|
204
|
+
this.overlayRef.backdropClick().subscribe(() => {
|
|
205
|
+
this.overlayRef.detach();
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
toggleFilter() {
|
|
209
|
+
if (this.overlayRef?.hasAttached()) this.overlayRef.detach();
|
|
210
|
+
else this.overlayRef.attach(this._filterTemplate());
|
|
211
|
+
}
|
|
212
|
+
onFilterClick(filter) {
|
|
213
|
+
filter.selected = !filter.selected;
|
|
214
|
+
if (!this.filterData.filters.find((item) => item.value === filter.value)) this.filterData.filters.push(filter);
|
|
215
|
+
else if (!filter.selected) this.filterData.filters.splice(this.filterData.filters.findIndex((j) => j === filter), 1);
|
|
216
|
+
this.changeFilterData();
|
|
217
|
+
}
|
|
218
|
+
onConditionChange(event) {
|
|
219
|
+
this.filterData.condition = event;
|
|
220
|
+
this.changeFilterData();
|
|
221
|
+
}
|
|
222
|
+
changeFilterData() {
|
|
223
|
+
this._service.filterDataSource({ filterData: this.filterData });
|
|
224
|
+
}
|
|
225
|
+
ngOnDestroy() {
|
|
226
|
+
if (this.overlayRef) this.overlayRef.dispose();
|
|
227
|
+
}
|
|
228
|
+
static {
|
|
229
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
230
|
+
minVersion: "12.0.0",
|
|
231
|
+
version: "22.2.3",
|
|
232
|
+
ngImport: i0,
|
|
233
|
+
type: CmatTransferPickerFilterComponent,
|
|
234
|
+
deps: [],
|
|
235
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
static {
|
|
239
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
240
|
+
minVersion: "17.0.0",
|
|
241
|
+
version: "22.2.3",
|
|
242
|
+
type: CmatTransferPickerFilterComponent,
|
|
243
|
+
isStandalone: true,
|
|
244
|
+
selector: "cmat-transfer-picker-filter",
|
|
245
|
+
inputs: { filters: {
|
|
246
|
+
classPropertyName: "filters",
|
|
247
|
+
publicName: "filters",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
} },
|
|
252
|
+
viewQueries: [{
|
|
253
|
+
propertyName: "_overlayOrigin",
|
|
254
|
+
first: true,
|
|
255
|
+
predicate: CdkOverlayOrigin,
|
|
256
|
+
descendants: true,
|
|
257
|
+
isSignal: true
|
|
258
|
+
}, {
|
|
259
|
+
propertyName: "_filterTemplate",
|
|
260
|
+
first: true,
|
|
261
|
+
predicate: ["filterTemplate"],
|
|
262
|
+
descendants: true,
|
|
263
|
+
isSignal: true
|
|
264
|
+
}],
|
|
265
|
+
exportAs: ["cmatTransferPickerFilter"],
|
|
266
|
+
ngImport: i0,
|
|
267
|
+
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'\">或</mat-button-toggle>\r\n <mat-button-toggle value=\"and\" [checked]=\"filterData.condition === 'and'\">且</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>",
|
|
268
|
+
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"],
|
|
269
|
+
dependencies: [
|
|
270
|
+
{
|
|
271
|
+
kind: "ngmodule",
|
|
272
|
+
type: MatButtonToggleModule
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
kind: "directive",
|
|
276
|
+
type: i1$2.MatButtonToggleGroup,
|
|
277
|
+
selector: "mat-button-toggle-group",
|
|
278
|
+
inputs: [
|
|
279
|
+
"appearance",
|
|
280
|
+
"name",
|
|
281
|
+
"vertical",
|
|
282
|
+
"value",
|
|
283
|
+
"multiple",
|
|
284
|
+
"disabled",
|
|
285
|
+
"disabledInteractive",
|
|
286
|
+
"hideSingleSelectionIndicator",
|
|
287
|
+
"hideMultipleSelectionIndicator"
|
|
288
|
+
],
|
|
289
|
+
outputs: ["valueChange", "change"],
|
|
290
|
+
exportAs: ["matButtonToggleGroup"]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
kind: "component",
|
|
294
|
+
type: i1$2.MatButtonToggle,
|
|
295
|
+
selector: "mat-button-toggle",
|
|
296
|
+
inputs: [
|
|
297
|
+
"aria-label",
|
|
298
|
+
"aria-labelledby",
|
|
299
|
+
"id",
|
|
300
|
+
"name",
|
|
301
|
+
"value",
|
|
302
|
+
"tabIndex",
|
|
303
|
+
"disableRipple",
|
|
304
|
+
"appearance",
|
|
305
|
+
"checked",
|
|
306
|
+
"disabled",
|
|
307
|
+
"disabledInteractive"
|
|
308
|
+
],
|
|
309
|
+
outputs: ["change"],
|
|
310
|
+
exportAs: ["matButtonToggle"]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
kind: "ngmodule",
|
|
314
|
+
type: MatIconModule
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
kind: "component",
|
|
318
|
+
type: i2$2.MatIcon,
|
|
319
|
+
selector: "mat-icon",
|
|
320
|
+
inputs: [
|
|
321
|
+
"color",
|
|
322
|
+
"inline",
|
|
323
|
+
"svgIcon",
|
|
324
|
+
"fontSet",
|
|
325
|
+
"fontIcon"
|
|
326
|
+
],
|
|
327
|
+
exportAs: ["matIcon"]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
kind: "ngmodule",
|
|
331
|
+
type: CommonModule
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
kind: "directive",
|
|
335
|
+
type: i3$2.NgClass,
|
|
336
|
+
selector: "[ngClass]",
|
|
337
|
+
inputs: ["class", "ngClass"]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "ngmodule",
|
|
341
|
+
type: PortalModule
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
kind: "directive",
|
|
345
|
+
type: i4.CdkPortal,
|
|
346
|
+
selector: "[cdkPortal]",
|
|
347
|
+
exportAs: ["cdkPortal"]
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
kind: "ngmodule",
|
|
351
|
+
type: MatButtonModule
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
kind: "component",
|
|
355
|
+
type: i5$1.MatIconButton,
|
|
356
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
357
|
+
exportAs: ["matButton", "matAnchor"]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
kind: "ngmodule",
|
|
361
|
+
type: OverlayModule
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
kind: "directive",
|
|
365
|
+
type: i6.CdkOverlayOrigin,
|
|
366
|
+
selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
|
|
367
|
+
exportAs: ["cdkOverlayOrigin"]
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
371
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
376
|
+
minVersion: "12.0.0",
|
|
377
|
+
version: "22.2.3",
|
|
378
|
+
ngImport: i0,
|
|
379
|
+
type: CmatTransferPickerFilterComponent,
|
|
380
|
+
decorators: [{
|
|
381
|
+
type: Component,
|
|
382
|
+
args: [{
|
|
383
|
+
selector: "cmat-transfer-picker-filter",
|
|
384
|
+
encapsulation: ViewEncapsulation.None,
|
|
385
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
386
|
+
exportAs: "cmatTransferPickerFilter",
|
|
387
|
+
imports: [
|
|
388
|
+
MatButtonToggleModule,
|
|
389
|
+
MatIconModule,
|
|
390
|
+
CommonModule,
|
|
391
|
+
PortalModule,
|
|
392
|
+
MatButtonModule,
|
|
393
|
+
OverlayModule
|
|
394
|
+
],
|
|
395
|
+
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'\">或</mat-button-toggle>\r\n <mat-button-toggle value=\"and\" [checked]=\"filterData.condition === 'and'\">且</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>",
|
|
396
|
+
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"]
|
|
397
|
+
}]
|
|
398
|
+
}],
|
|
399
|
+
ctorParameters: () => [],
|
|
400
|
+
propDecorators: {
|
|
401
|
+
filters: [{
|
|
402
|
+
type: i0.Input,
|
|
403
|
+
args: [{
|
|
404
|
+
isSignal: true,
|
|
405
|
+
alias: "filters",
|
|
406
|
+
required: false
|
|
407
|
+
}]
|
|
408
|
+
}],
|
|
409
|
+
_overlayOrigin: [{
|
|
410
|
+
type: i0.ViewChild,
|
|
411
|
+
args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }]
|
|
412
|
+
}],
|
|
413
|
+
_filterTemplate: [{
|
|
414
|
+
type: i0.ViewChild,
|
|
415
|
+
args: ["filterTemplate", { isSignal: true }]
|
|
416
|
+
}]
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
var CmatTransferPickerSearchComponent = class CmatTransferPickerSearchComponent {
|
|
420
|
+
constructor() {
|
|
421
|
+
this.searchPlaceholder = input(...ngDevMode ? [void 0, { debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []);
|
|
422
|
+
this._service = inject(CmatTransferPickerService);
|
|
423
|
+
this.keyword = new FormControl();
|
|
424
|
+
}
|
|
425
|
+
ngOnInit() {
|
|
426
|
+
this.keyword.valueChanges.pipe(debounceTime(300), distinctUntilChanged()).subscribe((keyword) => this._service.filterDataSource({ keyword: keyword ?? "" }));
|
|
427
|
+
}
|
|
428
|
+
reset() {
|
|
429
|
+
this.keyword.setValue("");
|
|
430
|
+
}
|
|
431
|
+
static {
|
|
432
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
433
|
+
minVersion: "12.0.0",
|
|
434
|
+
version: "22.2.3",
|
|
435
|
+
ngImport: i0,
|
|
436
|
+
type: CmatTransferPickerSearchComponent,
|
|
437
|
+
deps: [],
|
|
438
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
static {
|
|
442
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
443
|
+
minVersion: "17.0.0",
|
|
444
|
+
version: "22.2.3",
|
|
445
|
+
type: CmatTransferPickerSearchComponent,
|
|
446
|
+
isStandalone: true,
|
|
447
|
+
selector: "cmat-transfer-picker-search",
|
|
448
|
+
inputs: { searchPlaceholder: {
|
|
449
|
+
classPropertyName: "searchPlaceholder",
|
|
450
|
+
publicName: "searchPlaceholder",
|
|
451
|
+
isSignal: true,
|
|
452
|
+
isRequired: false,
|
|
453
|
+
transformFunction: null
|
|
454
|
+
} },
|
|
455
|
+
exportAs: ["cmatTransferPickerSearch"],
|
|
456
|
+
ngImport: i0,
|
|
457
|
+
template: "<mat-form-field appearance=\"outline\">\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>",
|
|
458
|
+
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"],
|
|
459
|
+
dependencies: [
|
|
460
|
+
{
|
|
461
|
+
kind: "ngmodule",
|
|
462
|
+
type: MatFormFieldModule
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
kind: "component",
|
|
466
|
+
type: i1$1.MatFormField,
|
|
467
|
+
selector: "mat-form-field",
|
|
468
|
+
inputs: [
|
|
469
|
+
"hideRequiredMarker",
|
|
470
|
+
"color",
|
|
471
|
+
"floatLabel",
|
|
472
|
+
"appearance",
|
|
473
|
+
"subscriptSizing",
|
|
474
|
+
"hintLabel"
|
|
475
|
+
],
|
|
476
|
+
exportAs: ["matFormField"]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
kind: "directive",
|
|
480
|
+
type: i1$1.MatSuffix,
|
|
481
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
482
|
+
inputs: ["matTextSuffix"]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
kind: "ngmodule",
|
|
486
|
+
type: MatIconModule
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
kind: "component",
|
|
490
|
+
type: i2$2.MatIcon,
|
|
491
|
+
selector: "mat-icon",
|
|
492
|
+
inputs: [
|
|
493
|
+
"color",
|
|
494
|
+
"inline",
|
|
495
|
+
"svgIcon",
|
|
496
|
+
"fontSet",
|
|
497
|
+
"fontIcon"
|
|
498
|
+
],
|
|
499
|
+
exportAs: ["matIcon"]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
kind: "ngmodule",
|
|
503
|
+
type: ReactiveFormsModule
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
kind: "directive",
|
|
507
|
+
type: i3$1.DefaultValueAccessor,
|
|
508
|
+
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]"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
kind: "directive",
|
|
512
|
+
type: i3$1.NgControlStatus,
|
|
513
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
kind: "directive",
|
|
517
|
+
type: i3$1.FormControlDirective,
|
|
518
|
+
selector: "[formControl]",
|
|
519
|
+
inputs: [
|
|
520
|
+
"formControl",
|
|
521
|
+
"disabled",
|
|
522
|
+
"ngModel"
|
|
523
|
+
],
|
|
524
|
+
outputs: ["ngModelChange"],
|
|
525
|
+
exportAs: ["ngForm"]
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
kind: "ngmodule",
|
|
529
|
+
type: MatButtonModule
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
kind: "component",
|
|
533
|
+
type: i5$1.MatIconButton,
|
|
534
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
535
|
+
exportAs: ["matButton", "matAnchor"]
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
kind: "ngmodule",
|
|
539
|
+
type: MatInputModule
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
kind: "directive",
|
|
543
|
+
type: i5.MatInput,
|
|
544
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
545
|
+
inputs: [
|
|
546
|
+
"disabled",
|
|
547
|
+
"id",
|
|
548
|
+
"placeholder",
|
|
549
|
+
"name",
|
|
550
|
+
"required",
|
|
551
|
+
"type",
|
|
552
|
+
"errorStateMatcher",
|
|
553
|
+
"aria-describedby",
|
|
554
|
+
"value",
|
|
555
|
+
"readonly",
|
|
556
|
+
"disabledInteractive"
|
|
557
|
+
],
|
|
558
|
+
exportAs: ["matInput"]
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
562
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
567
|
+
minVersion: "12.0.0",
|
|
568
|
+
version: "22.2.3",
|
|
569
|
+
ngImport: i0,
|
|
570
|
+
type: CmatTransferPickerSearchComponent,
|
|
571
|
+
decorators: [{
|
|
572
|
+
type: Component,
|
|
573
|
+
args: [{
|
|
574
|
+
selector: "cmat-transfer-picker-search",
|
|
575
|
+
encapsulation: ViewEncapsulation.None,
|
|
576
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
577
|
+
exportAs: "cmatTransferPickerSearch",
|
|
578
|
+
imports: [
|
|
579
|
+
MatFormFieldModule,
|
|
580
|
+
MatIconModule,
|
|
581
|
+
ReactiveFormsModule,
|
|
582
|
+
MatButtonModule,
|
|
583
|
+
MatInputModule
|
|
584
|
+
],
|
|
585
|
+
template: "<mat-form-field appearance=\"outline\">\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>",
|
|
586
|
+
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"]
|
|
587
|
+
}]
|
|
588
|
+
}],
|
|
589
|
+
ctorParameters: () => [],
|
|
590
|
+
propDecorators: { searchPlaceholder: [{
|
|
591
|
+
type: i0.Input,
|
|
592
|
+
args: [{
|
|
593
|
+
isSignal: true,
|
|
594
|
+
alias: "searchPlaceholder",
|
|
595
|
+
required: false
|
|
596
|
+
}]
|
|
597
|
+
}] }
|
|
598
|
+
});
|
|
599
|
+
var CmatTransferItemNode = class {};
|
|
600
|
+
var CmatTransferItemFlatNode = class {};
|
|
288
601
|
var CmatTransferFilterCondition;
|
|
289
|
-
(function
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
602
|
+
(function(CmatTransferFilterCondition) {
|
|
603
|
+
CmatTransferFilterCondition[CmatTransferFilterCondition["EQUALS"] = 0] = "EQUALS";
|
|
604
|
+
CmatTransferFilterCondition[CmatTransferFilterCondition["NOT_EQUALS"] = 1] = "NOT_EQUALS";
|
|
605
|
+
CmatTransferFilterCondition[CmatTransferFilterCondition["MORE_THAN"] = 2] = "MORE_THAN";
|
|
606
|
+
CmatTransferFilterCondition[CmatTransferFilterCondition["LESS_THAN"] = 3] = "LESS_THAN";
|
|
294
607
|
})(CmatTransferFilterCondition || (CmatTransferFilterCondition = {}));
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
608
|
+
var CmatTransferPickerSourceComponent = class CmatTransferPickerSourceComponent {
|
|
609
|
+
constructor() {
|
|
610
|
+
this.nestedNodeMap = /* @__PURE__ */ new Map();
|
|
611
|
+
this.dataFlatNodes = signal([], ...ngDevMode ? [{ debugName: "dataFlatNodes" }] : /* istanbul ignore next */ []);
|
|
612
|
+
this.checklistSelection = new SelectionModel(true);
|
|
613
|
+
this.committedSelection = signal([], ...ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []);
|
|
614
|
+
this.committedValueSet = computed(() => new Set(this.committedSelection().map((node) => node.value)), ...ngDevMode ? [{ debugName: "committedValueSet" }] : /* istanbul ignore next */ []);
|
|
615
|
+
this._tree = viewChild("componentTree", ...ngDevMode ? [{ debugName: "_tree" }] : /* istanbul ignore next */ []);
|
|
616
|
+
this._flatNodeByValue = /* @__PURE__ */ new Map();
|
|
617
|
+
this._service = inject(CmatTransferPickerService);
|
|
618
|
+
this.dataSource = this._service.dataSourceChange;
|
|
619
|
+
this.refreshDataSourceChange = this._service.refreshDataSourceChange;
|
|
620
|
+
this.options = this._service.sourceOptionsChange;
|
|
621
|
+
this.selectedValuesChange = this._service.selectedValuesChange;
|
|
622
|
+
this.childrenAccessor = (node) => node.children ?? [];
|
|
623
|
+
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
624
|
+
this._getLevel = (node) => node.level;
|
|
625
|
+
this._isExpandable = (node) => node.expandable;
|
|
626
|
+
this._getChildren = (node) => of(node.children ?? []);
|
|
627
|
+
this._transformer = (node, level) => {
|
|
628
|
+
const flatNode = this.nestedNodeMap.has(node) && this.nestedNodeMap.get(node)?.value === node.value ? this.nestedNodeMap.get(node) : new CmatTransferItemFlatNode();
|
|
629
|
+
flatNode.label = node.label;
|
|
630
|
+
flatNode.value = node.value;
|
|
631
|
+
flatNode.disabled = !!node.disabled;
|
|
632
|
+
flatNode.level = level;
|
|
633
|
+
flatNode.expandable = !!node.children;
|
|
634
|
+
this.nestedNodeMap.set(node, flatNode);
|
|
635
|
+
this._flatNodeByValue.set(node.value, flatNode);
|
|
636
|
+
return flatNode;
|
|
637
|
+
};
|
|
638
|
+
effect(() => {
|
|
639
|
+
const data = this.dataSource();
|
|
640
|
+
untracked(() => {
|
|
641
|
+
this._flatNodeByValue.clear();
|
|
642
|
+
this.dataFlatNodes.set(this._getFlattenNodes(data));
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
effect(() => {
|
|
646
|
+
const clear = this.refreshDataSourceChange();
|
|
647
|
+
untracked(() => {
|
|
648
|
+
if (clear) {
|
|
649
|
+
this.checklistSelection.clear();
|
|
650
|
+
this.committedSelection.set([]);
|
|
651
|
+
} else {
|
|
652
|
+
this._selectNodesByValues(this.checklistSelection.selected.map((node) => node.value));
|
|
653
|
+
this.commitSelection();
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
effect(() => {
|
|
658
|
+
const values = this.selectedValuesChange();
|
|
659
|
+
untracked(() => {
|
|
660
|
+
this._selectNodesByValues(values);
|
|
661
|
+
this.commitSelection();
|
|
662
|
+
});
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
ngAfterViewInit() {
|
|
666
|
+
this._tree()?.expandAll();
|
|
667
|
+
}
|
|
668
|
+
getCommittedSelection() {
|
|
669
|
+
return this.committedSelection();
|
|
670
|
+
}
|
|
671
|
+
commitSelection() {
|
|
672
|
+
this.committedSelection.set(this._cloneFlatNodes(this.checklistSelection.selected));
|
|
673
|
+
return this.committedSelection();
|
|
674
|
+
}
|
|
675
|
+
resetSelectedItem(item) {
|
|
676
|
+
const target = this._flatNodeByValue.get(item.value) ?? this.checklistSelection.selected.find((i) => i.value === item.value);
|
|
677
|
+
if (!target) return;
|
|
678
|
+
const descendants = this._getDescendants(target);
|
|
679
|
+
this.checklistSelection.deselect(target, ...descendants.filter((node) => this.checklistSelection.isSelected(node)));
|
|
680
|
+
this._checkAllParentsSelection(target);
|
|
681
|
+
this.commitSelection();
|
|
682
|
+
}
|
|
683
|
+
descendantsAllSelected(node) {
|
|
684
|
+
return this._getDescendants(node).every((child) => this.checklistSelection.isSelected(child));
|
|
685
|
+
}
|
|
686
|
+
descendantsPartiallySelected(node) {
|
|
687
|
+
return this._getDescendants(node).some((child) => this.checklistSelection.isSelected(child)) && !this.descendantsAllSelected(node);
|
|
688
|
+
}
|
|
689
|
+
transferItemSelectionToggle(node) {
|
|
690
|
+
this.checklistSelection.toggle(node);
|
|
691
|
+
let descendants = this._getDescendants(node);
|
|
692
|
+
descendants = descendants.filter((n) => !this.isNodeDisabled(n));
|
|
693
|
+
this.checklistSelection.isSelected(node) ? this.checklistSelection.select(...descendants) : this.checklistSelection.deselect(...descendants);
|
|
694
|
+
descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
695
|
+
this._checkAllParentsSelection(node);
|
|
696
|
+
}
|
|
697
|
+
transferLeafItemSelectionToggle(node) {
|
|
698
|
+
this.checklistSelection.toggle(node);
|
|
699
|
+
this._checkAllParentsSelection(node);
|
|
700
|
+
}
|
|
701
|
+
isNodeDisabled(node) {
|
|
702
|
+
return !!node.disabled || this.committedValueSet().has(node.value);
|
|
703
|
+
}
|
|
704
|
+
_getDescendants(dataNode) {
|
|
705
|
+
const flatNodes = this.dataFlatNodes();
|
|
706
|
+
const startIndex = flatNodes.findIndex((j) => j === dataNode);
|
|
707
|
+
const results = [];
|
|
708
|
+
for (let i = startIndex + 1; i < flatNodes.length && this._getLevel(dataNode) < this._getLevel(flatNodes[i]); i++) results.push(flatNodes[i]);
|
|
709
|
+
return results;
|
|
710
|
+
}
|
|
711
|
+
_getFlattenNodes(nodes, i = 0) {
|
|
712
|
+
const flattenedNodes = [];
|
|
713
|
+
for (const node of nodes) {
|
|
714
|
+
flattenedNodes.push(this._transformer(node, i));
|
|
715
|
+
if (node.children) flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1));
|
|
716
|
+
}
|
|
717
|
+
return flattenedNodes;
|
|
718
|
+
}
|
|
719
|
+
_checkAllParentsSelection(node) {
|
|
720
|
+
let parent = this._getParentNode(node);
|
|
721
|
+
while (parent) {
|
|
722
|
+
this._checkRootNodeSelection(parent);
|
|
723
|
+
parent = this._getParentNode(parent);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
_checkRootNodeSelection(node) {
|
|
727
|
+
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
728
|
+
const descAllSelected = this._getDescendants(node).every((child) => this.checklistSelection.isSelected(child));
|
|
729
|
+
if (nodeSelected && !descAllSelected) this.checklistSelection.deselect(node);
|
|
730
|
+
else if (!nodeSelected && descAllSelected) this.checklistSelection.select(node);
|
|
731
|
+
}
|
|
732
|
+
_cloneFlatNode(node) {
|
|
733
|
+
return {
|
|
734
|
+
label: node.label,
|
|
735
|
+
value: node.value,
|
|
736
|
+
level: node.level,
|
|
737
|
+
disabled: node.disabled,
|
|
738
|
+
expandable: node.expandable
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
_cloneFlatNodes(nodes) {
|
|
742
|
+
return nodes.map((node) => this._cloneFlatNode(node));
|
|
743
|
+
}
|
|
744
|
+
_getParentNode(node) {
|
|
745
|
+
const currentLevel = this._getLevel(node);
|
|
746
|
+
const flatNodes = this.dataFlatNodes();
|
|
747
|
+
if (currentLevel < 1) return null;
|
|
748
|
+
const startIndex = flatNodes.findIndex((j) => j === node) - 1;
|
|
749
|
+
for (let i = startIndex; i >= 0; i--) {
|
|
750
|
+
const currentNode = flatNodes[i];
|
|
751
|
+
if (this._getLevel(currentNode) < currentLevel) return currentNode;
|
|
752
|
+
}
|
|
753
|
+
return null;
|
|
754
|
+
}
|
|
755
|
+
_selectNodesByValues(values) {
|
|
756
|
+
this.checklistSelection.clear();
|
|
757
|
+
for (const value of values) {
|
|
758
|
+
const node = this._flatNodeByValue.get(value);
|
|
759
|
+
if (node) this.checklistSelection.select(node);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
static {
|
|
763
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
764
|
+
minVersion: "12.0.0",
|
|
765
|
+
version: "22.2.3",
|
|
766
|
+
ngImport: i0,
|
|
767
|
+
type: CmatTransferPickerSourceComponent,
|
|
768
|
+
deps: [],
|
|
769
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
static {
|
|
773
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
774
|
+
minVersion: "17.0.0",
|
|
775
|
+
version: "22.2.3",
|
|
776
|
+
type: CmatTransferPickerSourceComponent,
|
|
777
|
+
isStandalone: true,
|
|
778
|
+
selector: "cmat-transfer-picker-source",
|
|
779
|
+
viewQueries: [{
|
|
780
|
+
propertyName: "_tree",
|
|
781
|
+
first: true,
|
|
782
|
+
predicate: ["componentTree"],
|
|
783
|
+
descendants: true,
|
|
784
|
+
isSignal: true
|
|
785
|
+
}],
|
|
786
|
+
exportAs: ["cmatTransferPickerSource"],
|
|
787
|
+
ngImport: i0,
|
|
788
|
+
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\">暂无数据</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
789
|
+
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"],
|
|
790
|
+
dependencies: [
|
|
791
|
+
{
|
|
792
|
+
kind: "ngmodule",
|
|
793
|
+
type: MatCardModule
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
kind: "component",
|
|
797
|
+
type: i1.MatCard,
|
|
798
|
+
selector: "mat-card",
|
|
799
|
+
inputs: ["appearance"],
|
|
800
|
+
exportAs: ["matCard"]
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
kind: "directive",
|
|
804
|
+
type: i1.MatCardContent,
|
|
805
|
+
selector: "mat-card-content"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
kind: "component",
|
|
809
|
+
type: i1.MatCardHeader,
|
|
810
|
+
selector: "mat-card-header"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
kind: "directive",
|
|
814
|
+
type: i1.MatCardTitle,
|
|
815
|
+
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
kind: "ngmodule",
|
|
819
|
+
type: MatTreeModule
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
kind: "directive",
|
|
823
|
+
type: i2$1.MatTreeNodeDef,
|
|
824
|
+
selector: "[matTreeNodeDef]",
|
|
825
|
+
inputs: ["matTreeNodeDefWhen", "matTreeNode"]
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
kind: "directive",
|
|
829
|
+
type: i2$1.MatTreeNodePadding,
|
|
830
|
+
selector: "[matTreeNodePadding]",
|
|
831
|
+
inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"]
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
kind: "directive",
|
|
835
|
+
type: i2$1.MatTreeNodeToggle,
|
|
836
|
+
selector: "[matTreeNodeToggle]",
|
|
837
|
+
inputs: ["matTreeNodeToggleRecursive"]
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
kind: "component",
|
|
841
|
+
type: i2$1.MatTree,
|
|
842
|
+
selector: "mat-tree",
|
|
843
|
+
exportAs: ["matTree"]
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
kind: "directive",
|
|
847
|
+
type: i2$1.MatTreeNode,
|
|
848
|
+
selector: "mat-tree-node",
|
|
849
|
+
inputs: ["tabIndex", "disabled"],
|
|
850
|
+
outputs: ["activation", "expandedChange"],
|
|
851
|
+
exportAs: ["matTreeNode"]
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
kind: "ngmodule",
|
|
855
|
+
type: MatCheckboxModule
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
kind: "component",
|
|
859
|
+
type: i3.MatCheckbox,
|
|
860
|
+
selector: "mat-checkbox",
|
|
861
|
+
inputs: [
|
|
862
|
+
"aria-label",
|
|
863
|
+
"aria-labelledby",
|
|
864
|
+
"aria-describedby",
|
|
865
|
+
"aria-expanded",
|
|
866
|
+
"aria-controls",
|
|
867
|
+
"aria-owns",
|
|
868
|
+
"id",
|
|
869
|
+
"required",
|
|
870
|
+
"labelPosition",
|
|
871
|
+
"name",
|
|
872
|
+
"value",
|
|
873
|
+
"disableRipple",
|
|
874
|
+
"tabIndex",
|
|
875
|
+
"color",
|
|
876
|
+
"disabledInteractive",
|
|
877
|
+
"checked",
|
|
878
|
+
"disabled",
|
|
879
|
+
"indeterminate"
|
|
880
|
+
],
|
|
881
|
+
outputs: ["change", "indeterminateChange"],
|
|
882
|
+
exportAs: ["matCheckbox"]
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
kind: "ngmodule",
|
|
886
|
+
type: MatIconModule
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
kind: "component",
|
|
890
|
+
type: i2$2.MatIcon,
|
|
891
|
+
selector: "mat-icon",
|
|
892
|
+
inputs: [
|
|
893
|
+
"color",
|
|
894
|
+
"inline",
|
|
895
|
+
"svgIcon",
|
|
896
|
+
"fontSet",
|
|
897
|
+
"fontIcon"
|
|
898
|
+
],
|
|
899
|
+
exportAs: ["matIcon"]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
kind: "ngmodule",
|
|
903
|
+
type: MatButtonModule
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
kind: "component",
|
|
907
|
+
type: i5$1.MatIconButton,
|
|
908
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
909
|
+
exportAs: ["matButton", "matAnchor"]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
kind: "component",
|
|
913
|
+
type: CmatTransferPickerFilterComponent,
|
|
914
|
+
selector: "cmat-transfer-picker-filter",
|
|
915
|
+
inputs: ["filters"],
|
|
916
|
+
exportAs: ["cmatTransferPickerFilter"]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
kind: "component",
|
|
920
|
+
type: CmatTransferPickerSearchComponent,
|
|
921
|
+
selector: "cmat-transfer-picker-search",
|
|
922
|
+
inputs: ["searchPlaceholder"],
|
|
923
|
+
exportAs: ["cmatTransferPickerSearch"]
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
kind: "ngmodule",
|
|
927
|
+
type: ScrollingModule
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
kind: "directive",
|
|
931
|
+
type: i6.ɵɵCdkFixedSizeVirtualScroll,
|
|
932
|
+
selector: "cdk-virtual-scroll-viewport[itemSize]",
|
|
933
|
+
inputs: [
|
|
934
|
+
"itemSize",
|
|
935
|
+
"minBufferPx",
|
|
936
|
+
"maxBufferPx"
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
kind: "component",
|
|
941
|
+
type: i6.ɵɵCdkVirtualScrollViewport,
|
|
942
|
+
selector: "cdk-virtual-scroll-viewport",
|
|
943
|
+
inputs: ["orientation", "appendOnly"],
|
|
944
|
+
outputs: ["scrolledIndexChange"]
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
948
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
953
|
+
minVersion: "12.0.0",
|
|
954
|
+
version: "22.2.3",
|
|
955
|
+
ngImport: i0,
|
|
956
|
+
type: CmatTransferPickerSourceComponent,
|
|
957
|
+
decorators: [{
|
|
958
|
+
type: Component,
|
|
959
|
+
args: [{
|
|
960
|
+
selector: "cmat-transfer-picker-source",
|
|
961
|
+
encapsulation: ViewEncapsulation.None,
|
|
962
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
963
|
+
exportAs: "cmatTransferPickerSource",
|
|
964
|
+
imports: [
|
|
965
|
+
MatCardModule,
|
|
966
|
+
MatTreeModule,
|
|
967
|
+
MatCheckboxModule,
|
|
968
|
+
MatIconModule,
|
|
969
|
+
MatButtonModule,
|
|
970
|
+
CmatTransferPickerFilterComponent,
|
|
971
|
+
CmatTransferPickerSearchComponent,
|
|
972
|
+
ScrollingModule
|
|
973
|
+
],
|
|
974
|
+
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\">暂无数据</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
975
|
+
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"]
|
|
976
|
+
}]
|
|
977
|
+
}],
|
|
978
|
+
ctorParameters: () => [],
|
|
979
|
+
propDecorators: { _tree: [{
|
|
980
|
+
type: i0.ViewChild,
|
|
981
|
+
args: ["componentTree", { isSignal: true }]
|
|
982
|
+
}] }
|
|
983
|
+
});
|
|
984
|
+
var CmatTransferPickerTargetComponent = class CmatTransferPickerTargetComponent {
|
|
985
|
+
constructor() {
|
|
986
|
+
this.committedSelection = input([], ...ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []);
|
|
987
|
+
this.clearItemChange = output();
|
|
988
|
+
}
|
|
989
|
+
clearItem(item) {
|
|
990
|
+
this.clearItemChange.emit(item);
|
|
991
|
+
}
|
|
992
|
+
static {
|
|
993
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
994
|
+
minVersion: "12.0.0",
|
|
995
|
+
version: "22.2.3",
|
|
996
|
+
ngImport: i0,
|
|
997
|
+
type: CmatTransferPickerTargetComponent,
|
|
998
|
+
deps: [],
|
|
999
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
static {
|
|
1003
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1004
|
+
minVersion: "17.0.0",
|
|
1005
|
+
version: "22.2.3",
|
|
1006
|
+
type: CmatTransferPickerTargetComponent,
|
|
1007
|
+
isStandalone: true,
|
|
1008
|
+
selector: "cmat-transfer-picker-target",
|
|
1009
|
+
inputs: { committedSelection: {
|
|
1010
|
+
classPropertyName: "committedSelection",
|
|
1011
|
+
publicName: "committedSelection",
|
|
1012
|
+
isSignal: true,
|
|
1013
|
+
isRequired: false,
|
|
1014
|
+
transformFunction: null
|
|
1015
|
+
} },
|
|
1016
|
+
outputs: { clearItemChange: "clearItemChange" },
|
|
1017
|
+
exportAs: ["cmatTransferPickerTarget"],
|
|
1018
|
+
ngImport: i0,
|
|
1019
|
+
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\">已选择 {{committedSelection().length}} 项</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\">暂无数据</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
1020
|
+
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"],
|
|
1021
|
+
dependencies: [
|
|
1022
|
+
{
|
|
1023
|
+
kind: "ngmodule",
|
|
1024
|
+
type: MatCardModule
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
kind: "component",
|
|
1028
|
+
type: i1.MatCard,
|
|
1029
|
+
selector: "mat-card",
|
|
1030
|
+
inputs: ["appearance"],
|
|
1031
|
+
exportAs: ["matCard"]
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
kind: "directive",
|
|
1035
|
+
type: i1.MatCardContent,
|
|
1036
|
+
selector: "mat-card-content"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
kind: "component",
|
|
1040
|
+
type: i1.MatCardHeader,
|
|
1041
|
+
selector: "mat-card-header"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
kind: "directive",
|
|
1045
|
+
type: i1.MatCardTitle,
|
|
1046
|
+
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
kind: "ngmodule",
|
|
1050
|
+
type: MatListModule
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
kind: "component",
|
|
1054
|
+
type: i2.MatList,
|
|
1055
|
+
selector: "mat-list",
|
|
1056
|
+
exportAs: ["matList"]
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
kind: "component",
|
|
1060
|
+
type: i2.MatListItem,
|
|
1061
|
+
selector: "mat-list-item, a[mat-list-item], button[mat-list-item]",
|
|
1062
|
+
inputs: ["activated"],
|
|
1063
|
+
exportAs: ["matListItem"]
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
kind: "ngmodule",
|
|
1067
|
+
type: MatIconModule
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
kind: "component",
|
|
1071
|
+
type: i2$2.MatIcon,
|
|
1072
|
+
selector: "mat-icon",
|
|
1073
|
+
inputs: [
|
|
1074
|
+
"color",
|
|
1075
|
+
"inline",
|
|
1076
|
+
"svgIcon",
|
|
1077
|
+
"fontSet",
|
|
1078
|
+
"fontIcon"
|
|
1079
|
+
],
|
|
1080
|
+
exportAs: ["matIcon"]
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
kind: "ngmodule",
|
|
1084
|
+
type: ScrollingModule
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
kind: "directive",
|
|
1088
|
+
type: i6.ɵɵCdkFixedSizeVirtualScroll,
|
|
1089
|
+
selector: "cdk-virtual-scroll-viewport[itemSize]",
|
|
1090
|
+
inputs: [
|
|
1091
|
+
"itemSize",
|
|
1092
|
+
"minBufferPx",
|
|
1093
|
+
"maxBufferPx"
|
|
1094
|
+
]
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
kind: "component",
|
|
1098
|
+
type: i6.ɵɵCdkVirtualScrollViewport,
|
|
1099
|
+
selector: "cdk-virtual-scroll-viewport",
|
|
1100
|
+
inputs: ["orientation", "appendOnly"],
|
|
1101
|
+
outputs: ["scrolledIndexChange"]
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
kind: "ngmodule",
|
|
1105
|
+
type: MatButtonModule
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
kind: "component",
|
|
1109
|
+
type: i5$1.MatIconButton,
|
|
1110
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
1111
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1115
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1120
|
+
minVersion: "12.0.0",
|
|
1121
|
+
version: "22.2.3",
|
|
1122
|
+
ngImport: i0,
|
|
1123
|
+
type: CmatTransferPickerTargetComponent,
|
|
1124
|
+
decorators: [{
|
|
1125
|
+
type: Component,
|
|
1126
|
+
args: [{
|
|
1127
|
+
selector: "cmat-transfer-picker-target",
|
|
1128
|
+
encapsulation: ViewEncapsulation.None,
|
|
1129
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1130
|
+
exportAs: "cmatTransferPickerTarget",
|
|
1131
|
+
imports: [
|
|
1132
|
+
MatCardModule,
|
|
1133
|
+
MatListModule,
|
|
1134
|
+
MatIconModule,
|
|
1135
|
+
ScrollingModule,
|
|
1136
|
+
MatButtonModule
|
|
1137
|
+
],
|
|
1138
|
+
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\">已选择 {{committedSelection().length}} 项</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\">暂无数据</div>\r\n }\r\n </cdk-virtual-scroll-viewport>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
1139
|
+
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"]
|
|
1140
|
+
}]
|
|
1141
|
+
}],
|
|
1142
|
+
propDecorators: {
|
|
1143
|
+
committedSelection: [{
|
|
1144
|
+
type: i0.Input,
|
|
1145
|
+
args: [{
|
|
1146
|
+
isSignal: true,
|
|
1147
|
+
alias: "committedSelection",
|
|
1148
|
+
required: false
|
|
1149
|
+
}]
|
|
1150
|
+
}],
|
|
1151
|
+
clearItemChange: [{
|
|
1152
|
+
type: i0.Output,
|
|
1153
|
+
args: ["clearItemChange"]
|
|
1154
|
+
}]
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
var CmatTransferPickerComponent = class CmatTransferPickerComponent {
|
|
1158
|
+
constructor() {
|
|
1159
|
+
this.title = input(...ngDevMode ? [void 0, { debugName: "title" }] : /* istanbul ignore next */ []);
|
|
1160
|
+
this.filterable = input(true, ...ngDevMode ? [{ debugName: "filterable" }] : /* istanbul ignore next */ []);
|
|
1161
|
+
this.searchable = input(false, ...ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []);
|
|
1162
|
+
this.searchPlaceholder = input("请输入关键字", ...ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []);
|
|
1163
|
+
this.dataSource = input([], ...ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []);
|
|
1164
|
+
this.filters = input([], ...ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []);
|
|
1165
|
+
this.selectedValues = input([], ...ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []);
|
|
1166
|
+
this.selectChange = output();
|
|
1167
|
+
this.committedSelection = signal([], ...ngDevMode ? [{ debugName: "committedSelection" }] : /* istanbul ignore next */ []);
|
|
1168
|
+
this.source = viewChild.required(CmatTransferPickerSourceComponent, ...ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []);
|
|
1169
|
+
this._service = inject(CmatTransferPickerService);
|
|
1170
|
+
this._injector = inject(Injector);
|
|
1171
|
+
}
|
|
1172
|
+
ngOnInit() {
|
|
1173
|
+
this._service.dataSource = this.dataSource();
|
|
1174
|
+
this._service.selectedValues = this.selectedValues();
|
|
1175
|
+
this._service.sourceOptions = {
|
|
1176
|
+
title: this.title() ?? "数据源",
|
|
1177
|
+
filterable: this.filterable() || true,
|
|
1178
|
+
searchable: this.searchable() || true,
|
|
1179
|
+
searchPlaceholder: this.searchPlaceholder() || "搜索关键字",
|
|
1180
|
+
filters: this.filters() || []
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
ngAfterViewInit() {
|
|
1184
|
+
if (this.selectedValues().length) afterNextRender(() => {
|
|
1185
|
+
this.pick();
|
|
1186
|
+
}, { injector: this._injector });
|
|
1187
|
+
}
|
|
1188
|
+
pick() {
|
|
1189
|
+
this._commitSelection(this.source().commitSelection());
|
|
1190
|
+
}
|
|
1191
|
+
reset() {
|
|
1192
|
+
if (this.committedSelection().length) {
|
|
1193
|
+
this._commitSelection([]);
|
|
1194
|
+
this._service.resetDataSource(true);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
onClearItemChange(item) {
|
|
1198
|
+
if (item) {
|
|
1199
|
+
this.source().resetSelectedItem(item);
|
|
1200
|
+
this._commitSelection(this.source().getCommittedSelection());
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
_commitSelection(selectedList) {
|
|
1204
|
+
this.committedSelection.set([...selectedList]);
|
|
1205
|
+
this._emitterChange();
|
|
1206
|
+
}
|
|
1207
|
+
_emitterChange() {
|
|
1208
|
+
this.selectChange.emit(this.committedSelection());
|
|
1209
|
+
}
|
|
1210
|
+
static {
|
|
1211
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1212
|
+
minVersion: "12.0.0",
|
|
1213
|
+
version: "22.2.3",
|
|
1214
|
+
ngImport: i0,
|
|
1215
|
+
type: CmatTransferPickerComponent,
|
|
1216
|
+
deps: [],
|
|
1217
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
static {
|
|
1221
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1222
|
+
minVersion: "17.2.0",
|
|
1223
|
+
version: "22.2.3",
|
|
1224
|
+
type: CmatTransferPickerComponent,
|
|
1225
|
+
isStandalone: true,
|
|
1226
|
+
selector: "cmat-transfer-picker",
|
|
1227
|
+
inputs: {
|
|
1228
|
+
title: {
|
|
1229
|
+
classPropertyName: "title",
|
|
1230
|
+
publicName: "title",
|
|
1231
|
+
isSignal: true,
|
|
1232
|
+
isRequired: false,
|
|
1233
|
+
transformFunction: null
|
|
1234
|
+
},
|
|
1235
|
+
filterable: {
|
|
1236
|
+
classPropertyName: "filterable",
|
|
1237
|
+
publicName: "filterable",
|
|
1238
|
+
isSignal: true,
|
|
1239
|
+
isRequired: false,
|
|
1240
|
+
transformFunction: null
|
|
1241
|
+
},
|
|
1242
|
+
searchable: {
|
|
1243
|
+
classPropertyName: "searchable",
|
|
1244
|
+
publicName: "searchable",
|
|
1245
|
+
isSignal: true,
|
|
1246
|
+
isRequired: false,
|
|
1247
|
+
transformFunction: null
|
|
1248
|
+
},
|
|
1249
|
+
searchPlaceholder: {
|
|
1250
|
+
classPropertyName: "searchPlaceholder",
|
|
1251
|
+
publicName: "searchPlaceholder",
|
|
1252
|
+
isSignal: true,
|
|
1253
|
+
isRequired: false,
|
|
1254
|
+
transformFunction: null
|
|
1255
|
+
},
|
|
1256
|
+
dataSource: {
|
|
1257
|
+
classPropertyName: "dataSource",
|
|
1258
|
+
publicName: "dataSource",
|
|
1259
|
+
isSignal: true,
|
|
1260
|
+
isRequired: false,
|
|
1261
|
+
transformFunction: null
|
|
1262
|
+
},
|
|
1263
|
+
filters: {
|
|
1264
|
+
classPropertyName: "filters",
|
|
1265
|
+
publicName: "filters",
|
|
1266
|
+
isSignal: true,
|
|
1267
|
+
isRequired: false,
|
|
1268
|
+
transformFunction: null
|
|
1269
|
+
},
|
|
1270
|
+
selectedValues: {
|
|
1271
|
+
classPropertyName: "selectedValues",
|
|
1272
|
+
publicName: "selectedValues",
|
|
1273
|
+
isSignal: true,
|
|
1274
|
+
isRequired: false,
|
|
1275
|
+
transformFunction: null
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1278
|
+
outputs: { selectChange: "selectChange" },
|
|
1279
|
+
viewQueries: [{
|
|
1280
|
+
propertyName: "source",
|
|
1281
|
+
first: true,
|
|
1282
|
+
predicate: CmatTransferPickerSourceComponent,
|
|
1283
|
+
descendants: true,
|
|
1284
|
+
isSignal: true
|
|
1285
|
+
}],
|
|
1286
|
+
exportAs: ["cmatTransferPicker"],
|
|
1287
|
+
ngImport: i0,
|
|
1288
|
+
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 选择<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>重置\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",
|
|
1289
|
+
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"],
|
|
1290
|
+
dependencies: [
|
|
1291
|
+
{
|
|
1292
|
+
kind: "ngmodule",
|
|
1293
|
+
type: MatIconModule
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
kind: "component",
|
|
1297
|
+
type: i2$2.MatIcon,
|
|
1298
|
+
selector: "mat-icon",
|
|
1299
|
+
inputs: [
|
|
1300
|
+
"color",
|
|
1301
|
+
"inline",
|
|
1302
|
+
"svgIcon",
|
|
1303
|
+
"fontSet",
|
|
1304
|
+
"fontIcon"
|
|
1305
|
+
],
|
|
1306
|
+
exportAs: ["matIcon"]
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
kind: "ngmodule",
|
|
1310
|
+
type: MatButtonModule
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
kind: "component",
|
|
1314
|
+
type: i5$1.MatButton,
|
|
1315
|
+
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] ",
|
|
1316
|
+
inputs: ["matButton"],
|
|
1317
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
kind: "component",
|
|
1321
|
+
type: CmatTransferPickerSourceComponent,
|
|
1322
|
+
selector: "cmat-transfer-picker-source",
|
|
1323
|
+
exportAs: ["cmatTransferPickerSource"]
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
kind: "component",
|
|
1327
|
+
type: CmatTransferPickerTargetComponent,
|
|
1328
|
+
selector: "cmat-transfer-picker-target",
|
|
1329
|
+
inputs: ["committedSelection"],
|
|
1330
|
+
outputs: ["clearItemChange"],
|
|
1331
|
+
exportAs: ["cmatTransferPickerTarget"]
|
|
1332
|
+
}
|
|
1333
|
+
],
|
|
1334
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1335
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1340
|
+
minVersion: "12.0.0",
|
|
1341
|
+
version: "22.2.3",
|
|
1342
|
+
ngImport: i0,
|
|
1343
|
+
type: CmatTransferPickerComponent,
|
|
1344
|
+
decorators: [{
|
|
1345
|
+
type: Component,
|
|
1346
|
+
args: [{
|
|
1347
|
+
selector: "cmat-transfer-picker",
|
|
1348
|
+
encapsulation: ViewEncapsulation.None,
|
|
1349
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1350
|
+
exportAs: "cmatTransferPicker",
|
|
1351
|
+
imports: [
|
|
1352
|
+
MatIconModule,
|
|
1353
|
+
MatButtonModule,
|
|
1354
|
+
CmatTransferPickerSourceComponent,
|
|
1355
|
+
CmatTransferPickerTargetComponent
|
|
1356
|
+
],
|
|
1357
|
+
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 选择<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>重置\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",
|
|
1358
|
+
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"]
|
|
1359
|
+
}]
|
|
1360
|
+
}],
|
|
1361
|
+
propDecorators: {
|
|
1362
|
+
title: [{
|
|
1363
|
+
type: i0.Input,
|
|
1364
|
+
args: [{
|
|
1365
|
+
isSignal: true,
|
|
1366
|
+
alias: "title",
|
|
1367
|
+
required: false
|
|
1368
|
+
}]
|
|
1369
|
+
}],
|
|
1370
|
+
filterable: [{
|
|
1371
|
+
type: i0.Input,
|
|
1372
|
+
args: [{
|
|
1373
|
+
isSignal: true,
|
|
1374
|
+
alias: "filterable",
|
|
1375
|
+
required: false
|
|
1376
|
+
}]
|
|
1377
|
+
}],
|
|
1378
|
+
searchable: [{
|
|
1379
|
+
type: i0.Input,
|
|
1380
|
+
args: [{
|
|
1381
|
+
isSignal: true,
|
|
1382
|
+
alias: "searchable",
|
|
1383
|
+
required: false
|
|
1384
|
+
}]
|
|
1385
|
+
}],
|
|
1386
|
+
searchPlaceholder: [{
|
|
1387
|
+
type: i0.Input,
|
|
1388
|
+
args: [{
|
|
1389
|
+
isSignal: true,
|
|
1390
|
+
alias: "searchPlaceholder",
|
|
1391
|
+
required: false
|
|
1392
|
+
}]
|
|
1393
|
+
}],
|
|
1394
|
+
dataSource: [{
|
|
1395
|
+
type: i0.Input,
|
|
1396
|
+
args: [{
|
|
1397
|
+
isSignal: true,
|
|
1398
|
+
alias: "dataSource",
|
|
1399
|
+
required: false
|
|
1400
|
+
}]
|
|
1401
|
+
}],
|
|
1402
|
+
filters: [{
|
|
1403
|
+
type: i0.Input,
|
|
1404
|
+
args: [{
|
|
1405
|
+
isSignal: true,
|
|
1406
|
+
alias: "filters",
|
|
1407
|
+
required: false
|
|
1408
|
+
}]
|
|
1409
|
+
}],
|
|
1410
|
+
selectedValues: [{
|
|
1411
|
+
type: i0.Input,
|
|
1412
|
+
args: [{
|
|
1413
|
+
isSignal: true,
|
|
1414
|
+
alias: "selectedValues",
|
|
1415
|
+
required: false
|
|
1416
|
+
}]
|
|
1417
|
+
}],
|
|
1418
|
+
selectChange: [{
|
|
1419
|
+
type: i0.Output,
|
|
1420
|
+
args: ["selectChange"]
|
|
1421
|
+
}],
|
|
1422
|
+
source: [{
|
|
1423
|
+
type: i0.ViewChild,
|
|
1424
|
+
args: [i0.forwardRef(() => CmatTransferPickerSourceComponent), { isSignal: true }]
|
|
1425
|
+
}]
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
595
1428
|
export { CmatTransferFilterCondition, CmatTransferItemFlatNode, CmatTransferItemNode, CmatTransferPickerComponent, CmatTransferPickerFilterComponent, CmatTransferPickerSearchComponent, CmatTransferPickerService, CmatTransferPickerSourceComponent, CmatTransferPickerTargetComponent };
|
|
596
|
-
|
|
1429
|
+
|
|
1430
|
+
//# sourceMappingURL=cmat-components-transfer-picker.mjs.map
|