x-essential-lib 0.9.22 → 0.9.24
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/en.lh9n40a2.js +2 -0
- package/dist/i18n-en.ioic6dni.js +99 -0
- package/dist/i18n-zhHans.jmqbtwe8.js +99 -0
- package/dist/index.js +891 -1001
- package/dist/utils/type.d.ts +1 -0
- package/dist/vendor.nojbp8i6.js +203 -0
- package/dist/zhHans.k0vi0ko0.js +2 -0
- package/package.json +9 -6
- package/dist/i18n-en.i529k39u.js +0 -115
- package/dist/i18n-zhHans.mx7z5jvj.js +0 -115
- package/dist/vendor.l8hyykei.js +0 -226
package/dist/index.js
CHANGED
|
@@ -1,1006 +1,896 @@
|
|
|
1
|
-
(function(){
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
const jt = (function() {
|
|
55
|
-
return window.globalObjects || (window.globalObjects = {
|
|
56
|
-
router: null,
|
|
57
|
-
i18n: null
|
|
58
|
-
}, console.log("globalObjects created")), window.globalObjects;
|
|
59
|
-
})(), u = (function() {
|
|
60
|
-
return window.eventBus || (window.eventBus = Re(), console.log("eventBus created")), window.eventBus;
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.id=`x-essential-lib`,e.appendChild(document.createTextNode(`.fade-leave-active[data-v-99c4198b]{transition:opacity .5s}.fade-leave-to[data-v-99c4198b]{opacity:0}.x-cont[data-v-99c4198b]{justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.lds-spinner[data-v-99c4198b]{color:official;width:40px;height:40px;display:inline-block;position:relative}.lds-spinner div[data-v-99c4198b]{transform-origin:20px 20px;animation:1.2s linear infinite lds-spinner-99c4198b}.lds-spinner div[data-v-99c4198b]:after{content:" ";background:#9e9e9e;border-radius:5%;width:2px;height:6px;display:block;position:absolute;top:3px;left:18px}.lds-spinner div[data-v-99c4198b]:first-child{animation-delay:-1.1s;transform:rotate(0)}.lds-spinner div[data-v-99c4198b]:nth-child(2){animation-delay:-1s;transform:rotate(30deg)}.lds-spinner div[data-v-99c4198b]:nth-child(3){animation-delay:-.9s;transform:rotate(60deg)}.lds-spinner div[data-v-99c4198b]:nth-child(4){animation-delay:-.8s;transform:rotate(90deg)}.lds-spinner div[data-v-99c4198b]:nth-child(5){animation-delay:-.7s;transform:rotate(120deg)}.lds-spinner div[data-v-99c4198b]:nth-child(6){animation-delay:-.6s;transform:rotate(150deg)}.lds-spinner div[data-v-99c4198b]:nth-child(7){animation-delay:-.5s;transform:rotate(180deg)}.lds-spinner div[data-v-99c4198b]:nth-child(8){animation-delay:-.4s;transform:rotate(210deg)}.lds-spinner div[data-v-99c4198b]:nth-child(9){animation-delay:-.3s;transform:rotate(240deg)}.lds-spinner div[data-v-99c4198b]:nth-child(10){animation-delay:-.2s;transform:rotate(270deg)}.lds-spinner div[data-v-99c4198b]:nth-child(11){animation-delay:-.1s;transform:rotate(300deg)}.lds-spinner div[data-v-99c4198b]:nth-child(12){animation-delay:0s;transform:rotate(330deg)}@keyframes lds-spinner-99c4198b{0%{opacity:1}to{opacity:0}}.x-item[data-v-5b5f6d09]{width:600px}@media (max-width:600px){.x-item[data-v-5b5f6d09]{width:calc(100vw - 16px)}}.x-cont[data-v-b482df18]{z-index:9999;position:fixed;bottom:20px;left:50%;transform:translate(-50%)}
|
|
2
|
+
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { i as usePreferredDark, n as mitt_default, r as api, t as toLower_default } from "./vendor.nojbp8i6.js";
|
|
3
|
+
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isRef, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, resolveComponent, toDisplayString, unref, useTemplateRef, watch, watchEffect, withCtx, withKeys, withModifiers } from "vue";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
import { useDisplay, useTheme } from "vuetify";
|
|
6
|
+
import { useRoute, useRouter } from "vue-router";
|
|
7
|
+
import axios from "axios";
|
|
8
|
+
function useColor() {
|
|
9
|
+
let e = useTheme();
|
|
10
|
+
return {
|
|
11
|
+
primaryColor: computed(() => e.global.current.value.colors.primary),
|
|
12
|
+
secondaryColor: computed(() => e.global.current.value.colors.secondary),
|
|
13
|
+
backgroundColor0: computed(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"),
|
|
14
|
+
backgroundColor1: computed(() => e.current.value.dark ? "#272727" : "#eeeeee"),
|
|
15
|
+
backgroundColor2: computed(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"),
|
|
16
|
+
highlightColor: computed(() => e.current.value.dark ? "#303030" : "#f6f6f6"),
|
|
17
|
+
borderColor: computed(() => e.current.value.dark ? "#ffffff1f" : "#0000001f")
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function createAxios(e) {
|
|
21
|
+
let T = axios.create({ timeout: 6e3 });
|
|
22
|
+
return T.defaults.baseURL = e.baseUrl, T.interceptors.request.use((e) => onReqFulfilled(e), (T) => {
|
|
23
|
+
onReqRejected(T, e.onError);
|
|
24
|
+
}), T.interceptors.response.use((e) => onRespFullfilled(e), (T) => onRespRejected(T, e.onError)), T;
|
|
25
|
+
}
|
|
26
|
+
function onReqFulfilled(e) {
|
|
27
|
+
let T = api.get("accessToken") ?? "";
|
|
28
|
+
return e.headers.Authorization = "Basic " + T, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
29
|
+
}
|
|
30
|
+
function onReqRejected(e, T) {
|
|
31
|
+
console.error(e), T("request timeout");
|
|
32
|
+
}
|
|
33
|
+
function onRespFullfilled(e) {
|
|
34
|
+
return e.data;
|
|
35
|
+
}
|
|
36
|
+
function onRespRejected(e, T) {
|
|
37
|
+
let E = e.response;
|
|
38
|
+
return E ? (E.status === 401 && onUnauthorized(), E.data?.message ? T(E.data?.message) : T({
|
|
39
|
+
code: E.status,
|
|
40
|
+
message: E.statusText
|
|
41
|
+
}), Promise.reject(e)) : Promise.reject(e);
|
|
42
|
+
}
|
|
43
|
+
function onUnauthorized() {
|
|
44
|
+
api.remove("accessToken"), api.remove("refreshToken"), api.remove("userId"), api.remove("userName"), api.remove("phone"), api.remove("activeOrg"), useRouter().replace({ path: "/passport/login" });
|
|
45
|
+
}
|
|
46
|
+
const globalObjects = (function() {
|
|
47
|
+
return window.globalObjects || (window.globalObjects = {
|
|
48
|
+
router: null,
|
|
49
|
+
i18n: null
|
|
50
|
+
}, console.log("globalObjects created")), window.globalObjects;
|
|
51
|
+
})(), eventBus = (function() {
|
|
52
|
+
return window.eventBus || (window.eventBus = mitt_default(), console.log("eventBus created")), window.eventBus;
|
|
61
53
|
})();
|
|
62
|
-
async function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
async function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
async function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
function
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
function
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
54
|
+
async function waitMs(e) {
|
|
55
|
+
return new Promise((T) => {
|
|
56
|
+
setTimeout(T, e);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async function waitUtil(e, T, E) {
|
|
60
|
+
let D = Date.now();
|
|
61
|
+
return new Promise((O) => {
|
|
62
|
+
let k = async () => {
|
|
63
|
+
e() ? O(!0) : T && Date.now() - D > T ? O(!1) : setTimeout(k, E ?? 30);
|
|
64
|
+
};
|
|
65
|
+
k();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function appAppear(e, T) {
|
|
69
|
+
let E = document.getElementById("single-spa-application:" + e);
|
|
70
|
+
E && (E.classList.remove("app-left", "app-right", "app-reset"), T ? E.classList.add("app-left") : E.classList.add("app-right"), setTimeout(() => {
|
|
71
|
+
E.classList.add("app-reset");
|
|
72
|
+
}, 50));
|
|
73
|
+
}
|
|
74
|
+
var lastTime = Date.now();
|
|
75
|
+
function tryCooldown() {
|
|
76
|
+
let e = Date.now();
|
|
77
|
+
return e - lastTime > 500 ? (lastTime = e, !0) : !1;
|
|
78
|
+
}
|
|
79
|
+
var sequence = 0;
|
|
80
|
+
function getSequence() {
|
|
81
|
+
return ++sequence;
|
|
82
|
+
}
|
|
83
|
+
async function openConfirmDlg(e) {
|
|
84
|
+
if (!tryCooldown()) return;
|
|
85
|
+
let T = !1, E, D = (e) => {
|
|
86
|
+
E = e, T = !0;
|
|
87
|
+
}, O = getSequence();
|
|
88
|
+
return eventBus.on("confirmDlgResult" + O, D), eventBus.emit("confirmDlg", {
|
|
89
|
+
...e,
|
|
90
|
+
seq: O
|
|
91
|
+
}), await waitUtil(() => T), eventBus.off("confirmDlgResult" + O, D), E;
|
|
92
|
+
}
|
|
93
|
+
async function openNumberDlg(e) {
|
|
94
|
+
if (!tryCooldown()) return;
|
|
95
|
+
let T = !1, E, D = (e) => {
|
|
96
|
+
E = e, T = !0;
|
|
97
|
+
}, O = getSequence();
|
|
98
|
+
return eventBus.on("numberDlgResult" + O, D), eventBus.emit("numberDlg", {
|
|
99
|
+
...e,
|
|
100
|
+
seq: O
|
|
101
|
+
}), await waitUtil(() => T), eventBus.off("numberDlgResult" + O, D), E;
|
|
102
|
+
}
|
|
103
|
+
async function openPromptDlg(e) {
|
|
104
|
+
if (!tryCooldown()) return;
|
|
105
|
+
let T = !1, E, D = (e) => {
|
|
106
|
+
E = e, T = !0;
|
|
107
|
+
}, O = getSequence();
|
|
108
|
+
return eventBus.on("promptDlgResult" + O, D), eventBus.emit("promptDlg", {
|
|
109
|
+
...e,
|
|
110
|
+
seq: O
|
|
111
|
+
}), await waitUtil(() => T), eventBus.off("promptDlgResult" + O, D), E;
|
|
112
|
+
}
|
|
113
|
+
function openWaitDlg(e) {
|
|
114
|
+
eventBus.emit("waitDlg", { text: e });
|
|
115
|
+
}
|
|
116
|
+
function closeWaitDlg() {
|
|
117
|
+
eventBus.emit("closeWaitDlg");
|
|
118
|
+
}
|
|
119
|
+
function messageError(e, T) {
|
|
120
|
+
eventBus.emit("message", {
|
|
121
|
+
type: "error",
|
|
122
|
+
text: e,
|
|
123
|
+
timeout: T
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function messageInfo(e, T) {
|
|
127
|
+
eventBus.emit("message", {
|
|
128
|
+
type: "info",
|
|
129
|
+
text: e,
|
|
130
|
+
timeout: T
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function messageSuccess(e, T) {
|
|
134
|
+
eventBus.emit("message", {
|
|
135
|
+
type: "success",
|
|
136
|
+
text: e,
|
|
137
|
+
timeout: T
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function messageWarning(e, T) {
|
|
141
|
+
eventBus.emit("message", {
|
|
142
|
+
type: "warning",
|
|
143
|
+
text: e,
|
|
144
|
+
timeout: T
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
let Permission = /* @__PURE__ */ function(e) {
|
|
148
|
+
return e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_compute_space = "list_compute_space", e.get_compute_space = "get_compute_space", e.create_compute_space = "create_compute_space", e.delete_compute_space = "delete_compute_space", e.update_compute_space = "update_compute_space", e.arrange_compute_space = "arrange_compute_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.debug_flow = "debug_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_compute_layer = "open_compute_layer", e.list_data_space = "list_data_space", e.get_data_space = "get_data_space", e.create_data_space = "create_data_space", e.delete_data_space = "delete_data_space", e.update_data_space = "update_data_space", e.arrange_data_space = "arrange_data_space", e.list_table_group = "list_table_group", e.create_table_group = "create_table_group", e.delete_table_group = "delete_table_group", e.update_table_group = "update_table_group", e.arrange_table_group = "arrange_table_group", e.list_table = "list_table", e.get_table = "get_table", e.create_table = "create_table", e.delete_table = "delete_table", e.update_table = "update_table", e.get_data = "get_data", e.create_data = "create_data", e.delete_data = "delete_data", e.update_data = "update_data", e.get_relation_graph = "get_relation_graph", e.update_relation_graph = "update_relation_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_resource_space = "list_resource_space", e.get_resource_space = "get_resource_space", e.create_resource_space = "create_resource_space", e.delete_resource_space = "delete_resource_space", e.update_resource_space = "update_resource_space", e.arrange_resource_space = "arrange_resource_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_resource = "list_resource", e.get_resource = "get_resource", e.create_resource = "create_resource", e.delete_resource = "delete_resource", e.update_resource = "update_resource", e.move_resource = "move_resource", e.open_resource_layer = "open_resource_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role_group = "list_org_role_group", e.create_org_role_group = "create_org_role_group", e.delete_org_role_group = "delete_org_role_group", e.update_org_role_group = "update_org_role_group", e.arrange_org_role_group = "arrange_org_role_group", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_table = "filter_table", e;
|
|
149
|
+
}({});
|
|
150
|
+
function isExist(e, T) {
|
|
151
|
+
if (!e) return !1;
|
|
152
|
+
let E = e;
|
|
153
|
+
return Object.keys(E).length <= 0 || (T.split("/").forEach((e) => {
|
|
154
|
+
if (Object.keys(E).length <= 0) return !0;
|
|
155
|
+
if (E[e]) E = E[e];
|
|
156
|
+
else return !1;
|
|
157
|
+
}), Object.keys(E).length <= 0);
|
|
158
|
+
}
|
|
159
|
+
function verifyPermission(e, T, E) {
|
|
160
|
+
let D = e[T];
|
|
161
|
+
return D ? E ? !(!isExist(D.includes, E) || isExist(D.excludes, E)) : !0 : !1;
|
|
162
|
+
}
|
|
163
|
+
var darkKey = "essentialDark", localeKey = "essentialLocale", permissionObjectsKey = "essentialPermissionObjects", permissionChecksumKey = "essentialPermissionChecksum", lastAppPathKey = "essentialLastAppPath", viewsKey = "essentialViews";
|
|
164
|
+
function provideDark(e) {
|
|
165
|
+
provide(darkKey, e);
|
|
166
|
+
}
|
|
167
|
+
function injectDark() {
|
|
168
|
+
return inject(darkKey);
|
|
169
|
+
}
|
|
170
|
+
function provideLocale(e) {
|
|
171
|
+
provide(localeKey, e);
|
|
172
|
+
}
|
|
173
|
+
function injectLocale() {
|
|
174
|
+
return inject(localeKey);
|
|
175
|
+
}
|
|
176
|
+
function providePermissionObjects(e) {
|
|
177
|
+
provide(permissionObjectsKey, e);
|
|
178
|
+
}
|
|
179
|
+
function injectPermissionObjects() {
|
|
180
|
+
return inject(permissionObjectsKey);
|
|
181
|
+
}
|
|
182
|
+
function providePermissionChecksum(e) {
|
|
183
|
+
provide(permissionChecksumKey, e);
|
|
184
|
+
}
|
|
185
|
+
function injectPermissionChecksum() {
|
|
186
|
+
return inject(permissionChecksumKey);
|
|
187
|
+
}
|
|
188
|
+
function provideLastAppPath(e) {
|
|
189
|
+
provide(lastAppPathKey, e);
|
|
190
|
+
}
|
|
191
|
+
function injectLastAppPath() {
|
|
192
|
+
return inject(lastAppPathKey);
|
|
193
|
+
}
|
|
194
|
+
function provideViews(e) {
|
|
195
|
+
provide(viewsKey, e);
|
|
196
|
+
}
|
|
197
|
+
function injectViews() {
|
|
198
|
+
return inject(viewsKey);
|
|
199
|
+
}
|
|
200
|
+
var routeMetas = [
|
|
201
|
+
{
|
|
202
|
+
app: "x-passport-mf",
|
|
203
|
+
path: "/passport/login",
|
|
204
|
+
level: 0,
|
|
205
|
+
mainActive: 1
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
app: "x-passport-mf",
|
|
209
|
+
path: "/passport/loginAccount",
|
|
210
|
+
level: 1,
|
|
211
|
+
mainActive: 1
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
app: "x-passport-mf",
|
|
215
|
+
path: "/passport/register",
|
|
216
|
+
level: 1,
|
|
217
|
+
mainActive: 1
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
app: "x-org-mf",
|
|
221
|
+
path: "/org/joinOrCreate",
|
|
222
|
+
level: 1,
|
|
223
|
+
requiredState: "auth"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
app: "x-org-mf",
|
|
227
|
+
path: "/org/manager",
|
|
228
|
+
level: 1,
|
|
229
|
+
requiredState: "org",
|
|
230
|
+
mainActive: 2
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
app: "x-main-mf",
|
|
234
|
+
path: "/main",
|
|
235
|
+
level: 0,
|
|
236
|
+
requiredState: "org"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
app: "x-mine-mf",
|
|
240
|
+
path: "/mine/personalInfo",
|
|
241
|
+
level: 1,
|
|
242
|
+
requiredState: "org",
|
|
243
|
+
mainActive: 4
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
app: "x-mine-mf",
|
|
247
|
+
path: "/mine/accountSecurity",
|
|
248
|
+
level: 2,
|
|
249
|
+
requiredState: "org"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
app: "x-mine-mf",
|
|
253
|
+
path: "/mine/settings",
|
|
254
|
+
level: 1,
|
|
255
|
+
requiredState: "org",
|
|
256
|
+
mainActive: 4
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
app: "x-mine-mf",
|
|
260
|
+
path: "/mine/general",
|
|
261
|
+
level: 2,
|
|
262
|
+
requiredState: "org"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
app: "x-mine-mf",
|
|
266
|
+
path: "/mine/general/darkMode",
|
|
267
|
+
level: 3,
|
|
268
|
+
requiredState: "org"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
app: "x-mine-mf",
|
|
272
|
+
path: "/mine/general/language",
|
|
273
|
+
level: 3,
|
|
274
|
+
requiredState: "org"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
app: "x-app-mf",
|
|
278
|
+
path: "/app/manager",
|
|
279
|
+
level: 1,
|
|
280
|
+
requiredState: "org",
|
|
281
|
+
mainActive: 2
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
app: "x-app-mf",
|
|
285
|
+
path: "/app/editor",
|
|
286
|
+
level: 2,
|
|
287
|
+
requiredState: "org"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
app: "x-compute-mf",
|
|
291
|
+
path: "/compute",
|
|
292
|
+
level: 1,
|
|
293
|
+
requiredState: "org",
|
|
294
|
+
mainActive: 2
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
app: "x-data-mf",
|
|
298
|
+
path: "/data",
|
|
299
|
+
level: 1,
|
|
300
|
+
requiredState: "org",
|
|
301
|
+
mainActive: 2
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
app: "x-resource-mf",
|
|
305
|
+
path: "/resource",
|
|
306
|
+
level: 1,
|
|
307
|
+
requiredState: "org",
|
|
308
|
+
mainActive: 2
|
|
309
|
+
}
|
|
301
310
|
];
|
|
302
|
-
function
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
L(n, t.path, o), a({ path: n });
|
|
368
|
-
}
|
|
369
|
-
else
|
|
370
|
-
L(e.path, t.path, o), a();
|
|
371
|
-
}
|
|
372
|
-
const Nt = [
|
|
373
|
-
"string",
|
|
374
|
-
"number",
|
|
375
|
-
"boolean",
|
|
376
|
-
"array",
|
|
377
|
-
"object",
|
|
378
|
-
"any"
|
|
311
|
+
function matchRouteMeta(e) {
|
|
312
|
+
let T, E = 0, D = e.split("/").filter((e) => e.trim() !== "");
|
|
313
|
+
return routeMetas.forEach((e) => {
|
|
314
|
+
let O = e.path.split("/").filter((e) => e.trim() !== ""), k = 0;
|
|
315
|
+
for (let e = 0; e < D.length && !(e >= O.length || D[e] !== O[e]); e++) k++;
|
|
316
|
+
k > 0 && k > E && (T = e, E = k);
|
|
317
|
+
}), T;
|
|
318
|
+
}
|
|
319
|
+
const routeTransName = ref("");
|
|
320
|
+
function onBeforeChange(e, T, E) {
|
|
321
|
+
T === "/" && (T = E);
|
|
322
|
+
let D = matchRouteMeta(e), O = matchRouteMeta(T);
|
|
323
|
+
if (!D) {
|
|
324
|
+
console.assert(!1);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (console.info(`~~~~routeChange~~~~ ${T} -> ${e}`), !O) return;
|
|
328
|
+
let k = D.app === O.app, A = D.path === O.path, j = D.level >= O.level;
|
|
329
|
+
k ? A ? routeTransName.value = "" : routeTransName.value = j ? "inner-left" : "inner-right" : (routeTransName.value = "", appAppear(D.app, j));
|
|
330
|
+
}
|
|
331
|
+
function isHasAccessToken() {
|
|
332
|
+
return !!api.get("accessToken");
|
|
333
|
+
}
|
|
334
|
+
function isHasActiveOrg() {
|
|
335
|
+
return !!api.get("activeOrg");
|
|
336
|
+
}
|
|
337
|
+
function onBeforeEach(e, T, E, D) {
|
|
338
|
+
let O = isHasAccessToken(), k = isHasActiveOrg(), A = matchRouteMeta(e.path);
|
|
339
|
+
if (!A) {
|
|
340
|
+
console.assert(!1), E();
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
if (A.requiredState === "auth") if (O) if (k) {
|
|
344
|
+
let e = "/main";
|
|
345
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
346
|
+
} else onBeforeChange(e.path, T.path, D), E();
|
|
347
|
+
else {
|
|
348
|
+
let e = "/passport/login";
|
|
349
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
350
|
+
}
|
|
351
|
+
else if (A.requiredState === "org") if (O) if (k) onBeforeChange(e.path, T.path, D), E();
|
|
352
|
+
else {
|
|
353
|
+
let e = "/org/joinOrCreate";
|
|
354
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
let e = "/passport/login";
|
|
358
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
359
|
+
}
|
|
360
|
+
else if (O) if (k) {
|
|
361
|
+
let e = "/main";
|
|
362
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
363
|
+
} else {
|
|
364
|
+
let e = "/org/joinOrCreate";
|
|
365
|
+
onBeforeChange(e, T.path, D), E({ path: e });
|
|
366
|
+
}
|
|
367
|
+
else onBeforeChange(e.path, T.path, D), E();
|
|
368
|
+
}
|
|
369
|
+
const types = [
|
|
370
|
+
"string",
|
|
371
|
+
"number",
|
|
372
|
+
"boolean",
|
|
373
|
+
"array",
|
|
374
|
+
"object",
|
|
375
|
+
"any"
|
|
379
376
|
];
|
|
380
|
-
function
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
function
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
function
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
_: 1
|
|
886
|
-
}, 8, ["color", "disabled"])
|
|
887
|
-
]),
|
|
888
|
-
_: 1
|
|
889
|
-
})
|
|
890
|
-
]),
|
|
891
|
-
_: 1
|
|
892
|
-
}, 8, ["modelValue"])
|
|
893
|
-
]),
|
|
894
|
-
_: 1
|
|
895
|
-
}, 8, ["subtitle", "title"])
|
|
896
|
-
]),
|
|
897
|
-
_: 1
|
|
898
|
-
}, 8, ["modelValue"]);
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
}), it = { class: "ma-auto" }, ft = { class: "w-100 h-100 d-flex align-center justify-center" }, gt = { class: "text-body-1" }, vt = /* @__PURE__ */ $({
|
|
902
|
-
__name: "index",
|
|
903
|
-
setup(e) {
|
|
904
|
-
const { t } = z(), a = p(""), o = (s) => {
|
|
905
|
-
const n = s;
|
|
906
|
-
a.value = n.text ?? t("dlg.common.responding"), r.value = !0;
|
|
907
|
-
}, l = () => {
|
|
908
|
-
r.value = !1;
|
|
909
|
-
}, { open: r } = Q("waitDlg", o);
|
|
910
|
-
return W(() => {
|
|
911
|
-
u.on("closeWaitDlg", l);
|
|
912
|
-
}), N(() => {
|
|
913
|
-
u.off("closeWaitDlg", l);
|
|
914
|
-
}), (s, n) => {
|
|
915
|
-
const d = m("v-card"), c = m("v-dialog");
|
|
916
|
-
return q(), A(c, {
|
|
917
|
-
modelValue: E(r),
|
|
918
|
-
"onUpdate:modelValue": n[0] || (n[0] = (_) => X(r) ? r.value = _ : null),
|
|
919
|
-
attach: "",
|
|
920
|
-
fullscreen: "",
|
|
921
|
-
"no-click-animation": "",
|
|
922
|
-
persistent: ""
|
|
923
|
-
}, {
|
|
924
|
-
default: v(() => [
|
|
925
|
-
D("div", it, [
|
|
926
|
-
h(d, {
|
|
927
|
-
height: "80px",
|
|
928
|
-
loading: "",
|
|
929
|
-
width: "300px"
|
|
930
|
-
}, {
|
|
931
|
-
default: v(() => [
|
|
932
|
-
D("div", ft, [
|
|
933
|
-
D("span", gt, S(a.value), 1)
|
|
934
|
-
])
|
|
935
|
-
]),
|
|
936
|
-
_: 1
|
|
937
|
-
})
|
|
938
|
-
])
|
|
939
|
-
]),
|
|
940
|
-
_: 1
|
|
941
|
-
}, 8, ["modelValue"]);
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
}), mt = (e) => {
|
|
945
|
-
e.component("XConfirmDlg", lt), e.component("XLoading", rt), e.component("XMessage", pt), e.component("XNumberDlg", _t), e.component("XPromptDlg", dt), e.component("XWaitDlg", vt);
|
|
946
|
-
}, bt = (e, t, a) => {
|
|
947
|
-
const o = e[t];
|
|
948
|
-
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((l, r) => {
|
|
949
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + t + (t.split("/").length !== a ? ". Note that variables only represent file names one level deep." : ""))));
|
|
950
|
-
});
|
|
377
|
+
function getTypeColor(e) {
|
|
378
|
+
switch (e) {
|
|
379
|
+
case "string": return "#5ba58c";
|
|
380
|
+
case "number": return "#5b67a5";
|
|
381
|
+
case "boolean": return "#5b80a5";
|
|
382
|
+
case "array": return "#745ba5";
|
|
383
|
+
case "object": return "#80a55b";
|
|
384
|
+
case "any": return "#9e9e9e";
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function getTypeDefault(e) {
|
|
388
|
+
switch (e) {
|
|
389
|
+
case "string": return "";
|
|
390
|
+
case "number": return 0;
|
|
391
|
+
case "boolean": return !1;
|
|
392
|
+
case "array": return [];
|
|
393
|
+
case "object": return {};
|
|
394
|
+
case "any": return null;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function isEmpty(e) {
|
|
398
|
+
return e.value.length <= 0;
|
|
399
|
+
}
|
|
400
|
+
function lastView(e) {
|
|
401
|
+
if (e.value.length > 0) return e.value[e.value.length - 1];
|
|
402
|
+
}
|
|
403
|
+
function hasView(e, T) {
|
|
404
|
+
return !!e.value.find((e) => e === T);
|
|
405
|
+
}
|
|
406
|
+
function addView(e, T) {
|
|
407
|
+
let E = e.value.findIndex((e) => e === T);
|
|
408
|
+
E >= 0 && e.value.splice(E, 1), e.value.push(T);
|
|
409
|
+
}
|
|
410
|
+
function delView(e, T) {
|
|
411
|
+
let E = e.value.findIndex((e) => e === T);
|
|
412
|
+
E >= 0 && e.value.splice(E, 1);
|
|
413
|
+
}
|
|
414
|
+
function popView(e) {
|
|
415
|
+
console.assert(e.value.length > 0), e.value.pop();
|
|
416
|
+
}
|
|
417
|
+
function clearViews(e) {
|
|
418
|
+
e.value = [];
|
|
419
|
+
}
|
|
420
|
+
function useMicroApp(T, E, D, O, k, A) {
|
|
421
|
+
let j = useRoute(), M = useRouter(), N = usePreferredDark(), P = ref(!1);
|
|
422
|
+
watchEffect(() => {
|
|
423
|
+
let e = !1;
|
|
424
|
+
e = typeof T.value == "boolean" ? T.value : N.value, P.value = e;
|
|
425
|
+
}), provideDark(P), provideLocale(E), providePermissionObjects(D), providePermissionChecksum(O), provideLastAppPath(k), provideViews(A);
|
|
426
|
+
let F = useTheme();
|
|
427
|
+
watchEffect(() => {
|
|
428
|
+
F.change(P.value ? "dark" : "light");
|
|
429
|
+
});
|
|
430
|
+
let I = () => {
|
|
431
|
+
if (!isEmpty(A)) {
|
|
432
|
+
hasView(A, "waitDlg") || popView(A);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
let e = matchRouteMeta(j.path);
|
|
436
|
+
if (!e) {
|
|
437
|
+
console.assert(!1);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
e.level === 0 ? navigator?.Backbutton?.goHome(() => {}, () => {}) : M.back();
|
|
441
|
+
}, L = (e) => {
|
|
442
|
+
if (e.key === "Escape") {
|
|
443
|
+
I();
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
}, R = () => {
|
|
447
|
+
I();
|
|
448
|
+
};
|
|
449
|
+
onMounted(() => {
|
|
450
|
+
window.addEventListener("keydown", L), eventBus.on("backbutton", R);
|
|
451
|
+
}), onBeforeUnmount(() => {
|
|
452
|
+
window.removeEventListener("keydown", L), eventBus.off("backbutton", R);
|
|
453
|
+
});
|
|
454
|
+
let z = (e) => {
|
|
455
|
+
T.value = e;
|
|
456
|
+
}, B = (e) => {
|
|
457
|
+
E.value = e;
|
|
458
|
+
}, W = (e) => {
|
|
459
|
+
let T = e;
|
|
460
|
+
D.value = T[0], O.value = T[1];
|
|
461
|
+
}, G = (e) => {
|
|
462
|
+
k.value = e;
|
|
463
|
+
};
|
|
464
|
+
onBeforeMount(() => {
|
|
465
|
+
eventBus.on("updateDark", z), eventBus.on("updateLocale", B), eventBus.on("updatePermission", W), eventBus.on("updateLastAppPath", G), eventBus.emit("syncGlobalState");
|
|
466
|
+
}), onBeforeUnmount(() => {
|
|
467
|
+
eventBus.off("updateDark", z), eventBus.off("updateLocale", B), eventBus.off("updatePermission", W), eventBus.off("updateLastAppPath", G);
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
function usePermission() {
|
|
471
|
+
let e = injectPermissionObjects();
|
|
472
|
+
function T(T, E) {
|
|
473
|
+
return verifyPermission(e.value, T, E ?? "");
|
|
474
|
+
}
|
|
475
|
+
return { verifyPermission: T };
|
|
476
|
+
}
|
|
477
|
+
function useSystem() {
|
|
478
|
+
let { locale: e, t: T } = useI18n(), E = computed(() => !!window.cordova), O = useDisplay();
|
|
479
|
+
return {
|
|
480
|
+
sysBarAvail: E,
|
|
481
|
+
compactWidth: computed(() => O.width.value <= 1280 ? O.width.value + "px" : O.width.value <= 1920 ? "768px" : "1024px"),
|
|
482
|
+
isCurvedScreen: computed(() => O.xs.value),
|
|
483
|
+
isMobile: () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
|
|
484
|
+
nameList: (E, D) => {
|
|
485
|
+
let O = "", k = E.map((e) => T(e));
|
|
486
|
+
return O = D ? `${k.join("/")} <${D.join("/")}>` : e.value === "en" ? k.join(" ") : k.join(""), O;
|
|
487
|
+
},
|
|
488
|
+
sentenceOfAsk: (E, O, k) => e.value === "en" ? T("dlg.common.ask", {
|
|
489
|
+
verb: toLower_default(T(E)),
|
|
490
|
+
object: toLower_default(T(O)),
|
|
491
|
+
name: k
|
|
492
|
+
}) : T("dlg.common.ask", {
|
|
493
|
+
verb: T(E),
|
|
494
|
+
object: T(O),
|
|
495
|
+
name: k
|
|
496
|
+
})
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
function useViewStack(e, T) {
|
|
500
|
+
let E = injectViews(), D = computed({
|
|
501
|
+
get() {
|
|
502
|
+
return hasView(E, e);
|
|
503
|
+
},
|
|
504
|
+
set(T) {
|
|
505
|
+
T ? addView(E, e) : delView(E, e);
|
|
506
|
+
}
|
|
507
|
+
}), O = (e) => {
|
|
508
|
+
T?.(e), D.value = !0;
|
|
509
|
+
};
|
|
510
|
+
return onMounted(() => {
|
|
511
|
+
eventBus.on(e, O);
|
|
512
|
+
}), onBeforeUnmount(() => {
|
|
513
|
+
eventBus.off(e, O);
|
|
514
|
+
}), { open: D };
|
|
515
|
+
}
|
|
516
|
+
var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
517
|
+
__name: "index",
|
|
518
|
+
setup(e) {
|
|
519
|
+
let { t: T } = useI18n(), E = ref(""), D = ref(""), O = ref(""), k = ref(""), A = ref(""), M = ref(""), N = ref(""), P = 0, L = !1, { open: R } = useViewStack("confirmDlg", (e) => {
|
|
520
|
+
E.value = e.title, D.value = e.subtitle ?? "", O.value = e.text, k.value = e.cancel?.color ?? "primary", A.value = e.cancel?.text ?? T("dlg.common.cancel"), M.value = e.confirm?.color ?? "primary", N.value = e.confirm?.text ?? T("dlg.common.confirm"), P = e.seq, L = !1, R.value = !0;
|
|
521
|
+
}), B = () => {
|
|
522
|
+
R.value = !1, L ||= (eventBus.emit("confirmDlgResult" + P, !0), !0);
|
|
523
|
+
};
|
|
524
|
+
return watch(R, (e) => {
|
|
525
|
+
!e && !L && (eventBus.emit("confirmDlgResult" + P, !1), L = !0);
|
|
526
|
+
}), (e, T) => {
|
|
527
|
+
let P = resolveComponent("v-card-text"), L = resolveComponent("v-btn"), V = resolveComponent("v-card-actions"), H = resolveComponent("v-card"), U = resolveComponent("v-dialog");
|
|
528
|
+
return openBlock(), createBlock(U, {
|
|
529
|
+
modelValue: unref(R),
|
|
530
|
+
"onUpdate:modelValue": T[1] ||= (e) => isRef(R) ? R.value = e : null,
|
|
531
|
+
attach: "",
|
|
532
|
+
"max-width": "600px",
|
|
533
|
+
transition: "dialog-top-transition",
|
|
534
|
+
onKeydown: [withKeys(withModifiers(B, ["stop", "prevent"]), ["enter"]), T[2] ||= withKeys(withModifiers((e) => R.value = !1, ["stop", "prevent"]), ["esc"])]
|
|
535
|
+
}, {
|
|
536
|
+
default: withCtx(() => [createVNode(H, {
|
|
537
|
+
subtitle: D.value,
|
|
538
|
+
title: E.value
|
|
539
|
+
}, {
|
|
540
|
+
default: withCtx(() => [createVNode(P, null, {
|
|
541
|
+
default: withCtx(() => [createTextVNode(toDisplayString(O.value), 1)]),
|
|
542
|
+
_: 1
|
|
543
|
+
}), createVNode(V, { class: "d-flex justify-end" }, {
|
|
544
|
+
default: withCtx(() => [createVNode(L, {
|
|
545
|
+
color: k.value,
|
|
546
|
+
variant: "text",
|
|
547
|
+
onClick: T[0] ||= (e) => R.value = !1
|
|
548
|
+
}, {
|
|
549
|
+
default: withCtx(() => [createTextVNode(toDisplayString(A.value), 1)]),
|
|
550
|
+
_: 1
|
|
551
|
+
}, 8, ["color"]), createVNode(L, {
|
|
552
|
+
color: M.value,
|
|
553
|
+
variant: "text",
|
|
554
|
+
onClick: B
|
|
555
|
+
}, {
|
|
556
|
+
default: withCtx(() => [createTextVNode(toDisplayString(N.value), 1)]),
|
|
557
|
+
_: 1
|
|
558
|
+
}, 8, ["color"])]),
|
|
559
|
+
_: 1
|
|
560
|
+
})]),
|
|
561
|
+
_: 1
|
|
562
|
+
}, 8, ["subtitle", "title"])]),
|
|
563
|
+
_: 1
|
|
564
|
+
}, 8, ["modelValue", "onKeydown"]);
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
}), index_vue_vue_type_script_setup_true_lang_default$4 = /* @__PURE__ */ defineComponent({
|
|
568
|
+
__name: "index",
|
|
569
|
+
props: {
|
|
570
|
+
open: {
|
|
571
|
+
type: Boolean,
|
|
572
|
+
default: !0
|
|
573
|
+
},
|
|
574
|
+
zIndex: { default: 1 }
|
|
575
|
+
},
|
|
576
|
+
setup(e) {
|
|
577
|
+
let { backgroundColor2: T } = useColor(), E = computed(() => ({
|
|
578
|
+
background: T.value,
|
|
579
|
+
zIndex: e.zIndex
|
|
580
|
+
})), D = 0;
|
|
581
|
+
return (T, O) => (openBlock(), createBlock(Transition, { name: "fade" }, {
|
|
582
|
+
default: withCtx(() => [e.open ? (openBlock(), createElementBlock("div", {
|
|
583
|
+
key: isRef(D) ? ++D.value : ++D,
|
|
584
|
+
class: "x-cont",
|
|
585
|
+
style: normalizeStyle(E.value)
|
|
586
|
+
}, [...O[0] ||= [createElementVNode("div", { class: "lds-spinner" }, [
|
|
587
|
+
createElementVNode("div"),
|
|
588
|
+
createElementVNode("div"),
|
|
589
|
+
createElementVNode("div"),
|
|
590
|
+
createElementVNode("div"),
|
|
591
|
+
createElementVNode("div"),
|
|
592
|
+
createElementVNode("div"),
|
|
593
|
+
createElementVNode("div"),
|
|
594
|
+
createElementVNode("div"),
|
|
595
|
+
createElementVNode("div"),
|
|
596
|
+
createElementVNode("div"),
|
|
597
|
+
createElementVNode("div"),
|
|
598
|
+
createElementVNode("div")
|
|
599
|
+
], -1)]], 4)) : createCommentVNode("", !0)]),
|
|
600
|
+
_: 1
|
|
601
|
+
}));
|
|
602
|
+
}
|
|
603
|
+
}), __plugin_vue_export_helper_default = (e, T) => {
|
|
604
|
+
let E = e.__vccOpts || e;
|
|
605
|
+
for (let [e, D] of T) E[e] = D;
|
|
606
|
+
return E;
|
|
607
|
+
}, loading_default = /* @__PURE__ */ __plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default$4, [["__scopeId", "data-v-99c4198b"]]), item_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
608
|
+
__name: "item",
|
|
609
|
+
props: {
|
|
610
|
+
id: {},
|
|
611
|
+
type: {},
|
|
612
|
+
text: {},
|
|
613
|
+
timeout: { default: 5e3 }
|
|
614
|
+
},
|
|
615
|
+
emits: ["timeout"],
|
|
616
|
+
setup(e, { emit: T }) {
|
|
617
|
+
let E = computed(() => ({
|
|
618
|
+
width: "calc(100% - 64px)",
|
|
619
|
+
overflowWrap: "break-word"
|
|
620
|
+
})), D = computed(() => {
|
|
621
|
+
switch (e.type) {
|
|
622
|
+
case "success": return "mdi-check-circle";
|
|
623
|
+
case "info": return "mdi-information";
|
|
624
|
+
case "error": return "mdi-close-circle";
|
|
625
|
+
case "warning": return "mdi-alert-circle";
|
|
626
|
+
default: return "";
|
|
627
|
+
}
|
|
628
|
+
}), O = ref(!0), k = T;
|
|
629
|
+
return onMounted(() => {
|
|
630
|
+
setTimeout(() => {
|
|
631
|
+
k("timeout", e.id);
|
|
632
|
+
}, e.timeout);
|
|
633
|
+
}), watch(O, (T) => {
|
|
634
|
+
T || k("timeout", e.id);
|
|
635
|
+
}), (T, O) => {
|
|
636
|
+
let A = resolveComponent("v-icon"), N = resolveComponent("v-sheet");
|
|
637
|
+
return openBlock(), createBlock(N, {
|
|
638
|
+
class: "x-item d-flex align-center py-2 mb-2",
|
|
639
|
+
color: e.type,
|
|
640
|
+
elevation: 1
|
|
641
|
+
}, {
|
|
642
|
+
default: withCtx(() => [
|
|
643
|
+
D.value ? (openBlock(), createBlock(A, {
|
|
644
|
+
key: 0,
|
|
645
|
+
class: "mx-1",
|
|
646
|
+
icon: D.value
|
|
647
|
+
}, null, 8, ["icon"])) : createCommentVNode("", !0),
|
|
648
|
+
createElementVNode("div", { style: normalizeStyle(E.value) }, toDisplayString(e.text), 5),
|
|
649
|
+
createVNode(A, {
|
|
650
|
+
class: "mx-1",
|
|
651
|
+
icon: "mdi-close",
|
|
652
|
+
onClick: O[0] ||= (T) => k("timeout", e.id)
|
|
653
|
+
})
|
|
654
|
+
]),
|
|
655
|
+
_: 1
|
|
656
|
+
}, 8, ["color"]);
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
}), [["__scopeId", "data-v-5b5f6d09"]]), message_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
660
|
+
__name: "index",
|
|
661
|
+
setup(e) {
|
|
662
|
+
let T = ref([]);
|
|
663
|
+
onMounted(() => {
|
|
664
|
+
eventBus.on("message", E);
|
|
665
|
+
}), onBeforeUnmount(() => {
|
|
666
|
+
eventBus.off("message", E);
|
|
667
|
+
});
|
|
668
|
+
let E = (e) => {
|
|
669
|
+
let { type: T, text: E, timeout: D } = e;
|
|
670
|
+
A(T, E, D);
|
|
671
|
+
}, D = (e) => {
|
|
672
|
+
M(e);
|
|
673
|
+
}, k = 0, A = (e, E, D) => {
|
|
674
|
+
let O = k++;
|
|
675
|
+
T.value.push({
|
|
676
|
+
id: O,
|
|
677
|
+
type: e,
|
|
678
|
+
text: E,
|
|
679
|
+
timeout: D
|
|
680
|
+
});
|
|
681
|
+
}, M = (e) => {
|
|
682
|
+
let E = T.value.findIndex((T) => T.id === e);
|
|
683
|
+
E >= 0 && T.value.splice(E, 1);
|
|
684
|
+
};
|
|
685
|
+
return (e, E) => (openBlock(), createElementBlock("div", {
|
|
686
|
+
class: "x-cont d-flex flex-column-reverse align-center",
|
|
687
|
+
onClick: E[0] ||= withModifiers(() => {}, ["stop"])
|
|
688
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(T.value, (e) => (openBlock(), createBlock(item_default, {
|
|
689
|
+
id: e.id,
|
|
690
|
+
key: e.id,
|
|
691
|
+
text: e.text,
|
|
692
|
+
timeout: e.timeout,
|
|
693
|
+
type: e.type,
|
|
694
|
+
onTimeout: D
|
|
695
|
+
}, null, 8, [
|
|
696
|
+
"id",
|
|
697
|
+
"text",
|
|
698
|
+
"timeout",
|
|
699
|
+
"type"
|
|
700
|
+
]))), 128))]));
|
|
701
|
+
}
|
|
702
|
+
}), [["__scopeId", "data-v-b482df18"]]), numberDlg_default = /* @__PURE__ */ defineComponent({
|
|
703
|
+
__name: "index",
|
|
704
|
+
setup(e) {
|
|
705
|
+
let { t: T } = useI18n(), E = ref(""), D = ref(""), O = ref(0), k = ref(), A = ref(-Infinity), M = ref(Infinity), N = ref(1), P = 0, L = !1, R = useTemplateRef("target"), { open: B } = useViewStack("numberDlg", async (e) => {
|
|
706
|
+
E.value = e.title, D.value = e.subtitle ?? "", O.value = e.value, k.value = e.precision, A.value = e.min, M.value = e.max, N.value = e.step, P = e.seq, L = !1, B.value = !0, await waitUtil(() => !!R.value), R.value.focus();
|
|
707
|
+
}), V = ref(!1), H = () => {
|
|
708
|
+
B.value = !1, L ||= (eventBus.emit(`numberDlgResult${P}`, O.value), !0);
|
|
709
|
+
};
|
|
710
|
+
return watch(B, (e) => {
|
|
711
|
+
!e && !L && (eventBus.emit(`numberDlgResult${P}`, void 0), L = !0);
|
|
712
|
+
}), (e, D) => {
|
|
713
|
+
let P = resolveComponent("v-number-input"), L = resolveComponent("v-btn"), U = resolveComponent("v-card-actions"), G = resolveComponent("v-form"), K = resolveComponent("v-card"), q = resolveComponent("v-dialog");
|
|
714
|
+
return openBlock(), createBlock(q, {
|
|
715
|
+
modelValue: unref(B),
|
|
716
|
+
"onUpdate:modelValue": D[3] ||= (e) => isRef(B) ? B.value = e : null,
|
|
717
|
+
attach: "",
|
|
718
|
+
"max-width": "600px",
|
|
719
|
+
transition: "dialog-top-transition",
|
|
720
|
+
onKeydown: D[4] ||= withKeys(withModifiers((e) => B.value = !1, ["stop", "prevent"]), ["esc"])
|
|
721
|
+
}, {
|
|
722
|
+
default: withCtx(() => [createVNode(K, { title: E.value }, {
|
|
723
|
+
default: withCtx(() => [createVNode(G, {
|
|
724
|
+
modelValue: V.value,
|
|
725
|
+
"onUpdate:modelValue": D[2] ||= (e) => V.value = e,
|
|
726
|
+
class: "mx-3",
|
|
727
|
+
onSubmit: withModifiers(H, ["prevent"])
|
|
728
|
+
}, {
|
|
729
|
+
default: withCtx(() => [createVNode(P, {
|
|
730
|
+
ref_key: "target",
|
|
731
|
+
ref: R,
|
|
732
|
+
modelValue: O.value,
|
|
733
|
+
"onUpdate:modelValue": D[0] ||= (e) => O.value = e,
|
|
734
|
+
"control-variant": "stacked",
|
|
735
|
+
max: M.value,
|
|
736
|
+
min: A.value,
|
|
737
|
+
precision: k.value,
|
|
738
|
+
step: N.value
|
|
739
|
+
}, null, 8, [
|
|
740
|
+
"modelValue",
|
|
741
|
+
"max",
|
|
742
|
+
"min",
|
|
743
|
+
"precision",
|
|
744
|
+
"step"
|
|
745
|
+
]), createVNode(U, { class: "d-flex justify-end" }, {
|
|
746
|
+
default: withCtx(() => [createVNode(L, {
|
|
747
|
+
color: "primary",
|
|
748
|
+
variant: "text",
|
|
749
|
+
onClick: D[1] ||= (e) => B.value = !1
|
|
750
|
+
}, {
|
|
751
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(T)("dlg.common.cancel")), 1)]),
|
|
752
|
+
_: 1
|
|
753
|
+
}), createVNode(L, {
|
|
754
|
+
color: "primary",
|
|
755
|
+
disabled: !V.value,
|
|
756
|
+
type: "submit",
|
|
757
|
+
variant: "text"
|
|
758
|
+
}, {
|
|
759
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(T)("dlg.common.confirm")), 1)]),
|
|
760
|
+
_: 1
|
|
761
|
+
}, 8, ["disabled"])]),
|
|
762
|
+
_: 1
|
|
763
|
+
})]),
|
|
764
|
+
_: 1
|
|
765
|
+
}, 8, ["modelValue"])]),
|
|
766
|
+
_: 1
|
|
767
|
+
}, 8, ["title"])]),
|
|
768
|
+
_: 1
|
|
769
|
+
}, 8, ["modelValue"]);
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
}), promptDlg_default = /* @__PURE__ */ defineComponent({
|
|
773
|
+
__name: "index",
|
|
774
|
+
setup(e) {
|
|
775
|
+
let { t: T } = useI18n(), E = ref(""), D = ref(""), O = ref(""), k = ref(""), A = ref(""), N = ref(), P = ref(""), L = ref(""), R = ref(""), B = ref(""), V = ref(""), H = 0, U = !1, G = useTemplateRef("target"), { open: q } = useViewStack("promptDlg", async (e) => {
|
|
776
|
+
E.value = e.title, D.value = e.subtitle ?? "", O.value = e.text, k.value = e.label, A.value = e.placeholder, N.value = e.rules, P.value = e.value, L.value = e.cancel?.color ?? "primary", R.value = e.cancel?.text ?? T("dlg.common.cancel"), B.value = e.confirm?.color ?? "primary", V.value = e.confirm?.text ?? T("dlg.common.confirm"), H = e.seq, U = !1, q.value = !0, await waitUtil(() => !!G.value), G.value.focus();
|
|
777
|
+
}), X = ref(!1), Q = () => {
|
|
778
|
+
q.value = !1, U ||= (eventBus.emit("promptDlgResult" + H, P.value ?? ""), !0);
|
|
779
|
+
};
|
|
780
|
+
return watch(q, (e) => {
|
|
781
|
+
!e && !U && (eventBus.emit("promptDlgResult" + H, void 0), U = !0);
|
|
782
|
+
}), (e, T) => {
|
|
783
|
+
let H = resolveComponent("v-card-text"), U = resolveComponent("v-text-field"), K = resolveComponent("v-btn"), J = resolveComponent("v-card-actions"), Y = resolveComponent("v-form"), Z = resolveComponent("v-card"), $ = resolveComponent("v-dialog");
|
|
784
|
+
return openBlock(), createBlock($, {
|
|
785
|
+
modelValue: unref(q),
|
|
786
|
+
"onUpdate:modelValue": T[3] ||= (e) => isRef(q) ? q.value = e : null,
|
|
787
|
+
attach: "",
|
|
788
|
+
"max-width": "600px",
|
|
789
|
+
transition: "dialog-top-transition",
|
|
790
|
+
onKeydown: T[4] ||= withKeys(withModifiers((e) => q.value = !1, ["stop", "prevent"]), ["esc"])
|
|
791
|
+
}, {
|
|
792
|
+
default: withCtx(() => [createVNode(Z, {
|
|
793
|
+
subtitle: D.value,
|
|
794
|
+
title: E.value
|
|
795
|
+
}, {
|
|
796
|
+
default: withCtx(() => [O.value ? (openBlock(), createBlock(H, { key: 0 }, {
|
|
797
|
+
default: withCtx(() => [createTextVNode(toDisplayString(O.value), 1)]),
|
|
798
|
+
_: 1
|
|
799
|
+
})) : createCommentVNode("", !0), createVNode(Y, {
|
|
800
|
+
modelValue: X.value,
|
|
801
|
+
"onUpdate:modelValue": T[2] ||= (e) => X.value = e,
|
|
802
|
+
class: "mx-3",
|
|
803
|
+
onSubmit: withModifiers(Q, ["prevent"])
|
|
804
|
+
}, {
|
|
805
|
+
default: withCtx(() => [createVNode(U, {
|
|
806
|
+
ref_key: "target",
|
|
807
|
+
ref: G,
|
|
808
|
+
modelValue: P.value,
|
|
809
|
+
"onUpdate:modelValue": T[0] ||= (e) => P.value = e,
|
|
810
|
+
label: k.value,
|
|
811
|
+
placeholder: A.value,
|
|
812
|
+
rules: N.value
|
|
813
|
+
}, null, 8, [
|
|
814
|
+
"modelValue",
|
|
815
|
+
"label",
|
|
816
|
+
"placeholder",
|
|
817
|
+
"rules"
|
|
818
|
+
]), createVNode(J, { class: "d-flex justify-end" }, {
|
|
819
|
+
default: withCtx(() => [createVNode(K, {
|
|
820
|
+
color: L.value,
|
|
821
|
+
variant: "text",
|
|
822
|
+
onClick: T[1] ||= (e) => q.value = !1
|
|
823
|
+
}, {
|
|
824
|
+
default: withCtx(() => [createTextVNode(toDisplayString(R.value), 1)]),
|
|
825
|
+
_: 1
|
|
826
|
+
}, 8, ["color"]), createVNode(K, {
|
|
827
|
+
color: B.value,
|
|
828
|
+
disabled: !X.value,
|
|
829
|
+
type: "submit",
|
|
830
|
+
variant: "text"
|
|
831
|
+
}, {
|
|
832
|
+
default: withCtx(() => [createTextVNode(toDisplayString(V.value), 1)]),
|
|
833
|
+
_: 1
|
|
834
|
+
}, 8, ["color", "disabled"])]),
|
|
835
|
+
_: 1
|
|
836
|
+
})]),
|
|
837
|
+
_: 1
|
|
838
|
+
}, 8, ["modelValue"])]),
|
|
839
|
+
_: 1
|
|
840
|
+
}, 8, ["subtitle", "title"])]),
|
|
841
|
+
_: 1
|
|
842
|
+
}, 8, ["modelValue"]);
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
}), _hoisted_1 = { class: "ma-auto" }, _hoisted_2 = { class: "w-100 h-100 d-flex align-center justify-center" }, _hoisted_3 = { class: "text-body-1" }, waitDlg_default = /* @__PURE__ */ defineComponent({
|
|
846
|
+
__name: "index",
|
|
847
|
+
setup(e) {
|
|
848
|
+
let { t: T } = useI18n(), E = ref(""), D = (e) => {
|
|
849
|
+
E.value = e.text ?? T("dlg.common.responding"), k.value = !0;
|
|
850
|
+
}, O = () => {
|
|
851
|
+
k.value = !1;
|
|
852
|
+
}, { open: k } = useViewStack("waitDlg", D);
|
|
853
|
+
return onMounted(() => {
|
|
854
|
+
eventBus.on("closeWaitDlg", O);
|
|
855
|
+
}), onBeforeUnmount(() => {
|
|
856
|
+
eventBus.off("closeWaitDlg", O);
|
|
857
|
+
}), (e, T) => {
|
|
858
|
+
let D = resolveComponent("v-card"), O = resolveComponent("v-dialog");
|
|
859
|
+
return openBlock(), createBlock(O, {
|
|
860
|
+
modelValue: unref(k),
|
|
861
|
+
"onUpdate:modelValue": T[0] ||= (e) => isRef(k) ? k.value = e : null,
|
|
862
|
+
attach: "",
|
|
863
|
+
fullscreen: "",
|
|
864
|
+
"no-click-animation": "",
|
|
865
|
+
persistent: ""
|
|
866
|
+
}, {
|
|
867
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(D, {
|
|
868
|
+
height: "80px",
|
|
869
|
+
loading: "",
|
|
870
|
+
width: "300px"
|
|
871
|
+
}, {
|
|
872
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(E.value), 1)])]),
|
|
873
|
+
_: 1
|
|
874
|
+
})])]),
|
|
875
|
+
_: 1
|
|
876
|
+
}, 8, ["modelValue"]);
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
});
|
|
880
|
+
const install = (e) => {
|
|
881
|
+
e.component("XConfirmDlg", confirmDlg_default), e.component("XLoading", loading_default), e.component("XMessage", message_default), e.component("XNumberDlg", numberDlg_default), e.component("XPromptDlg", promptDlg_default), e.component("XWaitDlg", waitDlg_default);
|
|
951
882
|
};
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
Ke as Permission,
|
|
958
|
-
tt as addView,
|
|
959
|
-
Ee as appAppear,
|
|
960
|
-
zt as clearViews,
|
|
961
|
-
Lt as closeWaitDlg,
|
|
962
|
-
Ct as createAxios,
|
|
963
|
-
Qt as default,
|
|
964
|
-
at as delView,
|
|
965
|
-
u as eventBus,
|
|
966
|
-
Wt as getTypeColor,
|
|
967
|
-
jt as globalObjects,
|
|
968
|
-
ye as hasView,
|
|
969
|
-
It as injectDark,
|
|
970
|
-
Ut as injectLastAppPath,
|
|
971
|
-
$t as injectLocale,
|
|
972
|
-
Et as injectPermissionChecksum,
|
|
973
|
-
He as injectPermissionObjects,
|
|
974
|
-
Qe as injectViews,
|
|
975
|
-
et as isEmpty,
|
|
976
|
-
ce as isExist,
|
|
977
|
-
Xt as lastView,
|
|
978
|
-
Jt as loadLocaleMessageEssential,
|
|
979
|
-
G as matchRouteMeta,
|
|
980
|
-
Tt as messageError,
|
|
981
|
-
At as messageInfo,
|
|
982
|
-
Mt as messageSuccess,
|
|
983
|
-
Bt as messageWarning,
|
|
984
|
-
Kt as onBeforeEach,
|
|
985
|
-
qt as openConfirmDlg,
|
|
986
|
-
Ot as openNumberDlg,
|
|
987
|
-
St as openPromptDlg,
|
|
988
|
-
Rt as openWaitDlg,
|
|
989
|
-
ot as popView,
|
|
990
|
-
We as provideDark,
|
|
991
|
-
Ge as provideLastAppPath,
|
|
992
|
-
Xe as provideLocale,
|
|
993
|
-
Fe as providePermissionChecksum,
|
|
994
|
-
ze as providePermissionObjects,
|
|
995
|
-
Je as provideViews,
|
|
996
|
-
P as routeTransName,
|
|
997
|
-
Nt as types,
|
|
998
|
-
Te as useColor,
|
|
999
|
-
Ht as useMicroApp,
|
|
1000
|
-
Ft as usePermission,
|
|
1001
|
-
Gt as useSystem,
|
|
1002
|
-
Q as useViewStack,
|
|
1003
|
-
Ne as verifyPermission,
|
|
1004
|
-
Vt as waitMs,
|
|
1005
|
-
H as waitUtil
|
|
883
|
+
var __rolldown_dynamic_import_helper_default = (e, T, E) => {
|
|
884
|
+
let D = T.lastIndexOf("?"), O = e[D === -1 || D < T.lastIndexOf("/") ? T : T.slice(0, D)];
|
|
885
|
+
return O ? typeof O == "function" ? O() : Promise.resolve(O) : new Promise((e, D) => {
|
|
886
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(D.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + T + (T.split("/").length === E ? "" : ". Note that variables only represent file names one level deep."))));
|
|
887
|
+
});
|
|
1006
888
|
};
|
|
889
|
+
async function loadLocaleMessageEssential(e) {
|
|
890
|
+
return (await __rolldown_dynamic_import_helper_default({
|
|
891
|
+
"./locales/en/index.ts": () => import("./en.lh9n40a2.js"),
|
|
892
|
+
"./locales/zhHans/index.ts": () => import("./zhHans.k0vi0ko0.js")
|
|
893
|
+
}, `./locales/${e}/index.ts`, 4)).default;
|
|
894
|
+
}
|
|
895
|
+
var src_default = { install };
|
|
896
|
+
export { Permission, addView, appAppear, clearViews, closeWaitDlg, createAxios, src_default as default, delView, eventBus, getTypeColor, getTypeDefault, globalObjects, hasView, injectDark, injectLastAppPath, injectLocale, injectPermissionChecksum, injectPermissionObjects, injectViews, isEmpty, isExist, lastView, loadLocaleMessageEssential, matchRouteMeta, messageError, messageInfo, messageSuccess, messageWarning, onBeforeEach, openConfirmDlg, openNumberDlg, openPromptDlg, openWaitDlg, popView, provideDark, provideLastAppPath, provideLocale, providePermissionChecksum, providePermissionObjects, provideViews, routeTransName, types, useColor, useMicroApp, usePermission, useSystem, useViewStack, verifyPermission, waitMs, waitUtil };
|