x-essential-lib 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/permission.d.ts +1 -2
- package/dist/index.js +99 -95
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Permission } from '../utils';
|
|
2
|
-
|
|
3
|
-
export declare function usePermission(instance: AxiosInstance): {
|
|
2
|
+
export declare function usePermission(): {
|
|
4
3
|
verifyPermission: (permission: Permission, instance: string) => boolean;
|
|
5
4
|
};
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { VAlert as ve, VBtn as me, VCard as he, VCardActions as we, VCardText as ye, VCardTitle as xe, VDialog as ke, VForm as be, VTextField as Ce } from "vuetify/lib/components/index.mjs";
|
|
3
3
|
import { ref as i, computed as f, onMounted as D, onBeforeUnmount as T, defineComponent as O, watch as H, resolveComponent as g, openBlock as V, createBlock as A, unref as W, isRef as J, withKeys as N, withModifiers as $, withCtx as v, createVNode as h, createTextVNode as C, toDisplayString as b, createElementBlock as F, normalizeStyle as Ve, pushScopeId as De, popScopeId as qe, createElementVNode as m, reactive as Se, Fragment as Te, renderList as Oe } from "vue";
|
|
4
4
|
import { useLocale as X, useTheme as K, useDisplay as Re } from "vuetify/lib/framework.mjs";
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { useRouter as
|
|
5
|
+
import { defineStore as le } from "pinia";
|
|
6
|
+
import { useRouter as re, useRoute as je } from "vue-router";
|
|
7
7
|
import Ie from "axios";
|
|
8
|
-
const
|
|
8
|
+
const ne = le("viewMgr", () => {
|
|
9
9
|
const e = i([]);
|
|
10
10
|
function a() {
|
|
11
11
|
return e.value.length <= 0;
|
|
@@ -17,7 +17,7 @@ const re = oe("viewMgr", () => {
|
|
|
17
17
|
l(r), e.value.push(r);
|
|
18
18
|
}
|
|
19
19
|
function l(r) {
|
|
20
|
-
const c = e.value.findIndex((
|
|
20
|
+
const c = e.value.findIndex((_) => _ === r);
|
|
21
21
|
c !== -1 && e.value.splice(c, 1);
|
|
22
22
|
}
|
|
23
23
|
function n() {
|
|
@@ -41,7 +41,7 @@ function Ee(e) {
|
|
|
41
41
|
});
|
|
42
42
|
} };
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const s = Ee();
|
|
45
45
|
async function dt(e) {
|
|
46
46
|
return new Promise((a) => {
|
|
47
47
|
setTimeout(a, e);
|
|
@@ -57,7 +57,7 @@ async function G(e, a, t) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function Q(e, a) {
|
|
60
|
-
const t =
|
|
60
|
+
const t = ne(), o = f({
|
|
61
61
|
get() {
|
|
62
62
|
return t.hasView(e);
|
|
63
63
|
},
|
|
@@ -68,9 +68,9 @@ function Q(e, a) {
|
|
|
68
68
|
a == null || a(n), o.value = !0;
|
|
69
69
|
};
|
|
70
70
|
return D(() => {
|
|
71
|
-
|
|
71
|
+
s.on(e, l);
|
|
72
72
|
}), T(() => {
|
|
73
|
-
|
|
73
|
+
s.off(e, l);
|
|
74
74
|
}), { open: o };
|
|
75
75
|
}
|
|
76
76
|
const $e = /* @__PURE__ */ O({
|
|
@@ -79,7 +79,7 @@ const $e = /* @__PURE__ */ O({
|
|
|
79
79
|
const a = X(), { open: t } = Q("confirmDlg"), o = i(""), l = i(""), n = i(), r = i(), c = f(() => {
|
|
80
80
|
var d;
|
|
81
81
|
return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
|
|
82
|
-
}),
|
|
82
|
+
}), _ = f(() => {
|
|
83
83
|
var d;
|
|
84
84
|
return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
85
85
|
}), u = f(() => {
|
|
@@ -94,15 +94,15 @@ const $e = /* @__PURE__ */ O({
|
|
|
94
94
|
o.value = d.title, l.value = d.text, n.value = d.cancel, r.value = d.confirm, R = d.seq, q = !1, t.value = !0;
|
|
95
95
|
};
|
|
96
96
|
D(() => {
|
|
97
|
-
|
|
97
|
+
s.on("confirmDlg", M);
|
|
98
98
|
}), T(() => {
|
|
99
|
-
|
|
99
|
+
s.off("confirmDlg", M);
|
|
100
100
|
});
|
|
101
101
|
const B = () => {
|
|
102
|
-
t.value = !1, q || (
|
|
102
|
+
t.value = !1, q || (s.emit("confirmDlgResult" + R, !0), q = !0);
|
|
103
103
|
};
|
|
104
104
|
return H(t, (d) => {
|
|
105
|
-
!d && !q && (
|
|
105
|
+
!d && !q && (s.emit("confirmDlgResult" + R, !1), q = !0);
|
|
106
106
|
}), (d, x) => {
|
|
107
107
|
const S = g("v-card-title"), L = g("v-card-text"), j = g("v-btn"), p = g("v-card-actions"), w = g("v-card"), z = g("v-dialog");
|
|
108
108
|
return V(), A(z, {
|
|
@@ -138,7 +138,7 @@ const $e = /* @__PURE__ */ O({
|
|
|
138
138
|
variant: "text"
|
|
139
139
|
}, {
|
|
140
140
|
default: v(() => [
|
|
141
|
-
C(b(
|
|
141
|
+
C(b(_.value), 1)
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
}, 8, ["color"]),
|
|
@@ -196,12 +196,12 @@ const $e = /* @__PURE__ */ O({
|
|
|
196
196
|
style: Ve(o.value)
|
|
197
197
|
}, Be, 4));
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), ce = (e, a) => {
|
|
200
200
|
const t = e.__vccOpts || e;
|
|
201
201
|
for (const [o, l] of a)
|
|
202
202
|
t[o] = l;
|
|
203
203
|
return t;
|
|
204
|
-
}, Ue = /* @__PURE__ */
|
|
204
|
+
}, Ue = /* @__PURE__ */ ce(Le, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ O({
|
|
205
205
|
__name: "item",
|
|
206
206
|
props: {
|
|
207
207
|
id: {
|
|
@@ -248,8 +248,8 @@ const $e = /* @__PURE__ */ O({
|
|
|
248
248
|
}), H(o, (r) => {
|
|
249
249
|
r || l("timeout", t.id);
|
|
250
250
|
}), (r, c) => {
|
|
251
|
-
const
|
|
252
|
-
return V(), A(
|
|
251
|
+
const _ = g("v-alert");
|
|
252
|
+
return V(), A(_, {
|
|
253
253
|
modelValue: o.value,
|
|
254
254
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => o.value = u),
|
|
255
255
|
class: "mt-2",
|
|
@@ -269,9 +269,9 @@ const $e = /* @__PURE__ */ O({
|
|
|
269
269
|
setup(e) {
|
|
270
270
|
const a = Se({ items: [] });
|
|
271
271
|
D(() => {
|
|
272
|
-
|
|
272
|
+
s.on("message", t);
|
|
273
273
|
}), T(() => {
|
|
274
|
-
|
|
274
|
+
s.off("message", t);
|
|
275
275
|
});
|
|
276
276
|
const t = (c) => {
|
|
277
277
|
n(c.type, c.text, c.timeout);
|
|
@@ -279,15 +279,15 @@ const $e = /* @__PURE__ */ O({
|
|
|
279
279
|
r(c);
|
|
280
280
|
};
|
|
281
281
|
let l = 0;
|
|
282
|
-
const n = (c,
|
|
282
|
+
const n = (c, _, u) => {
|
|
283
283
|
const y = l++;
|
|
284
|
-
a.items.push({ id: y, type: c, text:
|
|
284
|
+
a.items.push({ id: y, type: c, text: _, timeout: u });
|
|
285
285
|
}, r = (c) => {
|
|
286
|
-
const
|
|
287
|
-
|
|
286
|
+
const _ = a.items.findIndex((u) => u.id === c);
|
|
287
|
+
_ >= 0 && a.items.splice(_, 1);
|
|
288
288
|
};
|
|
289
|
-
return (c,
|
|
290
|
-
onClick:
|
|
289
|
+
return (c, _) => (V(), F("div", {
|
|
290
|
+
onClick: _[0] || (_[0] = $(() => {
|
|
291
291
|
}, ["stop"])),
|
|
292
292
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
293
293
|
}, [
|
|
@@ -301,10 +301,10 @@ const $e = /* @__PURE__ */ O({
|
|
|
301
301
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}), He = /* @__PURE__ */
|
|
304
|
+
}), He = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-70ed4b89"]]), Ke = /* @__PURE__ */ O({
|
|
305
305
|
__name: "index",
|
|
306
306
|
setup(e) {
|
|
307
|
-
const a = X(), { open: t } = Q("promptDlg"), o = i(""), l = i(""), n = i(), r = i(), c = i(),
|
|
307
|
+
const a = X(), { open: t } = Q("promptDlg"), o = i(""), l = i(""), n = i(), r = i(), c = i(), _ = i(""), u = i(), y = i(), R = f(() => {
|
|
308
308
|
var p;
|
|
309
309
|
return ((p = u.value) == null ? void 0 : p.color) ?? "primary";
|
|
310
310
|
}), q = f(() => {
|
|
@@ -320,20 +320,20 @@ const $e = /* @__PURE__ */ O({
|
|
|
320
320
|
let x = 0, S = !1;
|
|
321
321
|
const L = async (p) => {
|
|
322
322
|
var w;
|
|
323
|
-
o.value = p.title, l.value = p.text, n.value = p.label, r.value = p.placeholder, c.value = p.rules,
|
|
323
|
+
o.value = p.title, l.value = p.text, n.value = p.label, r.value = p.placeholder, c.value = p.rules, _.value = p.value, u.value = p.cancel, y.value = p.confirm, x = p.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
|
|
324
324
|
};
|
|
325
325
|
D(() => {
|
|
326
|
-
|
|
326
|
+
s.on("promptDlg", L);
|
|
327
327
|
}), T(() => {
|
|
328
|
-
|
|
328
|
+
s.off("promptDlg", L);
|
|
329
329
|
});
|
|
330
330
|
const j = () => {
|
|
331
|
-
t.value = !1, S || (
|
|
331
|
+
t.value = !1, S || (s.emit("promptDlgResult" + x, _.value ?? ""), S = !0);
|
|
332
332
|
};
|
|
333
333
|
return H(t, (p) => {
|
|
334
|
-
!p && !S && (
|
|
334
|
+
!p && !S && (s.emit("promptDlgResult" + x, void 0), S = !0);
|
|
335
335
|
}), (p, w) => {
|
|
336
|
-
const z = g("v-card-title"), I = g("v-card-text"), pe = g("v-text-field"), de = g("v-form"),
|
|
336
|
+
const z = g("v-card-title"), I = g("v-card-text"), pe = g("v-text-field"), de = g("v-form"), P = g("v-btn"), fe = g("v-card-actions"), ie = g("v-card"), ge = g("v-dialog");
|
|
337
337
|
return V(), A(ge, {
|
|
338
338
|
modelValue: W(t),
|
|
339
339
|
"onUpdate:modelValue": w[2] || (w[2] = (E) => J(t) ? t.value = E : null),
|
|
@@ -362,8 +362,8 @@ const $e = /* @__PURE__ */ O({
|
|
|
362
362
|
h(de, { class: "mx-3" }, {
|
|
363
363
|
default: v(() => [
|
|
364
364
|
h(pe, {
|
|
365
|
-
modelValue:
|
|
366
|
-
"onUpdate:modelValue": w[0] || (w[0] = (E) =>
|
|
365
|
+
modelValue: _.value,
|
|
366
|
+
"onUpdate:modelValue": w[0] || (w[0] = (E) => _.value = E),
|
|
367
367
|
label: n.value,
|
|
368
368
|
placeholder: r.value,
|
|
369
369
|
rules: c.value,
|
|
@@ -375,7 +375,7 @@ const $e = /* @__PURE__ */ O({
|
|
|
375
375
|
}),
|
|
376
376
|
h(fe, { class: "d-flex justify-end" }, {
|
|
377
377
|
default: v(() => [
|
|
378
|
-
h(
|
|
378
|
+
h(P, {
|
|
379
379
|
onClick: w[1] || (w[1] = (E) => t.value = !1),
|
|
380
380
|
color: R.value,
|
|
381
381
|
variant: "text"
|
|
@@ -385,7 +385,7 @@ const $e = /* @__PURE__ */ O({
|
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["color"]),
|
|
388
|
-
h(
|
|
388
|
+
h(P, {
|
|
389
389
|
onClick: j,
|
|
390
390
|
color: M.value,
|
|
391
391
|
variant: "text"
|
|
@@ -415,12 +415,12 @@ const $e = /* @__PURE__ */ O({
|
|
|
415
415
|
t.value = !1;
|
|
416
416
|
};
|
|
417
417
|
return D(() => {
|
|
418
|
-
|
|
418
|
+
s.on("openWaitDlg", o), s.on("closeWaitDlg", l);
|
|
419
419
|
}), T(() => {
|
|
420
|
-
|
|
420
|
+
s.off("openWaitDlg", o), s.off("closeWaitDlg", l);
|
|
421
421
|
}), (n, r) => {
|
|
422
|
-
const c = g("v-card"),
|
|
423
|
-
return V(), A(
|
|
422
|
+
const c = g("v-card"), _ = g("v-dialog");
|
|
423
|
+
return V(), A(_, {
|
|
424
424
|
modelValue: W(t),
|
|
425
425
|
"onUpdate:modelValue": r[0] || (r[0] = (u) => J(t) ? t.value = u : null),
|
|
426
426
|
persistent: "",
|
|
@@ -462,7 +462,7 @@ function ft() {
|
|
|
462
462
|
borderColor: c
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
const
|
|
465
|
+
const Y = le(
|
|
466
466
|
"global",
|
|
467
467
|
() => {
|
|
468
468
|
const e = K(), a = i(!1);
|
|
@@ -529,12 +529,12 @@ function Ze(e, a) {
|
|
|
529
529
|
}), a(o), Promise.reject(e);
|
|
530
530
|
}
|
|
531
531
|
function Pe() {
|
|
532
|
-
U.remove("accessToken"), U.remove("refreshToken"), U.remove("activeOrg"),
|
|
532
|
+
U.remove("accessToken"), U.remove("refreshToken"), U.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
533
533
|
}
|
|
534
|
-
let
|
|
534
|
+
let ee = Date.now();
|
|
535
535
|
function ue() {
|
|
536
536
|
const e = Date.now();
|
|
537
|
-
return e -
|
|
537
|
+
return e - ee > 500 ? (ee = e, !0) : !1;
|
|
538
538
|
}
|
|
539
539
|
let et = 0;
|
|
540
540
|
function se() {
|
|
@@ -547,7 +547,7 @@ async function gt(e) {
|
|
|
547
547
|
const o = (n) => {
|
|
548
548
|
t = n, a = !0;
|
|
549
549
|
}, l = se();
|
|
550
|
-
return
|
|
550
|
+
return s.on("confirmDlgResult" + l, o), s.emit("confirmDlg", { ...e, seq: l }), await G(() => a), s.off("confirmDlgResult" + l, o), t;
|
|
551
551
|
}
|
|
552
552
|
async function vt(e) {
|
|
553
553
|
if (!ue())
|
|
@@ -556,25 +556,25 @@ async function vt(e) {
|
|
|
556
556
|
const o = (n) => {
|
|
557
557
|
t = n, a = !0;
|
|
558
558
|
}, l = se();
|
|
559
|
-
return
|
|
559
|
+
return s.on("promptDlgResult" + l, o), s.emit("promptDlg", { ...e, seq: l }), await G(() => a), s.off("promptDlgResult" + l, o), t;
|
|
560
560
|
}
|
|
561
561
|
function mt() {
|
|
562
|
-
|
|
562
|
+
s.emit("openWaitDlg");
|
|
563
563
|
}
|
|
564
564
|
function ht() {
|
|
565
|
-
|
|
565
|
+
s.emit("closeWaitDlg");
|
|
566
566
|
}
|
|
567
567
|
function wt(e, a) {
|
|
568
|
-
|
|
568
|
+
s.emit("message", { type: "error", text: e, timeout: a });
|
|
569
569
|
}
|
|
570
570
|
function yt(e, a) {
|
|
571
|
-
|
|
571
|
+
s.emit("message", { type: "info", text: e, timeout: a });
|
|
572
572
|
}
|
|
573
573
|
function xt(e, a) {
|
|
574
|
-
|
|
574
|
+
s.emit("message", { type: "success", text: e, timeout: a });
|
|
575
575
|
}
|
|
576
576
|
function kt(e, a) {
|
|
577
|
-
|
|
577
|
+
s.emit("message", { type: "warning", text: e, timeout: a });
|
|
578
578
|
}
|
|
579
579
|
function bt(e) {
|
|
580
580
|
var o, l;
|
|
@@ -588,7 +588,7 @@ function bt(e) {
|
|
|
588
588
|
}, 0));
|
|
589
589
|
}
|
|
590
590
|
var tt = /* @__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_group", 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))(tt || {});
|
|
591
|
-
function
|
|
591
|
+
function te(e, a) {
|
|
592
592
|
if (!e)
|
|
593
593
|
return !1;
|
|
594
594
|
let t = e;
|
|
@@ -621,7 +621,7 @@ const _e = require("js-cookie"), at = [
|
|
|
621
621
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
622
622
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
623
623
|
];
|
|
624
|
-
function
|
|
624
|
+
function Z(e) {
|
|
625
625
|
let a, t = 0;
|
|
626
626
|
const o = e.split("/");
|
|
627
627
|
return at.forEach((l) => {
|
|
@@ -632,21 +632,21 @@ function Y(e) {
|
|
|
632
632
|
r >= t && (a = l, t = r);
|
|
633
633
|
}), a;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function ae(e) {
|
|
636
636
|
if (e === "/")
|
|
637
637
|
return { app: "", path: "/", level: -1 };
|
|
638
|
-
const a =
|
|
638
|
+
const a = Z(e);
|
|
639
639
|
if (!a)
|
|
640
640
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
641
641
|
const t = e.split("/");
|
|
642
642
|
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
643
643
|
}
|
|
644
|
-
const
|
|
644
|
+
const oe = i("");
|
|
645
645
|
function k(e, a) {
|
|
646
|
-
const t =
|
|
646
|
+
const t = ae(e), o = ae(a), l = t.app === o.app, n = t.path === o.path, r = t.level >= o.level;
|
|
647
647
|
console.info(
|
|
648
648
|
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${l} forward=${r}`
|
|
649
|
-
), l ? n ?
|
|
649
|
+
), l ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
|
|
650
650
|
}
|
|
651
651
|
function ot() {
|
|
652
652
|
return !!_e.get("accessToken");
|
|
@@ -655,7 +655,7 @@ function lt() {
|
|
|
655
655
|
return !!_e.get("activeOrg");
|
|
656
656
|
}
|
|
657
657
|
function Ct(e, a, t) {
|
|
658
|
-
const o = ot(), l = lt(), n =
|
|
658
|
+
const o = ot(), l = lt(), n = Z(e.path);
|
|
659
659
|
if (!n) {
|
|
660
660
|
t();
|
|
661
661
|
return;
|
|
@@ -695,7 +695,7 @@ function Ct(e, a, t) {
|
|
|
695
695
|
k(e.path, a.path), t();
|
|
696
696
|
}
|
|
697
697
|
function Vt(e) {
|
|
698
|
-
const a = je(), t =
|
|
698
|
+
const a = je(), t = re(), o = Y(), l = ne(), n = (u) => {
|
|
699
699
|
if (u.key === "Escape") {
|
|
700
700
|
r();
|
|
701
701
|
return;
|
|
@@ -705,7 +705,7 @@ function Vt(e) {
|
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
707
|
if (!e && u.ctrlKey && u.key.toLowerCase() === "l") {
|
|
708
|
-
|
|
708
|
+
_();
|
|
709
709
|
return;
|
|
710
710
|
}
|
|
711
711
|
}, r = () => {
|
|
@@ -714,7 +714,7 @@ function Vt(e) {
|
|
|
714
714
|
l.hasView("waitDlg") || l.popView();
|
|
715
715
|
return;
|
|
716
716
|
}
|
|
717
|
-
const u =
|
|
717
|
+
const u = Z(a.path);
|
|
718
718
|
(u == null ? void 0 : u.level) === 0 ? (y = navigator == null ? void 0 : navigator.Backbutton) == null || y.goHome(
|
|
719
719
|
() => {
|
|
720
720
|
},
|
|
@@ -723,7 +723,7 @@ function Vt(e) {
|
|
|
723
723
|
) : t.back();
|
|
724
724
|
}, c = () => {
|
|
725
725
|
o.dark = !o.dark;
|
|
726
|
-
},
|
|
726
|
+
}, _ = () => {
|
|
727
727
|
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
728
728
|
};
|
|
729
729
|
return D(() => {
|
|
@@ -732,11 +732,19 @@ function Vt(e) {
|
|
|
732
732
|
window.removeEventListener("keydown", n, !1);
|
|
733
733
|
}), {};
|
|
734
734
|
}
|
|
735
|
+
function Dt() {
|
|
736
|
+
const e = Y();
|
|
737
|
+
function a(t, o) {
|
|
738
|
+
const l = e.permissionObjects[t];
|
|
739
|
+
return l ? o ? !(!te(l.includes, o) || te(l.excludes, o)) : !0 : !1;
|
|
740
|
+
}
|
|
741
|
+
return { verifyPermission: a };
|
|
742
|
+
}
|
|
735
743
|
function rt(e, a) {
|
|
736
744
|
return e.post("pullPermission", a);
|
|
737
745
|
}
|
|
738
|
-
function
|
|
739
|
-
const a =
|
|
746
|
+
function qt(e) {
|
|
747
|
+
const a = Y();
|
|
740
748
|
let t;
|
|
741
749
|
const o = () => {
|
|
742
750
|
clearTimeout(t), t = setTimeout(async () => {
|
|
@@ -744,48 +752,43 @@ function Dt(e) {
|
|
|
744
752
|
}, 3e3);
|
|
745
753
|
}, l = async () => {
|
|
746
754
|
try {
|
|
747
|
-
const { update:
|
|
755
|
+
const { update: n, permissions: r } = await rt(e, {
|
|
748
756
|
checksum: a.permissionChecksum
|
|
749
757
|
});
|
|
750
|
-
if (!
|
|
758
|
+
if (!n)
|
|
751
759
|
return;
|
|
752
|
-
const
|
|
753
|
-
for (const
|
|
754
|
-
if (
|
|
760
|
+
const c = {};
|
|
761
|
+
for (const _ in r) {
|
|
762
|
+
if (_ === "checksum")
|
|
755
763
|
continue;
|
|
756
|
-
const
|
|
757
|
-
|
|
764
|
+
const u = r[_];
|
|
765
|
+
c[_] = JSON.parse(u);
|
|
758
766
|
}
|
|
759
|
-
a.permissionObjects =
|
|
760
|
-
} catch (
|
|
761
|
-
console.error(
|
|
767
|
+
a.permissionObjects = c, a.permissionChecksum = r.checksum ?? "";
|
|
768
|
+
} catch (n) {
|
|
769
|
+
console.error(n);
|
|
762
770
|
}
|
|
763
771
|
};
|
|
764
|
-
D(() => {
|
|
772
|
+
return D(() => {
|
|
765
773
|
l(), o();
|
|
766
774
|
}), T(() => {
|
|
767
775
|
clearTimeout(t), t = void 0;
|
|
768
|
-
});
|
|
769
|
-
function n(r, c) {
|
|
770
|
-
const s = a.permissionObjects[r];
|
|
771
|
-
return s ? c ? !(!ee(s.includes, c) || ee(s.excludes, c)) : !0 : !1;
|
|
772
|
-
}
|
|
773
|
-
return { verifyPermission: n };
|
|
776
|
+
}), {};
|
|
774
777
|
}
|
|
775
|
-
function
|
|
778
|
+
function St() {
|
|
776
779
|
const e = K(), { width: a } = Re(), t = f(() => e.global.name.value), o = f(() => !!window.cordova), l = f(() => a.value <= 1280 ? a.value + "px" : a.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
777
780
|
return { dark: t, sysBarAvail: o, compactWidth: l };
|
|
778
781
|
}
|
|
779
|
-
const
|
|
782
|
+
const Tt = { install: Xe };
|
|
780
783
|
export {
|
|
781
784
|
tt as Permission,
|
|
782
785
|
bt as appAppear,
|
|
783
786
|
ht as closeWaitDlg,
|
|
784
787
|
it as createAxios,
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
788
|
+
Tt as default,
|
|
789
|
+
s as eventBus,
|
|
790
|
+
te as isExist,
|
|
791
|
+
Z as matchRouteMeta,
|
|
789
792
|
wt as messageError,
|
|
790
793
|
yt as messageInfo,
|
|
791
794
|
xt as messageSuccess,
|
|
@@ -794,13 +797,14 @@ export {
|
|
|
794
797
|
gt as openConfirmDlg,
|
|
795
798
|
vt as openPromptDlg,
|
|
796
799
|
mt as openWaitDlg,
|
|
797
|
-
|
|
800
|
+
oe as routeTransName,
|
|
798
801
|
ft as useColor,
|
|
799
|
-
|
|
802
|
+
Y as useGlobalStore,
|
|
800
803
|
Vt as useHotkey,
|
|
801
804
|
Dt as usePermission,
|
|
802
|
-
qt as
|
|
803
|
-
|
|
805
|
+
qt as usePullPermission,
|
|
806
|
+
St as useSystem,
|
|
807
|
+
ne as useViewMgrStore,
|
|
804
808
|
Q as useViewStack,
|
|
805
809
|
dt as waitMs,
|
|
806
810
|
G as waitUtil
|