x-essential-lib 0.5.38 → 0.5.40
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 +119 -117
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as i, watch as N, computed as f, onMounted as S, onBeforeUnmount as T, defineComponent as U, resolveComponent as h, openBlock as V, createBlock as E, unref as F, isRef as G, withKeys as M, withModifiers as W, withCtx as w, createVNode as k, createTextVNode as B, toDisplayString as
|
|
2
|
+
import { ref as i, watch as N, computed as f, onMounted as S, onBeforeUnmount as T, defineComponent as U, resolveComponent as h, openBlock as V, createBlock as E, unref as F, isRef as G, withKeys as M, withModifiers as W, withCtx as w, createVNode as k, createTextVNode as B, toDisplayString as j, createElementBlock as J, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
|
|
3
3
|
import { useTheme as H, useLocale as Q, useDisplay as ke } from "vuetify";
|
|
4
4
|
import { defineStore as le } from "pinia";
|
|
5
5
|
import be from "axios";
|
|
6
|
-
import { useRouter as
|
|
6
|
+
import { useRouter as ne, useRoute as Ce } from "vue-router";
|
|
7
7
|
const Y = le(
|
|
8
8
|
"global",
|
|
9
9
|
() => {
|
|
10
|
-
const e = H(), a = i(), t = i("en"), l = i({}), o = i(""),
|
|
10
|
+
const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), r = i("/");
|
|
11
11
|
return N(
|
|
12
12
|
a,
|
|
13
13
|
() => {
|
|
14
|
-
|
|
14
|
+
window.dispatchEvent(
|
|
15
|
+
new CustomEvent("darkchange", { detail: a.value })
|
|
16
|
+
), e.global.name.value = a.value ? "dark" : "light";
|
|
15
17
|
},
|
|
16
18
|
{ immediate: !0 }
|
|
17
19
|
), {
|
|
@@ -19,7 +21,7 @@ const Y = le(
|
|
|
19
21
|
locale: t,
|
|
20
22
|
permissionObjects: l,
|
|
21
23
|
permissionChecksum: o,
|
|
22
|
-
lastAppPath:
|
|
24
|
+
lastAppPath: r
|
|
23
25
|
};
|
|
24
26
|
},
|
|
25
27
|
{
|
|
@@ -34,7 +36,7 @@ const Y = le(
|
|
|
34
36
|
}
|
|
35
37
|
]
|
|
36
38
|
}
|
|
37
|
-
),
|
|
39
|
+
), re = le("viewMgr", () => {
|
|
38
40
|
const e = i([]);
|
|
39
41
|
function a() {
|
|
40
42
|
return e.value.length <= 0;
|
|
@@ -50,11 +52,11 @@ const Y = le(
|
|
|
50
52
|
function o(p) {
|
|
51
53
|
e.value.push(p);
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function r(p) {
|
|
54
56
|
const _ = e.value.findIndex((v) => v === p);
|
|
55
57
|
_ !== -1 && e.value.splice(_, e.value.length - _);
|
|
56
58
|
}
|
|
57
|
-
function
|
|
59
|
+
function n() {
|
|
58
60
|
console.assert(e.value.length > 0), e.value.pop();
|
|
59
61
|
}
|
|
60
62
|
function c() {
|
|
@@ -66,8 +68,8 @@ const Y = le(
|
|
|
66
68
|
lastView: t,
|
|
67
69
|
hasView: l,
|
|
68
70
|
addView: o,
|
|
69
|
-
delView:
|
|
70
|
-
popView:
|
|
71
|
+
delView: r,
|
|
72
|
+
popView: n,
|
|
71
73
|
clearViews: c
|
|
72
74
|
};
|
|
73
75
|
});
|
|
@@ -92,38 +94,38 @@ var De = {
|
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
96
|
function X(e, a) {
|
|
95
|
-
function t(o,
|
|
97
|
+
function t(o, r, n) {
|
|
96
98
|
if (!(typeof document > "u")) {
|
|
97
|
-
|
|
99
|
+
n = L({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
98
100
|
var c = "";
|
|
99
|
-
for (var p in
|
|
100
|
-
|
|
101
|
-
return document.cookie = o + "=" + e.write(
|
|
101
|
+
for (var p in n)
|
|
102
|
+
n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
|
|
103
|
+
return document.cookie = o + "=" + e.write(r, o) + c;
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
106
|
function l(o) {
|
|
105
107
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
106
|
-
for (var
|
|
107
|
-
var p =
|
|
108
|
+
for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
|
|
109
|
+
var p = r[c].split("="), _ = p.slice(1).join("=");
|
|
108
110
|
try {
|
|
109
111
|
var v = decodeURIComponent(p[0]);
|
|
110
|
-
if (
|
|
112
|
+
if (n[v] = e.read(_, v), o === v)
|
|
111
113
|
break;
|
|
112
114
|
} catch {
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
return o ?
|
|
117
|
+
return o ? n[o] : n;
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
return Object.create(
|
|
119
121
|
{
|
|
120
122
|
set: t,
|
|
121
123
|
get: l,
|
|
122
|
-
remove: function(o,
|
|
124
|
+
remove: function(o, r) {
|
|
123
125
|
t(
|
|
124
126
|
o,
|
|
125
127
|
"",
|
|
126
|
-
L({},
|
|
128
|
+
L({}, r, {
|
|
127
129
|
expires: -1
|
|
128
130
|
})
|
|
129
131
|
);
|
|
@@ -179,9 +181,9 @@ function Oe(e, a) {
|
|
|
179
181
|
}), a(l), Promise.reject(e);
|
|
180
182
|
}
|
|
181
183
|
function Te() {
|
|
182
|
-
R.remove("accessToken"), R.remove("refreshToken"), R.remove("activeOrg"),
|
|
184
|
+
R.remove("accessToken"), R.remove("refreshToken"), R.remove("activeOrg"), ne().replace({ path: "/passport/login" });
|
|
183
185
|
}
|
|
184
|
-
function
|
|
186
|
+
function Ae(e) {
|
|
185
187
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
186
188
|
var l = e.get(a);
|
|
187
189
|
l ? l.push(t) : e.set(a, [t]);
|
|
@@ -198,9 +200,9 @@ function je(e) {
|
|
|
198
200
|
} };
|
|
199
201
|
}
|
|
200
202
|
const s = function() {
|
|
201
|
-
return window.eventBus || (window.eventBus =
|
|
203
|
+
return window.eventBus || (window.eventBus = Ae()), window.eventBus;
|
|
202
204
|
}();
|
|
203
|
-
async function
|
|
205
|
+
async function nt(e) {
|
|
204
206
|
return new Promise((a) => {
|
|
205
207
|
setTimeout(a, e);
|
|
206
208
|
});
|
|
@@ -208,13 +210,13 @@ async function rt(e) {
|
|
|
208
210
|
async function Z(e, a, t) {
|
|
209
211
|
const l = Date.now();
|
|
210
212
|
return new Promise((o) => {
|
|
211
|
-
const
|
|
212
|
-
e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(
|
|
213
|
+
const r = async () => {
|
|
214
|
+
e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
|
|
213
215
|
};
|
|
214
|
-
|
|
216
|
+
r();
|
|
215
217
|
});
|
|
216
218
|
}
|
|
217
|
-
function
|
|
219
|
+
function je(e, a) {
|
|
218
220
|
var o;
|
|
219
221
|
if (!window.appAppear) {
|
|
220
222
|
window.appAppear = !0;
|
|
@@ -234,12 +236,12 @@ let Ie = 0;
|
|
|
234
236
|
function ue() {
|
|
235
237
|
return ++Ie;
|
|
236
238
|
}
|
|
237
|
-
async function
|
|
239
|
+
async function rt(e) {
|
|
238
240
|
if (!ce())
|
|
239
241
|
return;
|
|
240
242
|
let a = !1, t;
|
|
241
|
-
const l = (
|
|
242
|
-
t =
|
|
243
|
+
const l = (r) => {
|
|
244
|
+
t = r, a = !0;
|
|
243
245
|
}, o = ue();
|
|
244
246
|
return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await Z(() => a), s.off("confirmDlgResult" + o, l), t;
|
|
245
247
|
}
|
|
@@ -247,8 +249,8 @@ async function ct(e) {
|
|
|
247
249
|
if (!ce())
|
|
248
250
|
return;
|
|
249
251
|
let a = !1, t;
|
|
250
|
-
const l = (
|
|
251
|
-
t =
|
|
252
|
+
const l = (r) => {
|
|
253
|
+
t = r, a = !0;
|
|
252
254
|
}, o = ue();
|
|
253
255
|
return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await Z(() => a), s.off("promptDlgResult" + o, l), t;
|
|
254
256
|
}
|
|
@@ -396,21 +398,21 @@ function z(e) {
|
|
|
396
398
|
let a, t = 0;
|
|
397
399
|
const l = e.split("/").filter((o) => o.trim() !== "");
|
|
398
400
|
return Re.forEach((o) => {
|
|
399
|
-
const
|
|
400
|
-
let
|
|
401
|
-
for (let c = 0; c < l.length && !(c >=
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
const r = o.path.split("/").filter((c) => c.trim() !== "");
|
|
402
|
+
let n = 0;
|
|
403
|
+
for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
|
|
404
|
+
n++;
|
|
405
|
+
n > 0 && n >= t && (a = o, t = n);
|
|
404
406
|
}), a;
|
|
405
407
|
}
|
|
406
408
|
const oe = i("");
|
|
407
409
|
function D(e, a) {
|
|
408
|
-
const
|
|
409
|
-
a === "/" && (a = t);
|
|
410
|
-
const l = z(e), o = z(a),
|
|
410
|
+
const t = Y();
|
|
411
|
+
a === "/" && (a = t.lastAppPath);
|
|
412
|
+
const l = z(e), o = z(a), r = (l == null ? void 0 : l.app) === (o == null ? void 0 : o.app), n = (l == null ? void 0 : l.path) === (o == null ? void 0 : o.path), c = ((l == null ? void 0 : l.level) ?? -1) >= ((o == null ? void 0 : o.level) ?? -1);
|
|
411
413
|
console.info(
|
|
412
|
-
`~~~~before route change~~~~ ${a} -> ${e} inner=${
|
|
413
|
-
),
|
|
414
|
+
`~~~~before route change~~~~ ${a} -> ${e} inner=${r} forward=${c}`
|
|
415
|
+
), r ? n ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : l && je(l.app, c), t.lastAppPath = "/";
|
|
414
416
|
}
|
|
415
417
|
function Ee() {
|
|
416
418
|
return !!R.get("accessToken");
|
|
@@ -419,55 +421,55 @@ function Ue() {
|
|
|
419
421
|
return !!R.get("activeOrg");
|
|
420
422
|
}
|
|
421
423
|
function ft(e, a, t) {
|
|
422
|
-
const l = Ee(), o = Ue(),
|
|
423
|
-
if (!
|
|
424
|
+
const l = Ee(), o = Ue(), r = z(e.path);
|
|
425
|
+
if (!r) {
|
|
424
426
|
t();
|
|
425
427
|
return;
|
|
426
428
|
}
|
|
427
|
-
if (
|
|
429
|
+
if (r.requiredState === "auth")
|
|
428
430
|
if (l)
|
|
429
431
|
if (o) {
|
|
430
|
-
const
|
|
431
|
-
D(
|
|
432
|
+
const n = "/main";
|
|
433
|
+
D(n, a.path), t({ path: n });
|
|
432
434
|
} else
|
|
433
435
|
D(e.path, a.path), t();
|
|
434
436
|
else {
|
|
435
|
-
const
|
|
436
|
-
D(
|
|
437
|
+
const n = "/passport/login";
|
|
438
|
+
D(n, a.path), t({ path: n });
|
|
437
439
|
}
|
|
438
|
-
else if (
|
|
440
|
+
else if (r.requiredState === "org")
|
|
439
441
|
if (l)
|
|
440
442
|
if (o)
|
|
441
443
|
D(e.path, a.path), t();
|
|
442
444
|
else {
|
|
443
|
-
const
|
|
444
|
-
D(
|
|
445
|
+
const n = "/org/joinOrCreate";
|
|
446
|
+
D(n, a.path), t({ path: n });
|
|
445
447
|
}
|
|
446
448
|
else {
|
|
447
|
-
const
|
|
448
|
-
D(
|
|
449
|
+
const n = "/passport/login";
|
|
450
|
+
D(n, a.path), t({ path: n });
|
|
449
451
|
}
|
|
450
452
|
else if (l)
|
|
451
453
|
if (o) {
|
|
452
|
-
const
|
|
453
|
-
D(
|
|
454
|
+
const n = "/main";
|
|
455
|
+
D(n, a.path), t({ path: n });
|
|
454
456
|
} else {
|
|
455
|
-
const
|
|
456
|
-
D(
|
|
457
|
+
const n = "/org/joinOrCreate";
|
|
458
|
+
D(n, a.path), t({ path: n });
|
|
457
459
|
}
|
|
458
460
|
else
|
|
459
461
|
D(e.path, a.path), t();
|
|
460
462
|
}
|
|
461
463
|
function P(e, a) {
|
|
462
|
-
const t =
|
|
464
|
+
const t = re(), l = f({
|
|
463
465
|
get() {
|
|
464
466
|
return t.hasView(e);
|
|
465
467
|
},
|
|
466
|
-
set(
|
|
467
|
-
|
|
468
|
+
set(r) {
|
|
469
|
+
r ? t.addView(e) : t.delView(e);
|
|
468
470
|
}
|
|
469
|
-
}), o = (
|
|
470
|
-
a == null || a(
|
|
471
|
+
}), o = (r) => {
|
|
472
|
+
a == null || a(r), l.value = !0;
|
|
471
473
|
};
|
|
472
474
|
return S(() => {
|
|
473
475
|
s.on(e, o);
|
|
@@ -478,27 +480,27 @@ function P(e, a) {
|
|
|
478
480
|
const $e = /* @__PURE__ */ U({
|
|
479
481
|
__name: "index",
|
|
480
482
|
setup(e) {
|
|
481
|
-
const a = Q(), { open: t } = P("confirmDlg"), l = i(""), o = i(""),
|
|
483
|
+
const a = Q(), { open: t } = P("confirmDlg"), l = i(""), o = i(""), r = i(), n = i(), c = f(() => {
|
|
482
484
|
var u;
|
|
483
|
-
return ((u =
|
|
485
|
+
return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
|
|
484
486
|
}), p = f(() => {
|
|
485
487
|
var u;
|
|
486
|
-
return ((u =
|
|
488
|
+
return ((u = r.value) == null ? void 0 : u.text) ?? a.t("cancel");
|
|
487
489
|
}), _ = f(() => {
|
|
488
490
|
var u;
|
|
489
|
-
return ((u =
|
|
491
|
+
return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
|
|
490
492
|
}), v = f(() => {
|
|
491
493
|
var u;
|
|
492
|
-
return ((u =
|
|
494
|
+
return ((u = n.value) == null ? void 0 : u.text) ?? a.t("confirm");
|
|
493
495
|
});
|
|
494
496
|
let y = 0, C = !1;
|
|
495
|
-
const
|
|
496
|
-
l.value = u.title, o.value = u.text,
|
|
497
|
+
const A = (u) => {
|
|
498
|
+
l.value = u.title, o.value = u.text, r.value = u.cancel, n.value = u.confirm, y = u.seq, C = !1, t.value = !0;
|
|
497
499
|
};
|
|
498
500
|
S(() => {
|
|
499
|
-
s.on("confirmDlg",
|
|
501
|
+
s.on("confirmDlg", A);
|
|
500
502
|
}), T(() => {
|
|
501
|
-
s.off("confirmDlg",
|
|
503
|
+
s.off("confirmDlg", A);
|
|
502
504
|
});
|
|
503
505
|
const I = () => {
|
|
504
506
|
t.value = !1, C || (s.emit("confirmDlgResult" + y, !0), C = !0);
|
|
@@ -522,7 +524,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
522
524
|
default: w(() => [
|
|
523
525
|
k(b, null, {
|
|
524
526
|
default: w(() => [
|
|
525
|
-
B(
|
|
527
|
+
B(j(o.value), 1)
|
|
526
528
|
]),
|
|
527
529
|
_: 1
|
|
528
530
|
}),
|
|
@@ -534,7 +536,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
534
536
|
variant: "text"
|
|
535
537
|
}, {
|
|
536
538
|
default: w(() => [
|
|
537
|
-
B(
|
|
539
|
+
B(j(p.value), 1)
|
|
538
540
|
]),
|
|
539
541
|
_: 1
|
|
540
542
|
}, 8, ["color"]),
|
|
@@ -544,7 +546,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
544
546
|
variant: "text"
|
|
545
547
|
}, {
|
|
546
548
|
default: w(() => [
|
|
547
|
-
B(
|
|
549
|
+
B(j(v.value), 1)
|
|
548
550
|
]),
|
|
549
551
|
_: 1
|
|
550
552
|
}, 8, ["color"])
|
|
@@ -587,7 +589,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
587
589
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
588
590
|
zIndex: t.zIndex
|
|
589
591
|
}));
|
|
590
|
-
return (o,
|
|
592
|
+
return (o, r) => (V(), J("div", {
|
|
591
593
|
class: "x-cont",
|
|
592
594
|
style: ge(l.value)
|
|
593
595
|
}, ze, 4));
|
|
@@ -612,21 +614,21 @@ const $e = /* @__PURE__ */ U({
|
|
|
612
614
|
setTimeout(() => {
|
|
613
615
|
o("timeout", t.id);
|
|
614
616
|
}, t.timeout);
|
|
615
|
-
}), N(l, (
|
|
616
|
-
|
|
617
|
-
}), (
|
|
617
|
+
}), N(l, (r) => {
|
|
618
|
+
r || o("timeout", t.id);
|
|
619
|
+
}), (r, n) => {
|
|
618
620
|
const c = h("v-alert");
|
|
619
621
|
return V(), E(c, {
|
|
620
622
|
modelValue: l.value,
|
|
621
|
-
"onUpdate:modelValue":
|
|
623
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
|
|
622
624
|
class: "mt-2",
|
|
623
625
|
"max-width": "90%",
|
|
624
626
|
width: "500px",
|
|
625
627
|
elevation: "1",
|
|
626
628
|
density: "compact",
|
|
627
629
|
closable: "",
|
|
628
|
-
type:
|
|
629
|
-
text:
|
|
630
|
+
type: r.type,
|
|
631
|
+
text: r.text
|
|
630
632
|
}, null, 8, ["modelValue", "type", "text"]);
|
|
631
633
|
};
|
|
632
634
|
}
|
|
@@ -640,15 +642,15 @@ const $e = /* @__PURE__ */ U({
|
|
|
640
642
|
s.off("message", t);
|
|
641
643
|
});
|
|
642
644
|
const t = (c) => {
|
|
643
|
-
|
|
645
|
+
r(c.type, c.text, c.timeout);
|
|
644
646
|
}, l = (c) => {
|
|
645
|
-
|
|
647
|
+
n(c);
|
|
646
648
|
};
|
|
647
649
|
let o = 0;
|
|
648
|
-
const
|
|
650
|
+
const r = (c, p, _) => {
|
|
649
651
|
const v = o++;
|
|
650
652
|
a.items.push({ id: v, type: c, text: p, timeout: _ });
|
|
651
|
-
},
|
|
653
|
+
}, n = (c) => {
|
|
652
654
|
const p = a.items.findIndex((_) => _.id === c);
|
|
653
655
|
p >= 0 && a.items.splice(p, 1);
|
|
654
656
|
};
|
|
@@ -670,13 +672,13 @@ const $e = /* @__PURE__ */ U({
|
|
|
670
672
|
}), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ U({
|
|
671
673
|
__name: "index",
|
|
672
674
|
setup(e) {
|
|
673
|
-
const a = Q(), { open: t } = P("promptDlg"), l = i(""), o = i(""),
|
|
675
|
+
const a = Q(), { open: t } = P("promptDlg"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), _ = i(), v = i(), y = f(() => {
|
|
674
676
|
var d;
|
|
675
677
|
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
676
678
|
}), C = f(() => {
|
|
677
679
|
var d;
|
|
678
680
|
return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
679
|
-
}),
|
|
681
|
+
}), A = f(() => {
|
|
680
682
|
var d;
|
|
681
683
|
return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
|
|
682
684
|
}), I = f(() => {
|
|
@@ -686,7 +688,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
686
688
|
let g = 0, b = !1;
|
|
687
689
|
const q = async (d) => {
|
|
688
690
|
var x;
|
|
689
|
-
l.value = d.title, o.value = d.text,
|
|
691
|
+
l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel, v.value = d.confirm, g = d.seq, b = !1, t.value = !0, await Z(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
|
|
690
692
|
};
|
|
691
693
|
S(() => {
|
|
692
694
|
s.on("promptDlg", q);
|
|
@@ -715,7 +717,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
715
717
|
default: w(() => [
|
|
716
718
|
o.value ? (V(), E($, { key: 0 }, {
|
|
717
719
|
default: w(() => [
|
|
718
|
-
B(
|
|
720
|
+
B(j(o.value), 1)
|
|
719
721
|
]),
|
|
720
722
|
_: 1
|
|
721
723
|
})) : ye("", !0),
|
|
@@ -724,8 +726,8 @@ const $e = /* @__PURE__ */ U({
|
|
|
724
726
|
k(se, {
|
|
725
727
|
modelValue: p.value,
|
|
726
728
|
"onUpdate:modelValue": x[0] || (x[0] = (K) => p.value = K),
|
|
727
|
-
label:
|
|
728
|
-
placeholder:
|
|
729
|
+
label: r.value,
|
|
730
|
+
placeholder: n.value,
|
|
729
731
|
rules: c.value,
|
|
730
732
|
ref_key: "target",
|
|
731
733
|
ref: u
|
|
@@ -741,17 +743,17 @@ const $e = /* @__PURE__ */ U({
|
|
|
741
743
|
variant: "text"
|
|
742
744
|
}, {
|
|
743
745
|
default: w(() => [
|
|
744
|
-
B(
|
|
746
|
+
B(j(C.value), 1)
|
|
745
747
|
]),
|
|
746
748
|
_: 1
|
|
747
749
|
}, 8, ["color"]),
|
|
748
750
|
k(ee, {
|
|
749
751
|
onClick: O,
|
|
750
|
-
color:
|
|
752
|
+
color: A.value,
|
|
751
753
|
variant: "text"
|
|
752
754
|
}, {
|
|
753
755
|
default: w(() => [
|
|
754
|
-
B(
|
|
756
|
+
B(j(I.value), 1)
|
|
755
757
|
]),
|
|
756
758
|
_: 1
|
|
757
759
|
}, 8, ["color"])
|
|
@@ -778,11 +780,11 @@ const $e = /* @__PURE__ */ U({
|
|
|
778
780
|
s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
|
|
779
781
|
}), T(() => {
|
|
780
782
|
s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
|
|
781
|
-
}), (
|
|
783
|
+
}), (r, n) => {
|
|
782
784
|
const c = h("v-card"), p = h("v-dialog");
|
|
783
785
|
return V(), E(p, {
|
|
784
786
|
modelValue: F(t),
|
|
785
|
-
"onUpdate:modelValue":
|
|
787
|
+
"onUpdate:modelValue": n[0] || (n[0] = (_) => G(t) ? t.value = _ : null),
|
|
786
788
|
persistent: "",
|
|
787
789
|
"no-click-animation": "",
|
|
788
790
|
fullscreen: ""
|
|
@@ -796,7 +798,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
796
798
|
}, {
|
|
797
799
|
default: w(() => [
|
|
798
800
|
m("div", Ge, [
|
|
799
|
-
m("span", null,
|
|
801
|
+
m("span", null, j(F(a).t("waitingResponse")), 1)
|
|
800
802
|
])
|
|
801
803
|
]),
|
|
802
804
|
_: 1
|
|
@@ -811,14 +813,14 @@ const $e = /* @__PURE__ */ U({
|
|
|
811
813
|
e.component("x-confirm-dlg", $e), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
|
|
812
814
|
};
|
|
813
815
|
function gt() {
|
|
814
|
-
const e = H(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"),
|
|
816
|
+
const e = H(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
815
817
|
return {
|
|
816
818
|
primaryColor: a,
|
|
817
819
|
secondaryColor: t,
|
|
818
820
|
backgroundColor0: l,
|
|
819
821
|
backgroundColor1: o,
|
|
820
|
-
backgroundColor2:
|
|
821
|
-
highlightColor:
|
|
822
|
+
backgroundColor2: r,
|
|
823
|
+
highlightColor: n,
|
|
822
824
|
borderColor: c
|
|
823
825
|
};
|
|
824
826
|
}
|
|
@@ -826,16 +828,16 @@ function Ze(e, a) {
|
|
|
826
828
|
return e.post("pullPermission", a);
|
|
827
829
|
}
|
|
828
830
|
function vt(e, a) {
|
|
829
|
-
const t = Ce(), l =
|
|
830
|
-
let
|
|
831
|
+
const t = Ce(), l = ne(), o = Y(), r = re();
|
|
832
|
+
let n = !0;
|
|
831
833
|
const c = () => {
|
|
832
|
-
|
|
834
|
+
n = !1;
|
|
833
835
|
}, p = () => {
|
|
834
|
-
|
|
836
|
+
n = !0;
|
|
835
837
|
}, _ = () => {
|
|
836
838
|
var g;
|
|
837
|
-
if (!
|
|
838
|
-
|
|
839
|
+
if (!r.isEmpty()) {
|
|
840
|
+
r.hasView("waitDlg") || r.popView();
|
|
839
841
|
return;
|
|
840
842
|
}
|
|
841
843
|
const u = z(t.path);
|
|
@@ -872,7 +874,7 @@ function vt(e, a) {
|
|
|
872
874
|
});
|
|
873
875
|
let y;
|
|
874
876
|
const C = async () => {
|
|
875
|
-
if (!
|
|
877
|
+
if (!n)
|
|
876
878
|
return;
|
|
877
879
|
const u = z(t.path);
|
|
878
880
|
if (!(!u || u.requiredState !== "org"))
|
|
@@ -893,15 +895,15 @@ function vt(e, a) {
|
|
|
893
895
|
} catch (g) {
|
|
894
896
|
console.error(g);
|
|
895
897
|
}
|
|
896
|
-
},
|
|
898
|
+
}, A = async (u) => {
|
|
897
899
|
u && await C(), clearTimeout(y), y = setTimeout(async () => {
|
|
898
|
-
await C(), y &&
|
|
900
|
+
await C(), y && A();
|
|
899
901
|
}, 3e3);
|
|
900
902
|
}, I = () => {
|
|
901
903
|
clearTimeout(y), y = void 0;
|
|
902
904
|
};
|
|
903
905
|
S(() => {
|
|
904
|
-
a &&
|
|
906
|
+
a && A(!0);
|
|
905
907
|
}), T(() => {
|
|
906
908
|
I();
|
|
907
909
|
});
|
|
@@ -921,7 +923,7 @@ function ht() {
|
|
|
921
923
|
const wt = { install: Ye };
|
|
922
924
|
export {
|
|
923
925
|
Be as Permission,
|
|
924
|
-
|
|
926
|
+
je as appAppear,
|
|
925
927
|
pt as closeWaitDlg,
|
|
926
928
|
lt as createAxios,
|
|
927
929
|
wt as default,
|
|
@@ -933,7 +935,7 @@ export {
|
|
|
933
935
|
dt as messageSuccess,
|
|
934
936
|
it as messageWarning,
|
|
935
937
|
ft as onBeforeEach,
|
|
936
|
-
|
|
938
|
+
rt as openConfirmDlg,
|
|
937
939
|
ct as openPromptDlg,
|
|
938
940
|
ut as openWaitDlg,
|
|
939
941
|
oe as routeTransName,
|
|
@@ -942,8 +944,8 @@ export {
|
|
|
942
944
|
vt as useMicroApp,
|
|
943
945
|
mt as usePermission,
|
|
944
946
|
ht as useSystem,
|
|
945
|
-
|
|
947
|
+
re as useViewMgrStore,
|
|
946
948
|
P as useViewStack,
|
|
947
|
-
|
|
949
|
+
nt as waitMs,
|
|
948
950
|
Z as waitUtil
|
|
949
951
|
};
|