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