x-essential-lib 0.3.6 → 0.3.8
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/composables/index.d.ts +1 -0
- package/dist/composables/pullPermission.d.ts +2 -0
- package/dist/index.js +296 -255
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;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 { VAlert as
|
|
3
|
-
import { ref as m, computed as f, onMounted as
|
|
4
|
-
import { useLocale as
|
|
2
|
+
import { VAlert as he, VBtn as _e, VCard as xe, VCardActions as ye, VCardText as we, VCardTitle as ke, VDialog as be, VForm as Ce, VTextField as Ve } from "vuetify/lib/components/index.mjs";
|
|
3
|
+
import { ref as m, computed as f, onMounted as D, onBeforeUnmount as T, defineComponent as P, watch as N, resolveComponent as v, openBlock as V, createBlock as $, unref as U, isRef as F, withKeys as W, withModifiers as E, withCtx as g, createVNode as _, createTextVNode as C, toDisplayString as b, createElementBlock as z, normalizeStyle as De, pushScopeId as qe, popScopeId as Se, createElementVNode as h, reactive as Te, Fragment as Pe, renderList as Oe } from "vue";
|
|
4
|
+
import { useLocale as J, useTheme as H, useDisplay as Re } from "vuetify/lib/framework.mjs";
|
|
5
5
|
import { defineStore as oe } from "pinia";
|
|
6
|
-
import { useRouter as re, useRoute as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
6
|
+
import { useRouter as re, useRoute as je } from "vue-router";
|
|
7
|
+
import Ie from "axios";
|
|
8
|
+
const se = oe("viewMgr", () => {
|
|
9
9
|
const e = m([]);
|
|
10
10
|
function n() {
|
|
11
11
|
return e.value.length <= 0;
|
|
12
12
|
}
|
|
13
|
-
function t(
|
|
14
|
-
return e.value.find((
|
|
13
|
+
function t(s) {
|
|
14
|
+
return e.value.find((a) => a === s) !== void 0;
|
|
15
15
|
}
|
|
16
|
-
function o(
|
|
17
|
-
r(
|
|
16
|
+
function o(s) {
|
|
17
|
+
r(s), e.value.push(s);
|
|
18
18
|
}
|
|
19
|
-
function r(
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
function r(s) {
|
|
20
|
+
const a = e.value.findIndex((u) => u === s);
|
|
21
|
+
a !== -1 && e.value.splice(a, 1);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function l() {
|
|
24
24
|
e.value.pop();
|
|
25
25
|
}
|
|
26
|
-
return { isEmpty: n, hasView: t, addView: o, delView: r, popView:
|
|
26
|
+
return { isEmpty: n, hasView: t, addView: o, delView: r, popView: l };
|
|
27
27
|
});
|
|
28
|
-
function
|
|
28
|
+
function Ee(e) {
|
|
29
29
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, t) {
|
|
30
30
|
var o = e.get(n);
|
|
31
31
|
o ? o.push(t) : e.set(n, [t]);
|
|
@@ -41,71 +41,71 @@ function Ie(e) {
|
|
|
41
41
|
});
|
|
42
42
|
} };
|
|
43
43
|
}
|
|
44
|
-
const c =
|
|
45
|
-
async function
|
|
44
|
+
const c = Ee();
|
|
45
|
+
async function pt(e) {
|
|
46
46
|
return new Promise((n) => {
|
|
47
47
|
setTimeout(n, e);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
async function
|
|
50
|
+
async function X(e, n, t) {
|
|
51
51
|
const o = Date.now();
|
|
52
52
|
return new Promise((r) => {
|
|
53
|
-
const
|
|
54
|
-
e() ? r(!0) : n && Date.now() - o > n ? r(!1) : setTimeout(
|
|
53
|
+
const l = async () => {
|
|
54
|
+
e() ? r(!0) : n && Date.now() - o > n ? r(!1) : setTimeout(l, t ?? 30);
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
l();
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const t =
|
|
59
|
+
function G(e, n) {
|
|
60
|
+
const t = se(), o = f({
|
|
61
61
|
get() {
|
|
62
62
|
return t.hasView(e);
|
|
63
63
|
},
|
|
64
|
-
set(
|
|
65
|
-
|
|
64
|
+
set(l) {
|
|
65
|
+
l ? t.addView(e) : t.delView(e);
|
|
66
66
|
}
|
|
67
|
-
}), r = (
|
|
68
|
-
n == null || n(
|
|
67
|
+
}), r = (l) => {
|
|
68
|
+
n == null || n(l), o.value = !0;
|
|
69
69
|
};
|
|
70
|
-
return
|
|
70
|
+
return D(() => {
|
|
71
71
|
c.on(e, r);
|
|
72
|
-
}),
|
|
72
|
+
}), T(() => {
|
|
73
73
|
c.off(e, r);
|
|
74
74
|
}), { open: o };
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const $e = /* @__PURE__ */ P({
|
|
77
77
|
__name: "index",
|
|
78
78
|
setup(e) {
|
|
79
|
-
const n =
|
|
80
|
-
var
|
|
81
|
-
return ((
|
|
82
|
-
}),
|
|
83
|
-
var
|
|
84
|
-
return ((
|
|
79
|
+
const n = J(), { open: t } = G("confirmDlg"), o = m(""), r = m(""), l = m(), s = m(), a = f(() => {
|
|
80
|
+
var p;
|
|
81
|
+
return ((p = l.value) == null ? void 0 : p.color) ?? "primary";
|
|
82
|
+
}), u = f(() => {
|
|
83
|
+
var p;
|
|
84
|
+
return ((p = l.value) == null ? void 0 : p.text) ?? n.t("cancel");
|
|
85
85
|
}), i = f(() => {
|
|
86
|
-
var
|
|
87
|
-
return ((
|
|
86
|
+
var p;
|
|
87
|
+
return ((p = s.value) == null ? void 0 : p.color) ?? "primary";
|
|
88
88
|
}), y = f(() => {
|
|
89
|
-
var
|
|
90
|
-
return ((
|
|
89
|
+
var p;
|
|
90
|
+
return ((p = s.value) == null ? void 0 : p.text) ?? n.t("confirm");
|
|
91
91
|
});
|
|
92
|
-
let O = 0,
|
|
93
|
-
const A = (
|
|
94
|
-
o.value =
|
|
92
|
+
let O = 0, q = !1;
|
|
93
|
+
const A = (p) => {
|
|
94
|
+
o.value = p.title, r.value = p.text, l.value = p.cancel, s.value = p.confirm, O = p.seq, q = !1, t.value = !0;
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
D(() => {
|
|
97
97
|
c.on("confirmDlg", A);
|
|
98
|
-
}),
|
|
98
|
+
}), T(() => {
|
|
99
99
|
c.off("confirmDlg", A);
|
|
100
100
|
});
|
|
101
101
|
const M = () => {
|
|
102
|
-
t.value = !1,
|
|
102
|
+
t.value = !1, q || (c.emit("confirmDlgResult" + O, !0), q = !0);
|
|
103
103
|
};
|
|
104
|
-
return
|
|
105
|
-
!
|
|
106
|
-
}), (
|
|
107
|
-
const
|
|
108
|
-
return V(), $(
|
|
104
|
+
return N(t, (p) => {
|
|
105
|
+
!p && !q && (c.emit("confirmDlgResult" + O, !1), q = !0);
|
|
106
|
+
}), (p, w) => {
|
|
107
|
+
const S = v("v-card-title"), B = v("v-card-text"), R = v("v-btn"), d = v("v-card-actions"), x = v("v-card"), K = v("v-dialog");
|
|
108
|
+
return V(), $(K, {
|
|
109
109
|
modelValue: U(t),
|
|
110
110
|
"onUpdate:modelValue": w[1] || (w[1] = (j) => F(t) ? t.value = j : null),
|
|
111
111
|
onKeydown: [
|
|
@@ -118,7 +118,7 @@ const Ee = /* @__PURE__ */ T({
|
|
|
118
118
|
default: g(() => [
|
|
119
119
|
_(x, null, {
|
|
120
120
|
default: g(() => [
|
|
121
|
-
_(
|
|
121
|
+
_(S, null, {
|
|
122
122
|
default: g(() => [
|
|
123
123
|
C(b(o.value), 1)
|
|
124
124
|
]),
|
|
@@ -130,19 +130,19 @@ const Ee = /* @__PURE__ */ T({
|
|
|
130
130
|
]),
|
|
131
131
|
_: 1
|
|
132
132
|
}),
|
|
133
|
-
_(
|
|
133
|
+
_(d, { class: "d-flex justify-end" }, {
|
|
134
134
|
default: g(() => [
|
|
135
|
-
_(
|
|
135
|
+
_(R, {
|
|
136
136
|
onClick: w[0] || (w[0] = (j) => t.value = !1),
|
|
137
|
-
color:
|
|
137
|
+
color: a.value,
|
|
138
138
|
variant: "text"
|
|
139
139
|
}, {
|
|
140
140
|
default: g(() => [
|
|
141
|
-
C(b(
|
|
141
|
+
C(b(u.value), 1)
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
}, 8, ["color"]),
|
|
145
|
-
_(
|
|
145
|
+
_(R, {
|
|
146
146
|
onClick: M,
|
|
147
147
|
color: i.value,
|
|
148
148
|
variant: "text"
|
|
@@ -163,7 +163,7 @@ const Ee = /* @__PURE__ */ T({
|
|
|
163
163
|
}, 8, ["modelValue", "onKeydown"]);
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), Ae = (e) => (qe("data-v-a8f3d91f"), e = e(), Se(), e), Me = /* @__PURE__ */ Ae(() => /* @__PURE__ */ h("div", { class: "lds-spinner" }, [
|
|
167
167
|
/* @__PURE__ */ h("div"),
|
|
168
168
|
/* @__PURE__ */ h("div"),
|
|
169
169
|
/* @__PURE__ */ h("div"),
|
|
@@ -176,9 +176,9 @@ const Ee = /* @__PURE__ */ T({
|
|
|
176
176
|
/* @__PURE__ */ h("div"),
|
|
177
177
|
/* @__PURE__ */ h("div"),
|
|
178
178
|
/* @__PURE__ */ h("div")
|
|
179
|
-
], -1)),
|
|
180
|
-
|
|
181
|
-
],
|
|
179
|
+
], -1)), Be = [
|
|
180
|
+
Me
|
|
181
|
+
], Le = /* @__PURE__ */ P({
|
|
182
182
|
__name: "index",
|
|
183
183
|
props: {
|
|
184
184
|
zIndex: {
|
|
@@ -187,21 +187,21 @@ const Ee = /* @__PURE__ */ T({
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
setup(e) {
|
|
190
|
-
const n =
|
|
190
|
+
const n = H(), t = e, o = f(() => ({
|
|
191
191
|
background: n.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
192
192
|
zIndex: t.zIndex
|
|
193
193
|
}));
|
|
194
|
-
return (r,
|
|
194
|
+
return (r, l) => (V(), z("div", {
|
|
195
195
|
class: "x-cont",
|
|
196
|
-
style:
|
|
197
|
-
},
|
|
196
|
+
style: De(o.value)
|
|
197
|
+
}, Be, 4));
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), le = (e, n) => {
|
|
200
200
|
const t = e.__vccOpts || e;
|
|
201
201
|
for (const [o, r] of n)
|
|
202
202
|
t[o] = r;
|
|
203
203
|
return t;
|
|
204
|
-
},
|
|
204
|
+
}, Ue = /* @__PURE__ */ le(Le, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ P({
|
|
205
205
|
__name: "item",
|
|
206
206
|
props: {
|
|
207
207
|
id: {
|
|
@@ -223,38 +223,38 @@ const Ee = /* @__PURE__ */ T({
|
|
|
223
223
|
},
|
|
224
224
|
emits: ["timeout"],
|
|
225
225
|
setup(e, { emit: n }) {
|
|
226
|
-
const t = e, o = m(!0), r = n,
|
|
227
|
-
let
|
|
226
|
+
const t = e, o = m(!0), r = n, l = f(() => {
|
|
227
|
+
let s = "";
|
|
228
228
|
switch (t.type) {
|
|
229
229
|
case "error":
|
|
230
|
-
|
|
230
|
+
s = "cancel";
|
|
231
231
|
break;
|
|
232
232
|
case "info":
|
|
233
|
-
|
|
233
|
+
s = "info";
|
|
234
234
|
break;
|
|
235
235
|
case "success":
|
|
236
|
-
|
|
236
|
+
s = "check-circle";
|
|
237
237
|
break;
|
|
238
238
|
case "warning":
|
|
239
|
-
|
|
239
|
+
s = "error";
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return s;
|
|
243
243
|
});
|
|
244
|
-
return
|
|
244
|
+
return D(() => {
|
|
245
245
|
setTimeout(() => {
|
|
246
246
|
r("timeout", t.id);
|
|
247
247
|
}, t.timeout);
|
|
248
|
-
}),
|
|
249
|
-
|
|
250
|
-
}), (
|
|
251
|
-
const
|
|
252
|
-
return V(), $(
|
|
248
|
+
}), N(o, (s) => {
|
|
249
|
+
s || r("timeout", t.id);
|
|
250
|
+
}), (s, a) => {
|
|
251
|
+
const u = v("v-alert");
|
|
252
|
+
return V(), $(u, {
|
|
253
253
|
modelValue: o.value,
|
|
254
|
-
"onUpdate:modelValue":
|
|
254
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => o.value = i),
|
|
255
255
|
class: "mt-2",
|
|
256
256
|
type: e.type,
|
|
257
|
-
icon:
|
|
257
|
+
icon: l.value,
|
|
258
258
|
text: e.text,
|
|
259
259
|
"max-width": "90%",
|
|
260
260
|
width: "500px",
|
|
@@ -264,34 +264,34 @@ const Ee = /* @__PURE__ */ T({
|
|
|
264
264
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), Ne = /* @__PURE__ */ P({
|
|
268
268
|
__name: "index",
|
|
269
269
|
setup(e) {
|
|
270
|
-
const n =
|
|
271
|
-
|
|
270
|
+
const n = Te({ items: [] });
|
|
271
|
+
D(() => {
|
|
272
272
|
c.on("message", t);
|
|
273
|
-
}),
|
|
273
|
+
}), T(() => {
|
|
274
274
|
c.off("message", t);
|
|
275
275
|
});
|
|
276
|
-
const t = (
|
|
277
|
-
a
|
|
278
|
-
}, o = (
|
|
279
|
-
|
|
276
|
+
const t = (a) => {
|
|
277
|
+
l(a.type, a.text, a.timeout);
|
|
278
|
+
}, o = (a) => {
|
|
279
|
+
s(a);
|
|
280
280
|
};
|
|
281
281
|
let r = 0;
|
|
282
|
-
const
|
|
282
|
+
const l = (a, u, i) => {
|
|
283
283
|
const y = r++;
|
|
284
|
-
n.items.push({ id: y, type:
|
|
285
|
-
},
|
|
286
|
-
const
|
|
287
|
-
|
|
284
|
+
n.items.push({ id: y, type: a, text: u, timeout: i });
|
|
285
|
+
}, s = (a) => {
|
|
286
|
+
const u = n.items.findIndex((i) => i.id === a);
|
|
287
|
+
u >= 0 && n.items.splice(u, 1);
|
|
288
288
|
};
|
|
289
|
-
return (
|
|
290
|
-
onClick:
|
|
289
|
+
return (a, u) => (V(), z("div", {
|
|
290
|
+
onClick: u[0] || (u[0] = E(() => {
|
|
291
291
|
}, ["stop"])),
|
|
292
292
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
293
293
|
}, [
|
|
294
|
-
(V(!0), z(
|
|
294
|
+
(V(!0), z(Pe, null, Oe(n.items, (i) => (V(), $(We, {
|
|
295
295
|
onTimeout: o,
|
|
296
296
|
id: i.id,
|
|
297
297
|
type: i.type,
|
|
@@ -301,53 +301,53 @@ const Ee = /* @__PURE__ */ T({
|
|
|
301
301
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}), He = /* @__PURE__ */
|
|
304
|
+
}), He = /* @__PURE__ */ le(Ne, [["__scopeId", "data-v-70ed4b89"]]), Ke = /* @__PURE__ */ P({
|
|
305
305
|
__name: "index",
|
|
306
306
|
setup(e) {
|
|
307
|
-
const n =
|
|
308
|
-
var
|
|
309
|
-
return ((
|
|
310
|
-
}),
|
|
311
|
-
var
|
|
312
|
-
return ((
|
|
307
|
+
const n = J(), { open: t } = G("promptDlg"), o = m(""), r = m(""), l = m(), s = m(), a = m(), u = m(""), i = m(), y = m(), O = f(() => {
|
|
308
|
+
var d;
|
|
309
|
+
return ((d = i.value) == null ? void 0 : d.color) ?? "primary";
|
|
310
|
+
}), q = f(() => {
|
|
311
|
+
var d;
|
|
312
|
+
return ((d = i.value) == null ? void 0 : d.text) ?? n.t("cancel");
|
|
313
313
|
}), A = f(() => {
|
|
314
|
-
var
|
|
315
|
-
return ((
|
|
314
|
+
var d;
|
|
315
|
+
return ((d = y.value) == null ? void 0 : d.color) ?? "primary";
|
|
316
316
|
}), M = f(() => {
|
|
317
|
-
var
|
|
318
|
-
return ((
|
|
319
|
-
}),
|
|
320
|
-
let w = 0,
|
|
321
|
-
const B = async (
|
|
317
|
+
var d;
|
|
318
|
+
return ((d = y.value) == null ? void 0 : d.text) ?? n.t("confirm");
|
|
319
|
+
}), p = m();
|
|
320
|
+
let w = 0, S = !1;
|
|
321
|
+
const B = async (d) => {
|
|
322
322
|
var x;
|
|
323
|
-
o.value =
|
|
323
|
+
o.value = d.title, r.value = d.text, l.value = d.label, s.value = d.placeholder, a.value = d.rules, u.value = d.value, i.value = d.cancel, y.value = d.confirm, w = d.seq, S = !1, t.value = !0, await X(() => p.value !== void 0, 1e3), (x = p.value) == null || x.focus();
|
|
324
324
|
};
|
|
325
|
-
|
|
325
|
+
D(() => {
|
|
326
326
|
c.on("promptDlg", B);
|
|
327
|
-
}),
|
|
327
|
+
}), T(() => {
|
|
328
328
|
c.off("promptDlg", B);
|
|
329
329
|
});
|
|
330
|
-
const
|
|
331
|
-
t.value = !1,
|
|
330
|
+
const R = () => {
|
|
331
|
+
t.value = !1, S || (c.emit("promptDlgResult" + w, u.value ?? ""), S = !0);
|
|
332
332
|
};
|
|
333
|
-
return
|
|
334
|
-
!
|
|
335
|
-
}), (
|
|
336
|
-
const
|
|
337
|
-
return V(), $(
|
|
333
|
+
return N(t, (d) => {
|
|
334
|
+
!d && !S && (c.emit("promptDlgResult" + w, void 0), S = !0);
|
|
335
|
+
}), (d, x) => {
|
|
336
|
+
const K = v("v-card-title"), j = v("v-card-text"), pe = v("v-text-field"), fe = v("v-form"), Y = v("v-btn"), me = v("v-card-actions"), ve = v("v-card"), ge = v("v-dialog");
|
|
337
|
+
return V(), $(ge, {
|
|
338
338
|
modelValue: U(t),
|
|
339
339
|
"onUpdate:modelValue": x[2] || (x[2] = (I) => F(t) ? t.value = I : null),
|
|
340
340
|
onKeydown: [
|
|
341
341
|
x[3] || (x[3] = W(E((I) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
342
|
-
W(E(
|
|
342
|
+
W(E(R, ["stop", "prevent"]), ["enter"])
|
|
343
343
|
],
|
|
344
344
|
transition: "dialog-top-transition",
|
|
345
345
|
"max-width": "600px"
|
|
346
346
|
}, {
|
|
347
347
|
default: g(() => [
|
|
348
|
-
_(
|
|
348
|
+
_(ve, null, {
|
|
349
349
|
default: g(() => [
|
|
350
|
-
_(
|
|
350
|
+
_(K, null, {
|
|
351
351
|
default: g(() => [
|
|
352
352
|
C(b(o.value), 1)
|
|
353
353
|
]),
|
|
@@ -359,21 +359,21 @@ const Ee = /* @__PURE__ */ T({
|
|
|
359
359
|
]),
|
|
360
360
|
_: 1
|
|
361
361
|
}),
|
|
362
|
-
_(
|
|
362
|
+
_(fe, { class: "mx-3" }, {
|
|
363
363
|
default: g(() => [
|
|
364
|
-
_(
|
|
365
|
-
modelValue:
|
|
366
|
-
"onUpdate:modelValue": x[0] || (x[0] = (I) =>
|
|
367
|
-
label:
|
|
368
|
-
placeholder:
|
|
369
|
-
rules:
|
|
364
|
+
_(pe, {
|
|
365
|
+
modelValue: u.value,
|
|
366
|
+
"onUpdate:modelValue": x[0] || (x[0] = (I) => u.value = I),
|
|
367
|
+
label: l.value,
|
|
368
|
+
placeholder: s.value,
|
|
369
|
+
rules: a.value,
|
|
370
370
|
ref_key: "target",
|
|
371
|
-
ref:
|
|
371
|
+
ref: p
|
|
372
372
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
375
|
}),
|
|
376
|
-
_(
|
|
376
|
+
_(me, { class: "d-flex justify-end" }, {
|
|
377
377
|
default: g(() => [
|
|
378
378
|
_(Y, {
|
|
379
379
|
onClick: x[1] || (x[1] = (I) => t.value = !1),
|
|
@@ -381,12 +381,12 @@ const Ee = /* @__PURE__ */ T({
|
|
|
381
381
|
variant: "text"
|
|
382
382
|
}, {
|
|
383
383
|
default: g(() => [
|
|
384
|
-
C(b(
|
|
384
|
+
C(b(q.value), 1)
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["color"]),
|
|
388
388
|
_(Y, {
|
|
389
|
-
onClick:
|
|
389
|
+
onClick: R,
|
|
390
390
|
color: A.value,
|
|
391
391
|
variant: "text"
|
|
392
392
|
}, {
|
|
@@ -406,36 +406,36 @@ const Ee = /* @__PURE__ */ T({
|
|
|
406
406
|
}, 8, ["modelValue", "onKeydown"]);
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}),
|
|
409
|
+
}), ze = { class: "mx-auto my-auto" }, Fe = { class: "d-flex align-center justify-center w-100 h-100" }, Je = /* @__PURE__ */ P({
|
|
410
410
|
__name: "index",
|
|
411
411
|
setup(e) {
|
|
412
|
-
const n =
|
|
412
|
+
const n = J(), { open: t } = G("waitDlg"), o = () => {
|
|
413
413
|
t.value = !0;
|
|
414
414
|
}, r = () => {
|
|
415
415
|
t.value = !1;
|
|
416
416
|
};
|
|
417
|
-
return
|
|
417
|
+
return D(() => {
|
|
418
418
|
c.on("openWaitDlg", o), c.on("closeWaitDlg", r);
|
|
419
|
-
}),
|
|
419
|
+
}), T(() => {
|
|
420
420
|
c.off("openWaitDlg", o), c.off("closeWaitDlg", r);
|
|
421
|
-
}), (
|
|
422
|
-
const
|
|
423
|
-
return V(), $(
|
|
421
|
+
}), (l, s) => {
|
|
422
|
+
const a = v("v-card"), u = v("v-dialog");
|
|
423
|
+
return V(), $(u, {
|
|
424
424
|
modelValue: U(t),
|
|
425
|
-
"onUpdate:modelValue":
|
|
425
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => F(t) ? t.value = i : null),
|
|
426
426
|
persistent: "",
|
|
427
427
|
"no-click-animation": "",
|
|
428
428
|
fullscreen: ""
|
|
429
429
|
}, {
|
|
430
430
|
default: g(() => [
|
|
431
|
-
h("div",
|
|
432
|
-
_(
|
|
431
|
+
h("div", ze, [
|
|
432
|
+
_(a, {
|
|
433
433
|
width: "300px",
|
|
434
434
|
height: "80px",
|
|
435
435
|
loading: ""
|
|
436
436
|
}, {
|
|
437
437
|
default: g(() => [
|
|
438
|
-
h("div",
|
|
438
|
+
h("div", Fe, [
|
|
439
439
|
h("span", null, b(U(n).t("waitingResponse")), 1)
|
|
440
440
|
])
|
|
441
441
|
]),
|
|
@@ -448,35 +448,40 @@ const Ee = /* @__PURE__ */ T({
|
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
450
|
}), Xe = (e) => {
|
|
451
|
-
e.component("v-alert",
|
|
451
|
+
e.component("v-alert", he), e.component("v-btn", _e), e.component("v-card", xe), e.component("v-card-actions", ye), e.component("v-card-text", we), e.component("v-card-title", ke), e.component("v-dialog", be), e.component("v-form", Ce), e.component("v-text-field", Ve), e.component("x-confirm-dlg", $e), e.component("x-loading", Ue), e.component("x-message", He), e.component("x-prompt-dlg", Ke), e.component("x-wait-dlg", Je);
|
|
452
452
|
};
|
|
453
|
-
function
|
|
454
|
-
const e =
|
|
453
|
+
function ft() {
|
|
454
|
+
const e = H(), n = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), o = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), r = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), l = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), s = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), a = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
455
455
|
return {
|
|
456
456
|
primaryColor: n,
|
|
457
457
|
secondaryColor: t,
|
|
458
458
|
backgroundColor0: o,
|
|
459
459
|
backgroundColor1: r,
|
|
460
|
-
backgroundColor2:
|
|
461
|
-
highlightColor:
|
|
462
|
-
borderColor:
|
|
460
|
+
backgroundColor2: l,
|
|
461
|
+
highlightColor: s,
|
|
462
|
+
borderColor: a
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
const
|
|
465
|
+
const ae = oe(
|
|
466
466
|
"global",
|
|
467
467
|
() => {
|
|
468
|
-
const e =
|
|
469
|
-
|
|
468
|
+
const e = H(), n = m(!1);
|
|
469
|
+
N(
|
|
470
470
|
n,
|
|
471
|
-
(
|
|
472
|
-
e.global.name.value =
|
|
471
|
+
(l) => {
|
|
472
|
+
e.global.name.value = l ? "dark" : "light";
|
|
473
473
|
},
|
|
474
474
|
{
|
|
475
475
|
immediate: !0
|
|
476
476
|
}
|
|
477
477
|
);
|
|
478
478
|
const t = m("en"), o = m({}), r = m("");
|
|
479
|
-
return {
|
|
479
|
+
return {
|
|
480
|
+
dark: n,
|
|
481
|
+
locale: t,
|
|
482
|
+
permissionObjects: o,
|
|
483
|
+
permissionChecksum: r
|
|
484
|
+
};
|
|
480
485
|
},
|
|
481
486
|
{
|
|
482
487
|
persist: [
|
|
@@ -487,12 +492,12 @@ const Ge = oe(
|
|
|
487
492
|
]
|
|
488
493
|
}
|
|
489
494
|
), L = require("js-cookie");
|
|
490
|
-
function
|
|
491
|
-
const n =
|
|
495
|
+
function mt(e) {
|
|
496
|
+
const n = Ie.create({
|
|
492
497
|
timeout: 6e3
|
|
493
498
|
});
|
|
494
499
|
return n.defaults.baseURL = e.baseUrl, n.interceptors.request.use(
|
|
495
|
-
(t) =>
|
|
500
|
+
(t) => Ge(t),
|
|
496
501
|
(t) => {
|
|
497
502
|
Qe(t, e.onError);
|
|
498
503
|
}
|
|
@@ -501,7 +506,7 @@ function ft(e) {
|
|
|
501
506
|
(t) => Ze(t, e.onError)
|
|
502
507
|
), n;
|
|
503
508
|
}
|
|
504
|
-
function
|
|
509
|
+
function Ge(e) {
|
|
505
510
|
const n = L.get("accessToken") ?? "";
|
|
506
511
|
return e.headers.Authorization = "Basic " + n, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
507
512
|
}
|
|
@@ -527,51 +532,51 @@ function et() {
|
|
|
527
532
|
L.remove("accessToken"), L.remove("refreshToken"), L.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
528
533
|
}
|
|
529
534
|
let Z = Date.now();
|
|
530
|
-
function
|
|
535
|
+
function ie() {
|
|
531
536
|
const e = Date.now();
|
|
532
537
|
return e - Z > 500 ? (Z = e, !0) : !1;
|
|
533
538
|
}
|
|
534
539
|
let tt = 0;
|
|
535
|
-
function
|
|
540
|
+
function ce() {
|
|
536
541
|
return ++tt;
|
|
537
542
|
}
|
|
538
|
-
async function
|
|
539
|
-
if (!
|
|
543
|
+
async function vt(e) {
|
|
544
|
+
if (!ie())
|
|
540
545
|
return;
|
|
541
546
|
let n = !1, t;
|
|
542
|
-
const o = (
|
|
543
|
-
t =
|
|
544
|
-
}, r =
|
|
545
|
-
return c.on("confirmDlgResult" + r, o), c.emit("confirmDlg", { ...e, seq: r }), await
|
|
547
|
+
const o = (l) => {
|
|
548
|
+
t = l, n = !0;
|
|
549
|
+
}, r = ce();
|
|
550
|
+
return c.on("confirmDlgResult" + r, o), c.emit("confirmDlg", { ...e, seq: r }), await X(() => n), c.off("confirmDlgResult" + r, o), t;
|
|
546
551
|
}
|
|
547
|
-
async function
|
|
548
|
-
if (!
|
|
552
|
+
async function gt(e) {
|
|
553
|
+
if (!ie())
|
|
549
554
|
return;
|
|
550
555
|
let n = !1, t;
|
|
551
|
-
const o = (
|
|
552
|
-
t =
|
|
553
|
-
}, r =
|
|
554
|
-
return c.on("promptDlgResult" + r, o), c.emit("promptDlg", { ...e, seq: r }), await
|
|
556
|
+
const o = (l) => {
|
|
557
|
+
t = l, n = !0;
|
|
558
|
+
}, r = ce();
|
|
559
|
+
return c.on("promptDlgResult" + r, o), c.emit("promptDlg", { ...e, seq: r }), await X(() => n), c.off("promptDlgResult" + r, o), t;
|
|
555
560
|
}
|
|
556
|
-
function
|
|
561
|
+
function ht() {
|
|
557
562
|
c.emit("openWaitDlg");
|
|
558
563
|
}
|
|
559
|
-
function
|
|
564
|
+
function _t() {
|
|
560
565
|
c.emit("closeWaitDlg");
|
|
561
566
|
}
|
|
562
|
-
function
|
|
567
|
+
function xt(e, n) {
|
|
563
568
|
c.emit("message", { type: "error", text: e, timeout: n });
|
|
564
569
|
}
|
|
565
|
-
function
|
|
570
|
+
function yt(e, n) {
|
|
566
571
|
c.emit("message", { type: "info", text: e, timeout: n });
|
|
567
572
|
}
|
|
568
|
-
function
|
|
573
|
+
function wt(e, n) {
|
|
569
574
|
c.emit("message", { type: "success", text: e, timeout: n });
|
|
570
575
|
}
|
|
571
|
-
function
|
|
576
|
+
function kt(e, n) {
|
|
572
577
|
c.emit("message", { type: "warning", text: e, timeout: n });
|
|
573
578
|
}
|
|
574
|
-
function
|
|
579
|
+
function bt(e) {
|
|
575
580
|
var o, r;
|
|
576
581
|
if (!window.appAppear) {
|
|
577
582
|
window.appAppear = !0;
|
|
@@ -582,9 +587,9 @@ function kt(e) {
|
|
|
582
587
|
t.add("app-reset");
|
|
583
588
|
}, 0));
|
|
584
589
|
}
|
|
585
|
-
let
|
|
586
|
-
function
|
|
587
|
-
|
|
590
|
+
let ue = {};
|
|
591
|
+
function Ct(e) {
|
|
592
|
+
ue = e;
|
|
588
593
|
}
|
|
589
594
|
function ee(e, n) {
|
|
590
595
|
if (!e)
|
|
@@ -599,11 +604,11 @@ function ee(e, n) {
|
|
|
599
604
|
return !1;
|
|
600
605
|
}), Object.keys(t).length <= 0);
|
|
601
606
|
}
|
|
602
|
-
function
|
|
603
|
-
const t =
|
|
607
|
+
function Vt(e, n) {
|
|
608
|
+
const t = ue[e];
|
|
604
609
|
return t ? n ? (!ee(t.includes, n) || ee(t.excludes, n), !1) : !0 : !1;
|
|
605
610
|
}
|
|
606
|
-
const
|
|
611
|
+
const de = require("js-cookie"), nt = [
|
|
607
612
|
{ path: "/passport/login", level: 0 },
|
|
608
613
|
{ path: "/passport/loginAccount", level: 1 },
|
|
609
614
|
{ path: "/passport/register", level: 1 },
|
|
@@ -627,11 +632,11 @@ function Q(e) {
|
|
|
627
632
|
let n, t = 0;
|
|
628
633
|
const o = e.split("/");
|
|
629
634
|
return nt.forEach((r) => {
|
|
630
|
-
const
|
|
631
|
-
let
|
|
632
|
-
for (let
|
|
633
|
-
|
|
634
|
-
|
|
635
|
+
const l = r.path.split("/");
|
|
636
|
+
let s = 0;
|
|
637
|
+
for (let a = 0; a < o.length && !(a >= l.length || o[a] !== l[a]); a++)
|
|
638
|
+
s++;
|
|
639
|
+
s >= t && (n = r, t = s);
|
|
635
640
|
}), n;
|
|
636
641
|
}
|
|
637
642
|
function te(e) {
|
|
@@ -645,72 +650,72 @@ function te(e) {
|
|
|
645
650
|
}
|
|
646
651
|
const ne = m("");
|
|
647
652
|
function k(e, n) {
|
|
648
|
-
const t = te(e), o = te(n), r = t.app === o.app,
|
|
653
|
+
const t = te(e), o = te(n), r = t.app === o.app, l = t.path === o.path, s = t.level >= o.level;
|
|
649
654
|
console.info(
|
|
650
|
-
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${r} forward=${
|
|
651
|
-
), r ?
|
|
655
|
+
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${r} forward=${s}`
|
|
656
|
+
), r ? l ? ne.value = "" : ne.value = s ? "inner-left" : "inner-right" : window.routeExtras = { forward: s };
|
|
652
657
|
}
|
|
653
658
|
function ot() {
|
|
654
|
-
return !!
|
|
659
|
+
return !!de.get("accessToken");
|
|
655
660
|
}
|
|
656
661
|
function rt() {
|
|
657
|
-
return !!
|
|
662
|
+
return !!de.get("activeOrg");
|
|
658
663
|
}
|
|
659
|
-
function
|
|
660
|
-
const o = ot(), r = rt(),
|
|
661
|
-
if (!
|
|
664
|
+
function Dt(e, n, t) {
|
|
665
|
+
const o = ot(), r = rt(), l = Q(e.path);
|
|
666
|
+
if (!l) {
|
|
662
667
|
t();
|
|
663
668
|
return;
|
|
664
669
|
}
|
|
665
|
-
if (
|
|
670
|
+
if (l.requiredState === "auth")
|
|
666
671
|
if (o)
|
|
667
672
|
if (r) {
|
|
668
|
-
const
|
|
669
|
-
k(
|
|
673
|
+
const s = "/main";
|
|
674
|
+
k(s, n.path), t({ path: s });
|
|
670
675
|
} else
|
|
671
676
|
k(e.path, n.path), t();
|
|
672
677
|
else {
|
|
673
|
-
const
|
|
674
|
-
k(
|
|
678
|
+
const s = "/passport/login";
|
|
679
|
+
k(s, n.path), t({ path: s });
|
|
675
680
|
}
|
|
676
|
-
else if (
|
|
681
|
+
else if (l.requiredState === "org")
|
|
677
682
|
if (o)
|
|
678
683
|
if (r)
|
|
679
684
|
k(e.path, n.path), t();
|
|
680
685
|
else {
|
|
681
|
-
const
|
|
682
|
-
k(
|
|
686
|
+
const s = "/org/joinOrCreate";
|
|
687
|
+
k(s, n.path), t({ path: s });
|
|
683
688
|
}
|
|
684
689
|
else {
|
|
685
|
-
const
|
|
686
|
-
k(
|
|
690
|
+
const s = "/passport/login";
|
|
691
|
+
k(s, n.path), t({ path: s });
|
|
687
692
|
}
|
|
688
693
|
else if (o)
|
|
689
694
|
if (r) {
|
|
690
|
-
const
|
|
691
|
-
k(
|
|
695
|
+
const s = "/main";
|
|
696
|
+
k(s, n.path), t({ path: s });
|
|
692
697
|
} else {
|
|
693
|
-
const
|
|
694
|
-
k(
|
|
698
|
+
const s = "/org/joinOrCreate";
|
|
699
|
+
k(s, n.path), t({ path: s });
|
|
695
700
|
}
|
|
696
701
|
else
|
|
697
702
|
k(e.path, n.path), t();
|
|
698
703
|
}
|
|
699
|
-
function
|
|
700
|
-
const n =
|
|
704
|
+
function qt(e) {
|
|
705
|
+
const n = je(), t = re(), o = ae(), r = se(), l = (i) => {
|
|
701
706
|
if (i.key === "Escape") {
|
|
702
|
-
|
|
707
|
+
s();
|
|
703
708
|
return;
|
|
704
709
|
}
|
|
705
710
|
if (!e && i.ctrlKey && i.key.toLowerCase() === "d") {
|
|
706
|
-
|
|
711
|
+
a();
|
|
707
712
|
return;
|
|
708
713
|
}
|
|
709
714
|
if (!e && i.ctrlKey && i.key.toLowerCase() === "l") {
|
|
710
|
-
|
|
715
|
+
u();
|
|
711
716
|
return;
|
|
712
717
|
}
|
|
713
|
-
},
|
|
718
|
+
}, s = () => {
|
|
714
719
|
var y;
|
|
715
720
|
if (!r.isEmpty()) {
|
|
716
721
|
r.hasView("waitDlg") || r.popView();
|
|
@@ -723,46 +728,82 @@ function Dt(e) {
|
|
|
723
728
|
() => {
|
|
724
729
|
}
|
|
725
730
|
) : t.back();
|
|
726
|
-
},
|
|
731
|
+
}, a = () => {
|
|
727
732
|
o.dark = !o.dark;
|
|
728
|
-
},
|
|
733
|
+
}, u = () => {
|
|
729
734
|
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
730
735
|
};
|
|
731
|
-
return
|
|
732
|
-
window.addEventListener("keydown",
|
|
733
|
-
}),
|
|
734
|
-
window.removeEventListener("keydown",
|
|
736
|
+
return D(() => {
|
|
737
|
+
window.addEventListener("keydown", l, !1);
|
|
738
|
+
}), T(() => {
|
|
739
|
+
window.removeEventListener("keydown", l, !1);
|
|
740
|
+
}), {};
|
|
741
|
+
}
|
|
742
|
+
function st(e, n) {
|
|
743
|
+
return e.post("pullPermission", n);
|
|
744
|
+
}
|
|
745
|
+
function St(e) {
|
|
746
|
+
const n = ae();
|
|
747
|
+
let t;
|
|
748
|
+
const o = () => {
|
|
749
|
+
clearTimeout(t), t = setTimeout(async () => {
|
|
750
|
+
await r(), t && o();
|
|
751
|
+
}, 3e3);
|
|
752
|
+
}, r = async () => {
|
|
753
|
+
try {
|
|
754
|
+
const { update: l, permissions: s } = await st(e, {
|
|
755
|
+
checksum: n.permissionChecksum
|
|
756
|
+
});
|
|
757
|
+
if (!l)
|
|
758
|
+
return;
|
|
759
|
+
const a = {};
|
|
760
|
+
for (let u in s) {
|
|
761
|
+
if (u === "checksum")
|
|
762
|
+
continue;
|
|
763
|
+
const i = s[u];
|
|
764
|
+
a[u] = JSON.parse(i);
|
|
765
|
+
}
|
|
766
|
+
n.permissionObjects = a, n.permissionChecksum = s.checksum ?? "";
|
|
767
|
+
} catch (l) {
|
|
768
|
+
console.error(l);
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
return D(() => {
|
|
772
|
+
r(), o();
|
|
773
|
+
}), T(() => {
|
|
774
|
+
clearTimeout(t), t = void 0;
|
|
735
775
|
}), {};
|
|
736
776
|
}
|
|
737
|
-
function
|
|
738
|
-
const e =
|
|
777
|
+
function Tt() {
|
|
778
|
+
const e = H(), { width: n } = Re(), t = f(() => e.global.name.value), o = f(() => !!window.cordova), r = f(() => n.value <= 1280 ? n.value + "px" : n.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
739
779
|
return { dark: t, sysBarAvail: o, compactWidth: r };
|
|
740
780
|
}
|
|
741
|
-
const
|
|
781
|
+
const Pt = { install: Xe };
|
|
742
782
|
export {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
783
|
+
bt as appAppear,
|
|
784
|
+
_t as closeWaitDlg,
|
|
785
|
+
mt as createAxios,
|
|
786
|
+
Pt as default,
|
|
747
787
|
c as eventBus,
|
|
748
788
|
Q as matchRouteMeta,
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
789
|
+
xt as messageError,
|
|
790
|
+
yt as messageInfo,
|
|
791
|
+
wt as messageSuccess,
|
|
792
|
+
kt as messageWarning,
|
|
793
|
+
Dt as onBeforeEach,
|
|
794
|
+
vt as openConfirmDlg,
|
|
795
|
+
gt as openPromptDlg,
|
|
796
|
+
ht as openWaitDlg,
|
|
757
797
|
ne as routeTransName,
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
798
|
+
Ct as setPermissionObject,
|
|
799
|
+
ft as useColor,
|
|
800
|
+
ae as useGlobalStore,
|
|
801
|
+
qt as useHotkey,
|
|
802
|
+
St as usePullPermission,
|
|
803
|
+
Tt as useSystem,
|
|
804
|
+
se as useViewMgrStore,
|
|
805
|
+
G as useViewStack,
|
|
806
|
+
Vt as verifyPermission,
|
|
807
|
+
pt as waitMs,
|
|
808
|
+
X as waitUtil
|
|
768
809
|
};
|