x-essential-lib 0.2.7 → 0.2.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/components.d.ts +20 -0
- package/dist/composables.d.ts +25 -0
- package/dist/index.d.ts +5 -344
- package/dist/index.js +338 -283
- package/dist/permission.d.ts +208 -0
- package/dist/stores.d.ts +3 -0
- package/dist/utils.d.ts +74 -0
- package/package.json +3 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue'
|
|
2
|
+
|
|
3
|
+
export declare const XConfirmDlg: DefineComponent<{}, {}, unknown>
|
|
4
|
+
|
|
5
|
+
export declare const XLoading: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
zIndex: {
|
|
8
|
+
type: Number
|
|
9
|
+
default: 1
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{},
|
|
13
|
+
unknown
|
|
14
|
+
>
|
|
15
|
+
|
|
16
|
+
export declare const XMessage: DefineComponent<{}, {}, unknown>
|
|
17
|
+
|
|
18
|
+
export declare const XPromptDlg: DefineComponent<{}, {}, unknown>
|
|
19
|
+
|
|
20
|
+
export declare const XWaitDlg: DefineComponent<{}, {}, unknown>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export declare function useColor(): {
|
|
4
|
+
primaryColor: ComputedRef<string>
|
|
5
|
+
secondaryColor: ComputedRef<string>
|
|
6
|
+
backgroundColor0: ComputedRef<string>
|
|
7
|
+
backgroundColor1: ComputedRef<string>
|
|
8
|
+
backgroundColor2: ComputedRef<string>
|
|
9
|
+
highlightColor: ComputedRef<string>
|
|
10
|
+
borderColor: ComputedRef<string>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare function useSystem(): {
|
|
14
|
+
dark: ComputedRef<boolean>
|
|
15
|
+
routeTransName: Ref<string>
|
|
16
|
+
sysBarAvail: ComputedRef<boolean>
|
|
17
|
+
compactWidth: ComputedRef<string>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare function useViewStack(
|
|
21
|
+
name: string,
|
|
22
|
+
hook?: (params: any) => void
|
|
23
|
+
): {
|
|
24
|
+
open: ComputedRef<boolean>
|
|
25
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,344 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
{
|
|
7
|
-
modelValue: Boolean
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
'update:modelValue'(value: boolean): void
|
|
11
|
-
},
|
|
12
|
-
unknown
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
export declare const XLoading: DefineComponent<
|
|
16
|
-
{
|
|
17
|
-
zIndex: {
|
|
18
|
-
type: Number
|
|
19
|
-
default: 1
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{},
|
|
23
|
-
unknown
|
|
24
|
-
>
|
|
25
|
-
|
|
26
|
-
export declare const XMessage: DefineComponent<{}, {}, unknown>
|
|
27
|
-
|
|
28
|
-
export declare const XPromptDlg: DefineComponent<
|
|
29
|
-
{
|
|
30
|
-
modelValue: Boolean
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
'update:modelValue'(value: boolean): void
|
|
34
|
-
},
|
|
35
|
-
unknown
|
|
36
|
-
>
|
|
37
|
-
|
|
38
|
-
export declare const XWaitDlg: DefineComponent<
|
|
39
|
-
{
|
|
40
|
-
modelValue: Boolean
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
'update:modelValue'(value: boolean): void
|
|
44
|
-
},
|
|
45
|
-
unknown
|
|
46
|
-
>
|
|
47
|
-
|
|
48
|
-
export declare function useColor(): {
|
|
49
|
-
primaryColor: ComputedRef<string>
|
|
50
|
-
secondaryColor: ComputedRef<string>
|
|
51
|
-
backgroundColor0: ComputedRef<string>
|
|
52
|
-
backgroundColor1: ComputedRef<string>
|
|
53
|
-
backgroundColor2: ComputedRef<string>
|
|
54
|
-
highlightColor: ComputedRef<string>
|
|
55
|
-
borderColor: ComputedRef<string>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export declare function useSystem(): {
|
|
59
|
-
dark: ComputedRef<boolean>
|
|
60
|
-
routeTransName: Ref<string>
|
|
61
|
-
sysBarAvail: ComputedRef<boolean>
|
|
62
|
-
compactWidth: ComputedRef<string>
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type OnError = (error: any) => void
|
|
66
|
-
|
|
67
|
-
interface Options {
|
|
68
|
-
baseUrl: string
|
|
69
|
-
onError: OnError
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export declare function createAxios(options: Options): AxiosInstance
|
|
73
|
-
|
|
74
|
-
export declare const eventBus: import('mitt').Emitter<
|
|
75
|
-
Record<import('mitt').EventType, unknown>
|
|
76
|
-
>
|
|
77
|
-
|
|
78
|
-
export declare function waitMs(ms: number): Promise<void>
|
|
79
|
-
|
|
80
|
-
export declare function waitUtil(
|
|
81
|
-
conditionFunc: () => boolean,
|
|
82
|
-
timeout?: number,
|
|
83
|
-
interval?: number
|
|
84
|
-
): Promise<boolean>
|
|
85
|
-
|
|
86
|
-
interface ButtonOptions {
|
|
87
|
-
color?: string
|
|
88
|
-
text?: string
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
interface ConfirmParams {
|
|
92
|
-
title: string
|
|
93
|
-
text: string
|
|
94
|
-
cancel?: ButtonOptions
|
|
95
|
-
confirm?: ButtonOptions
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export declare function openConfirmDlg(
|
|
99
|
-
params: ConfirmParams
|
|
100
|
-
): Promise<boolean | undefined>
|
|
101
|
-
|
|
102
|
-
interface PromptParams {
|
|
103
|
-
title: string
|
|
104
|
-
text?: string
|
|
105
|
-
label?: string
|
|
106
|
-
placeholder?: string
|
|
107
|
-
rules?: ((val: string) => string | boolean)[]
|
|
108
|
-
value?: string
|
|
109
|
-
cancel?: ButtonOptions
|
|
110
|
-
confirm?: ButtonOptions
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export declare function openPromptDlg(params: PromptParams): Promise<any>
|
|
114
|
-
|
|
115
|
-
export declare function openWaitDlg()
|
|
116
|
-
|
|
117
|
-
export declare function closeWaitDlg()
|
|
118
|
-
|
|
119
|
-
export declare function messageError(text: string, timeout?: number)
|
|
120
|
-
|
|
121
|
-
export declare function messageInfo(text: string, timeout?: number)
|
|
122
|
-
|
|
123
|
-
export declare function messageSuccess(text: string, timeout?: number)
|
|
124
|
-
|
|
125
|
-
export declare function messageWarning(text: string, timeout?: number)
|
|
126
|
-
|
|
127
|
-
export declare function appAppear(name: string)
|
|
128
|
-
|
|
129
|
-
export declare const routeTransName: Ref<string>
|
|
130
|
-
|
|
131
|
-
export declare function onBeforeEach(
|
|
132
|
-
to: RouteLocationNormalized,
|
|
133
|
-
from: RouteLocationNormalized,
|
|
134
|
-
next: NavigationGuardNext
|
|
135
|
-
): void
|
|
136
|
-
|
|
137
|
-
export enum Permission {
|
|
138
|
-
//----------------------------------------------------------------------
|
|
139
|
-
// 应用
|
|
140
|
-
//----------------------------------------------------------------------
|
|
141
|
-
|
|
142
|
-
// 后端
|
|
143
|
-
|
|
144
|
-
list_app_group = 'list_app_group',
|
|
145
|
-
create_app_group = 'create_app_group',
|
|
146
|
-
delete_app_group = 'delete_app_group',
|
|
147
|
-
update_app_group = 'update_app_group',
|
|
148
|
-
arrange_app_group = 'arrange_app_group',
|
|
149
|
-
|
|
150
|
-
list_app = 'list_group',
|
|
151
|
-
get_app = 'get_app',
|
|
152
|
-
create_app = 'create_app',
|
|
153
|
-
delete_app = 'delete_app',
|
|
154
|
-
update_app = 'update_app',
|
|
155
|
-
|
|
156
|
-
list_app_release = 'list_app_release',
|
|
157
|
-
get_app_release = 'get_app_release',
|
|
158
|
-
create_app_release = 'create_app_release',
|
|
159
|
-
delete_app_release = 'delete_app_release',
|
|
160
|
-
deploy_app_release = 'deploy_app_release',
|
|
161
|
-
|
|
162
|
-
// 前端
|
|
163
|
-
|
|
164
|
-
open_app_layer = 'open_app_layer',
|
|
165
|
-
open_app = 'open_app',
|
|
166
|
-
|
|
167
|
-
//----------------------------------------------------------------------
|
|
168
|
-
// 计算
|
|
169
|
-
//----------------------------------------------------------------------
|
|
170
|
-
|
|
171
|
-
// 后端
|
|
172
|
-
|
|
173
|
-
list_calc_space = 'list_calc_space',
|
|
174
|
-
get_calc_space = 'get_calc_space',
|
|
175
|
-
create_calc_space = 'create_calc_space',
|
|
176
|
-
delete_calc_space = 'delete_calc_space',
|
|
177
|
-
update_calc_space = 'update_calc_space',
|
|
178
|
-
arrange_calc_space = 'arrange_calc_space',
|
|
179
|
-
|
|
180
|
-
list_func_group = 'list_func_group',
|
|
181
|
-
create_func_group = 'create_func_group',
|
|
182
|
-
delete_func_group = 'delete_func_group',
|
|
183
|
-
update_func_group = 'update_func_group',
|
|
184
|
-
arrange_func_group = 'arrange_func_group',
|
|
185
|
-
|
|
186
|
-
list_func = 'list_func',
|
|
187
|
-
get_func = 'get_func',
|
|
188
|
-
create_func = 'create_func',
|
|
189
|
-
delete_func = 'delete_func',
|
|
190
|
-
update_func = 'update_func',
|
|
191
|
-
debug_func = 'debug_func',
|
|
192
|
-
call_func = 'call_func',
|
|
193
|
-
|
|
194
|
-
list_func_release = 'list_func_release',
|
|
195
|
-
get_func_release = 'get_func_release',
|
|
196
|
-
create_func_release = 'create_func_release',
|
|
197
|
-
delete_func_release = 'delete_func_release',
|
|
198
|
-
deploy_func_release = 'deploy_func_release',
|
|
199
|
-
|
|
200
|
-
list_flow_group = 'list_flow_group',
|
|
201
|
-
create_flow_group = 'create_flow_group',
|
|
202
|
-
delete_flow_group = 'delete_flow_group',
|
|
203
|
-
update_flow_group = 'update_flow_group',
|
|
204
|
-
arrange_flow_group = 'arrange_flow_group',
|
|
205
|
-
|
|
206
|
-
list_flow = 'list_flow',
|
|
207
|
-
get_flow = 'get_flow',
|
|
208
|
-
create_flow = 'create_flow',
|
|
209
|
-
delete_flow = 'delete_flow',
|
|
210
|
-
update_flow = 'update_flow',
|
|
211
|
-
call_flow = 'call_flow',
|
|
212
|
-
|
|
213
|
-
list_flow_release = 'list_flow_release',
|
|
214
|
-
get_flow_release = 'get_flow_release',
|
|
215
|
-
create_flow_release = 'create_flow_release',
|
|
216
|
-
delete_flow_release = 'delete_flow_release',
|
|
217
|
-
deploy_flow_release = 'deploy_flow_release',
|
|
218
|
-
|
|
219
|
-
list_task = 'list_task',
|
|
220
|
-
get_task = 'get_task',
|
|
221
|
-
create_task = 'create_task',
|
|
222
|
-
delete_task = 'delete_task',
|
|
223
|
-
update_task = 'update_task',
|
|
224
|
-
call_task = 'call_task',
|
|
225
|
-
|
|
226
|
-
// 前端
|
|
227
|
-
|
|
228
|
-
open_calc_layer = 'open_calc_layer',
|
|
229
|
-
|
|
230
|
-
//----------------------------------------------------------------------
|
|
231
|
-
// 数据
|
|
232
|
-
//----------------------------------------------------------------------
|
|
233
|
-
|
|
234
|
-
list_db_space = 'list_db_space',
|
|
235
|
-
get_db_space = 'get_db_space',
|
|
236
|
-
create_db_space = 'create_db_space',
|
|
237
|
-
delete_db_space = 'delete_db_space',
|
|
238
|
-
update_db_space = 'update_db_space',
|
|
239
|
-
arrange_db_space = 'arrange_db_space',
|
|
240
|
-
|
|
241
|
-
list_model_group = 'list_model_group',
|
|
242
|
-
create_model_group = 'create_model_group',
|
|
243
|
-
delete_model_group = 'delete_model_group',
|
|
244
|
-
update_model_group = 'update_model_group',
|
|
245
|
-
arrange_model_group = 'arrange_model_group',
|
|
246
|
-
|
|
247
|
-
list_model = 'list_model',
|
|
248
|
-
get_model = 'get_model',
|
|
249
|
-
create_model = 'create_model',
|
|
250
|
-
delete_model = 'delete_model',
|
|
251
|
-
update_model = 'update_model',
|
|
252
|
-
|
|
253
|
-
get_model_data = 'get_model_data',
|
|
254
|
-
create_model_data = 'create_model_data',
|
|
255
|
-
delete_model_data = 'delete_model_data',
|
|
256
|
-
update_model_data = 'update_model_data',
|
|
257
|
-
|
|
258
|
-
get_graph = 'get_graph',
|
|
259
|
-
update_graph = 'update_graph',
|
|
260
|
-
|
|
261
|
-
list_change = 'list_change',
|
|
262
|
-
apply_change = 'apply_change',
|
|
263
|
-
|
|
264
|
-
// 前端
|
|
265
|
-
|
|
266
|
-
open_data_layer = 'open_data_layer',
|
|
267
|
-
|
|
268
|
-
//----------------------------------------------------------------------
|
|
269
|
-
// 资料
|
|
270
|
-
//----------------------------------------------------------------------
|
|
271
|
-
|
|
272
|
-
// 后端
|
|
273
|
-
|
|
274
|
-
list_asset_space = 'list_asset_space',
|
|
275
|
-
get_asset_space = 'get_asset_space',
|
|
276
|
-
create_asset_space = 'create_asset_space',
|
|
277
|
-
delete_asset_space = 'delete_asset_space',
|
|
278
|
-
update_asset_space = 'update_asset_space',
|
|
279
|
-
arrange_asset_space = 'arrange_asset_space',
|
|
280
|
-
|
|
281
|
-
list_dir = 'list_dir',
|
|
282
|
-
create_dir = 'create_dir',
|
|
283
|
-
delete_dir = 'delete_dir',
|
|
284
|
-
update_dir = 'update_dir',
|
|
285
|
-
move_dir = 'move_dir',
|
|
286
|
-
|
|
287
|
-
list_asset = 'list_asset',
|
|
288
|
-
get_asset = 'get_asset',
|
|
289
|
-
create_asset = 'create_asset',
|
|
290
|
-
delete_asset = 'delete_asset',
|
|
291
|
-
update_asset = 'update_asset',
|
|
292
|
-
move_asset = 'move_asset',
|
|
293
|
-
|
|
294
|
-
// 后端
|
|
295
|
-
|
|
296
|
-
open_asset_layer = 'open_asset_layer',
|
|
297
|
-
|
|
298
|
-
//----------------------------------------------------------------------
|
|
299
|
-
// 组织
|
|
300
|
-
//----------------------------------------------------------------------
|
|
301
|
-
|
|
302
|
-
// 后端
|
|
303
|
-
|
|
304
|
-
list_org_member = 'list_org_member',
|
|
305
|
-
add_org_member = 'add_org_member',
|
|
306
|
-
remove_org_member = 'remove_org_member',
|
|
307
|
-
update_org_member = 'update_org_member',
|
|
308
|
-
|
|
309
|
-
list_org_role = 'list_org_role',
|
|
310
|
-
get_org_role = 'get_org_role',
|
|
311
|
-
create_org_role = 'create_org_role',
|
|
312
|
-
delete_org_role = 'delete_org_role',
|
|
313
|
-
update_org_role = 'update_org_role',
|
|
314
|
-
arrange_org_role = 'arrange_org_role',
|
|
315
|
-
|
|
316
|
-
get_org_structure = 'get_org_structure',
|
|
317
|
-
update_org_structure = 'update_org_structure',
|
|
318
|
-
|
|
319
|
-
//----------------------------------------------------------------------
|
|
320
|
-
// 过滤
|
|
321
|
-
//----------------------------------------------------------------------
|
|
322
|
-
|
|
323
|
-
filter_model = 'filter_model'
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
type InstanceTree = {
|
|
327
|
-
[key: string]: InstanceTree
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
type PermissionObject = {
|
|
331
|
-
includes: InstanceTree
|
|
332
|
-
excludes: InstanceTree
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
type PermissionObjects = {
|
|
336
|
-
[key: string]: PermissionObject
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
export declare function setPermissionObject(permissonObjects: PermissionObjects)
|
|
340
|
-
|
|
341
|
-
export declare function verifyPermission(
|
|
342
|
-
permission: Permission,
|
|
343
|
-
instance: string | undefined
|
|
344
|
-
): boolean
|
|
1
|
+
export * from './components'
|
|
2
|
+
export * from './composables'
|
|
3
|
+
export * from './permission'
|
|
4
|
+
export * from './stores'
|
|
5
|
+
export * from './utils'
|