x-essential-lib 0.8.13 → 0.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +144 -138
- package/dist/utils/misc.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.fade-leave-active[data-v-0c686889]{transition:opacity .5s ease}.fade-leave-to[data-v-0c686889]{opacity:0}.x-cont[data-v-0c686889]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-0c686889]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-0c686889]{transform-origin:20px 20px;animation:lds-spinner-0c686889 1.2s linear infinite}.lds-spinner div[data-v-0c686889]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-0c686889]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-0c686889]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-0c686889]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-0c686889]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-0c686889]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-0c686889]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-0c686889]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-0c686889]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-0c686889]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-0c686889]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-0c686889]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-0c686889]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-0c686889{0%{opacity:1}to{opacity:0}}.x-item[data-v-74835a85]{width:600px}@media (max-width: 600px){.x-item[data-v-74835a85]{width:calc(100vw - 16px)}}.x-cont[data-v-c6a59757]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { computed as
|
|
2
|
+
import { computed as b, provide as B, inject as I, ref as f, watchEffect as oe, onMounted as K, onBeforeUnmount as U, onBeforeMount as be, defineComponent as A, watch as Y, resolveComponent as h, createBlock as R, openBlock as q, withKeys as J, unref as H, withModifiers as $, isRef as F, withCtx as m, createVNode as x, createTextVNode as L, toDisplayString as O, Transition as xe, createElementBlock as Q, createCommentVNode as Z, normalizeStyle as ne, createElementVNode as v, Fragment as ke, renderList as Ce, useTemplateRef as De } from "vue";
|
|
3
3
|
import { useI18n as P } from "vue-i18n";
|
|
4
4
|
import { useTheme as ue, useDisplay as qe } from "vuetify";
|
|
5
|
-
import { useRouter as ce, useRoute as
|
|
6
|
-
import
|
|
7
|
-
import { a as M, m as
|
|
5
|
+
import { useRouter as ce, useRoute as je } from "vue-router";
|
|
6
|
+
import Ve from "axios";
|
|
7
|
+
import { a as M, m as Se, u as Oe, b as Re, c as Te, d as Le, e as Me, f as Be } from "./vendor.i6w3s9o3.js";
|
|
8
8
|
function Ie() {
|
|
9
|
-
const e = ue(), t =
|
|
9
|
+
const e = ue(), t = b(() => e.global.current.value.colors.primary), a = b(() => e.global.current.value.colors.secondary), o = b(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), r = b(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = b(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = b(() => e.current.value.dark ? "#303030" : "#f6f6f6"), l = b(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
10
10
|
return {
|
|
11
11
|
primaryColor: t,
|
|
12
12
|
secondaryColor: a,
|
|
@@ -17,8 +17,8 @@ function Ie() {
|
|
|
17
17
|
borderColor: l
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const t =
|
|
20
|
+
function jt(e) {
|
|
21
|
+
const t = Ve.create({
|
|
22
22
|
timeout: 6e3
|
|
23
23
|
});
|
|
24
24
|
return t.defaults.baseURL = e.baseUrl, t.interceptors.request.use(
|
|
@@ -52,8 +52,13 @@ function $e(e, t) {
|
|
|
52
52
|
function Ke() {
|
|
53
53
|
M.remove("accessToken"), M.remove("refreshToken"), M.remove("activeOrg"), ce().replace({ path: "/passport/login" });
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
return window.
|
|
55
|
+
const Vt = function() {
|
|
56
|
+
return window.globalObjects || (window.globalObjects = {
|
|
57
|
+
router: null,
|
|
58
|
+
i18n: null
|
|
59
|
+
}), window.globalObjects;
|
|
60
|
+
}(), u = function() {
|
|
61
|
+
return window.eventBus || (window.eventBus = Se()), window.eventBus;
|
|
57
62
|
}();
|
|
58
63
|
async function St(e) {
|
|
59
64
|
return new Promise((t) => {
|
|
@@ -84,7 +89,7 @@ let Xe = 0;
|
|
|
84
89
|
function se() {
|
|
85
90
|
return ++Xe;
|
|
86
91
|
}
|
|
87
|
-
async function
|
|
92
|
+
async function Ot(e) {
|
|
88
93
|
if (!pe())
|
|
89
94
|
return;
|
|
90
95
|
let t = !1, a;
|
|
@@ -102,22 +107,22 @@ async function Rt(e) {
|
|
|
102
107
|
}, r = se();
|
|
103
108
|
return u.on("promptDlgResult" + r, o), u.emit("promptDlg", { ...e, seq: r }), await ee(() => t), u.off("promptDlgResult" + r, o), a;
|
|
104
109
|
}
|
|
105
|
-
function
|
|
110
|
+
function Tt(e) {
|
|
106
111
|
u.emit("openWaitDlg", { text: e });
|
|
107
112
|
}
|
|
108
|
-
function
|
|
113
|
+
function Lt() {
|
|
109
114
|
u.emit("closeWaitDlg");
|
|
110
115
|
}
|
|
111
|
-
function
|
|
116
|
+
function Mt(e, t) {
|
|
112
117
|
u.emit("message", { type: "error", text: e, timeout: t });
|
|
113
118
|
}
|
|
114
|
-
function
|
|
119
|
+
function Bt(e, t) {
|
|
115
120
|
u.emit("message", { type: "info", text: e, timeout: t });
|
|
116
121
|
}
|
|
117
|
-
function
|
|
122
|
+
function It(e, t) {
|
|
118
123
|
u.emit("message", { type: "success", text: e, timeout: t });
|
|
119
124
|
}
|
|
120
|
-
function
|
|
125
|
+
function At(e, t) {
|
|
121
126
|
u.emit("message", { type: "warning", text: e, timeout: t });
|
|
122
127
|
}
|
|
123
128
|
var ze = /* @__PURE__ */ ((e) => (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))(ze || {});
|
|
@@ -138,35 +143,35 @@ function Ne(e, t, a) {
|
|
|
138
143
|
const o = e[t];
|
|
139
144
|
return o ? a ? !(!le(o.includes, a) || le(o.excludes, a)) : !0 : !1;
|
|
140
145
|
}
|
|
141
|
-
const _e = "essentialDark", de = "essentialLocale",
|
|
146
|
+
const _e = "essentialDark", de = "essentialLocale", ie = "essentialPermissionObjects", fe = "essentialPermissionChecksum", ge = "essentialLastAppPath", ve = "essentialViews";
|
|
142
147
|
function He(e) {
|
|
143
148
|
B(_e, e);
|
|
144
149
|
}
|
|
145
|
-
function
|
|
150
|
+
function Et() {
|
|
146
151
|
return I(_e);
|
|
147
152
|
}
|
|
148
153
|
function Fe(e) {
|
|
149
154
|
B(de, e);
|
|
150
155
|
}
|
|
151
|
-
function
|
|
156
|
+
function Ut() {
|
|
152
157
|
return I(de);
|
|
153
158
|
}
|
|
154
159
|
function Ge(e) {
|
|
155
|
-
B(
|
|
160
|
+
B(ie, e);
|
|
156
161
|
}
|
|
157
162
|
function Je() {
|
|
158
|
-
return I(
|
|
163
|
+
return I(ie);
|
|
159
164
|
}
|
|
160
165
|
function Qe(e) {
|
|
161
|
-
B(
|
|
166
|
+
B(fe, e);
|
|
162
167
|
}
|
|
163
|
-
function
|
|
164
|
-
return I(
|
|
168
|
+
function $t() {
|
|
169
|
+
return I(fe);
|
|
165
170
|
}
|
|
166
171
|
function Ye(e) {
|
|
167
172
|
B(ge, e);
|
|
168
173
|
}
|
|
169
|
-
function
|
|
174
|
+
function Kt() {
|
|
170
175
|
return I(ge);
|
|
171
176
|
}
|
|
172
177
|
function Ze(e) {
|
|
@@ -294,8 +299,8 @@ function N(e) {
|
|
|
294
299
|
c > 0 && c > a && (t = r, a = c);
|
|
295
300
|
}), t;
|
|
296
301
|
}
|
|
297
|
-
const G =
|
|
298
|
-
function
|
|
302
|
+
const G = f("");
|
|
303
|
+
function S(e, t, a) {
|
|
299
304
|
t === "/" && (t = a);
|
|
300
305
|
const o = N(e), r = N(t);
|
|
301
306
|
if (!o) {
|
|
@@ -313,7 +318,7 @@ function tt() {
|
|
|
313
318
|
function at() {
|
|
314
319
|
return !!M.get("activeOrg");
|
|
315
320
|
}
|
|
316
|
-
function
|
|
321
|
+
function Wt(e, t, a, o) {
|
|
317
322
|
const r = tt(), n = at(), c = N(e.path);
|
|
318
323
|
if (!c) {
|
|
319
324
|
console.assert(!1), a();
|
|
@@ -323,40 +328,40 @@ function Kt(e, t, a, o) {
|
|
|
323
328
|
if (r)
|
|
324
329
|
if (n) {
|
|
325
330
|
const l = "/main";
|
|
326
|
-
|
|
331
|
+
S(l, t.path, o), a({ path: l });
|
|
327
332
|
} else
|
|
328
|
-
|
|
333
|
+
S(e.path, t.path, o), a();
|
|
329
334
|
else {
|
|
330
335
|
const l = "/passport/login";
|
|
331
|
-
|
|
336
|
+
S(l, t.path, o), a({ path: l });
|
|
332
337
|
}
|
|
333
338
|
else if (c.requiredState === "org")
|
|
334
339
|
if (r)
|
|
335
340
|
if (n)
|
|
336
|
-
|
|
341
|
+
S(e.path, t.path, o), a();
|
|
337
342
|
else {
|
|
338
343
|
const l = "/org/joinOrCreate";
|
|
339
|
-
|
|
344
|
+
S(l, t.path, o), a({ path: l });
|
|
340
345
|
}
|
|
341
346
|
else {
|
|
342
347
|
const l = "/passport/login";
|
|
343
|
-
|
|
348
|
+
S(l, t.path, o), a({ path: l });
|
|
344
349
|
}
|
|
345
350
|
else if (r)
|
|
346
351
|
if (n) {
|
|
347
352
|
const l = "/main";
|
|
348
|
-
|
|
353
|
+
S(l, t.path, o), a({ path: l });
|
|
349
354
|
} else {
|
|
350
355
|
const l = "/org/joinOrCreate";
|
|
351
|
-
|
|
356
|
+
S(l, t.path, o), a({ path: l });
|
|
352
357
|
}
|
|
353
358
|
else
|
|
354
|
-
|
|
359
|
+
S(e.path, t.path, o), a();
|
|
355
360
|
}
|
|
356
361
|
function ot(e) {
|
|
357
362
|
return e.value.length <= 0;
|
|
358
363
|
}
|
|
359
|
-
function
|
|
364
|
+
function Xt(e) {
|
|
360
365
|
if (e.value.length > 0)
|
|
361
366
|
return e.value[e.value.length - 1];
|
|
362
367
|
}
|
|
@@ -374,14 +379,14 @@ function lt(e, t) {
|
|
|
374
379
|
function nt(e) {
|
|
375
380
|
console.assert(e.value.length > 0), e.value.pop();
|
|
376
381
|
}
|
|
377
|
-
function
|
|
382
|
+
function zt(e) {
|
|
378
383
|
e.value = [];
|
|
379
384
|
}
|
|
380
|
-
function
|
|
381
|
-
const c =
|
|
385
|
+
function Nt(e, t, a, o, r, n) {
|
|
386
|
+
const c = je(), l = ce(), _ = Oe(), p = f(!1);
|
|
382
387
|
oe(() => {
|
|
383
|
-
let
|
|
384
|
-
typeof e.value == "boolean" ?
|
|
388
|
+
let i = !1;
|
|
389
|
+
typeof e.value == "boolean" ? i = e.value : i = _.value, p.value = i;
|
|
385
390
|
}), He(p), Fe(t), Ge(a), Qe(o), Ye(r), Ze(n);
|
|
386
391
|
const w = ue();
|
|
387
392
|
oe(() => {
|
|
@@ -393,19 +398,19 @@ function zt(e, t, a, o, r, n) {
|
|
|
393
398
|
me(n, "waitDlg") || nt(n);
|
|
394
399
|
return;
|
|
395
400
|
}
|
|
396
|
-
const
|
|
397
|
-
if (!
|
|
401
|
+
const i = N(c.path);
|
|
402
|
+
if (!i) {
|
|
398
403
|
console.assert(!1);
|
|
399
404
|
return;
|
|
400
405
|
}
|
|
401
|
-
|
|
406
|
+
i.level === 0 ? (k = navigator == null ? void 0 : navigator.Backbutton) == null || k.goHome(
|
|
402
407
|
() => {
|
|
403
408
|
},
|
|
404
409
|
() => {
|
|
405
410
|
}
|
|
406
411
|
) : l.back();
|
|
407
|
-
},
|
|
408
|
-
if (
|
|
412
|
+
}, j = (i) => {
|
|
413
|
+
if (i.key === "Escape") {
|
|
409
414
|
y();
|
|
410
415
|
return;
|
|
411
416
|
}
|
|
@@ -413,27 +418,27 @@ function zt(e, t, a, o, r, n) {
|
|
|
413
418
|
y();
|
|
414
419
|
};
|
|
415
420
|
K(() => {
|
|
416
|
-
window.addEventListener("keydown",
|
|
421
|
+
window.addEventListener("keydown", j), u.on("backbutton", C);
|
|
417
422
|
}), U(() => {
|
|
418
|
-
window.removeEventListener("keydown",
|
|
423
|
+
window.removeEventListener("keydown", j), u.off("backbutton", C);
|
|
419
424
|
});
|
|
420
|
-
const d = (
|
|
421
|
-
e.value =
|
|
422
|
-
},
|
|
423
|
-
t.value =
|
|
424
|
-
}, g = (
|
|
425
|
-
const k =
|
|
425
|
+
const d = (i) => {
|
|
426
|
+
e.value = i;
|
|
427
|
+
}, V = (i) => {
|
|
428
|
+
t.value = i;
|
|
429
|
+
}, g = (i) => {
|
|
430
|
+
const k = i;
|
|
426
431
|
a.value = k[0], o.value = k[1];
|
|
427
|
-
}, D = (
|
|
428
|
-
r.value =
|
|
432
|
+
}, D = (i) => {
|
|
433
|
+
r.value = i;
|
|
429
434
|
};
|
|
430
|
-
|
|
431
|
-
u.on("updateDark", d), u.on("updateLocale",
|
|
435
|
+
be(() => {
|
|
436
|
+
u.on("updateDark", d), u.on("updateLocale", V), u.on("updatePermission", g), u.on("updateLastAppPath", D), u.emit("syncGlobalState");
|
|
432
437
|
}), U(() => {
|
|
433
|
-
u.off("updateDark", d), u.off("updateLocale",
|
|
438
|
+
u.off("updateDark", d), u.off("updateLocale", V), u.off("updatePermission", g), u.off("updateLastAppPath", D);
|
|
434
439
|
});
|
|
435
440
|
}
|
|
436
|
-
function
|
|
441
|
+
function Ht() {
|
|
437
442
|
const e = Je();
|
|
438
443
|
function t(a, o) {
|
|
439
444
|
return Ne(
|
|
@@ -444,8 +449,8 @@ function Nt() {
|
|
|
444
449
|
}
|
|
445
450
|
return { verifyPermission: t };
|
|
446
451
|
}
|
|
447
|
-
function
|
|
448
|
-
const e =
|
|
452
|
+
function Ft() {
|
|
453
|
+
const e = b(() => !!window.cordova), t = qe(), a = b(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
449
454
|
function o() {
|
|
450
455
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
451
456
|
navigator.userAgent
|
|
@@ -454,7 +459,7 @@ function Ht() {
|
|
|
454
459
|
return { sysBarAvail: e, compactWidth: a, isMobile: o };
|
|
455
460
|
}
|
|
456
461
|
function te(e, t) {
|
|
457
|
-
const a = Pe(), o =
|
|
462
|
+
const a = Pe(), o = b({
|
|
458
463
|
get() {
|
|
459
464
|
return me(a, e);
|
|
460
465
|
},
|
|
@@ -473,20 +478,20 @@ function te(e, t) {
|
|
|
473
478
|
const ut = /* @__PURE__ */ A({
|
|
474
479
|
__name: "index",
|
|
475
480
|
setup(e) {
|
|
476
|
-
const { t } = P(), a =
|
|
481
|
+
const { t } = P(), a = f(""), o = f(""), r = f(""), n = f(""), c = f(""), l = f("");
|
|
477
482
|
let _ = 0, p = !1;
|
|
478
483
|
const w = (C) => {
|
|
479
|
-
var
|
|
484
|
+
var V, g, D, i;
|
|
480
485
|
const d = C;
|
|
481
|
-
a.value = d.title, o.value = d.text, r.value = ((
|
|
482
|
-
}, { open: y } = te("confirmDlg", w),
|
|
486
|
+
a.value = d.title, o.value = d.text, r.value = ((V = d.cancel) == null ? void 0 : V.color) ?? "primary", n.value = ((g = d.cancel) == null ? void 0 : g.text) ?? t("dlg.common.cancel"), c.value = ((D = d.confirm) == null ? void 0 : D.color) ?? "primary", l.value = ((i = d.confirm) == null ? void 0 : i.text) ?? t("dlg.common.confirm"), _ = d.seq, p = !1, y.value = !0;
|
|
487
|
+
}, { open: y } = te("confirmDlg", w), j = () => {
|
|
483
488
|
y.value = !1, p || (u.emit("confirmDlgResult" + _, !0), p = !0);
|
|
484
489
|
};
|
|
485
490
|
return Y(y, (C) => {
|
|
486
491
|
!C && !p && (u.emit("confirmDlgResult" + _, !1), p = !0);
|
|
487
492
|
}), (C, d) => {
|
|
488
|
-
const
|
|
489
|
-
return q(),
|
|
493
|
+
const V = h("v-card-text"), g = h("v-btn"), D = h("v-card-actions"), i = h("v-card"), k = h("v-dialog");
|
|
494
|
+
return q(), R(k, {
|
|
490
495
|
modelValue: H(y),
|
|
491
496
|
"onUpdate:modelValue": d[1] || (d[1] = (s) => F(y) ? y.value = s : null),
|
|
492
497
|
transition: "dialog-top-transition",
|
|
@@ -494,37 +499,37 @@ const ut = /* @__PURE__ */ A({
|
|
|
494
499
|
attach: "",
|
|
495
500
|
onKeydown: [
|
|
496
501
|
d[2] || (d[2] = J($((s) => y.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
497
|
-
J($(
|
|
502
|
+
J($(j, ["stop", "prevent"]), ["enter"])
|
|
498
503
|
]
|
|
499
504
|
}, {
|
|
500
505
|
default: m(() => [
|
|
501
|
-
|
|
506
|
+
x(i, { title: a.value }, {
|
|
502
507
|
default: m(() => [
|
|
503
|
-
|
|
508
|
+
x(V, null, {
|
|
504
509
|
default: m(() => [
|
|
505
|
-
L(
|
|
510
|
+
L(O(o.value), 1)
|
|
506
511
|
]),
|
|
507
512
|
_: 1
|
|
508
513
|
}),
|
|
509
|
-
|
|
514
|
+
x(D, { class: "d-flex justify-end" }, {
|
|
510
515
|
default: m(() => [
|
|
511
|
-
|
|
516
|
+
x(g, {
|
|
512
517
|
color: r.value,
|
|
513
518
|
variant: "text",
|
|
514
519
|
onClick: d[0] || (d[0] = (s) => y.value = !1)
|
|
515
520
|
}, {
|
|
516
521
|
default: m(() => [
|
|
517
|
-
L(
|
|
522
|
+
L(O(n.value), 1)
|
|
518
523
|
]),
|
|
519
524
|
_: 1
|
|
520
525
|
}, 8, ["color"]),
|
|
521
|
-
|
|
526
|
+
x(g, {
|
|
522
527
|
color: c.value,
|
|
523
528
|
variant: "text",
|
|
524
|
-
onClick:
|
|
529
|
+
onClick: j
|
|
525
530
|
}, {
|
|
526
531
|
default: m(() => [
|
|
527
|
-
L(
|
|
532
|
+
L(O(l.value), 1)
|
|
528
533
|
]),
|
|
529
534
|
_: 1
|
|
530
535
|
}, 8, ["color"])
|
|
@@ -546,12 +551,12 @@ const ut = /* @__PURE__ */ A({
|
|
|
546
551
|
zIndex: { default: 1 }
|
|
547
552
|
},
|
|
548
553
|
setup(e) {
|
|
549
|
-
const { backgroundColor2: t } = Ie(), a =
|
|
554
|
+
const { backgroundColor2: t } = Ie(), a = b(() => ({
|
|
550
555
|
background: t.value,
|
|
551
556
|
zIndex: e.zIndex
|
|
552
557
|
}));
|
|
553
558
|
let o = 0;
|
|
554
|
-
return (r, n) => (q(),
|
|
559
|
+
return (r, n) => (q(), R(xe, { name: "fade" }, {
|
|
555
560
|
default: m(() => [
|
|
556
561
|
r.open ? (q(), Q("div", {
|
|
557
562
|
key: F(o) ? ++o.value : ++o,
|
|
@@ -592,10 +597,10 @@ const ut = /* @__PURE__ */ A({
|
|
|
592
597
|
},
|
|
593
598
|
emits: ["timeout"],
|
|
594
599
|
setup(e, { emit: t }) {
|
|
595
|
-
const a =
|
|
600
|
+
const a = b(() => ({
|
|
596
601
|
width: "calc(100% - 64px)",
|
|
597
602
|
overflowWrap: "break-word"
|
|
598
|
-
})), o =
|
|
603
|
+
})), o = b(() => {
|
|
599
604
|
switch (e.type) {
|
|
600
605
|
case "success":
|
|
601
606
|
return Me;
|
|
@@ -604,11 +609,11 @@ const ut = /* @__PURE__ */ A({
|
|
|
604
609
|
case "error":
|
|
605
610
|
return Te;
|
|
606
611
|
case "warning":
|
|
607
|
-
return
|
|
612
|
+
return Re;
|
|
608
613
|
default:
|
|
609
614
|
return "";
|
|
610
615
|
}
|
|
611
|
-
}), r =
|
|
616
|
+
}), r = f(!0), n = t;
|
|
612
617
|
return K(() => {
|
|
613
618
|
setTimeout(() => {
|
|
614
619
|
n("timeout", e.id);
|
|
@@ -617,21 +622,21 @@ const ut = /* @__PURE__ */ A({
|
|
|
617
622
|
c || n("timeout", e.id);
|
|
618
623
|
}), (c, l) => {
|
|
619
624
|
const _ = h("v-icon"), p = h("v-sheet");
|
|
620
|
-
return q(),
|
|
625
|
+
return q(), R(p, {
|
|
621
626
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
622
627
|
color: c.type,
|
|
623
628
|
elevation: 1
|
|
624
629
|
}, {
|
|
625
630
|
default: m(() => [
|
|
626
|
-
o.value ? (q(),
|
|
631
|
+
o.value ? (q(), R(_, {
|
|
627
632
|
key: 0,
|
|
628
633
|
class: "mx-1",
|
|
629
634
|
icon: o.value
|
|
630
635
|
}, null, 8, ["icon"])) : Z("", !0),
|
|
631
636
|
v("div", {
|
|
632
637
|
style: ne(a.value)
|
|
633
|
-
},
|
|
634
|
-
|
|
638
|
+
}, O(c.text), 5),
|
|
639
|
+
x(_, {
|
|
635
640
|
class: "mx-1",
|
|
636
641
|
icon: H(Be),
|
|
637
642
|
onClick: l[0] || (l[0] = (w) => n("timeout", c.id))
|
|
@@ -644,7 +649,7 @@ const ut = /* @__PURE__ */ A({
|
|
|
644
649
|
}), _t = /* @__PURE__ */ ae(st, [["__scopeId", "data-v-74835a85"]]), dt = /* @__PURE__ */ A({
|
|
645
650
|
__name: "index",
|
|
646
651
|
setup(e) {
|
|
647
|
-
const t =
|
|
652
|
+
const t = f([]);
|
|
648
653
|
K(() => {
|
|
649
654
|
u.on("message", a);
|
|
650
655
|
}), U(() => {
|
|
@@ -669,7 +674,7 @@ const ut = /* @__PURE__ */ A({
|
|
|
669
674
|
onClick: _[0] || (_[0] = $(() => {
|
|
670
675
|
}, ["stop"]))
|
|
671
676
|
}, [
|
|
672
|
-
(q(!0), Q(ke, null, Ce(t.value, (p) => (q(),
|
|
677
|
+
(q(!0), Q(ke, null, Ce(t.value, (p) => (q(), R(_t, {
|
|
673
678
|
id: p.id,
|
|
674
679
|
key: p.id,
|
|
675
680
|
type: p.type,
|
|
@@ -679,23 +684,23 @@ const ut = /* @__PURE__ */ A({
|
|
|
679
684
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
680
685
|
]));
|
|
681
686
|
}
|
|
682
|
-
}),
|
|
687
|
+
}), it = /* @__PURE__ */ ae(dt, [["__scopeId", "data-v-c6a59757"]]), ft = /* @__PURE__ */ A({
|
|
683
688
|
__name: "index",
|
|
684
689
|
setup(e) {
|
|
685
|
-
const { t } = P(), a =
|
|
690
|
+
const { t } = P(), a = f(""), o = f(""), r = f(""), n = f(""), c = f(), l = f(""), _ = f(""), p = f(""), w = f(""), y = f(""), j = De("target");
|
|
686
691
|
let C = 0, d = !1;
|
|
687
|
-
const
|
|
692
|
+
const V = async (k) => {
|
|
688
693
|
var W, X, E, z;
|
|
689
694
|
const s = k;
|
|
690
|
-
a.value = s.title, o.value = s.text, r.value = s.label, n.value = s.placeholder, c.value = s.rules, l.value = s.value, _.value = ((W = s.cancel) == null ? void 0 : W.color) ?? "primary", p.value = ((X = s.cancel) == null ? void 0 : X.text) ?? t("dlg.common.cancel"), w.value = ((E = s.confirm) == null ? void 0 : E.color) ?? "primary", y.value = ((z = s.confirm) == null ? void 0 : z.text) ?? t("dlg.common.confirm"), C = s.seq, d = !1, g.value = !0, await ee(() => !!
|
|
691
|
-
}, { open: g } = te("promptDlg",
|
|
695
|
+
a.value = s.title, o.value = s.text, r.value = s.label, n.value = s.placeholder, c.value = s.rules, l.value = s.value, _.value = ((W = s.cancel) == null ? void 0 : W.color) ?? "primary", p.value = ((X = s.cancel) == null ? void 0 : X.text) ?? t("dlg.common.cancel"), w.value = ((E = s.confirm) == null ? void 0 : E.color) ?? "primary", y.value = ((z = s.confirm) == null ? void 0 : z.text) ?? t("dlg.common.confirm"), C = s.seq, d = !1, g.value = !0, await ee(() => !!j.value), j.value.focus();
|
|
696
|
+
}, { open: g } = te("promptDlg", V), D = f(!1), i = () => {
|
|
692
697
|
g.value = !1, d || (u.emit("promptDlgResult" + C, l.value ?? ""), d = !0);
|
|
693
698
|
};
|
|
694
699
|
return Y(g, (k) => {
|
|
695
700
|
!k && !d && (u.emit("promptDlgResult" + C, void 0), d = !0);
|
|
696
701
|
}), (k, s) => {
|
|
697
702
|
const W = h("v-card-text"), X = h("v-text-field"), E = h("v-btn"), z = h("v-card-actions"), he = h("v-form"), ye = h("v-card"), we = h("v-dialog");
|
|
698
|
-
return q(),
|
|
703
|
+
return q(), R(we, {
|
|
699
704
|
modelValue: H(g),
|
|
700
705
|
"onUpdate:modelValue": s[3] || (s[3] = (T) => F(g) ? g.value = T : null),
|
|
701
706
|
transition: "dialog-top-transition",
|
|
@@ -704,50 +709,50 @@ const ut = /* @__PURE__ */ A({
|
|
|
704
709
|
onKeydown: s[4] || (s[4] = J($((T) => g.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
705
710
|
}, {
|
|
706
711
|
default: m(() => [
|
|
707
|
-
|
|
712
|
+
x(ye, { title: a.value }, {
|
|
708
713
|
default: m(() => [
|
|
709
|
-
o.value ? (q(),
|
|
714
|
+
o.value ? (q(), R(W, { key: 0 }, {
|
|
710
715
|
default: m(() => [
|
|
711
|
-
L(
|
|
716
|
+
L(O(o.value), 1)
|
|
712
717
|
]),
|
|
713
718
|
_: 1
|
|
714
719
|
})) : Z("", !0),
|
|
715
|
-
|
|
720
|
+
x(he, {
|
|
716
721
|
modelValue: D.value,
|
|
717
722
|
"onUpdate:modelValue": s[2] || (s[2] = (T) => D.value = T),
|
|
718
723
|
class: "mx-3",
|
|
719
|
-
onSubmit: $(
|
|
724
|
+
onSubmit: $(i, ["prevent"])
|
|
720
725
|
}, {
|
|
721
726
|
default: m(() => [
|
|
722
|
-
|
|
727
|
+
x(X, {
|
|
723
728
|
ref_key: "target",
|
|
724
|
-
ref:
|
|
729
|
+
ref: j,
|
|
725
730
|
modelValue: l.value,
|
|
726
731
|
"onUpdate:modelValue": s[0] || (s[0] = (T) => l.value = T),
|
|
727
732
|
label: r.value,
|
|
728
733
|
placeholder: n.value,
|
|
729
734
|
rules: c.value
|
|
730
735
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
731
|
-
|
|
736
|
+
x(z, { class: "d-flex justify-end" }, {
|
|
732
737
|
default: m(() => [
|
|
733
|
-
|
|
738
|
+
x(E, {
|
|
734
739
|
variant: "text",
|
|
735
740
|
color: _.value,
|
|
736
741
|
onClick: s[1] || (s[1] = (T) => g.value = !1)
|
|
737
742
|
}, {
|
|
738
743
|
default: m(() => [
|
|
739
|
-
L(
|
|
744
|
+
L(O(p.value), 1)
|
|
740
745
|
]),
|
|
741
746
|
_: 1
|
|
742
747
|
}, 8, ["color"]),
|
|
743
|
-
|
|
748
|
+
x(E, {
|
|
744
749
|
disabled: !D.value,
|
|
745
750
|
variant: "text",
|
|
746
751
|
color: w.value,
|
|
747
752
|
type: "submit"
|
|
748
753
|
}, {
|
|
749
754
|
default: m(() => [
|
|
750
|
-
L(
|
|
755
|
+
L(O(y.value), 1)
|
|
751
756
|
]),
|
|
752
757
|
_: 1
|
|
753
758
|
}, 8, ["disabled", "color"])
|
|
@@ -768,7 +773,7 @@ const ut = /* @__PURE__ */ A({
|
|
|
768
773
|
}), gt = { class: "mx-auto my-auto" }, vt = { class: "w-100 h-100 d-flex align-center justify-center" }, mt = { class: "text-body-1" }, ht = /* @__PURE__ */ A({
|
|
769
774
|
__name: "index",
|
|
770
775
|
setup(e) {
|
|
771
|
-
const { t } = P(), a =
|
|
776
|
+
const { t } = P(), a = f(""), o = (c) => {
|
|
772
777
|
const l = c;
|
|
773
778
|
a.value = l.text ?? t("dlg.common.waiting"), n.value = !0;
|
|
774
779
|
}, r = () => {
|
|
@@ -780,7 +785,7 @@ const ut = /* @__PURE__ */ A({
|
|
|
780
785
|
u.off("closeWaitDlg", r);
|
|
781
786
|
}), (c, l) => {
|
|
782
787
|
const _ = h("v-card"), p = h("v-dialog");
|
|
783
|
-
return q(),
|
|
788
|
+
return q(), R(p, {
|
|
784
789
|
modelValue: H(n),
|
|
785
790
|
"onUpdate:modelValue": l[0] || (l[0] = (w) => F(n) ? n.value = w : null),
|
|
786
791
|
persistent: "",
|
|
@@ -790,14 +795,14 @@ const ut = /* @__PURE__ */ A({
|
|
|
790
795
|
}, {
|
|
791
796
|
default: m(() => [
|
|
792
797
|
v("div", gt, [
|
|
793
|
-
|
|
798
|
+
x(_, {
|
|
794
799
|
width: "300px",
|
|
795
800
|
height: "80px",
|
|
796
801
|
loading: ""
|
|
797
802
|
}, {
|
|
798
803
|
default: m(() => [
|
|
799
804
|
v("div", vt, [
|
|
800
|
-
v("span", mt,
|
|
805
|
+
v("span", mt, O(a.value), 1)
|
|
801
806
|
])
|
|
802
807
|
]),
|
|
803
808
|
_: 1
|
|
@@ -809,7 +814,7 @@ const ut = /* @__PURE__ */ A({
|
|
|
809
814
|
};
|
|
810
815
|
}
|
|
811
816
|
}), yt = (e) => {
|
|
812
|
-
e.component("XConfirmDlg", ut), e.component("XLoading", pt), e.component("XMessage",
|
|
817
|
+
e.component("XConfirmDlg", ut), e.component("XLoading", pt), e.component("XMessage", it), e.component("XPromptDlg", ft), e.component("XWaitDlg", ht);
|
|
813
818
|
}, wt = (e, t, a) => {
|
|
814
819
|
const o = e[t];
|
|
815
820
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((r, n) => {
|
|
@@ -823,40 +828,41 @@ const ut = /* @__PURE__ */ A({
|
|
|
823
828
|
);
|
|
824
829
|
});
|
|
825
830
|
};
|
|
826
|
-
async function
|
|
831
|
+
async function Gt(e) {
|
|
827
832
|
return (await wt(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.g2u6ybqk.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.m6y1by9n.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
828
833
|
}
|
|
829
|
-
const
|
|
834
|
+
const Jt = { install: yt };
|
|
830
835
|
export {
|
|
831
836
|
ze as Permission,
|
|
832
837
|
rt as addView,
|
|
833
838
|
We as appAppear,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
839
|
+
zt as clearViews,
|
|
840
|
+
Lt as closeWaitDlg,
|
|
841
|
+
jt as createAxios,
|
|
842
|
+
Jt as default,
|
|
838
843
|
lt as delView,
|
|
839
844
|
u as eventBus,
|
|
845
|
+
Vt as globalObjects,
|
|
840
846
|
me as hasView,
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
847
|
+
Et as injectDark,
|
|
848
|
+
Kt as injectLastAppPath,
|
|
849
|
+
Ut as injectLocale,
|
|
850
|
+
$t as injectPermissionChecksum,
|
|
845
851
|
Je as injectPermissionObjects,
|
|
846
852
|
Pe as injectViews,
|
|
847
853
|
ot as isEmpty,
|
|
848
854
|
le as isExist,
|
|
849
|
-
|
|
850
|
-
|
|
855
|
+
Xt as lastView,
|
|
856
|
+
Gt as loadLocaleMessageEssential,
|
|
851
857
|
N as matchRouteMeta,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
+
Mt as messageError,
|
|
859
|
+
Bt as messageInfo,
|
|
860
|
+
It as messageSuccess,
|
|
861
|
+
At as messageWarning,
|
|
862
|
+
Wt as onBeforeEach,
|
|
863
|
+
Ot as openConfirmDlg,
|
|
858
864
|
Rt as openPromptDlg,
|
|
859
|
-
|
|
865
|
+
Tt as openWaitDlg,
|
|
860
866
|
nt as popView,
|
|
861
867
|
He as provideDark,
|
|
862
868
|
Ye as provideLastAppPath,
|
|
@@ -866,9 +872,9 @@ export {
|
|
|
866
872
|
Ze as provideViews,
|
|
867
873
|
G as routeTransName,
|
|
868
874
|
Ie as useColor,
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
875
|
+
Nt as useMicroApp,
|
|
876
|
+
Ht as usePermission,
|
|
877
|
+
Ft as useSystem,
|
|
872
878
|
te as useViewStack,
|
|
873
879
|
Ne as verifyPermission,
|
|
874
880
|
St as waitMs,
|
package/dist/utils/misc.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Emitter, EventType } from 'mitt';
|
|
2
|
+
export declare const globalObjects: {
|
|
3
|
+
router: any;
|
|
4
|
+
i18n: any;
|
|
5
|
+
};
|
|
2
6
|
export declare const eventBus: Emitter<Record<EventType, unknown>>;
|
|
3
7
|
export declare function waitMs(ms: number): Promise<void>;
|
|
4
8
|
export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
|