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,82 +1,111 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { InjectionToken, inject, signal
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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 { Injectable, InjectionToken, inject, signal } from "@angular/core";
|
|
3
|
+
const CMAT_APP_CONFIG = new InjectionToken("CMAT_APP_CONFIG");
|
|
4
|
+
var CmatConfigService = class CmatConfigService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._defaultConfig = structuredClone(inject(CMAT_APP_CONFIG));
|
|
7
|
+
this._config = signal(structuredClone(this._defaultConfig), ...ngDevMode ? [{ debugName: "_config" }] : /* istanbul ignore next */ []);
|
|
8
|
+
this.config = this._config.asReadonly();
|
|
9
|
+
}
|
|
10
|
+
updateConfig(value) {
|
|
11
|
+
const config = this._mergeConfig(this._config(), value);
|
|
12
|
+
this._config.set(config);
|
|
13
|
+
}
|
|
14
|
+
reset() {
|
|
15
|
+
this._config.set(structuredClone(this._defaultConfig));
|
|
16
|
+
}
|
|
17
|
+
_mergeConfig(target, source) {
|
|
18
|
+
const result = structuredClone(target);
|
|
19
|
+
for (const [key, value] of Object.entries(source)) {
|
|
20
|
+
if (value === void 0) continue;
|
|
21
|
+
const resultValue = result[key];
|
|
22
|
+
if (this._isRecord(resultValue) && this._isRecord(value)) {
|
|
23
|
+
result[key] = this._mergeConfig(resultValue, value);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
result[key] = structuredClone(value);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
_isRecord(value) {
|
|
31
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32
|
+
}
|
|
33
|
+
static {
|
|
34
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
35
|
+
minVersion: "12.0.0",
|
|
36
|
+
version: "22.2.3",
|
|
37
|
+
ngImport: i0,
|
|
38
|
+
type: CmatConfigService,
|
|
39
|
+
deps: [],
|
|
40
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
static {
|
|
44
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
45
|
+
minVersion: "12.0.0",
|
|
46
|
+
version: "22.2.3",
|
|
47
|
+
ngImport: i0,
|
|
48
|
+
type: CmatConfigService,
|
|
49
|
+
providedIn: "root"
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.3",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: CmatConfigService,
|
|
58
|
+
decorators: [{
|
|
59
|
+
type: Injectable,
|
|
60
|
+
args: [{ providedIn: "root" }]
|
|
61
|
+
}]
|
|
62
|
+
});
|
|
63
|
+
var CmatUrlStateConfigService = class CmatUrlStateConfigService {
|
|
64
|
+
constructor() {
|
|
65
|
+
this._defaultConfig = {
|
|
66
|
+
fileUrl: "",
|
|
67
|
+
enableDataProtect: false
|
|
68
|
+
};
|
|
69
|
+
this._config = signal({ ...this._defaultConfig }, ...ngDevMode ? [{ debugName: "_config" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.config = this._config.asReadonly();
|
|
71
|
+
}
|
|
72
|
+
updateConfig(value) {
|
|
73
|
+
const config = {
|
|
74
|
+
...this._config(),
|
|
75
|
+
...value
|
|
76
|
+
};
|
|
77
|
+
this._config.set(config);
|
|
78
|
+
}
|
|
79
|
+
static {
|
|
80
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
81
|
+
minVersion: "12.0.0",
|
|
82
|
+
version: "22.2.3",
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
type: CmatUrlStateConfigService,
|
|
85
|
+
deps: [],
|
|
86
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
static {
|
|
90
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
91
|
+
minVersion: "12.0.0",
|
|
92
|
+
version: "22.2.3",
|
|
93
|
+
ngImport: i0,
|
|
94
|
+
type: CmatUrlStateConfigService,
|
|
95
|
+
providedIn: "root"
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.3",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: CmatUrlStateConfigService,
|
|
104
|
+
decorators: [{
|
|
105
|
+
type: Injectable,
|
|
106
|
+
args: [{ providedIn: "root" }]
|
|
107
|
+
}]
|
|
108
|
+
});
|
|
81
109
|
export { CMAT_APP_CONFIG, CmatConfigService, CmatUrlStateConfigService };
|
|
82
|
-
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=cmat-services-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-services-config.mjs","sources":["../../../projects/cmat/services/config/config.constants.ts","../../../projects/cmat/services/config/config.service.ts","../../../projects/cmat/services/config/urlStateConfig.service.ts"
|
|
1
|
+
{"version":3,"file":"cmat-services-config.mjs","names":[],"sources":["../../../projects/cmat/services/config/config.constants.ts","../../../projects/cmat/services/config/config.service.ts","../../../projects/cmat/services/config/urlStateConfig.service.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport type CmatScheme = 'auto' | 'dark' | 'light';\r\n\r\nexport type CmatTheme = string;\r\n\r\nexport type CmatScreens = Record<string, string>;\r\n\r\nexport type CmatThemeOption<TExtra extends Record<string, unknown> = Record<string, unknown>> = {\r\n id: string;\r\n name: string;\r\n} & TExtra;\r\n\r\nexport interface CmatAppConfigBase {\r\n layout: string;\r\n scheme: CmatScheme;\r\n screens: CmatScreens;\r\n theme: CmatTheme;\r\n themes: CmatThemeOption[];\r\n}\r\n\r\nexport type CmatAppConfig<TExtra extends Record<string, unknown> = Record<string, unknown>> = CmatAppConfigBase & TExtra;\r\n\r\nexport const CMAT_APP_CONFIG = new InjectionToken<CmatAppConfig>('CMAT_APP_CONFIG');\r\n\r\nexport interface IUrlStateConfig {\r\n fileUrl: string;\r\n enableDataProtect: boolean;\r\n}\r\n","import { Injectable, inject, signal } from '@angular/core';\r\nimport { CMAT_APP_CONFIG, CmatAppConfig } from './config.constants';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfigService {\r\n private readonly _defaultConfig = structuredClone(inject(CMAT_APP_CONFIG));\r\n private readonly _config = signal<CmatAppConfig>(structuredClone(this._defaultConfig));\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly config = this._config.asReadonly();\r\n\r\n updateConfig(value: Partial<CmatAppConfig>): void {\r\n const config = this._mergeConfig(this._config(), value);\r\n\r\n this._config.set(config);\r\n }\r\n\r\n reset(): void {\r\n this._config.set(structuredClone(this._defaultConfig));\r\n }\r\n\r\n private _mergeConfig<T extends Record<string, unknown>>(target: T, source: Partial<T>): T {\r\n const result = structuredClone(target) as Record<string, unknown>;\r\n\r\n for (const [key, value] of Object.entries(source)) {\r\n if (value === undefined) {\r\n continue;\r\n }\r\n\r\n const resultValue = result[key];\r\n if (this._isRecord(resultValue) && this._isRecord(value)) {\r\n result[key] = this._mergeConfig(resultValue, value);\r\n continue;\r\n }\r\n\r\n result[key] = structuredClone(value);\r\n }\r\n\r\n return result as T;\r\n }\r\n\r\n private _isRecord(value: unknown): value is Record<string, unknown> {\r\n return typeof value === 'object' && value !== null && !Array.isArray(value);\r\n }\r\n}\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { IUrlStateConfig } from './config.constants';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatUrlStateConfigService {\r\n private readonly _defaultConfig: IUrlStateConfig = {\r\n fileUrl: '',\r\n enableDataProtect: false\r\n };\r\n private readonly _config = signal<IUrlStateConfig>({ ...this._defaultConfig });\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly config = this._config.asReadonly();\r\n\r\n updateConfig(value: Partial<IUrlStateConfig>): void {\r\n const config: IUrlStateConfig = {\r\n ...this._config(),\r\n ...value\r\n };\r\n\r\n this._config.set(config);\r\n }\r\n}\r\n"],"mappings":";;AAuBA,MAAa,kBAAkB,IAAI,eAA8B,iBAAiB;ACjBlF,IAAa,oBAAb,MAAa,kBAAiB;CAH9B,cAAA;EAIqB,KAAA,iBAAiB,gBAAgB,OAAO,eAAe,CAAC;EACxD,KAAA,UAAU,OAAsB,gBAAgB,KAAK,cAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAG7E,KAAA,SAAS,KAAK,QAAQ,WAAU;CAmC5C;CAjCG,aAAa,OAA6B;EACtC,MAAM,SAAS,KAAK,aAAa,KAAK,QAAO,GAAI,KAAK;EAEtD,KAAK,QAAQ,IAAI,MAAM;CAC3B;CAEA,QAAK;EACD,KAAK,QAAQ,IAAI,gBAAgB,KAAK,cAAc,CAAC;CACzD;CAEQ,aAAgD,QAAW,QAAkB;EACjF,MAAM,SAAS,gBAAgB,MAAM;EAErC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;GAC/C,IAAI,UAAU,QACV;GAGJ,MAAM,cAAc,OAAO;GAC3B,IAAI,KAAK,UAAU,WAAW,KAAK,KAAK,UAAU,KAAK,GAAG;IACtD,OAAO,OAAO,KAAK,aAAa,aAAa,KAAK;IAClD;GACJ;GAEA,OAAO,OAAO,gBAAgB,KAAK;EACvC;EAEA,OAAO;CACX;CAEQ,UAAU,OAAc;EAC5B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;CAC9E;CAvCS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EA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
|
-
import * as i1 from
|
|
8
|
-
import { MatButtonModule } from
|
|
9
|
-
import * as i3 from
|
|
10
|
-
import { MatIconModule } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, Injectable, ViewEncapsulation, inject } from "@angular/core";
|
|
3
|
+
import * as i2 from "@angular/material/dialog";
|
|
4
|
+
import { MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef } from "@angular/material/dialog";
|
|
5
|
+
import { merge } from "lodash-es";
|
|
6
|
+
import { NgClass } from "@angular/common";
|
|
7
|
+
import * as i1 from "@angular/material/button";
|
|
8
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
9
|
+
import * as i3 from "@angular/material/icon";
|
|
10
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
11
|
+
var CmatConfirmationDialogComponent = class CmatConfirmationDialogComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.data = inject(MAT_DIALOG_DATA);
|
|
14
|
+
this.matDialogRef = inject(MatDialogRef);
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "22.2.3",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: CmatConfirmationDialogComponent,
|
|
22
|
+
deps: [],
|
|
23
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static {
|
|
27
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
28
|
+
minVersion: "17.0.0",
|
|
29
|
+
version: "22.2.3",
|
|
30
|
+
type: CmatConfirmationDialogComponent,
|
|
31
|
+
isStandalone: true,
|
|
32
|
+
selector: "cmat-confirmation-dialog",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n \r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" matIconButton [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n \r\n <div class=\"flex flex-col md:flex-row items-center md:items-start p-8 pb-6 md:pb-8\">\r\n\r\n \r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 md:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon.color === 'error'\r\n }\">\r\n @if (data.icon.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center md:items-start mt-4 md:mt-0 md:pr-8 gap-1 text-center md:text-left\">\r\n \r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n \r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n \r\n @if (data.actions.confirm?.show || data.actions.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center md:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n \r\n @if (data.actions.confirm?.show) {\r\n <button type=\"button\" matButton=\"filled\" [color]=\"data.actions.confirm.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions.confirm.label}}\r\n </button>\r\n }\r\n \r\n @if (data.actions.cancel?.show) {\r\n <button type=\"button\" matButton=\"outlined\" [matDialogClose]=\"'cancelled'\">\r\n {{data.actions.cancel.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>",
|
|
35
|
+
styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"],
|
|
36
|
+
dependencies: [
|
|
37
|
+
{
|
|
38
|
+
kind: "ngmodule",
|
|
39
|
+
type: MatButtonModule
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
kind: "component",
|
|
43
|
+
type: i1.MatButton,
|
|
44
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
45
|
+
inputs: ["matButton"],
|
|
46
|
+
exportAs: ["matButton", "matAnchor"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
kind: "component",
|
|
50
|
+
type: i1.MatIconButton,
|
|
51
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
52
|
+
exportAs: ["matButton", "matAnchor"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
kind: "ngmodule",
|
|
56
|
+
type: MatDialogModule
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
kind: "directive",
|
|
60
|
+
type: i2.MatDialogClose,
|
|
61
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
62
|
+
inputs: [
|
|
63
|
+
"aria-label",
|
|
64
|
+
"type",
|
|
65
|
+
"mat-dialog-close",
|
|
66
|
+
"matDialogClose"
|
|
67
|
+
],
|
|
68
|
+
exportAs: ["matDialogClose"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "ngmodule",
|
|
72
|
+
type: MatIconModule
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "component",
|
|
76
|
+
type: i3.MatIcon,
|
|
77
|
+
selector: "mat-icon",
|
|
78
|
+
inputs: [
|
|
79
|
+
"color",
|
|
80
|
+
"inline",
|
|
81
|
+
"svgIcon",
|
|
82
|
+
"fontSet",
|
|
83
|
+
"fontIcon"
|
|
84
|
+
],
|
|
85
|
+
exportAs: ["matIcon"]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
kind: "directive",
|
|
89
|
+
type: NgClass,
|
|
90
|
+
selector: "[ngClass]",
|
|
91
|
+
inputs: ["class", "ngClass"]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
99
|
+
minVersion: "12.0.0",
|
|
100
|
+
version: "22.2.3",
|
|
101
|
+
ngImport: i0,
|
|
102
|
+
type: CmatConfirmationDialogComponent,
|
|
103
|
+
decorators: [{
|
|
104
|
+
type: Component,
|
|
105
|
+
args: [{
|
|
106
|
+
selector: "cmat-confirmation-dialog",
|
|
107
|
+
encapsulation: ViewEncapsulation.None,
|
|
108
|
+
imports: [
|
|
109
|
+
MatButtonModule,
|
|
110
|
+
MatDialogModule,
|
|
111
|
+
MatIconModule,
|
|
112
|
+
NgClass
|
|
113
|
+
],
|
|
114
|
+
template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n \r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" matIconButton [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n \r\n <div class=\"flex flex-col md:flex-row items-center md:items-start p-8 pb-6 md:pb-8\">\r\n\r\n \r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 md:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon.color === 'error'\r\n }\">\r\n @if (data.icon.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center md:items-start mt-4 md:mt-0 md:pr-8 gap-1 text-center md:text-left\">\r\n \r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n \r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n \r\n @if (data.actions.confirm?.show || data.actions.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center md:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n \r\n @if (data.actions.confirm?.show) {\r\n <button type=\"button\" matButton=\"filled\" [color]=\"data.actions.confirm.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions.confirm.label}}\r\n </button>\r\n }\r\n \r\n @if (data.actions.cancel?.show) {\r\n <button type=\"button\" matButton=\"outlined\" [matDialogClose]=\"'cancelled'\">\r\n {{data.actions.cancel.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>",
|
|
115
|
+
styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"]
|
|
116
|
+
}]
|
|
117
|
+
}]
|
|
118
|
+
});
|
|
119
|
+
var CmatConfirmationService = class CmatConfirmationService {
|
|
120
|
+
constructor() {
|
|
121
|
+
this._matDialog = inject(MatDialog);
|
|
122
|
+
this._defaultConfig = {
|
|
123
|
+
title: "确认操作",
|
|
124
|
+
message: "确认此操作吗?",
|
|
125
|
+
icon: {
|
|
126
|
+
show: true,
|
|
127
|
+
name: "heroicons_outline:exclamation-triangle",
|
|
128
|
+
color: "warn"
|
|
129
|
+
},
|
|
130
|
+
actions: {
|
|
131
|
+
confirm: {
|
|
132
|
+
show: true,
|
|
133
|
+
label: "确认",
|
|
134
|
+
color: "warn"
|
|
135
|
+
},
|
|
136
|
+
cancel: {
|
|
137
|
+
show: true,
|
|
138
|
+
label: "取消"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
dismissible: false
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
open(config) {
|
|
145
|
+
const userConfig = merge({}, this._defaultConfig, config);
|
|
146
|
+
return this._matDialog.open(CmatConfirmationDialogComponent, {
|
|
147
|
+
autoFocus: false,
|
|
148
|
+
disableClose: !userConfig.dismissible,
|
|
149
|
+
data: userConfig,
|
|
150
|
+
panelClass: "cmat-confirmation-dialog-panel"
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
static {
|
|
154
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
155
|
+
minVersion: "12.0.0",
|
|
156
|
+
version: "22.2.3",
|
|
157
|
+
ngImport: i0,
|
|
158
|
+
type: CmatConfirmationService,
|
|
159
|
+
deps: [],
|
|
160
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
static {
|
|
164
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
165
|
+
minVersion: "12.0.0",
|
|
166
|
+
version: "22.2.3",
|
|
167
|
+
ngImport: i0,
|
|
168
|
+
type: CmatConfirmationService,
|
|
169
|
+
providedIn: "root"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
174
|
+
minVersion: "12.0.0",
|
|
175
|
+
version: "22.2.3",
|
|
176
|
+
ngImport: i0,
|
|
177
|
+
type: CmatConfirmationService,
|
|
178
|
+
decorators: [{
|
|
179
|
+
type: Injectable,
|
|
180
|
+
args: [{ providedIn: "root" }]
|
|
181
|
+
}]
|
|
182
|
+
});
|
|
73
183
|
export { CmatConfirmationService };
|
|
74
|
-
|
|
184
|
+
|
|
185
|
+
//# sourceMappingURL=cmat-services-confirmation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-services-confirmation.mjs","sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts"
|
|
1
|
+
{"version":3,"file":"cmat-services-confirmation.mjs","names":[],"sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\n\r\n@Component({\r\n selector: 'cmat-confirmation-dialog',\r\n templateUrl: './dialog.component.html',\r\n styles: [\r\n /* language=SCSS */\r\n `\r\n .cmat-confirmation-dialog-panel {\r\n .mat-mdc-dialog-container {\r\n padding: 0 !important;\r\n }\r\n }\r\n `\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass]\r\n})\r\nexport class CmatConfirmationDialogComponent {\r\n data = inject<CmatConfirmationConfig>(MAT_DIALOG_DATA);\r\n matDialogRef = inject<MatDialogRef<CmatConfirmationDialogComponent>>(MatDialogRef);\r\n}\r\n","<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n \r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" matIconButton [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n \r\n <div class=\"flex flex-col md:flex-row items-center md:items-start p-8 pb-6 md:pb-8\">\r\n\r\n \r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 md:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon.color === 'error'\r\n }\">\r\n @if (data.icon.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center md:items-start mt-4 md:mt-0 md:pr-8 gap-1 text-center md:text-left\">\r\n \r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n \r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n \r\n @if (data.actions.confirm?.show || data.actions.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center md:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n \r\n @if (data.actions.confirm?.show) {\r\n <button type=\"button\" matButton=\"filled\" [color]=\"data.actions.confirm.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions.confirm.label}}\r\n </button>\r\n }\r\n \r\n @if (data.actions.cancel?.show) {\r\n <button type=\"button\" matButton=\"outlined\" [matDialogClose]=\"'cancelled'\">\r\n {{data.actions.cancel.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>","import { Injectable, inject } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { merge } from 'lodash-es';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\r\nimport { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfirmationService {\r\n private _matDialog = inject(MatDialog);\r\n\r\n private _defaultConfig: CmatConfirmationConfig = {\r\n title: '确认操作',\r\n message: '确认此操作吗?',\r\n icon: {\r\n show: true,\r\n name: 'heroicons_outline:exclamation-triangle',\r\n color: 'warn'\r\n },\r\n actions: {\r\n confirm: {\r\n show: true,\r\n label: '确认',\r\n color: 'warn'\r\n },\r\n cancel: {\r\n show: true,\r\n label: '取消'\r\n }\r\n },\r\n dismissible: false\r\n };\r\n\r\n open(config: CmatConfirmationConfig): MatDialogRef<CmatConfirmationDialogComponent> {\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n return this._matDialog.open(CmatConfirmationDialogComponent, {\r\n autoFocus: false,\r\n disableClose: !userConfig.dismissible,\r\n data: userConfig,\r\n panelClass: 'cmat-confirmation-dialog-panel'\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;AAuBA,IAAa,kCAAb,MAAa,gCAA+B;CAhB5C,cAAA;EAiBI,KAAA,OAAO,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