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