x-essential-lib 0.5.61 → 0.5.66
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/microApp.d.ts +1 -3
- package/dist/index.js +319 -394
- package/dist/store/global.d.ts +3 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,68 +1,39 @@
|
|
|
1
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,
|
|
3
|
-
import {
|
|
2
|
+
import { ref as i, computed as g, onMounted as A, onBeforeUnmount as j, defineComponent as T, watch as G, resolveComponent as h, openBlock as D, createBlock as O, unref as z, isRef as J, withKeys as F, withModifiers as U, withCtx as w, createVNode as y, createTextVNode as q, toDisplayString as S, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
|
|
3
|
+
import { useLocale as Q, useTheme as Y, useDisplay as ke } from "vuetify";
|
|
4
4
|
import { defineStore as le } from "pinia";
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as
|
|
7
|
-
const Z = le(
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
{ immediate: !0 }
|
|
19
|
-
), {
|
|
20
|
-
dark: a,
|
|
21
|
-
locale: t,
|
|
22
|
-
permissionObjects: l,
|
|
23
|
-
permissionChecksum: o,
|
|
24
|
-
lastAppPath: n
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
persist: [
|
|
29
|
-
{
|
|
30
|
-
beforeRestore: (e) => {
|
|
31
|
-
console.log("beforeRestore", e.store.$state);
|
|
32
|
-
},
|
|
33
|
-
afterRestore: (e) => {
|
|
34
|
-
console.log("afterRestore", e.store.$state);
|
|
35
|
-
},
|
|
36
|
-
storage: localStorage,
|
|
37
|
-
paths: ["dark", "locale"]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
storage: sessionStorage,
|
|
41
|
-
paths: ["permissionObjects", "permissionChecksum", "lastAppPath"]
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
), ne = le("viewMgr", () => {
|
|
5
|
+
import Ce from "axios";
|
|
6
|
+
import { useRouter as ne, useRoute as be } from "vue-router";
|
|
7
|
+
const Z = le("global", () => {
|
|
8
|
+
const e = i(!1), a = i("en"), t = i({}), l = i(""), o = i("");
|
|
9
|
+
return {
|
|
10
|
+
dark: e,
|
|
11
|
+
locale: a,
|
|
12
|
+
permissionObjects: t,
|
|
13
|
+
permissionChecksum: l,
|
|
14
|
+
lastAppPath: o
|
|
15
|
+
};
|
|
16
|
+
}), re = le("viewMgr", () => {
|
|
46
17
|
const e = i([]);
|
|
47
18
|
function a() {
|
|
48
19
|
return e.value.length <= 0;
|
|
49
20
|
}
|
|
50
21
|
function t() {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return e.value[
|
|
22
|
+
const p = e.value.length;
|
|
23
|
+
if (p > 0)
|
|
24
|
+
return e.value[p - 1];
|
|
54
25
|
}
|
|
55
|
-
function l(
|
|
56
|
-
return e.value.find((
|
|
26
|
+
function l(p) {
|
|
27
|
+
return e.value.find((s) => s === p) !== void 0;
|
|
57
28
|
}
|
|
58
|
-
function o(
|
|
59
|
-
e.value.push(
|
|
29
|
+
function o(p) {
|
|
30
|
+
e.value.push(p);
|
|
60
31
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
|
|
32
|
+
function r(p) {
|
|
33
|
+
const s = e.value.findIndex((v) => v === p);
|
|
34
|
+
s !== -1 && e.value.splice(s, 1);
|
|
64
35
|
}
|
|
65
|
-
function
|
|
36
|
+
function n() {
|
|
66
37
|
console.assert(e.value.length > 0), e.value.pop();
|
|
67
38
|
}
|
|
68
39
|
function c() {
|
|
@@ -74,8 +45,8 @@ const Z = le(
|
|
|
74
45
|
lastView: t,
|
|
75
46
|
hasView: l,
|
|
76
47
|
addView: o,
|
|
77
|
-
delView:
|
|
78
|
-
popView:
|
|
48
|
+
delView: r,
|
|
49
|
+
popView: n,
|
|
79
50
|
clearViews: c
|
|
80
51
|
};
|
|
81
52
|
});
|
|
@@ -99,48 +70,48 @@ var De = {
|
|
|
99
70
|
);
|
|
100
71
|
}
|
|
101
72
|
};
|
|
102
|
-
function
|
|
103
|
-
function t(o,
|
|
73
|
+
function X(e, a) {
|
|
74
|
+
function t(o, r, n) {
|
|
104
75
|
if (!(typeof document > "u")) {
|
|
105
|
-
|
|
76
|
+
n = W({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
106
77
|
var c = "";
|
|
107
|
-
for (var
|
|
108
|
-
|
|
109
|
-
return document.cookie = o + "=" + e.write(
|
|
78
|
+
for (var p in n)
|
|
79
|
+
n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
|
|
80
|
+
return document.cookie = o + "=" + e.write(r, o) + c;
|
|
110
81
|
}
|
|
111
82
|
}
|
|
112
83
|
function l(o) {
|
|
113
84
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
114
|
-
for (var
|
|
115
|
-
var
|
|
85
|
+
for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
|
|
86
|
+
var p = r[c].split("="), s = p.slice(1).join("=");
|
|
116
87
|
try {
|
|
117
|
-
var v = decodeURIComponent(
|
|
118
|
-
if (
|
|
88
|
+
var v = decodeURIComponent(p[0]);
|
|
89
|
+
if (n[v] = e.read(s, v), o === v)
|
|
119
90
|
break;
|
|
120
91
|
} catch {
|
|
121
92
|
}
|
|
122
93
|
}
|
|
123
|
-
return o ?
|
|
94
|
+
return o ? n[o] : n;
|
|
124
95
|
}
|
|
125
96
|
}
|
|
126
97
|
return Object.create(
|
|
127
98
|
{
|
|
128
99
|
set: t,
|
|
129
100
|
get: l,
|
|
130
|
-
remove: function(o,
|
|
101
|
+
remove: function(o, r) {
|
|
131
102
|
t(
|
|
132
103
|
o,
|
|
133
104
|
"",
|
|
134
|
-
W({},
|
|
105
|
+
W({}, r, {
|
|
135
106
|
expires: -1
|
|
136
107
|
})
|
|
137
108
|
);
|
|
138
109
|
},
|
|
139
110
|
withAttributes: function(o) {
|
|
140
|
-
return
|
|
111
|
+
return X(this.converter, W({}, this.attributes, o));
|
|
141
112
|
},
|
|
142
113
|
withConverter: function(o) {
|
|
143
|
-
return
|
|
114
|
+
return X(W({}, this.converter, o), this.attributes);
|
|
144
115
|
}
|
|
145
116
|
},
|
|
146
117
|
{
|
|
@@ -149,47 +120,47 @@ function G(e, a) {
|
|
|
149
120
|
}
|
|
150
121
|
);
|
|
151
122
|
}
|
|
152
|
-
var
|
|
153
|
-
function
|
|
154
|
-
const a =
|
|
123
|
+
var I = X(De, { path: "/" });
|
|
124
|
+
function lt(e) {
|
|
125
|
+
const a = Ce.create({
|
|
155
126
|
timeout: 6e3
|
|
156
127
|
});
|
|
157
128
|
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
158
129
|
(t) => Re(t),
|
|
159
130
|
(t) => {
|
|
160
|
-
|
|
131
|
+
Ve(t, e.onError);
|
|
161
132
|
}
|
|
162
133
|
), a.interceptors.response.use(
|
|
163
|
-
(t) =>
|
|
164
|
-
(t) =>
|
|
134
|
+
(t) => Se(t),
|
|
135
|
+
(t) => Ae(t, e.onError)
|
|
165
136
|
), a;
|
|
166
137
|
}
|
|
167
138
|
function Re(e) {
|
|
168
|
-
const a =
|
|
139
|
+
const a = I.get("accessToken") ?? "";
|
|
169
140
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
170
141
|
}
|
|
171
|
-
function
|
|
142
|
+
function Ve(e, a) {
|
|
172
143
|
console.error(e), a("request timeout");
|
|
173
144
|
}
|
|
174
|
-
function
|
|
145
|
+
function Se(e) {
|
|
175
146
|
return e.data;
|
|
176
147
|
}
|
|
177
|
-
function
|
|
148
|
+
function Ae(e, a) {
|
|
178
149
|
var o;
|
|
179
150
|
const t = e.response;
|
|
180
151
|
if (!t)
|
|
181
152
|
return Promise.reject(e);
|
|
182
|
-
t.status === 401 &&
|
|
153
|
+
t.status === 401 && qe();
|
|
183
154
|
let l = (o = t.data) == null ? void 0 : o.message;
|
|
184
155
|
return l || (l = {
|
|
185
156
|
code: t.status,
|
|
186
157
|
message: t.statusText
|
|
187
158
|
}), a(l), Promise.reject(e);
|
|
188
159
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
160
|
+
function qe() {
|
|
161
|
+
I.remove("accessToken"), I.remove("refreshToken"), I.remove("activeOrg"), ne().replace({ path: "/passport/login" });
|
|
191
162
|
}
|
|
192
|
-
function
|
|
163
|
+
function Ie(e) {
|
|
193
164
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
194
165
|
var l = e.get(a);
|
|
195
166
|
l ? l.push(t) : e.set(a, [t]);
|
|
@@ -205,8 +176,8 @@ function Te(e) {
|
|
|
205
176
|
});
|
|
206
177
|
} };
|
|
207
178
|
}
|
|
208
|
-
const
|
|
209
|
-
return window.eventBus || (window.eventBus =
|
|
179
|
+
const u = function() {
|
|
180
|
+
return window.eventBus || (window.eventBus = Ie()), window.eventBus;
|
|
210
181
|
}();
|
|
211
182
|
async function nt(e) {
|
|
212
183
|
return new Promise((a) => {
|
|
@@ -216,13 +187,13 @@ async function nt(e) {
|
|
|
216
187
|
async function P(e, a, t) {
|
|
217
188
|
const l = Date.now();
|
|
218
189
|
return new Promise((o) => {
|
|
219
|
-
const
|
|
220
|
-
e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(
|
|
190
|
+
const r = async () => {
|
|
191
|
+
e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
|
|
221
192
|
};
|
|
222
|
-
|
|
193
|
+
r();
|
|
223
194
|
});
|
|
224
195
|
}
|
|
225
|
-
function
|
|
196
|
+
function Oe(e) {
|
|
226
197
|
var l;
|
|
227
198
|
const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
|
|
228
199
|
t && t.remove("app-left", "app-right");
|
|
@@ -239,45 +210,45 @@ function ce() {
|
|
|
239
210
|
const e = Date.now();
|
|
240
211
|
return e - ae > 500 ? (ae = e, !0) : !1;
|
|
241
212
|
}
|
|
242
|
-
let
|
|
213
|
+
let Te = 0;
|
|
243
214
|
function ue() {
|
|
244
|
-
return ++
|
|
215
|
+
return ++Te;
|
|
245
216
|
}
|
|
246
|
-
async function
|
|
217
|
+
async function rt(e) {
|
|
247
218
|
if (!ce())
|
|
248
219
|
return;
|
|
249
220
|
let a = !1, t;
|
|
250
|
-
const l = (
|
|
251
|
-
t =
|
|
221
|
+
const l = (r) => {
|
|
222
|
+
t = r, a = !0;
|
|
252
223
|
}, o = ue();
|
|
253
|
-
return
|
|
224
|
+
return u.on("confirmDlgResult" + o, l), u.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), u.off("confirmDlgResult" + o, l), t;
|
|
254
225
|
}
|
|
255
|
-
async function
|
|
226
|
+
async function ct(e) {
|
|
256
227
|
if (!ce())
|
|
257
228
|
return;
|
|
258
229
|
let a = !1, t;
|
|
259
|
-
const l = (
|
|
260
|
-
t =
|
|
230
|
+
const l = (r) => {
|
|
231
|
+
t = r, a = !0;
|
|
261
232
|
}, o = ue();
|
|
262
|
-
return
|
|
233
|
+
return u.on("promptDlgResult" + o, l), u.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), u.off("promptDlgResult" + o, l), t;
|
|
263
234
|
}
|
|
264
|
-
function
|
|
265
|
-
|
|
235
|
+
function ut() {
|
|
236
|
+
u.emit("openWaitDlg");
|
|
266
237
|
}
|
|
267
238
|
function pt() {
|
|
268
|
-
|
|
239
|
+
u.emit("closeWaitDlg");
|
|
240
|
+
}
|
|
241
|
+
function st(e, a) {
|
|
242
|
+
u.emit("message", { type: "error", text: e, timeout: a });
|
|
269
243
|
}
|
|
270
244
|
function _t(e, a) {
|
|
271
|
-
|
|
245
|
+
u.emit("message", { type: "info", text: e, timeout: a });
|
|
272
246
|
}
|
|
273
247
|
function dt(e, a) {
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
function it(e, a) {
|
|
277
|
-
p.emit("message", { type: "success", text: e, timeout: a });
|
|
248
|
+
u.emit("message", { type: "success", text: e, timeout: a });
|
|
278
249
|
}
|
|
279
250
|
function ft(e, a) {
|
|
280
|
-
|
|
251
|
+
u.emit("message", { type: "warning", text: e, timeout: a });
|
|
281
252
|
}
|
|
282
253
|
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 || {});
|
|
283
254
|
function oe(e, a) {
|
|
@@ -401,164 +372,164 @@ const Ee = [
|
|
|
401
372
|
mainActive: 2
|
|
402
373
|
}
|
|
403
374
|
];
|
|
404
|
-
function
|
|
375
|
+
function K(e) {
|
|
405
376
|
let a, t = 0;
|
|
406
377
|
const l = e.split("/").filter((o) => o.trim() !== "");
|
|
407
378
|
return Ee.forEach((o) => {
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
for (let c = 0; c < l.length && !(c >=
|
|
411
|
-
|
|
412
|
-
|
|
379
|
+
const r = o.path.split("/").filter((c) => c.trim() !== "");
|
|
380
|
+
let n = 0;
|
|
381
|
+
for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
|
|
382
|
+
n++;
|
|
383
|
+
n > 0 && n >= t && (a = o, t = n);
|
|
413
384
|
}), a;
|
|
414
385
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
386
|
+
const N = i("");
|
|
387
|
+
function b(e, a) {
|
|
417
388
|
const t = Z();
|
|
418
389
|
a === "/" && (a = t.lastAppPath);
|
|
419
|
-
const l =
|
|
390
|
+
const l = K(e), o = K(a);
|
|
420
391
|
if (!l) {
|
|
421
392
|
console.assert(!1, "invalid to route meta");
|
|
422
393
|
return;
|
|
423
394
|
}
|
|
424
395
|
if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
|
|
425
396
|
return;
|
|
426
|
-
const
|
|
427
|
-
|
|
397
|
+
const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
|
|
398
|
+
r ? n ? N.value = "" : (N.value = c ? "inner-left" : "inner-right", Oe(l.app)) : (N.value = "", je(l.app, c));
|
|
428
399
|
}
|
|
429
400
|
function Me() {
|
|
430
|
-
return !!
|
|
401
|
+
return !!I.get("accessToken");
|
|
431
402
|
}
|
|
432
|
-
function
|
|
433
|
-
return !!
|
|
403
|
+
function Ue() {
|
|
404
|
+
return !!I.get("activeOrg");
|
|
434
405
|
}
|
|
435
|
-
function
|
|
436
|
-
const l = Me(), o =
|
|
437
|
-
if (!
|
|
406
|
+
function it(e, a, t) {
|
|
407
|
+
const l = Me(), o = Ue(), r = K(e.path);
|
|
408
|
+
if (!r) {
|
|
438
409
|
t();
|
|
439
410
|
return;
|
|
440
411
|
}
|
|
441
|
-
if (
|
|
412
|
+
if (r.requiredState === "auth")
|
|
442
413
|
if (l)
|
|
443
414
|
if (o) {
|
|
444
|
-
const
|
|
445
|
-
|
|
415
|
+
const n = "/main";
|
|
416
|
+
b(n, a.path), t({ path: n });
|
|
446
417
|
} else
|
|
447
|
-
|
|
418
|
+
b(e.path, a.path), t();
|
|
448
419
|
else {
|
|
449
|
-
const
|
|
450
|
-
|
|
420
|
+
const n = "/passport/login";
|
|
421
|
+
b(n, a.path), t({ path: n });
|
|
451
422
|
}
|
|
452
|
-
else if (
|
|
423
|
+
else if (r.requiredState === "org")
|
|
453
424
|
if (l)
|
|
454
425
|
if (o)
|
|
455
|
-
|
|
426
|
+
b(e.path, a.path), t();
|
|
456
427
|
else {
|
|
457
|
-
const
|
|
458
|
-
|
|
428
|
+
const n = "/org/joinOrCreate";
|
|
429
|
+
b(n, a.path), t({ path: n });
|
|
459
430
|
}
|
|
460
431
|
else {
|
|
461
|
-
const
|
|
462
|
-
|
|
432
|
+
const n = "/passport/login";
|
|
433
|
+
b(n, a.path), t({ path: n });
|
|
463
434
|
}
|
|
464
435
|
else if (l)
|
|
465
436
|
if (o) {
|
|
466
|
-
const
|
|
467
|
-
|
|
437
|
+
const n = "/main";
|
|
438
|
+
b(n, a.path), t({ path: n });
|
|
468
439
|
} else {
|
|
469
|
-
const
|
|
470
|
-
|
|
440
|
+
const n = "/org/joinOrCreate";
|
|
441
|
+
b(n, a.path), t({ path: n });
|
|
471
442
|
}
|
|
472
443
|
else
|
|
473
|
-
|
|
444
|
+
b(e.path, a.path), t();
|
|
474
445
|
}
|
|
475
446
|
function ee(e, a) {
|
|
476
|
-
const t =
|
|
447
|
+
const t = re(), l = g({
|
|
477
448
|
get() {
|
|
478
449
|
return t.hasView(e);
|
|
479
450
|
},
|
|
480
|
-
set(
|
|
481
|
-
|
|
451
|
+
set(r) {
|
|
452
|
+
r ? t.addView(e) : t.delView(e);
|
|
482
453
|
}
|
|
483
|
-
}), o = (
|
|
484
|
-
a == null || a(
|
|
454
|
+
}), o = (r) => {
|
|
455
|
+
a == null || a(r), l.value = !0;
|
|
485
456
|
};
|
|
486
|
-
return
|
|
487
|
-
|
|
488
|
-
}),
|
|
489
|
-
|
|
457
|
+
return A(() => {
|
|
458
|
+
u.on(e, o);
|
|
459
|
+
}), j(() => {
|
|
460
|
+
u.off(e, o);
|
|
490
461
|
}), { open: l };
|
|
491
462
|
}
|
|
492
|
-
const
|
|
463
|
+
const $e = /* @__PURE__ */ T({
|
|
493
464
|
__name: "index",
|
|
494
465
|
setup(e) {
|
|
495
|
-
const a =
|
|
496
|
-
var
|
|
497
|
-
return ((
|
|
498
|
-
}),
|
|
499
|
-
var
|
|
500
|
-
return ((
|
|
501
|
-
}),
|
|
502
|
-
var
|
|
503
|
-
return ((
|
|
504
|
-
}), v =
|
|
505
|
-
var
|
|
506
|
-
return ((
|
|
466
|
+
const a = Q(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = g(() => {
|
|
467
|
+
var d;
|
|
468
|
+
return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
|
|
469
|
+
}), p = g(() => {
|
|
470
|
+
var d;
|
|
471
|
+
return ((d = r.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
472
|
+
}), s = g(() => {
|
|
473
|
+
var d;
|
|
474
|
+
return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
|
|
475
|
+
}), v = g(() => {
|
|
476
|
+
var d;
|
|
477
|
+
return ((d = n.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
507
478
|
});
|
|
508
|
-
let
|
|
509
|
-
const
|
|
510
|
-
l.value =
|
|
479
|
+
let C = 0, f = !1;
|
|
480
|
+
const R = (d) => {
|
|
481
|
+
l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, C = d.seq, f = !1, t.value = !0;
|
|
511
482
|
};
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}),
|
|
515
|
-
|
|
483
|
+
A(() => {
|
|
484
|
+
u.on("confirmDlg", R);
|
|
485
|
+
}), j(() => {
|
|
486
|
+
u.off("confirmDlg", R);
|
|
516
487
|
});
|
|
517
|
-
const
|
|
518
|
-
t.value = !1,
|
|
488
|
+
const $ = () => {
|
|
489
|
+
t.value = !1, f || (u.emit("confirmDlgResult" + C, !0), f = !0);
|
|
519
490
|
};
|
|
520
|
-
return
|
|
521
|
-
!
|
|
522
|
-
}), (
|
|
523
|
-
const
|
|
524
|
-
return
|
|
491
|
+
return G(t, (d) => {
|
|
492
|
+
!d && !f && (u.emit("confirmDlgResult" + C, !1), f = !0);
|
|
493
|
+
}), (d, k) => {
|
|
494
|
+
const V = h("v-card-text"), B = h("v-btn"), L = h("v-card-actions"), _ = h("v-card"), x = h("v-dialog");
|
|
495
|
+
return D(), O(x, {
|
|
525
496
|
modelValue: z(t),
|
|
526
|
-
"onUpdate:modelValue":
|
|
497
|
+
"onUpdate:modelValue": k[1] || (k[1] = (E) => J(t) ? t.value = E : null),
|
|
527
498
|
onKeydown: [
|
|
528
|
-
|
|
529
|
-
F(
|
|
499
|
+
k[2] || (k[2] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
500
|
+
F(U($, ["stop", "prevent"]), ["enter"])
|
|
530
501
|
],
|
|
531
502
|
transition: "dialog-top-transition",
|
|
532
503
|
"max-width": "600px"
|
|
533
504
|
}, {
|
|
534
505
|
default: w(() => [
|
|
535
|
-
|
|
506
|
+
y(_, { title: l.value }, {
|
|
536
507
|
default: w(() => [
|
|
537
|
-
|
|
508
|
+
y(V, null, {
|
|
538
509
|
default: w(() => [
|
|
539
|
-
|
|
510
|
+
q(S(o.value), 1)
|
|
540
511
|
]),
|
|
541
512
|
_: 1
|
|
542
513
|
}),
|
|
543
|
-
|
|
514
|
+
y(L, { class: "d-flex justify-end" }, {
|
|
544
515
|
default: w(() => [
|
|
545
|
-
|
|
546
|
-
onClick:
|
|
516
|
+
y(B, {
|
|
517
|
+
onClick: k[0] || (k[0] = (E) => t.value = !1),
|
|
547
518
|
color: c.value,
|
|
548
519
|
variant: "text"
|
|
549
520
|
}, {
|
|
550
521
|
default: w(() => [
|
|
551
|
-
|
|
522
|
+
q(S(p.value), 1)
|
|
552
523
|
]),
|
|
553
524
|
_: 1
|
|
554
525
|
}, 8, ["color"]),
|
|
555
|
-
|
|
556
|
-
onClick:
|
|
557
|
-
color:
|
|
526
|
+
y(B, {
|
|
527
|
+
onClick: $,
|
|
528
|
+
color: s.value,
|
|
558
529
|
variant: "text"
|
|
559
530
|
}, {
|
|
560
531
|
default: w(() => [
|
|
561
|
-
|
|
532
|
+
q(S(v.value), 1)
|
|
562
533
|
]),
|
|
563
534
|
_: 1
|
|
564
535
|
}, 8, ["color"])
|
|
@@ -573,7 +544,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
573
544
|
}, 8, ["modelValue", "onKeydown"]);
|
|
574
545
|
};
|
|
575
546
|
}
|
|
576
|
-
}),
|
|
547
|
+
}), Le = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), We = /* @__PURE__ */ Le(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
|
|
577
548
|
/* @__PURE__ */ m("div"),
|
|
578
549
|
/* @__PURE__ */ m("div"),
|
|
579
550
|
/* @__PURE__ */ m("div"),
|
|
@@ -586,9 +557,9 @@ const Ue = /* @__PURE__ */ M({
|
|
|
586
557
|
/* @__PURE__ */ m("div"),
|
|
587
558
|
/* @__PURE__ */ m("div"),
|
|
588
559
|
/* @__PURE__ */ m("div")
|
|
589
|
-
], -1)),
|
|
590
|
-
|
|
591
|
-
],
|
|
560
|
+
], -1)), ze = [
|
|
561
|
+
We
|
|
562
|
+
], Fe = /* @__PURE__ */ T({
|
|
592
563
|
__name: "index",
|
|
593
564
|
props: {
|
|
594
565
|
zIndex: {
|
|
@@ -597,21 +568,21 @@ const Ue = /* @__PURE__ */ M({
|
|
|
597
568
|
}
|
|
598
569
|
},
|
|
599
570
|
setup(e) {
|
|
600
|
-
const a =
|
|
571
|
+
const a = Y(), t = e, l = g(() => ({
|
|
601
572
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
602
573
|
zIndex: t.zIndex
|
|
603
574
|
}));
|
|
604
|
-
return (o,
|
|
575
|
+
return (o, r) => (D(), H("div", {
|
|
605
576
|
class: "x-cont",
|
|
606
577
|
style: ge(l.value)
|
|
607
|
-
},
|
|
578
|
+
}, ze, 4));
|
|
608
579
|
}
|
|
609
|
-
}),
|
|
580
|
+
}), pe = (e, a) => {
|
|
610
581
|
const t = e.__vccOpts || e;
|
|
611
582
|
for (const [l, o] of a)
|
|
612
583
|
t[l] = o;
|
|
613
584
|
return t;
|
|
614
|
-
},
|
|
585
|
+
}, Ke = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ T({
|
|
615
586
|
__name: "item",
|
|
616
587
|
props: {
|
|
617
588
|
id: {},
|
|
@@ -622,150 +593,150 @@ const Ue = /* @__PURE__ */ M({
|
|
|
622
593
|
emits: ["timeout"],
|
|
623
594
|
setup(e, { emit: a }) {
|
|
624
595
|
const t = e, l = i(!0), o = a;
|
|
625
|
-
return
|
|
596
|
+
return A(() => {
|
|
626
597
|
setTimeout(() => {
|
|
627
598
|
o("timeout", t.id);
|
|
628
599
|
}, t.timeout);
|
|
629
|
-
}),
|
|
630
|
-
|
|
631
|
-
}), (
|
|
600
|
+
}), G(l, (r) => {
|
|
601
|
+
r || o("timeout", t.id);
|
|
602
|
+
}), (r, n) => {
|
|
632
603
|
const c = h("v-alert");
|
|
633
|
-
return
|
|
604
|
+
return D(), O(c, {
|
|
634
605
|
modelValue: l.value,
|
|
635
|
-
"onUpdate:modelValue":
|
|
606
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
|
|
636
607
|
class: "mt-2",
|
|
637
608
|
"max-width": "90%",
|
|
638
609
|
width: "500px",
|
|
639
610
|
elevation: "1",
|
|
640
611
|
density: "compact",
|
|
641
612
|
closable: "",
|
|
642
|
-
type:
|
|
643
|
-
text:
|
|
613
|
+
type: r.type,
|
|
614
|
+
text: r.text
|
|
644
615
|
}, null, 8, ["modelValue", "type", "text"]);
|
|
645
616
|
};
|
|
646
617
|
}
|
|
647
|
-
}), He = /* @__PURE__ */
|
|
618
|
+
}), He = /* @__PURE__ */ T({
|
|
648
619
|
__name: "index",
|
|
649
620
|
setup(e) {
|
|
650
621
|
const a = he({ items: [] });
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}),
|
|
654
|
-
|
|
622
|
+
A(() => {
|
|
623
|
+
u.on("message", t);
|
|
624
|
+
}), j(() => {
|
|
625
|
+
u.off("message", t);
|
|
655
626
|
});
|
|
656
627
|
const t = (c) => {
|
|
657
|
-
|
|
628
|
+
r(c.type, c.text, c.timeout);
|
|
658
629
|
}, l = (c) => {
|
|
659
|
-
|
|
630
|
+
n(c);
|
|
660
631
|
};
|
|
661
632
|
let o = 0;
|
|
662
|
-
const
|
|
633
|
+
const r = (c, p, s) => {
|
|
663
634
|
const v = o++;
|
|
664
|
-
a.items.push({ id: v, type: c, text:
|
|
665
|
-
},
|
|
666
|
-
const
|
|
667
|
-
|
|
635
|
+
a.items.push({ id: v, type: c, text: p, timeout: s });
|
|
636
|
+
}, n = (c) => {
|
|
637
|
+
const p = a.items.findIndex((s) => s.id === c);
|
|
638
|
+
p >= 0 && a.items.splice(p, 1);
|
|
668
639
|
};
|
|
669
|
-
return (c,
|
|
670
|
-
onClick:
|
|
640
|
+
return (c, p) => (D(), H("div", {
|
|
641
|
+
onClick: p[0] || (p[0] = U(() => {
|
|
671
642
|
}, ["stop"])),
|
|
672
643
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
673
644
|
}, [
|
|
674
|
-
(
|
|
645
|
+
(D(!0), H(we, null, xe(a.items, (s) => (D(), O(Ne, {
|
|
675
646
|
onTimeout: l,
|
|
676
|
-
id:
|
|
677
|
-
type:
|
|
678
|
-
text:
|
|
679
|
-
timeout:
|
|
680
|
-
key:
|
|
647
|
+
id: s.id,
|
|
648
|
+
type: s.type,
|
|
649
|
+
text: s.text,
|
|
650
|
+
timeout: s.timeout,
|
|
651
|
+
key: s.id
|
|
681
652
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
682
653
|
]));
|
|
683
654
|
}
|
|
684
|
-
}),
|
|
655
|
+
}), Xe = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-8c2268ea"]]), Ge = /* @__PURE__ */ T({
|
|
685
656
|
__name: "index",
|
|
686
657
|
setup(e) {
|
|
687
|
-
const a =
|
|
688
|
-
var
|
|
689
|
-
return ((
|
|
690
|
-
}),
|
|
691
|
-
var
|
|
692
|
-
return ((
|
|
693
|
-
}),
|
|
694
|
-
var
|
|
695
|
-
return ((
|
|
696
|
-
}),
|
|
697
|
-
var
|
|
698
|
-
return ((
|
|
699
|
-
}),
|
|
700
|
-
let
|
|
701
|
-
const
|
|
658
|
+
const a = Q(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), s = i(), v = i(), C = g(() => {
|
|
659
|
+
var _;
|
|
660
|
+
return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
|
|
661
|
+
}), f = g(() => {
|
|
662
|
+
var _;
|
|
663
|
+
return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
|
|
664
|
+
}), R = g(() => {
|
|
665
|
+
var _;
|
|
666
|
+
return ((_ = v.value) == null ? void 0 : _.color) ?? "primary";
|
|
667
|
+
}), $ = g(() => {
|
|
668
|
+
var _;
|
|
669
|
+
return ((_ = v.value) == null ? void 0 : _.text) ?? a.t("confirm");
|
|
670
|
+
}), d = i();
|
|
671
|
+
let k = 0, V = !1;
|
|
672
|
+
const B = async (_) => {
|
|
702
673
|
var x;
|
|
703
|
-
l.value =
|
|
674
|
+
l.value = _.title, o.value = _.text, r.value = _.label, n.value = _.placeholder, c.value = _.rules, p.value = _.value, s.value = _.cancel, v.value = _.confirm, k = _.seq, V = !1, t.value = !0, await P(() => d.value !== void 0, 1e3), (x = d.value) == null || x.focus();
|
|
704
675
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}),
|
|
708
|
-
|
|
676
|
+
A(() => {
|
|
677
|
+
u.on("promptDlg", B);
|
|
678
|
+
}), j(() => {
|
|
679
|
+
u.off("promptDlg", B);
|
|
709
680
|
});
|
|
710
|
-
const
|
|
711
|
-
t.value = !1,
|
|
681
|
+
const L = () => {
|
|
682
|
+
t.value = !1, V || (u.emit("promptDlgResult" + k, p.value ?? ""), V = !0);
|
|
712
683
|
};
|
|
713
|
-
return
|
|
714
|
-
!
|
|
715
|
-
}), (
|
|
716
|
-
const
|
|
717
|
-
return
|
|
684
|
+
return G(t, (_) => {
|
|
685
|
+
!_ && !V && (u.emit("promptDlgResult" + k, void 0), V = !0);
|
|
686
|
+
}), (_, x) => {
|
|
687
|
+
const E = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), te = h("v-btn"), de = h("v-card-actions"), fe = h("v-card"), ie = h("v-dialog");
|
|
688
|
+
return D(), O(ie, {
|
|
718
689
|
modelValue: z(t),
|
|
719
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
690
|
+
"onUpdate:modelValue": x[2] || (x[2] = (M) => J(t) ? t.value = M : null),
|
|
720
691
|
onKeydown: [
|
|
721
|
-
x[3] || (x[3] = F(
|
|
722
|
-
F(
|
|
692
|
+
x[3] || (x[3] = F(U((M) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
693
|
+
F(U(L, ["stop", "prevent"]), ["enter"])
|
|
723
694
|
],
|
|
724
695
|
transition: "dialog-top-transition",
|
|
725
696
|
"max-width": "600px"
|
|
726
697
|
}, {
|
|
727
698
|
default: w(() => [
|
|
728
|
-
|
|
699
|
+
y(fe, { title: l.value }, {
|
|
729
700
|
default: w(() => [
|
|
730
|
-
o.value ? (
|
|
701
|
+
o.value ? (D(), O(E, { key: 0 }, {
|
|
731
702
|
default: w(() => [
|
|
732
|
-
|
|
703
|
+
q(S(o.value), 1)
|
|
733
704
|
]),
|
|
734
705
|
_: 1
|
|
735
706
|
})) : ye("", !0),
|
|
736
|
-
|
|
707
|
+
y(_e, { class: "mx-3" }, {
|
|
737
708
|
default: w(() => [
|
|
738
|
-
|
|
739
|
-
modelValue:
|
|
740
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
741
|
-
label:
|
|
742
|
-
placeholder:
|
|
709
|
+
y(se, {
|
|
710
|
+
modelValue: p.value,
|
|
711
|
+
"onUpdate:modelValue": x[0] || (x[0] = (M) => p.value = M),
|
|
712
|
+
label: r.value,
|
|
713
|
+
placeholder: n.value,
|
|
743
714
|
rules: c.value,
|
|
744
715
|
ref_key: "target",
|
|
745
|
-
ref:
|
|
716
|
+
ref: d
|
|
746
717
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
747
718
|
]),
|
|
748
719
|
_: 1
|
|
749
720
|
}),
|
|
750
|
-
|
|
721
|
+
y(de, { class: "d-flex justify-end" }, {
|
|
751
722
|
default: w(() => [
|
|
752
|
-
|
|
753
|
-
onClick: x[1] || (x[1] = (
|
|
754
|
-
color:
|
|
723
|
+
y(te, {
|
|
724
|
+
onClick: x[1] || (x[1] = (M) => t.value = !1),
|
|
725
|
+
color: C.value,
|
|
755
726
|
variant: "text"
|
|
756
727
|
}, {
|
|
757
728
|
default: w(() => [
|
|
758
|
-
|
|
729
|
+
q(S(f.value), 1)
|
|
759
730
|
]),
|
|
760
731
|
_: 1
|
|
761
732
|
}, 8, ["color"]),
|
|
762
|
-
|
|
763
|
-
onClick:
|
|
764
|
-
color:
|
|
733
|
+
y(te, {
|
|
734
|
+
onClick: L,
|
|
735
|
+
color: R.value,
|
|
765
736
|
variant: "text"
|
|
766
737
|
}, {
|
|
767
738
|
default: w(() => [
|
|
768
|
-
|
|
739
|
+
q(S($.value), 1)
|
|
769
740
|
]),
|
|
770
741
|
_: 1
|
|
771
742
|
}, 8, ["color"])
|
|
@@ -780,37 +751,37 @@ const Ue = /* @__PURE__ */ M({
|
|
|
780
751
|
}, 8, ["modelValue", "onKeydown"]);
|
|
781
752
|
};
|
|
782
753
|
}
|
|
783
|
-
}),
|
|
754
|
+
}), Je = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ T({
|
|
784
755
|
__name: "index",
|
|
785
756
|
setup(e) {
|
|
786
|
-
const a =
|
|
757
|
+
const a = Q(), { open: t } = ee("waitDlg"), l = () => {
|
|
787
758
|
t.value = !0;
|
|
788
759
|
}, o = () => {
|
|
789
760
|
t.value = !1;
|
|
790
761
|
};
|
|
791
|
-
return
|
|
792
|
-
|
|
793
|
-
}),
|
|
794
|
-
|
|
795
|
-
}), (
|
|
796
|
-
const c = h("v-card"),
|
|
797
|
-
return
|
|
762
|
+
return A(() => {
|
|
763
|
+
u.on("openWaitDlg", l), u.on("closeWaitDlg", o);
|
|
764
|
+
}), j(() => {
|
|
765
|
+
u.off("openWaitDlg", l), u.off("closeWaitDlg", o);
|
|
766
|
+
}), (r, n) => {
|
|
767
|
+
const c = h("v-card"), p = h("v-dialog");
|
|
768
|
+
return D(), O(p, {
|
|
798
769
|
modelValue: z(t),
|
|
799
|
-
"onUpdate:modelValue":
|
|
770
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => J(t) ? t.value = s : null),
|
|
800
771
|
persistent: "",
|
|
801
772
|
"no-click-animation": "",
|
|
802
773
|
fullscreen: ""
|
|
803
774
|
}, {
|
|
804
775
|
default: w(() => [
|
|
805
|
-
m("div",
|
|
806
|
-
|
|
776
|
+
m("div", Je, [
|
|
777
|
+
y(c, {
|
|
807
778
|
width: "300px",
|
|
808
779
|
height: "80px",
|
|
809
780
|
loading: ""
|
|
810
781
|
}, {
|
|
811
782
|
default: w(() => [
|
|
812
783
|
m("div", Qe, [
|
|
813
|
-
m("span", null,
|
|
784
|
+
m("span", null, S(z(a).t("waitingResponse")), 1)
|
|
814
785
|
])
|
|
815
786
|
]),
|
|
816
787
|
_: 1
|
|
@@ -822,105 +793,59 @@ const Ue = /* @__PURE__ */ M({
|
|
|
822
793
|
};
|
|
823
794
|
}
|
|
824
795
|
}), Ze = (e) => {
|
|
825
|
-
e.component("x-confirm-dlg",
|
|
796
|
+
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);
|
|
826
797
|
};
|
|
827
|
-
function
|
|
828
|
-
const e =
|
|
798
|
+
function gt() {
|
|
799
|
+
const e = Y(), 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"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
829
800
|
return {
|
|
830
801
|
primaryColor: a,
|
|
831
802
|
secondaryColor: t,
|
|
832
803
|
backgroundColor0: l,
|
|
833
804
|
backgroundColor1: o,
|
|
834
|
-
backgroundColor2:
|
|
835
|
-
highlightColor:
|
|
805
|
+
backgroundColor2: r,
|
|
806
|
+
highlightColor: n,
|
|
836
807
|
borderColor: c
|
|
837
808
|
};
|
|
838
809
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
r = !0;
|
|
849
|
-
}, _ = () => {
|
|
850
|
-
var g;
|
|
851
|
-
if (!n.isEmpty()) {
|
|
852
|
-
n.hasView("waitDlg") || n.popView();
|
|
810
|
+
function vt() {
|
|
811
|
+
const e = be(), a = ne(), t = Z(), l = re(), o = () => {
|
|
812
|
+
console.log("onPause");
|
|
813
|
+
}, r = () => {
|
|
814
|
+
console.log("onResume");
|
|
815
|
+
}, n = () => {
|
|
816
|
+
var R;
|
|
817
|
+
if (!l.isEmpty()) {
|
|
818
|
+
l.hasView("waitDlg") || l.popView();
|
|
853
819
|
return;
|
|
854
820
|
}
|
|
855
|
-
const
|
|
856
|
-
(
|
|
821
|
+
const f = K(e.path);
|
|
822
|
+
(f == null ? void 0 : f.level) === 0 ? (R = navigator == null ? void 0 : navigator.Backbutton) == null || R.goHome(
|
|
857
823
|
() => {
|
|
858
824
|
},
|
|
859
825
|
() => {
|
|
860
826
|
}
|
|
861
|
-
) :
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
if (!e && u.ctrlKey && u.altKey && u.code === "KeyD") {
|
|
874
|
-
o.dark = !o.dark, o.$persist();
|
|
875
|
-
return;
|
|
876
|
-
}
|
|
877
|
-
if (!e && u.ctrlKey && u.altKey && u.code === "KeyL") {
|
|
878
|
-
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en", o.$persist();
|
|
827
|
+
) : a.back();
|
|
828
|
+
}, c = (f) => {
|
|
829
|
+
t.dark = f;
|
|
830
|
+
}, p = (f) => {
|
|
831
|
+
t.locale = f;
|
|
832
|
+
}, s = (f) => {
|
|
833
|
+
t.permissionObjects = f[0], t.permissionChecksum = f[1];
|
|
834
|
+
}, v = (f) => {
|
|
835
|
+
t.lastAppPath = f;
|
|
836
|
+
}, C = (f) => {
|
|
837
|
+
if (f.key === "Escape") {
|
|
838
|
+
n();
|
|
879
839
|
return;
|
|
880
840
|
}
|
|
881
841
|
};
|
|
882
|
-
|
|
883
|
-
window.addEventListener("keydown",
|
|
884
|
-
}),
|
|
885
|
-
window.removeEventListener("keydown",
|
|
886
|
-
});
|
|
887
|
-
let y;
|
|
888
|
-
const C = async () => {
|
|
889
|
-
if (!r)
|
|
890
|
-
return;
|
|
891
|
-
const u = L(t.path);
|
|
892
|
-
if (!(!u || u.requiredState !== "org"))
|
|
893
|
-
try {
|
|
894
|
-
const { update: g, permissions: b } = await Pe(a, {
|
|
895
|
-
checksum: o.permissionChecksum
|
|
896
|
-
});
|
|
897
|
-
if (!g)
|
|
898
|
-
return;
|
|
899
|
-
const V = {};
|
|
900
|
-
for (const q in b) {
|
|
901
|
-
if (q === "checksum")
|
|
902
|
-
continue;
|
|
903
|
-
const d = b[q];
|
|
904
|
-
V[q] = JSON.parse(d);
|
|
905
|
-
}
|
|
906
|
-
o.permissionObjects = V, o.permissionChecksum = b.checksum ?? "", o.$persist();
|
|
907
|
-
} catch (g) {
|
|
908
|
-
console.error(g);
|
|
909
|
-
}
|
|
910
|
-
}, T = async (u) => {
|
|
911
|
-
u && await C(), clearTimeout(y), y = setTimeout(async () => {
|
|
912
|
-
await C(), y && T();
|
|
913
|
-
}, 3e3);
|
|
914
|
-
}, j = () => {
|
|
915
|
-
clearTimeout(y), y = void 0;
|
|
916
|
-
};
|
|
917
|
-
R(() => {
|
|
918
|
-
a && T(!0);
|
|
919
|
-
}), O(() => {
|
|
920
|
-
j();
|
|
842
|
+
A(() => {
|
|
843
|
+
u.on("pause", o), u.on("resume", r), u.on("backbutton", n), u.on("darkChange", c), u.on("localeChange", p), u.on("permissionChange", s), u.on("lastAppPathChange", v), window.addEventListener("keydown", C), u.emit("microAppReady");
|
|
844
|
+
}), j(() => {
|
|
845
|
+
u.off("pause", o), u.off("resume", r), u.off("backbutton", n), u.off("darkChange", c), u.off("localeChange", p), u.off("permissionChange", s), u.off("lastAppPathChange", v), window.removeEventListener("keydown", C);
|
|
921
846
|
});
|
|
922
847
|
}
|
|
923
|
-
function
|
|
848
|
+
function mt() {
|
|
924
849
|
const e = Z();
|
|
925
850
|
function a(t, l) {
|
|
926
851
|
const o = e.permissionObjects[t];
|
|
@@ -928,36 +853,36 @@ function ht() {
|
|
|
928
853
|
}
|
|
929
854
|
return { verifyPermission: a };
|
|
930
855
|
}
|
|
931
|
-
function
|
|
932
|
-
const e =
|
|
856
|
+
function ht() {
|
|
857
|
+
const e = Y(), a = ke(), 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");
|
|
933
858
|
return { dark: t, sysBarAvail: l, compactWidth: o };
|
|
934
859
|
}
|
|
935
|
-
const
|
|
860
|
+
const wt = { install: Ze };
|
|
936
861
|
export {
|
|
937
862
|
Be as Permission,
|
|
938
863
|
je as appAppear,
|
|
939
|
-
|
|
864
|
+
Oe as clearAppAppear,
|
|
940
865
|
pt as closeWaitDlg,
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
866
|
+
lt as createAxios,
|
|
867
|
+
wt as default,
|
|
868
|
+
u as eventBus,
|
|
944
869
|
oe as isExist,
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
870
|
+
K as matchRouteMeta,
|
|
871
|
+
st as messageError,
|
|
872
|
+
_t as messageInfo,
|
|
873
|
+
dt as messageSuccess,
|
|
949
874
|
ft as messageWarning,
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
875
|
+
it as onBeforeEach,
|
|
876
|
+
rt as openConfirmDlg,
|
|
877
|
+
ct as openPromptDlg,
|
|
878
|
+
ut as openWaitDlg,
|
|
879
|
+
N as routeTransName,
|
|
880
|
+
gt as useColor,
|
|
956
881
|
Z as useGlobalStore,
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
882
|
+
vt as useMicroApp,
|
|
883
|
+
mt as usePermission,
|
|
884
|
+
ht as useSystem,
|
|
885
|
+
re as useViewMgrStore,
|
|
961
886
|
ee as useViewStack,
|
|
962
887
|
nt as waitMs,
|
|
963
888
|
P as waitUtil
|
package/dist/store/global.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import 'pinia-plugin-persistedstate';
|
|
2
1
|
import { PermissionObjects } from '../utils';
|
|
3
2
|
export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
|
|
4
|
-
dark: import("vue").Ref<boolean
|
|
3
|
+
dark: import("vue").Ref<boolean>;
|
|
5
4
|
locale: import("vue").Ref<string>;
|
|
6
5
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
7
6
|
permissionChecksum: import("vue").Ref<string>;
|
|
8
7
|
lastAppPath: import("vue").Ref<string>;
|
|
9
8
|
}, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "lastAppPath">>, Pick<{
|
|
10
|
-
dark: import("vue").Ref<boolean
|
|
9
|
+
dark: import("vue").Ref<boolean>;
|
|
11
10
|
locale: import("vue").Ref<string>;
|
|
12
11
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
13
12
|
permissionChecksum: import("vue").Ref<string>;
|
|
14
13
|
lastAppPath: import("vue").Ref<string>;
|
|
15
14
|
}, never>, Pick<{
|
|
16
|
-
dark: import("vue").Ref<boolean
|
|
15
|
+
dark: import("vue").Ref<boolean>;
|
|
17
16
|
locale: import("vue").Ref<string>;
|
|
18
17
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
19
18
|
permissionChecksum: import("vue").Ref<string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.66",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"axios": "^1.6.8",
|
|
30
30
|
"pinia": "^2.1.7",
|
|
31
|
+
"pinia-plugin-persistedstate": "^3.2.1",
|
|
31
32
|
"vue": "^3.4.30",
|
|
32
33
|
"vue-i18n": "^9.13.1",
|
|
33
34
|
"vue-router": "^4.4.0",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"eslint-plugin-vue": "^9.24.1",
|
|
45
46
|
"husky": "^9.0.11",
|
|
46
47
|
"lint-staged": "^15.2.2",
|
|
47
|
-
"pinia-plugin-persistedstate": "^3.2.1",
|
|
48
48
|
"prettier": "3.2.5",
|
|
49
49
|
"sass": "^1.74.1",
|
|
50
50
|
"typescript": "^5.2.2",
|