cmat 0.0.110 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cmat-components-adapter.mjs +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2751 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +985 -669
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39806 -22071
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1131 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -92
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5194
|
@@ -1,94 +1,99 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
left: number;
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface CmatPrintMargins {
|
|
3
|
+
top: number;
|
|
4
|
+
right: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
8
7
|
}
|
|
9
|
-
interface CmatPrintOptions {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
8
|
+
export interface CmatPrintOptions {
|
|
9
|
+
/** 打印标题,显示在页眉区域和浏览器打印对话框标题 */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** 页面方向,默认 portrait */
|
|
12
|
+
orientation?: 'portrait' | 'landscape';
|
|
13
|
+
/** 页面边距(mm),默认 { top: 15, right: 15, bottom: 15, left: 15 } */
|
|
14
|
+
margins?: CmatPrintMargins;
|
|
15
|
+
/** 自定义 CSS,追加到打印基础样式之后 */
|
|
16
|
+
customCss?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 页眉 HTML 字符串。
|
|
19
|
+
* 传 null 可隐藏默认页眉,不传则使用 title + 打印时间
|
|
20
|
+
*/
|
|
21
|
+
header?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* 页脚 HTML 字符串。
|
|
24
|
+
* 传 null 可隐藏默认页脚,不传则显示打印来源提示
|
|
25
|
+
*/
|
|
26
|
+
footer?: string | null;
|
|
27
|
+
/** 需要从克隆 DOM 中额外移除的 CSS 选择器列表 */
|
|
28
|
+
excludeSelectors?: string[];
|
|
29
|
+
/** 打印完成后回调 */
|
|
30
|
+
afterPrint?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 调试模式:不触发打印,而是在新标签页中打开生成的 HTML。
|
|
33
|
+
* 可用浏览器 DevTools 检查布局、样式,方便排查打印问题。
|
|
34
|
+
*/
|
|
35
|
+
debug?: boolean;
|
|
32
36
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
37
|
+
export declare class CmatPrintService {
|
|
38
|
+
/**
|
|
39
|
+
* 打印指定 DOM 元素
|
|
40
|
+
* 保留原始 DOM 结构和样式,同步表单控件的当前值
|
|
41
|
+
*/
|
|
42
|
+
printElement(element: HTMLElement, options?: CmatPrintOptions): void;
|
|
43
|
+
/**
|
|
44
|
+
* 通过 CSS 选择器打印第一个匹配的元素
|
|
45
|
+
*/
|
|
46
|
+
printSelector(selector: string, options?: CmatPrintOptions): void;
|
|
47
|
+
/**
|
|
48
|
+
* 打印原始 HTML 字符串(不进行 DOM 转换,直接注入)
|
|
49
|
+
*/
|
|
50
|
+
printHtml(html: string, options?: CmatPrintOptions): void;
|
|
51
|
+
/**
|
|
52
|
+
* 调试模式:将生成的 HTML 在新标签页中打开,方便用 DevTools 检查布局
|
|
53
|
+
* 调用方式:this._printService.debugPrint(el, { title: '报表' })
|
|
54
|
+
*/
|
|
55
|
+
debugPrint(element: HTMLElement, options?: CmatPrintOptions): void;
|
|
56
|
+
/**
|
|
57
|
+
* 同步原始 DOM 中表单控件的当前值到克隆节点
|
|
58
|
+
* cloneNode() 不会复制 input.value 等 live property,
|
|
59
|
+
* 必须手动同步为 HTML attribute 才能在 iframe 中正确渲染
|
|
60
|
+
*/
|
|
61
|
+
private _syncFormValues;
|
|
62
|
+
/**
|
|
63
|
+
* 最小化打印准备:DOM 转换 + 清理
|
|
64
|
+
* 对无法正确打印的组件进行 DOM 替换,对关键元素复制 computed style
|
|
65
|
+
*/
|
|
66
|
+
private _prepareForPrint;
|
|
67
|
+
/**
|
|
68
|
+
* 将原始页面中关键元素的 computed style 复制为 inline style
|
|
69
|
+
* 确保 iframe 中即使 CSS 规则不生效,样式也能通过 inline style 保留
|
|
70
|
+
*/
|
|
71
|
+
private _inlineComputedStyles;
|
|
72
|
+
/** 构建完整 HTML 并注入 iframe 执行打印 */
|
|
73
|
+
private _print;
|
|
74
|
+
/**
|
|
75
|
+
* 通过 document.styleSheets API 收集所有样式规则
|
|
76
|
+
* 关键处理:将 @media screen 转换为同时适用于 print
|
|
77
|
+
* (因为 iframe 调用 print() 时媒体类型切换为 print,screen-only 规则会失效)
|
|
78
|
+
*/
|
|
79
|
+
private _collectAllStyles;
|
|
80
|
+
/**
|
|
81
|
+
* 将 @media screen 相关查询转换为同时适用 print
|
|
82
|
+
* 确保打印时不丢失屏幕样式(如表格奇偶行、border 等)
|
|
83
|
+
*/
|
|
84
|
+
private _transformMediaForPrint;
|
|
85
|
+
/**
|
|
86
|
+
* 收集页面 :root 上的所有 CSS 自定义属性(变量)
|
|
87
|
+
* 这些变量定义了 Material/Tailwind 的边框颜色、主题色等
|
|
88
|
+
* 克隆到 iframe 时祖先链断裂,需要手动复制
|
|
89
|
+
*/
|
|
90
|
+
private _collectCssVariables;
|
|
91
|
+
/** 获取打印用的 body class(复制原始页面的主题类名,移除布局类名) */
|
|
92
|
+
private _getPrintBodyClass;
|
|
93
|
+
/** 创建隐藏 iframe,写入内容,触发打印 */
|
|
94
|
+
private _renderAndPrint;
|
|
95
|
+
/** HTML 转义 */
|
|
96
|
+
private _escapeHtml;
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CmatPrintService, never>;
|
|
98
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
99
|
+
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { CmatSplashScreenService };
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CmatSplashScreenService {
|
|
3
|
+
private _document;
|
|
4
|
+
private _router;
|
|
5
|
+
private readonly _destroyRef;
|
|
6
|
+
constructor();
|
|
7
|
+
show(): void;
|
|
8
|
+
hide(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CmatSplashScreenService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
11
|
+
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { CmatTitleService };
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CmatTitleService {
|
|
3
|
+
private readonly _destroyRef;
|
|
4
|
+
private readonly _router;
|
|
5
|
+
private readonly _titleService;
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CmatTitleService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
9
|
+
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { CmatTranslationService };
|
|
1
|
+
import { Language, Translation } from "@ngx-translate/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CmatTranslationService {
|
|
4
|
+
private _translate;
|
|
5
|
+
private readonly _defaultLanguage;
|
|
6
|
+
private readonly _currentLanguage;
|
|
7
|
+
readonly currentLanguage: import("@angular/core").Signal<string>;
|
|
8
|
+
constructor();
|
|
9
|
+
addLanguages(lang: Language[]): void;
|
|
10
|
+
setDefaultLanguage(lang: Language): void;
|
|
11
|
+
getDefaultLanguage(): Language;
|
|
12
|
+
getBrowserLanguage(): Language | void;
|
|
13
|
+
useBrowserLanguage(): Language | void;
|
|
14
|
+
changeLanguage(language?: Language): Language;
|
|
15
|
+
getTranslation(key: string | string[], interpolateParams?: object): string;
|
|
16
|
+
getTranslationAsync(key: string | string[], interpolateParams?: object): Promise<Translation>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CmatTranslationService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
19
|
+
}
|
|
@@ -1,81 +1,77 @@
|
|
|
1
|
-
import { HttpHeaders, HttpResponseBase } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import { InjectionToken } from
|
|
4
|
-
import { IsActiveMatchOptions } from
|
|
5
|
-
import { Observable } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
specialParam: string;
|
|
1
|
+
import { HttpHeaders, HttpResponseBase } from "@angular/common/http";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { InjectionToken } from "@angular/core";
|
|
4
|
+
import { IsActiveMatchOptions } from "@angular/router";
|
|
5
|
+
import { Observable } from "rxjs";
|
|
6
|
+
export interface CmatCryptoConfig {
|
|
7
|
+
key: string;
|
|
8
|
+
iv: string;
|
|
9
|
+
specialParam: string;
|
|
11
10
|
}
|
|
12
|
-
declare const CMAT_CRYPTO_CONFIG: InjectionToken<CmatCryptoConfig>;
|
|
13
|
-
declare function initializeCmatUtilsConfig(config: CmatCryptoConfig): void;
|
|
14
|
-
declare class CmatUtilsService {
|
|
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
|
-
export { CMAT_CRYPTO_CONFIG, CmatUtilsService, initializeCmatUtilsConfig };
|
|
81
|
-
export type { CmatCryptoConfig };
|
|
11
|
+
export declare const CMAT_CRYPTO_CONFIG: InjectionToken<CmatCryptoConfig>;
|
|
12
|
+
export declare function initializeCmatUtilsConfig(config: CmatCryptoConfig): void;
|
|
13
|
+
export declare class CmatUtilsService {
|
|
14
|
+
static readonly captionAndMessageSeparator = ":";
|
|
15
|
+
static readonly noNetworkMessageCaption = "无网络";
|
|
16
|
+
static readonly noNetworkMessageDetail = "无法连接服务器";
|
|
17
|
+
static readonly accessDeniedMessageCaption = "拒绝访问!";
|
|
18
|
+
static readonly accessDeniedMessageDetail = "";
|
|
19
|
+
private static _key;
|
|
20
|
+
private static _iv;
|
|
21
|
+
private static _specialParam;
|
|
22
|
+
private static get key();
|
|
23
|
+
private static get iv();
|
|
24
|
+
private static get specialParam();
|
|
25
|
+
get exactMatchOptions(): IsActiveMatchOptions;
|
|
26
|
+
get subsetMatchOptions(): IsActiveMatchOptions;
|
|
27
|
+
static setCryptoConfig(config: CmatCryptoConfig): void;
|
|
28
|
+
static getRequestHeaders(): HttpHeaders;
|
|
29
|
+
static getRequestIdempotentHeaders(): HttpHeaders;
|
|
30
|
+
static getRequestBypassHeaders(): HttpHeaders;
|
|
31
|
+
static getRequestIdempotentBypassHeaders(): HttpHeaders;
|
|
32
|
+
static getRequestCryptoHeaders(params: string): HttpHeaders;
|
|
33
|
+
static getRequestCryptoBypassHeaders(params: string): HttpHeaders;
|
|
34
|
+
static getRequestCryptoIdempotentHeaders(params: string): HttpHeaders;
|
|
35
|
+
static getRequestCryptoIdempotentBypassHeaders(params: string): HttpHeaders;
|
|
36
|
+
static getEncryptData(data: string): string;
|
|
37
|
+
static getDecryptData(data: string): string;
|
|
38
|
+
static handleError(error: unknown): Observable<never>;
|
|
39
|
+
static getHttpResponseMessage(data: HttpResponseBase | Record<string, unknown>): string[];
|
|
40
|
+
static findHttpResponseMessage(messageToFind: string, data: HttpResponseBase | Record<string, unknown>, seachInCaptionOnly?: boolean, includeCaptionInResult?: boolean): string | null;
|
|
41
|
+
static getResponseBody(response: HttpResponseBase): Record<string, unknown> | string | null;
|
|
42
|
+
static checkNoNetwork(response: HttpResponseBase): boolean;
|
|
43
|
+
static checkAccessDenied(response: HttpResponseBase): boolean;
|
|
44
|
+
static checkNotFound(response: HttpResponseBase): boolean;
|
|
45
|
+
static checkIsLocalHost(url: string, base?: string): boolean;
|
|
46
|
+
static getQueryParamsFromString(paramString: string): Record<string, string | null> | null;
|
|
47
|
+
static splitInTwo(text: string, separator?: string): {
|
|
48
|
+
firstPart: string;
|
|
49
|
+
secondPart: string | null;
|
|
50
|
+
};
|
|
51
|
+
static safeStringify(object: Record<string, unknown>): string;
|
|
52
|
+
static jsonTryParse(value: string): unknown;
|
|
53
|
+
static capitalizeFirstLetter(text: string): string;
|
|
54
|
+
static toTitleCase(text: string): string;
|
|
55
|
+
static toLowerCase(items: string | readonly string[]): string | string[] | void;
|
|
56
|
+
static uniqueId(): string;
|
|
57
|
+
static randomNumber(min: number, max: number): number;
|
|
58
|
+
static baseUrl(): string;
|
|
59
|
+
static newGuid(): string;
|
|
60
|
+
static testIsAbsoluteUrl(url: string): boolean;
|
|
61
|
+
static convertToAbsoluteUrl(url: string): string;
|
|
62
|
+
static urlBase64Decode(str: string): string;
|
|
63
|
+
static decodeToken(token: string): Record<string, unknown>;
|
|
64
|
+
static getTokenExpirationDate(token: string): Date | null;
|
|
65
|
+
static isTokenExpired(token: string, offsetSeconds?: number): boolean;
|
|
66
|
+
static readAsDataURL(file: File): Promise<string>;
|
|
67
|
+
static dataURIToBlob(dataURI: string): Blob;
|
|
68
|
+
static getFileType(accept: string): 'csv' | 'gif' | 'word' | 'excel' | 'jpg' | 'outlook' | 'pdf' | 'png' | 'ppt' | 'file' | 'text' | 'video' | 'zip';
|
|
69
|
+
static isDateString(value: string | number): boolean;
|
|
70
|
+
static transformObjectsForExport(jsonObjects: Record<string, unknown>[], columns: readonly {
|
|
71
|
+
code: string;
|
|
72
|
+
}[]): Record<string, unknown>[];
|
|
73
|
+
private static _base64DecodeUnicode;
|
|
74
|
+
randomId(stringLength?: number): string;
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CmatUtilsService, never>;
|
|
76
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
77
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { ValidatorFn } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { CmatValidators };
|
|
1
|
+
import { ValidatorFn } from "@angular/forms";
|
|
2
|
+
export declare class CmatValidators {
|
|
3
|
+
static isEmptyInputValue(value: unknown): boolean;
|
|
4
|
+
static mustMatch(controlPath: string, matchingControlPath: string): ValidatorFn;
|
|
5
|
+
}
|
package/types/cmat-version.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare class Version {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export declare class Version {
|
|
2
|
+
version: string;
|
|
3
|
+
readonly full: string;
|
|
4
|
+
readonly major: string;
|
|
5
|
+
readonly minor: string;
|
|
6
|
+
readonly patch: string;
|
|
7
|
+
constructor(version: string);
|
|
8
8
|
}
|
|
9
|
-
declare const CMAT_VERSION: string;
|
|
10
|
-
|
|
11
|
-
export { CMAT_VERSION, Version };
|
|
9
|
+
export declare const CMAT_VERSION: string;
|