@topdatasec/report 1.0.7 → 1.0.9
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/dist/index.iife.js +2 -1
- package/dist/index.js +1914 -247
- package/dist/index.umd.cjs +2 -1
- package/dist/style.css +1 -1
- package/es/_virtual/_plugin-vue_export-helper.js +9 -0
- package/es/bar/Bar.vue.js +6 -8
- package/es/components.d.ts +13 -0
- package/es/components.js +28 -2
- package/es/config/Config.css +1 -0
- package/es/config/Config.d.ts +2 -0
- package/es/config/Config.vue.js +7 -0
- package/es/config/Config.vue2.js +207 -0
- package/es/config/index.d.ts +14 -0
- package/es/config/index.js +6 -0
- package/es/index.js +51 -25
- package/es/line/Line.d.ts +5 -0
- package/es/line/Line.vue.js +20 -0
- package/es/line/Line.vue2.js +4 -0
- package/es/line/index.d.ts +15 -0
- package/es/line/index.js +6 -0
- package/es/node_modules/.pnpm/@wangeditor_editor@5.1.23/node_modules/@wangeditor/editor/dist/css/style.css +1 -0
- package/es/pie/Pie.d.ts +5 -0
- package/es/pie/Pie.vue.js +20 -0
- package/es/pie/Pie.vue2.js +4 -0
- package/es/pie/index.d.ts +15 -0
- package/es/pie/index.js +6 -0
- package/es/report/Report.d.ts +7 -0
- package/es/report/Report.vue.js +112 -0
- package/es/report/Report.vue2.js +4 -0
- package/es/report/index.d.ts +17 -0
- package/es/report/index.js +6 -0
- package/es/select/Select.d.ts +9 -0
- package/es/select/Select.vue.js +39 -0
- package/es/select/Select.vue2.js +4 -0
- package/es/select/index.d.ts +25 -0
- package/es/select/index.js +6 -0
- package/es/settingCharts/SettingCharts.d.ts +5 -0
- package/es/settingCharts/SettingCharts.vue.js +142 -0
- package/es/settingCharts/SettingCharts.vue2.js +4 -0
- package/es/settingCharts/index.d.ts +14 -0
- package/es/settingCharts/index.js +6 -0
- package/es/settingFilter/index.d.ts +15 -0
- package/es/settingFilter/index.js +6 -0
- package/es/settingFilter/settingFilter.d.ts +5 -0
- package/es/settingFilter/settingFilter.vue.js +62 -0
- package/es/settingFilter/settingFilter.vue2.js +4 -0
- package/es/settingTable/SettingTable.d.ts +2 -0
- package/es/settingTable/SettingTable.vue.js +59 -0
- package/es/settingTable/SettingTable.vue2.js +4 -0
- package/es/settingTable/index.d.ts +14 -0
- package/es/settingTable/index.js +6 -0
- package/es/settingText/index.d.ts +15 -0
- package/es/settingText/index.js +6 -0
- package/es/settingText/settingText.d.ts +5 -0
- package/es/settingText/settingText.vue.js +112 -0
- package/es/settingText/settingText.vue2.js +4 -0
- package/es/settingTitle/index.d.ts +14 -0
- package/es/settingTitle/index.js +6 -0
- package/es/settingTitle/settingTitle.css +1 -0
- package/es/settingTitle/settingTitle.d.ts +2 -0
- package/es/settingTitle/settingTitle.vue.js +7 -0
- package/es/settingTitle/settingTitle.vue2.js +137 -0
- package/es/stores/interface/index.d.ts +18 -0
- package/es/stores/modules/report.d.ts +35 -0
- package/es/stores/modules/report.js +45 -0
- package/es/table/Table.d.ts +5 -0
- package/es/table/Table.vue.js +26 -0
- package/es/table/Table.vue2.js +4 -0
- package/es/table/index.d.ts +15 -0
- package/es/table/index.js +6 -0
- package/es/text/Text.d.ts +5 -0
- package/es/text/Text.vue.js +27 -0
- package/es/text/Text.vue2.js +4 -0
- package/es/text/index.d.ts +15 -0
- package/es/text/index.js +6 -0
- package/es/time/Time.d.ts +9 -0
- package/es/time/Time.vue.js +35 -0
- package/es/time/Time.vue2.js +4 -0
- package/es/time/index.d.ts +25 -0
- package/es/time/index.js +6 -0
- package/es/utils/api.d.ts +12 -0
- package/es/utils/api.js +32 -0
- package/es/utils/chartsOption.d.ts +298 -0
- package/es/utils/chartsOption.js +501 -0
- package/es/utils/data.d.ts +4 -0
- package/es/utils/data.js +162 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +82 -79
- package/es/utils/resolver.js +28 -15
- package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/lib/bar/Bar.vue.cjs +1 -1
- package/lib/components.cjs +1 -1
- package/lib/components.d.ts +13 -0
- package/lib/config/Config.css +1 -0
- package/lib/config/Config.d.ts +2 -0
- package/lib/config/Config.vue.cjs +1 -0
- package/lib/config/Config.vue2.cjs +1 -0
- package/lib/config/index.cjs +1 -0
- package/lib/config/index.d.ts +14 -0
- package/lib/index.cjs +1 -1
- package/lib/line/Line.d.ts +5 -0
- package/lib/line/Line.vue.cjs +1 -0
- package/lib/line/Line.vue2.cjs +1 -0
- package/lib/line/index.cjs +1 -0
- package/lib/line/index.d.ts +15 -0
- package/lib/node_modules/.pnpm/@wangeditor_editor@5.1.23/node_modules/@wangeditor/editor/dist/css/style.css +1 -0
- package/lib/pie/Pie.d.ts +5 -0
- package/lib/pie/Pie.vue.cjs +1 -0
- package/lib/pie/Pie.vue2.cjs +1 -0
- package/lib/pie/index.cjs +1 -0
- package/lib/pie/index.d.ts +15 -0
- package/lib/report/Report.d.ts +7 -0
- package/lib/report/Report.vue.cjs +1 -0
- package/lib/report/Report.vue2.cjs +1 -0
- package/lib/report/index.cjs +1 -0
- package/lib/report/index.d.ts +17 -0
- package/lib/select/Select.d.ts +9 -0
- package/lib/select/Select.vue.cjs +1 -0
- package/lib/select/Select.vue2.cjs +1 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +25 -0
- package/lib/settingCharts/SettingCharts.d.ts +5 -0
- package/lib/settingCharts/SettingCharts.vue.cjs +1 -0
- package/lib/settingCharts/SettingCharts.vue2.cjs +1 -0
- package/lib/settingCharts/index.cjs +1 -0
- package/lib/settingCharts/index.d.ts +14 -0
- package/lib/settingFilter/index.cjs +1 -0
- package/lib/settingFilter/index.d.ts +15 -0
- package/lib/settingFilter/settingFilter.d.ts +5 -0
- package/lib/settingFilter/settingFilter.vue.cjs +1 -0
- package/lib/settingFilter/settingFilter.vue2.cjs +1 -0
- package/lib/settingTable/SettingTable.d.ts +2 -0
- package/lib/settingTable/SettingTable.vue.cjs +1 -0
- package/lib/settingTable/SettingTable.vue2.cjs +1 -0
- package/lib/settingTable/index.cjs +1 -0
- package/lib/settingTable/index.d.ts +14 -0
- package/lib/settingText/index.cjs +1 -0
- package/lib/settingText/index.d.ts +15 -0
- package/lib/settingText/settingText.d.ts +5 -0
- package/lib/settingText/settingText.vue.cjs +1 -0
- package/lib/settingText/settingText.vue2.cjs +1 -0
- package/lib/settingTitle/index.cjs +1 -0
- package/lib/settingTitle/index.d.ts +14 -0
- package/lib/settingTitle/settingTitle.css +1 -0
- package/lib/settingTitle/settingTitle.d.ts +2 -0
- package/lib/settingTitle/settingTitle.vue.cjs +1 -0
- package/lib/settingTitle/settingTitle.vue2.cjs +1 -0
- package/lib/stores/interface/index.d.ts +18 -0
- package/lib/stores/modules/report.cjs +1 -0
- package/lib/stores/modules/report.d.ts +35 -0
- package/lib/table/Table.d.ts +5 -0
- package/lib/table/Table.vue.cjs +1 -0
- package/lib/table/Table.vue2.cjs +1 -0
- package/lib/table/index.cjs +1 -0
- package/lib/table/index.d.ts +15 -0
- package/lib/text/Text.d.ts +5 -0
- package/lib/text/Text.vue.cjs +1 -0
- package/lib/text/Text.vue2.cjs +1 -0
- package/lib/text/index.cjs +1 -0
- package/lib/text/index.d.ts +15 -0
- package/lib/time/Time.d.ts +9 -0
- package/lib/time/Time.vue.cjs +1 -0
- package/lib/time/Time.vue2.cjs +1 -0
- package/lib/time/index.cjs +1 -0
- package/lib/time/index.d.ts +25 -0
- package/lib/utils/api.cjs +1 -0
- package/lib/utils/api.d.ts +12 -0
- package/lib/utils/chartsOption.cjs +2 -0
- package/lib/utils/chartsOption.d.ts +298 -0
- package/lib/utils/data.cjs +1 -0
- package/lib/utils/data.d.ts +4 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/resolver.cjs +1 -1
- package/package.json +9 -4
|
@@ -0,0 +1,298 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");function
|
|
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
CHANGED
|
@@ -39,3 +39,5 @@ export declare function useResizeObserver(target: Ref | Ref[] | HTMLElement | HT
|
|
|
39
39
|
start: () => void;
|
|
40
40
|
};
|
|
41
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={TdsReportBar:"TdsReportBar"},
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topdatasec/report",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "wangguiwang",
|
|
6
6
|
"homepage": "",
|
|
@@ -58,7 +58,14 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@vuepic/vue-datepicker": "^11.0.1",
|
|
61
|
-
"@vueuse/core": "^12.8.2"
|
|
61
|
+
"@vueuse/core": "^12.8.2",
|
|
62
|
+
"@wangeditor/editor": "^5.1.23",
|
|
63
|
+
"@wangeditor/editor-for-vue": "^1.0.2",
|
|
64
|
+
"echarts": "^5.6.0",
|
|
65
|
+
"pinia": "^3.0.1",
|
|
66
|
+
"topdatasec-ui": "^1.6.1",
|
|
67
|
+
"vue": "^3.5.13",
|
|
68
|
+
"vue-router": "^4.5.0"
|
|
62
69
|
},
|
|
63
70
|
"devDependencies": {
|
|
64
71
|
"@ant-design/colors": "^7.2.0",
|
|
@@ -85,8 +92,6 @@
|
|
|
85
92
|
"vite-plugin-dts": "^4.5.3",
|
|
86
93
|
"vite-plugin-vue-devtools": "^7.7.2",
|
|
87
94
|
"vitepress": "^1.6.3",
|
|
88
|
-
"vue": "^3.5.13",
|
|
89
|
-
"vue-router": "^4.5.0",
|
|
90
95
|
"vue-tsc": "^2.2.8"
|
|
91
96
|
},
|
|
92
97
|
"license": "MIT",
|