smartbi-toolkit 1.1.4 → 1.2.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 +59 -12
- package/dist/common-Cnq1SoER.d.ts +25 -0
- package/dist/console-BJttltN4.js +93 -0
- package/dist/index.d.ts +23 -14
- package/dist/index.js +97 -127
- package/dist/{methods → service}/AnalysisReportService.d.ts +18 -14
- package/dist/service/AnalysisReportService.js +138 -0
- package/dist/service/BusinessThemeService.d.ts +11 -0
- package/dist/service/BusinessThemeService.js +20 -0
- package/dist/{methods → service}/BusinessViewService.d.ts +18 -14
- package/dist/service/BusinessViewService.js +146 -0
- package/dist/{methods → service}/CatalogService.d.ts +26 -22
- package/dist/service/CatalogService.js +300 -0
- package/dist/{methods → service}/ClientCombinedReportService.d.ts +14 -10
- package/dist/service/ClientCombinedReportService.js +96 -0
- package/dist/{methods → service}/ClientInsightService.d.ts +17 -13
- package/dist/service/ClientInsightService.js +123 -0
- package/dist/{methods → service}/ClientReportService.d.ts +27 -23
- package/dist/service/ClientReportService.js +244 -0
- package/dist/service/CombinedReportService.d.ts +11 -0
- package/dist/service/CombinedReportService.js +14 -0
- package/dist/{methods → service}/DataSourceService.d.ts +26 -22
- package/dist/service/DataSourceService.js +306 -0
- package/dist/service/GraphicReportService.d.ts +11 -0
- package/dist/service/GraphicReportService.js +14 -0
- package/dist/service/InsightReport.d.ts +75 -0
- package/dist/service/InsightReport.js +118 -0
- package/dist/{methods → service}/MetadataService.d.ts +10 -6
- package/dist/service/MetadataService.js +60 -0
- package/dist/service/OfficeReport.d.ts +53 -0
- package/dist/service/OfficeReport.js +74 -0
- package/dist/{methods → service}/OfficeReportService.d.ts +10 -6
- package/dist/service/OfficeReportService.js +56 -0
- package/dist/service/OltpMetadataService.d.ts +23 -0
- package/dist/service/OltpMetadataService.js +30 -0
- package/dist/service/ParameterService.d.ts +15 -0
- package/dist/service/ParameterService.js +22 -0
- package/dist/service/PoolService.d.ts +14 -0
- package/dist/service/PoolService.js +21 -0
- package/dist/{methods → service}/PortalService.d.ts +14 -10
- package/dist/service/PortalService.js +106 -0
- package/dist/{methods → service}/Report.d.ts +31 -27
- package/dist/service/Report.js +275 -0
- package/dist/service/SSReport.d.ts +90 -0
- package/dist/service/SSReport.js +127 -0
- package/dist/service/ScheduleTaskService.d.ts +15 -0
- package/dist/service/ScheduleTaskService.js +22 -0
- package/dist/service/SimpleReportService.d.ts +15 -0
- package/dist/service/SimpleReportService.js +22 -0
- package/dist/service/SpreadSheetReportService.d.ts +47 -0
- package/dist/service/SpreadSheetReportService.js +65 -0
- package/dist/service/SystemConfigService.d.ts +21 -0
- package/dist/service/SystemConfigService.js +28 -0
- package/dist/service/TimeConsuming.d.ts +10 -0
- package/dist/service/TimeConsuming.js +13 -0
- package/dist/service/TimeConsumingService.d.ts +8 -0
- package/dist/service/TimeConsumingService.js +13 -0
- package/dist/{methods → service}/UserManagerService.d.ts +40 -36
- package/dist/service/UserManagerService.js +365 -0
- package/dist/types-DOYMZhxT.d.ts +409 -0
- package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
- package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
- package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
- package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
- package/package.json +59 -141
- package/dist/methods/AnalysisReportService.js +0 -126
- package/dist/methods/BusinessThemeService.d.ts +0 -8
- package/dist/methods/BusinessThemeService.js +0 -11
- package/dist/methods/BusinessViewService.js +0 -120
- package/dist/methods/CatalogService.js +0 -230
- package/dist/methods/ClientCombinedReportService.js +0 -82
- package/dist/methods/ClientInsightService.js +0 -107
- package/dist/methods/ClientReportService.js +0 -206
- package/dist/methods/CombinedReportService.d.ts +0 -7
- package/dist/methods/CombinedReportService.js +0 -10
- package/dist/methods/DataSourceService.js +0 -220
- package/dist/methods/GraphicReportService.d.ts +0 -7
- package/dist/methods/GraphicReportService.js +0 -10
- package/dist/methods/InsightReport.d.ts +0 -71
- package/dist/methods/InsightReport.js +0 -98
- package/dist/methods/MetadataService.js +0 -47
- package/dist/methods/OfficeReport.d.ts +0 -49
- package/dist/methods/OfficeReport.js +0 -65
- package/dist/methods/OfficeReportService.js +0 -46
- package/dist/methods/OltpMetadataService.d.ts +0 -19
- package/dist/methods/OltpMetadataService.js +0 -25
- package/dist/methods/ParameterService.d.ts +0 -12
- package/dist/methods/ParameterService.js +0 -18
- package/dist/methods/PoolService.d.ts +0 -11
- package/dist/methods/PoolService.js +0 -17
- package/dist/methods/PortalService.js +0 -89
- package/dist/methods/Report.js +0 -230
- package/dist/methods/SSReport.d.ts +0 -86
- package/dist/methods/SSReport.js +0 -114
- package/dist/methods/ScheduleTaskService.d.ts +0 -12
- package/dist/methods/ScheduleTaskService.js +0 -18
- package/dist/methods/SimpleReportService.d.ts +0 -12
- package/dist/methods/SimpleReportService.js +0 -18
- package/dist/methods/SpreadSheetReportService.d.ts +0 -43
- package/dist/methods/SpreadSheetReportService.js +0 -55
- package/dist/methods/SystemConfigService.d.ts +0 -17
- package/dist/methods/SystemConfigService.js +0 -23
- package/dist/methods/TimeConsuming.d.ts +0 -6
- package/dist/methods/TimeConsuming.js +0 -9
- package/dist/methods/TimeConsumingService.d.ts +0 -5
- package/dist/methods/TimeConsumingService.js +0 -9
- package/dist/methods/UserManagerService.js +0 -312
- package/dist/types.d.ts +0 -412
- package/dist/types.js +0 -61
- package/dist/vite-plugin-smartbi/index.d.ts +0 -36
- package/dist/vite-plugin-smartbi/index.js +0 -107
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
interface IResult {
|
|
3
|
+
cells: Array<any>;
|
|
4
|
+
axes: Array<any>;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
interface RunningInfoItem {
|
|
8
|
+
name: string;
|
|
9
|
+
startTime: number;
|
|
10
|
+
cost: number;
|
|
11
|
+
}
|
|
12
|
+
interface RunningInfo {
|
|
13
|
+
currentItem: RunningInfoItem;
|
|
14
|
+
currentItemFinished: boolean;
|
|
15
|
+
allItems: RunningInfoItem[];
|
|
16
|
+
asyncInfos: RunningInfo[];
|
|
17
|
+
resId?: string;
|
|
18
|
+
startTime: number;
|
|
19
|
+
isFinished: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface IParameter {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
interface Parameter {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
alias?: string;
|
|
30
|
+
desc?: string;
|
|
31
|
+
type?: string;
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
componentType?: string;
|
|
34
|
+
displayValue?: string;
|
|
35
|
+
value?: string;
|
|
36
|
+
}
|
|
37
|
+
interface NameValuePair {
|
|
38
|
+
name: string;
|
|
39
|
+
value: string;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
interface ViewMetaData {
|
|
43
|
+
clientId?: string;
|
|
44
|
+
totalRowCount: number;
|
|
45
|
+
fieldNames: string[];
|
|
46
|
+
fieldTypes: string[];
|
|
47
|
+
}
|
|
48
|
+
type PropertyName = 'alias' | 'desc' | 'dataType' | 'dataFormat' | 'orderby' | 'transformRule';
|
|
49
|
+
declare const PropertyName: {
|
|
50
|
+
ALIAS: string;
|
|
51
|
+
DESC: string;
|
|
52
|
+
DATA_TYPE: string;
|
|
53
|
+
DATA_FORMAT: string;
|
|
54
|
+
ORDER_BY: string;
|
|
55
|
+
TRANSFORM_RULE: string;
|
|
56
|
+
};
|
|
57
|
+
interface CatalogElement {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
alias: string;
|
|
61
|
+
desc?: string;
|
|
62
|
+
type: string;
|
|
63
|
+
hasChild: boolean;
|
|
64
|
+
order: number;
|
|
65
|
+
extended?: string;
|
|
66
|
+
hiddenInBrowse: boolean;
|
|
67
|
+
showOnPC: boolean;
|
|
68
|
+
showOnPad: boolean;
|
|
69
|
+
showOnPhone: boolean;
|
|
70
|
+
customImage?: string;
|
|
71
|
+
customMobileImage?: string;
|
|
72
|
+
mobileImageId?: string;
|
|
73
|
+
detectChild: boolean;
|
|
74
|
+
lastModifiedDate?: Date;
|
|
75
|
+
fullPath?: string;
|
|
76
|
+
parentId?: string;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}
|
|
79
|
+
interface ResourcePermission {
|
|
80
|
+
permissions: ResourcePermissionItem[];
|
|
81
|
+
inherited: boolean;
|
|
82
|
+
owner: IAssignee;
|
|
83
|
+
resid: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface ICatalogSearchResult {
|
|
87
|
+
catalogElement?: any;
|
|
88
|
+
idPath?: string[];
|
|
89
|
+
aliasPath?: string[];
|
|
90
|
+
}
|
|
91
|
+
type AccessType = 'REF' | 'READ' | 'WRITE';
|
|
92
|
+
declare const AccessType: {
|
|
93
|
+
REF: string;
|
|
94
|
+
READ: string;
|
|
95
|
+
WRITE: string;
|
|
96
|
+
};
|
|
97
|
+
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';
|
|
98
|
+
declare const CatalogElementType: {
|
|
99
|
+
FOLDER: string;
|
|
100
|
+
SIMPLE_REPORT: string;
|
|
101
|
+
ANALYSIS_REPORT: string;
|
|
102
|
+
COMBINED_QUERY: string;
|
|
103
|
+
INSIGHT: string;
|
|
104
|
+
OLAP_REPORT: string;
|
|
105
|
+
DASHBOARD: string;
|
|
106
|
+
SMARTBIX_PAGE: string;
|
|
107
|
+
DATASET: string;
|
|
108
|
+
VISUAL: string;
|
|
109
|
+
SQL: string;
|
|
110
|
+
PROCEDURE: string;
|
|
111
|
+
NATIVE_SQL: string;
|
|
112
|
+
JAVA: string;
|
|
113
|
+
SMARTBIX_DATASET: string;
|
|
114
|
+
AUGMENTED_DATASET: string;
|
|
115
|
+
BUSINESS_VIEW: string;
|
|
116
|
+
BUSINESS_SUBJECT: string;
|
|
117
|
+
BUSINESS_QUERY: string;
|
|
118
|
+
SPREADSHEET_REPORT: string;
|
|
119
|
+
WEB_SPREADSHEET_REPORT: string;
|
|
120
|
+
DATA_PROCESS: string;
|
|
121
|
+
ETL_AUTOMATION: string;
|
|
122
|
+
JOB_FLOW: string;
|
|
123
|
+
DATA_MINING: string;
|
|
124
|
+
URL_LINK: string;
|
|
125
|
+
EXCEL_IMPORT_TEMPLATE: string;
|
|
126
|
+
TXT_QUERY_OBJECT: string;
|
|
127
|
+
TXT_DATA_SOURCE: string;
|
|
128
|
+
SCHEMA: string;
|
|
129
|
+
OLD_DATASET: string;
|
|
130
|
+
};
|
|
131
|
+
interface IAssignee {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
alias: string;
|
|
135
|
+
type: string;
|
|
136
|
+
}
|
|
137
|
+
interface ResourcePermissionItem {
|
|
138
|
+
assignee: IAssignee;
|
|
139
|
+
purviewType: string;
|
|
140
|
+
permissionApplyToScope: string;
|
|
141
|
+
groupDescend: boolean;
|
|
142
|
+
id: string;
|
|
143
|
+
fromresid: string;
|
|
144
|
+
expiresTime: string;
|
|
145
|
+
sourceUser?: any;
|
|
146
|
+
}
|
|
147
|
+
type PermissionType = 'NONE' | 'REF' | 'READ' | 'WRITE' | 'OVERVIEW' | 'GRANT';
|
|
148
|
+
type PermissionDescendType = 'NONE' | 'FOLDER_ONLY' | 'FILE_ONLY' | 'FOLDER_FILE';
|
|
149
|
+
type HiddenInBrowse = boolean;
|
|
150
|
+
interface IClientCombinedReportView extends ClientReportView {
|
|
151
|
+
queryClientId?: string;
|
|
152
|
+
condPanelClientId?: string;
|
|
153
|
+
paramPanelId?: string;
|
|
154
|
+
}
|
|
155
|
+
interface ReportData {
|
|
156
|
+
matrix: any[][];
|
|
157
|
+
}
|
|
158
|
+
interface CustomFilterDataBean {
|
|
159
|
+
fieldId: string;
|
|
160
|
+
operator1: string;
|
|
161
|
+
value1: string;
|
|
162
|
+
groupType: string;
|
|
163
|
+
operator2?: string;
|
|
164
|
+
value2?: string;
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
}
|
|
167
|
+
type AggregateType = 'SUM' | 'MIN' | 'MAX' | 'COUNT' | 'DISTINCT_COUNT' | 'AVG' | 'NULL';
|
|
168
|
+
type OrderType = 'ASC' | 'DESC' | 'NONE';
|
|
169
|
+
type OperatorType = '=' | '>' | '<';
|
|
170
|
+
interface DataSource {
|
|
171
|
+
id: string;
|
|
172
|
+
name: string;
|
|
173
|
+
alias?: string;
|
|
174
|
+
desc?: string;
|
|
175
|
+
user: string;
|
|
176
|
+
password?: string;
|
|
177
|
+
driverType: DriverType | string;
|
|
178
|
+
driver: string;
|
|
179
|
+
url: string;
|
|
180
|
+
maxConnection: number;
|
|
181
|
+
dbCharset?: string;
|
|
182
|
+
validationQuery?: string;
|
|
183
|
+
transactionIsolation: number;
|
|
184
|
+
validationQueryMethod: number;
|
|
185
|
+
authenticationType?: string;
|
|
186
|
+
driverCatalog?: string;
|
|
187
|
+
}
|
|
188
|
+
type JDBCTableType = 'TABLE' | 'VIEW' | 'PROC' | 'MACRO';
|
|
189
|
+
interface JDBCTable {
|
|
190
|
+
catalog?: string;
|
|
191
|
+
schema?: string;
|
|
192
|
+
name: string;
|
|
193
|
+
desc?: string;
|
|
194
|
+
type: JDBCTableType;
|
|
195
|
+
}
|
|
196
|
+
interface BasicField {
|
|
197
|
+
id: string;
|
|
198
|
+
name: string;
|
|
199
|
+
alias?: string;
|
|
200
|
+
desc?: string;
|
|
201
|
+
dataType: string;
|
|
202
|
+
dataFormat?: string;
|
|
203
|
+
}
|
|
204
|
+
interface SDKCellData {
|
|
205
|
+
type?: string;
|
|
206
|
+
isNull?: boolean;
|
|
207
|
+
displayValue?: string;
|
|
208
|
+
stringValue?: string;
|
|
209
|
+
intValue?: number;
|
|
210
|
+
doubleValue?: number;
|
|
211
|
+
dateValue?: Date;
|
|
212
|
+
longValue?: number;
|
|
213
|
+
byteArrayValue?: Uint8Array | string | string[];
|
|
214
|
+
extendValue?: string;
|
|
215
|
+
useTransformRule?: boolean;
|
|
216
|
+
bigIntValue?: bigint;
|
|
217
|
+
bigDecimalValue?: number;
|
|
218
|
+
}
|
|
219
|
+
interface SDKGridData {
|
|
220
|
+
totalRowsCount: number;
|
|
221
|
+
stringHeaders?: string[];
|
|
222
|
+
columnNames?: string[];
|
|
223
|
+
columnLabels?: string[];
|
|
224
|
+
data?: SDKCellData[][];
|
|
225
|
+
}
|
|
226
|
+
type DriverType = 'KINGBASE' | 'ODBC' | 'MSSQL' | 'MYSQL' | 'ORACLE' | 'DB2_400' | 'DB2' | 'DB2_V9' | 'INFORMIX' | 'SYBASE' | 'TERADATA' | 'TERADATA_V12' | 'ACCESS' | 'EXCEL' | 'POSTGRESQL' | 'GREENPLUM' | 'DEFAULT';
|
|
227
|
+
interface SystemConfig {
|
|
228
|
+
key: string;
|
|
229
|
+
value: string;
|
|
230
|
+
longValue?: string;
|
|
231
|
+
[key: string]: any;
|
|
232
|
+
}
|
|
233
|
+
interface IDocument {
|
|
234
|
+
id: string;
|
|
235
|
+
name: string;
|
|
236
|
+
alias?: string;
|
|
237
|
+
cnAlias?: string;
|
|
238
|
+
enAlias?: string;
|
|
239
|
+
twAlias?: string;
|
|
240
|
+
desc?: string;
|
|
241
|
+
cnDesc?: string;
|
|
242
|
+
enDesc?: string;
|
|
243
|
+
twDesc?: string;
|
|
244
|
+
type: string;
|
|
245
|
+
path?: string;
|
|
246
|
+
content?: string;
|
|
247
|
+
refid?: string[];
|
|
248
|
+
affid?: string[];
|
|
249
|
+
flag?: string;
|
|
250
|
+
docOrder?: number;
|
|
251
|
+
lastModified?: string;
|
|
252
|
+
indexLastModified?: string;
|
|
253
|
+
extended?: string;
|
|
254
|
+
[key: string]: any;
|
|
255
|
+
}
|
|
256
|
+
interface DocumentTreeNode extends IDocument {
|
|
257
|
+
children?: DocumentTreeNode[];
|
|
258
|
+
parent?: DocumentTreeNode;
|
|
259
|
+
[key: string]: any;
|
|
260
|
+
}
|
|
261
|
+
interface CategoryResource {
|
|
262
|
+
id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
alias: string;
|
|
265
|
+
desc: string;
|
|
266
|
+
type: string;
|
|
267
|
+
}
|
|
268
|
+
interface CalcField {
|
|
269
|
+
id: string;
|
|
270
|
+
name: string;
|
|
271
|
+
alias?: string;
|
|
272
|
+
desc?: string;
|
|
273
|
+
expression: string;
|
|
274
|
+
dataType: string;
|
|
275
|
+
dataFormat?: string;
|
|
276
|
+
condition?: string;
|
|
277
|
+
isInGroup?: string;
|
|
278
|
+
isBuildSql?: boolean;
|
|
279
|
+
[key: string]: any;
|
|
280
|
+
}
|
|
281
|
+
interface TableField {
|
|
282
|
+
id: string;
|
|
283
|
+
name: string;
|
|
284
|
+
dateType: string;
|
|
285
|
+
columnSize: number;
|
|
286
|
+
decimalDigits: number;
|
|
287
|
+
[key: string]: any;
|
|
288
|
+
}
|
|
289
|
+
interface GraphicReport {
|
|
290
|
+
clientId: string;
|
|
291
|
+
width: string;
|
|
292
|
+
height: string;
|
|
293
|
+
flashBasePath: string;
|
|
294
|
+
parameterPanelId: string;
|
|
295
|
+
params: Parameter[];
|
|
296
|
+
serviceName: string;
|
|
297
|
+
timeConsuming: any;
|
|
298
|
+
[key: string]: any;
|
|
299
|
+
}
|
|
300
|
+
interface User {
|
|
301
|
+
id: string;
|
|
302
|
+
name: string;
|
|
303
|
+
alias?: string;
|
|
304
|
+
password?: string;
|
|
305
|
+
desc?: string;
|
|
306
|
+
enabled: string;
|
|
307
|
+
cellPhoneNumber?: string;
|
|
308
|
+
emailAddress?: string;
|
|
309
|
+
validityType?: string;
|
|
310
|
+
validityStartTime?: Date;
|
|
311
|
+
validityEndTime?: Date;
|
|
312
|
+
pwdLastModifyTime?: Date;
|
|
313
|
+
lastLoginTime?: Date;
|
|
314
|
+
assignedGroups?: any[];
|
|
315
|
+
assignedRoles?: any[];
|
|
316
|
+
createTime?: Date;
|
|
317
|
+
updateTime?: Date;
|
|
318
|
+
cellPhoneDecoded?: boolean;
|
|
319
|
+
emailDecoded?: boolean;
|
|
320
|
+
[key: string]: any;
|
|
321
|
+
}
|
|
322
|
+
interface Role {
|
|
323
|
+
id: string;
|
|
324
|
+
name: string;
|
|
325
|
+
alias?: string;
|
|
326
|
+
desc?: string;
|
|
327
|
+
systemId?: string;
|
|
328
|
+
groupId?: string;
|
|
329
|
+
componentDefine?: string;
|
|
330
|
+
creatorGroup?: any;
|
|
331
|
+
groupToRole?: any[];
|
|
332
|
+
functions?: any[];
|
|
333
|
+
assignedUsers?: any[];
|
|
334
|
+
enabled?: string;
|
|
335
|
+
[key: string]: any;
|
|
336
|
+
}
|
|
337
|
+
interface Department {
|
|
338
|
+
id: string;
|
|
339
|
+
name: string;
|
|
340
|
+
alias?: string;
|
|
341
|
+
desc?: string;
|
|
342
|
+
orgId?: string;
|
|
343
|
+
departmentCode?: string;
|
|
344
|
+
systemId?: string;
|
|
345
|
+
createTime?: Date;
|
|
346
|
+
updateTime?: Date;
|
|
347
|
+
enabled?: string;
|
|
348
|
+
parentGroup?: Department;
|
|
349
|
+
subGroups?: Department[];
|
|
350
|
+
assignedUsers?: User[];
|
|
351
|
+
groupToRole?: any[];
|
|
352
|
+
createdRoles?: Role[];
|
|
353
|
+
[key: string]: any;
|
|
354
|
+
}
|
|
355
|
+
interface FunctionPermission {
|
|
356
|
+
id: string;
|
|
357
|
+
name: string;
|
|
358
|
+
alias?: string;
|
|
359
|
+
desc?: string;
|
|
360
|
+
systemId?: string;
|
|
361
|
+
isBuiltIn?: string;
|
|
362
|
+
order?: number;
|
|
363
|
+
parentFunction?: FunctionPermission;
|
|
364
|
+
subFunctions?: FunctionPermission[];
|
|
365
|
+
rolesToFunction?: Role[];
|
|
366
|
+
[key: string]: any;
|
|
367
|
+
}
|
|
368
|
+
interface ExtensionAttribute {
|
|
369
|
+
id: string;
|
|
370
|
+
key: string;
|
|
371
|
+
value: string;
|
|
372
|
+
longValue?: string;
|
|
373
|
+
[key: string]: any;
|
|
374
|
+
}
|
|
375
|
+
interface AllExportTypeMap {
|
|
376
|
+
EXCEL: 'EXCEL';
|
|
377
|
+
TXT: 'TXT';
|
|
378
|
+
CSV: 'CSV';
|
|
379
|
+
WORD: 'WORD';
|
|
380
|
+
WORD2003: 'WORD2003';
|
|
381
|
+
POWERPOINT: 'POWERPOINT';
|
|
382
|
+
PDF: 'PDF';
|
|
383
|
+
PNG: 'PNG';
|
|
384
|
+
EXCEL2007: 'EXCEL2007';
|
|
385
|
+
LIST_EXCEL: 'LIST_EXCEL';
|
|
386
|
+
HTML: 'HTML';
|
|
387
|
+
}
|
|
388
|
+
type ReportExportType = keyof Pick<AllExportTypeMap, 'EXCEL' | 'TXT' | 'CSV'>;
|
|
389
|
+
type OfficeReportExportType = keyof Pick<AllExportTypeMap, 'WORD' | 'WORD2003' | 'POWERPOINT' | 'PDF'>;
|
|
390
|
+
type SSReportExportType = keyof Pick<AllExportTypeMap, 'PDF' | 'PNG' | 'WORD' | 'EXCEL2007' | 'LIST_EXCEL' | 'EXCEL' | 'HTML' | 'CSV'>;
|
|
391
|
+
type JSONArray = any[];
|
|
392
|
+
interface ReportBean {
|
|
393
|
+
params?: any[];
|
|
394
|
+
fields?: any[];
|
|
395
|
+
clientConfig?: string;
|
|
396
|
+
}
|
|
397
|
+
interface ClientReportView {
|
|
398
|
+
clientId?: string;
|
|
399
|
+
reportBean?: ReportBean;
|
|
400
|
+
}
|
|
401
|
+
interface ICombinedReport {
|
|
402
|
+
currentReportName: string;
|
|
403
|
+
rowsPerPage: number;
|
|
404
|
+
parameters?: any[];
|
|
405
|
+
fields?: any[];
|
|
406
|
+
[key: string]: any;
|
|
407
|
+
}
|
|
408
|
+
//#endregion
|
|
409
|
+
export { OrderType as A, RunningInfo as B, IParameter as C, NameValuePair as D, JSONArray as E, ReportData as F, User as G, SSReportExportType as H, ReportExportType as I, ViewMetaData as K, ResourcePermission as L, PermissionDescendType as M, PermissionType as N, OfficeReportExportType as O, PropertyName as P, ResourcePermissionItem as R, IDocument as S, JDBCTable as T, SystemConfig as U, SDKGridData as V, TableField as W, GraphicReport as _, CalcField as a, IClientCombinedReportView as b, CategoryResource as c, DataSource as d, Department as f, FunctionPermission as g, ExtensionAttribute as h, BasicField as i, Parameter as j, OperatorType as k, ClientReportView as l, DriverType as m, AggregateType as n, CatalogElement as o, DocumentTreeNode as p, AllExportTypeMap as r, CatalogElementType as s, AccessType as t, CustomFilterDataBean as u, HiddenInBrowse as v, IResult as w, ICombinedReport as x, ICatalogSearchResult as y, Role as z };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as WebProjectConfig } from "../common-Cnq1SoER.js";
|
|
2
|
+
import { PluginOption } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/vite-plugin/vite-plugin-smartbi.d.ts
|
|
5
|
+
type VitePluginSmartbiOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* 输出目录
|
|
8
|
+
*/
|
|
9
|
+
output?: string;
|
|
10
|
+
/**
|
|
11
|
+
* html重命名
|
|
12
|
+
*/
|
|
13
|
+
indexRename?: string;
|
|
14
|
+
/**
|
|
15
|
+
* vision到html中间的路径
|
|
16
|
+
*/
|
|
17
|
+
appendPath?: string;
|
|
18
|
+
} & WebProjectConfig;
|
|
19
|
+
declare const VitePluginSmartbi: (config: VitePluginSmartbiOptions) => PluginOption;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { VitePluginSmartbi, VitePluginSmartbiOptions };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { i as makeWebDir, n as info, r as success, t as error } from "../console-BJttltN4.js";
|
|
2
|
+
import { copy, mkdirp, remove } from "fs-extra";
|
|
3
|
+
import { rename } from "node:fs/promises";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { exec } from "node:child_process";
|
|
6
|
+
|
|
7
|
+
//#region src/vite-plugin/vite-plugin-smartbi.ts
|
|
8
|
+
const VitePluginSmartbi = (config) => {
|
|
9
|
+
const { output = "web", appendPath, indexRename } = config;
|
|
10
|
+
console.log(appendPath);
|
|
11
|
+
return {
|
|
12
|
+
name: "vite-plugin-smartbi",
|
|
13
|
+
apply: "build",
|
|
14
|
+
enforce: "post",
|
|
15
|
+
writeBundle(options, _bundle) {
|
|
16
|
+
success("开始打包");
|
|
17
|
+
console.log(_bundle);
|
|
18
|
+
const cwd = process.cwd();
|
|
19
|
+
const outputPath = join(cwd, output);
|
|
20
|
+
const visionDir = resolve(outputPath, "vision" + (appendPath ? "/" + appendPath : ""));
|
|
21
|
+
const outputDir = options.dir;
|
|
22
|
+
info("ext输出路径:" + outputPath);
|
|
23
|
+
remove(outputPath).then(() => {
|
|
24
|
+
info("清除:ext目录");
|
|
25
|
+
return makeWebDir(outputPath, config);
|
|
26
|
+
}).then(() => {
|
|
27
|
+
info("创建:ext目录");
|
|
28
|
+
return mkdirp(visionDir);
|
|
29
|
+
}).then(() => {
|
|
30
|
+
info("创建:vision目录");
|
|
31
|
+
return copy(outputDir, visionDir);
|
|
32
|
+
}).then(() => {
|
|
33
|
+
info("复制:vision目录文件");
|
|
34
|
+
info(visionDir);
|
|
35
|
+
if (indexRename) return rename(visionDir + "/index.html", visionDir + "/" + indexRename);
|
|
36
|
+
else return Promise.resolve();
|
|
37
|
+
}).then(() => {
|
|
38
|
+
exec("ant", { cwd }, (err, stdout, stderr) => {
|
|
39
|
+
if (err) {
|
|
40
|
+
error(stderr);
|
|
41
|
+
error("构建失败:请检查是否有java和ant环境,搜索Apache Ant部署环境");
|
|
42
|
+
this.error(stderr);
|
|
43
|
+
} else {
|
|
44
|
+
success(stdout);
|
|
45
|
+
success("ext构建完成");
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { VitePluginSmartbi };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as WebProjectConfig } from "../common-Cnq1SoER.js";
|
|
2
|
+
import { PluginOption } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/vite-plugin/vite-plugin-smartbix.d.ts
|
|
5
|
+
type VitePluginSmartbiXOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* 扩展根目录
|
|
8
|
+
*/
|
|
9
|
+
libRoot?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 输出路径
|
|
12
|
+
*/
|
|
13
|
+
output?: string;
|
|
14
|
+
} & WebProjectConfig;
|
|
15
|
+
declare const vitePluginSmartbiX: (config: VitePluginSmartbiXOptions) => PluginOption;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { VitePluginSmartbiXOptions, vitePluginSmartbiX };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { i as makeWebDir, n as info, r as success, t as error } from "../console-BJttltN4.js";
|
|
2
|
+
import { pathExists } from "fs-extra";
|
|
3
|
+
import nodePath, { join } from "node:path";
|
|
4
|
+
import { exec } from "node:child_process";
|
|
5
|
+
import resolve$1 from "@rollup/plugin-node-resolve";
|
|
6
|
+
import terser from "@rollup/plugin-terser";
|
|
7
|
+
import vue from "rollup-plugin-vue";
|
|
8
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
9
|
+
import { readdirSync } from "node:fs";
|
|
10
|
+
import { rollup } from "rollup";
|
|
11
|
+
|
|
12
|
+
//#region src/vite-plugin/vite-plugin-smartbix.ts
|
|
13
|
+
function getAllFiles(dirPath, arrayOfFiles = []) {
|
|
14
|
+
let files = readdirSync(dirPath, { withFileTypes: true });
|
|
15
|
+
arrayOfFiles = arrayOfFiles || [];
|
|
16
|
+
files.forEach((file) => {
|
|
17
|
+
if (file.isDirectory()) arrayOfFiles = getAllFiles(join(dirPath, file.name), arrayOfFiles);
|
|
18
|
+
else arrayOfFiles.push(join(dirPath, file.name));
|
|
19
|
+
});
|
|
20
|
+
return arrayOfFiles;
|
|
21
|
+
}
|
|
22
|
+
const vitePluginSmartbiX = (config) => {
|
|
23
|
+
info("vitePluginSmartbiX");
|
|
24
|
+
console.log("vitePluginSmartbiX");
|
|
25
|
+
const { libRoot = "src/addExtenders", output = "web" } = config;
|
|
26
|
+
const libRootPath = nodePath.join(process.cwd(), libRoot);
|
|
27
|
+
const outputPath = nodePath.join(process.cwd(), output);
|
|
28
|
+
const run = (ids) => {
|
|
29
|
+
makeWebDir(outputPath, config).then(() => {
|
|
30
|
+
console.log("创建完成");
|
|
31
|
+
return pathExists(libRootPath);
|
|
32
|
+
}).then((value) => {
|
|
33
|
+
if (value) getAllFiles(libRootPath).filter((file) => file.endsWith(".js")).forEach((id) => {
|
|
34
|
+
const arr = id.replace(libRootPath + "/", "").replace(".js", "").split("/");
|
|
35
|
+
const name = `addExtenders/${arr[arr.length - 1] === "index" ? arr[arr.length - 2] : arr[arr.length - 1]}`;
|
|
36
|
+
rollup({
|
|
37
|
+
input: id,
|
|
38
|
+
external: ["vue"],
|
|
39
|
+
plugins: [
|
|
40
|
+
resolve$1({
|
|
41
|
+
browser: true,
|
|
42
|
+
extensions: [".vue", ".js"]
|
|
43
|
+
}),
|
|
44
|
+
commonjs(),
|
|
45
|
+
vue({ isProduction: true }),
|
|
46
|
+
terser()
|
|
47
|
+
]
|
|
48
|
+
}).then((bundle) => {
|
|
49
|
+
bundle.write({
|
|
50
|
+
dir: nodePath.join(output, "vision/dist"),
|
|
51
|
+
format: "system",
|
|
52
|
+
name,
|
|
53
|
+
sourcemap: true,
|
|
54
|
+
globals: {
|
|
55
|
+
"vue": "Vue",
|
|
56
|
+
"axios": "axios"
|
|
57
|
+
},
|
|
58
|
+
entryFileNames: name + ".js"
|
|
59
|
+
}).finally(() => {
|
|
60
|
+
bundle.close();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return null;
|
|
64
|
+
});
|
|
65
|
+
else error("请检查libRoot目录是否存在:" + libRoot);
|
|
66
|
+
success("编译完成");
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
name: "vite-plugin-smartbi-x",
|
|
71
|
+
enforce: "post",
|
|
72
|
+
buildStart(options) {
|
|
73
|
+
info("buildStart");
|
|
74
|
+
run();
|
|
75
|
+
},
|
|
76
|
+
writeBundle(options, _bundle) {
|
|
77
|
+
success("开始打包");
|
|
78
|
+
const cwd = process.cwd();
|
|
79
|
+
info("ext输出路径:" + outputPath);
|
|
80
|
+
exec("ant", { cwd }, (err, stdout, stderr) => {
|
|
81
|
+
if (err) {
|
|
82
|
+
error(stderr);
|
|
83
|
+
error("构建失败:请检查是否有java和ant环境,搜索Apache Ant部署环境");
|
|
84
|
+
this.error(stderr);
|
|
85
|
+
} else {
|
|
86
|
+
success(stdout);
|
|
87
|
+
success("ext构建完成");
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
handleHotUpdate(ctx) {
|
|
92
|
+
if (ctx.file.startsWith(libRootPath)) {
|
|
93
|
+
info("handleHotUpdate");
|
|
94
|
+
run();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
export { vitePluginSmartbiX };
|