x-essential-lib 0.3.4 → 0.3.6
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 +248 -278
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
const
|
|
2
|
+
import { VAlert as ge, VBtn as he, VCard as _e, VCardActions as xe, VCardText as ye, VCardTitle as we, VDialog as ke, VForm as be, VTextField as Ce } from "vuetify/lib/components/index.mjs";
|
|
3
|
+
import { ref as m, computed as f, onMounted as S, onBeforeUnmount as R, defineComponent as T, watch as H, 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 Ve, pushScopeId as De, popScopeId as qe, createElementVNode as h, reactive as Se, Fragment as Re, renderList as Te } from "vue";
|
|
4
|
+
import { useLocale as X, useTheme as K, useDisplay as Oe } from "vuetify/lib/framework.mjs";
|
|
5
|
+
import { defineStore as oe } from "pinia";
|
|
6
|
+
import { useRouter as re, useRoute as Pe } from "vue-router";
|
|
7
|
+
import je from "axios";
|
|
8
|
+
const le = oe("viewMgr", () => {
|
|
9
9
|
const e = m([]);
|
|
10
10
|
function n() {
|
|
11
11
|
return e.value.length <= 0;
|
|
@@ -25,7 +25,7 @@ const ce = se("viewMgr", () => {
|
|
|
25
25
|
}
|
|
26
26
|
return { isEmpty: n, hasView: t, addView: o, delView: r, popView: a };
|
|
27
27
|
});
|
|
28
|
-
function
|
|
28
|
+
function Ie(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,8 +41,8 @@ function Be(e) {
|
|
|
41
41
|
});
|
|
42
42
|
} };
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
async function
|
|
44
|
+
const c = Ie();
|
|
45
|
+
async function dt(e) {
|
|
46
46
|
return new Promise((n) => {
|
|
47
47
|
setTimeout(n, e);
|
|
48
48
|
});
|
|
@@ -57,7 +57,7 @@ async function G(e, n, t) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function J(e, n) {
|
|
60
|
-
const t =
|
|
60
|
+
const t = le(), o = f({
|
|
61
61
|
get() {
|
|
62
62
|
return t.hasView(e);
|
|
63
63
|
},
|
|
@@ -67,73 +67,73 @@ function J(e, n) {
|
|
|
67
67
|
}), r = (a) => {
|
|
68
68
|
n == null || n(a), o.value = !0;
|
|
69
69
|
};
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
}),
|
|
73
|
-
|
|
70
|
+
return S(() => {
|
|
71
|
+
c.on(e, r);
|
|
72
|
+
}), R(() => {
|
|
73
|
+
c.off(e, r);
|
|
74
74
|
}), { open: o };
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Ee = /* @__PURE__ */ T({
|
|
77
77
|
__name: "index",
|
|
78
78
|
setup(e) {
|
|
79
|
-
const n =
|
|
79
|
+
const n = X(), { open: t } = J("confirmDlg"), o = m(""), r = m(""), a = m(), l = m(), s = f(() => {
|
|
80
80
|
var d;
|
|
81
81
|
return ((d = a.value) == null ? void 0 : d.color) ?? "primary";
|
|
82
82
|
}), p = f(() => {
|
|
83
83
|
var d;
|
|
84
84
|
return ((d = a.value) == null ? void 0 : d.text) ?? n.t("cancel");
|
|
85
|
-
}),
|
|
85
|
+
}), i = f(() => {
|
|
86
86
|
var d;
|
|
87
87
|
return ((d = l.value) == null ? void 0 : d.color) ?? "primary";
|
|
88
|
-
}),
|
|
88
|
+
}), y = f(() => {
|
|
89
89
|
var d;
|
|
90
90
|
return ((d = l.value) == null ? void 0 : d.text) ?? n.t("confirm");
|
|
91
91
|
});
|
|
92
|
-
let
|
|
93
|
-
const
|
|
94
|
-
o.value = d.title, r.value = d.text, a.value = d.cancel, l.value = d.confirm,
|
|
92
|
+
let O = 0, D = !1;
|
|
93
|
+
const A = (d) => {
|
|
94
|
+
o.value = d.title, r.value = d.text, a.value = d.cancel, l.value = d.confirm, O = d.seq, D = !1, t.value = !0;
|
|
95
95
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}),
|
|
99
|
-
|
|
96
|
+
S(() => {
|
|
97
|
+
c.on("confirmDlg", A);
|
|
98
|
+
}), R(() => {
|
|
99
|
+
c.off("confirmDlg", A);
|
|
100
100
|
});
|
|
101
|
-
const
|
|
102
|
-
t.value = !1, D || (
|
|
101
|
+
const M = () => {
|
|
102
|
+
t.value = !1, D || (c.emit("confirmDlgResult" + O, !0), D = !0);
|
|
103
103
|
};
|
|
104
|
-
return
|
|
105
|
-
!d && !D && (
|
|
106
|
-
}), (d,
|
|
107
|
-
const
|
|
108
|
-
return V(),
|
|
104
|
+
return H(t, (d) => {
|
|
105
|
+
!d && !D && (c.emit("confirmDlgResult" + O, !1), D = !0);
|
|
106
|
+
}), (d, w) => {
|
|
107
|
+
const q = v("v-card-title"), B = v("v-card-text"), P = v("v-btn"), u = v("v-card-actions"), x = v("v-card"), N = v("v-dialog");
|
|
108
|
+
return V(), $(N, {
|
|
109
109
|
modelValue: U(t),
|
|
110
|
-
"onUpdate:modelValue":
|
|
110
|
+
"onUpdate:modelValue": w[1] || (w[1] = (j) => F(t) ? t.value = j : null),
|
|
111
111
|
onKeydown: [
|
|
112
|
-
|
|
113
|
-
W(
|
|
112
|
+
w[2] || (w[2] = W(E((j) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
113
|
+
W(E(M, ["stop", "prevent"]), ["enter"])
|
|
114
114
|
],
|
|
115
115
|
transition: "dialog-top-transition",
|
|
116
116
|
"max-width": "600px"
|
|
117
117
|
}, {
|
|
118
118
|
default: g(() => [
|
|
119
|
-
|
|
119
|
+
_(x, null, {
|
|
120
120
|
default: g(() => [
|
|
121
|
-
|
|
121
|
+
_(q, null, {
|
|
122
122
|
default: g(() => [
|
|
123
123
|
C(b(o.value), 1)
|
|
124
124
|
]),
|
|
125
125
|
_: 1
|
|
126
126
|
}),
|
|
127
|
-
|
|
127
|
+
_(B, null, {
|
|
128
128
|
default: g(() => [
|
|
129
129
|
C(b(r.value), 1)
|
|
130
130
|
]),
|
|
131
131
|
_: 1
|
|
132
132
|
}),
|
|
133
|
-
|
|
133
|
+
_(u, { class: "d-flex justify-end" }, {
|
|
134
134
|
default: g(() => [
|
|
135
|
-
|
|
136
|
-
onClick:
|
|
135
|
+
_(P, {
|
|
136
|
+
onClick: w[0] || (w[0] = (j) => t.value = !1),
|
|
137
137
|
color: s.value,
|
|
138
138
|
variant: "text"
|
|
139
139
|
}, {
|
|
@@ -142,13 +142,13 @@ const Le = /* @__PURE__ */ R({
|
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
}, 8, ["color"]),
|
|
145
|
-
|
|
146
|
-
onClick:
|
|
147
|
-
color:
|
|
145
|
+
_(P, {
|
|
146
|
+
onClick: M,
|
|
147
|
+
color: i.value,
|
|
148
148
|
variant: "text"
|
|
149
149
|
}, {
|
|
150
150
|
default: g(() => [
|
|
151
|
-
C(b(
|
|
151
|
+
C(b(y.value), 1)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
154
154
|
}, 8, ["color"])
|
|
@@ -163,22 +163,22 @@ const Le = /* @__PURE__ */ R({
|
|
|
163
163
|
}, 8, ["modelValue", "onKeydown"]);
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
], -1)),
|
|
180
|
-
|
|
181
|
-
],
|
|
166
|
+
}), $e = (e) => (De("data-v-a8f3d91f"), e = e(), qe(), e), Ae = /* @__PURE__ */ $e(() => /* @__PURE__ */ h("div", { class: "lds-spinner" }, [
|
|
167
|
+
/* @__PURE__ */ h("div"),
|
|
168
|
+
/* @__PURE__ */ h("div"),
|
|
169
|
+
/* @__PURE__ */ h("div"),
|
|
170
|
+
/* @__PURE__ */ h("div"),
|
|
171
|
+
/* @__PURE__ */ h("div"),
|
|
172
|
+
/* @__PURE__ */ h("div"),
|
|
173
|
+
/* @__PURE__ */ h("div"),
|
|
174
|
+
/* @__PURE__ */ h("div"),
|
|
175
|
+
/* @__PURE__ */ h("div"),
|
|
176
|
+
/* @__PURE__ */ h("div"),
|
|
177
|
+
/* @__PURE__ */ h("div"),
|
|
178
|
+
/* @__PURE__ */ h("div")
|
|
179
|
+
], -1)), Me = [
|
|
180
|
+
Ae
|
|
181
|
+
], Be = /* @__PURE__ */ T({
|
|
182
182
|
__name: "index",
|
|
183
183
|
props: {
|
|
184
184
|
zIndex: {
|
|
@@ -187,21 +187,21 @@ const Le = /* @__PURE__ */ R({
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
setup(e) {
|
|
190
|
-
const n =
|
|
190
|
+
const n = K(), t = e, o = f(() => ({
|
|
191
191
|
background: n.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
192
192
|
zIndex: t.zIndex
|
|
193
193
|
}));
|
|
194
|
-
return (r, a) => (V(),
|
|
194
|
+
return (r, a) => (V(), z("div", {
|
|
195
195
|
class: "x-cont",
|
|
196
|
-
style:
|
|
197
|
-
},
|
|
196
|
+
style: Ve(o.value)
|
|
197
|
+
}, Me, 4));
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), ae = (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
|
+
}, Le = /* @__PURE__ */ ae(Be, [["__scopeId", "data-v-a8f3d91f"]]), Ue = /* @__PURE__ */ T({
|
|
205
205
|
__name: "item",
|
|
206
206
|
props: {
|
|
207
207
|
id: {
|
|
@@ -241,17 +241,17 @@ const Le = /* @__PURE__ */ R({
|
|
|
241
241
|
}
|
|
242
242
|
return l;
|
|
243
243
|
});
|
|
244
|
-
return
|
|
244
|
+
return S(() => {
|
|
245
245
|
setTimeout(() => {
|
|
246
246
|
r("timeout", t.id);
|
|
247
247
|
}, t.timeout);
|
|
248
|
-
}),
|
|
248
|
+
}), H(o, (l) => {
|
|
249
249
|
l || r("timeout", t.id);
|
|
250
250
|
}), (l, s) => {
|
|
251
251
|
const p = v("v-alert");
|
|
252
|
-
return V(),
|
|
252
|
+
return V(), $(p, {
|
|
253
253
|
modelValue: o.value,
|
|
254
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
254
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => o.value = i),
|
|
255
255
|
class: "mt-2",
|
|
256
256
|
type: e.type,
|
|
257
257
|
icon: a.value,
|
|
@@ -264,14 +264,14 @@ const Le = /* @__PURE__ */ R({
|
|
|
264
264
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), We = /* @__PURE__ */ T({
|
|
268
268
|
__name: "index",
|
|
269
269
|
setup(e) {
|
|
270
|
-
const n =
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
|
|
270
|
+
const n = Se({ items: [] });
|
|
271
|
+
S(() => {
|
|
272
|
+
c.on("message", t);
|
|
273
|
+
}), R(() => {
|
|
274
|
+
c.off("message", t);
|
|
275
275
|
});
|
|
276
276
|
const t = (s) => {
|
|
277
277
|
a(s.type, s.text, s.timeout);
|
|
@@ -279,91 +279,91 @@ const Le = /* @__PURE__ */ R({
|
|
|
279
279
|
l(s);
|
|
280
280
|
};
|
|
281
281
|
let r = 0;
|
|
282
|
-
const a = (s, p,
|
|
283
|
-
const
|
|
284
|
-
n.items.push({ id:
|
|
282
|
+
const a = (s, p, i) => {
|
|
283
|
+
const y = r++;
|
|
284
|
+
n.items.push({ id: y, type: s, text: p, timeout: i });
|
|
285
285
|
}, l = (s) => {
|
|
286
|
-
const p = n.items.findIndex((
|
|
286
|
+
const p = n.items.findIndex((i) => i.id === s);
|
|
287
287
|
p >= 0 && n.items.splice(p, 1);
|
|
288
288
|
};
|
|
289
|
-
return (s, p) => (V(),
|
|
290
|
-
onClick: p[0] || (p[0] =
|
|
289
|
+
return (s, p) => (V(), z("div", {
|
|
290
|
+
onClick: p[0] || (p[0] = E(() => {
|
|
291
291
|
}, ["stop"])),
|
|
292
292
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
293
293
|
}, [
|
|
294
|
-
(V(!0),
|
|
294
|
+
(V(!0), z(Re, null, Te(n.items, (i) => (V(), $(Ue, {
|
|
295
295
|
onTimeout: o,
|
|
296
|
-
id:
|
|
297
|
-
type:
|
|
298
|
-
text:
|
|
299
|
-
timeout:
|
|
300
|
-
key:
|
|
296
|
+
id: i.id,
|
|
297
|
+
type: i.type,
|
|
298
|
+
text: i.text,
|
|
299
|
+
timeout: i.timeout,
|
|
300
|
+
key: i.id
|
|
301
301
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
304
|
+
}), He = /* @__PURE__ */ ae(We, [["__scopeId", "data-v-70ed4b89"]]), Ke = /* @__PURE__ */ T({
|
|
305
305
|
__name: "index",
|
|
306
306
|
setup(e) {
|
|
307
|
-
const n =
|
|
307
|
+
const n = X(), { open: t } = J("promptDlg"), o = m(""), r = m(""), a = m(), l = m(), s = m(), p = m(""), i = m(), y = m(), O = f(() => {
|
|
308
308
|
var u;
|
|
309
|
-
return ((u =
|
|
309
|
+
return ((u = i.value) == null ? void 0 : u.color) ?? "primary";
|
|
310
310
|
}), D = f(() => {
|
|
311
311
|
var u;
|
|
312
|
-
return ((u =
|
|
313
|
-
}),
|
|
312
|
+
return ((u = i.value) == null ? void 0 : u.text) ?? n.t("cancel");
|
|
313
|
+
}), A = f(() => {
|
|
314
314
|
var u;
|
|
315
|
-
return ((u =
|
|
316
|
-
}),
|
|
315
|
+
return ((u = y.value) == null ? void 0 : u.color) ?? "primary";
|
|
316
|
+
}), M = f(() => {
|
|
317
317
|
var u;
|
|
318
|
-
return ((u =
|
|
318
|
+
return ((u = y.value) == null ? void 0 : u.text) ?? n.t("confirm");
|
|
319
319
|
}), d = m();
|
|
320
|
-
let
|
|
321
|
-
const
|
|
320
|
+
let w = 0, q = !1;
|
|
321
|
+
const B = async (u) => {
|
|
322
322
|
var x;
|
|
323
|
-
o.value = u.title, r.value = u.text, a.value = u.label, l.value = u.placeholder, s.value = u.rules, p.value = u.value,
|
|
323
|
+
o.value = u.title, r.value = u.text, a.value = u.label, l.value = u.placeholder, s.value = u.rules, p.value = u.value, i.value = u.cancel, y.value = u.confirm, w = u.seq, q = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (x = d.value) == null || x.focus();
|
|
324
324
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
|
|
325
|
+
S(() => {
|
|
326
|
+
c.on("promptDlg", B);
|
|
327
|
+
}), R(() => {
|
|
328
|
+
c.off("promptDlg", B);
|
|
329
329
|
});
|
|
330
|
-
const
|
|
331
|
-
t.value = !1,
|
|
330
|
+
const P = () => {
|
|
331
|
+
t.value = !1, q || (c.emit("promptDlgResult" + w, p.value ?? ""), q = !0);
|
|
332
332
|
};
|
|
333
|
-
return
|
|
334
|
-
!u && !
|
|
333
|
+
return H(t, (u) => {
|
|
334
|
+
!u && !q && (c.emit("promptDlgResult" + w, void 0), q = !0);
|
|
335
335
|
}), (u, x) => {
|
|
336
|
-
const
|
|
337
|
-
return V(),
|
|
336
|
+
const N = v("v-card-title"), j = v("v-card-text"), de = v("v-text-field"), pe = v("v-form"), Y = v("v-btn"), fe = v("v-card-actions"), me = v("v-card"), ve = v("v-dialog");
|
|
337
|
+
return V(), $(ve, {
|
|
338
338
|
modelValue: U(t),
|
|
339
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
339
|
+
"onUpdate:modelValue": x[2] || (x[2] = (I) => F(t) ? t.value = I : null),
|
|
340
340
|
onKeydown: [
|
|
341
|
-
x[3] || (x[3] = W(
|
|
342
|
-
W(
|
|
341
|
+
x[3] || (x[3] = W(E((I) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
342
|
+
W(E(P, ["stop", "prevent"]), ["enter"])
|
|
343
343
|
],
|
|
344
344
|
transition: "dialog-top-transition",
|
|
345
345
|
"max-width": "600px"
|
|
346
346
|
}, {
|
|
347
347
|
default: g(() => [
|
|
348
|
-
|
|
348
|
+
_(me, null, {
|
|
349
349
|
default: g(() => [
|
|
350
|
-
|
|
350
|
+
_(N, null, {
|
|
351
351
|
default: g(() => [
|
|
352
352
|
C(b(o.value), 1)
|
|
353
353
|
]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
|
-
|
|
356
|
+
_(j, null, {
|
|
357
357
|
default: g(() => [
|
|
358
358
|
C(b(r.value), 1)
|
|
359
359
|
]),
|
|
360
360
|
_: 1
|
|
361
361
|
}),
|
|
362
|
-
|
|
362
|
+
_(pe, { class: "mx-3" }, {
|
|
363
363
|
default: g(() => [
|
|
364
|
-
|
|
364
|
+
_(de, {
|
|
365
365
|
modelValue: p.value,
|
|
366
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
366
|
+
"onUpdate:modelValue": x[0] || (x[0] = (I) => p.value = I),
|
|
367
367
|
label: a.value,
|
|
368
368
|
placeholder: l.value,
|
|
369
369
|
rules: s.value,
|
|
@@ -373,11 +373,11 @@ const Le = /* @__PURE__ */ R({
|
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
375
|
}),
|
|
376
|
-
|
|
376
|
+
_(fe, { class: "d-flex justify-end" }, {
|
|
377
377
|
default: g(() => [
|
|
378
|
-
|
|
379
|
-
onClick: x[1] || (x[1] = (
|
|
380
|
-
color:
|
|
378
|
+
_(Y, {
|
|
379
|
+
onClick: x[1] || (x[1] = (I) => t.value = !1),
|
|
380
|
+
color: O.value,
|
|
381
381
|
variant: "text"
|
|
382
382
|
}, {
|
|
383
383
|
default: g(() => [
|
|
@@ -385,13 +385,13 @@ const Le = /* @__PURE__ */ R({
|
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["color"]),
|
|
388
|
-
|
|
389
|
-
onClick:
|
|
390
|
-
color:
|
|
388
|
+
_(Y, {
|
|
389
|
+
onClick: P,
|
|
390
|
+
color: A.value,
|
|
391
391
|
variant: "text"
|
|
392
392
|
}, {
|
|
393
393
|
default: g(() => [
|
|
394
|
-
C(b(
|
|
394
|
+
C(b(M.value), 1)
|
|
395
395
|
]),
|
|
396
396
|
_: 1
|
|
397
397
|
}, 8, ["color"])
|
|
@@ -406,37 +406,37 @@ const Le = /* @__PURE__ */ R({
|
|
|
406
406
|
}, 8, ["modelValue", "onKeydown"]);
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}),
|
|
409
|
+
}), Ne = { class: "mx-auto my-auto" }, ze = { class: "d-flex align-center justify-center w-100 h-100" }, Fe = /* @__PURE__ */ T({
|
|
410
410
|
__name: "index",
|
|
411
411
|
setup(e) {
|
|
412
|
-
const n =
|
|
412
|
+
const n = X(), { open: t } = J("waitDlg"), o = () => {
|
|
413
413
|
t.value = !0;
|
|
414
414
|
}, r = () => {
|
|
415
415
|
t.value = !1;
|
|
416
416
|
};
|
|
417
|
-
return
|
|
418
|
-
|
|
419
|
-
}),
|
|
420
|
-
|
|
417
|
+
return S(() => {
|
|
418
|
+
c.on("openWaitDlg", o), c.on("closeWaitDlg", r);
|
|
419
|
+
}), R(() => {
|
|
420
|
+
c.off("openWaitDlg", o), c.off("closeWaitDlg", r);
|
|
421
421
|
}), (a, l) => {
|
|
422
422
|
const s = v("v-card"), p = v("v-dialog");
|
|
423
|
-
return V(),
|
|
423
|
+
return V(), $(p, {
|
|
424
424
|
modelValue: U(t),
|
|
425
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
425
|
+
"onUpdate:modelValue": l[0] || (l[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
|
-
|
|
432
|
-
|
|
431
|
+
h("div", Ne, [
|
|
432
|
+
_(s, {
|
|
433
433
|
width: "300px",
|
|
434
434
|
height: "80px",
|
|
435
435
|
loading: ""
|
|
436
436
|
}, {
|
|
437
437
|
default: g(() => [
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
h("div", ze, [
|
|
439
|
+
h("span", null, b(U(n).t("waitingResponse")), 1)
|
|
440
440
|
])
|
|
441
441
|
]),
|
|
442
442
|
_: 1
|
|
@@ -447,11 +447,11 @@ const Le = /* @__PURE__ */ R({
|
|
|
447
447
|
}, 8, ["modelValue"]);
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
451
|
-
e.component("v-alert",
|
|
450
|
+
}), Xe = (e) => {
|
|
451
|
+
e.component("v-alert", ge), e.component("v-btn", he), e.component("v-card", _e), e.component("v-card-actions", xe), e.component("v-card-text", ye), e.component("v-card-title", we), e.component("v-dialog", ke), e.component("v-form", be), e.component("v-text-field", Ce), e.component("x-confirm-dlg", Ee), e.component("x-loading", Le), e.component("x-message", He), e.component("x-prompt-dlg", Ke), e.component("x-wait-dlg", Fe);
|
|
452
452
|
};
|
|
453
|
-
function
|
|
454
|
-
const e =
|
|
453
|
+
function pt() {
|
|
454
|
+
const e = K(), 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"), a = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), s = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
455
455
|
return {
|
|
456
456
|
primaryColor: n,
|
|
457
457
|
secondaryColor: t,
|
|
@@ -462,50 +462,21 @@ function wt() {
|
|
|
462
462
|
borderColor: s
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
|
|
466
|
-
(function(e) {
|
|
467
|
-
e.pop = "pop", e.push = "push";
|
|
468
|
-
})(Z || (Z = {}));
|
|
469
|
-
var ee;
|
|
470
|
-
(function(e) {
|
|
471
|
-
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
472
|
-
})(ee || (ee = {}));
|
|
473
|
-
var te;
|
|
474
|
-
(function(e) {
|
|
475
|
-
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
476
|
-
})(te || (te = {}));
|
|
477
|
-
const et = Symbol(ue.NODE_ENV !== "production" ? "router" : ""), tt = Symbol(ue.NODE_ENV !== "production" ? "route location" : "");
|
|
478
|
-
function de() {
|
|
479
|
-
return ae(et);
|
|
480
|
-
}
|
|
481
|
-
function nt() {
|
|
482
|
-
return ae(tt);
|
|
483
|
-
}
|
|
484
|
-
const ot = se(
|
|
465
|
+
const Ge = oe(
|
|
485
466
|
"global",
|
|
486
467
|
() => {
|
|
487
|
-
const e =
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
(
|
|
491
|
-
e.global.name.value =
|
|
468
|
+
const e = K(), n = m(!1);
|
|
469
|
+
H(
|
|
470
|
+
n,
|
|
471
|
+
(a) => {
|
|
472
|
+
e.global.name.value = a ? "dark" : "light";
|
|
492
473
|
},
|
|
493
474
|
{
|
|
494
475
|
immediate: !0
|
|
495
476
|
}
|
|
496
477
|
);
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
o,
|
|
500
|
-
(l) => {
|
|
501
|
-
n.locale.value = l;
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
immediate: !0
|
|
505
|
-
}
|
|
506
|
-
);
|
|
507
|
-
const r = m({}), a = m("");
|
|
508
|
-
return { dark: t, locale: o, permissionObjects: r, permissionChecksum: a };
|
|
478
|
+
const t = m("en"), o = m({}), r = m("");
|
|
479
|
+
return { dark: n, locale: t, permissionObjects: o, permissionChecksum: r };
|
|
509
480
|
},
|
|
510
481
|
{
|
|
511
482
|
persist: [
|
|
@@ -515,92 +486,92 @@ const ot = se(
|
|
|
515
486
|
}
|
|
516
487
|
]
|
|
517
488
|
}
|
|
518
|
-
),
|
|
519
|
-
function
|
|
520
|
-
const n =
|
|
489
|
+
), L = require("js-cookie");
|
|
490
|
+
function ft(e) {
|
|
491
|
+
const n = je.create({
|
|
521
492
|
timeout: 6e3
|
|
522
493
|
});
|
|
523
494
|
return n.defaults.baseURL = e.baseUrl, n.interceptors.request.use(
|
|
524
|
-
(t) =>
|
|
495
|
+
(t) => Je(t),
|
|
525
496
|
(t) => {
|
|
526
|
-
|
|
497
|
+
Qe(t, e.onError);
|
|
527
498
|
}
|
|
528
499
|
), n.interceptors.response.use(
|
|
529
|
-
(t) =>
|
|
530
|
-
(t) =>
|
|
500
|
+
(t) => Ye(t),
|
|
501
|
+
(t) => Ze(t, e.onError)
|
|
531
502
|
), n;
|
|
532
503
|
}
|
|
533
|
-
function
|
|
534
|
-
const n =
|
|
504
|
+
function Je(e) {
|
|
505
|
+
const n = L.get("accessToken") ?? "";
|
|
535
506
|
return e.headers.Authorization = "Basic " + n, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
536
507
|
}
|
|
537
|
-
function
|
|
508
|
+
function Qe(e, n) {
|
|
538
509
|
console.error(e), n("request timeout");
|
|
539
510
|
}
|
|
540
|
-
function
|
|
511
|
+
function Ye(e) {
|
|
541
512
|
return e.data;
|
|
542
513
|
}
|
|
543
|
-
function
|
|
514
|
+
function Ze(e, n) {
|
|
544
515
|
var r;
|
|
545
516
|
const t = e.response;
|
|
546
517
|
if (!t)
|
|
547
518
|
return Promise.reject(e);
|
|
548
|
-
t.status === 401 &&
|
|
519
|
+
t.status === 401 && et();
|
|
549
520
|
let o = (r = t.data) == null ? void 0 : r.message;
|
|
550
521
|
return o || (o = {
|
|
551
522
|
code: t.status,
|
|
552
523
|
message: t.statusText
|
|
553
524
|
}), n(o), Promise.reject(e);
|
|
554
525
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
526
|
+
function et() {
|
|
527
|
+
L.remove("accessToken"), L.remove("refreshToken"), L.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
557
528
|
}
|
|
558
|
-
let
|
|
559
|
-
function
|
|
529
|
+
let Z = Date.now();
|
|
530
|
+
function se() {
|
|
560
531
|
const e = Date.now();
|
|
561
|
-
return e -
|
|
532
|
+
return e - Z > 500 ? (Z = e, !0) : !1;
|
|
562
533
|
}
|
|
563
|
-
let
|
|
564
|
-
function
|
|
565
|
-
return ++
|
|
534
|
+
let tt = 0;
|
|
535
|
+
function ie() {
|
|
536
|
+
return ++tt;
|
|
566
537
|
}
|
|
567
|
-
async function
|
|
568
|
-
if (!
|
|
538
|
+
async function mt(e) {
|
|
539
|
+
if (!se())
|
|
569
540
|
return;
|
|
570
541
|
let n = !1, t;
|
|
571
542
|
const o = (a) => {
|
|
572
543
|
t = a, n = !0;
|
|
573
|
-
}, r =
|
|
574
|
-
return
|
|
544
|
+
}, r = ie();
|
|
545
|
+
return c.on("confirmDlgResult" + r, o), c.emit("confirmDlg", { ...e, seq: r }), await G(() => n), c.off("confirmDlgResult" + r, o), t;
|
|
575
546
|
}
|
|
576
|
-
async function
|
|
577
|
-
if (!
|
|
547
|
+
async function vt(e) {
|
|
548
|
+
if (!se())
|
|
578
549
|
return;
|
|
579
550
|
let n = !1, t;
|
|
580
551
|
const o = (a) => {
|
|
581
552
|
t = a, n = !0;
|
|
582
|
-
}, r =
|
|
583
|
-
return
|
|
553
|
+
}, r = ie();
|
|
554
|
+
return c.on("promptDlgResult" + r, o), c.emit("promptDlg", { ...e, seq: r }), await G(() => n), c.off("promptDlgResult" + r, o), t;
|
|
584
555
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
556
|
+
function gt() {
|
|
557
|
+
c.emit("openWaitDlg");
|
|
587
558
|
}
|
|
588
|
-
function
|
|
589
|
-
|
|
559
|
+
function ht() {
|
|
560
|
+
c.emit("closeWaitDlg");
|
|
590
561
|
}
|
|
591
|
-
function
|
|
592
|
-
|
|
562
|
+
function _t(e, n) {
|
|
563
|
+
c.emit("message", { type: "error", text: e, timeout: n });
|
|
593
564
|
}
|
|
594
|
-
function
|
|
595
|
-
|
|
565
|
+
function xt(e, n) {
|
|
566
|
+
c.emit("message", { type: "info", text: e, timeout: n });
|
|
596
567
|
}
|
|
597
|
-
function
|
|
598
|
-
|
|
568
|
+
function yt(e, n) {
|
|
569
|
+
c.emit("message", { type: "success", text: e, timeout: n });
|
|
599
570
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
571
|
+
function wt(e, n) {
|
|
572
|
+
c.emit("message", { type: "warning", text: e, timeout: n });
|
|
602
573
|
}
|
|
603
|
-
function
|
|
574
|
+
function kt(e) {
|
|
604
575
|
var o, r;
|
|
605
576
|
if (!window.appAppear) {
|
|
606
577
|
window.appAppear = !0;
|
|
@@ -611,11 +582,11 @@ function Rt(e) {
|
|
|
611
582
|
t.add("app-reset");
|
|
612
583
|
}, 0));
|
|
613
584
|
}
|
|
614
|
-
let
|
|
615
|
-
function
|
|
616
|
-
|
|
585
|
+
let ce = {};
|
|
586
|
+
function bt(e) {
|
|
587
|
+
ce = e;
|
|
617
588
|
}
|
|
618
|
-
function
|
|
589
|
+
function ee(e, n) {
|
|
619
590
|
if (!e)
|
|
620
591
|
return !1;
|
|
621
592
|
let t = e;
|
|
@@ -628,11 +599,11 @@ function oe(e, n) {
|
|
|
628
599
|
return !1;
|
|
629
600
|
}), Object.keys(t).length <= 0);
|
|
630
601
|
}
|
|
631
|
-
function
|
|
632
|
-
const t =
|
|
633
|
-
return t ? n ? (!
|
|
602
|
+
function Ct(e, n) {
|
|
603
|
+
const t = ce[e];
|
|
604
|
+
return t ? n ? (!ee(t.includes, n) || ee(t.excludes, n), !1) : !0 : !1;
|
|
634
605
|
}
|
|
635
|
-
const
|
|
606
|
+
const ue = require("js-cookie"), nt = [
|
|
636
607
|
{ path: "/passport/login", level: 0 },
|
|
637
608
|
{ path: "/passport/loginAccount", level: 1 },
|
|
638
609
|
{ path: "/passport/register", level: 1 },
|
|
@@ -655,7 +626,7 @@ const ve = require("js-cookie"), ut = [
|
|
|
655
626
|
function Q(e) {
|
|
656
627
|
let n, t = 0;
|
|
657
628
|
const o = e.split("/");
|
|
658
|
-
return
|
|
629
|
+
return nt.forEach((r) => {
|
|
659
630
|
const a = r.path.split("/");
|
|
660
631
|
let l = 0;
|
|
661
632
|
for (let s = 0; s < o.length && !(s >= a.length || o[s] !== a[s]); s++)
|
|
@@ -663,7 +634,7 @@ function Q(e) {
|
|
|
663
634
|
l >= t && (n = r, t = l);
|
|
664
635
|
}), n;
|
|
665
636
|
}
|
|
666
|
-
function
|
|
637
|
+
function te(e) {
|
|
667
638
|
if (e === "/")
|
|
668
639
|
return { app: "", path: "/", level: -1 };
|
|
669
640
|
const n = Q(e);
|
|
@@ -672,21 +643,21 @@ function re(e) {
|
|
|
672
643
|
const t = e.split("/");
|
|
673
644
|
return console.assert(t.length >= 2), { app: t[1], path: n.path, level: n.level };
|
|
674
645
|
}
|
|
675
|
-
const
|
|
646
|
+
const ne = m("");
|
|
676
647
|
function k(e, n) {
|
|
677
|
-
const t =
|
|
648
|
+
const t = te(e), o = te(n), r = t.app === o.app, a = t.path === o.path, l = t.level >= o.level;
|
|
678
649
|
console.info(
|
|
679
650
|
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${r} forward=${l}`
|
|
680
|
-
), r ? a ?
|
|
651
|
+
), r ? a ? ne.value = "" : ne.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
681
652
|
}
|
|
682
|
-
function
|
|
683
|
-
return !!
|
|
653
|
+
function ot() {
|
|
654
|
+
return !!ue.get("accessToken");
|
|
684
655
|
}
|
|
685
|
-
function
|
|
686
|
-
return !!
|
|
656
|
+
function rt() {
|
|
657
|
+
return !!ue.get("activeOrg");
|
|
687
658
|
}
|
|
688
|
-
function
|
|
689
|
-
const o =
|
|
659
|
+
function Vt(e, n, t) {
|
|
660
|
+
const o = ot(), r = rt(), a = Q(e.path);
|
|
690
661
|
if (!a) {
|
|
691
662
|
t();
|
|
692
663
|
return;
|
|
@@ -725,29 +696,28 @@ function It(e, n, t) {
|
|
|
725
696
|
else
|
|
726
697
|
k(e.path, n.path), t();
|
|
727
698
|
}
|
|
728
|
-
function
|
|
729
|
-
const n =
|
|
730
|
-
if (
|
|
699
|
+
function Dt(e) {
|
|
700
|
+
const n = Pe(), t = re(), o = Ge(), r = le(), a = (i) => {
|
|
701
|
+
if (i.key === "Escape") {
|
|
731
702
|
l();
|
|
732
703
|
return;
|
|
733
704
|
}
|
|
734
|
-
if (!e &&
|
|
705
|
+
if (!e && i.ctrlKey && i.key.toLowerCase() === "d") {
|
|
735
706
|
s();
|
|
736
707
|
return;
|
|
737
708
|
}
|
|
738
|
-
if (!e &&
|
|
709
|
+
if (!e && i.ctrlKey && i.key.toLowerCase() === "l") {
|
|
739
710
|
p();
|
|
740
711
|
return;
|
|
741
712
|
}
|
|
742
713
|
}, l = () => {
|
|
743
|
-
var
|
|
714
|
+
var y;
|
|
744
715
|
if (!r.isEmpty()) {
|
|
745
716
|
r.hasView("waitDlg") || r.popView();
|
|
746
717
|
return;
|
|
747
718
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
(c == null ? void 0 : c.level) === 0 ? (w = navigator == null ? void 0 : navigator.Backbutton) == null || w.goHome(
|
|
719
|
+
const i = Q(n.path);
|
|
720
|
+
(i == null ? void 0 : i.level) === 0 ? (y = navigator == null ? void 0 : navigator.Backbutton) == null || y.goHome(
|
|
751
721
|
() => {
|
|
752
722
|
},
|
|
753
723
|
() => {
|
|
@@ -758,41 +728,41 @@ function Pt(e) {
|
|
|
758
728
|
}, p = () => {
|
|
759
729
|
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
760
730
|
};
|
|
761
|
-
return
|
|
731
|
+
return S(() => {
|
|
762
732
|
window.addEventListener("keydown", a, !1);
|
|
763
|
-
}),
|
|
733
|
+
}), R(() => {
|
|
764
734
|
window.removeEventListener("keydown", a, !1);
|
|
765
735
|
}), {};
|
|
766
736
|
}
|
|
767
|
-
function
|
|
768
|
-
const e =
|
|
737
|
+
function qt() {
|
|
738
|
+
const e = K(), { width: n } = Oe(), 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");
|
|
769
739
|
return { dark: t, sysBarAvail: o, compactWidth: r };
|
|
770
740
|
}
|
|
771
|
-
const
|
|
741
|
+
const St = { install: Xe };
|
|
772
742
|
export {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
743
|
+
kt as appAppear,
|
|
744
|
+
ht as closeWaitDlg,
|
|
745
|
+
ft as createAxios,
|
|
746
|
+
St as default,
|
|
747
|
+
c as eventBus,
|
|
778
748
|
Q as matchRouteMeta,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
749
|
+
_t as messageError,
|
|
750
|
+
xt as messageInfo,
|
|
751
|
+
yt as messageSuccess,
|
|
752
|
+
wt as messageWarning,
|
|
753
|
+
Vt as onBeforeEach,
|
|
754
|
+
mt as openConfirmDlg,
|
|
755
|
+
vt as openPromptDlg,
|
|
756
|
+
gt as openWaitDlg,
|
|
757
|
+
ne as routeTransName,
|
|
758
|
+
bt as setPermissionObject,
|
|
759
|
+
pt as useColor,
|
|
760
|
+
Ge as useGlobalStore,
|
|
761
|
+
Dt as useHotkey,
|
|
762
|
+
qt as useSystem,
|
|
763
|
+
le as useViewMgrStore,
|
|
794
764
|
J as useViewStack,
|
|
795
|
-
|
|
796
|
-
|
|
765
|
+
Ct as verifyPermission,
|
|
766
|
+
dt as waitMs,
|
|
797
767
|
G as waitUtil
|
|
798
768
|
};
|