@topdatasec/report 1.0.9 → 1.0.11
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/LICENSE +21 -0
- package/README.md +218 -0
- package/lib/style.css +1 -0
- package/lib/t-report-ui.es.js +26420 -0
- package/lib/t-report-ui.umd.js +205 -0
- package/package.json +66 -88
- package/README.zh-CN.md +0 -0
- package/dist/index.iife.js +0 -2
- package/dist/index.js +0 -2041
- package/dist/index.umd.cjs +0 -2
- package/dist/style.css +0 -1
- package/es/_virtual/_plugin-vue_export-helper.js +0 -9
- package/es/bar/Bar.d.ts +0 -5
- package/es/bar/Bar.vue.js +0 -20
- package/es/bar/Bar.vue2.js +0 -4
- package/es/bar/index.d.ts +0 -15
- package/es/bar/index.js +0 -6
- package/es/components.d.ts +0 -15
- package/es/components.js +0 -30
- package/es/config/Config.css +0 -1
- package/es/config/Config.d.ts +0 -2
- package/es/config/Config.vue.js +0 -7
- package/es/config/Config.vue2.js +0 -207
- package/es/config/index.d.ts +0 -14
- package/es/config/index.js +0 -6
- package/es/index.d.ts +0 -10
- package/es/index.js +0 -60
- package/es/line/Line.d.ts +0 -5
- package/es/line/Line.vue.js +0 -20
- package/es/line/Line.vue2.js +0 -4
- package/es/line/index.d.ts +0 -15
- package/es/line/index.js +0 -6
- package/es/node_modules/.pnpm/@wangeditor_editor@5.1.23/node_modules/@wangeditor/editor/dist/css/style.css +0 -1
- package/es/pie/Pie.d.ts +0 -5
- package/es/pie/Pie.vue.js +0 -20
- package/es/pie/Pie.vue2.js +0 -4
- package/es/pie/index.d.ts +0 -15
- package/es/pie/index.js +0 -6
- package/es/report/Report.d.ts +0 -7
- package/es/report/Report.vue.js +0 -112
- package/es/report/Report.vue2.js +0 -4
- package/es/report/index.d.ts +0 -17
- package/es/report/index.js +0 -6
- package/es/select/Select.d.ts +0 -9
- package/es/select/Select.vue.js +0 -39
- package/es/select/Select.vue2.js +0 -4
- package/es/select/index.d.ts +0 -25
- package/es/select/index.js +0 -6
- package/es/settingCharts/SettingCharts.d.ts +0 -5
- package/es/settingCharts/SettingCharts.vue.js +0 -142
- package/es/settingCharts/SettingCharts.vue2.js +0 -4
- package/es/settingCharts/index.d.ts +0 -14
- package/es/settingCharts/index.js +0 -6
- package/es/settingFilter/index.d.ts +0 -15
- package/es/settingFilter/index.js +0 -6
- package/es/settingFilter/settingFilter.d.ts +0 -5
- package/es/settingFilter/settingFilter.vue.js +0 -62
- package/es/settingFilter/settingFilter.vue2.js +0 -4
- package/es/settingTable/SettingTable.d.ts +0 -2
- package/es/settingTable/SettingTable.vue.js +0 -59
- package/es/settingTable/SettingTable.vue2.js +0 -4
- package/es/settingTable/index.d.ts +0 -14
- package/es/settingTable/index.js +0 -6
- package/es/settingText/index.d.ts +0 -15
- package/es/settingText/index.js +0 -6
- package/es/settingText/settingText.d.ts +0 -5
- package/es/settingText/settingText.vue.js +0 -112
- package/es/settingText/settingText.vue2.js +0 -4
- package/es/settingTitle/index.d.ts +0 -14
- package/es/settingTitle/index.js +0 -6
- package/es/settingTitle/settingTitle.css +0 -1
- package/es/settingTitle/settingTitle.d.ts +0 -2
- package/es/settingTitle/settingTitle.vue.js +0 -7
- package/es/settingTitle/settingTitle.vue2.js +0 -137
- package/es/stores/interface/index.d.ts +0 -18
- package/es/stores/modules/report.d.ts +0 -35
- package/es/stores/modules/report.js +0 -45
- package/es/style/global.css +0 -1
- package/es/table/Table.d.ts +0 -5
- package/es/table/Table.vue.js +0 -26
- package/es/table/Table.vue2.js +0 -4
- package/es/table/index.d.ts +0 -15
- package/es/table/index.js +0 -6
- package/es/text/Text.d.ts +0 -5
- package/es/text/Text.vue.js +0 -27
- package/es/text/Text.vue2.js +0 -4
- package/es/text/index.d.ts +0 -15
- package/es/text/index.js +0 -6
- package/es/time/Time.d.ts +0 -9
- package/es/time/Time.vue.js +0 -35
- package/es/time/Time.vue2.js +0 -4
- package/es/time/index.d.ts +0 -25
- package/es/time/index.js +0 -6
- package/es/utils/api.d.ts +0 -12
- package/es/utils/api.js +0 -32
- package/es/utils/chartsOption.d.ts +0 -298
- package/es/utils/chartsOption.js +0 -501
- package/es/utils/data.d.ts +0 -4
- package/es/utils/data.js +0 -162
- package/es/utils/index.d.ts +0 -43
- package/es/utils/index.js +0 -309
- package/es/utils/resolver.d.ts +0 -11
- package/es/utils/resolver.js +0 -49
- package/es/utils/type.d.ts +0 -2
- package/es/utils/type.js +0 -9
- package/lib/_virtual/_plugin-vue_export-helper.cjs +0 -1
- package/lib/bar/Bar.d.ts +0 -5
- package/lib/bar/Bar.vue.cjs +0 -1
- package/lib/bar/Bar.vue2.cjs +0 -1
- package/lib/bar/index.cjs +0 -1
- package/lib/bar/index.d.ts +0 -15
- package/lib/components.cjs +0 -1
- package/lib/components.d.ts +0 -15
- package/lib/config/Config.css +0 -1
- package/lib/config/Config.d.ts +0 -2
- package/lib/config/Config.vue.cjs +0 -1
- package/lib/config/Config.vue2.cjs +0 -1
- package/lib/config/index.cjs +0 -1
- package/lib/config/index.d.ts +0 -14
- package/lib/index.cjs +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/line/Line.d.ts +0 -5
- package/lib/line/Line.vue.cjs +0 -1
- package/lib/line/Line.vue2.cjs +0 -1
- package/lib/line/index.cjs +0 -1
- package/lib/line/index.d.ts +0 -15
- package/lib/node_modules/.pnpm/@wangeditor_editor@5.1.23/node_modules/@wangeditor/editor/dist/css/style.css +0 -1
- package/lib/pie/Pie.d.ts +0 -5
- package/lib/pie/Pie.vue.cjs +0 -1
- package/lib/pie/Pie.vue2.cjs +0 -1
- package/lib/pie/index.cjs +0 -1
- package/lib/pie/index.d.ts +0 -15
- package/lib/report/Report.d.ts +0 -7
- package/lib/report/Report.vue.cjs +0 -1
- package/lib/report/Report.vue2.cjs +0 -1
- package/lib/report/index.cjs +0 -1
- package/lib/report/index.d.ts +0 -17
- package/lib/select/Select.d.ts +0 -9
- package/lib/select/Select.vue.cjs +0 -1
- package/lib/select/Select.vue2.cjs +0 -1
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.d.ts +0 -25
- package/lib/settingCharts/SettingCharts.d.ts +0 -5
- package/lib/settingCharts/SettingCharts.vue.cjs +0 -1
- package/lib/settingCharts/SettingCharts.vue2.cjs +0 -1
- package/lib/settingCharts/index.cjs +0 -1
- package/lib/settingCharts/index.d.ts +0 -14
- package/lib/settingFilter/index.cjs +0 -1
- package/lib/settingFilter/index.d.ts +0 -15
- package/lib/settingFilter/settingFilter.d.ts +0 -5
- package/lib/settingFilter/settingFilter.vue.cjs +0 -1
- package/lib/settingFilter/settingFilter.vue2.cjs +0 -1
- package/lib/settingTable/SettingTable.d.ts +0 -2
- package/lib/settingTable/SettingTable.vue.cjs +0 -1
- package/lib/settingTable/SettingTable.vue2.cjs +0 -1
- package/lib/settingTable/index.cjs +0 -1
- package/lib/settingTable/index.d.ts +0 -14
- package/lib/settingText/index.cjs +0 -1
- package/lib/settingText/index.d.ts +0 -15
- package/lib/settingText/settingText.d.ts +0 -5
- package/lib/settingText/settingText.vue.cjs +0 -1
- package/lib/settingText/settingText.vue2.cjs +0 -1
- package/lib/settingTitle/index.cjs +0 -1
- package/lib/settingTitle/index.d.ts +0 -14
- package/lib/settingTitle/settingTitle.css +0 -1
- package/lib/settingTitle/settingTitle.d.ts +0 -2
- package/lib/settingTitle/settingTitle.vue.cjs +0 -1
- package/lib/settingTitle/settingTitle.vue2.cjs +0 -1
- package/lib/stores/interface/index.d.ts +0 -18
- package/lib/stores/modules/report.cjs +0 -1
- package/lib/stores/modules/report.d.ts +0 -35
- package/lib/style/global.css +0 -1
- package/lib/table/Table.d.ts +0 -5
- package/lib/table/Table.vue.cjs +0 -1
- package/lib/table/Table.vue2.cjs +0 -1
- package/lib/table/index.cjs +0 -1
- package/lib/table/index.d.ts +0 -15
- package/lib/text/Text.d.ts +0 -5
- package/lib/text/Text.vue.cjs +0 -1
- package/lib/text/Text.vue2.cjs +0 -1
- package/lib/text/index.cjs +0 -1
- package/lib/text/index.d.ts +0 -15
- package/lib/time/Time.d.ts +0 -9
- package/lib/time/Time.vue.cjs +0 -1
- package/lib/time/Time.vue2.cjs +0 -1
- package/lib/time/index.cjs +0 -1
- package/lib/time/index.d.ts +0 -25
- package/lib/utils/api.cjs +0 -1
- package/lib/utils/api.d.ts +0 -12
- package/lib/utils/chartsOption.cjs +0 -2
- package/lib/utils/chartsOption.d.ts +0 -298
- package/lib/utils/data.cjs +0 -1
- package/lib/utils/data.d.ts +0 -4
- package/lib/utils/index.cjs +0 -1
- package/lib/utils/index.d.ts +0 -43
- package/lib/utils/resolver.cjs +0 -1
- package/lib/utils/resolver.d.ts +0 -11
- package/lib/utils/type.cjs +0 -1
- package/lib/utils/type.d.ts +0 -2
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
export declare const barParseData: (chartOption: any, data: any[], name?: string, props?: {
|
|
2
|
-
name: string;
|
|
3
|
-
value: string;
|
|
4
|
-
}) => void;
|
|
5
|
-
export declare const chartsBar: (data?: any, props?: {
|
|
6
|
-
name: string;
|
|
7
|
-
value: string;
|
|
8
|
-
}) => {
|
|
9
|
-
tooltip: {
|
|
10
|
-
trigger: string;
|
|
11
|
-
};
|
|
12
|
-
grid: any;
|
|
13
|
-
title: {
|
|
14
|
-
show: boolean;
|
|
15
|
-
text: string;
|
|
16
|
-
textStyle: {
|
|
17
|
-
color: string;
|
|
18
|
-
fontSize: number;
|
|
19
|
-
};
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
};
|
|
23
|
-
xAxis: {
|
|
24
|
-
type: string;
|
|
25
|
-
nameGap: number;
|
|
26
|
-
nameRotate: number;
|
|
27
|
-
axisLabel: {
|
|
28
|
-
color: string;
|
|
29
|
-
rotate: number;
|
|
30
|
-
};
|
|
31
|
-
axisLine: {
|
|
32
|
-
show: boolean;
|
|
33
|
-
lineStyle: {
|
|
34
|
-
color: string;
|
|
35
|
-
width: number;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
axisTick: {
|
|
39
|
-
show: boolean;
|
|
40
|
-
};
|
|
41
|
-
splitLine: {
|
|
42
|
-
show: boolean;
|
|
43
|
-
};
|
|
44
|
-
data: any;
|
|
45
|
-
}[];
|
|
46
|
-
yAxis: {
|
|
47
|
-
type: string;
|
|
48
|
-
min: number;
|
|
49
|
-
position: string;
|
|
50
|
-
nameTextStyle: {
|
|
51
|
-
fontSize: number;
|
|
52
|
-
color: string;
|
|
53
|
-
fontWeight: string;
|
|
54
|
-
};
|
|
55
|
-
axisLine: {
|
|
56
|
-
show: boolean;
|
|
57
|
-
};
|
|
58
|
-
axisTick: {
|
|
59
|
-
show: boolean;
|
|
60
|
-
};
|
|
61
|
-
splitLine: {
|
|
62
|
-
show: boolean;
|
|
63
|
-
};
|
|
64
|
-
axisLabel: {
|
|
65
|
-
color: string;
|
|
66
|
-
formatter: string;
|
|
67
|
-
inside: boolean;
|
|
68
|
-
};
|
|
69
|
-
}[];
|
|
70
|
-
series: ({
|
|
71
|
-
type: string;
|
|
72
|
-
barWidth: number;
|
|
73
|
-
barGap: string;
|
|
74
|
-
itemStyle: {
|
|
75
|
-
color: {
|
|
76
|
-
type: string;
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
x2: number;
|
|
80
|
-
y2: number;
|
|
81
|
-
colorStops: {
|
|
82
|
-
offset: number;
|
|
83
|
-
color: string;
|
|
84
|
-
}[];
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
data: any;
|
|
88
|
-
label: {
|
|
89
|
-
show: boolean;
|
|
90
|
-
position: string;
|
|
91
|
-
color: string;
|
|
92
|
-
lineHeight: number;
|
|
93
|
-
};
|
|
94
|
-
name?: undefined;
|
|
95
|
-
symbolSize?: undefined;
|
|
96
|
-
symbolOffset?: undefined;
|
|
97
|
-
symbolPosition?: undefined;
|
|
98
|
-
} | {
|
|
99
|
-
name: string;
|
|
100
|
-
type: string;
|
|
101
|
-
symbolSize: number[];
|
|
102
|
-
symbolOffset: number[];
|
|
103
|
-
itemStyle: {
|
|
104
|
-
color: {
|
|
105
|
-
type: string;
|
|
106
|
-
x: number;
|
|
107
|
-
y: number;
|
|
108
|
-
x2: number;
|
|
109
|
-
y2: number;
|
|
110
|
-
colorStops: {
|
|
111
|
-
offset: number;
|
|
112
|
-
color: string;
|
|
113
|
-
}[];
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
data: any;
|
|
117
|
-
barWidth?: undefined;
|
|
118
|
-
barGap?: undefined;
|
|
119
|
-
label?: undefined;
|
|
120
|
-
symbolPosition?: undefined;
|
|
121
|
-
} | {
|
|
122
|
-
name: string;
|
|
123
|
-
type: string;
|
|
124
|
-
symbolSize: number[];
|
|
125
|
-
symbolOffset: number[];
|
|
126
|
-
symbolPosition: string;
|
|
127
|
-
itemStyle: {
|
|
128
|
-
color: {
|
|
129
|
-
type: string;
|
|
130
|
-
x: number;
|
|
131
|
-
y: number;
|
|
132
|
-
x2: number;
|
|
133
|
-
y2: number;
|
|
134
|
-
colorStops: {
|
|
135
|
-
offset: number;
|
|
136
|
-
color: string;
|
|
137
|
-
}[];
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
data: any;
|
|
141
|
-
barWidth?: undefined;
|
|
142
|
-
barGap?: undefined;
|
|
143
|
-
label?: undefined;
|
|
144
|
-
})[];
|
|
145
|
-
};
|
|
146
|
-
export declare const barHorizontalParseData: (chartOption: any, data: any[], props?: {
|
|
147
|
-
name: string;
|
|
148
|
-
value: string;
|
|
149
|
-
}) => void;
|
|
150
|
-
export declare const horizontalSeriesData: (val: number[]) => any;
|
|
151
|
-
export declare const horizontalMaxData: (val: number[]) => number[];
|
|
152
|
-
export declare const chartsHorizontalBar: (data: any, props?: {
|
|
153
|
-
name: string;
|
|
154
|
-
value: string;
|
|
155
|
-
}) => any;
|
|
156
|
-
export declare const pieParseData: ({ chartOption, data, props }: any) => void;
|
|
157
|
-
export declare const chartsPie: ({ data, radiusType, roseType, isLegend, isLine, center, isTitle }: any) => {
|
|
158
|
-
color: string[];
|
|
159
|
-
toolbox: {
|
|
160
|
-
show: boolean;
|
|
161
|
-
};
|
|
162
|
-
tooltip: {
|
|
163
|
-
trigger: string;
|
|
164
|
-
show: boolean;
|
|
165
|
-
formatter: (params: any) => string;
|
|
166
|
-
};
|
|
167
|
-
title: {
|
|
168
|
-
show: any;
|
|
169
|
-
text: string;
|
|
170
|
-
textStyle: {
|
|
171
|
-
color: string;
|
|
172
|
-
fontSize: number;
|
|
173
|
-
};
|
|
174
|
-
x: number;
|
|
175
|
-
y: number;
|
|
176
|
-
};
|
|
177
|
-
legend: {
|
|
178
|
-
show: any;
|
|
179
|
-
left: string;
|
|
180
|
-
formatter: (name: any) => string;
|
|
181
|
-
textStyle: {
|
|
182
|
-
fontSize: number;
|
|
183
|
-
color: string;
|
|
184
|
-
};
|
|
185
|
-
data: any;
|
|
186
|
-
orient: string;
|
|
187
|
-
itemWidth: number;
|
|
188
|
-
itemHeight: number;
|
|
189
|
-
borderRadius: number;
|
|
190
|
-
x: string;
|
|
191
|
-
top: string;
|
|
192
|
-
align: string;
|
|
193
|
-
itemGap: number;
|
|
194
|
-
};
|
|
195
|
-
series: {
|
|
196
|
-
type: string;
|
|
197
|
-
center: any;
|
|
198
|
-
radius: string[];
|
|
199
|
-
roseType: any;
|
|
200
|
-
itemStyle: {
|
|
201
|
-
borderRadius: number;
|
|
202
|
-
};
|
|
203
|
-
label: {
|
|
204
|
-
show: any;
|
|
205
|
-
position: string;
|
|
206
|
-
alignTo: string;
|
|
207
|
-
backgroundColor: string;
|
|
208
|
-
height: number;
|
|
209
|
-
width: number;
|
|
210
|
-
lineHeight: number;
|
|
211
|
-
distanceToLabelLine: number;
|
|
212
|
-
borderRadius: number;
|
|
213
|
-
borderWidth: number;
|
|
214
|
-
borderColor: string;
|
|
215
|
-
padding: number[];
|
|
216
|
-
formatter: (params: any) => string;
|
|
217
|
-
rich: {
|
|
218
|
-
a: {
|
|
219
|
-
padding: number[];
|
|
220
|
-
fontSize: string;
|
|
221
|
-
fontFamily: string;
|
|
222
|
-
color: string;
|
|
223
|
-
};
|
|
224
|
-
b: {
|
|
225
|
-
padding: number[];
|
|
226
|
-
fontSize: string;
|
|
227
|
-
fontFamily: string;
|
|
228
|
-
fontWeight: string;
|
|
229
|
-
color: string;
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
labelLine: {
|
|
234
|
-
show: boolean;
|
|
235
|
-
length: number;
|
|
236
|
-
length2: number;
|
|
237
|
-
align: string;
|
|
238
|
-
lineStyle: {
|
|
239
|
-
width: number;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
data: any;
|
|
243
|
-
}[];
|
|
244
|
-
graphic: {
|
|
245
|
-
invisible: boolean;
|
|
246
|
-
type: string;
|
|
247
|
-
left: string;
|
|
248
|
-
top: string;
|
|
249
|
-
style: {
|
|
250
|
-
text: string;
|
|
251
|
-
fontSize: number;
|
|
252
|
-
fill: string;
|
|
253
|
-
fontWeight: string;
|
|
254
|
-
};
|
|
255
|
-
}[];
|
|
256
|
-
};
|
|
257
|
-
export declare const lineParseData: (chartOption: any, data: any, props?: {
|
|
258
|
-
name: string;
|
|
259
|
-
value: any;
|
|
260
|
-
}) => void;
|
|
261
|
-
export declare const lineMode: () => {
|
|
262
|
-
name: string;
|
|
263
|
-
type: string;
|
|
264
|
-
symbol: string;
|
|
265
|
-
smooth: boolean;
|
|
266
|
-
lineStyle: {
|
|
267
|
-
width: number;
|
|
268
|
-
color: string;
|
|
269
|
-
};
|
|
270
|
-
showSymbol: boolean;
|
|
271
|
-
itemStyle: {
|
|
272
|
-
color: string;
|
|
273
|
-
label: {
|
|
274
|
-
show: boolean;
|
|
275
|
-
position: string;
|
|
276
|
-
formatter: (res: any) => any;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
areaStyle: {
|
|
280
|
-
color: {
|
|
281
|
-
type: string;
|
|
282
|
-
x: number;
|
|
283
|
-
y: number;
|
|
284
|
-
x2: number;
|
|
285
|
-
y2: number;
|
|
286
|
-
colorStops: {
|
|
287
|
-
offset: number;
|
|
288
|
-
color: string;
|
|
289
|
-
}[];
|
|
290
|
-
global: boolean;
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
|
-
data: never[];
|
|
294
|
-
};
|
|
295
|
-
export declare const chartsLine: (data?: any[], props?: {
|
|
296
|
-
name: string;
|
|
297
|
-
value: any;
|
|
298
|
-
}) => any;
|
package/lib/utils/data.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs"),t=require("./chartsOption.cjs"),n=[{key:"assets",name:"资产名称"},{key:"type",name:"资产类型"},{key:"data",name:"资产数据"}],r=[{assets:"name1",type:"type1",data:"data1"},{assets:"name2",type:"type2",data:"data2"},{assets:"name3",type:"type3",data:"data3"}],a=[{data:[{name:"默认数据",value:180}],label:"name1"},{data:[{name:"默认数据",value:311}],label:"name2"},{data:[{name:"默认数据",value:42}],label:"name3"},{data:[{name:"默认数据",value:32391}],label:"name4"}],o=[{data:63,label:"数据1"},{data:45,label:"数据2"},{data:43,label:"数据3"}],i=[{type:"report-select",label:"资产:",value:"0",data:[{label:"全部",data:"0"},{label:"10.10.2.20_root",data:"743dbb32-8a41-4990-9d76-48925b000a93"},{label:"10.10.4.206_sysdba",data:"23193788-c895-47a8-8123-65799540394c"},{label:"10.10.4.26_root@/root/files/",data:"bb7b07c9-b96b-4caf-ac76-bb45ae849844"}],uri:"/da/report/sens/get_asset_all",id:e.getUniId()},{type:"range-time",data:[{start_time:"2024-08-20 19:49:34",end_time:"2024-09-12 19:49:34"}],id:e.getUniId()},{type:"h1",data:"报表名称",options:{size:24,color:"rgba(0,0,0,0.85)",fontWeight:500,letterSpacing:0,textIndent:0,textAlign:"left"},id:e.getUniId()},{type:"h2",data:"一级标题",name:"一级标题",options:{size:18,color:" rgba(0, 0, 0, 0.85)",fontWeight:500,letterSpacing:0,textIndent:0,textAlign:"left"},id:e.getUniId()},{type:"report-table",data:r,showColumn:n,name:"表格",options:{showColumn:{assets:!0,type:!0,data:!0},border:!0,showHeader:!0,stripe:!1},rp_item_uuid:"",id:e.getUniId()}];t.chartsBar();const d=l=>({bar:{type:"bar",data:a,showColumn:[{key:"label",value:"data"}],name:"图表",options:t.chartsBar(),rp_item_uuid:"",id:""},line:{type:"line",data:a,showColumn:[{key:"label",value:"data"}],name:"图表",options:t.chartsLine(),rp_item_uuid:"",id:""},pie:{type:"pie",data:o,showColumn:[{key:"label",value:"data"}],name:"图表",options:t.chartsPie({isLegend:!0}),rp_item_uuid:"",id:""},"report-table":{type:"report-table",data:r,showColumn:n,name:"表格",options:{showColumn:{assect:!0,type:!0,data:!0},border:!0,showHeader:!0,stripe:!1},rp_item_uuid:"",id:""}})[l];exports.normalValue=i;exports.normalValueFn=d;
|
package/lib/utils/data.d.ts
DELETED
package/lib/utils/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");function A(e=Date.now(),n="YYYY-MM-DD HH:mm:ss"){try{let t;if(typeof e=="number"||typeof e=="string"){if(t=new Date(e),isNaN(t.getTime()))throw new Error("Invalid date")}else t=e;const r=(a,u=2)=>String(a).padStart(u,"0"),s=a=>{switch(a){case"YYYY":return r(t.getFullYear());case"YY":return r(t.getFullYear()).slice(2,4);case"MM":return r(t.getMonth()+1);case"M":return String(t.getMonth()+1);case"DD":return r(t.getDate());case"D":return String(t.getDate());case"HH":return r(t.getHours());case"H":return String(t.getHours());case"mm":return r(t.getMinutes());case"m":return String(t.getMinutes());case"ss":return r(t.getSeconds());case"s":return String(t.getSeconds());case"SSS":return r(t.getMilliseconds(),3);default:return a}};return n.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(t){return console.error("Error formatting date:",t),""}}function T(e,n=2,t=",",r=".",s,a){typeof e!="number"&&typeof e!="string"&&console.warn("Expected value to be of type number or string"),typeof n!="number"&&console.warn("Expected precision to be of type number");const u=Number(e);if(isNaN(u)||!isFinite(u))return"";if(u===0)return u.toFixed(n);let l=u.toFixed(n);if(typeof t=="string"&&t!==""){const[i,d]=l.split(".");l=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+t)+(d?r+d:"")}return(s||"")+l+(a||"")}function N(e,n=0,t=!1){let r=null;function s(u){if(r||(r=u),u-r>=n){try{e()}catch(i){console.error("Error executing rafTimeout function:",i)}t&&(r=u,a.id=requestAnimationFrame(s))}else a.id=requestAnimationFrame(s)}const a={id:requestAnimationFrame(s)};return a}function R(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function F(e,n=300){let t=!0;return function(...r){return t&&(e(...r),t=!1,setTimeout(()=>{t=!0},n)),!1}}function L(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e(...r)},n)}}function U(e,n){if(Number.isNaN(e)||Number.isNaN(n))throw new Error("Both num1 and num2 must be valid numbers.");const t=e%1!==0,r=n%1!==0;if(!t&&!r)return e+n;const s=String(e).split(".")[1]??"",a=String(n).split(".")[1]??"",u=Math.max(s.length,a.length),l=Math.pow(10,u),i=e.toFixed(u),d=n.toFixed(u);return(+i.replace(".","")+ +d.replace(".",""))/l}function H(e,n){if(!e){console.error("无效的 url");return}const t=n||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(r=>{r.ok?r.blob().then(s=>{const a=URL.createObjectURL(s),u=document.createElement("a");u.href=a,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(a)}):console.error("请求文件失败,状态码:",r.status)})}catch(r){console.error("文件下载失败:",r)}}function V(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function Y(){const e=o.ref(!1),n=o.getCurrentInstance();return n&&o.onMounted(()=>{e.value=!0},n),e}function E(e){const n=Y();return o.computed(()=>(n.value,!!e()))}function k(e,n,t){o.onMounted(()=>e.addEventListener(n,t)),o.onUnmounted(()=>e.removeEventListener(n,t))}function q(e,n,t={}){const r=E(()=>window&&"MutationObserver"in window),s=o.ref(!1);let a;const u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),l=()=>{a&&(a.disconnect(),a=void 0)},i=()=>{r.value&&u.value.length&&!s.value&&(a=new MutationObserver(n),u.value.forEach(f=>a.observe(f,t)))};o.watch(()=>u.value,()=>{l(),i()},{immediate:!0,flush:"post"});const d=()=>{s.value=!0,l()},v=()=>{s.value=!1,i()};return o.onBeforeUnmount(()=>l()),{stop:d,start:v}}function B(e=window,n=0,t,r){const s=o.ref(0),a=o.ref(0),u=o.ref(0),l=o.ref(0),i=o.ref(!1),d=o.ref(!1),v=o.ref(!1),f=o.ref(!1),m=o.ref(!1),b=o.ref(0),S=o.ref(0);function D(c){i.value=!0;const p=c.target.documentElement??c.target;s.value=p.scrollLeft,u.value=p.scrollTop,d.value=s.value<b.value,v.value=s.value>b.value,f.value=u.value<S.value,m.value=u.value>S.value,b.value=s.value,S.value=u.value,w(c),t&&t(c)}const y=F(D,n);function O(c){i.value&&(i.value=!1,d.value=!1,v.value=!1,f.value=!1,m.value=!1,r&&r(c))}const w=L(O,n+200),M=o.computed(()=>{const c=o.toValue(e);return c||null});o.watch(()=>M.value,(c,p)=>{var h;if(p&&x(p),c){const g=((h=c==null?void 0:c.document)==null?void 0:h.documentElement)||(c==null?void 0:c.documentElement)||c;a.value=g.scrollWidth-g.clientWidth,l.value=g.scrollHeight-g.clientHeight,g.addEventListener("scroll",y),g.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function x(c){var h;const p=((h=c==null?void 0:c.document)==null?void 0:h.documentElement)||(c==null?void 0:c.documentElement)||c;p.removeEventListener("scroll",y),p.removeEventListener("scrollend",w)}return o.onBeforeUnmount(()=>x(M.value)),{x:s,xScrollMax:a,y:u,yScrollMax:l,isScrolling:i,left:d,right:v,top:f,bottom:m}}function I(){const e=o.ref(0),n=o.ref(0);let t=performance.now();const r=10,s=a=>{if(n.value++,n.value>=r){const u=a-t;e.value=Math.round(1e3/(u/r)),t=a,n.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function z(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const n=o.ref(window&&window.matchMedia(e).matches),t=window.matchMedia(e),r=s=>{n.value=s.matches};return o.onMounted(()=>{t.addEventListener("change",r)}),o.onBeforeUnmount(()=>{t.removeEventListener("change",r)}),{match:n}}function j(e,n,t={}){const r=E(()=>window&&"ResizeObserver"in window);let s;const a=o.ref(!1),u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),l=()=>{s&&(s.disconnect(),s=void 0)},i=()=>{r.value&&u.value.length&&!a.value&&(s=new ResizeObserver(n),u.value.forEach(f=>s.observe(f,t)))};o.watch(()=>u.value,()=>{l(),i()},{immediate:!0,flush:"post"});const d=()=>{a.value=!0,l()},v=()=>{a.value=!1,i()};return o.onBeforeUnmount(()=>l()),{stop:d,start:v}}function P(e="default"){const n=o.useSlots(),t=r=>{var u;const s=(u=n[r])==null?void 0:u.call(n),a=l=>{if(l.type===o.Comment||Array.isArray(l.children)&&!l.children.length)return!1;if(l.type!==o.Text)return!0;if(typeof l.children=="string")return l.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(i=>a(i)):!1};if(Array.isArray(e)){const r=o.reactive({});return e.forEach(s=>{const a=o.computed(()=>t(s));r[s]=a}),r}else return o.computed(()=>t(e))}const C=()=>new Date().getTime().toString(36)+"-"+Math.random().toString(36).substring(2,9),J=e=>JSON.parse(JSON.stringify(e));exports.add=U;exports.cancelRaf=R;exports.dateFormat=A;exports.debounce=L;exports.deepClone=J;exports.downloadFile=H;exports.formatNumber=T;exports.getUniId=C;exports.rafTimeout=N;exports.throttle=F;exports.toggleDark=V;exports.useEventListener=k;exports.useFps=I;exports.useMediaQuery=z;exports.useMounted=Y;exports.useMutationObserver=q;exports.useResizeObserver=j;exports.useScroll=B;exports.useSlotsExist=P;exports.useSupported=E;
|
package/lib/utils/index.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export declare function dateFormat(value?: number | string | Date, format?: string): string;
|
|
3
|
-
export declare function formatNumber(value: number | string, precision?: number, separator?: string, decimal?: string, prefix?: string, suffix?: string): string;
|
|
4
|
-
export declare function rafTimeout(fn: Function, delay?: number, interval?: boolean): object;
|
|
5
|
-
export declare function cancelRaf(raf: {
|
|
6
|
-
id: number;
|
|
7
|
-
}): void;
|
|
8
|
-
export declare function throttle(fn: Function, delay?: number): any;
|
|
9
|
-
export declare function debounce(fn: Function, delay?: number): any;
|
|
10
|
-
export declare function add(num1: number, num2: number): number;
|
|
11
|
-
export declare function downloadFile(url: string, fileName?: string): void;
|
|
12
|
-
export declare function toggleDark(): void;
|
|
13
|
-
export declare function useMounted(): Ref<boolean, boolean>;
|
|
14
|
-
export declare function useSupported(callback: () => unknown): import('vue').ComputedRef<boolean>;
|
|
15
|
-
export declare function useEventListener(target: HTMLElement | Window | Document, event: string, callback: Function): void;
|
|
16
|
-
export declare function useMutationObserver(target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options?: {}): {
|
|
17
|
-
stop: () => void;
|
|
18
|
-
start: () => void;
|
|
19
|
-
};
|
|
20
|
-
export declare function useScroll(target?: Ref | HTMLElement | Window | Document, throttleDelay?: number, onScroll?: (e: Event) => void, onStop?: (e: Event) => void): {
|
|
21
|
-
x: Ref<number, number>;
|
|
22
|
-
xScrollMax: Ref<number, number>;
|
|
23
|
-
y: Ref<number, number>;
|
|
24
|
-
yScrollMax: Ref<number, number>;
|
|
25
|
-
isScrolling: Ref<boolean, boolean>;
|
|
26
|
-
left: Ref<boolean, boolean>;
|
|
27
|
-
right: Ref<boolean, boolean>;
|
|
28
|
-
top: Ref<boolean, boolean>;
|
|
29
|
-
bottom: Ref<boolean, boolean>;
|
|
30
|
-
};
|
|
31
|
-
export declare function useFps(): {
|
|
32
|
-
fps: Ref<number, number>;
|
|
33
|
-
};
|
|
34
|
-
export declare function useMediaQuery(mediaQuery: string): {
|
|
35
|
-
match: Ref<boolean, boolean>;
|
|
36
|
-
};
|
|
37
|
-
export declare function useResizeObserver(target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options?: object): {
|
|
38
|
-
stop: () => void;
|
|
39
|
-
start: () => void;
|
|
40
|
-
};
|
|
41
|
-
export declare function useSlotsExist(slotsName?: string | string[]): any;
|
|
42
|
-
export declare const getUniId: () => string;
|
|
43
|
-
export declare const deepClone: <T>(obj: T | T[]) => any;
|
package/lib/utils/resolver.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={TdsReportBar:"TdsReportBar",TdsReportConfig:"TdsReportConfig",TdsReportLine:"TdsReportLine",TdsReportPie:"TdsReportPie",TdsReportInfo:"TdsReportInfo",TdsReportSelect:"TdsReportSelect",TdsSettingCharts:"TdsSettingCharts",TdsSettingFilter:"TdsSettingFilter",TdsSettingTable:"TdsSettingTable",TdsSettingText:"TdsSettingText",TdsSettingTitle:"TdsSettingTitle",TdsReportTable:"TdsReportTable",TdsReportText:"TdsReportText",TdsReportTime:"TdsReportTime"},d={BackTop:["Tooltip"]};function n(t,e){if(["NumberAnimation","Watermark"].includes(t))return[];const s=[t];t in d&&s.push(...d[t]);const r=e!=null&&e.cjs?"lib":"es",T=[`@topdatasec/report/${r}/style/global.css`];return s.forEach(i=>{T.push(`@topdatasec/report/${r}/${o[i]}/${i}.css`)}),T}function p(t){return{type:"component",resolve:e=>{if(e in o)return{name:e,from:"@topdatasec/report",sideEffects:n(e,t)}}}}exports.VueAmazingUIResolver=p;
|
package/lib/utils/resolver.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface VueAmazingUIResolverOptions {
|
|
2
|
-
cjs?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare function VueAmazingUIResolver(options?: VueAmazingUIResolverOptions): {
|
|
5
|
-
type: "component";
|
|
6
|
-
resolve: (componentName: string) => {
|
|
7
|
-
name: string;
|
|
8
|
-
from: string;
|
|
9
|
-
sideEffects: string[];
|
|
10
|
-
} | undefined;
|
|
11
|
-
};
|
package/lib/utils/type.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=t=>{const n=t;return n.install=function(e){e.component(n.name,t)},t};exports.withInstall=l;
|
package/lib/utils/type.d.ts
DELETED