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