x-essential-lib 0.5.3 → 0.5.5
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/index.js +76 -70
- package/dist/store/global.d.ts +4 -1
- package/dist/store/viewMgr.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
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
|
|
3
|
-
import {
|
|
2
|
+
import { ref as i, computed as g, onMounted as V, onBeforeUnmount as O, defineComponent as M, watch as J, resolveComponent as h, openBlock as R, createBlock as B, unref as W, isRef as X, withKeys as z, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as A, toDisplayString as T, createElementBlock as F, 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 { useLocale as G, useTheme as Q, useDisplay as be } from "vuetify";
|
|
4
4
|
import { defineStore as re } from "pinia";
|
|
5
5
|
import Ce from "axios";
|
|
6
6
|
import { useRouter as le, useRoute as De } from "vue-router";
|
|
7
7
|
const ne = re(
|
|
8
8
|
"global",
|
|
9
9
|
() => {
|
|
10
|
-
const e =
|
|
11
|
-
F(
|
|
12
|
-
t,
|
|
13
|
-
(l) => {
|
|
14
|
-
e.global.name.value = l ? "dark" : "light";
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
immediate: !0
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
const r = f("en"), o = f({}), n = f("");
|
|
10
|
+
const e = i(!0), a = i(1), t = i(), r = i("en"), o = i({}), n = i("");
|
|
21
11
|
return {
|
|
22
|
-
running:
|
|
12
|
+
running: e,
|
|
13
|
+
mainActive: a,
|
|
23
14
|
dark: t,
|
|
24
15
|
locale: r,
|
|
25
16
|
permissionObjects: o,
|
|
@@ -30,12 +21,18 @@ const ne = re(
|
|
|
30
21
|
persist: [
|
|
31
22
|
{
|
|
32
23
|
storage: localStorage,
|
|
33
|
-
paths: [
|
|
24
|
+
paths: [
|
|
25
|
+
"mainActive",
|
|
26
|
+
"dark",
|
|
27
|
+
"locale",
|
|
28
|
+
"permissionObjects",
|
|
29
|
+
"permissionChecksum"
|
|
30
|
+
]
|
|
34
31
|
}
|
|
35
32
|
]
|
|
36
33
|
}
|
|
37
34
|
), ce = re("viewMgr", () => {
|
|
38
|
-
const e =
|
|
35
|
+
const e = i([]);
|
|
39
36
|
function a() {
|
|
40
37
|
return e.value.length <= 0;
|
|
41
38
|
}
|
|
@@ -48,19 +45,28 @@ const ne = re(
|
|
|
48
45
|
return e.value.find((_) => _ === u) !== void 0;
|
|
49
46
|
}
|
|
50
47
|
function o(u) {
|
|
51
|
-
|
|
48
|
+
e.value.push(u);
|
|
52
49
|
}
|
|
53
50
|
function n(u) {
|
|
54
51
|
const _ = e.value.findIndex((v) => v === u);
|
|
55
|
-
_ !== -1 && e.value.splice(_,
|
|
52
|
+
_ !== -1 && e.value.splice(_, e.value.length - _);
|
|
56
53
|
}
|
|
57
54
|
function l() {
|
|
58
|
-
e.value.pop();
|
|
55
|
+
console.assert(e.value.length > 0), e.value.pop();
|
|
59
56
|
}
|
|
60
57
|
function c() {
|
|
61
58
|
e.value = [];
|
|
62
59
|
}
|
|
63
|
-
return {
|
|
60
|
+
return {
|
|
61
|
+
views: e,
|
|
62
|
+
isEmpty: a,
|
|
63
|
+
lastView: t,
|
|
64
|
+
hasView: r,
|
|
65
|
+
addView: o,
|
|
66
|
+
delView: n,
|
|
67
|
+
popView: l,
|
|
68
|
+
clearViews: c
|
|
69
|
+
};
|
|
64
70
|
});
|
|
65
71
|
/*! js-cookie v3.0.5 | MIT */
|
|
66
72
|
function L(e) {
|
|
@@ -82,7 +88,7 @@ var Se = {
|
|
|
82
88
|
);
|
|
83
89
|
}
|
|
84
90
|
};
|
|
85
|
-
function
|
|
91
|
+
function H(e, a) {
|
|
86
92
|
function t(o, n, l) {
|
|
87
93
|
if (!(typeof document > "u")) {
|
|
88
94
|
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);
|
|
@@ -120,10 +126,10 @@ function X(e, a) {
|
|
|
120
126
|
);
|
|
121
127
|
},
|
|
122
128
|
withAttributes: function(o) {
|
|
123
|
-
return
|
|
129
|
+
return H(this.converter, L({}, this.attributes, o));
|
|
124
130
|
},
|
|
125
131
|
withConverter: function(o) {
|
|
126
|
-
return
|
|
132
|
+
return H(L({}, this.converter, o), this.attributes);
|
|
127
133
|
}
|
|
128
134
|
},
|
|
129
135
|
{
|
|
@@ -132,7 +138,7 @@ function X(e, a) {
|
|
|
132
138
|
}
|
|
133
139
|
);
|
|
134
140
|
}
|
|
135
|
-
var
|
|
141
|
+
var E = H(Se, { path: "/" });
|
|
136
142
|
function rt(e) {
|
|
137
143
|
const a = Ce.create({
|
|
138
144
|
timeout: 6e3
|
|
@@ -148,7 +154,7 @@ function rt(e) {
|
|
|
148
154
|
), a;
|
|
149
155
|
}
|
|
150
156
|
function qe(e) {
|
|
151
|
-
const a =
|
|
157
|
+
const a = E.get("accessToken") ?? "";
|
|
152
158
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
153
159
|
}
|
|
154
160
|
function Ve(e, a) {
|
|
@@ -170,7 +176,7 @@ function Oe(e, a) {
|
|
|
170
176
|
}), a(r), Promise.reject(e);
|
|
171
177
|
}
|
|
172
178
|
function Te() {
|
|
173
|
-
|
|
179
|
+
E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"), le().replace({ path: "/passport/login" });
|
|
174
180
|
}
|
|
175
181
|
function je(e) {
|
|
176
182
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
@@ -259,7 +265,7 @@ function ft(e) {
|
|
|
259
265
|
t.add("app-reset");
|
|
260
266
|
}, 0));
|
|
261
267
|
}
|
|
262
|
-
var
|
|
268
|
+
var Ae = /* @__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))(Ae || {});
|
|
263
269
|
function te(e, a) {
|
|
264
270
|
if (!e)
|
|
265
271
|
return !1;
|
|
@@ -273,7 +279,7 @@ function te(e, a) {
|
|
|
273
279
|
return !1;
|
|
274
280
|
}), Object.keys(t).length <= 0);
|
|
275
281
|
}
|
|
276
|
-
const
|
|
282
|
+
const Ee = [
|
|
277
283
|
{ path: "/passport/login", level: 0 },
|
|
278
284
|
{ path: "/passport/loginAccount", level: 1 },
|
|
279
285
|
{ path: "/passport/register", level: 1 },
|
|
@@ -295,7 +301,7 @@ const Ae = [
|
|
|
295
301
|
function N(e) {
|
|
296
302
|
let a, t = 0;
|
|
297
303
|
const r = e.split("/").filter((o) => o.trim() !== "");
|
|
298
|
-
return
|
|
304
|
+
return Ee.forEach((o) => {
|
|
299
305
|
const n = o.path.split("/").filter((c) => c.trim() !== "");
|
|
300
306
|
let l = 0;
|
|
301
307
|
for (let c = 0; c < r.length && !(c >= n.length || r[c] !== n[c]); c++)
|
|
@@ -312,7 +318,7 @@ function ae(e) {
|
|
|
312
318
|
const t = e.split("/");
|
|
313
319
|
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
314
320
|
}
|
|
315
|
-
const oe =
|
|
321
|
+
const oe = i("");
|
|
316
322
|
function q(e, a) {
|
|
317
323
|
const t = ae(e), r = ae(a), o = t.app === r.app, n = t.path === r.path, l = t.level >= r.level;
|
|
318
324
|
console.info(
|
|
@@ -320,10 +326,10 @@ function q(e, a) {
|
|
|
320
326
|
), o ? n ? oe.value = "" : oe.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
321
327
|
}
|
|
322
328
|
function Be() {
|
|
323
|
-
return !!
|
|
329
|
+
return !!E.get("accessToken");
|
|
324
330
|
}
|
|
325
331
|
function Me() {
|
|
326
|
-
return !!
|
|
332
|
+
return !!E.get("activeOrg");
|
|
327
333
|
}
|
|
328
334
|
function gt(e, a, t) {
|
|
329
335
|
const r = Be(), o = Me(), n = N(e.path);
|
|
@@ -385,7 +391,7 @@ function Z(e, a) {
|
|
|
385
391
|
const Ue = /* @__PURE__ */ M({
|
|
386
392
|
__name: "index",
|
|
387
393
|
setup(e) {
|
|
388
|
-
const a =
|
|
394
|
+
const a = G(), { open: t } = Z("confirmDlg"), r = i(""), o = i(""), n = i(), l = i(), c = g(() => {
|
|
389
395
|
var p;
|
|
390
396
|
return ((p = n.value) == null ? void 0 : p.color) ?? "primary";
|
|
391
397
|
}), u = g(() => {
|
|
@@ -407,19 +413,19 @@ const Ue = /* @__PURE__ */ M({
|
|
|
407
413
|
}), O(() => {
|
|
408
414
|
s.off("confirmDlg", j);
|
|
409
415
|
});
|
|
410
|
-
const
|
|
416
|
+
const f = () => {
|
|
411
417
|
t.value = !1, b || (s.emit("confirmDlgResult" + D, !0), b = !0);
|
|
412
418
|
};
|
|
413
|
-
return
|
|
419
|
+
return J(t, (p) => {
|
|
414
420
|
!p && !b && (s.emit("confirmDlgResult" + D, !1), b = !0);
|
|
415
421
|
}), (p, y) => {
|
|
416
422
|
const C = h("v-card-text"), S = h("v-btn"), I = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
|
|
417
423
|
return R(), B(x, {
|
|
418
424
|
modelValue: W(t),
|
|
419
|
-
"onUpdate:modelValue": y[1] || (y[1] = (U) =>
|
|
425
|
+
"onUpdate:modelValue": y[1] || (y[1] = (U) => X(t) ? t.value = U : null),
|
|
420
426
|
onKeydown: [
|
|
421
427
|
y[2] || (y[2] = z(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
422
|
-
z(K(
|
|
428
|
+
z(K(f, ["stop", "prevent"]), ["enter"])
|
|
423
429
|
],
|
|
424
430
|
transition: "dialog-top-transition",
|
|
425
431
|
"max-width": "600px"
|
|
@@ -429,7 +435,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
429
435
|
default: w(() => [
|
|
430
436
|
k(C, null, {
|
|
431
437
|
default: w(() => [
|
|
432
|
-
|
|
438
|
+
A(T(o.value), 1)
|
|
433
439
|
]),
|
|
434
440
|
_: 1
|
|
435
441
|
}),
|
|
@@ -441,17 +447,17 @@ const Ue = /* @__PURE__ */ M({
|
|
|
441
447
|
variant: "text"
|
|
442
448
|
}, {
|
|
443
449
|
default: w(() => [
|
|
444
|
-
|
|
450
|
+
A(T(u.value), 1)
|
|
445
451
|
]),
|
|
446
452
|
_: 1
|
|
447
453
|
}, 8, ["color"]),
|
|
448
454
|
k(S, {
|
|
449
|
-
onClick:
|
|
455
|
+
onClick: f,
|
|
450
456
|
color: _.value,
|
|
451
457
|
variant: "text"
|
|
452
458
|
}, {
|
|
453
459
|
default: w(() => [
|
|
454
|
-
|
|
460
|
+
A(T(v.value), 1)
|
|
455
461
|
]),
|
|
456
462
|
_: 1
|
|
457
463
|
}, 8, ["color"])
|
|
@@ -490,11 +496,11 @@ const Ue = /* @__PURE__ */ M({
|
|
|
490
496
|
}
|
|
491
497
|
},
|
|
492
498
|
setup(e) {
|
|
493
|
-
const a =
|
|
499
|
+
const a = Q(), t = e, r = g(() => ({
|
|
494
500
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
495
501
|
zIndex: t.zIndex
|
|
496
502
|
}));
|
|
497
|
-
return (o, n) => (R(),
|
|
503
|
+
return (o, n) => (R(), F("div", {
|
|
498
504
|
class: "x-cont",
|
|
499
505
|
style: ve(r.value)
|
|
500
506
|
}, Le, 4));
|
|
@@ -526,7 +532,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
526
532
|
},
|
|
527
533
|
emits: ["timeout"],
|
|
528
534
|
setup(e, { emit: a }) {
|
|
529
|
-
const t = e, r =
|
|
535
|
+
const t = e, r = i(!0), o = a, n = g(() => {
|
|
530
536
|
let l = "";
|
|
531
537
|
switch (t.type) {
|
|
532
538
|
case "error":
|
|
@@ -548,7 +554,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
548
554
|
setTimeout(() => {
|
|
549
555
|
o("timeout", t.id);
|
|
550
556
|
}, t.timeout);
|
|
551
|
-
}),
|
|
557
|
+
}), J(r, (l) => {
|
|
552
558
|
l || o("timeout", t.id);
|
|
553
559
|
}), (l, c) => {
|
|
554
560
|
const u = h("v-alert");
|
|
@@ -589,12 +595,12 @@ const Ue = /* @__PURE__ */ M({
|
|
|
589
595
|
const u = a.items.findIndex((_) => _.id === c);
|
|
590
596
|
u >= 0 && a.items.splice(u, 1);
|
|
591
597
|
};
|
|
592
|
-
return (c, u) => (R(),
|
|
598
|
+
return (c, u) => (R(), F("div", {
|
|
593
599
|
onClick: u[0] || (u[0] = K(() => {
|
|
594
600
|
}, ["stop"])),
|
|
595
601
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
596
602
|
}, [
|
|
597
|
-
(R(!0),
|
|
603
|
+
(R(!0), F(ye, null, xe(a.items, (_) => (R(), B(Ne, {
|
|
598
604
|
onTimeout: r,
|
|
599
605
|
id: _.id,
|
|
600
606
|
type: _.type,
|
|
@@ -607,7 +613,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
607
613
|
}), He = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ M({
|
|
608
614
|
__name: "index",
|
|
609
615
|
setup(e) {
|
|
610
|
-
const a =
|
|
616
|
+
const a = G(), { open: t } = Z("promptDlg"), r = i(""), o = i(""), n = i(), l = i(), c = i(), u = i(""), _ = i(), v = i(), D = g(() => {
|
|
611
617
|
var d;
|
|
612
618
|
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
613
619
|
}), b = g(() => {
|
|
@@ -616,10 +622,10 @@ const Ue = /* @__PURE__ */ M({
|
|
|
616
622
|
}), j = g(() => {
|
|
617
623
|
var d;
|
|
618
624
|
return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
|
|
619
|
-
}),
|
|
625
|
+
}), f = g(() => {
|
|
620
626
|
var d;
|
|
621
627
|
return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
622
|
-
}), p =
|
|
628
|
+
}), p = i();
|
|
623
629
|
let y = 0, C = !1;
|
|
624
630
|
const S = async (d) => {
|
|
625
631
|
var x;
|
|
@@ -633,13 +639,13 @@ const Ue = /* @__PURE__ */ M({
|
|
|
633
639
|
const I = () => {
|
|
634
640
|
t.value = !1, C || (s.emit("promptDlgResult" + y, u.value ?? ""), C = !0);
|
|
635
641
|
};
|
|
636
|
-
return
|
|
642
|
+
return J(t, (d) => {
|
|
637
643
|
!d && !C && (s.emit("promptDlgResult" + y, void 0), C = !0);
|
|
638
644
|
}), (d, x) => {
|
|
639
645
|
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");
|
|
640
646
|
return R(), B(ge, {
|
|
641
647
|
modelValue: W(t),
|
|
642
|
-
"onUpdate:modelValue": x[2] || (x[2] = ($) =>
|
|
648
|
+
"onUpdate:modelValue": x[2] || (x[2] = ($) => X(t) ? t.value = $ : null),
|
|
643
649
|
onKeydown: [
|
|
644
650
|
x[3] || (x[3] = z(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
645
651
|
z(K(I, ["stop", "prevent"]), ["enter"])
|
|
@@ -652,7 +658,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
652
658
|
default: w(() => [
|
|
653
659
|
o.value ? (R(), B(U, { key: 0 }, {
|
|
654
660
|
default: w(() => [
|
|
655
|
-
|
|
661
|
+
A(T(o.value), 1)
|
|
656
662
|
]),
|
|
657
663
|
_: 1
|
|
658
664
|
})) : ke("", !0),
|
|
@@ -678,7 +684,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
678
684
|
variant: "text"
|
|
679
685
|
}, {
|
|
680
686
|
default: w(() => [
|
|
681
|
-
|
|
687
|
+
A(T(b.value), 1)
|
|
682
688
|
]),
|
|
683
689
|
_: 1
|
|
684
690
|
}, 8, ["color"]),
|
|
@@ -688,7 +694,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
688
694
|
variant: "text"
|
|
689
695
|
}, {
|
|
690
696
|
default: w(() => [
|
|
691
|
-
|
|
697
|
+
A(T(f.value), 1)
|
|
692
698
|
]),
|
|
693
699
|
_: 1
|
|
694
700
|
}, 8, ["color"])
|
|
@@ -706,7 +712,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
706
712
|
}), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
|
|
707
713
|
__name: "index",
|
|
708
714
|
setup(e) {
|
|
709
|
-
const a =
|
|
715
|
+
const a = G(), { open: t } = Z("waitDlg"), r = () => {
|
|
710
716
|
t.value = !0;
|
|
711
717
|
}, o = () => {
|
|
712
718
|
t.value = !1;
|
|
@@ -719,7 +725,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
719
725
|
const c = h("v-card"), u = h("v-dialog");
|
|
720
726
|
return R(), B(u, {
|
|
721
727
|
modelValue: W(t),
|
|
722
|
-
"onUpdate:modelValue": l[0] || (l[0] = (_) =>
|
|
728
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => X(t) ? t.value = _ : null),
|
|
723
729
|
persistent: "",
|
|
724
730
|
"no-click-animation": "",
|
|
725
731
|
fullscreen: ""
|
|
@@ -748,7 +754,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
748
754
|
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
755
|
};
|
|
750
756
|
function vt() {
|
|
751
|
-
const e =
|
|
757
|
+
const e = Q(), 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
758
|
return {
|
|
753
759
|
primaryColor: a,
|
|
754
760
|
secondaryColor: t,
|
|
@@ -773,8 +779,8 @@ function mt(e, a) {
|
|
|
773
779
|
n.hasView("waitDlg") || n.popView();
|
|
774
780
|
return;
|
|
775
781
|
}
|
|
776
|
-
const
|
|
777
|
-
(
|
|
782
|
+
const f = N(t.path);
|
|
783
|
+
(f == null ? void 0 : f.level) === 0 ? (p = navigator == null ? void 0 : navigator.Backbutton) == null || p.goHome(
|
|
778
784
|
() => {
|
|
779
785
|
},
|
|
780
786
|
() => {
|
|
@@ -786,16 +792,16 @@ function mt(e, a) {
|
|
|
786
792
|
}), O(() => {
|
|
787
793
|
s.off("pause", l), s.off("resume", c), s.off("backbutton", u);
|
|
788
794
|
});
|
|
789
|
-
const _ = (
|
|
790
|
-
if (
|
|
795
|
+
const _ = (f) => {
|
|
796
|
+
if (f.key === "Escape") {
|
|
791
797
|
u();
|
|
792
798
|
return;
|
|
793
799
|
}
|
|
794
|
-
if (!e &&
|
|
800
|
+
if (!e && f.ctrlKey && f.shiftKey && f.key.toLowerCase() === "d") {
|
|
795
801
|
o.dark = !o.dark;
|
|
796
802
|
return;
|
|
797
803
|
}
|
|
798
|
-
if (!e &&
|
|
804
|
+
if (!e && f.ctrlKey && f.shiftKey && f.key.toLowerCase() === "l") {
|
|
799
805
|
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
800
806
|
return;
|
|
801
807
|
}
|
|
@@ -809,8 +815,8 @@ function mt(e, a) {
|
|
|
809
815
|
const D = async () => {
|
|
810
816
|
if (!o.running)
|
|
811
817
|
return;
|
|
812
|
-
const
|
|
813
|
-
if (!(!
|
|
818
|
+
const f = N(t.path);
|
|
819
|
+
if (!(!f || f.requiredState !== "org"))
|
|
814
820
|
try {
|
|
815
821
|
const { update: p, permissions: y } = await Ze(a, {
|
|
816
822
|
checksum: o.permissionChecksum
|
|
@@ -828,8 +834,8 @@ function mt(e, a) {
|
|
|
828
834
|
} catch (p) {
|
|
829
835
|
console.error(p);
|
|
830
836
|
}
|
|
831
|
-
}, b = async (
|
|
832
|
-
|
|
837
|
+
}, b = async (f) => {
|
|
838
|
+
f && await D(), clearTimeout(v), v = setTimeout(async () => {
|
|
833
839
|
await D(), v && b();
|
|
834
840
|
}, 3e3);
|
|
835
841
|
}, j = () => {
|
|
@@ -850,12 +856,12 @@ function ht() {
|
|
|
850
856
|
return { verifyPermission: a };
|
|
851
857
|
}
|
|
852
858
|
function wt() {
|
|
853
|
-
const e =
|
|
859
|
+
const e = Q(), 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");
|
|
854
860
|
return { dark: t, sysBarAvail: r, compactWidth: o };
|
|
855
861
|
}
|
|
856
862
|
const yt = { install: Ye };
|
|
857
863
|
export {
|
|
858
|
-
|
|
864
|
+
Ae as Permission,
|
|
859
865
|
ft as appAppear,
|
|
860
866
|
st as closeWaitDlg,
|
|
861
867
|
rt as createAxios,
|
package/dist/store/global.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { PermissionObjects } from '../utils/permission';
|
|
2
2
|
export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
|
|
3
3
|
running: import("vue").Ref<boolean>;
|
|
4
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
4
5
|
dark: import("vue").Ref<boolean | undefined>;
|
|
5
6
|
locale: import("vue").Ref<string>;
|
|
6
7
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
7
8
|
permissionChecksum: import("vue").Ref<string>;
|
|
8
|
-
}, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
|
|
9
|
+
}, "mainActive" | "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
|
|
9
10
|
running: import("vue").Ref<boolean>;
|
|
11
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
10
12
|
dark: import("vue").Ref<boolean | undefined>;
|
|
11
13
|
locale: import("vue").Ref<string>;
|
|
12
14
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
13
15
|
permissionChecksum: import("vue").Ref<string>;
|
|
14
16
|
}, never>, Pick<{
|
|
15
17
|
running: import("vue").Ref<boolean>;
|
|
18
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
16
19
|
dark: import("vue").Ref<boolean | undefined>;
|
|
17
20
|
locale: import("vue").Ref<string>;
|
|
18
21
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
package/dist/store/viewMgr.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr", import("pinia")._UnwrapAll<Pick<{
|
|
2
|
+
views: import("vue").Ref<string[]>;
|
|
2
3
|
isEmpty: () => boolean;
|
|
3
4
|
lastView: () => string | undefined;
|
|
4
5
|
hasView: (name: string) => boolean;
|
|
@@ -6,7 +7,8 @@ export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr",
|
|
|
6
7
|
delView: (name: string) => void;
|
|
7
8
|
popView: () => void;
|
|
8
9
|
clearViews: () => void;
|
|
9
|
-
},
|
|
10
|
+
}, "views">>, Pick<{
|
|
11
|
+
views: import("vue").Ref<string[]>;
|
|
10
12
|
isEmpty: () => boolean;
|
|
11
13
|
lastView: () => string | undefined;
|
|
12
14
|
hasView: (name: string) => boolean;
|
|
@@ -15,6 +17,7 @@ export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr",
|
|
|
15
17
|
popView: () => void;
|
|
16
18
|
clearViews: () => void;
|
|
17
19
|
}, never>, Pick<{
|
|
20
|
+
views: import("vue").Ref<string[]>;
|
|
18
21
|
isEmpty: () => boolean;
|
|
19
22
|
lastView: () => string | undefined;
|
|
20
23
|
hasView: (name: string) => boolean;
|