smartbi-toolkit 1.0.1 → 1.1.0
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/README.md +41 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +99 -0
- package/dist/main.d.ts +0 -1
- package/dist/main.js +18 -0
- package/dist/methods/AnalysisReportService.d.ts +93 -0
- package/dist/methods/AnalysisReportService.js +126 -0
- package/dist/methods/BusinessThemeService.d.ts +8 -0
- package/dist/methods/BusinessThemeService.js +11 -0
- package/dist/methods/BusinessViewService.d.ts +94 -0
- package/dist/methods/BusinessViewService.js +120 -0
- package/dist/methods/CatalogService.d.ts +1 -89
- package/dist/methods/CatalogService.js +224 -0
- package/dist/methods/ClientCombinedReportService.d.ts +63 -0
- package/dist/methods/ClientCombinedReportService.js +82 -0
- package/dist/methods/ClientInsightService.d.ts +83 -0
- package/dist/methods/ClientInsightService.js +107 -0
- package/dist/methods/ClientReportService.d.ts +162 -0
- package/dist/methods/ClientReportService.js +206 -0
- package/dist/methods/CombinedReportService.d.ts +7 -0
- package/dist/methods/CombinedReportService.js +10 -0
- package/dist/methods/DataSourceService.d.ts +178 -0
- package/dist/methods/DataSourceService.js +220 -0
- package/dist/methods/GraphicReportService.d.ts +6 -0
- package/dist/methods/GraphicReportService.js +10 -0
- package/dist/methods/InsightReport.d.ts +71 -0
- package/dist/methods/InsightReport.js +98 -0
- package/dist/methods/MetadataService.d.ts +37 -0
- package/dist/methods/MetadataService.js +47 -0
- package/dist/methods/OfficeReport.d.ts +49 -0
- package/dist/methods/OfficeReport.js +65 -0
- package/dist/methods/OfficeReportService.d.ts +36 -0
- package/dist/methods/OfficeReportService.js +46 -0
- package/dist/methods/OltpMetadataService.d.ts +19 -0
- package/dist/methods/OltpMetadataService.js +25 -0
- package/dist/methods/ParameterService.d.ts +12 -0
- package/dist/methods/ParameterService.js +18 -0
- package/dist/methods/PoolService.d.ts +11 -0
- package/dist/methods/PoolService.js +17 -0
- package/dist/methods/PortalService.d.ts +66 -0
- package/dist/methods/PortalService.js +89 -0
- package/dist/methods/Report.d.ts +178 -0
- package/dist/methods/Report.js +230 -0
- package/dist/methods/SSReport.d.ts +86 -0
- package/dist/methods/SSReport.js +114 -0
- package/dist/methods/ScheduleTaskService.d.ts +12 -0
- package/dist/methods/ScheduleTaskService.js +18 -0
- package/dist/methods/SimpleReportService.d.ts +12 -0
- package/dist/methods/SimpleReportService.js +18 -0
- package/dist/methods/SpreadSheetReportService.d.ts +43 -0
- package/dist/methods/SpreadSheetReportService.js +55 -0
- package/dist/methods/SystemConfigService.d.ts +28 -0
- package/dist/methods/SystemConfigService.js +24 -0
- package/dist/methods/TimeConsuming.d.ts +6 -0
- package/dist/methods/TimeConsuming.js +9 -0
- package/dist/methods/TimeConsumingService.d.ts +5 -0
- package/dist/methods/TimeConsumingService.js +9 -0
- package/dist/methods/UserManagerService.d.ts +258 -0
- package/dist/methods/UserManagerService.js +332 -0
- package/dist/types.d.ts +442 -0
- package/dist/types.js +125 -0
- package/dist/vite-plugin-smartbi/index.d.ts +36 -0
- package/dist/vite-plugin-smartbi/index.js +107 -0
- package/package.json +129 -11
- package/dist/CatalogService.es.js +0 -112
- package/dist/SmartbiToolbox.es.js +0 -51
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/methods/CatalogService.d.ts.map +0 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
export interface IResult {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface RunningInfo {
|
|
5
|
+
state: string;
|
|
6
|
+
progress: number;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export interface IParameter {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
displayValue: string;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface Parameter {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
value: string;
|
|
20
|
+
displayValue: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface NameValuePair {
|
|
24
|
+
name: string;
|
|
25
|
+
value: string;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
export interface ViewMetaData {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
alias: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
datasourceId: string;
|
|
34
|
+
sql: string;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export interface OutputField {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
alias: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
dataType: string;
|
|
43
|
+
dataFormat?: string;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}
|
|
46
|
+
export type FieldProperty = 'alias' | 'desc' | 'dataType' | 'dataFormat' | 'orderby' | 'transformRule';
|
|
47
|
+
export declare const FieldProperty: {
|
|
48
|
+
ALIAS: string;
|
|
49
|
+
DESC: string;
|
|
50
|
+
DATA_TYPE: string;
|
|
51
|
+
DATA_FORMAT: string;
|
|
52
|
+
ORDER_BY: string;
|
|
53
|
+
TRANSFORM_RULE: string;
|
|
54
|
+
};
|
|
55
|
+
export type BusinessViewType = 'RAW_SQL_QUERY' | 'VISUAL_QUERY' | 'SQL_QUERY';
|
|
56
|
+
export declare const BusinessViewType: {
|
|
57
|
+
RAW_SQL_QUERY: string;
|
|
58
|
+
VISUAL_QUERY: string;
|
|
59
|
+
SQL_QUERY: string;
|
|
60
|
+
};
|
|
61
|
+
export interface ICatalogElement {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
alias: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
type: string;
|
|
67
|
+
parentId?: string;
|
|
68
|
+
children?: ICatalogElement[];
|
|
69
|
+
createTime?: Date;
|
|
70
|
+
updateTime?: Date;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
export interface IResourcePermission {
|
|
74
|
+
resourceId: string;
|
|
75
|
+
permissions: string[];
|
|
76
|
+
grantedBy: string;
|
|
77
|
+
grantTime: Date;
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
}
|
|
80
|
+
export interface IResourcePermissionItem {
|
|
81
|
+
itemId: string;
|
|
82
|
+
itemName: string;
|
|
83
|
+
permissionType: string;
|
|
84
|
+
inherited: boolean;
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
}
|
|
87
|
+
export interface ICatalogSearchResult {
|
|
88
|
+
id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
alias: string;
|
|
91
|
+
type: string;
|
|
92
|
+
parentId: string;
|
|
93
|
+
score: number;
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}
|
|
96
|
+
export type AccessType = 'REF' | 'READ' | 'WRITE';
|
|
97
|
+
export declare const AccessType: {
|
|
98
|
+
REF: string;
|
|
99
|
+
READ: string;
|
|
100
|
+
WRITE: string;
|
|
101
|
+
};
|
|
102
|
+
export type CatalogElementType = 'FOLDER' | 'SIMPLE_REPORT' | 'ANALYSIS_REPORT' | 'COMBINED_QUERY' | 'INSIGHT' | 'OLAP_REPORT' | 'DASHBOARD' | 'SMARTBIX_PAGE' | 'DATASET' | 'VISUAL' | 'SQL' | 'PROCEDURE' | 'NATIVE_SQL' | 'JAVA' | 'SMARTBIX_DATASET' | 'AUGMENTED_DATASET' | 'BUSINESS_VIEW' | 'BUSINESS_SUBJECT' | 'BUSINESS_QUERY' | 'SPREADSHEET_REPORT' | 'WEB_SPREADSHEET_REPORT' | 'SMARTBI_DATAPROCESS' | 'ETL_AUTOMATION' | 'JOB_FLOW' | 'SMARTBI_MINING' | 'URL' | 'excelimport' | 'TXTQUERYOBJECT' | 'TXTDATASOURCE' | 'SCHEMA' | 'OLD_DATASET';
|
|
103
|
+
export declare const CatalogElementType: {
|
|
104
|
+
FOLDER: string;
|
|
105
|
+
SIMPLE_REPORT: string;
|
|
106
|
+
ANALYSIS_REPORT: string;
|
|
107
|
+
COMBINED_QUERY: string;
|
|
108
|
+
INSIGHT: string;
|
|
109
|
+
OLAP_REPORT: string;
|
|
110
|
+
DASHBOARD: string;
|
|
111
|
+
SMARTBIX_PAGE: string;
|
|
112
|
+
DATASET: string;
|
|
113
|
+
VISUAL: string;
|
|
114
|
+
SQL: string;
|
|
115
|
+
PROCEDURE: string;
|
|
116
|
+
NATIVE_SQL: string;
|
|
117
|
+
JAVA: string;
|
|
118
|
+
SMARTBIX_DATASET: string;
|
|
119
|
+
AUGMENTED_DATASET: string;
|
|
120
|
+
BUSINESS_VIEW: string;
|
|
121
|
+
BUSINESS_SUBJECT: string;
|
|
122
|
+
BUSINESS_QUERY: string;
|
|
123
|
+
SPREADSHEET_REPORT: string;
|
|
124
|
+
WEB_SPREADSHEET_REPORT: string;
|
|
125
|
+
DATA_PROCESS: string;
|
|
126
|
+
ETL_AUTOMATION: string;
|
|
127
|
+
JOB_FLOW: string;
|
|
128
|
+
DATA_MINING: string;
|
|
129
|
+
URL_LINK: string;
|
|
130
|
+
EXCEL_IMPORT_TEMPLATE: string;
|
|
131
|
+
TXT_QUERY_OBJECT: string;
|
|
132
|
+
TXT_DATA_SOURCE: string;
|
|
133
|
+
SCHEMA: string;
|
|
134
|
+
OLD_DATASET: string;
|
|
135
|
+
};
|
|
136
|
+
export type PermissionType = 'REF' | 'READ' | 'WRITE';
|
|
137
|
+
export declare const PermissionType: {
|
|
138
|
+
REF: string;
|
|
139
|
+
READ: string;
|
|
140
|
+
WRITE: string;
|
|
141
|
+
};
|
|
142
|
+
export type PermissionDescendType = 'ALL' | 'NONE' | 'READ_WRITE';
|
|
143
|
+
export declare const PermissionDescendType: {
|
|
144
|
+
ALL: string;
|
|
145
|
+
NONE: string;
|
|
146
|
+
READ_WRITE: string;
|
|
147
|
+
};
|
|
148
|
+
export type HiddenInBrowse = boolean;
|
|
149
|
+
export interface IClientCombinedReportView {
|
|
150
|
+
clientId: string;
|
|
151
|
+
reportBean?: any;
|
|
152
|
+
queryClientId?: string;
|
|
153
|
+
reportClientId?: string;
|
|
154
|
+
condPanelClientId?: string;
|
|
155
|
+
paramPanelId?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface ReportData {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
alias?: string;
|
|
161
|
+
data: any[];
|
|
162
|
+
totalRows: number;
|
|
163
|
+
currentPage: number;
|
|
164
|
+
rowsPerPage: number;
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
}
|
|
167
|
+
export interface ClientReportView {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
alias?: string;
|
|
171
|
+
clientId: string;
|
|
172
|
+
reportId: string;
|
|
173
|
+
[key: string]: any;
|
|
174
|
+
}
|
|
175
|
+
export interface CustomFilterDataBean {
|
|
176
|
+
id: string;
|
|
177
|
+
name: string;
|
|
178
|
+
condition: string;
|
|
179
|
+
[key: string]: any;
|
|
180
|
+
}
|
|
181
|
+
export type AggregateType = 'SUM' | 'MIN' | 'MAX' | 'COUNT' | 'DISTINCT_COUNT' | 'AVG' | 'NULL';
|
|
182
|
+
export declare const AggregateType: {
|
|
183
|
+
SUM: string;
|
|
184
|
+
MIN: string;
|
|
185
|
+
MAX: string;
|
|
186
|
+
COUNT: string;
|
|
187
|
+
DISTINCT_COUNT: string;
|
|
188
|
+
AVG: string;
|
|
189
|
+
NULL: string;
|
|
190
|
+
};
|
|
191
|
+
export type OrderType = 'ASC' | 'DESC' | 'NONE';
|
|
192
|
+
export declare const OrderType: {
|
|
193
|
+
ASC: string;
|
|
194
|
+
DESC: string;
|
|
195
|
+
NONE: string;
|
|
196
|
+
};
|
|
197
|
+
export type OperatorType = 'EQ' | 'NE' | 'GT' | 'GE' | 'LT' | 'LE' | 'LIKE' | 'IN' | 'NOT_IN' | 'IS_NULL' | 'NOT_NULL';
|
|
198
|
+
export declare const OperatorType: {
|
|
199
|
+
EQ: string;
|
|
200
|
+
NE: string;
|
|
201
|
+
GT: string;
|
|
202
|
+
GE: string;
|
|
203
|
+
LT: string;
|
|
204
|
+
LE: string;
|
|
205
|
+
LIKE: string;
|
|
206
|
+
IN: string;
|
|
207
|
+
NOT_IN: string;
|
|
208
|
+
IS_NULL: string;
|
|
209
|
+
NOT_NULL: string;
|
|
210
|
+
};
|
|
211
|
+
export interface DataSource {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
alias?: string;
|
|
215
|
+
desc?: string;
|
|
216
|
+
user: string;
|
|
217
|
+
password?: string;
|
|
218
|
+
driverType: string;
|
|
219
|
+
driver: string;
|
|
220
|
+
url: string;
|
|
221
|
+
maxConnection: number;
|
|
222
|
+
dbCharset?: string;
|
|
223
|
+
validationQuery?: string;
|
|
224
|
+
transactionIsolation?: number;
|
|
225
|
+
validationQueryMethod?: number;
|
|
226
|
+
authenticationType?: string;
|
|
227
|
+
driverCatalog?: string;
|
|
228
|
+
[key: string]: any;
|
|
229
|
+
}
|
|
230
|
+
export type JDBCTableType = 'TABLE' | 'VIEW' | 'PROC' | 'MACRO';
|
|
231
|
+
export declare const JDBCTableType: {
|
|
232
|
+
TABLE: string;
|
|
233
|
+
VIEW: string;
|
|
234
|
+
PROC: string;
|
|
235
|
+
MACRO: string;
|
|
236
|
+
};
|
|
237
|
+
export interface JDBCTable {
|
|
238
|
+
catalog?: string;
|
|
239
|
+
schema?: string;
|
|
240
|
+
name: string;
|
|
241
|
+
desc?: string;
|
|
242
|
+
type: JDBCTableType;
|
|
243
|
+
[key: string]: any;
|
|
244
|
+
}
|
|
245
|
+
export interface BasicField {
|
|
246
|
+
id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
alias?: string;
|
|
249
|
+
desc?: string;
|
|
250
|
+
dataType: string;
|
|
251
|
+
dataFormat?: string;
|
|
252
|
+
[key: string]: any;
|
|
253
|
+
}
|
|
254
|
+
export interface SDKCellData {
|
|
255
|
+
type?: string;
|
|
256
|
+
isNull?: boolean;
|
|
257
|
+
displayValue?: string;
|
|
258
|
+
stringValue?: string;
|
|
259
|
+
intValue?: number;
|
|
260
|
+
doubleValue?: number;
|
|
261
|
+
dateValue?: Date;
|
|
262
|
+
longValue?: number;
|
|
263
|
+
byteArrayValue?: Uint8Array;
|
|
264
|
+
extendValue?: string;
|
|
265
|
+
useTransformRule?: boolean;
|
|
266
|
+
bigIntValue?: bigint;
|
|
267
|
+
bigDecimalValue?: number;
|
|
268
|
+
[key: string]: any;
|
|
269
|
+
}
|
|
270
|
+
export interface SDKGridData {
|
|
271
|
+
totalRowsCount: number;
|
|
272
|
+
stringHeaders?: string[];
|
|
273
|
+
columnNames?: string[];
|
|
274
|
+
columnLabels?: string[];
|
|
275
|
+
data?: SDKCellData[][];
|
|
276
|
+
[key: string]: any;
|
|
277
|
+
}
|
|
278
|
+
export type DriverType = 'KINGBASE' | 'ODBC' | 'MSSQL' | 'MYSQL' | 'ORACLE' | 'DB2_400' | 'DB2' | 'DB2_V9' | 'INFORMIX' | 'SYBASE' | 'TERADATA' | 'TERADATA_V12' | 'ACCESS' | 'EXCEL' | 'POSTGRESQL' | 'GREENPLUM' | 'DEFAULT';
|
|
279
|
+
export declare const DriverType: {
|
|
280
|
+
KINGBASE: string;
|
|
281
|
+
ODBC: string;
|
|
282
|
+
MSSQL: string;
|
|
283
|
+
MYSQL: string;
|
|
284
|
+
ORACLE: string;
|
|
285
|
+
DB2_400: string;
|
|
286
|
+
DB2: string;
|
|
287
|
+
DB2_V9: string;
|
|
288
|
+
INFORMIX: string;
|
|
289
|
+
SYBASE: string;
|
|
290
|
+
TERADATA: string;
|
|
291
|
+
TERADATA_V12: string;
|
|
292
|
+
ACCESS: string;
|
|
293
|
+
EXCEL: string;
|
|
294
|
+
POSTGRESQL: string;
|
|
295
|
+
GREENPLUM: string;
|
|
296
|
+
DEFAULT: string;
|
|
297
|
+
};
|
|
298
|
+
export interface SystemConfig {
|
|
299
|
+
id: string;
|
|
300
|
+
name: string;
|
|
301
|
+
value: string;
|
|
302
|
+
desc?: string;
|
|
303
|
+
[key: string]: any;
|
|
304
|
+
}
|
|
305
|
+
export interface InsightConfig {
|
|
306
|
+
[key: string]: any;
|
|
307
|
+
}
|
|
308
|
+
export interface IDocument {
|
|
309
|
+
id: string;
|
|
310
|
+
name: string;
|
|
311
|
+
type: string;
|
|
312
|
+
parentId?: string;
|
|
313
|
+
[key: string]: any;
|
|
314
|
+
}
|
|
315
|
+
export interface DocumentTreeNode {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
type: string;
|
|
319
|
+
parentId?: string;
|
|
320
|
+
children?: DocumentTreeNode[];
|
|
321
|
+
[key: string]: any;
|
|
322
|
+
}
|
|
323
|
+
export interface CategoryResource {
|
|
324
|
+
id: string;
|
|
325
|
+
name: string;
|
|
326
|
+
type: string;
|
|
327
|
+
parentId?: string;
|
|
328
|
+
[key: string]: any;
|
|
329
|
+
}
|
|
330
|
+
export interface CalcField {
|
|
331
|
+
id: string;
|
|
332
|
+
name: string;
|
|
333
|
+
alias?: string;
|
|
334
|
+
desc?: string;
|
|
335
|
+
expression: string;
|
|
336
|
+
dataType: string;
|
|
337
|
+
format?: string;
|
|
338
|
+
[key: string]: any;
|
|
339
|
+
}
|
|
340
|
+
export interface TableField {
|
|
341
|
+
id: string;
|
|
342
|
+
name: string;
|
|
343
|
+
alias?: string;
|
|
344
|
+
desc?: string;
|
|
345
|
+
dataType: string;
|
|
346
|
+
length?: number;
|
|
347
|
+
precision?: number;
|
|
348
|
+
scale?: number;
|
|
349
|
+
nullable?: boolean;
|
|
350
|
+
primaryKey?: boolean;
|
|
351
|
+
defaultValue?: string;
|
|
352
|
+
[key: string]: any;
|
|
353
|
+
}
|
|
354
|
+
export interface GraphicReport {
|
|
355
|
+
id: string;
|
|
356
|
+
name: string;
|
|
357
|
+
alias: string;
|
|
358
|
+
description?: string;
|
|
359
|
+
type: string;
|
|
360
|
+
params?: any[];
|
|
361
|
+
parameterPanelId?: string;
|
|
362
|
+
clientId?: string;
|
|
363
|
+
width?: string;
|
|
364
|
+
height?: string;
|
|
365
|
+
flashBasePath?: string;
|
|
366
|
+
timeConsuming?: any;
|
|
367
|
+
[key: string]: any;
|
|
368
|
+
}
|
|
369
|
+
export interface TimeConsumingInfo {
|
|
370
|
+
id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
startTime: Date;
|
|
373
|
+
endTime: Date;
|
|
374
|
+
duration: number;
|
|
375
|
+
status: string;
|
|
376
|
+
progress: number;
|
|
377
|
+
[key: string]: any;
|
|
378
|
+
}
|
|
379
|
+
export interface User {
|
|
380
|
+
id: string;
|
|
381
|
+
name: string;
|
|
382
|
+
alias?: string;
|
|
383
|
+
description?: string;
|
|
384
|
+
password?: string;
|
|
385
|
+
isEnabled: boolean;
|
|
386
|
+
forceChangePassword?: boolean;
|
|
387
|
+
[key: string]: any;
|
|
388
|
+
}
|
|
389
|
+
export interface Role {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
alias?: string;
|
|
393
|
+
description?: string;
|
|
394
|
+
[key: string]: any;
|
|
395
|
+
}
|
|
396
|
+
export interface Department {
|
|
397
|
+
id: string;
|
|
398
|
+
name: string;
|
|
399
|
+
alias?: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
departmentCode?: string;
|
|
402
|
+
[key: string]: any;
|
|
403
|
+
}
|
|
404
|
+
export interface FunctionPermission {
|
|
405
|
+
id: string;
|
|
406
|
+
name: string;
|
|
407
|
+
alias?: string;
|
|
408
|
+
description?: string;
|
|
409
|
+
parentId?: string;
|
|
410
|
+
[key: string]: any;
|
|
411
|
+
}
|
|
412
|
+
export interface ExtensionAttribute {
|
|
413
|
+
id: string;
|
|
414
|
+
key: string;
|
|
415
|
+
value: string;
|
|
416
|
+
longValue?: string;
|
|
417
|
+
[key: string]: any;
|
|
418
|
+
}
|
|
419
|
+
export interface AllExportTypeMap {
|
|
420
|
+
EXCEL: 'EXCEL';
|
|
421
|
+
TXT: 'TXT';
|
|
422
|
+
CSV: 'CSV';
|
|
423
|
+
WORD: 'WORD';
|
|
424
|
+
WORD2003: 'WORD2003';
|
|
425
|
+
POWERPOINT: 'POWERPOINT';
|
|
426
|
+
PDF: 'PDF';
|
|
427
|
+
PNG: 'PNG';
|
|
428
|
+
EXCEL2007: 'EXCEL2007';
|
|
429
|
+
LIST_EXCEL: 'LIST_EXCEL';
|
|
430
|
+
HTML: 'HTML';
|
|
431
|
+
}
|
|
432
|
+
export type ReportExportType = keyof Pick<AllExportTypeMap, 'EXCEL' | 'TXT' | 'CSV'>;
|
|
433
|
+
export type OfficeReportExportType = keyof Pick<AllExportTypeMap, 'WORD' | 'WORD2003' | 'POWERPOINT' | 'PDF'>;
|
|
434
|
+
export type SSReportExportType = keyof Pick<AllExportTypeMap, 'PDF' | 'PNG' | 'WORD' | 'EXCEL2007' | 'LIST_EXCEL' | 'EXCEL' | 'HTML' | 'CSV'>;
|
|
435
|
+
export type JSONArray = any[];
|
|
436
|
+
export interface ICombinedReport {
|
|
437
|
+
currentReportName: string;
|
|
438
|
+
rowsPerPage: number;
|
|
439
|
+
parameters?: any[];
|
|
440
|
+
fields?: any[];
|
|
441
|
+
[key: string]: any;
|
|
442
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// 公共类型定义
|
|
2
|
+
export const FieldProperty = {
|
|
3
|
+
ALIAS: 'alias',
|
|
4
|
+
DESC: 'desc',
|
|
5
|
+
DATA_TYPE: 'dataType',
|
|
6
|
+
DATA_FORMAT: 'dataFormat',
|
|
7
|
+
ORDER_BY: 'orderby',
|
|
8
|
+
TRANSFORM_RULE: 'transformRule'
|
|
9
|
+
};
|
|
10
|
+
export const BusinessViewType = {
|
|
11
|
+
RAW_SQL_QUERY: 'RAW_SQL_QUERY',
|
|
12
|
+
VISUAL_QUERY: 'VISUAL_QUERY',
|
|
13
|
+
SQL_QUERY: 'SQL_QUERY'
|
|
14
|
+
};
|
|
15
|
+
export const AccessType = {
|
|
16
|
+
REF: 'REF', // 引用权限
|
|
17
|
+
READ: 'READ', // 查看权限
|
|
18
|
+
WRITE: 'WRITE' // 编辑权限
|
|
19
|
+
};
|
|
20
|
+
// CatalogElementType 常量对象
|
|
21
|
+
export const CatalogElementType = {
|
|
22
|
+
// 文件夹类型
|
|
23
|
+
FOLDER: 'FOLDER',
|
|
24
|
+
// 报表类型
|
|
25
|
+
SIMPLE_REPORT: 'SIMPLE_REPORT', // 简单报表
|
|
26
|
+
ANALYSIS_REPORT: 'ANALYSIS_REPORT', // 分析报表
|
|
27
|
+
COMBINED_QUERY: 'COMBINED_QUERY', // 即席查询
|
|
28
|
+
INSIGHT: 'INSIGHT', // 透视分析
|
|
29
|
+
OLAP_REPORT: 'OLAP_REPORT', // 多维分析
|
|
30
|
+
// 仪表盘类型
|
|
31
|
+
DASHBOARD: 'DASHBOARD', // 传统仪表盘
|
|
32
|
+
SMARTBIX_PAGE: 'SMARTBIX_PAGE', // 交互式仪表盘
|
|
33
|
+
// 数据集类型
|
|
34
|
+
DATASET: 'DATASET', // 通用数据集
|
|
35
|
+
VISUAL: 'VISUAL', // 可视化数据集
|
|
36
|
+
SQL: 'SQL', // SQL数据集
|
|
37
|
+
PROCEDURE: 'PROCEDURE', // 存储过程数据集
|
|
38
|
+
NATIVE_SQL: 'NATIVE_SQL', // 原生SQL数据集
|
|
39
|
+
JAVA: 'JAVA', // JAVA数据集
|
|
40
|
+
SMARTBIX_DATASET: 'SMARTBIX_DATASET', // 自助数据集
|
|
41
|
+
AUGMENTED_DATASET: 'AUGMENTED_DATASET', // 数据模型
|
|
42
|
+
// 业务对象类型
|
|
43
|
+
BUSINESS_VIEW: 'BUSINESS_VIEW', // 业务视图
|
|
44
|
+
BUSINESS_SUBJECT: 'BUSINESS_SUBJECT', // 业务主题
|
|
45
|
+
BUSINESS_QUERY: 'BUSINESS_QUERY', // 业务查询
|
|
46
|
+
// 电子表格类型
|
|
47
|
+
SPREADSHEET_REPORT: 'SPREADSHEET_REPORT', // 电子表格报表
|
|
48
|
+
WEB_SPREADSHEET_REPORT: 'WEB_SPREADSHEET_REPORT', // WEB电子表格
|
|
49
|
+
// 数据处理类型
|
|
50
|
+
DATA_PROCESS: 'SMARTBI_DATAPROCESS', // 自助ETL
|
|
51
|
+
ETL_AUTOMATION: 'ETL_AUTOMATION', // ETL自动化
|
|
52
|
+
JOB_FLOW: 'JOB_FLOW', // 作业流
|
|
53
|
+
DATA_MINING: 'SMARTBI_MINING', // 数据挖掘
|
|
54
|
+
// 其他类型
|
|
55
|
+
URL_LINK: 'URL', // WEB链接
|
|
56
|
+
EXCEL_IMPORT_TEMPLATE: 'excelimport', // Excel导入模板
|
|
57
|
+
TXT_QUERY_OBJECT: 'TXTQUERYOBJECT', // 查询对象
|
|
58
|
+
TXT_DATA_SOURCE: 'TXTDATASOURCE', // 数据源
|
|
59
|
+
SCHEMA: 'SCHEMA', // 模式
|
|
60
|
+
// 旧版类型
|
|
61
|
+
OLD_DATASET: 'OLD_DATASET' // 旧数据集
|
|
62
|
+
};
|
|
63
|
+
export const PermissionType = {
|
|
64
|
+
REF: 'REF',
|
|
65
|
+
READ: 'READ',
|
|
66
|
+
WRITE: 'WRITE'
|
|
67
|
+
};
|
|
68
|
+
export const PermissionDescendType = {
|
|
69
|
+
ALL: 'ALL',
|
|
70
|
+
NONE: 'NONE',
|
|
71
|
+
READ_WRITE: 'READ_WRITE'
|
|
72
|
+
};
|
|
73
|
+
export const AggregateType = {
|
|
74
|
+
SUM: 'SUM',
|
|
75
|
+
MIN: 'MIN',
|
|
76
|
+
MAX: 'MAX',
|
|
77
|
+
COUNT: 'COUNT',
|
|
78
|
+
DISTINCT_COUNT: 'DISTINCT_COUNT',
|
|
79
|
+
AVG: 'AVG',
|
|
80
|
+
NULL: 'NULL'
|
|
81
|
+
};
|
|
82
|
+
export const OrderType = {
|
|
83
|
+
ASC: 'ASC',
|
|
84
|
+
DESC: 'DESC',
|
|
85
|
+
NONE: 'NONE'
|
|
86
|
+
};
|
|
87
|
+
export const OperatorType = {
|
|
88
|
+
EQ: 'EQ',
|
|
89
|
+
NE: 'NE',
|
|
90
|
+
GT: 'GT',
|
|
91
|
+
GE: 'GE',
|
|
92
|
+
LT: 'LT',
|
|
93
|
+
LE: 'LE',
|
|
94
|
+
LIKE: 'LIKE',
|
|
95
|
+
IN: 'IN',
|
|
96
|
+
NOT_IN: 'NOT_IN',
|
|
97
|
+
IS_NULL: 'IS_NULL',
|
|
98
|
+
NOT_NULL: 'NOT_NULL'
|
|
99
|
+
};
|
|
100
|
+
export const JDBCTableType = {
|
|
101
|
+
TABLE: 'TABLE',
|
|
102
|
+
VIEW: 'VIEW',
|
|
103
|
+
PROC: 'PROC',
|
|
104
|
+
MACRO: 'MACRO'
|
|
105
|
+
};
|
|
106
|
+
// DriverType 常量对象
|
|
107
|
+
export const DriverType = {
|
|
108
|
+
KINGBASE: 'KINGBASE', // kingbase数据库
|
|
109
|
+
ODBC: 'ODBC', // odbc连接方式
|
|
110
|
+
MSSQL: 'MSSQL', // Ms SQL Server数据库
|
|
111
|
+
MYSQL: 'MYSQL', // Mysql数据库
|
|
112
|
+
ORACLE: 'ORACLE', // Oracle数据库
|
|
113
|
+
DB2_400: 'DB2_400', // DB2数据库
|
|
114
|
+
DB2: 'DB2', // DB2数据库
|
|
115
|
+
DB2_V9: 'DB2_V9', // DB2_V9数据库
|
|
116
|
+
INFORMIX: 'INFORMIX', // Informix数据库
|
|
117
|
+
SYBASE: 'SYBASE', // Sybase数据库
|
|
118
|
+
TERADATA: 'TERADATA', // Teradata数据库
|
|
119
|
+
TERADATA_V12: 'TERADATA_V12', // Teradata_v12数据库
|
|
120
|
+
ACCESS: 'ACCESS', // Access数据库
|
|
121
|
+
EXCEL: 'EXCEL', // Excel
|
|
122
|
+
POSTGRESQL: 'POSTGRESQL', // PostgreSQL数据库
|
|
123
|
+
GREENPLUM: 'GREENPLUM', // Greenplum数据库
|
|
124
|
+
DEFAULT: 'DEFAULT' // 其它类型数据库
|
|
125
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PluginOption } from 'vite';
|
|
2
|
+
export type VitePluginSmartbiOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* 插件名称
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* 插件名称
|
|
9
|
+
*/
|
|
10
|
+
alias?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 插件描述
|
|
13
|
+
*/
|
|
14
|
+
desc?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 优先级
|
|
17
|
+
*/
|
|
18
|
+
priority?: number;
|
|
19
|
+
/**
|
|
20
|
+
* 输出目录
|
|
21
|
+
*/
|
|
22
|
+
output?: string;
|
|
23
|
+
/**
|
|
24
|
+
* html重命名
|
|
25
|
+
*/
|
|
26
|
+
indexRename?: string;
|
|
27
|
+
/**
|
|
28
|
+
* vision到html中间的路径
|
|
29
|
+
*/
|
|
30
|
+
appendPath?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 插件版本
|
|
33
|
+
*/
|
|
34
|
+
version?: string;
|
|
35
|
+
};
|
|
36
|
+
export default function VitePluginSmartbi(config: VitePluginSmartbiOptions): PluginOption;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { resolve, } from "node:path";
|
|
3
|
+
import { remove, copy, mkdirp, } from 'fs-extra';
|
|
4
|
+
import { exec } from "node:child_process";
|
|
5
|
+
const info = chalk.hex('#00dd66'); // Orange color
|
|
6
|
+
const configExtension = ({ name, alias, desc, priority, version, }) => {
|
|
7
|
+
const web = `<web-app/>`;
|
|
8
|
+
const portlet = `<?xml version="1.0" encoding="UTF-8"?>
|
|
9
|
+
<portlet-app>
|
|
10
|
+
</portlet-app>
|
|
11
|
+
`;
|
|
12
|
+
const extension = `<?xml version="1.0" encoding="UTF-8"?>
|
|
13
|
+
<!DOCTYPE extension SYSTEM "extension.dtd">
|
|
14
|
+
<extension name="${name}" alias="${alias || name}" desc="${desc || name}" :priority="${priority || 100}" version="${version || '1.0'}">
|
|
15
|
+
<enable-jsp-processor />
|
|
16
|
+
</extension>
|
|
17
|
+
`;
|
|
18
|
+
const applicationContext = `<?xml version="1.0" encoding="UTF-8"?>
|
|
19
|
+
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
|
20
|
+
<beans>
|
|
21
|
+
<bean id="framework" class="smartbi.framework.Framework" factory-method="getInstance">
|
|
22
|
+
<property name="modules">
|
|
23
|
+
<map>
|
|
24
|
+
</map>
|
|
25
|
+
</property>
|
|
26
|
+
</bean>
|
|
27
|
+
<bean id="rmi" class="smartbi.framework.rmi.RMIModule" factory-method="getInstance">
|
|
28
|
+
<property name="modules">
|
|
29
|
+
<map>
|
|
30
|
+
</map>
|
|
31
|
+
</property>
|
|
32
|
+
</bean>
|
|
33
|
+
</beans>
|
|
34
|
+
`;
|
|
35
|
+
const build = `<?xml version="1.0" encoding="UTF-8"?>
|
|
36
|
+
<project name="${name}" default="dist">
|
|
37
|
+
<target name="dist" >
|
|
38
|
+
<tstamp>
|
|
39
|
+
<format property="today" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
40
|
+
</tstamp>
|
|
41
|
+
<echo file="\${basedir}/source/META-INF/version.txt" message="\${today}"/>
|
|
42
|
+
|
|
43
|
+
<jar destfile="\${basedir}/${name}.ext" duplicate="preserve">
|
|
44
|
+
<fileset dir="\${basedir}/source"/>
|
|
45
|
+
</jar>
|
|
46
|
+
</target>
|
|
47
|
+
</project>
|
|
48
|
+
`;
|
|
49
|
+
return {
|
|
50
|
+
web, applicationContext, extension, portlet,
|
|
51
|
+
build
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export default function VitePluginSmartbi(config) {
|
|
55
|
+
const { output = 'smartbi-ext', appendPath } = config;
|
|
56
|
+
return {
|
|
57
|
+
name: "vite-plugin-smartbi",
|
|
58
|
+
apply: "build",
|
|
59
|
+
enforce: "post",
|
|
60
|
+
writeBundle(options, _bundle) {
|
|
61
|
+
this.info("开始打包");
|
|
62
|
+
console.log(info("开始打包"));
|
|
63
|
+
const { writeFile } = this.fs;
|
|
64
|
+
const outputDir = options.dir;
|
|
65
|
+
const extDir = resolve(resolve(outputDir, '..'), output);
|
|
66
|
+
const sourceDir = resolve(extDir, 'source');
|
|
67
|
+
const metaInfDir = resolve(sourceDir, 'META-INF');
|
|
68
|
+
const webInfDir = resolve(sourceDir, 'WEB-INF');
|
|
69
|
+
let visionDir = resolve(sourceDir, 'vision');
|
|
70
|
+
if (appendPath) {
|
|
71
|
+
visionDir = resolve(visionDir, appendPath);
|
|
72
|
+
}
|
|
73
|
+
const { applicationContext, extension, portlet, web, build } = configExtension(config);
|
|
74
|
+
console.log(build);
|
|
75
|
+
remove(extDir)
|
|
76
|
+
.then(() => mkdirp(sourceDir))
|
|
77
|
+
.then(() => mkdirp(metaInfDir))
|
|
78
|
+
.then(() => mkdirp(webInfDir))
|
|
79
|
+
.then(() => mkdirp(visionDir))
|
|
80
|
+
.then(() => writeFile(webInfDir + "/web.xml", web))
|
|
81
|
+
.then(() => writeFile(metaInfDir + "/applicationContext.xml", applicationContext))
|
|
82
|
+
.then(() => writeFile(metaInfDir + "/extension.xml", extension))
|
|
83
|
+
.then(() => writeFile(metaInfDir + "/portlet.xml", portlet))
|
|
84
|
+
.then(() => writeFile(extDir + "/build.xml", build))
|
|
85
|
+
.then(() => {
|
|
86
|
+
console.log(info("ext基础文件复制成功"));
|
|
87
|
+
copy(outputDir, visionDir).then(() => {
|
|
88
|
+
console.log(info("ext资源文件复制成功"));
|
|
89
|
+
exec('ant', { cwd: extDir }, (err, stdout, stderr) => {
|
|
90
|
+
remove(extDir + "/build.xml").then(() => {
|
|
91
|
+
if (err) {
|
|
92
|
+
console.log(info(err));
|
|
93
|
+
console.log(info("打包失败"));
|
|
94
|
+
console.log(info("请检查是否有ant环境,搜索Apache Ant部署环境"));
|
|
95
|
+
this.error(stderr);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
console.log(info(stdout));
|
|
99
|
+
console.log(info("ext构建完成"));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}
|