x-essential-lib 0.4.6 → 0.5.0
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 -2
- package/dist/composables/microApp.d.ts +2 -0
- package/dist/index.js +389 -380
- package/dist/store/global.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-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-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { ref as f, watch as
|
|
3
|
-
import { useTheme as
|
|
2
|
+
import { ref as f, watch as F, computed as g, onMounted as V, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as R, createBlock as B, unref as W, isRef as G, withKeys as z, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as E, toDisplayString as T, createElementBlock as J, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
|
|
3
|
+
import { useTheme as H, useLocale as Q, useDisplay as be } from "vuetify";
|
|
4
4
|
import { defineStore as re } from "pinia";
|
|
5
5
|
import Ce from "axios";
|
|
6
|
-
import { useRouter as
|
|
7
|
-
const
|
|
6
|
+
import { useRouter as le, useRoute as De } from "vue-router";
|
|
7
|
+
const ne = re(
|
|
8
8
|
"global",
|
|
9
9
|
() => {
|
|
10
|
-
const e =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(
|
|
14
|
-
e.global.name.value =
|
|
10
|
+
const e = H(), a = f(!0), t = f();
|
|
11
|
+
F(
|
|
12
|
+
t,
|
|
13
|
+
(l) => {
|
|
14
|
+
e.global.name.value = l ? "dark" : "light";
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
immediate: !0
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const r = f("en"), o = f({}), n = f("");
|
|
21
21
|
return {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
running: a,
|
|
23
|
+
dark: t,
|
|
24
|
+
locale: r,
|
|
25
|
+
permissionObjects: o,
|
|
26
|
+
permissionChecksum: n
|
|
26
27
|
};
|
|
27
28
|
},
|
|
28
29
|
{
|
|
@@ -43,30 +44,30 @@ const Q = re(
|
|
|
43
44
|
if (u > 0)
|
|
44
45
|
return e.value[u - 1];
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
return e.value.find((
|
|
47
|
+
function r(u) {
|
|
48
|
+
return e.value.find((_) => _ === u) !== void 0;
|
|
48
49
|
}
|
|
49
50
|
function o(u) {
|
|
50
51
|
n(u), e.value.push(u);
|
|
51
52
|
}
|
|
52
53
|
function n(u) {
|
|
53
|
-
const
|
|
54
|
-
|
|
54
|
+
const _ = e.value.findIndex((v) => v === u);
|
|
55
|
+
_ !== -1 && e.value.splice(_, 1);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function l() {
|
|
57
58
|
e.value.pop();
|
|
58
59
|
}
|
|
59
60
|
function c() {
|
|
60
61
|
e.value = [];
|
|
61
62
|
}
|
|
62
|
-
return { isEmpty: a, lastView: t, hasView:
|
|
63
|
+
return { isEmpty: a, lastView: t, hasView: r, addView: o, delView: n, popView: l, clearViews: c };
|
|
63
64
|
});
|
|
64
65
|
/*! js-cookie v3.0.5 | MIT */
|
|
65
|
-
function
|
|
66
|
+
function L(e) {
|
|
66
67
|
for (var a = 1; a < arguments.length; a++) {
|
|
67
68
|
var t = arguments[a];
|
|
68
|
-
for (var
|
|
69
|
-
e[
|
|
69
|
+
for (var r in t)
|
|
70
|
+
e[r] = t[r];
|
|
70
71
|
}
|
|
71
72
|
return e;
|
|
72
73
|
}
|
|
@@ -81,48 +82,48 @@ var Se = {
|
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
function
|
|
85
|
-
function t(o, n,
|
|
85
|
+
function X(e, a) {
|
|
86
|
+
function t(o, n, l) {
|
|
86
87
|
if (!(typeof document > "u")) {
|
|
87
|
-
|
|
88
|
+
l = L({}, a, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
88
89
|
var c = "";
|
|
89
|
-
for (var u in
|
|
90
|
-
|
|
90
|
+
for (var u in l)
|
|
91
|
+
l[u] && (c += "; " + u, l[u] !== !0 && (c += "=" + l[u].split(";")[0]));
|
|
91
92
|
return document.cookie = o + "=" + e.write(n, o) + c;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function r(o) {
|
|
95
96
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
96
|
-
for (var n = document.cookie ? document.cookie.split("; ") : [],
|
|
97
|
-
var u = n[c].split("="),
|
|
97
|
+
for (var n = document.cookie ? document.cookie.split("; ") : [], l = {}, c = 0; c < n.length; c++) {
|
|
98
|
+
var u = n[c].split("="), _ = u.slice(1).join("=");
|
|
98
99
|
try {
|
|
99
|
-
var
|
|
100
|
-
if (
|
|
100
|
+
var v = decodeURIComponent(u[0]);
|
|
101
|
+
if (l[v] = e.read(_, v), o === v)
|
|
101
102
|
break;
|
|
102
103
|
} catch {
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
return o ?
|
|
106
|
+
return o ? l[o] : l;
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
return Object.create(
|
|
109
110
|
{
|
|
110
111
|
set: t,
|
|
111
|
-
get:
|
|
112
|
+
get: r,
|
|
112
113
|
remove: function(o, n) {
|
|
113
114
|
t(
|
|
114
115
|
o,
|
|
115
116
|
"",
|
|
116
|
-
|
|
117
|
+
L({}, n, {
|
|
117
118
|
expires: -1
|
|
118
119
|
})
|
|
119
120
|
);
|
|
120
121
|
},
|
|
121
122
|
withAttributes: function(o) {
|
|
122
|
-
return
|
|
123
|
+
return X(this.converter, L({}, this.attributes, o));
|
|
123
124
|
},
|
|
124
125
|
withConverter: function(o) {
|
|
125
|
-
return
|
|
126
|
+
return X(L({}, this.converter, o), this.attributes);
|
|
126
127
|
}
|
|
127
128
|
},
|
|
128
129
|
{
|
|
@@ -131,8 +132,8 @@ function J(e, a) {
|
|
|
131
132
|
}
|
|
132
133
|
);
|
|
133
134
|
}
|
|
134
|
-
var
|
|
135
|
-
function
|
|
135
|
+
var A = X(Se, { path: "/" });
|
|
136
|
+
function rt(e) {
|
|
136
137
|
const a = Ce.create({
|
|
137
138
|
timeout: 6e3
|
|
138
139
|
});
|
|
@@ -147,7 +148,7 @@ function lt(e) {
|
|
|
147
148
|
), a;
|
|
148
149
|
}
|
|
149
150
|
function qe(e) {
|
|
150
|
-
const a =
|
|
151
|
+
const a = A.get("accessToken") ?? "";
|
|
151
152
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
152
153
|
}
|
|
153
154
|
function Ve(e, a) {
|
|
@@ -162,50 +163,50 @@ function Oe(e, a) {
|
|
|
162
163
|
if (!t)
|
|
163
164
|
return Promise.reject(e);
|
|
164
165
|
t.status === 401 && Te();
|
|
165
|
-
let
|
|
166
|
-
return
|
|
166
|
+
let r = (o = t.data) == null ? void 0 : o.message;
|
|
167
|
+
return r || (r = {
|
|
167
168
|
code: t.status,
|
|
168
169
|
message: t.statusText
|
|
169
|
-
}), a(
|
|
170
|
+
}), a(r), Promise.reject(e);
|
|
170
171
|
}
|
|
171
172
|
function Te() {
|
|
172
|
-
|
|
173
|
+
A.remove("accessToken"), A.remove("refreshToken"), A.remove("activeOrg"), le().replace({ path: "/passport/login" });
|
|
173
174
|
}
|
|
174
175
|
function je(e) {
|
|
175
176
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
176
|
-
var
|
|
177
|
-
|
|
177
|
+
var r = e.get(a);
|
|
178
|
+
r ? r.push(t) : e.set(a, [t]);
|
|
178
179
|
}, off: function(a, t) {
|
|
179
|
-
var
|
|
180
|
-
|
|
180
|
+
var r = e.get(a);
|
|
181
|
+
r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : e.set(a, []));
|
|
181
182
|
}, emit: function(a, t) {
|
|
182
|
-
var
|
|
183
|
-
|
|
183
|
+
var r = e.get(a);
|
|
184
|
+
r && r.slice().map(function(o) {
|
|
184
185
|
o(t);
|
|
185
|
-
}), (
|
|
186
|
+
}), (r = e.get("*")) && r.slice().map(function(o) {
|
|
186
187
|
o(a, t);
|
|
187
188
|
});
|
|
188
189
|
} };
|
|
189
190
|
}
|
|
190
|
-
const
|
|
191
|
-
async function
|
|
191
|
+
const s = je();
|
|
192
|
+
async function lt(e) {
|
|
192
193
|
return new Promise((a) => {
|
|
193
194
|
setTimeout(a, e);
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
197
|
async function Y(e, a, t) {
|
|
197
|
-
const
|
|
198
|
+
const r = Date.now();
|
|
198
199
|
return new Promise((o) => {
|
|
199
200
|
const n = async () => {
|
|
200
|
-
e() ? o(!0) : a && Date.now() -
|
|
201
|
+
e() ? o(!0) : a && Date.now() - r > a ? o(!1) : setTimeout(n, t ?? 30);
|
|
201
202
|
};
|
|
202
203
|
n();
|
|
203
204
|
});
|
|
204
205
|
}
|
|
205
|
-
let
|
|
206
|
+
let ee = Date.now();
|
|
206
207
|
function ue() {
|
|
207
208
|
const e = Date.now();
|
|
208
|
-
return e -
|
|
209
|
+
return e - ee > 500 ? (ee = e, !0) : !1;
|
|
209
210
|
}
|
|
210
211
|
let Ie = 0;
|
|
211
212
|
function se() {
|
|
@@ -215,51 +216,51 @@ async function nt(e) {
|
|
|
215
216
|
if (!ue())
|
|
216
217
|
return;
|
|
217
218
|
let a = !1, t;
|
|
218
|
-
const
|
|
219
|
+
const r = (n) => {
|
|
219
220
|
t = n, a = !0;
|
|
220
221
|
}, o = se();
|
|
221
|
-
return
|
|
222
|
+
return s.on("confirmDlgResult" + o, r), s.emit("confirmDlg", { ...e, seq: o }), await Y(() => a), s.off("confirmDlgResult" + o, r), t;
|
|
222
223
|
}
|
|
223
224
|
async function ct(e) {
|
|
224
225
|
if (!ue())
|
|
225
226
|
return;
|
|
226
227
|
let a = !1, t;
|
|
227
|
-
const
|
|
228
|
+
const r = (n) => {
|
|
228
229
|
t = n, a = !0;
|
|
229
230
|
}, o = se();
|
|
230
|
-
return
|
|
231
|
+
return s.on("promptDlgResult" + o, r), s.emit("promptDlg", { ...e, seq: o }), await Y(() => a), s.off("promptDlgResult" + o, r), t;
|
|
231
232
|
}
|
|
232
233
|
function ut() {
|
|
233
|
-
|
|
234
|
+
s.emit("openWaitDlg");
|
|
234
235
|
}
|
|
235
236
|
function st() {
|
|
236
|
-
|
|
237
|
+
s.emit("closeWaitDlg");
|
|
237
238
|
}
|
|
238
239
|
function pt(e, a) {
|
|
239
|
-
|
|
240
|
+
s.emit("message", { type: "error", text: e, timeout: a });
|
|
240
241
|
}
|
|
241
242
|
function _t(e, a) {
|
|
242
|
-
|
|
243
|
+
s.emit("message", { type: "info", text: e, timeout: a });
|
|
243
244
|
}
|
|
244
245
|
function dt(e, a) {
|
|
245
|
-
|
|
246
|
+
s.emit("message", { type: "success", text: e, timeout: a });
|
|
246
247
|
}
|
|
247
248
|
function it(e, a) {
|
|
248
|
-
|
|
249
|
+
s.emit("message", { type: "warning", text: e, timeout: a });
|
|
249
250
|
}
|
|
250
251
|
function ft(e) {
|
|
251
|
-
var
|
|
252
|
+
var r, o;
|
|
252
253
|
if (!window.appAppear) {
|
|
253
254
|
window.appAppear = !0;
|
|
254
255
|
return;
|
|
255
256
|
}
|
|
256
|
-
const a = "single-spa-application:" + e, t = (
|
|
257
|
+
const a = "single-spa-application:" + e, t = (r = document.getElementById(a)) == null ? void 0 : r.classList;
|
|
257
258
|
t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
|
|
258
259
|
t.add("app-reset");
|
|
259
260
|
}, 0));
|
|
260
261
|
}
|
|
261
262
|
var Ee = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Ee || {});
|
|
262
|
-
function
|
|
263
|
+
function te(e, a) {
|
|
263
264
|
if (!e)
|
|
264
265
|
return !1;
|
|
265
266
|
let t = e;
|
|
@@ -272,7 +273,7 @@ function ae(e, a) {
|
|
|
272
273
|
return !1;
|
|
273
274
|
}), Object.keys(t).length <= 0);
|
|
274
275
|
}
|
|
275
|
-
const
|
|
276
|
+
const Ae = [
|
|
276
277
|
{ path: "/passport/login", level: 0 },
|
|
277
278
|
{ path: "/passport/loginAccount", level: 1 },
|
|
278
279
|
{ path: "/passport/register", level: 1 },
|
|
@@ -292,81 +293,81 @@ const Ue = [
|
|
|
292
293
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
293
294
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
294
295
|
];
|
|
295
|
-
function
|
|
296
|
+
function N(e) {
|
|
296
297
|
let a, t = 0;
|
|
297
|
-
const
|
|
298
|
-
return
|
|
298
|
+
const r = e.split("/");
|
|
299
|
+
return Ae.forEach((o) => {
|
|
299
300
|
const n = o.path.split("/");
|
|
300
|
-
let
|
|
301
|
-
for (let c = 0; c <
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
let l = 0;
|
|
302
|
+
for (let c = 0; c < r.length && !(c >= n.length || r[c] !== n[c]); c++)
|
|
303
|
+
l++;
|
|
304
|
+
l >= t && (a = o, t = l);
|
|
304
305
|
}), a;
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
+
function ae(e) {
|
|
307
308
|
if (e === "/")
|
|
308
309
|
return { app: "", path: "/", level: -1 };
|
|
309
|
-
const a =
|
|
310
|
+
const a = N(e);
|
|
310
311
|
if (!a)
|
|
311
312
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
312
313
|
const t = e.split("/");
|
|
313
314
|
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
314
315
|
}
|
|
315
|
-
const
|
|
316
|
-
function
|
|
317
|
-
const t =
|
|
316
|
+
const oe = f("");
|
|
317
|
+
function q(e, a) {
|
|
318
|
+
const t = ae(e), r = ae(a), o = t.app === r.app, n = t.path === r.path, l = t.level >= r.level;
|
|
318
319
|
console.info(
|
|
319
|
-
`~~~~before route change~~~~ ${
|
|
320
|
-
), o ? n ?
|
|
321
|
-
}
|
|
322
|
-
function Ae() {
|
|
323
|
-
return !!T.get("accessToken");
|
|
320
|
+
`~~~~before route change~~~~ ${r.path} -> ${t.path} inner=${o} forward=${l}`
|
|
321
|
+
), o ? n ? oe.value = "" : oe.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
324
322
|
}
|
|
325
323
|
function Be() {
|
|
326
|
-
return !!
|
|
324
|
+
return !!A.get("accessToken");
|
|
325
|
+
}
|
|
326
|
+
function Me() {
|
|
327
|
+
return !!A.get("activeOrg");
|
|
327
328
|
}
|
|
328
329
|
function gt(e, a, t) {
|
|
329
|
-
const
|
|
330
|
+
const r = Be(), o = Me(), n = N(e.path);
|
|
330
331
|
if (!n) {
|
|
331
332
|
t();
|
|
332
333
|
return;
|
|
333
334
|
}
|
|
334
335
|
if (n.requiredState === "auth")
|
|
335
|
-
if (
|
|
336
|
+
if (r)
|
|
336
337
|
if (o) {
|
|
337
|
-
const
|
|
338
|
-
|
|
338
|
+
const l = "/main";
|
|
339
|
+
q(l, a.path), t({ path: l });
|
|
339
340
|
} else
|
|
340
|
-
|
|
341
|
+
q(e.path, a.path), t();
|
|
341
342
|
else {
|
|
342
|
-
const
|
|
343
|
-
|
|
343
|
+
const l = "/passport/login";
|
|
344
|
+
q(l, a.path), t({ path: l });
|
|
344
345
|
}
|
|
345
346
|
else if (n.requiredState === "org")
|
|
346
|
-
if (
|
|
347
|
+
if (r)
|
|
347
348
|
if (o)
|
|
348
|
-
|
|
349
|
+
q(e.path, a.path), t();
|
|
349
350
|
else {
|
|
350
|
-
const
|
|
351
|
-
|
|
351
|
+
const l = "/org/joinOrCreate";
|
|
352
|
+
q(l, a.path), t({ path: l });
|
|
352
353
|
}
|
|
353
354
|
else {
|
|
354
|
-
const
|
|
355
|
-
|
|
355
|
+
const l = "/passport/login";
|
|
356
|
+
q(l, a.path), t({ path: l });
|
|
356
357
|
}
|
|
357
|
-
else if (
|
|
358
|
+
else if (r)
|
|
358
359
|
if (o) {
|
|
359
|
-
const
|
|
360
|
-
|
|
360
|
+
const l = "/main";
|
|
361
|
+
q(l, a.path), t({ path: l });
|
|
361
362
|
} else {
|
|
362
|
-
const
|
|
363
|
-
|
|
363
|
+
const l = "/org/joinOrCreate";
|
|
364
|
+
q(l, a.path), t({ path: l });
|
|
364
365
|
}
|
|
365
366
|
else
|
|
366
|
-
|
|
367
|
+
q(e.path, a.path), t();
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
-
const t = ce(),
|
|
369
|
+
function Z(e, a) {
|
|
370
|
+
const t = ce(), r = g({
|
|
370
371
|
get() {
|
|
371
372
|
return t.hasView(e);
|
|
372
373
|
},
|
|
@@ -374,84 +375,84 @@ function P(e, a) {
|
|
|
374
375
|
n ? t.addView(e) : t.delView(e);
|
|
375
376
|
}
|
|
376
377
|
}), o = (n) => {
|
|
377
|
-
a == null || a(n),
|
|
378
|
+
a == null || a(n), r.value = !0;
|
|
378
379
|
};
|
|
379
|
-
return
|
|
380
|
-
|
|
381
|
-
}),
|
|
382
|
-
|
|
383
|
-
}), { open:
|
|
380
|
+
return V(() => {
|
|
381
|
+
s.on(e, o);
|
|
382
|
+
}), O(() => {
|
|
383
|
+
s.off(e, o);
|
|
384
|
+
}), { open: r };
|
|
384
385
|
}
|
|
385
|
-
const
|
|
386
|
+
const Ue = /* @__PURE__ */ M({
|
|
386
387
|
__name: "index",
|
|
387
388
|
setup(e) {
|
|
388
|
-
const a =
|
|
389
|
-
var
|
|
390
|
-
return ((
|
|
391
|
-
}), u =
|
|
392
|
-
var
|
|
393
|
-
return ((
|
|
394
|
-
}),
|
|
395
|
-
var
|
|
396
|
-
return ((
|
|
397
|
-
}),
|
|
398
|
-
var
|
|
399
|
-
return ((
|
|
389
|
+
const a = Q(), { open: t } = Z("confirmDlg"), r = f(""), o = f(""), n = f(), l = f(), c = g(() => {
|
|
390
|
+
var p;
|
|
391
|
+
return ((p = n.value) == null ? void 0 : p.color) ?? "primary";
|
|
392
|
+
}), u = g(() => {
|
|
393
|
+
var p;
|
|
394
|
+
return ((p = n.value) == null ? void 0 : p.text) ?? a.t("cancel");
|
|
395
|
+
}), _ = g(() => {
|
|
396
|
+
var p;
|
|
397
|
+
return ((p = l.value) == null ? void 0 : p.color) ?? "primary";
|
|
398
|
+
}), v = g(() => {
|
|
399
|
+
var p;
|
|
400
|
+
return ((p = l.value) == null ? void 0 : p.text) ?? a.t("confirm");
|
|
400
401
|
});
|
|
401
|
-
let
|
|
402
|
-
const
|
|
403
|
-
|
|
402
|
+
let D = 0, b = !1;
|
|
403
|
+
const j = (p) => {
|
|
404
|
+
r.value = p.title, o.value = p.text, n.value = p.cancel, l.value = p.confirm, D = p.seq, b = !1, t.value = !0;
|
|
404
405
|
};
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}),
|
|
408
|
-
|
|
406
|
+
V(() => {
|
|
407
|
+
s.on("confirmDlg", j);
|
|
408
|
+
}), O(() => {
|
|
409
|
+
s.off("confirmDlg", j);
|
|
409
410
|
});
|
|
410
|
-
const
|
|
411
|
-
t.value = !1,
|
|
411
|
+
const i = () => {
|
|
412
|
+
t.value = !1, b || (s.emit("confirmDlgResult" + D, !0), b = !0);
|
|
412
413
|
};
|
|
413
|
-
return
|
|
414
|
-
!
|
|
415
|
-
}), (
|
|
416
|
-
const
|
|
417
|
-
return
|
|
414
|
+
return F(t, (p) => {
|
|
415
|
+
!p && !b && (s.emit("confirmDlgResult" + D, !1), b = !0);
|
|
416
|
+
}), (p, y) => {
|
|
417
|
+
const C = h("v-card-text"), S = h("v-btn"), I = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
|
|
418
|
+
return R(), B(x, {
|
|
418
419
|
modelValue: W(t),
|
|
419
|
-
"onUpdate:modelValue":
|
|
420
|
+
"onUpdate:modelValue": y[1] || (y[1] = (U) => G(t) ? t.value = U : null),
|
|
420
421
|
onKeydown: [
|
|
421
|
-
|
|
422
|
-
z(
|
|
422
|
+
y[2] || (y[2] = z(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
423
|
+
z(K(i, ["stop", "prevent"]), ["enter"])
|
|
423
424
|
],
|
|
424
425
|
transition: "dialog-top-transition",
|
|
425
426
|
"max-width": "600px"
|
|
426
427
|
}, {
|
|
427
|
-
default:
|
|
428
|
-
|
|
429
|
-
default:
|
|
430
|
-
|
|
431
|
-
default:
|
|
432
|
-
|
|
428
|
+
default: w(() => [
|
|
429
|
+
k(d, { title: r.value }, {
|
|
430
|
+
default: w(() => [
|
|
431
|
+
k(C, null, {
|
|
432
|
+
default: w(() => [
|
|
433
|
+
E(T(o.value), 1)
|
|
433
434
|
]),
|
|
434
435
|
_: 1
|
|
435
436
|
}),
|
|
436
|
-
|
|
437
|
-
default:
|
|
438
|
-
|
|
439
|
-
onClick:
|
|
437
|
+
k(I, { class: "d-flex justify-end" }, {
|
|
438
|
+
default: w(() => [
|
|
439
|
+
k(S, {
|
|
440
|
+
onClick: y[0] || (y[0] = (U) => t.value = !1),
|
|
440
441
|
color: c.value,
|
|
441
442
|
variant: "text"
|
|
442
443
|
}, {
|
|
443
|
-
default:
|
|
444
|
-
|
|
444
|
+
default: w(() => [
|
|
445
|
+
E(T(u.value), 1)
|
|
445
446
|
]),
|
|
446
447
|
_: 1
|
|
447
448
|
}, 8, ["color"]),
|
|
448
|
-
|
|
449
|
-
onClick:
|
|
450
|
-
color:
|
|
449
|
+
k(S, {
|
|
450
|
+
onClick: i,
|
|
451
|
+
color: _.value,
|
|
451
452
|
variant: "text"
|
|
452
453
|
}, {
|
|
453
|
-
default:
|
|
454
|
-
|
|
454
|
+
default: w(() => [
|
|
455
|
+
E(T(v.value), 1)
|
|
455
456
|
]),
|
|
456
457
|
_: 1
|
|
457
458
|
}, 8, ["color"])
|
|
@@ -466,22 +467,22 @@ const Me = /* @__PURE__ */ I({
|
|
|
466
467
|
}, 8, ["modelValue", "onKeydown"]);
|
|
467
468
|
};
|
|
468
469
|
}
|
|
469
|
-
}), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
], -1)),
|
|
483
|
-
|
|
484
|
-
], We = /* @__PURE__ */
|
|
470
|
+
}), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), Ke = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
|
|
471
|
+
/* @__PURE__ */ m("div"),
|
|
472
|
+
/* @__PURE__ */ m("div"),
|
|
473
|
+
/* @__PURE__ */ m("div"),
|
|
474
|
+
/* @__PURE__ */ m("div"),
|
|
475
|
+
/* @__PURE__ */ m("div"),
|
|
476
|
+
/* @__PURE__ */ m("div"),
|
|
477
|
+
/* @__PURE__ */ m("div"),
|
|
478
|
+
/* @__PURE__ */ m("div"),
|
|
479
|
+
/* @__PURE__ */ m("div"),
|
|
480
|
+
/* @__PURE__ */ m("div"),
|
|
481
|
+
/* @__PURE__ */ m("div"),
|
|
482
|
+
/* @__PURE__ */ m("div")
|
|
483
|
+
], -1)), Le = [
|
|
484
|
+
Ke
|
|
485
|
+
], We = /* @__PURE__ */ M({
|
|
485
486
|
__name: "index",
|
|
486
487
|
props: {
|
|
487
488
|
zIndex: {
|
|
@@ -490,21 +491,21 @@ const Me = /* @__PURE__ */ I({
|
|
|
490
491
|
}
|
|
491
492
|
},
|
|
492
493
|
setup(e) {
|
|
493
|
-
const a =
|
|
494
|
+
const a = H(), t = e, r = g(() => ({
|
|
494
495
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
495
496
|
zIndex: t.zIndex
|
|
496
497
|
}));
|
|
497
|
-
return (o, n) => (
|
|
498
|
+
return (o, n) => (R(), J("div", {
|
|
498
499
|
class: "x-cont",
|
|
499
|
-
style: ve(
|
|
500
|
-
},
|
|
500
|
+
style: ve(r.value)
|
|
501
|
+
}, Le, 4));
|
|
501
502
|
}
|
|
502
503
|
}), pe = (e, a) => {
|
|
503
504
|
const t = e.__vccOpts || e;
|
|
504
|
-
for (const [
|
|
505
|
-
t[
|
|
505
|
+
for (const [r, o] of a)
|
|
506
|
+
t[r] = o;
|
|
506
507
|
return t;
|
|
507
|
-
}, ze = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-f4ad116e"]]),
|
|
508
|
+
}, ze = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
|
|
508
509
|
__name: "item",
|
|
509
510
|
props: {
|
|
510
511
|
id: {
|
|
@@ -526,35 +527,35 @@ const Me = /* @__PURE__ */ I({
|
|
|
526
527
|
},
|
|
527
528
|
emits: ["timeout"],
|
|
528
529
|
setup(e, { emit: a }) {
|
|
529
|
-
const t = e,
|
|
530
|
-
let
|
|
530
|
+
const t = e, r = f(!0), o = a, n = g(() => {
|
|
531
|
+
let l = "";
|
|
531
532
|
switch (t.type) {
|
|
532
533
|
case "error":
|
|
533
|
-
|
|
534
|
+
l = "cancel";
|
|
534
535
|
break;
|
|
535
536
|
case "info":
|
|
536
|
-
|
|
537
|
+
l = "info";
|
|
537
538
|
break;
|
|
538
539
|
case "success":
|
|
539
|
-
|
|
540
|
+
l = "check-circle";
|
|
540
541
|
break;
|
|
541
542
|
case "warning":
|
|
542
|
-
|
|
543
|
+
l = "error";
|
|
543
544
|
break;
|
|
544
545
|
}
|
|
545
|
-
return
|
|
546
|
+
return l;
|
|
546
547
|
});
|
|
547
|
-
return
|
|
548
|
+
return V(() => {
|
|
548
549
|
setTimeout(() => {
|
|
549
550
|
o("timeout", t.id);
|
|
550
551
|
}, t.timeout);
|
|
551
|
-
}),
|
|
552
|
-
|
|
553
|
-
}), (
|
|
554
|
-
const u =
|
|
555
|
-
return
|
|
556
|
-
modelValue:
|
|
557
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
552
|
+
}), F(r, (l) => {
|
|
553
|
+
l || o("timeout", t.id);
|
|
554
|
+
}), (l, c) => {
|
|
555
|
+
const u = h("v-alert");
|
|
556
|
+
return R(), B(u, {
|
|
557
|
+
modelValue: r.value,
|
|
558
|
+
"onUpdate:modelValue": c[0] || (c[0] = (_) => r.value = _),
|
|
558
559
|
class: "mt-2",
|
|
559
560
|
type: e.type,
|
|
560
561
|
icon: n.value,
|
|
@@ -567,128 +568,128 @@ const Me = /* @__PURE__ */ I({
|
|
|
567
568
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
568
569
|
};
|
|
569
570
|
}
|
|
570
|
-
}),
|
|
571
|
+
}), Fe = /* @__PURE__ */ M({
|
|
571
572
|
__name: "index",
|
|
572
573
|
setup(e) {
|
|
573
574
|
const a = we({ items: [] });
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
}),
|
|
577
|
-
|
|
575
|
+
V(() => {
|
|
576
|
+
s.on("message", t);
|
|
577
|
+
}), O(() => {
|
|
578
|
+
s.off("message", t);
|
|
578
579
|
});
|
|
579
580
|
const t = (c) => {
|
|
580
581
|
n(c.type, c.text, c.timeout);
|
|
581
|
-
},
|
|
582
|
-
|
|
582
|
+
}, r = (c) => {
|
|
583
|
+
l(c);
|
|
583
584
|
};
|
|
584
585
|
let o = 0;
|
|
585
|
-
const n = (c, u,
|
|
586
|
-
const
|
|
587
|
-
a.items.push({ id:
|
|
588
|
-
},
|
|
589
|
-
const u = a.items.findIndex((
|
|
586
|
+
const n = (c, u, _) => {
|
|
587
|
+
const v = o++;
|
|
588
|
+
a.items.push({ id: v, type: c, text: u, timeout: _ });
|
|
589
|
+
}, l = (c) => {
|
|
590
|
+
const u = a.items.findIndex((_) => _.id === c);
|
|
590
591
|
u >= 0 && a.items.splice(u, 1);
|
|
591
592
|
};
|
|
592
|
-
return (c, u) => (
|
|
593
|
-
onClick: u[0] || (u[0] =
|
|
593
|
+
return (c, u) => (R(), J("div", {
|
|
594
|
+
onClick: u[0] || (u[0] = K(() => {
|
|
594
595
|
}, ["stop"])),
|
|
595
596
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
596
597
|
}, [
|
|
597
|
-
(
|
|
598
|
-
onTimeout:
|
|
599
|
-
id:
|
|
600
|
-
type:
|
|
601
|
-
text:
|
|
602
|
-
timeout:
|
|
603
|
-
key:
|
|
598
|
+
(R(!0), J(ye, null, xe(a.items, (_) => (R(), B(Ne, {
|
|
599
|
+
onTimeout: r,
|
|
600
|
+
id: _.id,
|
|
601
|
+
type: _.type,
|
|
602
|
+
text: _.text,
|
|
603
|
+
timeout: _.timeout,
|
|
604
|
+
key: _.id
|
|
604
605
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
605
606
|
]));
|
|
606
607
|
}
|
|
607
|
-
}),
|
|
608
|
+
}), He = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ M({
|
|
608
609
|
__name: "index",
|
|
609
610
|
setup(e) {
|
|
610
|
-
const a =
|
|
611
|
-
var
|
|
612
|
-
return ((
|
|
613
|
-
}),
|
|
614
|
-
var
|
|
615
|
-
return ((
|
|
616
|
-
}),
|
|
617
|
-
var
|
|
618
|
-
return ((
|
|
619
|
-
}),
|
|
620
|
-
var
|
|
621
|
-
return ((
|
|
622
|
-
}),
|
|
623
|
-
let
|
|
624
|
-
const
|
|
625
|
-
var
|
|
626
|
-
|
|
611
|
+
const a = Q(), { open: t } = Z("promptDlg"), r = f(""), o = f(""), n = f(), l = f(), c = f(), u = f(""), _ = f(), v = f(), D = g(() => {
|
|
612
|
+
var d;
|
|
613
|
+
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
614
|
+
}), b = g(() => {
|
|
615
|
+
var d;
|
|
616
|
+
return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
617
|
+
}), j = g(() => {
|
|
618
|
+
var d;
|
|
619
|
+
return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
|
|
620
|
+
}), i = g(() => {
|
|
621
|
+
var d;
|
|
622
|
+
return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
623
|
+
}), p = f();
|
|
624
|
+
let y = 0, C = !1;
|
|
625
|
+
const S = async (d) => {
|
|
626
|
+
var x;
|
|
627
|
+
r.value = d.title, o.value = d.text, n.value = d.label, l.value = d.placeholder, c.value = d.rules, u.value = d.value, _.value = d.cancel, v.value = d.confirm, y = d.seq, C = !1, t.value = !0, await Y(() => p.value !== void 0, 1e3), (x = p.value) == null || x.focus();
|
|
627
628
|
};
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}),
|
|
631
|
-
|
|
629
|
+
V(() => {
|
|
630
|
+
s.on("promptDlg", S);
|
|
631
|
+
}), O(() => {
|
|
632
|
+
s.off("promptDlg", S);
|
|
632
633
|
});
|
|
633
|
-
const
|
|
634
|
-
t.value = !1,
|
|
634
|
+
const I = () => {
|
|
635
|
+
t.value = !1, C || (s.emit("promptDlgResult" + y, u.value ?? ""), C = !0);
|
|
635
636
|
};
|
|
636
|
-
return
|
|
637
|
-
!
|
|
638
|
-
}), (
|
|
639
|
-
const U =
|
|
640
|
-
return
|
|
637
|
+
return F(t, (d) => {
|
|
638
|
+
!d && !C && (s.emit("promptDlgResult" + y, void 0), C = !0);
|
|
639
|
+
}), (d, x) => {
|
|
640
|
+
const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), P = h("v-btn"), ie = h("v-card-actions"), fe = h("v-card"), ge = h("v-dialog");
|
|
641
|
+
return R(), B(ge, {
|
|
641
642
|
modelValue: W(t),
|
|
642
|
-
"onUpdate:modelValue":
|
|
643
|
+
"onUpdate:modelValue": x[2] || (x[2] = ($) => G(t) ? t.value = $ : null),
|
|
643
644
|
onKeydown: [
|
|
644
|
-
|
|
645
|
-
z(
|
|
645
|
+
x[3] || (x[3] = z(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
646
|
+
z(K(I, ["stop", "prevent"]), ["enter"])
|
|
646
647
|
],
|
|
647
648
|
transition: "dialog-top-transition",
|
|
648
649
|
"max-width": "600px"
|
|
649
650
|
}, {
|
|
650
|
-
default:
|
|
651
|
-
|
|
652
|
-
default:
|
|
653
|
-
o.value ? (
|
|
654
|
-
default:
|
|
655
|
-
|
|
651
|
+
default: w(() => [
|
|
652
|
+
k(fe, { title: r.value }, {
|
|
653
|
+
default: w(() => [
|
|
654
|
+
o.value ? (R(), B(U, { key: 0 }, {
|
|
655
|
+
default: w(() => [
|
|
656
|
+
E(T(o.value), 1)
|
|
656
657
|
]),
|
|
657
658
|
_: 1
|
|
658
659
|
})) : ke("", !0),
|
|
659
|
-
|
|
660
|
-
default:
|
|
661
|
-
|
|
660
|
+
k(de, { class: "mx-3" }, {
|
|
661
|
+
default: w(() => [
|
|
662
|
+
k(_e, {
|
|
662
663
|
modelValue: u.value,
|
|
663
|
-
"onUpdate:modelValue":
|
|
664
|
+
"onUpdate:modelValue": x[0] || (x[0] = ($) => u.value = $),
|
|
664
665
|
label: n.value,
|
|
665
|
-
placeholder:
|
|
666
|
+
placeholder: l.value,
|
|
666
667
|
rules: c.value,
|
|
667
668
|
ref_key: "target",
|
|
668
|
-
ref:
|
|
669
|
+
ref: p
|
|
669
670
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
670
671
|
]),
|
|
671
672
|
_: 1
|
|
672
673
|
}),
|
|
673
|
-
|
|
674
|
-
default:
|
|
675
|
-
|
|
676
|
-
onClick:
|
|
677
|
-
color:
|
|
674
|
+
k(ie, { class: "d-flex justify-end" }, {
|
|
675
|
+
default: w(() => [
|
|
676
|
+
k(P, {
|
|
677
|
+
onClick: x[1] || (x[1] = ($) => t.value = !1),
|
|
678
|
+
color: D.value,
|
|
678
679
|
variant: "text"
|
|
679
680
|
}, {
|
|
680
|
-
default:
|
|
681
|
-
|
|
681
|
+
default: w(() => [
|
|
682
|
+
E(T(b.value), 1)
|
|
682
683
|
]),
|
|
683
684
|
_: 1
|
|
684
685
|
}, 8, ["color"]),
|
|
685
|
-
|
|
686
|
-
onClick:
|
|
687
|
-
color:
|
|
686
|
+
k(P, {
|
|
687
|
+
onClick: I,
|
|
688
|
+
color: j.value,
|
|
688
689
|
variant: "text"
|
|
689
690
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
|
|
691
|
+
default: w(() => [
|
|
692
|
+
E(T(i.value), 1)
|
|
692
693
|
]),
|
|
693
694
|
_: 1
|
|
694
695
|
}, 8, ["color"])
|
|
@@ -703,37 +704,37 @@ const Me = /* @__PURE__ */ I({
|
|
|
703
704
|
}, 8, ["modelValue", "onKeydown"]);
|
|
704
705
|
};
|
|
705
706
|
}
|
|
706
|
-
}), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */
|
|
707
|
+
}), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
|
|
707
708
|
__name: "index",
|
|
708
709
|
setup(e) {
|
|
709
|
-
const a =
|
|
710
|
+
const a = Q(), { open: t } = Z("waitDlg"), r = () => {
|
|
710
711
|
t.value = !0;
|
|
711
712
|
}, o = () => {
|
|
712
713
|
t.value = !1;
|
|
713
714
|
};
|
|
714
|
-
return
|
|
715
|
-
|
|
716
|
-
}),
|
|
717
|
-
|
|
718
|
-
}), (n,
|
|
719
|
-
const c =
|
|
720
|
-
return
|
|
715
|
+
return V(() => {
|
|
716
|
+
s.on("openWaitDlg", r), s.on("closeWaitDlg", o);
|
|
717
|
+
}), O(() => {
|
|
718
|
+
s.off("openWaitDlg", r), s.off("closeWaitDlg", o);
|
|
719
|
+
}), (n, l) => {
|
|
720
|
+
const c = h("v-card"), u = h("v-dialog");
|
|
721
|
+
return R(), B(u, {
|
|
721
722
|
modelValue: W(t),
|
|
722
|
-
"onUpdate:modelValue":
|
|
723
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => G(t) ? t.value = _ : null),
|
|
723
724
|
persistent: "",
|
|
724
725
|
"no-click-animation": "",
|
|
725
726
|
fullscreen: ""
|
|
726
727
|
}, {
|
|
727
|
-
default:
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
default: w(() => [
|
|
729
|
+
m("div", Xe, [
|
|
730
|
+
k(c, {
|
|
730
731
|
width: "300px",
|
|
731
732
|
height: "80px",
|
|
732
733
|
loading: ""
|
|
733
734
|
}, {
|
|
734
|
-
default:
|
|
735
|
-
|
|
736
|
-
|
|
735
|
+
default: w(() => [
|
|
736
|
+
m("div", Ge, [
|
|
737
|
+
m("span", null, T(W(a).t("waitingResponse")), 1)
|
|
737
738
|
])
|
|
738
739
|
]),
|
|
739
740
|
_: 1
|
|
@@ -745,115 +746,124 @@ const Me = /* @__PURE__ */ I({
|
|
|
745
746
|
};
|
|
746
747
|
}
|
|
747
748
|
}), Ye = (e) => {
|
|
748
|
-
e.component("x-confirm-dlg",
|
|
749
|
+
e.component("x-confirm-dlg", Ue), e.component("x-loading", ze), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
|
|
749
750
|
};
|
|
750
751
|
function vt() {
|
|
751
|
-
const e =
|
|
752
|
+
const e = H(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), r = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
752
753
|
return {
|
|
753
754
|
primaryColor: a,
|
|
754
755
|
secondaryColor: t,
|
|
755
|
-
backgroundColor0:
|
|
756
|
+
backgroundColor0: r,
|
|
756
757
|
backgroundColor1: o,
|
|
757
758
|
backgroundColor2: n,
|
|
758
|
-
highlightColor:
|
|
759
|
+
highlightColor: l,
|
|
759
760
|
borderColor: c
|
|
760
761
|
};
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
763
|
+
function Ze(e, a) {
|
|
764
|
+
return e.post("pullPermission", a);
|
|
765
|
+
}
|
|
766
|
+
function mt(e, a) {
|
|
767
|
+
const t = De(), r = le(), o = ne(), n = ce(), l = () => {
|
|
768
|
+
o.running = !1;
|
|
769
|
+
}, c = () => {
|
|
770
|
+
o.running = !0;
|
|
771
|
+
}, u = () => {
|
|
772
|
+
var p;
|
|
773
|
+
if (!n.isEmpty()) {
|
|
774
|
+
n.hasView("waitDlg") || n.popView();
|
|
766
775
|
return;
|
|
767
776
|
}
|
|
768
|
-
|
|
769
|
-
|
|
777
|
+
const i = N(t.path);
|
|
778
|
+
(i == null ? void 0 : i.level) === 0 ? (p = navigator == null ? void 0 : navigator.Backbutton) == null || p.goHome(
|
|
779
|
+
() => {
|
|
780
|
+
},
|
|
781
|
+
() => {
|
|
782
|
+
}
|
|
783
|
+
) : r.back();
|
|
784
|
+
};
|
|
785
|
+
V(() => {
|
|
786
|
+
s.on("pause", l), s.on("resume", c), s.on("backbutton", u);
|
|
787
|
+
}), O(() => {
|
|
788
|
+
s.off("pause", l), s.off("resume", c), s.off("backbutton", u);
|
|
789
|
+
});
|
|
790
|
+
const _ = (i) => {
|
|
791
|
+
if (i.key === "Escape") {
|
|
792
|
+
u();
|
|
770
793
|
return;
|
|
771
794
|
}
|
|
772
|
-
if (!e &&
|
|
773
|
-
|
|
795
|
+
if (!e && i.ctrlKey && i.shiftKey && i.key.toLowerCase() === "d") {
|
|
796
|
+
o.dark = !o.dark;
|
|
774
797
|
return;
|
|
775
798
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
if (!o.isEmpty()) {
|
|
779
|
-
o.hasView("waitDlg") || o.popView();
|
|
799
|
+
if (!e && i.ctrlKey && i.shiftKey && i.key.toLowerCase() === "l") {
|
|
800
|
+
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
780
801
|
return;
|
|
781
802
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
803
|
+
};
|
|
804
|
+
V(() => {
|
|
805
|
+
window.addEventListener("keydown", _, !1);
|
|
806
|
+
}), O(() => {
|
|
807
|
+
window.removeEventListener("keydown", _, !1);
|
|
808
|
+
});
|
|
809
|
+
let v;
|
|
810
|
+
const D = async () => {
|
|
811
|
+
if (!o.running)
|
|
812
|
+
return;
|
|
813
|
+
const i = N(t.path);
|
|
814
|
+
if (!(!i || i.requiredState !== "org"))
|
|
815
|
+
try {
|
|
816
|
+
const { update: p, permissions: y } = await Ze(a, {
|
|
817
|
+
checksum: o.permissionChecksum
|
|
818
|
+
});
|
|
819
|
+
if (!p)
|
|
820
|
+
return;
|
|
821
|
+
const C = {};
|
|
822
|
+
for (const S in y) {
|
|
823
|
+
if (S === "checksum")
|
|
824
|
+
continue;
|
|
825
|
+
const I = y[S];
|
|
826
|
+
C[S] = JSON.parse(I);
|
|
827
|
+
}
|
|
828
|
+
o.permissionObjects = C, o.permissionChecksum = y.checksum ?? "";
|
|
829
|
+
} catch (p) {
|
|
830
|
+
console.error(p);
|
|
787
831
|
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
832
|
+
}, b = async (i) => {
|
|
833
|
+
i && await D(), clearTimeout(v), v = setTimeout(async () => {
|
|
834
|
+
await D(), v && b();
|
|
835
|
+
}, 3e3);
|
|
836
|
+
}, j = () => {
|
|
837
|
+
clearTimeout(v), v = void 0;
|
|
793
838
|
};
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
}),
|
|
797
|
-
|
|
798
|
-
})
|
|
839
|
+
V(() => {
|
|
840
|
+
a && b(!0);
|
|
841
|
+
}), O(() => {
|
|
842
|
+
j();
|
|
843
|
+
});
|
|
799
844
|
}
|
|
800
845
|
function ht() {
|
|
801
|
-
const e =
|
|
802
|
-
function a(t,
|
|
846
|
+
const e = ne();
|
|
847
|
+
function a(t, r) {
|
|
803
848
|
const o = e.permissionObjects[t];
|
|
804
|
-
return o ?
|
|
849
|
+
return o ? r ? !(!te(o.includes, r) || te(o.excludes, r)) : !0 : !1;
|
|
805
850
|
}
|
|
806
851
|
return { verifyPermission: a };
|
|
807
852
|
}
|
|
808
|
-
function
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
function wt(e) {
|
|
812
|
-
const a = Q();
|
|
813
|
-
let t;
|
|
814
|
-
const l = () => {
|
|
815
|
-
clearTimeout(t), t = setTimeout(async () => {
|
|
816
|
-
await o(), t && l();
|
|
817
|
-
}, 3e3);
|
|
818
|
-
}, o = async () => {
|
|
819
|
-
try {
|
|
820
|
-
const { update: n, permissions: r } = await Ze(e, {
|
|
821
|
-
checksum: a.permissionChecksum
|
|
822
|
-
});
|
|
823
|
-
if (!n)
|
|
824
|
-
return;
|
|
825
|
-
const c = {};
|
|
826
|
-
for (const u in r) {
|
|
827
|
-
if (u === "checksum")
|
|
828
|
-
continue;
|
|
829
|
-
const s = r[u];
|
|
830
|
-
c[u] = JSON.parse(s);
|
|
831
|
-
}
|
|
832
|
-
a.permissionObjects = c, a.permissionChecksum = r.checksum ?? "";
|
|
833
|
-
} catch (n) {
|
|
834
|
-
console.error(n);
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
return C(() => {
|
|
838
|
-
o(), l();
|
|
839
|
-
}), V(() => {
|
|
840
|
-
clearTimeout(t), t = void 0;
|
|
841
|
-
}), {};
|
|
842
|
-
}
|
|
843
|
-
function yt() {
|
|
844
|
-
const e = N(), a = be(), t = i(() => e.current.value.dark), l = i(() => !!window.cordova), o = i(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
845
|
-
return { dark: t, sysBarAvail: l, compactWidth: o };
|
|
853
|
+
function wt() {
|
|
854
|
+
const e = H(), a = be(), t = g(() => e.current.value.dark), r = 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");
|
|
855
|
+
return { dark: t, sysBarAvail: r, compactWidth: o };
|
|
846
856
|
}
|
|
847
|
-
const
|
|
857
|
+
const yt = { install: Ye };
|
|
848
858
|
export {
|
|
849
859
|
Ee as Permission,
|
|
850
860
|
ft as appAppear,
|
|
851
861
|
st as closeWaitDlg,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
862
|
+
rt as createAxios,
|
|
863
|
+
yt as default,
|
|
864
|
+
s as eventBus,
|
|
865
|
+
te as isExist,
|
|
866
|
+
N as matchRouteMeta,
|
|
857
867
|
pt as messageError,
|
|
858
868
|
_t as messageInfo,
|
|
859
869
|
dt as messageSuccess,
|
|
@@ -862,15 +872,14 @@ export {
|
|
|
862
872
|
nt as openConfirmDlg,
|
|
863
873
|
ct as openPromptDlg,
|
|
864
874
|
ut as openWaitDlg,
|
|
865
|
-
|
|
875
|
+
oe as routeTransName,
|
|
866
876
|
vt as useColor,
|
|
867
|
-
|
|
868
|
-
mt as
|
|
877
|
+
ne as useGlobalStore,
|
|
878
|
+
mt as useMicroApp,
|
|
869
879
|
ht as usePermission,
|
|
870
|
-
wt as
|
|
871
|
-
yt as useSystem,
|
|
880
|
+
wt as useSystem,
|
|
872
881
|
ce as useViewMgrStore,
|
|
873
|
-
|
|
874
|
-
|
|
882
|
+
Z as useViewStack,
|
|
883
|
+
lt as waitMs,
|
|
875
884
|
Y as waitUtil
|
|
876
885
|
};
|
package/dist/store/global.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { PermissionObjects } from '../utils/permission';
|
|
2
2
|
export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
|
|
3
|
+
running: import("vue").Ref<boolean>;
|
|
3
4
|
dark: import("vue").Ref<boolean | undefined>;
|
|
4
5
|
locale: import("vue").Ref<string>;
|
|
5
6
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
6
7
|
permissionChecksum: import("vue").Ref<string>;
|
|
7
|
-
}, "dark" | "locale" | "permissionObjects" | "permissionChecksum">>, Pick<{
|
|
8
|
+
}, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
|
|
9
|
+
running: import("vue").Ref<boolean>;
|
|
8
10
|
dark: import("vue").Ref<boolean | undefined>;
|
|
9
11
|
locale: import("vue").Ref<string>;
|
|
10
12
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
11
13
|
permissionChecksum: import("vue").Ref<string>;
|
|
12
14
|
}, never>, Pick<{
|
|
15
|
+
running: import("vue").Ref<boolean>;
|
|
13
16
|
dark: import("vue").Ref<boolean | undefined>;
|
|
14
17
|
locale: import("vue").Ref<string>;
|
|
15
18
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|