x-essential-lib 0.5.18 → 0.5.19
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 +252 -232
- 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,18 +1,29 @@
|
|
|
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 i, computed as g, onMounted as
|
|
3
|
-
import { useLocale as J, useTheme as K, useDisplay as
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { ref as i, computed as g, onMounted as V, onBeforeUnmount as I, defineComponent as T, watch as X, resolveComponent as m, openBlock as b, createBlock as j, unref as z, isRef as G, withKeys as F, withModifiers as U, withCtx as h, createVNode as y, createTextVNode as q, toDisplayString as S, createElementBlock as N, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as v, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
|
|
3
|
+
import { useLocale as J, useTheme as K, useDisplay as be } from "vuetify";
|
|
4
|
+
import { defineStore as le } from "pinia";
|
|
5
|
+
import Ce from "axios";
|
|
6
|
+
import { useRouter as re, useRoute as De } from "vue-router";
|
|
7
|
+
const ne = le(
|
|
8
|
+
"global",
|
|
9
|
+
() => {
|
|
10
|
+
const e = i(), a = i("en"), t = i({}), l = i("");
|
|
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", () => {
|
|
16
27
|
const e = i([]);
|
|
17
28
|
function a() {
|
|
18
29
|
return e.value.length <= 0;
|
|
@@ -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((_) => _ === 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 Se = {
|
|
62
73
|
read: function(e) {
|
|
63
74
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
64
75
|
},
|
|
@@ -70,38 +81,38 @@ var De = {
|
|
|
70
81
|
}
|
|
71
82
|
};
|
|
72
83
|
function H(e, a) {
|
|
73
|
-
function t(o,
|
|
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 _ = decodeURIComponent(u[0]);
|
|
99
|
+
if (r[_] = e.read(s, _), o === _)
|
|
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
|
);
|
|
@@ -119,47 +130,47 @@ function H(e, a) {
|
|
|
119
130
|
}
|
|
120
131
|
);
|
|
121
132
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
const a =
|
|
133
|
+
var O = H(Se, { path: "/" });
|
|
134
|
+
function ot(e) {
|
|
135
|
+
const a = Ce.create({
|
|
125
136
|
timeout: 6e3
|
|
126
137
|
});
|
|
127
138
|
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
128
139
|
(t) => Ve(t),
|
|
129
140
|
(t) => {
|
|
130
|
-
|
|
141
|
+
Re(t, e.onError);
|
|
131
142
|
}
|
|
132
143
|
), a.interceptors.response.use(
|
|
133
|
-
(t) =>
|
|
134
|
-
(t) =>
|
|
144
|
+
(t) => qe(t),
|
|
145
|
+
(t) => Oe(t, e.onError)
|
|
135
146
|
), a;
|
|
136
147
|
}
|
|
137
148
|
function Ve(e) {
|
|
138
|
-
const a =
|
|
149
|
+
const a = O.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 Re(e, a) {
|
|
142
153
|
console.error(e), a("request timeout");
|
|
143
154
|
}
|
|
144
|
-
function
|
|
155
|
+
function qe(e) {
|
|
145
156
|
return e.data;
|
|
146
157
|
}
|
|
147
|
-
function
|
|
158
|
+
function Oe(e, a) {
|
|
148
159
|
var o;
|
|
149
160
|
const t = e.response;
|
|
150
161
|
if (!t)
|
|
151
162
|
return Promise.reject(e);
|
|
152
|
-
t.status === 401 &&
|
|
163
|
+
t.status === 401 && je();
|
|
153
164
|
let l = (o = t.data) == null ? void 0 : o.message;
|
|
154
165
|
return l || (l = {
|
|
155
166
|
code: t.status,
|
|
156
167
|
message: t.statusText
|
|
157
168
|
}), a(l), Promise.reject(e);
|
|
158
169
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
170
|
+
function je() {
|
|
171
|
+
O.remove("accessToken"), O.remove("refreshToken"), O.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
161
172
|
}
|
|
162
|
-
function
|
|
173
|
+
function Ie(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 = Ie()), window.eventBus;
|
|
180
191
|
}();
|
|
181
|
-
async function
|
|
192
|
+
async function lt(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 rt(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 Te = 0;
|
|
223
|
+
function pe() {
|
|
224
|
+
return ++Te;
|
|
214
225
|
}
|
|
215
226
|
async function nt(e) {
|
|
216
|
-
if (!
|
|
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 ct(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 ut() {
|
|
234
245
|
p.emit("openWaitDlg");
|
|
235
246
|
}
|
|
236
|
-
function
|
|
247
|
+
function pt() {
|
|
237
248
|
p.emit("closeWaitDlg");
|
|
238
249
|
}
|
|
239
|
-
function
|
|
250
|
+
function st(e, a) {
|
|
240
251
|
p.emit("message", { type: "error", text: e, timeout: a });
|
|
241
252
|
}
|
|
242
253
|
function _t(e, a) {
|
|
243
254
|
p.emit("message", { type: "info", text: e, timeout: a });
|
|
244
255
|
}
|
|
245
|
-
function
|
|
256
|
+
function dt(e, a) {
|
|
246
257
|
p.emit("message", { type: "success", text: e, timeout: a });
|
|
247
258
|
}
|
|
248
|
-
function
|
|
259
|
+
function ft(e, a) {
|
|
249
260
|
p.emit("message", { type: "warning", text: e, timeout: a });
|
|
250
261
|
}
|
|
251
|
-
var
|
|
252
|
-
function
|
|
262
|
+
var Be = /* @__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))(Be || {});
|
|
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 Ee = [
|
|
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 Ee.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,99 +312,99 @@ 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
|
|
315
|
+
const oe = i("");
|
|
305
316
|
function k(e, a) {
|
|
306
|
-
const t =
|
|
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 ?
|
|
310
|
-
}
|
|
311
|
-
function Ee() {
|
|
312
|
-
return !!I.get("accessToken");
|
|
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 };
|
|
313
321
|
}
|
|
314
322
|
function Ae() {
|
|
315
|
-
return !!
|
|
323
|
+
return !!O.get("accessToken");
|
|
324
|
+
}
|
|
325
|
+
function Ue() {
|
|
326
|
+
return !!O.get("activeOrg");
|
|
316
327
|
}
|
|
317
328
|
function it(e, a, t) {
|
|
318
|
-
const l =
|
|
319
|
-
if (!
|
|
329
|
+
const l = Ae(), o = Ue(), 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
|
-
k(
|
|
337
|
+
const r = "/main";
|
|
338
|
+
k(r, a.path), t({ path: r });
|
|
328
339
|
} else
|
|
329
340
|
k(e.path, a.path), t();
|
|
330
341
|
else {
|
|
331
|
-
const
|
|
332
|
-
k(
|
|
342
|
+
const r = "/passport/login";
|
|
343
|
+
k(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
|
k(e.path, a.path), t();
|
|
338
349
|
else {
|
|
339
|
-
const
|
|
340
|
-
k(
|
|
350
|
+
const r = "/org/joinOrCreate";
|
|
351
|
+
k(r, a.path), t({ path: r });
|
|
341
352
|
}
|
|
342
353
|
else {
|
|
343
|
-
const
|
|
344
|
-
k(
|
|
354
|
+
const r = "/passport/login";
|
|
355
|
+
k(r, a.path), t({ path: r });
|
|
345
356
|
}
|
|
346
357
|
else if (l)
|
|
347
358
|
if (o) {
|
|
348
|
-
const
|
|
349
|
-
k(
|
|
359
|
+
const r = "/main";
|
|
360
|
+
k(r, a.path), t({ path: r });
|
|
350
361
|
} else {
|
|
351
|
-
const
|
|
352
|
-
k(
|
|
362
|
+
const r = "/org/joinOrCreate";
|
|
363
|
+
k(r, a.path), t({ path: r });
|
|
353
364
|
}
|
|
354
365
|
else
|
|
355
366
|
k(e.path, a.path), t();
|
|
356
367
|
}
|
|
357
368
|
function Z(e, a) {
|
|
358
|
-
const t =
|
|
369
|
+
const t = ce(), l = g({
|
|
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 V(() => {
|
|
369
380
|
p.on(e, o);
|
|
370
|
-
}),
|
|
381
|
+
}), I(() => {
|
|
371
382
|
p.off(e, o);
|
|
372
383
|
}), { open: l };
|
|
373
384
|
}
|
|
374
|
-
const
|
|
385
|
+
const Me = /* @__PURE__ */ T({
|
|
375
386
|
__name: "index",
|
|
376
387
|
setup(e) {
|
|
377
|
-
const a = J(), { open: t } = Z("confirmDlg"), l = i(""), o = i(""),
|
|
388
|
+
const a = J(), { open: t } = Z("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), c = g(() => {
|
|
378
389
|
var f;
|
|
379
|
-
return ((f =
|
|
390
|
+
return ((f = n.value) == null ? void 0 : f.color) ?? "primary";
|
|
380
391
|
}), u = g(() => {
|
|
381
392
|
var f;
|
|
382
|
-
return ((f =
|
|
383
|
-
}), _ = g(() => {
|
|
384
|
-
var f;
|
|
385
|
-
return ((f = n.value) == null ? void 0 : f.color) ?? "primary";
|
|
393
|
+
return ((f = n.value) == null ? void 0 : f.text) ?? a.t("cancel");
|
|
386
394
|
}), s = g(() => {
|
|
387
395
|
var f;
|
|
388
|
-
return ((f =
|
|
396
|
+
return ((f = r.value) == null ? void 0 : f.color) ?? "primary";
|
|
397
|
+
}), _ = g(() => {
|
|
398
|
+
var f;
|
|
399
|
+
return ((f = r.value) == null ? void 0 : f.text) ?? a.t("confirm");
|
|
389
400
|
});
|
|
390
401
|
let R = 0, C = !1;
|
|
391
402
|
const M = (f) => {
|
|
392
|
-
l.value = f.title, o.value = f.text,
|
|
403
|
+
l.value = f.title, o.value = f.text, n.value = f.cancel, r.value = f.confirm, R = f.seq, C = !1, t.value = !0;
|
|
393
404
|
};
|
|
394
|
-
|
|
405
|
+
V(() => {
|
|
395
406
|
p.on("confirmDlg", M);
|
|
396
|
-
}),
|
|
407
|
+
}), I(() => {
|
|
397
408
|
p.off("confirmDlg", M);
|
|
398
409
|
});
|
|
399
410
|
const $ = () => {
|
|
@@ -403,7 +414,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
403
414
|
!f && !C && (p.emit("confirmDlgResult" + R, !1), C = !0);
|
|
404
415
|
}), (f, x) => {
|
|
405
416
|
const D = m("v-card-text"), B = m("v-btn"), W = m("v-card-actions"), d = m("v-card"), w = m("v-dialog");
|
|
406
|
-
return b(),
|
|
417
|
+
return b(), j(w, {
|
|
407
418
|
modelValue: z(t),
|
|
408
419
|
"onUpdate:modelValue": x[1] || (x[1] = (E) => G(t) ? t.value = E : null),
|
|
409
420
|
onKeydown: [
|
|
@@ -418,7 +429,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
418
429
|
default: h(() => [
|
|
419
430
|
y(D, null, {
|
|
420
431
|
default: h(() => [
|
|
421
|
-
q(
|
|
432
|
+
q(S(o.value), 1)
|
|
422
433
|
]),
|
|
423
434
|
_: 1
|
|
424
435
|
}),
|
|
@@ -430,17 +441,17 @@ const Ue = /* @__PURE__ */ T({
|
|
|
430
441
|
variant: "text"
|
|
431
442
|
}, {
|
|
432
443
|
default: h(() => [
|
|
433
|
-
q(
|
|
444
|
+
q(S(u.value), 1)
|
|
434
445
|
]),
|
|
435
446
|
_: 1
|
|
436
447
|
}, 8, ["color"]),
|
|
437
448
|
y(B, {
|
|
438
449
|
onClick: $,
|
|
439
|
-
color:
|
|
450
|
+
color: s.value,
|
|
440
451
|
variant: "text"
|
|
441
452
|
}, {
|
|
442
453
|
default: h(() => [
|
|
443
|
-
q(
|
|
454
|
+
q(S(_.value), 1)
|
|
444
455
|
]),
|
|
445
456
|
_: 1
|
|
446
457
|
}, 8, ["color"])
|
|
@@ -455,7 +466,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
455
466
|
}, 8, ["modelValue", "onKeydown"]);
|
|
456
467
|
};
|
|
457
468
|
}
|
|
458
|
-
}),
|
|
469
|
+
}), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), We = /* @__PURE__ */ $e(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
|
|
459
470
|
/* @__PURE__ */ v("div"),
|
|
460
471
|
/* @__PURE__ */ v("div"),
|
|
461
472
|
/* @__PURE__ */ v("div"),
|
|
@@ -468,9 +479,9 @@ const Ue = /* @__PURE__ */ T({
|
|
|
468
479
|
/* @__PURE__ */ v("div"),
|
|
469
480
|
/* @__PURE__ */ v("div"),
|
|
470
481
|
/* @__PURE__ */ v("div")
|
|
471
|
-
], -1)),
|
|
472
|
-
|
|
473
|
-
],
|
|
482
|
+
], -1)), Le = [
|
|
483
|
+
We
|
|
484
|
+
], ze = /* @__PURE__ */ T({
|
|
474
485
|
__name: "index",
|
|
475
486
|
props: {
|
|
476
487
|
zIndex: {
|
|
@@ -483,17 +494,17 @@ const Ue = /* @__PURE__ */ T({
|
|
|
483
494
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
484
495
|
zIndex: t.zIndex
|
|
485
496
|
}));
|
|
486
|
-
return (o,
|
|
497
|
+
return (o, n) => (b(), N("div", {
|
|
487
498
|
class: "x-cont",
|
|
488
|
-
style:
|
|
489
|
-
},
|
|
499
|
+
style: ve(l.value)
|
|
500
|
+
}, Le, 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
|
+
}, Fe = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Ke = /* @__PURE__ */ T({
|
|
497
508
|
__name: "item",
|
|
498
509
|
props: {
|
|
499
510
|
id: {},
|
|
@@ -504,48 +515,48 @@ const Ue = /* @__PURE__ */ T({
|
|
|
504
515
|
emits: ["timeout"],
|
|
505
516
|
setup(e, { emit: a }) {
|
|
506
517
|
const t = e, l = i(!0), o = a;
|
|
507
|
-
return
|
|
518
|
+
return V(() => {
|
|
508
519
|
setTimeout(() => {
|
|
509
520
|
o("timeout", t.id);
|
|
510
521
|
}, t.timeout);
|
|
511
|
-
}), X(l, (
|
|
512
|
-
|
|
513
|
-
}), (
|
|
522
|
+
}), X(l, (n) => {
|
|
523
|
+
n || o("timeout", t.id);
|
|
524
|
+
}), (n, r) => {
|
|
514
525
|
const c = m("v-alert");
|
|
515
|
-
return b(),
|
|
526
|
+
return b(), j(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
|
+
}), Ne = /* @__PURE__ */ T({
|
|
530
541
|
__name: "index",
|
|
531
542
|
setup(e) {
|
|
532
|
-
const a =
|
|
533
|
-
|
|
543
|
+
const a = we({ items: [] });
|
|
544
|
+
V(() => {
|
|
534
545
|
p.on("message", t);
|
|
535
|
-
}),
|
|
546
|
+
}), I(() => {
|
|
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 _ = o++;
|
|
557
|
+
a.items.push({ id: _, 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
562
|
return (c, u) => (b(), N("div", {
|
|
@@ -553,40 +564,40 @@ const Ue = /* @__PURE__ */ T({
|
|
|
553
564
|
}, ["stop"])),
|
|
554
565
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
555
566
|
}, [
|
|
556
|
-
(b(!0), N(
|
|
567
|
+
(b(!0), N(ye, null, xe(a.items, (s) => (b(), j(Ke, {
|
|
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
|
+
}), He = /* @__PURE__ */ se(Ne, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ T({
|
|
567
578
|
__name: "index",
|
|
568
579
|
setup(e) {
|
|
569
|
-
const a = J(), { open: t } = Z("promptDlg"), l = i(""), o = i(""),
|
|
580
|
+
const a = J(), { open: t } = Z("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), c = i(), u = i(""), s = i(), _ = i(), R = g(() => {
|
|
570
581
|
var d;
|
|
571
|
-
return ((d =
|
|
582
|
+
return ((d = s.value) == null ? void 0 : d.color) ?? "primary";
|
|
572
583
|
}), C = g(() => {
|
|
573
584
|
var d;
|
|
574
|
-
return ((d =
|
|
585
|
+
return ((d = s.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
575
586
|
}), M = g(() => {
|
|
576
587
|
var d;
|
|
577
|
-
return ((d =
|
|
588
|
+
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
578
589
|
}), $ = g(() => {
|
|
579
590
|
var d;
|
|
580
|
-
return ((d =
|
|
591
|
+
return ((d = _.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
581
592
|
}), f = i();
|
|
582
593
|
let x = 0, D = !1;
|
|
583
594
|
const B = async (d) => {
|
|
584
595
|
var w;
|
|
585
|
-
l.value = d.title, o.value = d.text,
|
|
596
|
+
l.value = d.title, o.value = d.text, n.value = d.label, r.value = d.placeholder, c.value = d.rules, u.value = d.value, s.value = d.cancel, _.value = d.confirm, x = d.seq, D = !1, t.value = !0, await Q(() => f.value !== void 0, 1e3), (w = f.value) == null || w.focus();
|
|
586
597
|
};
|
|
587
|
-
|
|
598
|
+
V(() => {
|
|
588
599
|
p.on("promptDlg", B);
|
|
589
|
-
}),
|
|
600
|
+
}), I(() => {
|
|
590
601
|
p.off("promptDlg", B);
|
|
591
602
|
});
|
|
592
603
|
const W = () => {
|
|
@@ -595,8 +606,8 @@ const Ue = /* @__PURE__ */ T({
|
|
|
595
606
|
return X(t, (d) => {
|
|
596
607
|
!d && !D && (p.emit("promptDlgResult" + x, void 0), D = !0);
|
|
597
608
|
}), (d, w) => {
|
|
598
|
-
const E = m("v-card-text"),
|
|
599
|
-
return b(),
|
|
609
|
+
const E = m("v-card-text"), _e = m("v-text-field"), de = m("v-form"), P = m("v-btn"), fe = m("v-card-actions"), ie = m("v-card"), ge = m("v-dialog");
|
|
610
|
+
return b(), j(ge, {
|
|
600
611
|
modelValue: z(t),
|
|
601
612
|
"onUpdate:modelValue": w[2] || (w[2] = (A) => G(t) ? t.value = A : null),
|
|
602
613
|
onKeydown: [
|
|
@@ -607,21 +618,21 @@ const Ue = /* @__PURE__ */ T({
|
|
|
607
618
|
"max-width": "600px"
|
|
608
619
|
}, {
|
|
609
620
|
default: h(() => [
|
|
610
|
-
y(
|
|
621
|
+
y(ie, { title: l.value }, {
|
|
611
622
|
default: h(() => [
|
|
612
|
-
o.value ? (b(),
|
|
623
|
+
o.value ? (b(), j(E, { key: 0 }, {
|
|
613
624
|
default: h(() => [
|
|
614
|
-
q(
|
|
625
|
+
q(S(o.value), 1)
|
|
615
626
|
]),
|
|
616
627
|
_: 1
|
|
617
|
-
})) :
|
|
618
|
-
y(
|
|
628
|
+
})) : ke("", !0),
|
|
629
|
+
y(de, { class: "mx-3" }, {
|
|
619
630
|
default: h(() => [
|
|
620
|
-
y(
|
|
631
|
+
y(_e, {
|
|
621
632
|
modelValue: u.value,
|
|
622
633
|
"onUpdate:modelValue": w[0] || (w[0] = (A) => u.value = A),
|
|
623
|
-
label:
|
|
624
|
-
placeholder:
|
|
634
|
+
label: n.value,
|
|
635
|
+
placeholder: r.value,
|
|
625
636
|
rules: c.value,
|
|
626
637
|
ref_key: "target",
|
|
627
638
|
ref: f
|
|
@@ -629,7 +640,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
629
640
|
]),
|
|
630
641
|
_: 1
|
|
631
642
|
}),
|
|
632
|
-
y(
|
|
643
|
+
y(fe, { class: "d-flex justify-end" }, {
|
|
633
644
|
default: h(() => [
|
|
634
645
|
y(P, {
|
|
635
646
|
onClick: w[1] || (w[1] = (A) => t.value = !1),
|
|
@@ -637,7 +648,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
637
648
|
variant: "text"
|
|
638
649
|
}, {
|
|
639
650
|
default: h(() => [
|
|
640
|
-
q(
|
|
651
|
+
q(S(C.value), 1)
|
|
641
652
|
]),
|
|
642
653
|
_: 1
|
|
643
654
|
}, 8, ["color"]),
|
|
@@ -647,7 +658,7 @@ const Ue = /* @__PURE__ */ T({
|
|
|
647
658
|
variant: "text"
|
|
648
659
|
}, {
|
|
649
660
|
default: h(() => [
|
|
650
|
-
q(
|
|
661
|
+
q(S($.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
|
+
}), Ge = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ T({
|
|
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 V(() => {
|
|
674
685
|
p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
|
|
675
|
-
}),
|
|
686
|
+
}), I(() => {
|
|
676
687
|
p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
|
|
677
|
-
}), (
|
|
688
|
+
}), (n, r) => {
|
|
678
689
|
const c = m("v-card"), u = m("v-dialog");
|
|
679
|
-
return b(),
|
|
690
|
+
return b(), j(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
697
|
default: h(() => [
|
|
687
|
-
v("div",
|
|
698
|
+
v("div", Ge, [
|
|
688
699
|
y(c, {
|
|
689
700
|
width: "300px",
|
|
690
701
|
height: "80px",
|
|
691
702
|
loading: ""
|
|
692
703
|
}, {
|
|
693
704
|
default: h(() => [
|
|
694
|
-
v("div",
|
|
695
|
-
v("span", null,
|
|
705
|
+
v("div", Je, [
|
|
706
|
+
v("span", null, S(z(a).t("waitingResponse")), 1)
|
|
696
707
|
])
|
|
697
708
|
]),
|
|
698
709
|
_: 1
|
|
@@ -703,76 +714,85 @@ const Ue = /* @__PURE__ */ T({
|
|
|
703
714
|
}, 8, ["modelValue"]);
|
|
704
715
|
};
|
|
705
716
|
}
|
|
706
|
-
}),
|
|
707
|
-
e.component("x-confirm-dlg",
|
|
717
|
+
}), Ye = (e) => {
|
|
718
|
+
e.component("x-confirm-dlg", Me), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Qe);
|
|
708
719
|
};
|
|
709
720
|
function gt() {
|
|
710
|
-
const e = K(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"),
|
|
721
|
+
const e = K(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => 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
732
|
function vt() {
|
|
722
|
-
const e =
|
|
723
|
-
l.dark =
|
|
724
|
-
},
|
|
725
|
-
l.locale =
|
|
726
|
-
}, c = (
|
|
727
|
-
l.permissionObjects =
|
|
733
|
+
const e = De(), a = re(), t = K(), l = ne(), o = ce(), n = (_) => {
|
|
734
|
+
l.dark = _, t.global.name.value = l.dark ? "dark" : "light";
|
|
735
|
+
}, r = (_) => {
|
|
736
|
+
l.locale = _;
|
|
737
|
+
}, c = (_) => {
|
|
738
|
+
l.permissionObjects = _.permissionObjects, l.permissionChecksum = _.permissionChecksum;
|
|
728
739
|
}, u = () => {
|
|
729
740
|
if (!o.isEmpty()) {
|
|
730
741
|
o.hasView("waitDlg") || o.popView();
|
|
731
742
|
return;
|
|
732
743
|
}
|
|
733
|
-
const
|
|
734
|
-
(
|
|
735
|
-
},
|
|
736
|
-
if (
|
|
744
|
+
const _ = Y(e.path);
|
|
745
|
+
(_ == null ? void 0 : _.level) === 0 || a.back();
|
|
746
|
+
}, s = (_) => {
|
|
747
|
+
if (_.key === "Escape") {
|
|
737
748
|
u();
|
|
738
749
|
return;
|
|
739
750
|
}
|
|
740
751
|
};
|
|
741
|
-
|
|
742
|
-
p.on("darkchange",
|
|
743
|
-
}),
|
|
744
|
-
p.off("darkchange",
|
|
752
|
+
V(() => {
|
|
753
|
+
p.on("darkchange", n), p.on("localechange", r), p.on("permissionchange", c), p.on("backbutton", u), window.addEventListener("keydown", s);
|
|
754
|
+
}), I(() => {
|
|
755
|
+
p.off("darkchange", n), p.off("localechange", r), p.off("permissionchange", c), p.off("backbutton", u), window.removeEventListener("keydown", s);
|
|
745
756
|
});
|
|
746
757
|
}
|
|
747
758
|
function mt() {
|
|
748
|
-
const e =
|
|
759
|
+
const e = ne();
|
|
760
|
+
function a(t, l) {
|
|
761
|
+
const o = e.permissionObjects[t];
|
|
762
|
+
return o ? l ? !(!te(o.includes, l) || te(o.excludes, l)) : !0 : !1;
|
|
763
|
+
}
|
|
764
|
+
return { verifyPermission: a };
|
|
765
|
+
}
|
|
766
|
+
function ht() {
|
|
767
|
+
const e = K(), a = be(), t = g(() => e.current.value.dark), l = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
749
768
|
return { dark: t, sysBarAvail: l, compactWidth: o };
|
|
750
769
|
}
|
|
751
|
-
const
|
|
770
|
+
const wt = { install: Ye };
|
|
752
771
|
export {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
772
|
+
Be as Permission,
|
|
773
|
+
rt as appAppear,
|
|
774
|
+
pt as closeWaitDlg,
|
|
775
|
+
ot as createAxios,
|
|
776
|
+
wt as default,
|
|
758
777
|
p as eventBus,
|
|
759
|
-
|
|
778
|
+
te as isExist,
|
|
760
779
|
Y as matchRouteMeta,
|
|
761
|
-
|
|
780
|
+
st as messageError,
|
|
762
781
|
_t as messageInfo,
|
|
763
|
-
|
|
764
|
-
|
|
782
|
+
dt as messageSuccess,
|
|
783
|
+
ft as messageWarning,
|
|
765
784
|
it as onBeforeEach,
|
|
766
785
|
nt as openConfirmDlg,
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
786
|
+
ct as openPromptDlg,
|
|
787
|
+
ut as openWaitDlg,
|
|
788
|
+
oe as routeTransName,
|
|
770
789
|
gt as useColor,
|
|
771
|
-
|
|
790
|
+
ne as useGlobalStore,
|
|
772
791
|
vt as useMicroApp,
|
|
773
|
-
mt as
|
|
774
|
-
|
|
792
|
+
mt as usePermission,
|
|
793
|
+
ht as useSystem,
|
|
794
|
+
ce as useViewMgrStore,
|
|
775
795
|
Z as useViewStack,
|
|
776
|
-
|
|
796
|
+
lt as waitMs,
|
|
777
797
|
Q as waitUtil
|
|
778
798
|
};
|
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;
|