cmat 0.0.111 → 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 +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 +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 -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,443 +1,863 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { MAT_BOTTOM_SHEET_DATA,
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { MatButtonModule } from
|
|
6
|
-
import * as i4 from
|
|
7
|
-
import { MatIconModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { MatListModule } from
|
|
10
|
-
import * as i2 from
|
|
11
|
-
import { MatTabsModule } from
|
|
12
|
-
import { coerceBooleanProperty } from
|
|
13
|
-
import { BreakpointObserver, Breakpoints } from
|
|
14
|
-
import * as i3
|
|
15
|
-
import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from
|
|
16
|
-
import * as i4
|
|
17
|
-
import { CdkPortal, PortalModule } from
|
|
18
|
-
import { NgClass } from
|
|
19
|
-
import { takeUntilDestroyed } from
|
|
20
|
-
import { NgControl } from
|
|
21
|
-
import { MatFormFieldControl } from
|
|
22
|
-
import * as i2
|
|
23
|
-
import { MatInputModule } from
|
|
24
|
-
import { Subject } from
|
|
25
|
-
import { map } from
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Input, ViewEncapsulation, computed, effect, inject, input, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { MAT_BOTTOM_SHEET_DATA, MatBottomSheet, MatBottomSheetRef } from "@angular/material/bottom-sheet";
|
|
4
|
+
import * as i1 from "@angular/material/button";
|
|
5
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
6
|
+
import * as i4$1 from "@angular/material/icon";
|
|
7
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
8
|
+
import * as i3$1 from "@angular/material/list";
|
|
9
|
+
import { MatListModule } from "@angular/material/list";
|
|
10
|
+
import * as i2$1 from "@angular/material/tabs";
|
|
11
|
+
import { MatTabsModule } from "@angular/material/tabs";
|
|
12
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
13
|
+
import { BreakpointObserver, Breakpoints } from "@angular/cdk/layout";
|
|
14
|
+
import * as i3 from "@angular/cdk/overlay";
|
|
15
|
+
import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from "@angular/cdk/overlay";
|
|
16
|
+
import * as i4 from "@angular/cdk/portal";
|
|
17
|
+
import { CdkPortal, PortalModule } from "@angular/cdk/portal";
|
|
18
|
+
import { NgClass } from "@angular/common";
|
|
19
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
20
|
+
import { NgControl } from "@angular/forms";
|
|
21
|
+
import { MatFormFieldControl } from "@angular/material/form-field";
|
|
22
|
+
import * as i2 from "@angular/material/input";
|
|
23
|
+
import { MatInputModule } from "@angular/material/input";
|
|
24
|
+
import { Subject } from "rxjs";
|
|
25
|
+
import { map } from "rxjs/operators";
|
|
26
|
+
var CmatCascadeBottomSheetComponent = class CmatCascadeBottomSheetComponent {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.data = inject(MAT_BOTTOM_SHEET_DATA);
|
|
29
|
+
this.selectedTab = signal(0, ...ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.labels = computed(() => {
|
|
31
|
+
return this.data.steps().map((step) => {
|
|
32
|
+
return step.find((item) => item.active)?.label ?? "选择";
|
|
33
|
+
});
|
|
34
|
+
}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this._bottomSheetRef = inject(MatBottomSheetRef);
|
|
36
|
+
this.resetTabIndex();
|
|
37
|
+
}
|
|
38
|
+
resetTabIndex() {
|
|
39
|
+
const hasValue = this.data.currentLabels().length > 0;
|
|
40
|
+
this.selectedTab.set(hasValue ? this.data.currentLabels().length - 1 : 0);
|
|
41
|
+
}
|
|
42
|
+
clickHandle(event) {
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
}
|
|
45
|
+
dismiss() {
|
|
46
|
+
this._bottomSheetRef.dismiss();
|
|
47
|
+
}
|
|
48
|
+
select(disabled) {
|
|
49
|
+
if (!disabled) {
|
|
50
|
+
const currentIndex = this.selectedTab();
|
|
51
|
+
if (currentIndex < this.data.steps().length - 1) this.selectedTab.set(currentIndex + 1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.2.3",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: CmatCascadeBottomSheetComponent,
|
|
60
|
+
deps: [],
|
|
61
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
66
|
+
minVersion: "17.0.0",
|
|
67
|
+
version: "22.2.3",
|
|
68
|
+
type: CmatCascadeBottomSheetComponent,
|
|
69
|
+
isStandalone: true,
|
|
70
|
+
selector: "cmat-cascade-bottom-sheet",
|
|
71
|
+
exportAs: ["cmatCascadeBottomSheet"],
|
|
72
|
+
ngImport: i0,
|
|
73
|
+
template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>",
|
|
74
|
+
styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"],
|
|
75
|
+
dependencies: [
|
|
76
|
+
{
|
|
77
|
+
kind: "ngmodule",
|
|
78
|
+
type: MatButtonModule
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
kind: "component",
|
|
82
|
+
type: i1.MatIconButton,
|
|
83
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
84
|
+
exportAs: ["matButton", "matAnchor"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
kind: "ngmodule",
|
|
88
|
+
type: MatTabsModule
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
kind: "component",
|
|
92
|
+
type: i2$1.MatTab,
|
|
93
|
+
selector: "mat-tab",
|
|
94
|
+
inputs: [
|
|
95
|
+
"disabled",
|
|
96
|
+
"label",
|
|
97
|
+
"aria-label",
|
|
98
|
+
"aria-labelledby",
|
|
99
|
+
"labelClass",
|
|
100
|
+
"bodyClass",
|
|
101
|
+
"id"
|
|
102
|
+
],
|
|
103
|
+
exportAs: ["matTab"]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
kind: "component",
|
|
107
|
+
type: i2$1.MatTabGroup,
|
|
108
|
+
selector: "mat-tab-group",
|
|
109
|
+
inputs: [
|
|
110
|
+
"color",
|
|
111
|
+
"fitInkBarToContent",
|
|
112
|
+
"mat-stretch-tabs",
|
|
113
|
+
"mat-align-tabs",
|
|
114
|
+
"dynamicHeight",
|
|
115
|
+
"selectedIndex",
|
|
116
|
+
"headerPosition",
|
|
117
|
+
"animationDuration",
|
|
118
|
+
"contentTabIndex",
|
|
119
|
+
"disablePagination",
|
|
120
|
+
"disableRipple",
|
|
121
|
+
"preserveContent",
|
|
122
|
+
"backgroundColor",
|
|
123
|
+
"aria-label",
|
|
124
|
+
"aria-labelledby"
|
|
125
|
+
],
|
|
126
|
+
outputs: [
|
|
127
|
+
"selectedIndexChange",
|
|
128
|
+
"focusChange",
|
|
129
|
+
"animationDone",
|
|
130
|
+
"selectedTabChange"
|
|
131
|
+
],
|
|
132
|
+
exportAs: ["matTabGroup"]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
kind: "ngmodule",
|
|
136
|
+
type: MatListModule
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
kind: "component",
|
|
140
|
+
type: i3$1.MatList,
|
|
141
|
+
selector: "mat-list",
|
|
142
|
+
exportAs: ["matList"]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
kind: "component",
|
|
146
|
+
type: i3$1.MatListItem,
|
|
147
|
+
selector: "mat-list-item, a[mat-list-item], button[mat-list-item]",
|
|
148
|
+
inputs: ["activated"],
|
|
149
|
+
exportAs: ["matListItem"]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
kind: "ngmodule",
|
|
153
|
+
type: MatIconModule
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
kind: "component",
|
|
157
|
+
type: i4$1.MatIcon,
|
|
158
|
+
selector: "mat-icon",
|
|
159
|
+
inputs: [
|
|
160
|
+
"color",
|
|
161
|
+
"inline",
|
|
162
|
+
"svgIcon",
|
|
163
|
+
"fontSet",
|
|
164
|
+
"fontIcon"
|
|
165
|
+
],
|
|
166
|
+
exportAs: ["matIcon"]
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
170
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
175
|
+
minVersion: "12.0.0",
|
|
176
|
+
version: "22.2.3",
|
|
177
|
+
ngImport: i0,
|
|
178
|
+
type: CmatCascadeBottomSheetComponent,
|
|
179
|
+
decorators: [{
|
|
180
|
+
type: Component,
|
|
181
|
+
args: [{
|
|
182
|
+
selector: "cmat-cascade-bottom-sheet",
|
|
183
|
+
encapsulation: ViewEncapsulation.None,
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
exportAs: "cmatCascadeBottomSheet",
|
|
186
|
+
imports: [
|
|
187
|
+
MatButtonModule,
|
|
188
|
+
MatTabsModule,
|
|
189
|
+
MatListModule,
|
|
190
|
+
MatIconModule
|
|
191
|
+
],
|
|
192
|
+
template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>",
|
|
193
|
+
styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"]
|
|
194
|
+
}]
|
|
195
|
+
}],
|
|
196
|
+
ctorParameters: () => []
|
|
197
|
+
});
|
|
198
|
+
var CmatCascadeMenuComponent = class CmatCascadeMenuComponent {
|
|
199
|
+
constructor() {
|
|
200
|
+
this.root = inject(CmatCascadeListComponent, { optional: true });
|
|
201
|
+
}
|
|
202
|
+
static {
|
|
203
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
204
|
+
minVersion: "12.0.0",
|
|
205
|
+
version: "22.2.3",
|
|
206
|
+
ngImport: i0,
|
|
207
|
+
type: CmatCascadeMenuComponent,
|
|
208
|
+
deps: [],
|
|
209
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
static {
|
|
213
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
214
|
+
minVersion: "17.0.0",
|
|
215
|
+
version: "22.2.3",
|
|
216
|
+
type: CmatCascadeMenuComponent,
|
|
217
|
+
isStandalone: true,
|
|
218
|
+
selector: "cmat-cascade-menu",
|
|
219
|
+
exportAs: ["cmatCascadeMenu"],
|
|
220
|
+
ngImport: i0,
|
|
221
|
+
template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}",
|
|
222
|
+
styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"],
|
|
223
|
+
dependencies: [
|
|
224
|
+
{
|
|
225
|
+
kind: "ngmodule",
|
|
226
|
+
type: MatListModule
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
kind: "component",
|
|
230
|
+
type: i3$1.MatList,
|
|
231
|
+
selector: "mat-list",
|
|
232
|
+
exportAs: ["matList"]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
kind: "component",
|
|
236
|
+
type: i3$1.MatListItem,
|
|
237
|
+
selector: "mat-list-item, a[mat-list-item], button[mat-list-item]",
|
|
238
|
+
inputs: ["activated"],
|
|
239
|
+
exportAs: ["matListItem"]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
kind: "ngmodule",
|
|
243
|
+
type: MatIconModule
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
kind: "component",
|
|
247
|
+
type: i4$1.MatIcon,
|
|
248
|
+
selector: "mat-icon",
|
|
249
|
+
inputs: [
|
|
250
|
+
"color",
|
|
251
|
+
"inline",
|
|
252
|
+
"svgIcon",
|
|
253
|
+
"fontSet",
|
|
254
|
+
"fontIcon"
|
|
255
|
+
],
|
|
256
|
+
exportAs: ["matIcon"]
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
260
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
265
|
+
minVersion: "12.0.0",
|
|
266
|
+
version: "22.2.3",
|
|
267
|
+
ngImport: i0,
|
|
268
|
+
type: CmatCascadeMenuComponent,
|
|
269
|
+
decorators: [{
|
|
270
|
+
type: Component,
|
|
271
|
+
args: [{
|
|
272
|
+
selector: "cmat-cascade-menu",
|
|
273
|
+
encapsulation: ViewEncapsulation.None,
|
|
274
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
275
|
+
exportAs: "cmatCascadeMenu",
|
|
276
|
+
imports: [MatListModule, MatIconModule],
|
|
277
|
+
template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}",
|
|
278
|
+
styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"]
|
|
279
|
+
}]
|
|
280
|
+
}]
|
|
281
|
+
});
|
|
81
282
|
let NEXT_ID = 0;
|
|
82
|
-
class CmatCascadeListComponent {
|
|
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
|
-
|
|
283
|
+
var CmatCascadeListComponent = class CmatCascadeListComponent {
|
|
284
|
+
get placeholder() {
|
|
285
|
+
return this._placeholderSignal();
|
|
286
|
+
}
|
|
287
|
+
set placeholder(value) {
|
|
288
|
+
this._placeholderSignal.set(value);
|
|
289
|
+
this.stateChanges.next();
|
|
290
|
+
}
|
|
291
|
+
get disabled() {
|
|
292
|
+
if (this.ngControl?.disabled != null) return this.ngControl.disabled;
|
|
293
|
+
return this._disabledSignal();
|
|
294
|
+
}
|
|
295
|
+
set disabled(value) {
|
|
296
|
+
this._disabledSignal.set(coerceBooleanProperty(value));
|
|
297
|
+
this.stateChanges.next();
|
|
298
|
+
}
|
|
299
|
+
get required() {
|
|
300
|
+
return this._requiredSignal();
|
|
301
|
+
}
|
|
302
|
+
set required(value) {
|
|
303
|
+
this._requiredSignal.set(coerceBooleanProperty(value));
|
|
304
|
+
}
|
|
305
|
+
get empty() {
|
|
306
|
+
return !this._value();
|
|
307
|
+
}
|
|
308
|
+
get shouldLabelFloat() {
|
|
309
|
+
return this.focused || !this.empty;
|
|
310
|
+
}
|
|
311
|
+
get errorState() {
|
|
312
|
+
if (this.ngControl == null) return false;
|
|
313
|
+
return (this.touched && this.ngControl.invalid) ?? false;
|
|
314
|
+
}
|
|
315
|
+
constructor() {
|
|
316
|
+
this.id = `cmat-cascade-list-${NEXT_ID++}`;
|
|
317
|
+
this.options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
318
|
+
this.clearable = input(false, ...ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []);
|
|
319
|
+
this.fullLevels = input(true, ...ngDevMode ? [{ debugName: "fullLevels" }] : /* istanbul ignore next */ []);
|
|
320
|
+
this.changeOnSelect = input(false, ...ngDevMode ? [{ debugName: "changeOnSelect" }] : /* istanbul ignore next */ []);
|
|
321
|
+
this.allowLabelValue = input(false, ...ngDevMode ? [{ debugName: "allowLabelValue" }] : /* istanbul ignore next */ []);
|
|
322
|
+
this.touchUi = input(false, {
|
|
323
|
+
...ngDevMode ? { debugName: "touchUi" } : /* istanbul ignore next */ {},
|
|
324
|
+
transform: coerceBooleanProperty
|
|
325
|
+
});
|
|
326
|
+
this.overlayOrigin = viewChild.required(CdkOverlayOrigin, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
|
|
327
|
+
this.menuTemplate = viewChild.required(CdkPortal, ...ngDevMode ? [{ debugName: "menuTemplate" }] : /* istanbul ignore next */ []);
|
|
328
|
+
this._inputElement = viewChild("inputElement", ...ngDevMode ? [{ debugName: "_inputElement" }] : /* istanbul ignore next */ []);
|
|
329
|
+
this._placeholderSignal = signal("请选择", ...ngDevMode ? [{ debugName: "_placeholderSignal" }] : /* istanbul ignore next */ []);
|
|
330
|
+
this._disabledSignal = signal(false, ...ngDevMode ? [{ debugName: "_disabledSignal" }] : /* istanbul ignore next */ []);
|
|
331
|
+
this._requiredSignal = signal(false, ...ngDevMode ? [{ debugName: "_requiredSignal" }] : /* istanbul ignore next */ []);
|
|
332
|
+
this.ngControl = inject(NgControl, {
|
|
333
|
+
optional: true,
|
|
334
|
+
self: true
|
|
335
|
+
});
|
|
336
|
+
this.stateChanges = new Subject();
|
|
337
|
+
this.controlType = "cmat-cascade-list";
|
|
338
|
+
this._overlay = inject(Overlay);
|
|
339
|
+
this._breakpointObserver = inject(BreakpointObserver);
|
|
340
|
+
this._bottomSheet = inject(MatBottomSheet);
|
|
341
|
+
this._destroyRef = inject(DestroyRef);
|
|
342
|
+
this._value = signal(null, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
|
|
343
|
+
this._focused = signal(false, ...ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []);
|
|
344
|
+
this._touched = signal(false, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
|
|
345
|
+
this.currentLabels = computed(() => {
|
|
346
|
+
const value = this._value();
|
|
347
|
+
const opts = this.options();
|
|
348
|
+
if (!value?.length || !opts.length) return [];
|
|
349
|
+
return this._findLabelsByValue(value, opts);
|
|
350
|
+
}, ...ngDevMode ? [{ debugName: "currentLabels" }] : /* istanbul ignore next */ []);
|
|
351
|
+
this.steps = computed(() => {
|
|
352
|
+
const labels = this.currentLabels();
|
|
353
|
+
const opts = this.options();
|
|
354
|
+
if (!labels.length) return [opts.map((item) => ({
|
|
355
|
+
...item,
|
|
356
|
+
active: false
|
|
357
|
+
}))];
|
|
358
|
+
return this._buildStepsFromLabels(labels, opts);
|
|
359
|
+
}, ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
|
|
360
|
+
this.showClearIcon = computed(() => {
|
|
361
|
+
return this.clearable() && this.currentLabels().length > 0 && !this.disabled;
|
|
362
|
+
}, ...ngDevMode ? [{ debugName: "showClearIcon" }] : /* istanbul ignore next */ []);
|
|
363
|
+
this.menuVisible = computed(() => {
|
|
364
|
+
return !this.touchUi() && (this.overlayRef?.hasAttached() ?? false);
|
|
365
|
+
}, ...ngDevMode ? [{ debugName: "menuVisible" }] : /* istanbul ignore next */ []);
|
|
366
|
+
this._onChange = () => {};
|
|
367
|
+
this._onTouched = () => {};
|
|
368
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
369
|
+
effect(() => {
|
|
370
|
+
const labels = this.currentLabels();
|
|
371
|
+
if (this._inputElement()?.nativeElement.value !== this._getLabelText(labels)) this._updateInputValue(labels);
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
get value() {
|
|
375
|
+
return this._value();
|
|
376
|
+
}
|
|
377
|
+
set value(val) {
|
|
378
|
+
this._value.set(val);
|
|
379
|
+
}
|
|
380
|
+
get focused() {
|
|
381
|
+
return this._focused();
|
|
382
|
+
}
|
|
383
|
+
set focused(val) {
|
|
384
|
+
this._focused.set(val);
|
|
385
|
+
this.stateChanges.next();
|
|
386
|
+
}
|
|
387
|
+
get touched() {
|
|
388
|
+
return this._touched();
|
|
389
|
+
}
|
|
390
|
+
set touched(val) {
|
|
391
|
+
this._touched.set(val);
|
|
392
|
+
}
|
|
393
|
+
ngOnInit() {
|
|
394
|
+
const config = new OverlayConfig({
|
|
395
|
+
hasBackdrop: true,
|
|
396
|
+
backdropClass: "cdk-overlay-transparent-backdrop",
|
|
397
|
+
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
398
|
+
positionStrategy: this._overlay.position().flexibleConnectedTo(this.overlayOrigin().elementRef).withPositions([{
|
|
399
|
+
originX: "start",
|
|
400
|
+
originY: "bottom",
|
|
401
|
+
overlayX: "start",
|
|
402
|
+
overlayY: "top"
|
|
403
|
+
}, {
|
|
404
|
+
originX: "start",
|
|
405
|
+
originY: "top",
|
|
406
|
+
overlayX: "start",
|
|
407
|
+
overlayY: "bottom"
|
|
408
|
+
}])
|
|
409
|
+
});
|
|
410
|
+
this._breakpointObserver.observe(Breakpoints.Handset).pipe(takeUntilDestroyed(this._destroyRef), map((match) => match.matches)).subscribe((matches) => {
|
|
411
|
+
if (this.touchUi() !== matches) {
|
|
412
|
+
if (!matches && this.bottomSheetRef) {
|
|
413
|
+
this.bottomSheetRef.dismiss();
|
|
414
|
+
if (this.focused) setTimeout(() => this.overlayRef.attach(this.menuTemplate()));
|
|
415
|
+
} else if (matches && this.overlayRef?.hasAttached()) {
|
|
416
|
+
this.overlayRef.detach();
|
|
417
|
+
this._openBottomSheet();
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
this.overlayRef = this._overlay.create(config);
|
|
422
|
+
this.overlayRef.backdropClick().subscribe(() => {
|
|
423
|
+
this.overlayRef.detach();
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
ngOnDestroy() {
|
|
427
|
+
this.stateChanges.complete();
|
|
428
|
+
if (this.overlayRef) this.overlayRef.dispose();
|
|
429
|
+
}
|
|
430
|
+
writeValue(value) {
|
|
431
|
+
this._value.set(value);
|
|
432
|
+
}
|
|
433
|
+
registerOnChange(fn) {
|
|
434
|
+
this._onChange = fn;
|
|
435
|
+
}
|
|
436
|
+
registerOnTouched(fn) {
|
|
437
|
+
this._onTouched = fn;
|
|
438
|
+
}
|
|
439
|
+
setDisabledState(isDisabled) {
|
|
440
|
+
this._disabledSignal.set(isDisabled);
|
|
441
|
+
}
|
|
442
|
+
setDescribedByIds(ids) {
|
|
443
|
+
if (ids.length) this._inputElement()?.nativeElement.setAttribute("aria-describedby", ids.join(" "));
|
|
444
|
+
else this._inputElement()?.nativeElement.removeAttribute("aria-describedby");
|
|
445
|
+
}
|
|
446
|
+
onContainerClick() {
|
|
447
|
+
if (!this.focused) this._inputElement()?.nativeElement.focus();
|
|
448
|
+
}
|
|
449
|
+
clickHandle(event) {
|
|
450
|
+
if (this.disabled || this.options().length === 0) return;
|
|
451
|
+
const element = event.target;
|
|
452
|
+
if (!(this._inputElement()?.nativeElement.closest(".cmat-cascade-list"))?.contains(element)) return;
|
|
453
|
+
if (this.touchUi()) {
|
|
454
|
+
if (this.overlayRef?.hasAttached()) this.overlayRef.detach();
|
|
455
|
+
this._openBottomSheet();
|
|
456
|
+
} else this.overlayRef.attach(this.menuTemplate());
|
|
457
|
+
}
|
|
458
|
+
clearValue(event) {
|
|
459
|
+
if (event) {
|
|
460
|
+
event.stopPropagation();
|
|
461
|
+
event.preventDefault();
|
|
462
|
+
}
|
|
463
|
+
this._value.set(null);
|
|
464
|
+
this._onChange(null);
|
|
465
|
+
this._onTouched();
|
|
466
|
+
}
|
|
467
|
+
selectHandle(event, step, index) {
|
|
468
|
+
event.stopPropagation();
|
|
469
|
+
const selectedItem = this.steps()[step][index];
|
|
470
|
+
if (selectedItem.disabled) return;
|
|
471
|
+
this._value.update((values) => {
|
|
472
|
+
const newValues = values ? values.slice(0, step) : [];
|
|
473
|
+
newValues.push({
|
|
474
|
+
value: selectedItem.value,
|
|
475
|
+
label: selectedItem.label
|
|
476
|
+
});
|
|
477
|
+
return newValues;
|
|
478
|
+
});
|
|
479
|
+
this._onChange(this._value());
|
|
480
|
+
this._onTouched();
|
|
481
|
+
if (selectedItem.children?.length && !this.changeOnSelect()) return;
|
|
482
|
+
if (this.overlayRef?.hasAttached()) this.overlayRef.detach();
|
|
483
|
+
if (this.touchUi() && this.bottomSheetRef) this.bottomSheetRef.dismiss();
|
|
484
|
+
}
|
|
485
|
+
onFocusIn() {
|
|
486
|
+
if (!this.focused) this.focused = true;
|
|
487
|
+
}
|
|
488
|
+
onFocusOut(event) {
|
|
489
|
+
const relatedTarget = event.relatedTarget;
|
|
490
|
+
if (!relatedTarget?.closest(".cmat-cascade-menu, .cmat-cascade-bottom-sheet") && !this._inputElement()?.nativeElement.contains(relatedTarget)) {
|
|
491
|
+
this.touched = true;
|
|
492
|
+
this.focused = false;
|
|
493
|
+
this._onTouched();
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
_findLabelsByValue(value, options) {
|
|
497
|
+
const result = [];
|
|
498
|
+
let currentOptions = options;
|
|
499
|
+
for (const val of value) {
|
|
500
|
+
const found = this.allowLabelValue() ? currentOptions.find((item) => item.value === val.value || item.label === val.label) : currentOptions.find((item) => item.value === val.value);
|
|
501
|
+
if (found) {
|
|
502
|
+
result.push(found);
|
|
503
|
+
currentOptions = found.children ?? [];
|
|
504
|
+
} else break;
|
|
505
|
+
}
|
|
506
|
+
return result;
|
|
507
|
+
}
|
|
508
|
+
_buildStepsFromLabels(labels, rootOptions) {
|
|
509
|
+
const steps = [];
|
|
510
|
+
let currentOptions = rootOptions;
|
|
511
|
+
for (const label of labels) {
|
|
512
|
+
const stepItems = currentOptions.map((item) => ({
|
|
513
|
+
...item,
|
|
514
|
+
active: item.value === label.value
|
|
515
|
+
}));
|
|
516
|
+
steps.push(stepItems);
|
|
517
|
+
currentOptions = label.children ?? [];
|
|
518
|
+
}
|
|
519
|
+
if (currentOptions.length > 0) steps.push(currentOptions.map((item) => ({
|
|
520
|
+
...item,
|
|
521
|
+
active: false
|
|
522
|
+
})));
|
|
523
|
+
return steps;
|
|
524
|
+
}
|
|
525
|
+
_updateInputValue(labels) {
|
|
526
|
+
if (!this._inputElement) return;
|
|
527
|
+
let text;
|
|
528
|
+
if (this.fullLevels()) text = labels.map((l, i) => `${l.label}${i < labels.length - 1 ? " / " : ""}`).join("");
|
|
529
|
+
else text = labels[labels.length - 1]?.label ?? "";
|
|
530
|
+
this._inputElement().nativeElement.value = text;
|
|
531
|
+
}
|
|
532
|
+
_openBottomSheet() {
|
|
533
|
+
const data = {
|
|
534
|
+
options: this.options(),
|
|
535
|
+
steps: this.steps,
|
|
536
|
+
currentLabels: this.currentLabels,
|
|
537
|
+
selectHandle: this.selectHandle.bind(this),
|
|
538
|
+
changeOnSelect: this.changeOnSelect(),
|
|
539
|
+
placeholder: this.placeholder
|
|
540
|
+
};
|
|
541
|
+
this.bottomSheetRef = this._bottomSheet.open(CmatCascadeBottomSheetComponent, { data });
|
|
542
|
+
}
|
|
543
|
+
_getLabelText(labels) {
|
|
544
|
+
if (this.fullLevels()) return labels.map((l, i) => `${l.label}${i < labels.length - 1 ? " / " : ""}`).join("");
|
|
545
|
+
return labels[labels.length - 1]?.label ?? "";
|
|
546
|
+
}
|
|
547
|
+
static {
|
|
548
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
549
|
+
minVersion: "12.0.0",
|
|
550
|
+
version: "22.2.3",
|
|
551
|
+
ngImport: i0,
|
|
552
|
+
type: CmatCascadeListComponent,
|
|
553
|
+
deps: [],
|
|
554
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
static {
|
|
558
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
559
|
+
minVersion: "17.0.0",
|
|
560
|
+
version: "22.2.3",
|
|
561
|
+
type: CmatCascadeListComponent,
|
|
562
|
+
isStandalone: true,
|
|
563
|
+
selector: "cmat-cascade-list",
|
|
564
|
+
inputs: {
|
|
565
|
+
options: {
|
|
566
|
+
classPropertyName: "options",
|
|
567
|
+
publicName: "options",
|
|
568
|
+
isSignal: true,
|
|
569
|
+
isRequired: true,
|
|
570
|
+
transformFunction: null
|
|
571
|
+
},
|
|
572
|
+
clearable: {
|
|
573
|
+
classPropertyName: "clearable",
|
|
574
|
+
publicName: "clearable",
|
|
575
|
+
isSignal: true,
|
|
576
|
+
isRequired: false,
|
|
577
|
+
transformFunction: null
|
|
578
|
+
},
|
|
579
|
+
fullLevels: {
|
|
580
|
+
classPropertyName: "fullLevels",
|
|
581
|
+
publicName: "fullLevels",
|
|
582
|
+
isSignal: true,
|
|
583
|
+
isRequired: false,
|
|
584
|
+
transformFunction: null
|
|
585
|
+
},
|
|
586
|
+
changeOnSelect: {
|
|
587
|
+
classPropertyName: "changeOnSelect",
|
|
588
|
+
publicName: "changeOnSelect",
|
|
589
|
+
isSignal: true,
|
|
590
|
+
isRequired: false,
|
|
591
|
+
transformFunction: null
|
|
592
|
+
},
|
|
593
|
+
allowLabelValue: {
|
|
594
|
+
classPropertyName: "allowLabelValue",
|
|
595
|
+
publicName: "allowLabelValue",
|
|
596
|
+
isSignal: true,
|
|
597
|
+
isRequired: false,
|
|
598
|
+
transformFunction: null
|
|
599
|
+
},
|
|
600
|
+
touchUi: {
|
|
601
|
+
classPropertyName: "touchUi",
|
|
602
|
+
publicName: "touchUi",
|
|
603
|
+
isSignal: true,
|
|
604
|
+
isRequired: false,
|
|
605
|
+
transformFunction: null
|
|
606
|
+
},
|
|
607
|
+
placeholder: {
|
|
608
|
+
classPropertyName: "placeholder",
|
|
609
|
+
publicName: "placeholder",
|
|
610
|
+
isSignal: false,
|
|
611
|
+
isRequired: false,
|
|
612
|
+
transformFunction: null
|
|
613
|
+
},
|
|
614
|
+
disabled: {
|
|
615
|
+
classPropertyName: "disabled",
|
|
616
|
+
publicName: "disabled",
|
|
617
|
+
isSignal: false,
|
|
618
|
+
isRequired: false,
|
|
619
|
+
transformFunction: null
|
|
620
|
+
},
|
|
621
|
+
required: {
|
|
622
|
+
classPropertyName: "required",
|
|
623
|
+
publicName: "required",
|
|
624
|
+
isSignal: false,
|
|
625
|
+
isRequired: false,
|
|
626
|
+
transformFunction: null
|
|
627
|
+
},
|
|
628
|
+
value: {
|
|
629
|
+
classPropertyName: "value",
|
|
630
|
+
publicName: "value",
|
|
631
|
+
isSignal: false,
|
|
632
|
+
isRequired: false,
|
|
633
|
+
transformFunction: null
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
host: { properties: { "attr.id": "id" } },
|
|
637
|
+
providers: [{
|
|
638
|
+
provide: MatFormFieldControl,
|
|
639
|
+
useExisting: CmatCascadeListComponent
|
|
640
|
+
}],
|
|
641
|
+
viewQueries: [
|
|
642
|
+
{
|
|
643
|
+
propertyName: "overlayOrigin",
|
|
644
|
+
first: true,
|
|
645
|
+
predicate: CdkOverlayOrigin,
|
|
646
|
+
descendants: true,
|
|
647
|
+
isSignal: true
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
propertyName: "menuTemplate",
|
|
651
|
+
first: true,
|
|
652
|
+
predicate: CdkPortal,
|
|
653
|
+
descendants: true,
|
|
654
|
+
isSignal: true
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
propertyName: "_inputElement",
|
|
658
|
+
first: true,
|
|
659
|
+
predicate: ["inputElement"],
|
|
660
|
+
descendants: true,
|
|
661
|
+
isSignal: true
|
|
662
|
+
}
|
|
663
|
+
],
|
|
664
|
+
exportAs: ["cmatCascadeList"],
|
|
665
|
+
ngImport: i0,
|
|
666
|
+
template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>",
|
|
667
|
+
styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"],
|
|
668
|
+
dependencies: [
|
|
669
|
+
{
|
|
670
|
+
kind: "ngmodule",
|
|
671
|
+
type: MatIconModule
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
kind: "component",
|
|
675
|
+
type: i4$1.MatIcon,
|
|
676
|
+
selector: "mat-icon",
|
|
677
|
+
inputs: [
|
|
678
|
+
"color",
|
|
679
|
+
"inline",
|
|
680
|
+
"svgIcon",
|
|
681
|
+
"fontSet",
|
|
682
|
+
"fontIcon"
|
|
683
|
+
],
|
|
684
|
+
exportAs: ["matIcon"]
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
kind: "directive",
|
|
688
|
+
type: NgClass,
|
|
689
|
+
selector: "[ngClass]",
|
|
690
|
+
inputs: ["class", "ngClass"]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
kind: "component",
|
|
694
|
+
type: CmatCascadeMenuComponent,
|
|
695
|
+
selector: "cmat-cascade-menu",
|
|
696
|
+
exportAs: ["cmatCascadeMenu"]
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
kind: "ngmodule",
|
|
700
|
+
type: MatInputModule
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
kind: "directive",
|
|
704
|
+
type: i2.MatInput,
|
|
705
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
706
|
+
inputs: [
|
|
707
|
+
"disabled",
|
|
708
|
+
"id",
|
|
709
|
+
"placeholder",
|
|
710
|
+
"name",
|
|
711
|
+
"required",
|
|
712
|
+
"type",
|
|
713
|
+
"errorStateMatcher",
|
|
714
|
+
"aria-describedby",
|
|
715
|
+
"value",
|
|
716
|
+
"readonly",
|
|
717
|
+
"disabledInteractive"
|
|
718
|
+
],
|
|
719
|
+
exportAs: ["matInput"]
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
kind: "directive",
|
|
723
|
+
type: i2.MatSuffix,
|
|
724
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
725
|
+
inputs: ["matTextSuffix"]
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
kind: "ngmodule",
|
|
729
|
+
type: OverlayModule
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
kind: "directive",
|
|
733
|
+
type: i3.CdkOverlayOrigin,
|
|
734
|
+
selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
|
|
735
|
+
exportAs: ["cdkOverlayOrigin"]
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
kind: "ngmodule",
|
|
739
|
+
type: PortalModule
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
kind: "directive",
|
|
743
|
+
type: i4.CdkPortal,
|
|
744
|
+
selector: "[cdkPortal]",
|
|
745
|
+
exportAs: ["cdkPortal"]
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
kind: "ngmodule",
|
|
749
|
+
type: MatButtonModule
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
kind: "component",
|
|
753
|
+
type: i1.MatIconButton,
|
|
754
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
755
|
+
exportAs: ["matButton", "matAnchor"]
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
759
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
764
|
+
minVersion: "12.0.0",
|
|
765
|
+
version: "22.2.3",
|
|
766
|
+
ngImport: i0,
|
|
767
|
+
type: CmatCascadeListComponent,
|
|
768
|
+
decorators: [{
|
|
769
|
+
type: Component,
|
|
770
|
+
args: [{
|
|
771
|
+
selector: "cmat-cascade-list",
|
|
772
|
+
providers: [{
|
|
773
|
+
provide: MatFormFieldControl,
|
|
774
|
+
useExisting: CmatCascadeListComponent
|
|
775
|
+
}],
|
|
776
|
+
encapsulation: ViewEncapsulation.None,
|
|
777
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
778
|
+
exportAs: "cmatCascadeList",
|
|
779
|
+
imports: [
|
|
780
|
+
MatIconModule,
|
|
781
|
+
NgClass,
|
|
782
|
+
CmatCascadeMenuComponent,
|
|
783
|
+
MatInputModule,
|
|
784
|
+
OverlayModule,
|
|
785
|
+
PortalModule,
|
|
786
|
+
MatButtonModule
|
|
787
|
+
],
|
|
788
|
+
host: { "[attr.id]": "id" },
|
|
789
|
+
template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>",
|
|
790
|
+
styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"]
|
|
791
|
+
}]
|
|
792
|
+
}],
|
|
793
|
+
ctorParameters: () => [],
|
|
794
|
+
propDecorators: {
|
|
795
|
+
options: [{
|
|
796
|
+
type: i0.Input,
|
|
797
|
+
args: [{
|
|
798
|
+
isSignal: true,
|
|
799
|
+
alias: "options",
|
|
800
|
+
required: true
|
|
801
|
+
}]
|
|
802
|
+
}],
|
|
803
|
+
clearable: [{
|
|
804
|
+
type: i0.Input,
|
|
805
|
+
args: [{
|
|
806
|
+
isSignal: true,
|
|
807
|
+
alias: "clearable",
|
|
808
|
+
required: false
|
|
809
|
+
}]
|
|
810
|
+
}],
|
|
811
|
+
fullLevels: [{
|
|
812
|
+
type: i0.Input,
|
|
813
|
+
args: [{
|
|
814
|
+
isSignal: true,
|
|
815
|
+
alias: "fullLevels",
|
|
816
|
+
required: false
|
|
817
|
+
}]
|
|
818
|
+
}],
|
|
819
|
+
changeOnSelect: [{
|
|
820
|
+
type: i0.Input,
|
|
821
|
+
args: [{
|
|
822
|
+
isSignal: true,
|
|
823
|
+
alias: "changeOnSelect",
|
|
824
|
+
required: false
|
|
825
|
+
}]
|
|
826
|
+
}],
|
|
827
|
+
allowLabelValue: [{
|
|
828
|
+
type: i0.Input,
|
|
829
|
+
args: [{
|
|
830
|
+
isSignal: true,
|
|
831
|
+
alias: "allowLabelValue",
|
|
832
|
+
required: false
|
|
833
|
+
}]
|
|
834
|
+
}],
|
|
835
|
+
touchUi: [{
|
|
836
|
+
type: i0.Input,
|
|
837
|
+
args: [{
|
|
838
|
+
isSignal: true,
|
|
839
|
+
alias: "touchUi",
|
|
840
|
+
required: false
|
|
841
|
+
}]
|
|
842
|
+
}],
|
|
843
|
+
overlayOrigin: [{
|
|
844
|
+
type: i0.ViewChild,
|
|
845
|
+
args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }]
|
|
846
|
+
}],
|
|
847
|
+
menuTemplate: [{
|
|
848
|
+
type: i0.ViewChild,
|
|
849
|
+
args: [i0.forwardRef(() => CdkPortal), { isSignal: true }]
|
|
850
|
+
}],
|
|
851
|
+
_inputElement: [{
|
|
852
|
+
type: i0.ViewChild,
|
|
853
|
+
args: ["inputElement", { isSignal: true }]
|
|
854
|
+
}],
|
|
855
|
+
placeholder: [{ type: Input }],
|
|
856
|
+
disabled: [{ type: Input }],
|
|
857
|
+
required: [{ type: Input }],
|
|
858
|
+
value: [{ type: Input }]
|
|
859
|
+
}
|
|
860
|
+
});
|
|
442
861
|
export { CmatCascadeBottomSheetComponent, CmatCascadeListComponent };
|
|
443
|
-
|
|
862
|
+
|
|
863
|
+
//# sourceMappingURL=cmat-components-cascade.mjs.map
|