cmat 0.0.111 → 0.0.113
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 +2761 -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 +984 -1109
- 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 +39805 -22511
- 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 +1138 -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 -102
- 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 -5204
|
@@ -1,692 +1,1000 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from
|
|
2
|
-
import { SelectionModel } from
|
|
3
|
-
import { NgClass } from
|
|
4
|
-
import * as i0 from
|
|
5
|
-
import {
|
|
6
|
-
import { takeUntilDestroyed } from
|
|
7
|
-
import * as i3 from
|
|
8
|
-
import { FormControl, NgControl, ReactiveFormsModule } from
|
|
9
|
-
import * as i5 from
|
|
10
|
-
import { MatButtonModule } from
|
|
11
|
-
import * as i6 from
|
|
12
|
-
import { MatCheckboxModule } from
|
|
13
|
-
import { MatFormFieldControl } from
|
|
14
|
-
import * as i1 from
|
|
15
|
-
import { MatIconModule } from
|
|
16
|
-
import * as i2 from
|
|
17
|
-
import { MatSelectModule } from
|
|
18
|
-
import * as i4 from
|
|
19
|
-
import { MatTreeModule } from
|
|
20
|
-
import { CmatSelectSearchComponent } from
|
|
21
|
-
import { isNil } from
|
|
22
|
-
import { Subject, debounceTime } from
|
|
23
|
-
|
|
24
|
-
class CmatSelectTreeFlatNode {
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
1
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
2
|
+
import { SelectionModel } from "@angular/cdk/collections";
|
|
3
|
+
import { NgClass } from "@angular/common";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, HostListener, Input, ViewEncapsulation, effect, inject, input, signal, untracked, viewChild } from "@angular/core";
|
|
6
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
7
|
+
import * as i3 from "@angular/forms";
|
|
8
|
+
import { FormControl, NgControl, ReactiveFormsModule } from "@angular/forms";
|
|
9
|
+
import * as i5 from "@angular/material/button";
|
|
10
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
11
|
+
import * as i6 from "@angular/material/checkbox";
|
|
12
|
+
import { MatCheckboxModule } from "@angular/material/checkbox";
|
|
13
|
+
import { MatFormFieldControl } from "@angular/material/form-field";
|
|
14
|
+
import * as i1 from "@angular/material/icon";
|
|
15
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
16
|
+
import * as i2 from "@angular/material/select";
|
|
17
|
+
import { MatSelectModule } from "@angular/material/select";
|
|
18
|
+
import * as i4 from "@angular/material/tree";
|
|
19
|
+
import { MatTreeModule } from "@angular/material/tree";
|
|
20
|
+
import { CmatSelectSearchComponent } from "cmat/components/select-search";
|
|
21
|
+
import { isNil } from "lodash-es";
|
|
22
|
+
import { Subject, debounceTime } from "rxjs";
|
|
23
|
+
var CmatSelectTreeFlatNode = class {};
|
|
28
24
|
let NEXT_ID = 0;
|
|
29
|
-
class CmatSelectTreeComponent {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
], viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true, isSignal: true }, { propertyName: "_matSelectSignal", first: true, predicate: ["componentSelect"], descendants: true, isSignal: true }, { propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true, isSignal: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\n", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "debounceTime", "optionsCount"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
25
|
+
var CmatSelectTreeComponent = class CmatSelectTreeComponent {
|
|
26
|
+
constructor() {
|
|
27
|
+
this.id = `cmat-select-tree-${NEXT_ID++}`;
|
|
28
|
+
this.dataSource = input([], ...ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.noEntriesFoundLabel = input("无结果", ...ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.showNoFoundLabel = input(true, ...ngDevMode ? [{ debugName: "showNoFoundLabel" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.multiple = input(false, ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.overallSearchEnabled = input(true, ...ngDevMode ? [{ debugName: "overallSearchEnabled" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.canNull = input(false, ...ngDevMode ? [{ debugName: "canNull" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.customTriggerLabelFn = input(...ngDevMode ? [void 0, { debugName: "customTriggerLabelFn" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.customTriggerLabelTemplate = input(...ngDevMode ? [void 0, { debugName: "customTriggerLabelTemplate" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.expandable = input(...ngDevMode ? [void 0, { debugName: "expandable" }] : /* istanbul ignore next */ []);
|
|
37
|
+
this.showToggleAllCheckbox = input(false, ...ngDevMode ? [{ debugName: "showToggleAllCheckbox" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.compareWith = input((o1, o2) => {
|
|
39
|
+
return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
|
|
40
|
+
}, ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this.flatNodeMap = /* @__PURE__ */ new Map();
|
|
42
|
+
this.nestedNodeMap = /* @__PURE__ */ new Map();
|
|
43
|
+
this._flatNodeById = /* @__PURE__ */ new Map();
|
|
44
|
+
this._parentFlatNodeById = /* @__PURE__ */ new Map();
|
|
45
|
+
this._selectedFlatNodeIds = /* @__PURE__ */ new Set();
|
|
46
|
+
this.checklistSelection = new SelectionModel(true);
|
|
47
|
+
this.treeDataSource = signal([], ...ngDevMode ? [{ debugName: "treeDataSource" }] : /* istanbul ignore next */ []);
|
|
48
|
+
this.dataFlatNodes = signal([], ...ngDevMode ? [{ debugName: "dataFlatNodes" }] : /* istanbul ignore next */ []);
|
|
49
|
+
this.overallFilterControl = new FormControl();
|
|
50
|
+
this.isIndeterminate = signal(false, ...ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []);
|
|
51
|
+
this.isChecked = signal(false, ...ngDevMode ? [{ debugName: "isChecked" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this.checkCount = signal(0, ...ngDevMode ? [{ debugName: "checkCount" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.selectControl = new FormControl();
|
|
54
|
+
this.matSelectData = signal([], ...ngDevMode ? [{ debugName: "matSelectData" }] : /* istanbul ignore next */ []);
|
|
55
|
+
this.stateChanges = new Subject();
|
|
56
|
+
this.focused = false;
|
|
57
|
+
this.touched = false;
|
|
58
|
+
this.ngControl = inject(NgControl, {
|
|
59
|
+
optional: true,
|
|
60
|
+
self: true
|
|
61
|
+
});
|
|
62
|
+
this._destroyRef = inject(DestroyRef);
|
|
63
|
+
this.tree = viewChild("componentTree", ...ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []);
|
|
64
|
+
this._matSelectSignal = viewChild("componentSelect", ...ngDevMode ? [{ debugName: "_matSelectSignal" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this._matSelectSearch = viewChild(CmatSelectSearchComponent, ...ngDevMode ? [{ debugName: "_matSelectSearch" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.getLevel = (dataNode) => dataNode.level;
|
|
67
|
+
this.childrenAccessor = (node) => node.children ?? [];
|
|
68
|
+
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
69
|
+
this._placeholder = "";
|
|
70
|
+
this._required = false;
|
|
71
|
+
this._disabled = false;
|
|
72
|
+
this._onModelChange = () => {};
|
|
73
|
+
this._onTouchedChange = () => {};
|
|
74
|
+
this._transformer = (node, level, parent = null) => {
|
|
75
|
+
const existingNode = this.nestedNodeMap.get(node);
|
|
76
|
+
const flatNode = existingNode?.name === node.name ? existingNode : new CmatSelectTreeFlatNode();
|
|
77
|
+
flatNode.id = node.id;
|
|
78
|
+
flatNode.name = node.name;
|
|
79
|
+
flatNode.level = level;
|
|
80
|
+
flatNode.expandable = !!node.children && node.children.length > 0;
|
|
81
|
+
this.flatNodeMap.set(flatNode, node);
|
|
82
|
+
this.nestedNodeMap.set(node, flatNode);
|
|
83
|
+
this._flatNodeById.set(flatNode.id, flatNode);
|
|
84
|
+
this._parentFlatNodeById.set(flatNode.id, parent);
|
|
85
|
+
return flatNode;
|
|
86
|
+
};
|
|
87
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
88
|
+
effect(() => {
|
|
89
|
+
const matSelect = this._matSelectSignal();
|
|
90
|
+
if (matSelect && !this._matSelect) {
|
|
91
|
+
this._matSelect = matSelect;
|
|
92
|
+
{
|
|
93
|
+
untracked(() => {
|
|
94
|
+
this._init(this.value);
|
|
95
|
+
});
|
|
96
|
+
this._matSelect.setDisabledState(this.disabled);
|
|
97
|
+
let panelClass = ["overflow-y-auto", "scrollbar-custom"];
|
|
98
|
+
if (this._matSelect.panelClass) {
|
|
99
|
+
if (Array.isArray(this._matSelect.panelClass)) this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
|
|
100
|
+
else if (typeof this._matSelect.panelClass === "string") this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
|
|
101
|
+
else if (typeof this._matSelect.panelClass === "object") {
|
|
102
|
+
const panelClassEntries = this._matSelect.panelClass;
|
|
103
|
+
panelClass.forEach((i) => {
|
|
104
|
+
panelClassEntries[i] = true;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
} else this._matSelect.panelClass = panelClass;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
clickedOut() {
|
|
113
|
+
if (!this._matSelect?.panelOpen) {
|
|
114
|
+
this.focused = false;
|
|
115
|
+
this.stateChanges.next();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
ngOnChanges(changes) {
|
|
119
|
+
if (changes["dataSource"]) {
|
|
120
|
+
this.flatNodeMap.clear();
|
|
121
|
+
this.nestedNodeMap.clear();
|
|
122
|
+
this._flatNodeById.clear();
|
|
123
|
+
this._parentFlatNodeById.clear();
|
|
124
|
+
const dataSource = this.dataSource();
|
|
125
|
+
this.treeDataSource.set(dataSource);
|
|
126
|
+
this.dataFlatNodes.set(this._getFlattenNodes(dataSource));
|
|
127
|
+
this.matSelectData.set([...this.dataFlatNodes()]);
|
|
128
|
+
if (dataSource.length > 0) this._init(this.value);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
ngAfterViewInit() {
|
|
132
|
+
this.overallFilterControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(200)).subscribe(() => {
|
|
133
|
+
const filterValue = `${this.overallFilterControl.value ?? ""}`.toLowerCase();
|
|
134
|
+
const dataClone = this._cloneTreeNodes(this.dataSource());
|
|
135
|
+
const arr = [];
|
|
136
|
+
for (let i = dataClone.length - 1; i >= 0; i--) if (!this._applyColumnLevelFilters(dataClone[i], filterValue)) arr.push(i);
|
|
137
|
+
arr.forEach((v) => {
|
|
138
|
+
dataClone.splice(v, 1);
|
|
139
|
+
});
|
|
140
|
+
this.treeDataSource.set(dataClone);
|
|
141
|
+
this.dataFlatNodes.set(this._getFlattenNodes(dataClone));
|
|
142
|
+
this.matSelectData.set([...this.dataFlatNodes()]);
|
|
143
|
+
const treeInstance = this.tree();
|
|
144
|
+
if (treeInstance && this.expandable()) treeInstance.expandAll();
|
|
145
|
+
this._updateSelect(this.checklistSelection.selected);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
ngOnDestroy() {
|
|
149
|
+
this.stateChanges.complete();
|
|
150
|
+
}
|
|
151
|
+
get placeholder() {
|
|
152
|
+
return this._placeholder;
|
|
153
|
+
}
|
|
154
|
+
set placeholder(value) {
|
|
155
|
+
this._placeholder = value;
|
|
156
|
+
this.stateChanges.next();
|
|
157
|
+
}
|
|
158
|
+
get value() {
|
|
159
|
+
return this._value;
|
|
160
|
+
}
|
|
161
|
+
set value(value) {
|
|
162
|
+
if (value !== this._value) {
|
|
163
|
+
this._value = value;
|
|
164
|
+
this.stateChanges.next();
|
|
165
|
+
this._onModelChange(value);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
get empty() {
|
|
169
|
+
return !this._value;
|
|
170
|
+
}
|
|
171
|
+
get errorState() {
|
|
172
|
+
if (this.ngControl == null) return false;
|
|
173
|
+
return (this.touched && this.ngControl?.invalid) ?? false;
|
|
174
|
+
}
|
|
175
|
+
get shouldLabelFloat() {
|
|
176
|
+
return this.focused || !this.empty;
|
|
177
|
+
}
|
|
178
|
+
get required() {
|
|
179
|
+
return this._required;
|
|
180
|
+
}
|
|
181
|
+
set required(value) {
|
|
182
|
+
this._required = coerceBooleanProperty(value);
|
|
183
|
+
this.stateChanges.next();
|
|
184
|
+
}
|
|
185
|
+
get disabled() {
|
|
186
|
+
if (!isNil(this.ngControl?.disabled)) return this.ngControl.disabled;
|
|
187
|
+
return this._disabled;
|
|
188
|
+
}
|
|
189
|
+
set disabled(value) {
|
|
190
|
+
this._disabled = coerceBooleanProperty(value);
|
|
191
|
+
if (this.focused) {
|
|
192
|
+
this.focused = false;
|
|
193
|
+
this.stateChanges.next();
|
|
194
|
+
}
|
|
195
|
+
this._matSelect?.setDisabledState(this._disabled);
|
|
196
|
+
}
|
|
197
|
+
registerOnChange(fn) {
|
|
198
|
+
this._onModelChange = fn;
|
|
199
|
+
}
|
|
200
|
+
registerOnTouched(fn) {
|
|
201
|
+
this._onTouchedChange = fn;
|
|
202
|
+
}
|
|
203
|
+
setDisabledState(isDisabled) {
|
|
204
|
+
this._matSelect?.setDisabledState(isDisabled);
|
|
205
|
+
}
|
|
206
|
+
setDescribedByIds(ids) {
|
|
207
|
+
this._matSelect?.setDescribedByIds(ids);
|
|
208
|
+
}
|
|
209
|
+
onContainerClick() {
|
|
210
|
+
if (!this.focused) this._matSelect?.focus();
|
|
211
|
+
}
|
|
212
|
+
onFocusIn() {
|
|
213
|
+
if (!this.focused) {
|
|
214
|
+
this.focused = true;
|
|
215
|
+
this.stateChanges.next();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
onFocusOut(event) {
|
|
219
|
+
const relatedTarget = event.relatedTarget;
|
|
220
|
+
const panelElement = this._matSelect?.panel?.nativeElement;
|
|
221
|
+
if (!(relatedTarget instanceof Element) || !panelElement?.contains(relatedTarget)) {
|
|
222
|
+
this.touched = true;
|
|
223
|
+
this.focused = false;
|
|
224
|
+
this._onTouchedChange();
|
|
225
|
+
this.stateChanges.next();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
writeValue(value) {
|
|
229
|
+
this._init(value);
|
|
230
|
+
}
|
|
231
|
+
simpleTriggerLabelFn(value) {
|
|
232
|
+
return value.map((node) => {
|
|
233
|
+
if (isNil(node)) return "";
|
|
234
|
+
const customTriggerLabelTemplate = this.customTriggerLabelTemplate();
|
|
235
|
+
if (isNil(customTriggerLabelTemplate) || typeof customTriggerLabelTemplate !== "string" || customTriggerLabelTemplate.trim().length === 0) return `${node.id}`;
|
|
236
|
+
let atLeastPartialSubstitution = false;
|
|
237
|
+
const nodeRecord = node;
|
|
238
|
+
const substitution = customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
|
|
239
|
+
const nodeValue = nodeRecord[key];
|
|
240
|
+
if (isNil(nodeValue) || typeof nodeValue !== "string" && typeof nodeValue !== "number" && typeof nodeValue !== "boolean" && typeof nodeValue !== "bigint") return "";
|
|
241
|
+
atLeastPartialSubstitution = true;
|
|
242
|
+
return String(nodeValue);
|
|
243
|
+
});
|
|
244
|
+
if (atLeastPartialSubstitution === false) return `${node.id}`;
|
|
245
|
+
return substitution.trim();
|
|
246
|
+
}).join(", ");
|
|
247
|
+
}
|
|
248
|
+
openedChange(opened) {
|
|
249
|
+
if (opened) {
|
|
250
|
+
if (this.multiple()) {
|
|
251
|
+
this.checklistSelection.selected.forEach((node) => {
|
|
252
|
+
if (node.expandable) {
|
|
253
|
+
const descendants = this._getDescendants(node);
|
|
254
|
+
this.checklistSelection.select(...descendants);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
this._updateSelect(this.checklistSelection.selected);
|
|
258
|
+
}
|
|
259
|
+
const treeInstance = this.tree();
|
|
260
|
+
if (treeInstance && this.expandable()) treeInstance.expandAll();
|
|
261
|
+
} else setTimeout(() => {
|
|
262
|
+
if (!isNil(this.checklistSelection.selected)) {
|
|
263
|
+
if (this.multiple()) {
|
|
264
|
+
const findOutNode = [];
|
|
265
|
+
this.checklistSelection.selected.forEach((node) => {
|
|
266
|
+
const parentNode = this._getParentNode(node);
|
|
267
|
+
if (parentNode && this.checklistSelection.isSelected(parentNode)) findOutNode.push(node);
|
|
268
|
+
});
|
|
269
|
+
findOutNode.forEach((node) => {
|
|
270
|
+
this.checklistSelection.deselect(node);
|
|
271
|
+
});
|
|
272
|
+
this.value = this.checklistSelection.selected.length > 0 ? [...this.checklistSelection.selected] : null;
|
|
273
|
+
} else if (this.checklistSelection.selected && this.checklistSelection.selected.length > 0) this.value = { ...this.checklistSelection.selected[0] };
|
|
274
|
+
this._matSelect?.writeValue(this.value);
|
|
275
|
+
this._matSelect?._onChange(this.value);
|
|
276
|
+
}
|
|
277
|
+
}, 100);
|
|
278
|
+
}
|
|
279
|
+
descendantsAllSelected(node) {
|
|
280
|
+
return this._getDescendants(node).every((child) => this._selectedFlatNodeIds.has(child.id));
|
|
281
|
+
}
|
|
282
|
+
descendantsPartiallySelected(node) {
|
|
283
|
+
const descendants = this._getDescendants(node);
|
|
284
|
+
return descendants.some((child) => this._selectedFlatNodeIds.has(child.id)) && !descendants.every((child) => this._selectedFlatNodeIds.has(child.id));
|
|
285
|
+
}
|
|
286
|
+
todoItemSelectionToggle(event, node) {
|
|
287
|
+
event.stopPropagation();
|
|
288
|
+
if (this.multiple()) {
|
|
289
|
+
this.checklistSelection.toggle(node);
|
|
290
|
+
const descendants = this._getDescendants(node);
|
|
291
|
+
if (this.checklistSelection.isSelected(node)) this.checklistSelection.select(...descendants);
|
|
292
|
+
else this.checklistSelection.deselect(...descendants);
|
|
293
|
+
this._checkAllParentsSelection(node);
|
|
294
|
+
this._syncSelectedFlatNodeIds();
|
|
295
|
+
this._updateCheckState();
|
|
296
|
+
} else {
|
|
297
|
+
this.checklistSelection.clear();
|
|
298
|
+
this.checklistSelection.select(node);
|
|
299
|
+
this._syncSelectedFlatNodeIds();
|
|
300
|
+
this._matSelect?.close();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
todoLeafItemSelectionToggle(event, node) {
|
|
304
|
+
event.stopPropagation();
|
|
305
|
+
if (this.multiple()) {
|
|
306
|
+
this.checklistSelection.toggle(node);
|
|
307
|
+
this._checkAllParentsSelection(node);
|
|
308
|
+
this._syncSelectedFlatNodeIds();
|
|
309
|
+
this._updateCheckState();
|
|
310
|
+
} else {
|
|
311
|
+
this.checklistSelection.clear();
|
|
312
|
+
this.checklistSelection.select(node);
|
|
313
|
+
this._syncSelectedFlatNodeIds();
|
|
314
|
+
this._matSelect?.close();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
clearSelection() {
|
|
318
|
+
this.checklistSelection.clear();
|
|
319
|
+
this.isChecked.set(false);
|
|
320
|
+
this.isIndeterminate.set(false);
|
|
321
|
+
this.checkCount.set(0);
|
|
322
|
+
this._selectedFlatNodeIds.clear();
|
|
323
|
+
this.value = null;
|
|
324
|
+
this._matSelect?.writeValue(null);
|
|
325
|
+
this._matSelect?._onChange(null);
|
|
326
|
+
}
|
|
327
|
+
toggleSelectAll(selectAllValue) {
|
|
328
|
+
if (selectAllValue) {
|
|
329
|
+
this.checklistSelection.select(...this.dataFlatNodes());
|
|
330
|
+
this.isIndeterminate.set(false);
|
|
331
|
+
this.isChecked.set(true);
|
|
332
|
+
this._syncSelectedFlatNodeIds();
|
|
333
|
+
} else {
|
|
334
|
+
this.checklistSelection.clear();
|
|
335
|
+
this.isChecked.set(false);
|
|
336
|
+
this.isIndeterminate.set(false);
|
|
337
|
+
this.checkCount.set(0);
|
|
338
|
+
this._selectedFlatNodeIds.clear();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
getChecklistSelectionIsSelected(i) {
|
|
342
|
+
const flatNode = this.nestedNodeMap.get(i);
|
|
343
|
+
return !!flatNode && this._selectedFlatNodeIds.has(flatNode.id);
|
|
344
|
+
}
|
|
345
|
+
_init(v) {
|
|
346
|
+
if (this.dataSource().length > 0 && this.treeDataSource().length > 0 && this._matSelect) {
|
|
347
|
+
const treeInstance = this.tree();
|
|
348
|
+
if (treeInstance && this.expandable()) treeInstance.expandAll();
|
|
349
|
+
if (!isNil(v)) this._updateChecklistSelection(v);
|
|
350
|
+
else this.checklistSelection.clear();
|
|
351
|
+
if (Array.isArray(v) && v.length > 0) {
|
|
352
|
+
if (this.multiple()) {
|
|
353
|
+
const findOutNode = [];
|
|
354
|
+
this.checklistSelection.selected.forEach((node) => {
|
|
355
|
+
const parentNode = this._getParentNode(node);
|
|
356
|
+
if (parentNode && this.checklistSelection.isSelected(parentNode)) findOutNode.push(node);
|
|
357
|
+
});
|
|
358
|
+
findOutNode.forEach((node) => {
|
|
359
|
+
this.checklistSelection.deselect(node);
|
|
360
|
+
});
|
|
361
|
+
this.value = [...this.checklistSelection.selected];
|
|
362
|
+
} else this.value = this.checklistSelection.selected.length > 0 ? { ...this.checklistSelection.selected[0] } : null;
|
|
363
|
+
} else this.value = v;
|
|
364
|
+
if (this._matSelect) {
|
|
365
|
+
this._matSelect.writeValue(this.value);
|
|
366
|
+
this._matSelect._onChange(this.value);
|
|
367
|
+
}
|
|
368
|
+
this._updateCheckState();
|
|
369
|
+
} else this.value = v;
|
|
370
|
+
}
|
|
371
|
+
_checkAllParentsSelection(node) {
|
|
372
|
+
let parent = this._getParentNode(node);
|
|
373
|
+
while (parent) {
|
|
374
|
+
parent.expandable = true;
|
|
375
|
+
const treeInstance = this.tree();
|
|
376
|
+
if (treeInstance) treeInstance.expand(this.flatNodeMap.get(parent));
|
|
377
|
+
this._checkRootNodeSelection(parent);
|
|
378
|
+
parent = this._getParentNode(parent);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
_checkRootNodeSelection(node) {
|
|
382
|
+
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
383
|
+
const descendants = this._getDescendants(node);
|
|
384
|
+
const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
385
|
+
if (nodeSelected && !descAllSelected) this.checklistSelection.deselect(node);
|
|
386
|
+
else if (!nodeSelected && (descAllSelected || descendants.length === 0)) this.checklistSelection.select(node);
|
|
387
|
+
this._updateCheckState();
|
|
388
|
+
}
|
|
389
|
+
_getParentNode(node) {
|
|
390
|
+
return this._parentFlatNodeById.get(node.id) ?? null;
|
|
391
|
+
}
|
|
392
|
+
_updateChecklistSelection(value) {
|
|
393
|
+
this.checklistSelection.clear();
|
|
394
|
+
if (!isNil(value)) {
|
|
395
|
+
(!Array.isArray(value) ? [value] : value).forEach((item) => {
|
|
396
|
+
const nodeFound = this._flatNodeById.get(item.id);
|
|
397
|
+
if (isNil(nodeFound)) return;
|
|
398
|
+
this.checklistSelection.select(nodeFound);
|
|
399
|
+
});
|
|
400
|
+
this._syncSelectedFlatNodeIds();
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
_updateSelect(value) {
|
|
404
|
+
if (!isNil(value)) {
|
|
405
|
+
const valueArray = !Array.isArray(value) ? [value] : value;
|
|
406
|
+
if (this.overallSearchEnabled()) valueArray.forEach((item) => {
|
|
407
|
+
const nodeFound = this._flatNodeById.get(item.id);
|
|
408
|
+
if (isNil(nodeFound)) return;
|
|
409
|
+
this.checklistSelection.deselect(item);
|
|
410
|
+
this.checklistSelection.select(nodeFound);
|
|
411
|
+
});
|
|
412
|
+
if (this.multiple()) this.checklistSelection.selected.forEach((item) => {
|
|
413
|
+
this._checkAllParentsSelection(item);
|
|
414
|
+
});
|
|
415
|
+
this._syncSelectedFlatNodeIds();
|
|
416
|
+
this._updateCheckState();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
_applyColumnLevelFilters(node, filter) {
|
|
420
|
+
let result = false;
|
|
421
|
+
if (node?.children && node.children.length > 0) for (let i = node.children.length - 1; i >= 0; i--) {
|
|
422
|
+
const resultTemp = this._applyColumnLevelFilters(node.children[i], filter);
|
|
423
|
+
if (!resultTemp) node.children.splice(i, 1);
|
|
424
|
+
result = resultTemp || result;
|
|
425
|
+
}
|
|
426
|
+
if (node?.children?.length === 0) node.children = null;
|
|
427
|
+
if (node.name.toLowerCase().includes(filter)) result = true;
|
|
428
|
+
return result;
|
|
429
|
+
}
|
|
430
|
+
_updateCheckState() {
|
|
431
|
+
if (this.showToggleAllCheckbox() && this.dataSource().length > 0) {
|
|
432
|
+
const selectedCount = this._selectedFlatNodeIds.size;
|
|
433
|
+
this.checkCount.set(selectedCount);
|
|
434
|
+
this.isIndeterminate.set(selectedCount < this.dataFlatNodes().length && selectedCount > 0);
|
|
435
|
+
this.isChecked.set(selectedCount === this.dataFlatNodes().length && selectedCount > 0);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
_getFlattenNodes(nodes, i = 0, parent = null) {
|
|
439
|
+
const flattenedNodes = [];
|
|
440
|
+
for (const node of nodes) {
|
|
441
|
+
const flatNode = this._transformer(node, i, parent);
|
|
442
|
+
flattenedNodes.push(flatNode);
|
|
443
|
+
if (node.children) flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1, flatNode));
|
|
444
|
+
}
|
|
445
|
+
return flattenedNodes;
|
|
446
|
+
}
|
|
447
|
+
_cloneTreeNodes(nodes) {
|
|
448
|
+
return nodes.map((node) => ({
|
|
449
|
+
id: node.id,
|
|
450
|
+
name: node.name,
|
|
451
|
+
children: node.children ? this._cloneTreeNodes(node.children) : null
|
|
452
|
+
}));
|
|
453
|
+
}
|
|
454
|
+
_syncSelectedFlatNodeIds() {
|
|
455
|
+
this._selectedFlatNodeIds.clear();
|
|
456
|
+
this.checklistSelection.selected.forEach((node) => {
|
|
457
|
+
this._selectedFlatNodeIds.add(node.id);
|
|
458
|
+
});
|
|
459
|
+
this.checkCount.set(this._selectedFlatNodeIds.size);
|
|
460
|
+
}
|
|
461
|
+
_getDescendants(dataNode) {
|
|
462
|
+
const node = this.flatNodeMap.get(dataNode);
|
|
463
|
+
if (!node?.children?.length) return [];
|
|
464
|
+
const descendants = [];
|
|
465
|
+
const collect = (children) => {
|
|
466
|
+
for (const child of children) {
|
|
467
|
+
const flatNode = this.nestedNodeMap.get(child);
|
|
468
|
+
if (flatNode) descendants.push(flatNode);
|
|
469
|
+
if (child.children?.length) collect(child.children);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
collect(node.children);
|
|
473
|
+
return descendants;
|
|
474
|
+
}
|
|
475
|
+
static {
|
|
476
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
477
|
+
minVersion: "12.0.0",
|
|
478
|
+
version: "22.2.3",
|
|
479
|
+
ngImport: i0,
|
|
480
|
+
type: CmatSelectTreeComponent,
|
|
481
|
+
deps: [],
|
|
482
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
static {
|
|
486
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
487
|
+
minVersion: "17.0.0",
|
|
488
|
+
version: "22.2.3",
|
|
489
|
+
type: CmatSelectTreeComponent,
|
|
490
|
+
isStandalone: true,
|
|
491
|
+
selector: "cmat-select-tree",
|
|
492
|
+
inputs: {
|
|
493
|
+
dataSource: {
|
|
494
|
+
classPropertyName: "dataSource",
|
|
495
|
+
publicName: "dataSource",
|
|
496
|
+
isSignal: true,
|
|
497
|
+
isRequired: false,
|
|
498
|
+
transformFunction: null
|
|
499
|
+
},
|
|
500
|
+
noEntriesFoundLabel: {
|
|
501
|
+
classPropertyName: "noEntriesFoundLabel",
|
|
502
|
+
publicName: "noEntriesFoundLabel",
|
|
503
|
+
isSignal: true,
|
|
504
|
+
isRequired: false,
|
|
505
|
+
transformFunction: null
|
|
506
|
+
},
|
|
507
|
+
showNoFoundLabel: {
|
|
508
|
+
classPropertyName: "showNoFoundLabel",
|
|
509
|
+
publicName: "showNoFoundLabel",
|
|
510
|
+
isSignal: true,
|
|
511
|
+
isRequired: false,
|
|
512
|
+
transformFunction: null
|
|
513
|
+
},
|
|
514
|
+
multiple: {
|
|
515
|
+
classPropertyName: "multiple",
|
|
516
|
+
publicName: "multiple",
|
|
517
|
+
isSignal: true,
|
|
518
|
+
isRequired: false,
|
|
519
|
+
transformFunction: null
|
|
520
|
+
},
|
|
521
|
+
overallSearchEnabled: {
|
|
522
|
+
classPropertyName: "overallSearchEnabled",
|
|
523
|
+
publicName: "overallSearchEnabled",
|
|
524
|
+
isSignal: true,
|
|
525
|
+
isRequired: false,
|
|
526
|
+
transformFunction: null
|
|
527
|
+
},
|
|
528
|
+
canNull: {
|
|
529
|
+
classPropertyName: "canNull",
|
|
530
|
+
publicName: "canNull",
|
|
531
|
+
isSignal: true,
|
|
532
|
+
isRequired: false,
|
|
533
|
+
transformFunction: null
|
|
534
|
+
},
|
|
535
|
+
customTriggerLabelFn: {
|
|
536
|
+
classPropertyName: "customTriggerLabelFn",
|
|
537
|
+
publicName: "customTriggerLabelFn",
|
|
538
|
+
isSignal: true,
|
|
539
|
+
isRequired: false,
|
|
540
|
+
transformFunction: null
|
|
541
|
+
},
|
|
542
|
+
customTriggerLabelTemplate: {
|
|
543
|
+
classPropertyName: "customTriggerLabelTemplate",
|
|
544
|
+
publicName: "customTriggerLabelTemplate",
|
|
545
|
+
isSignal: true,
|
|
546
|
+
isRequired: false,
|
|
547
|
+
transformFunction: null
|
|
548
|
+
},
|
|
549
|
+
expandable: {
|
|
550
|
+
classPropertyName: "expandable",
|
|
551
|
+
publicName: "expandable",
|
|
552
|
+
isSignal: true,
|
|
553
|
+
isRequired: false,
|
|
554
|
+
transformFunction: null
|
|
555
|
+
},
|
|
556
|
+
showToggleAllCheckbox: {
|
|
557
|
+
classPropertyName: "showToggleAllCheckbox",
|
|
558
|
+
publicName: "showToggleAllCheckbox",
|
|
559
|
+
isSignal: true,
|
|
560
|
+
isRequired: false,
|
|
561
|
+
transformFunction: null
|
|
562
|
+
},
|
|
563
|
+
compareWith: {
|
|
564
|
+
classPropertyName: "compareWith",
|
|
565
|
+
publicName: "compareWith",
|
|
566
|
+
isSignal: true,
|
|
567
|
+
isRequired: false,
|
|
568
|
+
transformFunction: null
|
|
569
|
+
},
|
|
570
|
+
placeholder: {
|
|
571
|
+
classPropertyName: "placeholder",
|
|
572
|
+
publicName: "placeholder",
|
|
573
|
+
isSignal: false,
|
|
574
|
+
isRequired: false,
|
|
575
|
+
transformFunction: null
|
|
576
|
+
},
|
|
577
|
+
value: {
|
|
578
|
+
classPropertyName: "value",
|
|
579
|
+
publicName: "value",
|
|
580
|
+
isSignal: false,
|
|
581
|
+
isRequired: false,
|
|
582
|
+
transformFunction: null
|
|
583
|
+
},
|
|
584
|
+
required: {
|
|
585
|
+
classPropertyName: "required",
|
|
586
|
+
publicName: "required",
|
|
587
|
+
isSignal: false,
|
|
588
|
+
isRequired: false,
|
|
589
|
+
transformFunction: null
|
|
590
|
+
},
|
|
591
|
+
disabled: {
|
|
592
|
+
classPropertyName: "disabled",
|
|
593
|
+
publicName: "disabled",
|
|
594
|
+
isSignal: false,
|
|
595
|
+
isRequired: false,
|
|
596
|
+
transformFunction: null
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
host: {
|
|
600
|
+
listeners: { "document:click": "clickedOut()" },
|
|
601
|
+
properties: { "attr.id": "id" }
|
|
602
|
+
},
|
|
603
|
+
providers: [{
|
|
604
|
+
provide: MatFormFieldControl,
|
|
605
|
+
useExisting: CmatSelectTreeComponent
|
|
606
|
+
}],
|
|
607
|
+
viewQueries: [
|
|
608
|
+
{
|
|
609
|
+
propertyName: "tree",
|
|
610
|
+
first: true,
|
|
611
|
+
predicate: ["componentTree"],
|
|
612
|
+
descendants: true,
|
|
613
|
+
isSignal: true
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
propertyName: "_matSelectSignal",
|
|
617
|
+
first: true,
|
|
618
|
+
predicate: ["componentSelect"],
|
|
619
|
+
descendants: true,
|
|
620
|
+
isSignal: true
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
propertyName: "_matSelectSearch",
|
|
624
|
+
first: true,
|
|
625
|
+
predicate: CmatSelectSearchComponent,
|
|
626
|
+
descendants: true,
|
|
627
|
+
isSignal: true
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
exportAs: ["cmatSelectTree"],
|
|
631
|
+
usesOnChanges: true,
|
|
632
|
+
ngImport: i0,
|
|
633
|
+
template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">空</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\n",
|
|
634
|
+
styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"],
|
|
635
|
+
dependencies: [
|
|
636
|
+
{
|
|
637
|
+
kind: "ngmodule",
|
|
638
|
+
type: MatIconModule
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
kind: "component",
|
|
642
|
+
type: i1.MatIcon,
|
|
643
|
+
selector: "mat-icon",
|
|
644
|
+
inputs: [
|
|
645
|
+
"color",
|
|
646
|
+
"inline",
|
|
647
|
+
"svgIcon",
|
|
648
|
+
"fontSet",
|
|
649
|
+
"fontIcon"
|
|
650
|
+
],
|
|
651
|
+
exportAs: ["matIcon"]
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
kind: "ngmodule",
|
|
655
|
+
type: MatSelectModule
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
kind: "component",
|
|
659
|
+
type: i2.MatSelect,
|
|
660
|
+
selector: "mat-select",
|
|
661
|
+
inputs: [
|
|
662
|
+
"aria-describedby",
|
|
663
|
+
"panelClass",
|
|
664
|
+
"disabled",
|
|
665
|
+
"disableRipple",
|
|
666
|
+
"tabIndex",
|
|
667
|
+
"hideSingleSelectionIndicator",
|
|
668
|
+
"placeholder",
|
|
669
|
+
"required",
|
|
670
|
+
"multiple",
|
|
671
|
+
"disableOptionCentering",
|
|
672
|
+
"compareWith",
|
|
673
|
+
"value",
|
|
674
|
+
"aria-label",
|
|
675
|
+
"aria-labelledby",
|
|
676
|
+
"errorStateMatcher",
|
|
677
|
+
"typeaheadDebounceInterval",
|
|
678
|
+
"sortComparator",
|
|
679
|
+
"id",
|
|
680
|
+
"panelWidth",
|
|
681
|
+
"canSelectNullableOptions"
|
|
682
|
+
],
|
|
683
|
+
outputs: [
|
|
684
|
+
"openedChange",
|
|
685
|
+
"opened",
|
|
686
|
+
"closed",
|
|
687
|
+
"selectionChange",
|
|
688
|
+
"valueChange"
|
|
689
|
+
],
|
|
690
|
+
exportAs: ["matSelect"]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
kind: "directive",
|
|
694
|
+
type: i2.MatSelectTrigger,
|
|
695
|
+
selector: "mat-select-trigger"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
kind: "component",
|
|
699
|
+
type: i2.MatOption,
|
|
700
|
+
selector: "mat-option",
|
|
701
|
+
inputs: [
|
|
702
|
+
"value",
|
|
703
|
+
"id",
|
|
704
|
+
"disabled"
|
|
705
|
+
],
|
|
706
|
+
outputs: ["onSelectionChange"],
|
|
707
|
+
exportAs: ["matOption"]
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
kind: "component",
|
|
711
|
+
type: CmatSelectSearchComponent,
|
|
712
|
+
selector: "cmat-select-search",
|
|
713
|
+
inputs: [
|
|
714
|
+
"placeholderLabel",
|
|
715
|
+
"type",
|
|
716
|
+
"noEntriesFoundLabel",
|
|
717
|
+
"showNoFoundLabel",
|
|
718
|
+
"clearSearchInput",
|
|
719
|
+
"searching",
|
|
720
|
+
"disableInitialFocus",
|
|
721
|
+
"enableClearOnEscapePressed",
|
|
722
|
+
"preventHomeEndKeyPropagation",
|
|
723
|
+
"disableScrollToActiveOnOptionsChanged",
|
|
724
|
+
"ariaLabel",
|
|
725
|
+
"showToggleAllCheckbox",
|
|
726
|
+
"toggleAllCheckboxChecked",
|
|
727
|
+
"toggleAllCheckboxIndeterminate",
|
|
728
|
+
"toggleAllCheckboxTooltipMessage",
|
|
729
|
+
"toggleAllCheckboxTooltipPosition",
|
|
730
|
+
"hideClearSearchButton",
|
|
731
|
+
"alwaysRestoreSelectedOptionsMulti",
|
|
732
|
+
"debounceTime",
|
|
733
|
+
"optionsCount"
|
|
734
|
+
],
|
|
735
|
+
outputs: ["toggleAll"],
|
|
736
|
+
exportAs: ["cmatSelectSearch"]
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
kind: "ngmodule",
|
|
740
|
+
type: ReactiveFormsModule
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
kind: "directive",
|
|
744
|
+
type: i3.NgControlStatus,
|
|
745
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
kind: "directive",
|
|
749
|
+
type: i3.RequiredValidator,
|
|
750
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
751
|
+
inputs: ["required"]
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
kind: "directive",
|
|
755
|
+
type: i3.FormControlDirective,
|
|
756
|
+
selector: "[formControl]",
|
|
757
|
+
inputs: [
|
|
758
|
+
"formControl",
|
|
759
|
+
"disabled",
|
|
760
|
+
"ngModel"
|
|
761
|
+
],
|
|
762
|
+
outputs: ["ngModelChange"],
|
|
763
|
+
exportAs: ["ngForm"]
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
kind: "ngmodule",
|
|
767
|
+
type: MatTreeModule
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
kind: "directive",
|
|
771
|
+
type: i4.MatTreeNodeDef,
|
|
772
|
+
selector: "[matTreeNodeDef]",
|
|
773
|
+
inputs: ["matTreeNodeDefWhen", "matTreeNode"]
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
kind: "directive",
|
|
777
|
+
type: i4.MatTreeNodePadding,
|
|
778
|
+
selector: "[matTreeNodePadding]",
|
|
779
|
+
inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"]
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
kind: "directive",
|
|
783
|
+
type: i4.MatTreeNodeToggle,
|
|
784
|
+
selector: "[matTreeNodeToggle]",
|
|
785
|
+
inputs: ["matTreeNodeToggleRecursive"]
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
kind: "component",
|
|
789
|
+
type: i4.MatTree,
|
|
790
|
+
selector: "mat-tree",
|
|
791
|
+
exportAs: ["matTree"]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
kind: "directive",
|
|
795
|
+
type: i4.MatTreeNode,
|
|
796
|
+
selector: "mat-tree-node",
|
|
797
|
+
inputs: ["tabIndex", "disabled"],
|
|
798
|
+
outputs: ["activation", "expandedChange"],
|
|
799
|
+
exportAs: ["matTreeNode"]
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
kind: "directive",
|
|
803
|
+
type: NgClass,
|
|
804
|
+
selector: "[ngClass]",
|
|
805
|
+
inputs: ["class", "ngClass"]
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
kind: "ngmodule",
|
|
809
|
+
type: MatButtonModule
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
kind: "component",
|
|
813
|
+
type: i5.MatIconButton,
|
|
814
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
815
|
+
exportAs: ["matButton", "matAnchor"]
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
kind: "ngmodule",
|
|
819
|
+
type: MatCheckboxModule
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
kind: "component",
|
|
823
|
+
type: i6.MatCheckbox,
|
|
824
|
+
selector: "mat-checkbox",
|
|
825
|
+
inputs: [
|
|
826
|
+
"aria-label",
|
|
827
|
+
"aria-labelledby",
|
|
828
|
+
"aria-describedby",
|
|
829
|
+
"aria-expanded",
|
|
830
|
+
"aria-controls",
|
|
831
|
+
"aria-owns",
|
|
832
|
+
"id",
|
|
833
|
+
"required",
|
|
834
|
+
"labelPosition",
|
|
835
|
+
"name",
|
|
836
|
+
"value",
|
|
837
|
+
"disableRipple",
|
|
838
|
+
"tabIndex",
|
|
839
|
+
"color",
|
|
840
|
+
"disabledInteractive",
|
|
841
|
+
"checked",
|
|
842
|
+
"disabled",
|
|
843
|
+
"indeterminate"
|
|
844
|
+
],
|
|
845
|
+
outputs: ["change", "indeterminateChange"],
|
|
846
|
+
exportAs: ["matCheckbox"]
|
|
847
|
+
}
|
|
848
|
+
],
|
|
849
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
850
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
855
|
+
minVersion: "12.0.0",
|
|
856
|
+
version: "22.2.3",
|
|
857
|
+
ngImport: i0,
|
|
858
|
+
type: CmatSelectTreeComponent,
|
|
859
|
+
decorators: [{
|
|
860
|
+
type: Component,
|
|
861
|
+
args: [{
|
|
862
|
+
selector: "cmat-select-tree",
|
|
863
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
864
|
+
encapsulation: ViewEncapsulation.None,
|
|
865
|
+
providers: [{
|
|
866
|
+
provide: MatFormFieldControl,
|
|
867
|
+
useExisting: CmatSelectTreeComponent
|
|
868
|
+
}],
|
|
869
|
+
exportAs: "cmatSelectTree",
|
|
870
|
+
imports: [
|
|
871
|
+
MatIconModule,
|
|
872
|
+
MatSelectModule,
|
|
873
|
+
CmatSelectSearchComponent,
|
|
874
|
+
ReactiveFormsModule,
|
|
875
|
+
MatTreeModule,
|
|
876
|
+
NgClass,
|
|
877
|
+
MatButtonModule,
|
|
878
|
+
MatCheckboxModule
|
|
879
|
+
],
|
|
880
|
+
host: { "[attr.id]": "id" },
|
|
881
|
+
template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">空</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\n",
|
|
882
|
+
styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:47px!important;line-height:47px!important}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"]
|
|
883
|
+
}]
|
|
884
|
+
}],
|
|
885
|
+
ctorParameters: () => [],
|
|
886
|
+
propDecorators: {
|
|
887
|
+
dataSource: [{
|
|
888
|
+
type: i0.Input,
|
|
889
|
+
args: [{
|
|
890
|
+
isSignal: true,
|
|
891
|
+
alias: "dataSource",
|
|
892
|
+
required: false
|
|
893
|
+
}]
|
|
894
|
+
}],
|
|
895
|
+
noEntriesFoundLabel: [{
|
|
896
|
+
type: i0.Input,
|
|
897
|
+
args: [{
|
|
898
|
+
isSignal: true,
|
|
899
|
+
alias: "noEntriesFoundLabel",
|
|
900
|
+
required: false
|
|
901
|
+
}]
|
|
902
|
+
}],
|
|
903
|
+
showNoFoundLabel: [{
|
|
904
|
+
type: i0.Input,
|
|
905
|
+
args: [{
|
|
906
|
+
isSignal: true,
|
|
907
|
+
alias: "showNoFoundLabel",
|
|
908
|
+
required: false
|
|
909
|
+
}]
|
|
910
|
+
}],
|
|
911
|
+
multiple: [{
|
|
912
|
+
type: i0.Input,
|
|
913
|
+
args: [{
|
|
914
|
+
isSignal: true,
|
|
915
|
+
alias: "multiple",
|
|
916
|
+
required: false
|
|
917
|
+
}]
|
|
918
|
+
}],
|
|
919
|
+
overallSearchEnabled: [{
|
|
920
|
+
type: i0.Input,
|
|
921
|
+
args: [{
|
|
922
|
+
isSignal: true,
|
|
923
|
+
alias: "overallSearchEnabled",
|
|
924
|
+
required: false
|
|
925
|
+
}]
|
|
926
|
+
}],
|
|
927
|
+
canNull: [{
|
|
928
|
+
type: i0.Input,
|
|
929
|
+
args: [{
|
|
930
|
+
isSignal: true,
|
|
931
|
+
alias: "canNull",
|
|
932
|
+
required: false
|
|
933
|
+
}]
|
|
934
|
+
}],
|
|
935
|
+
customTriggerLabelFn: [{
|
|
936
|
+
type: i0.Input,
|
|
937
|
+
args: [{
|
|
938
|
+
isSignal: true,
|
|
939
|
+
alias: "customTriggerLabelFn",
|
|
940
|
+
required: false
|
|
941
|
+
}]
|
|
942
|
+
}],
|
|
943
|
+
customTriggerLabelTemplate: [{
|
|
944
|
+
type: i0.Input,
|
|
945
|
+
args: [{
|
|
946
|
+
isSignal: true,
|
|
947
|
+
alias: "customTriggerLabelTemplate",
|
|
948
|
+
required: false
|
|
949
|
+
}]
|
|
950
|
+
}],
|
|
951
|
+
expandable: [{
|
|
952
|
+
type: i0.Input,
|
|
953
|
+
args: [{
|
|
954
|
+
isSignal: true,
|
|
955
|
+
alias: "expandable",
|
|
956
|
+
required: false
|
|
957
|
+
}]
|
|
958
|
+
}],
|
|
959
|
+
showToggleAllCheckbox: [{
|
|
960
|
+
type: i0.Input,
|
|
961
|
+
args: [{
|
|
962
|
+
isSignal: true,
|
|
963
|
+
alias: "showToggleAllCheckbox",
|
|
964
|
+
required: false
|
|
965
|
+
}]
|
|
966
|
+
}],
|
|
967
|
+
compareWith: [{
|
|
968
|
+
type: i0.Input,
|
|
969
|
+
args: [{
|
|
970
|
+
isSignal: true,
|
|
971
|
+
alias: "compareWith",
|
|
972
|
+
required: false
|
|
973
|
+
}]
|
|
974
|
+
}],
|
|
975
|
+
tree: [{
|
|
976
|
+
type: i0.ViewChild,
|
|
977
|
+
args: ["componentTree", { isSignal: true }]
|
|
978
|
+
}],
|
|
979
|
+
_matSelectSignal: [{
|
|
980
|
+
type: i0.ViewChild,
|
|
981
|
+
args: ["componentSelect", { isSignal: true }]
|
|
982
|
+
}],
|
|
983
|
+
_matSelectSearch: [{
|
|
984
|
+
type: i0.ViewChild,
|
|
985
|
+
args: [i0.forwardRef(() => CmatSelectSearchComponent), { isSignal: true }]
|
|
986
|
+
}],
|
|
987
|
+
clickedOut: [{
|
|
988
|
+
type: HostListener,
|
|
989
|
+
args: ["document:click"]
|
|
990
|
+
}],
|
|
991
|
+
placeholder: [{ type: Input }],
|
|
992
|
+
value: [{ type: Input }],
|
|
993
|
+
required: [{ type: Input }],
|
|
994
|
+
disabled: [{ type: Input }]
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
var CmatSelectTreeNode = class {};
|
|
691
998
|
export { CmatSelectTreeComponent, CmatSelectTreeFlatNode, CmatSelectTreeNode };
|
|
692
|
-
|
|
999
|
+
|
|
1000
|
+
//# sourceMappingURL=cmat-components-select-tree.mjs.map
|