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
|
@@ -0,0 +1,1138 @@
|
|
|
1
|
+
import { DataPickerColumn } from "cmat/components/data-picker";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { AfterViewInit, ElementRef, InjectionToken, OnDestroy, Type } from "@angular/core";
|
|
5
|
+
import { ActivatedRoute } from "@angular/router";
|
|
6
|
+
export type ReportComponentType = 'text' | 'metric' | 'table' | 'chart' | 'list';
|
|
7
|
+
export interface ReportPaletteItem {
|
|
8
|
+
type: ReportComponentType;
|
|
9
|
+
icon: string;
|
|
10
|
+
label: string;
|
|
11
|
+
description: string;
|
|
12
|
+
defaultColSpan: number;
|
|
13
|
+
defaultMinHeight: number;
|
|
14
|
+
category: 'basic' | 'data' | 'visual';
|
|
15
|
+
}
|
|
16
|
+
export interface ProviderConfig {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
type: 'mock' | 'api';
|
|
20
|
+
mock?: MockProviderConfig;
|
|
21
|
+
api?: ApiProviderConfig;
|
|
22
|
+
options?: {
|
|
23
|
+
timeout?: number;
|
|
24
|
+
retry?: {
|
|
25
|
+
maxAttempts: number;
|
|
26
|
+
delayMs: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface MockProviderConfig {
|
|
31
|
+
schema: FieldSchema[];
|
|
32
|
+
rowCount: number;
|
|
33
|
+
dataGenerator?: 'sequential' | 'random' | 'fixed';
|
|
34
|
+
fixedData?: Record<string, any>[];
|
|
35
|
+
/** 查询参数声明:API 接受的筛选/查询输入,不属于响应结构 */
|
|
36
|
+
queryParameters?: FieldSchema[];
|
|
37
|
+
}
|
|
38
|
+
export interface ApiProviderConfig {
|
|
39
|
+
url: string;
|
|
40
|
+
method: 'GET' | 'POST';
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
queryParams?: Record<string, string>;
|
|
43
|
+
requestBodyType?: 'json' | 'formdata';
|
|
44
|
+
requestBody?: string;
|
|
45
|
+
responsePath?: string;
|
|
46
|
+
/** 查询参数声明:API 接受的筛选/查询输入 */
|
|
47
|
+
queryParameters?: FieldSchema[];
|
|
48
|
+
}
|
|
49
|
+
export interface SqlProviderConfig {
|
|
50
|
+
connectionId: string;
|
|
51
|
+
query: string;
|
|
52
|
+
params?: Record<string, string>;
|
|
53
|
+
}
|
|
54
|
+
export interface FieldSchema {
|
|
55
|
+
name: string;
|
|
56
|
+
type: 'string' | 'number' | 'date' | 'boolean' | 'unknown';
|
|
57
|
+
label?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Domain 配置接口(API 动态加载选项)
|
|
61
|
+
*/
|
|
62
|
+
export interface ParameterDomainConfig {
|
|
63
|
+
url: string;
|
|
64
|
+
method?: 'GET' | 'POST';
|
|
65
|
+
headers?: Record<string, string>;
|
|
66
|
+
queryParams?: Record<string, string>;
|
|
67
|
+
responsePath?: string;
|
|
68
|
+
keyField?: string;
|
|
69
|
+
labelField?: string;
|
|
70
|
+
childrenField?: string;
|
|
71
|
+
cacheEnabled?: boolean;
|
|
72
|
+
cacheTTL?: number;
|
|
73
|
+
columns?: DataPickerColumn[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 控件专属配置接口
|
|
77
|
+
*/
|
|
78
|
+
export interface ParameterControlConfig {
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
required?: boolean;
|
|
83
|
+
min?: number;
|
|
84
|
+
max?: number;
|
|
85
|
+
step?: number;
|
|
86
|
+
decimalPlaces?: number;
|
|
87
|
+
dateFormat?: string;
|
|
88
|
+
timeFormat?: string;
|
|
89
|
+
showTime?: boolean;
|
|
90
|
+
timeRange?: boolean;
|
|
91
|
+
multiple?: boolean;
|
|
92
|
+
searchable?: boolean;
|
|
93
|
+
clearable?: boolean;
|
|
94
|
+
autocompleteText?: string;
|
|
95
|
+
hasAutocomplete?: boolean;
|
|
96
|
+
pageSize?: number;
|
|
97
|
+
uiMode?: 'auto' | 'drawer' | 'dialog' | 'bottom-sheet';
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* 报表参数模型
|
|
101
|
+
*/
|
|
102
|
+
export interface ReportParameterModel {
|
|
103
|
+
key: string;
|
|
104
|
+
label: string;
|
|
105
|
+
value: unknown;
|
|
106
|
+
type?: 'text' | 'number' | 'date' | 'date-range' | 'data-picker' | 'select' | 'tree-select' | 'radio' | 'checkbox' | 'chips';
|
|
107
|
+
options?: {
|
|
108
|
+
label: string;
|
|
109
|
+
value: unknown;
|
|
110
|
+
}[];
|
|
111
|
+
domain?: ParameterDomainConfig;
|
|
112
|
+
controlConfig?: ParameterControlConfig;
|
|
113
|
+
autoDefault?: boolean;
|
|
114
|
+
internal?: boolean;
|
|
115
|
+
locked?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface ComponentDataBinding {
|
|
118
|
+
providerRef: string;
|
|
119
|
+
query: DataQueryConfig;
|
|
120
|
+
pipeline?: DataPipeline;
|
|
121
|
+
cache?: CacheStrategy;
|
|
122
|
+
}
|
|
123
|
+
export interface DataQueryConfig {
|
|
124
|
+
type: 'list' | 'one' | 'metric' | 'custom';
|
|
125
|
+
params?: Record<string, unknown>;
|
|
126
|
+
pagination?: {
|
|
127
|
+
page: number;
|
|
128
|
+
size: number;
|
|
129
|
+
};
|
|
130
|
+
filters?: FilterCondition[];
|
|
131
|
+
filterLogic?: 'AND' | 'OR';
|
|
132
|
+
simpleMode?: boolean;
|
|
133
|
+
filterGroups?: FilterGroup[];
|
|
134
|
+
sorting?: SortRule[];
|
|
135
|
+
aggregation?: {
|
|
136
|
+
operation: 'sum' | 'avg' | 'min' | 'max' | 'count';
|
|
137
|
+
field: string;
|
|
138
|
+
};
|
|
139
|
+
customQuery?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface FilterCondition {
|
|
142
|
+
field: string;
|
|
143
|
+
operator: '>' | '<' | '>=' | '<=' | '=' | '!=' | 'in' | 'like' | 'contains';
|
|
144
|
+
value: unknown;
|
|
145
|
+
}
|
|
146
|
+
export interface FilterGroup {
|
|
147
|
+
id?: string;
|
|
148
|
+
logic: 'AND' | 'OR';
|
|
149
|
+
conditions: FilterCondition[];
|
|
150
|
+
groups?: FilterGroup[];
|
|
151
|
+
}
|
|
152
|
+
export interface SortRule {
|
|
153
|
+
field: string;
|
|
154
|
+
order: 'asc' | 'desc';
|
|
155
|
+
}
|
|
156
|
+
export interface DataPipeline {
|
|
157
|
+
preProcess?: TransformStep[];
|
|
158
|
+
postProcess?: TransformStep[];
|
|
159
|
+
fieldMapping?: FieldMap[];
|
|
160
|
+
}
|
|
161
|
+
export interface TransformStep {
|
|
162
|
+
type: 'filter' | 'map' | 'sort' | 'limit' | 'group';
|
|
163
|
+
config: Record<string, any>;
|
|
164
|
+
}
|
|
165
|
+
export interface FieldMap {
|
|
166
|
+
from: string;
|
|
167
|
+
to: string;
|
|
168
|
+
}
|
|
169
|
+
export interface CacheStrategy {
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
ttlSeconds?: number;
|
|
172
|
+
key?: string;
|
|
173
|
+
}
|
|
174
|
+
export interface ReportComponentModel {
|
|
175
|
+
id: string;
|
|
176
|
+
type: ReportComponentType;
|
|
177
|
+
label: string;
|
|
178
|
+
dataBinding?: ComponentDataBinding | null;
|
|
179
|
+
colSpan: number;
|
|
180
|
+
minHeight: number;
|
|
181
|
+
note: string;
|
|
182
|
+
responsiveLayout?: ResponsiveLayoutConfig;
|
|
183
|
+
style?: ComponentStyle;
|
|
184
|
+
position?: 'top' | 'bottom' | 'top-bottom' | '';
|
|
185
|
+
parameters?: ReportParameterModel[];
|
|
186
|
+
config?: ComponentConfig;
|
|
187
|
+
}
|
|
188
|
+
export interface ResponsiveLayoutConfig {
|
|
189
|
+
tablet?: number;
|
|
190
|
+
mobile?: number;
|
|
191
|
+
}
|
|
192
|
+
export interface ComponentStyle {
|
|
193
|
+
background?: string;
|
|
194
|
+
border?: string;
|
|
195
|
+
fontSize?: string;
|
|
196
|
+
color?: string;
|
|
197
|
+
padding?: string;
|
|
198
|
+
margin?: string;
|
|
199
|
+
}
|
|
200
|
+
export type ComponentConfig = Record<string, unknown>;
|
|
201
|
+
/**
|
|
202
|
+
* 下钻动作配置
|
|
203
|
+
*/
|
|
204
|
+
export interface DrillDownConfig {
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
triggerMode?: 'click' | 'dblclick';
|
|
207
|
+
actionType: 'route' | 'dialog' | 'drawer';
|
|
208
|
+
route?: {
|
|
209
|
+
path: string;
|
|
210
|
+
queryParamsMapping?: Record<string, string>;
|
|
211
|
+
};
|
|
212
|
+
dialog?: {
|
|
213
|
+
component: string;
|
|
214
|
+
width?: string;
|
|
215
|
+
height?: string;
|
|
216
|
+
dataMapping?: Record<string, string>;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* 对比规则:定义单元格值与指标值比较后的样式表现
|
|
221
|
+
*/
|
|
222
|
+
export interface CompareRule {
|
|
223
|
+
/** 比较运算符 */
|
|
224
|
+
operator: 'gte' | 'gt' | 'lte' | 'lt' | 'eq' | 'neq';
|
|
225
|
+
/** 比较对象:'target' 表示与指标值比较,或指定固定数值 */
|
|
226
|
+
compareWith: 'target' | number;
|
|
227
|
+
/** 满足条件时的预设样式 */
|
|
228
|
+
style: 'success' | 'warning' | 'danger' | 'info';
|
|
229
|
+
/** 可选:自定义 CSS 类名(优先级高于预设 style) */
|
|
230
|
+
cssClass?: string;
|
|
231
|
+
/** 可选:满足条件时显示的图标 */
|
|
232
|
+
icon?: string;
|
|
233
|
+
/** 可选:满足条件时显示的文本标签(如"达标"、"未达标") */
|
|
234
|
+
label?: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* 指标配置:支持将数据源中的某个字段作为指标/目标值,
|
|
238
|
+
* 在表头展示指标信息,在单元格中与指标进行对比并渲染样式。
|
|
239
|
+
*
|
|
240
|
+
* 典型场景:
|
|
241
|
+
* - "需完成数"字段作为指标,表头显示"已完成 (指标:100)",单元格根据是否达标显示颜色
|
|
242
|
+
* - "目标金额"字段作为指标,表头显示"金额 (目标:¥50,000)",单元格显示达成率颜色
|
|
243
|
+
* - 固定指标值:如统一目标60分及格线
|
|
244
|
+
*/
|
|
245
|
+
export interface IndicatorConfig {
|
|
246
|
+
/** 是否启用指标对比 */
|
|
247
|
+
enabled: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* 指标值来源字段(数据源中的另一个字段名,如 'targetCount')
|
|
250
|
+
* 优先于 targetValue 使用;每行数据可以有不同的指标值
|
|
251
|
+
*/
|
|
252
|
+
targetField?: string;
|
|
253
|
+
/**
|
|
254
|
+
* 固定指标值(当未指定 targetField 或 targetField 对应值为空时使用)
|
|
255
|
+
* 适用于统一目标值场景,如"全员目标100"
|
|
256
|
+
*/
|
|
257
|
+
targetValue?: number;
|
|
258
|
+
/**
|
|
259
|
+
* 表头显示模板,{value} 占位符会被格式化后的指标值替换
|
|
260
|
+
* 例如:'完成数 (指标:{value})'、'金额 [目标:{value}]'
|
|
261
|
+
* 若不配置则只显示原始 header 文本
|
|
262
|
+
*/
|
|
263
|
+
headerTemplate?: string;
|
|
264
|
+
/** 指标值的格式化方式(独立于单元格的 format),如 'number'、'currency'、'percent' */
|
|
265
|
+
headerFormat?: string;
|
|
266
|
+
/**
|
|
267
|
+
* 对比规则列表(按顺序匹配,命中第一条即停止)
|
|
268
|
+
* 可灵活配置多条规则实现不同阈值下的样式区分
|
|
269
|
+
* 例如:>= target → success, >= target*0.8 → warning, < target*0.8 → danger
|
|
270
|
+
*/
|
|
271
|
+
compareRules?: CompareRule[];
|
|
272
|
+
/**
|
|
273
|
+
* 是否在单元格中显示达标/未达标图标
|
|
274
|
+
* true 时根据 compareRules 匹配结果自动显示对应图标
|
|
275
|
+
*/
|
|
276
|
+
showStatusIcon?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* 进度条展示模式(可选):
|
|
279
|
+
* - 'none':不显示进度条(默认)
|
|
280
|
+
* - 'bar':在单元格内显示简易进度条(当前值/指标值)
|
|
281
|
+
* - 'text':在值后面追加百分比文本,如 "85 (85%)"
|
|
282
|
+
*/
|
|
283
|
+
progressMode?: 'none' | 'bar' | 'text';
|
|
284
|
+
}
|
|
285
|
+
export interface TableColumnConfig {
|
|
286
|
+
field: string;
|
|
287
|
+
header: string;
|
|
288
|
+
width?: string;
|
|
289
|
+
align?: 'left' | 'center' | 'right';
|
|
290
|
+
sortable?: boolean;
|
|
291
|
+
filterable?: boolean;
|
|
292
|
+
format?: string;
|
|
293
|
+
formatter?: (value: unknown, row: unknown) => string;
|
|
294
|
+
visible?: boolean;
|
|
295
|
+
drillDown?: DrillDownConfig;
|
|
296
|
+
indicator?: IndicatorConfig;
|
|
297
|
+
}
|
|
298
|
+
export interface ReportRowModel {
|
|
299
|
+
id: string;
|
|
300
|
+
columns: ReportComponentModel[];
|
|
301
|
+
position?: 'top' | 'bottom' | 'top-bottom' | '';
|
|
302
|
+
}
|
|
303
|
+
export interface ReportTemplateModel {
|
|
304
|
+
id: string;
|
|
305
|
+
code: string;
|
|
306
|
+
name: string;
|
|
307
|
+
description: string;
|
|
308
|
+
providers: ProviderConfig[];
|
|
309
|
+
version: number;
|
|
310
|
+
publishedVersion?: number;
|
|
311
|
+
isPublished: boolean;
|
|
312
|
+
parameters: ReportParameterModel[];
|
|
313
|
+
rows: ReportRowModel[];
|
|
314
|
+
simpleMode?: boolean;
|
|
315
|
+
updatedAt: string;
|
|
316
|
+
}
|
|
317
|
+
export interface ReportPreviewRow {
|
|
318
|
+
index: number;
|
|
319
|
+
name: string;
|
|
320
|
+
department: string;
|
|
321
|
+
value: number;
|
|
322
|
+
rate: string;
|
|
323
|
+
status?: string;
|
|
324
|
+
}
|
|
325
|
+
export interface AggregationQuery {
|
|
326
|
+
field: string;
|
|
327
|
+
operation: 'sum' | 'avg' | 'min' | 'max' | 'count';
|
|
328
|
+
groupBy?: string[];
|
|
329
|
+
}
|
|
330
|
+
export interface PaginatedResult<T> {
|
|
331
|
+
data: T[];
|
|
332
|
+
total: number;
|
|
333
|
+
page: number;
|
|
334
|
+
pageSize: number;
|
|
335
|
+
totalPages: number;
|
|
336
|
+
}
|
|
337
|
+
export interface HealthStatus {
|
|
338
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
339
|
+
message?: string;
|
|
340
|
+
lastCheck?: Date;
|
|
341
|
+
}
|
|
342
|
+
export interface ReportDefinitionsList {
|
|
343
|
+
id: string;
|
|
344
|
+
code: string;
|
|
345
|
+
name: string;
|
|
346
|
+
version: number;
|
|
347
|
+
publishedVersion: number;
|
|
348
|
+
isPublished: boolean;
|
|
349
|
+
updatedAt: string;
|
|
350
|
+
}
|
|
351
|
+
export interface ReportVersion {
|
|
352
|
+
version: number;
|
|
353
|
+
name: string;
|
|
354
|
+
description: string;
|
|
355
|
+
simpleMode: boolean;
|
|
356
|
+
isCurrent: boolean;
|
|
357
|
+
isPublished: boolean;
|
|
358
|
+
createdDate: string;
|
|
359
|
+
updatedDate: string;
|
|
360
|
+
}
|
|
361
|
+
export interface Pagination {
|
|
362
|
+
length: number;
|
|
363
|
+
size: number;
|
|
364
|
+
page: number;
|
|
365
|
+
}
|
|
366
|
+
export interface RenderColumn {
|
|
367
|
+
id: string;
|
|
368
|
+
type: string;
|
|
369
|
+
label: string;
|
|
370
|
+
colSpan?: number;
|
|
371
|
+
minHeight?: number;
|
|
372
|
+
content?: unknown;
|
|
373
|
+
}
|
|
374
|
+
export interface RenderRow {
|
|
375
|
+
id?: string;
|
|
376
|
+
columns: RenderColumn[];
|
|
377
|
+
}
|
|
378
|
+
export interface RenderViewModel {
|
|
379
|
+
metric: number;
|
|
380
|
+
tableRows: unknown[];
|
|
381
|
+
layout: RenderRow[];
|
|
382
|
+
}
|
|
383
|
+
export declare class BindingResolverService {
|
|
384
|
+
private bindingCache;
|
|
385
|
+
private providerRegistry;
|
|
386
|
+
private queryPipeline;
|
|
387
|
+
private cacheManager;
|
|
388
|
+
/**
|
|
389
|
+
* 返回 Observable,正确处理异步数据流
|
|
390
|
+
* - 相同绑定配置返回同一个 Observable(通过 shareReplay 共享结果)
|
|
391
|
+
* - 避免重复订阅和网络请求
|
|
392
|
+
*/
|
|
393
|
+
resolveBinding(component: ReportComponentModel, template: ReportTemplateModel): Observable<unknown>;
|
|
394
|
+
/**
|
|
395
|
+
* 清除指定组件的缓存
|
|
396
|
+
* - 当组件配置变更时调用
|
|
397
|
+
*/
|
|
398
|
+
clearCache(componentId: string): void;
|
|
399
|
+
/**
|
|
400
|
+
* 清除指定组件的数据缓存
|
|
401
|
+
* - 当分页、排序、过滤等查询参数变更时调用
|
|
402
|
+
* - 确保不会命中旧的数据缓存
|
|
403
|
+
*/
|
|
404
|
+
clearDataCache(componentId: string): void;
|
|
405
|
+
/**
|
|
406
|
+
* 公开方法:获取增强后的查询配置(用于总数查询等场景)
|
|
407
|
+
* - 应用参数替换逻辑
|
|
408
|
+
* - 不执行实际查询,仅返回处理后的配置
|
|
409
|
+
*/
|
|
410
|
+
getEnhancedQuery(query: ComponentDataBinding['query'], componentParams?: ReportParameterModel[], templateParams?: ReportParameterModel[]): ComponentDataBinding['query'];
|
|
411
|
+
/**
|
|
412
|
+
* 从缓存中获取完整的PaginatedResult(包含total)
|
|
413
|
+
* - 避免重复查询即可获取总数
|
|
414
|
+
* - 如果缓存不存在,返回null
|
|
415
|
+
*/
|
|
416
|
+
getCachedResult(component: ReportComponentModel, template: ReportTemplateModel): PaginatedResult<any> | null;
|
|
417
|
+
/**
|
|
418
|
+
* 创建过滤条件(根据参数类型自动转换)
|
|
419
|
+
*/
|
|
420
|
+
private _createFilterCondition;
|
|
421
|
+
/**
|
|
422
|
+
* 执行数据绑定:获取Provider → 检查缓存 → 执行查询 → 应用Pipeline
|
|
423
|
+
*/
|
|
424
|
+
private _executeBinding;
|
|
425
|
+
/**
|
|
426
|
+
* 增强查询配置:仅处理静态filters中的占位符替换
|
|
427
|
+
* - 不自动将参数转换为filters(避免误伤)
|
|
428
|
+
* - 仅在query.filters中显式声明的占位符才会被替换
|
|
429
|
+
* - 符合"显式优于隐式"的设计原则
|
|
430
|
+
*/
|
|
431
|
+
private _enhanceQueryWithParameters;
|
|
432
|
+
/**
|
|
433
|
+
* 解析参数的 filter 值,将复杂控件对象转换为后端可处理的简单值
|
|
434
|
+
* - tree-select: CmatSelectTreeNode → id / id[]
|
|
435
|
+
* - 其他类型: 原值透传
|
|
436
|
+
*/
|
|
437
|
+
private _resolveFilterValue;
|
|
438
|
+
/**
|
|
439
|
+
* 将 filter 值归一化为后端可接受的格式
|
|
440
|
+
* - 数组 → 逗号分隔字符串(后端 long.Parse 期望 "1,2,3" 格式)
|
|
441
|
+
* - 其他 → 原值透传
|
|
442
|
+
*/
|
|
443
|
+
private _normalizeFilterValue;
|
|
444
|
+
/**
|
|
445
|
+
* 从 tree-select 值中提取 ID
|
|
446
|
+
* - 单选: 返回单个 id
|
|
447
|
+
* - 多选: 返回 id 数组
|
|
448
|
+
*/
|
|
449
|
+
private _extractTreeSelectIds;
|
|
450
|
+
private _generateCacheKey;
|
|
451
|
+
/**
|
|
452
|
+
* 获取查询实际际使用的有效参数(组件参数 + 模板参数合并后,只保留查询引用的)
|
|
453
|
+
*/
|
|
454
|
+
private _getEffectiveRelevantParams;
|
|
455
|
+
/**
|
|
456
|
+
* 分析查询配置中实际引用的参数 key
|
|
457
|
+
* - 扫描 filters 中的 {{placeholder}} 占位符
|
|
458
|
+
* - 返回 null 表示所有参数都可能影响查询(无法静态缩小范围)
|
|
459
|
+
* - 返回 Set 表示仅这些 key 影响查询
|
|
460
|
+
*
|
|
461
|
+
* 三种场景:
|
|
462
|
+
* 1. 无 filters → null(所有参数通过 _createFilterCondition 创建 filters)
|
|
463
|
+
* 2. 有 filters 但无占位符 → null(所有参数仍可创建额外 filters)
|
|
464
|
+
* 3. 有 filters 且有占位符 → Set(仅占位符引用的参数影响查询)
|
|
465
|
+
*/
|
|
466
|
+
private _getReferencedTemplateParamKeys;
|
|
467
|
+
/**
|
|
468
|
+
* 计算组件参数的hash值
|
|
469
|
+
*/
|
|
470
|
+
private _hashParameters;
|
|
471
|
+
private _hashQueryConfig;
|
|
472
|
+
private _applyPipeline;
|
|
473
|
+
private _applyTransformStep;
|
|
474
|
+
private _applyFieldMapping;
|
|
475
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BindingResolverService, never>;
|
|
476
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
477
|
+
}
|
|
478
|
+
export declare class CacheManagerService {
|
|
479
|
+
private _store;
|
|
480
|
+
get(key: string): Record<string, any> | null;
|
|
481
|
+
set(key: string, data: Record<string, any>, strategy?: CacheStrategy): void;
|
|
482
|
+
invalidate(key: string): void;
|
|
483
|
+
/**
|
|
484
|
+
* 清除指定组件的所有数据缓存
|
|
485
|
+
* - 用于分页、排序、过滤等查询参数变更时
|
|
486
|
+
*/
|
|
487
|
+
clearByComponentId(componentId: string): void;
|
|
488
|
+
clear(): void;
|
|
489
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CacheManagerService, never>;
|
|
490
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* 组件注册项
|
|
494
|
+
*/
|
|
495
|
+
export interface ComponentRegistryEntry {
|
|
496
|
+
key: string;
|
|
497
|
+
component: Type<any>;
|
|
498
|
+
metadata?: {
|
|
499
|
+
name: string;
|
|
500
|
+
description?: string;
|
|
501
|
+
category?: string;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* 组件注册表服务
|
|
506
|
+
*
|
|
507
|
+
* 用于动态注册和查找 Angular 组件,支持下钻功能中的 Dialog/Drawer 模式
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* // 在模块中注册组件
|
|
511
|
+
* registry.register('EmployeeDetailDialog', EmployeeDetailDialogComponent);
|
|
512
|
+
*
|
|
513
|
+
* // 在下钻配置中使用
|
|
514
|
+
* {
|
|
515
|
+
* actionType: 'dialog',
|
|
516
|
+
* dialog: {
|
|
517
|
+
* component: 'EmployeeDetailDialog'
|
|
518
|
+
* }
|
|
519
|
+
* }
|
|
520
|
+
*/
|
|
521
|
+
export declare class ComponentRegistryService {
|
|
522
|
+
private _registry;
|
|
523
|
+
/**
|
|
524
|
+
* 注册组件
|
|
525
|
+
* @param key 组件标识(唯一)
|
|
526
|
+
* @param component Angular 组件类
|
|
527
|
+
* @param metadata 可选元数据
|
|
528
|
+
*/
|
|
529
|
+
register(key: string, component: Type<any>, metadata?: Partial<ComponentRegistryEntry['metadata']>): void;
|
|
530
|
+
/**
|
|
531
|
+
* 批量注册组件
|
|
532
|
+
* @param entries 组件注册项数组
|
|
533
|
+
*/
|
|
534
|
+
registerBatch(entries: {
|
|
535
|
+
key: string;
|
|
536
|
+
component: Type<any>;
|
|
537
|
+
metadata?: Partial<ComponentRegistryEntry['metadata']>;
|
|
538
|
+
}[]): void;
|
|
539
|
+
/**
|
|
540
|
+
* 获取组件类
|
|
541
|
+
* @param key 组件标识
|
|
542
|
+
* @returns 组件类,未找到返回 undefined
|
|
543
|
+
*/
|
|
544
|
+
getComponent(key: string): Type<any> | undefined;
|
|
545
|
+
/**
|
|
546
|
+
* 检查组件是否已注册
|
|
547
|
+
* @param key 组件标识
|
|
548
|
+
*/
|
|
549
|
+
hasComponent(key: string): boolean;
|
|
550
|
+
/**
|
|
551
|
+
* 注销组件
|
|
552
|
+
* @param key 组件标识
|
|
553
|
+
*/
|
|
554
|
+
unregister(key: string): void;
|
|
555
|
+
/**
|
|
556
|
+
* 获取所有已注册的组件标识
|
|
557
|
+
*/
|
|
558
|
+
getAllKeys(): string[];
|
|
559
|
+
/**
|
|
560
|
+
* 获取所有注册的组件信息
|
|
561
|
+
*/
|
|
562
|
+
getAllEntries(): ComponentRegistryEntry[];
|
|
563
|
+
/**
|
|
564
|
+
* 清空所有注册
|
|
565
|
+
*/
|
|
566
|
+
clear(): void;
|
|
567
|
+
/**
|
|
568
|
+
* 获取注册表大小
|
|
569
|
+
*/
|
|
570
|
+
size(): number;
|
|
571
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRegistryService, never>;
|
|
572
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* 下钻上下文数据
|
|
576
|
+
*/
|
|
577
|
+
export interface DrillDownContext {
|
|
578
|
+
clickedValue: any;
|
|
579
|
+
rowData?: Record<string, any>;
|
|
580
|
+
seriesName?: string;
|
|
581
|
+
dimension?: string;
|
|
582
|
+
timestamp?: number;
|
|
583
|
+
componentId: string;
|
|
584
|
+
templateId?: string;
|
|
585
|
+
templateParameters?: ReportParameterModel[];
|
|
586
|
+
}
|
|
587
|
+
export declare class DrillDownService {
|
|
588
|
+
private _router;
|
|
589
|
+
private _dialog;
|
|
590
|
+
private _registry;
|
|
591
|
+
/**
|
|
592
|
+
* 执行下钻动作
|
|
593
|
+
* @param config 下钻配置
|
|
594
|
+
* @param context 数据上下文(可以是 DrillDownContext 或任意数据类型)
|
|
595
|
+
*/
|
|
596
|
+
execute(config: DrillDownConfig, context: unknown): void;
|
|
597
|
+
/**
|
|
598
|
+
* 标准化上下文数据
|
|
599
|
+
* 将不同组件类型传递的数据统一转换为 DrillDownContext 格式
|
|
600
|
+
*/
|
|
601
|
+
private _normalizeContext;
|
|
602
|
+
/**
|
|
603
|
+
* 从上下文中提取行数据
|
|
604
|
+
* 支持多种数据结构:
|
|
605
|
+
* - Table: 直接有 rowData 字段
|
|
606
|
+
* - Chart/Metric/Text: 如果 context 是对象且包含多个字段,将其作为 rowData
|
|
607
|
+
* - Array: 如果是数组,取第一个元素作为 rowData
|
|
608
|
+
*/
|
|
609
|
+
private _extractRowData;
|
|
610
|
+
/**
|
|
611
|
+
* 处理路由跳转
|
|
612
|
+
*/
|
|
613
|
+
private _handleRoute;
|
|
614
|
+
/**
|
|
615
|
+
* 处理 Dialog 弹窗 - 使用组件注册表动态加载
|
|
616
|
+
*/
|
|
617
|
+
private _handleDialog;
|
|
618
|
+
/**
|
|
619
|
+
* 处理 Drawer 抽屉 - 使用组件注册表动态加载
|
|
620
|
+
*/
|
|
621
|
+
private _handleDrawer;
|
|
622
|
+
/**
|
|
623
|
+
* 解析参数映射,支持三种 source 写法:
|
|
624
|
+
* 1. 行字段路径(含嵌套):"id"、"customer.address.city"
|
|
625
|
+
* 2. 模板参数占位符:"{{template.parameters.startDate}}"
|
|
626
|
+
* 3. 字面量:字段不存在时原样传递(如 "党员大会")
|
|
627
|
+
* @param mapping 映射配置 { targetParam: source }
|
|
628
|
+
* @param rowData 行数据上下文
|
|
629
|
+
* @param templateParameters 当前模板参数(用于占位符解析)
|
|
630
|
+
* @returns 解析后的参数对象(值为 undefined 的键会被移除)
|
|
631
|
+
*/
|
|
632
|
+
private _resolveMapping;
|
|
633
|
+
/**
|
|
634
|
+
* 获取嵌套属性值
|
|
635
|
+
* @param obj 对象
|
|
636
|
+
* @param path 属性路径(支持点号分隔)
|
|
637
|
+
* @returns 属性值
|
|
638
|
+
*/
|
|
639
|
+
private _getNestedValue;
|
|
640
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DrillDownService, never>;
|
|
641
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
642
|
+
}
|
|
643
|
+
export interface DataProvider<T = any> {
|
|
644
|
+
readonly id: string;
|
|
645
|
+
readonly type: 'mock' | 'api';
|
|
646
|
+
getSchema(): Observable<FieldSchema[]>;
|
|
647
|
+
getQueryParameters?(): Observable<FieldSchema[]>;
|
|
648
|
+
fetchList(query: DataQueryConfig): Observable<PaginatedResult<T>>;
|
|
649
|
+
fetchOne(id: string | number): Observable<T>;
|
|
650
|
+
fetchMetric(aggregation: AggregationQuery): Observable<number>;
|
|
651
|
+
healthCheck(): Observable<HealthStatus>;
|
|
652
|
+
dispose(): void;
|
|
653
|
+
}
|
|
654
|
+
export interface ProviderFactory {
|
|
655
|
+
create(config: any): DataProvider;
|
|
656
|
+
}
|
|
657
|
+
export declare class QueryPipelineService {
|
|
658
|
+
/**
|
|
659
|
+
* 执行查询并返回完整的分页结果(包含data和total)
|
|
660
|
+
*/
|
|
661
|
+
execute<T>(provider: DataProvider<T>, query: DataQueryConfig): Observable<PaginatedResult<T>>;
|
|
662
|
+
private _executeListQuery;
|
|
663
|
+
private _executeOneQuery;
|
|
664
|
+
private _executeMetricQuery;
|
|
665
|
+
private _executeCustomQuery;
|
|
666
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryPipelineService, never>;
|
|
667
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
668
|
+
}
|
|
669
|
+
export declare class ProviderRegistryService {
|
|
670
|
+
private providers;
|
|
671
|
+
private factories;
|
|
672
|
+
constructor();
|
|
673
|
+
registerFactory(type: 'mock' | 'api', factory: ProviderFactory): void;
|
|
674
|
+
createProvider(config: ProviderConfig): DataProvider;
|
|
675
|
+
getProvider(id: string): DataProvider | null;
|
|
676
|
+
destroyProvider(id: string): void;
|
|
677
|
+
preloadProviders(configs: ProviderConfig[]): Promise<void>;
|
|
678
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProviderRegistryService, never>;
|
|
679
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
680
|
+
}
|
|
681
|
+
export declare class MockProvider implements DataProvider {
|
|
682
|
+
readonly id: string;
|
|
683
|
+
readonly type: "mock";
|
|
684
|
+
config: MockProviderConfig;
|
|
685
|
+
dataCache: Record<string, any>[];
|
|
686
|
+
constructor(config: ProviderConfig);
|
|
687
|
+
getSchema(): Observable<FieldSchema[]>;
|
|
688
|
+
fetchList(query: DataQueryConfig): Observable<PaginatedResult<any>>;
|
|
689
|
+
fetchOne(id: string | number): Observable<any>;
|
|
690
|
+
fetchMetric(aggregation: AggregationQuery): Observable<number>;
|
|
691
|
+
healthCheck(): Observable<HealthStatus>;
|
|
692
|
+
dispose(): void;
|
|
693
|
+
generateData(): void;
|
|
694
|
+
private _applyFilters;
|
|
695
|
+
private applySorting;
|
|
696
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MockProvider, never>;
|
|
697
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
698
|
+
}
|
|
699
|
+
export declare class MockProviderFactory implements ProviderFactory {
|
|
700
|
+
create(config: ProviderConfig): DataProvider;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* API Provider - 后端API数据源适配器
|
|
704
|
+
*
|
|
705
|
+
* 负责将前端查询请求转换为HTTP请求,并与后端RESTful API交互
|
|
706
|
+
*
|
|
707
|
+
*/
|
|
708
|
+
export declare class ApiProvider implements DataProvider {
|
|
709
|
+
readonly id: string;
|
|
710
|
+
readonly type: "api";
|
|
711
|
+
config: ApiProviderConfig;
|
|
712
|
+
private _http;
|
|
713
|
+
private _cmatDataService;
|
|
714
|
+
private _bffConfig;
|
|
715
|
+
constructor(config: ProviderConfig);
|
|
716
|
+
/**
|
|
717
|
+
* 获取数据源字段定义(用于设计时字段提示)
|
|
718
|
+
*
|
|
719
|
+
* @returns 字段Schema数组
|
|
720
|
+
*/
|
|
721
|
+
getSchema(): Observable<FieldSchema[]>;
|
|
722
|
+
/**
|
|
723
|
+
* 获取分页数据列表
|
|
724
|
+
*
|
|
725
|
+
* @param query 查询配置(包含分页、过滤、排序等)
|
|
726
|
+
* @returns 分页结果
|
|
727
|
+
*/
|
|
728
|
+
fetchList(query: DataQueryConfig): Observable<PaginatedResult<any>>;
|
|
729
|
+
/**
|
|
730
|
+
* 获取单条记录
|
|
731
|
+
*
|
|
732
|
+
* @param id 记录ID
|
|
733
|
+
* @returns 单条记录数据
|
|
734
|
+
*/
|
|
735
|
+
fetchOne(id: string | number): Observable<any>;
|
|
736
|
+
/**
|
|
737
|
+
* 执行聚合查询(SUM/AVG/MIN/MAX/COUNT)
|
|
738
|
+
*
|
|
739
|
+
* @param aggregation 聚合配置
|
|
740
|
+
* @returns 聚合结果数值
|
|
741
|
+
*/
|
|
742
|
+
fetchMetric(aggregation: AggregationQuery): Observable<number>;
|
|
743
|
+
/**
|
|
744
|
+
* 健康检查
|
|
745
|
+
*
|
|
746
|
+
* @returns Provider健康状态
|
|
747
|
+
*/
|
|
748
|
+
healthCheck(): Observable<any>;
|
|
749
|
+
/**
|
|
750
|
+
* 释放资源
|
|
751
|
+
*/
|
|
752
|
+
dispose(): void;
|
|
753
|
+
/**
|
|
754
|
+
* 解析请求地址
|
|
755
|
+
*
|
|
756
|
+
* 模板中的 api.url 可能为绝对地址(跨 BFF 指向 Admin/Manage 等),
|
|
757
|
+
* 也可能为相对地址(当前 BFF)。绝对地址直接使用,相对地址拼接 bffUrl。
|
|
758
|
+
*
|
|
759
|
+
* @param target 由 api.url 与接口后缀拼接出的目标路径
|
|
760
|
+
* @returns 完整请求地址
|
|
761
|
+
*/
|
|
762
|
+
private _resolveUrl;
|
|
763
|
+
/**
|
|
764
|
+
* 构建HTTP请求头
|
|
765
|
+
*/
|
|
766
|
+
private _buildHeaders;
|
|
767
|
+
/**
|
|
768
|
+
* 构建 BFF parameters 格式
|
|
769
|
+
*
|
|
770
|
+
* BFF 的 BuildListRequest 从 parameters 字典中提取:
|
|
771
|
+
* - filters: 过滤条件列表
|
|
772
|
+
* - pagination: 分页配置
|
|
773
|
+
* - filterLogic: 过滤逻辑 (AND/OR)
|
|
774
|
+
* - sorting: 排序规则
|
|
775
|
+
*/
|
|
776
|
+
private _buildParameters;
|
|
777
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiProvider, never>;
|
|
778
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* API Provider工厂
|
|
782
|
+
*/
|
|
783
|
+
export declare class ApiProviderFactory implements ProviderFactory {
|
|
784
|
+
private _injector;
|
|
785
|
+
create(config: ProviderConfig): DataProvider;
|
|
786
|
+
}
|
|
787
|
+
export declare abstract class BaseRendererComponent<T = any> {
|
|
788
|
+
readonly component: import("@angular/core").InputSignal<ReportComponentModel>;
|
|
789
|
+
readonly template: import("@angular/core").InputSignal<ReportTemplateModel>;
|
|
790
|
+
/** 宿主场景是否存在组件级筛选按钮(右上角),存在时渲染器需为按钮预留空间 */
|
|
791
|
+
readonly hasFilterButton: import("@angular/core").InputSignal<boolean>;
|
|
792
|
+
protected readonly data: import("@angular/core").WritableSignal<T | null>;
|
|
793
|
+
protected readonly loading: import("@angular/core").WritableSignal<boolean>;
|
|
794
|
+
protected readonly error: import("@angular/core").WritableSignal<Error | null>;
|
|
795
|
+
protected readonly bindingResolver: BindingResolverService;
|
|
796
|
+
private _dataSubscription?;
|
|
797
|
+
private readonly _componentParamsFingerprint;
|
|
798
|
+
constructor();
|
|
799
|
+
refresh(): void;
|
|
800
|
+
/**
|
|
801
|
+
* 统一数据加载入口
|
|
802
|
+
* - effect 检测到 component/params 变化时调用
|
|
803
|
+
* - 子类(如 TableRenderer)可重写以注入分页等自定义逻辑
|
|
804
|
+
* - 通过 shareReplay 缓存,相同绑定配置不会重复请求
|
|
805
|
+
*/
|
|
806
|
+
protected loadData(component: ReportComponentModel, template: ReportTemplateModel): void;
|
|
807
|
+
protected onDataLoaded(data: T): void;
|
|
808
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseRendererComponent<any>, never>;
|
|
809
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseRendererComponent<any>, "app-base-renderer", never, {
|
|
810
|
+
"component": {
|
|
811
|
+
"alias": "component";
|
|
812
|
+
"required": true;
|
|
813
|
+
"isSignal": true;
|
|
814
|
+
};
|
|
815
|
+
"template": {
|
|
816
|
+
"alias": "template";
|
|
817
|
+
"required": true;
|
|
818
|
+
"isSignal": true;
|
|
819
|
+
};
|
|
820
|
+
"hasFilterButton": {
|
|
821
|
+
"alias": "hasFilterButton";
|
|
822
|
+
"required": false;
|
|
823
|
+
"isSignal": true;
|
|
824
|
+
};
|
|
825
|
+
}, {}, never, never, true, never>;
|
|
826
|
+
}
|
|
827
|
+
export declare class TextRendererComponent extends BaseRendererComponent<any> {
|
|
828
|
+
readonly config: import("@angular/core").WritableSignal<{
|
|
829
|
+
text?: {
|
|
830
|
+
staticText?: string;
|
|
831
|
+
twClasses?: string[];
|
|
832
|
+
drillDown?: DrillDownConfig;
|
|
833
|
+
};
|
|
834
|
+
} | null>;
|
|
835
|
+
readonly twClasses: import("@angular/core").Signal<string[]>;
|
|
836
|
+
/**
|
|
837
|
+
* 智能内容回退机制
|
|
838
|
+
* 优先级:静态文本 > 动态绑定数据 > 组件label
|
|
839
|
+
*/
|
|
840
|
+
readonly content: import("@angular/core").Signal<{}>;
|
|
841
|
+
protected isDesignerMode: import("@angular/core").Signal<boolean>;
|
|
842
|
+
protected route: ActivatedRoute;
|
|
843
|
+
private _drillDownService;
|
|
844
|
+
constructor();
|
|
845
|
+
/**
|
|
846
|
+
* 处理文本点击事件,支持下钻
|
|
847
|
+
*/
|
|
848
|
+
onTextClick(): void;
|
|
849
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextRendererComponent, never>;
|
|
850
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextRendererComponent, "app-text-renderer", never, {}, {}, never, never, true, never>;
|
|
851
|
+
}
|
|
852
|
+
export declare class MetricRendererComponent extends BaseRendererComponent<number> {
|
|
853
|
+
readonly config: import("@angular/core").WritableSignal<{
|
|
854
|
+
metric?: {
|
|
855
|
+
prefix?: string;
|
|
856
|
+
suffix?: string;
|
|
857
|
+
decimalPlaces?: number;
|
|
858
|
+
valueField?: string;
|
|
859
|
+
};
|
|
860
|
+
twClasses?: string[];
|
|
861
|
+
drillDown?: DrillDownConfig;
|
|
862
|
+
} | null>;
|
|
863
|
+
readonly prefix: import("@angular/core").Signal<string>;
|
|
864
|
+
readonly suffix: import("@angular/core").Signal<string>;
|
|
865
|
+
readonly decimalPlaces: import("@angular/core").Signal<number>;
|
|
866
|
+
readonly twClasses: import("@angular/core").Signal<string[]>;
|
|
867
|
+
readonly formattedValue: import("@angular/core").Signal<string>;
|
|
868
|
+
readonly label: import("@angular/core").Signal<string>;
|
|
869
|
+
protected route: ActivatedRoute;
|
|
870
|
+
private _drillDownService;
|
|
871
|
+
protected isDesignerMode: import("@angular/core").Signal<boolean>;
|
|
872
|
+
constructor();
|
|
873
|
+
/**
|
|
874
|
+
* 处理指标卡片点击事件
|
|
875
|
+
*/
|
|
876
|
+
onMetricClick(): void;
|
|
877
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetricRendererComponent, never>;
|
|
878
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetricRendererComponent, "app-metric-renderer", never, {}, {}, never, never, true, never>;
|
|
879
|
+
}
|
|
880
|
+
export declare class TableRendererComponent extends BaseRendererComponent<unknown[]> {
|
|
881
|
+
readonly id: string;
|
|
882
|
+
readonly config: import("@angular/core").WritableSignal<{
|
|
883
|
+
table?: {
|
|
884
|
+
columns?: unknown[];
|
|
885
|
+
enableFilter?: boolean;
|
|
886
|
+
enableExport?: boolean;
|
|
887
|
+
pageSizeOptions?: number[];
|
|
888
|
+
defaultPageSize?: number;
|
|
889
|
+
enablePagination?: boolean;
|
|
890
|
+
twClasses?: string[];
|
|
891
|
+
};
|
|
892
|
+
} | null>;
|
|
893
|
+
/** 所有列(含配置中不可见的列,用于显示列菜单) */
|
|
894
|
+
readonly allColumns: import("@angular/core").Signal<TableColumnConfig[]>;
|
|
895
|
+
/** 列可见性状态映射(运行时动态控制) */
|
|
896
|
+
readonly columnVisibilityMap: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
897
|
+
readonly columns: import("@angular/core").Signal<TableColumnConfig[]>;
|
|
898
|
+
readonly pagination: import("@angular/core").Signal<boolean>;
|
|
899
|
+
readonly enableFilter: import("@angular/core").Signal<boolean>;
|
|
900
|
+
readonly enableExport: import("@angular/core").Signal<boolean>;
|
|
901
|
+
readonly pageSizeOptions: import("@angular/core").Signal<number[]>;
|
|
902
|
+
readonly defaultPageSize: import("@angular/core").Signal<number>;
|
|
903
|
+
readonly twClasses: import("@angular/core").Signal<string[]>;
|
|
904
|
+
readonly columnKeys: import("@angular/core").Signal<string[]>;
|
|
905
|
+
/** 是否为桌面端(lg+) */
|
|
906
|
+
readonly isDesktop: import("@angular/core").Signal<boolean>;
|
|
907
|
+
/** 计算所有可见列的总最小宽度,仅桌面端(lg+)返回像素值以触发横向滚动 */
|
|
908
|
+
readonly tableMinWidth: import("@angular/core").Signal<string>;
|
|
909
|
+
readonly dataSource: import("@angular/core").Signal<unknown[]>;
|
|
910
|
+
readonly currentPage: import("@angular/core").WritableSignal<number>;
|
|
911
|
+
readonly pageSize: import("@angular/core").WritableSignal<number>;
|
|
912
|
+
protected readonly bindingResolver: BindingResolverService;
|
|
913
|
+
/** 打印前保存的分页状态(用于 resumeFromPrint 恢复) */
|
|
914
|
+
private _savedPageSize;
|
|
915
|
+
private _savedCurrentPage;
|
|
916
|
+
private readonly providerRegistry;
|
|
917
|
+
private readonly paginationService;
|
|
918
|
+
private readonly _drillDownService;
|
|
919
|
+
private readonly _route;
|
|
920
|
+
private readonly _cmatMediaWatcherService;
|
|
921
|
+
protected isDesignerMode: import("@angular/core").Signal<boolean>;
|
|
922
|
+
constructor();
|
|
923
|
+
loadData(): void;
|
|
924
|
+
onDataLoaded(): void;
|
|
925
|
+
onPageChange(page: number): void;
|
|
926
|
+
onPageSizeChange(size: number): void;
|
|
927
|
+
/**
|
|
928
|
+
* 暂停分页并加载全量数据,用于打印场景。
|
|
929
|
+
* 返回 Promise,在全量数据渲染完成后 resolve。
|
|
930
|
+
*/
|
|
931
|
+
pauseForPrint(): Promise<void>;
|
|
932
|
+
/** 恢复原始分页状态 */
|
|
933
|
+
resumeFromPrint(): void;
|
|
934
|
+
/**
|
|
935
|
+
* 单元格是否可下钻:列配置开启下钻且单元格有值(显示为 - 的空值单元格不允许下钻)
|
|
936
|
+
*/
|
|
937
|
+
isCellDrillable(row: Record<string, any>, column: TableColumnConfig): boolean;
|
|
938
|
+
/**
|
|
939
|
+
* 单元格点击处理 - 支持下钻
|
|
940
|
+
*/
|
|
941
|
+
onCellClick(row: Record<string, any>, column: TableColumnConfig): void;
|
|
942
|
+
/**
|
|
943
|
+
* 获取全量数据并格式化为导出行(供整体报表导出使用,不受分页影响)
|
|
944
|
+
*/
|
|
945
|
+
fetchExportRows(): Observable<{
|
|
946
|
+
headers: string[];
|
|
947
|
+
rows: string[][];
|
|
948
|
+
}>;
|
|
949
|
+
formatValue(value: unknown, format?: string): string;
|
|
950
|
+
/** 是否所有列都可见 */
|
|
951
|
+
allColumnsVisible(): boolean;
|
|
952
|
+
/** 是否有部分列可见(用于 indeterminate 状态) */
|
|
953
|
+
someColumnsVisible(): boolean;
|
|
954
|
+
/** 判断单列是否可见 */
|
|
955
|
+
isColumnVisible(col: TableColumnConfig): boolean;
|
|
956
|
+
/** 切换单列可见性 */
|
|
957
|
+
toggleColumnVisibility(col: TableColumnConfig): void;
|
|
958
|
+
/** 全选/全不选列 */
|
|
959
|
+
toggleAllColumns(): void;
|
|
960
|
+
/** 恢复默认可见性(清除运行时状态,回到配置默认值) */
|
|
961
|
+
resetColumnVisibility(): void;
|
|
962
|
+
/**
|
|
963
|
+
* 优化导出:获取全部数据并导出为CSV(已支持大数据量)
|
|
964
|
+
*/
|
|
965
|
+
exportToCSV(): void;
|
|
966
|
+
/**
|
|
967
|
+
* 导出为 Excel (简化版,实际应使用库如 xlsx)
|
|
968
|
+
*/
|
|
969
|
+
exportToExcel(): void;
|
|
970
|
+
/**
|
|
971
|
+
* 导出为 JSON
|
|
972
|
+
*/
|
|
973
|
+
exportToJSON(): void;
|
|
974
|
+
getIndicatorTarget(row: Record<string, unknown>, column: TableColumnConfig): number | null;
|
|
975
|
+
getHeaderText(column: TableColumnConfig): string;
|
|
976
|
+
getMatchedRule(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): CompareRule | null;
|
|
977
|
+
getCellStyle(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): string;
|
|
978
|
+
getIndicatorIcon(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): string;
|
|
979
|
+
getIndicatorLabel(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): string;
|
|
980
|
+
getIndicatorProgress(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): number;
|
|
981
|
+
getIndicatorProgressText(value: unknown, row: Record<string, unknown>, column: TableColumnConfig): string;
|
|
982
|
+
private _getDefaultStyleClass;
|
|
983
|
+
/**
|
|
984
|
+
* 通用文件下载方法
|
|
985
|
+
*/
|
|
986
|
+
private _downloadFile;
|
|
987
|
+
/**
|
|
988
|
+
* 获取全部数据(不分页)
|
|
989
|
+
*/
|
|
990
|
+
private _getAllData;
|
|
991
|
+
/**
|
|
992
|
+
* 优化后的总数查询:优先从缓存获取,缓存未命中时才发起请求
|
|
993
|
+
*/
|
|
994
|
+
private loadTotalCountFromCache;
|
|
995
|
+
/**
|
|
996
|
+
* 后备方案:当缓存未命中时,发起总数查询
|
|
997
|
+
*/
|
|
998
|
+
private _loadTotalCountOptimized;
|
|
999
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableRendererComponent, never>;
|
|
1000
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableRendererComponent, "app-table-renderer", never, {}, {}, never, never, true, never>;
|
|
1001
|
+
}
|
|
1002
|
+
export declare class ChartRendererComponent extends BaseRendererComponent<any[]> implements AfterViewInit, OnDestroy {
|
|
1003
|
+
readonly chartContainer: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1004
|
+
readonly config: import("@angular/core").WritableSignal<{
|
|
1005
|
+
chart?: {
|
|
1006
|
+
chartType?: "bar" | "line" | "pie" | "area" | "scatter";
|
|
1007
|
+
xAxisField?: string;
|
|
1008
|
+
yAxisField?: string | string[];
|
|
1009
|
+
title?: string;
|
|
1010
|
+
showLegend?: boolean;
|
|
1011
|
+
legendPosition?: "top" | "bottom" | "left" | "right";
|
|
1012
|
+
showGrid?: boolean;
|
|
1013
|
+
colors?: string[];
|
|
1014
|
+
smooth?: boolean;
|
|
1015
|
+
stack?: boolean;
|
|
1016
|
+
xAxisName?: string;
|
|
1017
|
+
yAxisName?: string;
|
|
1018
|
+
xAxisRotate?: number;
|
|
1019
|
+
showXAxisLabel?: boolean;
|
|
1020
|
+
showYAxisLabel?: boolean;
|
|
1021
|
+
tooltipTrigger?: "axis" | "item";
|
|
1022
|
+
tooltipFormatter?: string;
|
|
1023
|
+
showMarkLine?: boolean;
|
|
1024
|
+
markLineType?: "average" | "max" | "min";
|
|
1025
|
+
showMarkPoint?: boolean;
|
|
1026
|
+
animationEnabled?: boolean;
|
|
1027
|
+
animationDuration?: number;
|
|
1028
|
+
pieRadius?: string;
|
|
1029
|
+
pieRoseType?: boolean;
|
|
1030
|
+
barWidth?: string | number;
|
|
1031
|
+
barGap?: string;
|
|
1032
|
+
lineSymbol?: "circle" | "rect" | "triangle" | "diamond" | "none";
|
|
1033
|
+
lineSymbolSize?: number;
|
|
1034
|
+
gridLeft?: string;
|
|
1035
|
+
gridRight?: string;
|
|
1036
|
+
gridTop?: string;
|
|
1037
|
+
gridBottom?: string;
|
|
1038
|
+
twClasses?: string[];
|
|
1039
|
+
drillDown?: DrillDownConfig;
|
|
1040
|
+
};
|
|
1041
|
+
} | null>;
|
|
1042
|
+
readonly chartType: import("@angular/core").Signal<"bar" | "area" | "line" | "pie" | "scatter">;
|
|
1043
|
+
readonly xAxisField: import("@angular/core").Signal<string>;
|
|
1044
|
+
readonly yAxisField: import("@angular/core").Signal<string[]>;
|
|
1045
|
+
readonly title: import("@angular/core").Signal<string>;
|
|
1046
|
+
readonly showLegend: import("@angular/core").Signal<boolean>;
|
|
1047
|
+
readonly legendPosition: import("@angular/core").Signal<"top" | "bottom" | "left" | "right">;
|
|
1048
|
+
readonly showGrid: import("@angular/core").Signal<boolean>;
|
|
1049
|
+
readonly colors: import("@angular/core").Signal<string[]>;
|
|
1050
|
+
readonly smooth: import("@angular/core").Signal<boolean>;
|
|
1051
|
+
readonly stack: import("@angular/core").Signal<boolean>;
|
|
1052
|
+
readonly xAxisName: import("@angular/core").Signal<string>;
|
|
1053
|
+
readonly yAxisName: import("@angular/core").Signal<string>;
|
|
1054
|
+
readonly xAxisRotate: import("@angular/core").Signal<number>;
|
|
1055
|
+
readonly showXAxisLabel: import("@angular/core").Signal<boolean>;
|
|
1056
|
+
readonly showYAxisLabel: import("@angular/core").Signal<boolean>;
|
|
1057
|
+
readonly tooltipTrigger: import("@angular/core").Signal<"axis" | "item">;
|
|
1058
|
+
readonly tooltipFormatter: import("@angular/core").Signal<string>;
|
|
1059
|
+
readonly showMarkLine: import("@angular/core").Signal<boolean>;
|
|
1060
|
+
readonly markLineType: import("@angular/core").Signal<"min" | "max" | "average">;
|
|
1061
|
+
readonly showMarkPoint: import("@angular/core").Signal<boolean>;
|
|
1062
|
+
readonly animationEnabled: import("@angular/core").Signal<boolean>;
|
|
1063
|
+
readonly animationDuration: import("@angular/core").Signal<number>;
|
|
1064
|
+
readonly pieRadius: import("@angular/core").Signal<string>;
|
|
1065
|
+
readonly pieRoseType: import("@angular/core").Signal<boolean>;
|
|
1066
|
+
readonly barWidth: import("@angular/core").Signal<string | number | undefined>;
|
|
1067
|
+
readonly barGap: import("@angular/core").Signal<string | undefined>;
|
|
1068
|
+
readonly lineSymbol: import("@angular/core").Signal<"none" | "circle" | "rect" | "triangle" | "diamond">;
|
|
1069
|
+
readonly lineSymbolSize: import("@angular/core").Signal<number>;
|
|
1070
|
+
readonly gridLeft: import("@angular/core").Signal<string>;
|
|
1071
|
+
readonly gridRight: import("@angular/core").Signal<string>;
|
|
1072
|
+
readonly gridTop: import("@angular/core").Signal<string>;
|
|
1073
|
+
readonly gridBottom: import("@angular/core").Signal<string>;
|
|
1074
|
+
readonly twClasses: import("@angular/core").Signal<string[]>;
|
|
1075
|
+
protected route: ActivatedRoute;
|
|
1076
|
+
private _drillDownService;
|
|
1077
|
+
private _cmatConfigService;
|
|
1078
|
+
private readonly _scheme;
|
|
1079
|
+
protected isDesignerMode: import("@angular/core").Signal<boolean>;
|
|
1080
|
+
private _chartInstance;
|
|
1081
|
+
private _resizeHandler;
|
|
1082
|
+
private _beforePrintHandler;
|
|
1083
|
+
private _afterPrintHandler;
|
|
1084
|
+
constructor();
|
|
1085
|
+
ngAfterViewInit(): void;
|
|
1086
|
+
ngOnDestroy(): void;
|
|
1087
|
+
refresh(): void;
|
|
1088
|
+
/** 初始化 ECharts 实例(仅在容器可见且有数据时调用) */
|
|
1089
|
+
private _initChart;
|
|
1090
|
+
private _handleResize;
|
|
1091
|
+
private _handleBeforePrint;
|
|
1092
|
+
private _handleAfterPrint;
|
|
1093
|
+
private _updateChart;
|
|
1094
|
+
private _generateOption;
|
|
1095
|
+
/**
|
|
1096
|
+
* 获取Provider的Schema定义
|
|
1097
|
+
*/
|
|
1098
|
+
private _getSchema;
|
|
1099
|
+
/**
|
|
1100
|
+
* 根据字段名获取中文label
|
|
1101
|
+
* @param fieldName 字段名(如 'monthlyValue')
|
|
1102
|
+
* @param schema Schema定义数组
|
|
1103
|
+
* @returns 中文label(如 '月度数值'),如果找不到则返回字段名
|
|
1104
|
+
*/
|
|
1105
|
+
private _getFieldLabel;
|
|
1106
|
+
/**
|
|
1107
|
+
* 处理图表点击事件,支持下钻
|
|
1108
|
+
*/
|
|
1109
|
+
private _onChartClick;
|
|
1110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartRendererComponent, never>;
|
|
1111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartRendererComponent, "app-chart-renderer", never, {}, {}, never, never, true, never>;
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* 报表 API Provider 运行时所需的外部配置。
|
|
1115
|
+
*
|
|
1116
|
+
* 库本体不能引用 app 侧的 `ConfigurationService` 或 `environments/environment`,
|
|
1117
|
+
* 因此由消费工程在 providers 中提供本 Token:
|
|
1118
|
+
*
|
|
1119
|
+
* ```ts
|
|
1120
|
+
* providers: [
|
|
1121
|
+
* {
|
|
1122
|
+
* provide: REPORT_BFF_CONFIG,
|
|
1123
|
+
* useFactory: (cfg: ConfigurationService) => ({
|
|
1124
|
+
* bffUrl: cfg.settingUrls().bffUrl,
|
|
1125
|
+
* enableMock: environment.enableMock,
|
|
1126
|
+
* }),
|
|
1127
|
+
* deps: [ConfigurationService],
|
|
1128
|
+
* },
|
|
1129
|
+
* ]
|
|
1130
|
+
* ```
|
|
1131
|
+
*/
|
|
1132
|
+
export interface ReportBffConfig {
|
|
1133
|
+
/** BFF 基地址,用于相对 URL 的拼接;绝对 URL 会绕过它 */
|
|
1134
|
+
bffUrl: string;
|
|
1135
|
+
/** 是否启用 mock 通道(true 时走 HttpClient + mock-api 拦截;false 时走 CmatDataService 直连 BFF) */
|
|
1136
|
+
enableMock: boolean;
|
|
1137
|
+
}
|
|
1138
|
+
export declare const REPORT_BFF_CONFIG: InjectionToken<ReportBffConfig>;
|