x-essential-lib 0.7.8 → 0.7.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/index.js +296 -289
- package/dist/utils/permission.d.ts +1 -0
- package/dist/utils/router.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-7ab74c70]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-7ab74c70]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-7ab74c70]{transform-origin:20px 20px;animation:lds-spinner-7ab74c70 1.2s linear infinite}.lds-spinner div[data-v-7ab74c70]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-7ab74c70]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-7ab74c70]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-7ab74c70]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-7ab74c70]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-7ab74c70]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-7ab74c70]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-7ab74c70]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-7ab74c70]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-7ab74c70]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-7ab74c70]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-7ab74c70{0%{opacity:1}to{opacity:0}}.x-item[data-v-d5cfe252]{width:600px}@media (max-width: 600px){.x-item[data-v-d5cfe252]{width:calc(100vw - 16px)}}.x-cont[data-v-8fd5d800]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { computed as y, provide as O, inject as I, ref as f, getCurrentScope as xe, onScopeDispose as be, unref as
|
|
2
|
+
import { computed as y, provide as O, inject as I, ref as f, getCurrentScope as xe, onScopeDispose as be, unref as H, watchEffect as ke, getCurrentInstance as Ce, onMounted as T, watch as N, onBeforeUnmount as W, onBeforeMount as Le, defineComponent as E, resolveComponent as h, openBlock as C, createBlock as q, isRef as Y, withKeys as F, withModifiers as $, withCtx as w, createVNode as b, createTextVNode as V, toDisplayString as R, createElementBlock as Q, normalizeStyle as le, createElementVNode as m, createCommentVNode as ce, Fragment as De, renderList as Me, useTemplateRef as Se } from "vue";
|
|
3
3
|
import { useI18n as P } from "vue-i18n";
|
|
4
|
-
import { useTheme as ee, useDisplay as
|
|
5
|
-
import { useRouter as ue, useRoute as
|
|
6
|
-
import
|
|
4
|
+
import { useTheme as ee, useDisplay as je } from "vuetify";
|
|
5
|
+
import { useRouter as ue, useRoute as Re } from "vue-router";
|
|
6
|
+
import qe from "axios";
|
|
7
7
|
function Tt() {
|
|
8
|
-
const e = ee(), t = y(() => e.global.current.value.colors.primary), a = y(() => e.global.current.value.colors.secondary),
|
|
8
|
+
const e = ee(), t = y(() => e.global.current.value.colors.primary), a = y(() => e.global.current.value.colors.secondary), o = y(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), n = y(() => e.current.value.dark ? "#272727" : "#eeeeee"), l = y(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = y(() => e.current.value.dark ? "#303030" : "#f6f6f6"), r = y(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
9
9
|
return {
|
|
10
10
|
primaryColor: t,
|
|
11
11
|
secondaryColor: a,
|
|
12
|
-
backgroundColor0:
|
|
13
|
-
backgroundColor1:
|
|
12
|
+
backgroundColor0: o,
|
|
13
|
+
backgroundColor1: n,
|
|
14
14
|
backgroundColor2: l,
|
|
15
|
-
highlightColor:
|
|
16
|
-
borderColor:
|
|
15
|
+
highlightColor: c,
|
|
16
|
+
borderColor: r
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
/*! js-cookie v3.0.5 | MIT */
|
|
20
20
|
function X(e) {
|
|
21
21
|
for (var t = 1; t < arguments.length; t++) {
|
|
22
22
|
var a = arguments[t];
|
|
23
|
-
for (var
|
|
24
|
-
e[
|
|
23
|
+
for (var o in a)
|
|
24
|
+
e[o] = a[o];
|
|
25
25
|
}
|
|
26
26
|
return e;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var Ve = {
|
|
29
29
|
read: function(e) {
|
|
30
30
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
31
31
|
},
|
|
@@ -37,47 +37,47 @@ var qe = {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
function J(e, t) {
|
|
40
|
-
function a(
|
|
40
|
+
function a(n, l, c) {
|
|
41
41
|
if (!(typeof document > "u")) {
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
for (var u in
|
|
45
|
-
|
|
46
|
-
return document.cookie =
|
|
42
|
+
c = X({}, t, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
43
|
+
var r = "";
|
|
44
|
+
for (var u in c)
|
|
45
|
+
c[u] && (r += "; " + u, c[u] !== !0 && (r += "=" + c[u].split(";")[0]));
|
|
46
|
+
return document.cookie = n + "=" + e.write(l, n) + r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function n
|
|
50
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
51
|
-
for (var l = document.cookie ? document.cookie.split("; ") : [],
|
|
52
|
-
var u = l[
|
|
49
|
+
function o(n) {
|
|
50
|
+
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
51
|
+
for (var l = document.cookie ? document.cookie.split("; ") : [], c = {}, r = 0; r < l.length; r++) {
|
|
52
|
+
var u = l[r].split("="), _ = u.slice(1).join("=");
|
|
53
53
|
try {
|
|
54
54
|
var g = decodeURIComponent(u[0]);
|
|
55
|
-
if (
|
|
55
|
+
if (c[g] = e.read(_, g), n === g)
|
|
56
56
|
break;
|
|
57
57
|
} catch {
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return
|
|
60
|
+
return n ? c[n] : c;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return Object.create(
|
|
64
64
|
{
|
|
65
65
|
set: a,
|
|
66
|
-
get:
|
|
67
|
-
remove: function(
|
|
66
|
+
get: o,
|
|
67
|
+
remove: function(n, l) {
|
|
68
68
|
a(
|
|
69
|
-
|
|
69
|
+
n,
|
|
70
70
|
"",
|
|
71
71
|
X({}, l, {
|
|
72
72
|
expires: -1
|
|
73
73
|
})
|
|
74
74
|
);
|
|
75
75
|
},
|
|
76
|
-
withAttributes: function(
|
|
77
|
-
return J(this.converter, X({}, this.attributes,
|
|
76
|
+
withAttributes: function(n) {
|
|
77
|
+
return J(this.converter, X({}, this.attributes, n));
|
|
78
78
|
},
|
|
79
|
-
withConverter: function(
|
|
80
|
-
return J(X({}, this.converter,
|
|
79
|
+
withConverter: function(n) {
|
|
80
|
+
return J(X({}, this.converter, n), this.attributes);
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -86,13 +86,13 @@ function J(e, t) {
|
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
var
|
|
89
|
+
var A = J(Ve, { path: "/" });
|
|
90
90
|
function Et(e) {
|
|
91
|
-
const t =
|
|
91
|
+
const t = qe.create({
|
|
92
92
|
timeout: 6e3
|
|
93
93
|
});
|
|
94
94
|
return t.defaults.baseURL = e.baseUrl, t.interceptors.request.use(
|
|
95
|
-
(a) =>
|
|
95
|
+
(a) => Ae(a),
|
|
96
96
|
(a) => {
|
|
97
97
|
Oe(a, e.onError);
|
|
98
98
|
}
|
|
@@ -101,8 +101,8 @@ function Et(e) {
|
|
|
101
101
|
(a) => Te(a, e.onError)
|
|
102
102
|
), t;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
const t =
|
|
104
|
+
function Ae(e) {
|
|
105
|
+
const t = A.get("accessToken") ?? "";
|
|
106
106
|
return e.headers.Authorization = "Basic " + t, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
107
107
|
}
|
|
108
108
|
function Oe(e, t) {
|
|
@@ -112,33 +112,33 @@ function Ie(e) {
|
|
|
112
112
|
return e.data;
|
|
113
113
|
}
|
|
114
114
|
function Te(e, t) {
|
|
115
|
-
var
|
|
116
|
-
const
|
|
117
|
-
return
|
|
118
|
-
code:
|
|
119
|
-
message:
|
|
115
|
+
var n, l;
|
|
116
|
+
const o = e.response;
|
|
117
|
+
return o && (o.status === 401 && Ee(), (n = o.data) != null && n.message ? t((l = o.data) == null ? void 0 : l.message) : t({
|
|
118
|
+
code: o.status,
|
|
119
|
+
message: o.statusText
|
|
120
120
|
})), Promise.reject(e);
|
|
121
121
|
}
|
|
122
122
|
function Ee() {
|
|
123
|
-
|
|
123
|
+
A.remove("accessToken"), A.remove("refreshToken"), A.remove("activeOrg"), ue().replace({ path: "/passport/login" });
|
|
124
124
|
}
|
|
125
125
|
function Be(e) {
|
|
126
126
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
|
|
127
|
-
var
|
|
128
|
-
|
|
127
|
+
var o = e.get(t);
|
|
128
|
+
o ? o.push(a) : e.set(t, [a]);
|
|
129
129
|
}, off: function(t, a) {
|
|
130
|
-
var
|
|
131
|
-
|
|
130
|
+
var o = e.get(t);
|
|
131
|
+
o && (a ? o.splice(o.indexOf(a) >>> 0, 1) : e.set(t, []));
|
|
132
132
|
}, emit: function(t, a) {
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}), (
|
|
137
|
-
|
|
133
|
+
var o = e.get(t);
|
|
134
|
+
o && o.slice().map(function(n) {
|
|
135
|
+
n(a);
|
|
136
|
+
}), (o = e.get("*")) && o.slice().map(function(n) {
|
|
137
|
+
n(t, a);
|
|
138
138
|
});
|
|
139
139
|
} };
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const s = function() {
|
|
142
142
|
return window.eventBus || (window.eventBus = Be()), window.eventBus;
|
|
143
143
|
}();
|
|
144
144
|
async function Bt(e) {
|
|
@@ -147,10 +147,10 @@ async function Bt(e) {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
async function te(e, t, a) {
|
|
150
|
-
const
|
|
151
|
-
return new Promise((
|
|
150
|
+
const o = Date.now();
|
|
151
|
+
return new Promise((n) => {
|
|
152
152
|
const l = async () => {
|
|
153
|
-
e() ?
|
|
153
|
+
e() ? n(!0) : t && Date.now() - o > t ? n(!1) : setTimeout(l, a ?? 30);
|
|
154
154
|
};
|
|
155
155
|
l();
|
|
156
156
|
});
|
|
@@ -162,93 +162,97 @@ function Ue(e, t) {
|
|
|
162
162
|
}, 50));
|
|
163
163
|
}
|
|
164
164
|
let ne = Date.now();
|
|
165
|
-
function
|
|
165
|
+
function se() {
|
|
166
166
|
const e = Date.now();
|
|
167
167
|
return e - ne > 500 ? (ne = e, !0) : !1;
|
|
168
168
|
}
|
|
169
169
|
let We = 0;
|
|
170
|
-
function
|
|
170
|
+
function pe() {
|
|
171
171
|
return ++We;
|
|
172
172
|
}
|
|
173
173
|
async function Ut(e) {
|
|
174
|
-
if (!
|
|
174
|
+
if (!se())
|
|
175
175
|
return;
|
|
176
176
|
let t = !1, a;
|
|
177
|
-
const
|
|
177
|
+
const o = (l) => {
|
|
178
178
|
a = l, t = !0;
|
|
179
|
-
},
|
|
180
|
-
return
|
|
179
|
+
}, n = pe();
|
|
180
|
+
return s.on("confirmDlgResult" + n, o), s.emit("confirmDlg", { ...e, seq: n }), await te(() => t), s.off("confirmDlgResult" + n, o), a;
|
|
181
181
|
}
|
|
182
182
|
async function Wt(e) {
|
|
183
|
-
if (!
|
|
183
|
+
if (!se())
|
|
184
184
|
return;
|
|
185
185
|
let t = !1, a;
|
|
186
|
-
const
|
|
186
|
+
const o = (l) => {
|
|
187
187
|
a = l, t = !0;
|
|
188
|
-
},
|
|
189
|
-
return
|
|
188
|
+
}, n = pe();
|
|
189
|
+
return s.on("promptDlgResult" + n, o), s.emit("promptDlg", { ...e, seq: n }), await te(() => t), s.off("promptDlgResult" + n, o), a;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
191
|
+
function $t(e) {
|
|
192
|
+
s.emit("openWaitDlg", { text: e });
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
194
|
+
function Ht() {
|
|
195
|
+
s.emit("closeWaitDlg");
|
|
196
196
|
}
|
|
197
197
|
function Kt(e, t) {
|
|
198
|
-
|
|
198
|
+
s.emit("message", { type: "error", text: e, timeout: t });
|
|
199
199
|
}
|
|
200
200
|
function zt(e, t) {
|
|
201
|
-
|
|
201
|
+
s.emit("message", { type: "info", text: e, timeout: t });
|
|
202
202
|
}
|
|
203
203
|
function Xt(e, t) {
|
|
204
|
-
|
|
204
|
+
s.emit("message", { type: "success", text: e, timeout: t });
|
|
205
205
|
}
|
|
206
206
|
function Ft(e, t) {
|
|
207
|
-
|
|
207
|
+
s.emit("message", { type: "warning", text: e, timeout: t });
|
|
208
208
|
}
|
|
209
|
-
var
|
|
209
|
+
var $e = /* @__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_compute_space = "list_compute_space", e.get_compute_space = "get_compute_space", e.create_compute_space = "create_compute_space", e.delete_compute_space = "delete_compute_space", e.update_compute_space = "update_compute_space", e.arrange_compute_space = "arrange_compute_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_compute_layer = "open_compute_layer", e.list_data_space = "list_data_space", e.get_data_space = "get_data_space", e.create_data_space = "create_data_space", e.delete_data_space = "delete_data_space", e.update_data_space = "update_data_space", e.arrange_data_space = "arrange_data_space", e.list_table_group = "list_table_group", e.create_table_group = "create_table_group", e.delete_table_group = "delete_table_group", e.update_table_group = "update_table_group", e.arrange_table_group = "arrange_table_group", e.list_table = "list_table", e.get_table = "get_table", e.create_table = "create_table", e.delete_table = "delete_table", e.update_table = "update_table", e.get_data = "get_data", e.create_data = "create_data", e.delete_data = "delete_data", e.update_data = "update_data", e.get_relation_graph = "get_relation_graph", e.update_relation_graph = "update_relation_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_resource_space = "list_resource_space", e.get_resource_space = "get_resource_space", e.create_resource_space = "create_resource_space", e.delete_resource_space = "delete_resource_space", e.update_resource_space = "update_resource_space", e.arrange_resource_space = "arrange_resource_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_resource = "list_resource", e.get_resource = "get_resource", e.create_resource = "create_resource", e.delete_resource = "delete_resource", e.update_resource = "update_resource", e.move_resource = "move_resource", e.open_resource_layer = "open_resource_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_table = "filter_table", e))($e || {});
|
|
210
210
|
function re(e, t) {
|
|
211
211
|
if (!e)
|
|
212
212
|
return !1;
|
|
213
213
|
let a = e;
|
|
214
|
-
return Object.keys(a).length <= 0 || (t.split("/").forEach((
|
|
214
|
+
return Object.keys(a).length <= 0 || (t.split("/").forEach((n) => {
|
|
215
215
|
if (Object.keys(a).length <= 0)
|
|
216
216
|
return !0;
|
|
217
|
-
if (a[
|
|
218
|
-
a = a[
|
|
217
|
+
if (a[n])
|
|
218
|
+
a = a[n];
|
|
219
219
|
else
|
|
220
220
|
return !1;
|
|
221
221
|
}), Object.keys(a).length <= 0);
|
|
222
222
|
}
|
|
223
|
+
function He(e, t, a) {
|
|
224
|
+
const o = e[t];
|
|
225
|
+
return o ? a ? !(!re(o.includes, a) || re(o.excludes, a)) : !0 : !1;
|
|
226
|
+
}
|
|
223
227
|
const _e = "essentialDark", ie = "essentialLocale", de = "essentialPermissionObjects", fe = "essentialPermissionChecksum", ge = "essentialLastAppPath", ve = "essentialViews";
|
|
224
|
-
function
|
|
228
|
+
function Ke(e) {
|
|
225
229
|
O(_e, e);
|
|
226
230
|
}
|
|
227
231
|
function Zt() {
|
|
228
232
|
return I(_e);
|
|
229
233
|
}
|
|
230
|
-
function
|
|
234
|
+
function ze(e) {
|
|
231
235
|
O(ie, e);
|
|
232
236
|
}
|
|
233
237
|
function Nt() {
|
|
234
238
|
return I(ie);
|
|
235
239
|
}
|
|
236
|
-
function
|
|
240
|
+
function Xe(e) {
|
|
237
241
|
O(de, e);
|
|
238
242
|
}
|
|
239
|
-
function
|
|
243
|
+
function Fe() {
|
|
240
244
|
return I(de);
|
|
241
245
|
}
|
|
242
|
-
function
|
|
246
|
+
function Ze(e) {
|
|
243
247
|
O(fe, e);
|
|
244
248
|
}
|
|
245
249
|
function Gt() {
|
|
246
250
|
return I(fe);
|
|
247
251
|
}
|
|
248
|
-
function
|
|
252
|
+
function Ne(e) {
|
|
249
253
|
O(ge, e);
|
|
250
254
|
}
|
|
251
|
-
function
|
|
255
|
+
function Qt() {
|
|
252
256
|
return I(ge);
|
|
253
257
|
}
|
|
254
258
|
function Ge(e) {
|
|
@@ -367,103 +371,102 @@ const Je = [
|
|
|
367
371
|
];
|
|
368
372
|
function Z(e) {
|
|
369
373
|
let t, a = 0;
|
|
370
|
-
const
|
|
371
|
-
return Je.forEach((
|
|
372
|
-
const l =
|
|
373
|
-
let
|
|
374
|
-
for (let
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
const o = e.split("/").filter((n) => n.trim() !== "");
|
|
375
|
+
return Je.forEach((n) => {
|
|
376
|
+
const l = n.path.split("/").filter((r) => r.trim() !== "");
|
|
377
|
+
let c = 0;
|
|
378
|
+
for (let r = 0; r < o.length && !(r >= l.length || o[r] !== l[r]); r++)
|
|
379
|
+
c++;
|
|
380
|
+
c > 0 && c > a && (t = n, a = c);
|
|
377
381
|
}), t;
|
|
378
382
|
}
|
|
379
383
|
const G = f("");
|
|
380
|
-
function
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
if (!n) {
|
|
384
|
+
function S(e, t, a) {
|
|
385
|
+
t === "/" && (t = a);
|
|
386
|
+
const o = Z(e), n = Z(t);
|
|
387
|
+
if (!o) {
|
|
385
388
|
console.assert(!1);
|
|
386
389
|
return;
|
|
387
390
|
}
|
|
388
|
-
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !
|
|
391
|
+
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !n)
|
|
389
392
|
return;
|
|
390
|
-
const l =
|
|
391
|
-
l ?
|
|
393
|
+
const l = o.app === n.app, c = o.path === n.path, r = o.level >= n.level;
|
|
394
|
+
l ? c ? G.value = "" : G.value = r ? "inner-left" : "inner-right" : (G.value = "", Ue(o.app, r));
|
|
392
395
|
}
|
|
393
396
|
function Ye() {
|
|
394
|
-
return !!
|
|
397
|
+
return !!A.get("accessToken");
|
|
395
398
|
}
|
|
396
399
|
function Pe() {
|
|
397
|
-
return !!
|
|
400
|
+
return !!A.get("activeOrg");
|
|
398
401
|
}
|
|
399
|
-
function
|
|
400
|
-
const n = Ye(),
|
|
401
|
-
if (!
|
|
402
|
+
function Jt(e, t, a, o) {
|
|
403
|
+
const n = Ye(), l = Pe(), c = Z(e.path);
|
|
404
|
+
if (!c) {
|
|
402
405
|
console.assert(!1), a();
|
|
403
406
|
return;
|
|
404
407
|
}
|
|
405
|
-
if (
|
|
408
|
+
if (c.requiredState === "auth")
|
|
406
409
|
if (n)
|
|
407
|
-
if (
|
|
410
|
+
if (l) {
|
|
408
411
|
const r = "/main";
|
|
409
|
-
|
|
412
|
+
S(r, t.path, o), a({ path: r });
|
|
410
413
|
} else
|
|
411
|
-
|
|
414
|
+
S(e.path, t.path, o), a();
|
|
412
415
|
else {
|
|
413
416
|
const r = "/passport/login";
|
|
414
|
-
|
|
417
|
+
S(r, t.path, o), a({ path: r });
|
|
415
418
|
}
|
|
416
|
-
else if (
|
|
419
|
+
else if (c.requiredState === "org")
|
|
417
420
|
if (n)
|
|
418
|
-
if (
|
|
419
|
-
|
|
421
|
+
if (l)
|
|
422
|
+
S(e.path, t.path, o), a();
|
|
420
423
|
else {
|
|
421
424
|
const r = "/org/joinOrCreate";
|
|
422
|
-
|
|
425
|
+
S(r, t.path, o), a({ path: r });
|
|
423
426
|
}
|
|
424
427
|
else {
|
|
425
428
|
const r = "/passport/login";
|
|
426
|
-
|
|
429
|
+
S(r, t.path, o), a({ path: r });
|
|
427
430
|
}
|
|
428
431
|
else if (n)
|
|
429
|
-
if (
|
|
432
|
+
if (l) {
|
|
430
433
|
const r = "/main";
|
|
431
|
-
|
|
434
|
+
S(r, t.path, o), a({ path: r });
|
|
432
435
|
} else {
|
|
433
436
|
const r = "/org/joinOrCreate";
|
|
434
|
-
|
|
437
|
+
S(r, t.path, o), a({ path: r });
|
|
435
438
|
}
|
|
436
439
|
else
|
|
437
|
-
|
|
440
|
+
S(e.path, t.path, o), a();
|
|
438
441
|
}
|
|
439
442
|
function et(e) {
|
|
440
443
|
return e.value.length <= 0;
|
|
441
444
|
}
|
|
442
|
-
function
|
|
445
|
+
function Yt(e) {
|
|
443
446
|
return e.value.at(-1);
|
|
444
447
|
}
|
|
445
448
|
function me(e, t) {
|
|
446
449
|
return !!e.value.find((a) => a === t);
|
|
447
450
|
}
|
|
448
451
|
function tt(e, t) {
|
|
449
|
-
const a = e.value.findIndex((
|
|
452
|
+
const a = e.value.findIndex((o) => o === t);
|
|
450
453
|
a >= 0 && e.value.splice(a, 1), e.value.push(t);
|
|
451
454
|
}
|
|
452
455
|
function at(e, t) {
|
|
453
|
-
const a = e.value.findIndex((
|
|
456
|
+
const a = e.value.findIndex((o) => o === t);
|
|
454
457
|
a >= 0 && e.value.splice(a, 1);
|
|
455
458
|
}
|
|
456
459
|
function ot(e) {
|
|
457
460
|
console.assert(e.value.length > 0), e.value.pop();
|
|
458
461
|
}
|
|
459
|
-
function
|
|
462
|
+
function Pt(e) {
|
|
460
463
|
e.value = [];
|
|
461
464
|
}
|
|
462
465
|
function nt(e) {
|
|
463
466
|
return xe() ? (be(e), !0) : !1;
|
|
464
467
|
}
|
|
465
468
|
function rt(e) {
|
|
466
|
-
return typeof e == "function" ? e() :
|
|
469
|
+
return typeof e == "function" ? e() : H(e);
|
|
467
470
|
}
|
|
468
471
|
const lt = typeof window < "u" && typeof document < "u";
|
|
469
472
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -474,41 +477,41 @@ function ut() {
|
|
|
474
477
|
e.value = !0;
|
|
475
478
|
}, t), e;
|
|
476
479
|
}
|
|
477
|
-
function
|
|
480
|
+
function st(e) {
|
|
478
481
|
const t = ut();
|
|
479
482
|
return y(() => (t.value, !!e()));
|
|
480
483
|
}
|
|
481
|
-
function
|
|
482
|
-
const { window: a = ct } = t,
|
|
483
|
-
let
|
|
484
|
-
const l = f(!1),
|
|
484
|
+
function pt(e, t = {}) {
|
|
485
|
+
const { window: a = ct } = t, o = st(() => a && "matchMedia" in a && typeof a.matchMedia == "function");
|
|
486
|
+
let n;
|
|
487
|
+
const l = f(!1), c = (_) => {
|
|
485
488
|
l.value = _.matches;
|
|
486
|
-
},
|
|
487
|
-
|
|
489
|
+
}, r = () => {
|
|
490
|
+
n && ("removeEventListener" in n ? n.removeEventListener("change", c) : n.removeListener(c));
|
|
488
491
|
}, u = ke(() => {
|
|
489
|
-
|
|
492
|
+
o.value && (r(), n = a.matchMedia(rt(e)), "addEventListener" in n ? n.addEventListener("change", c) : n.addListener(c), l.value = n.matches);
|
|
490
493
|
});
|
|
491
494
|
return nt(() => {
|
|
492
|
-
u(),
|
|
495
|
+
u(), r(), n = void 0;
|
|
493
496
|
}), l;
|
|
494
497
|
}
|
|
495
498
|
function _t(e) {
|
|
496
|
-
return
|
|
499
|
+
return pt("(prefers-color-scheme: dark)", e);
|
|
497
500
|
}
|
|
498
|
-
function
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
+
function ea(e, t, a, o, n, l) {
|
|
502
|
+
const c = Re(), r = ue();
|
|
503
|
+
Ke(e), ze(t), Xe(a), Ze(o), Ne(n), Ge(l);
|
|
501
504
|
const u = ee(), _ = _t();
|
|
502
505
|
N(
|
|
503
506
|
e,
|
|
504
507
|
() => {
|
|
505
|
-
let
|
|
506
|
-
typeof e.value == "boolean" ?
|
|
508
|
+
let p = !1;
|
|
509
|
+
typeof e.value == "boolean" ? p = e.value : p = _.value, u.global.name.value = p ? "dark" : "light";
|
|
507
510
|
},
|
|
508
511
|
{ immediate: !0 }
|
|
509
512
|
);
|
|
510
|
-
const g = (
|
|
511
|
-
if (
|
|
513
|
+
const g = (p) => {
|
|
514
|
+
if (p.key === "Escape") {
|
|
512
515
|
v();
|
|
513
516
|
return;
|
|
514
517
|
}
|
|
@@ -518,118 +521,121 @@ function Pt(e, t, a, n, o, l) {
|
|
|
518
521
|
me(l, "waitDlg") || ot(l);
|
|
519
522
|
return;
|
|
520
523
|
}
|
|
521
|
-
const
|
|
522
|
-
(
|
|
524
|
+
const p = Z(c.path);
|
|
525
|
+
(p == null ? void 0 : p.level) === 0 ? (x = navigator == null ? void 0 : navigator.Backbutton) == null || x.goHome(
|
|
523
526
|
() => {
|
|
524
527
|
},
|
|
525
528
|
() => {
|
|
526
529
|
}
|
|
527
|
-
) :
|
|
530
|
+
) : r.back();
|
|
528
531
|
};
|
|
529
532
|
T(() => {
|
|
530
|
-
window.addEventListener("keydown", g),
|
|
533
|
+
window.addEventListener("keydown", g), s.on("backbutton", v);
|
|
531
534
|
}), W(() => {
|
|
532
|
-
window.removeEventListener("keydown", g),
|
|
535
|
+
window.removeEventListener("keydown", g), s.off("backbutton", v);
|
|
533
536
|
});
|
|
534
|
-
const L = (
|
|
535
|
-
e.value =
|
|
536
|
-
}, k = (
|
|
537
|
-
t.value =
|
|
538
|
-
}, i = (
|
|
539
|
-
const x =
|
|
540
|
-
a.value = x[0],
|
|
541
|
-
}, D = (
|
|
542
|
-
|
|
537
|
+
const L = (p) => {
|
|
538
|
+
e.value = p;
|
|
539
|
+
}, k = (p) => {
|
|
540
|
+
t.value = p;
|
|
541
|
+
}, i = (p) => {
|
|
542
|
+
const x = p;
|
|
543
|
+
a.value = x[0], o.value = x[1];
|
|
544
|
+
}, D = (p) => {
|
|
545
|
+
n.value = p;
|
|
543
546
|
};
|
|
544
547
|
Le(() => {
|
|
545
|
-
|
|
548
|
+
s.on("updateDark", L), s.on("updateLocale", k), s.on("updatePermission", i), s.on("updateLastAppPath", D), s.emit("syncGlobalState");
|
|
546
549
|
}), W(() => {
|
|
547
|
-
|
|
550
|
+
s.off("updateDark", L), s.off("updateLocale", k), s.off("updatePermission", i), s.off("updateLastAppPath", D);
|
|
548
551
|
});
|
|
549
552
|
}
|
|
550
|
-
function
|
|
551
|
-
const e =
|
|
552
|
-
function t(a,
|
|
553
|
-
|
|
554
|
-
|
|
553
|
+
function ta() {
|
|
554
|
+
const e = Fe();
|
|
555
|
+
function t(a, o) {
|
|
556
|
+
return He(
|
|
557
|
+
e.value,
|
|
558
|
+
a,
|
|
559
|
+
o
|
|
560
|
+
);
|
|
555
561
|
}
|
|
556
562
|
return { verifyPermission: t };
|
|
557
563
|
}
|
|
558
|
-
function
|
|
559
|
-
const e = y(() => !!window.cordova), t =
|
|
564
|
+
function aa() {
|
|
565
|
+
const e = y(() => !!window.cordova), t = je(), a = y(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
560
566
|
return { sysBarAvail: e, compactWidth: a };
|
|
561
567
|
}
|
|
562
568
|
function ae(e, t) {
|
|
563
|
-
const a = Qe(),
|
|
569
|
+
const a = Qe(), o = y({
|
|
564
570
|
get() {
|
|
565
571
|
return me(a, e);
|
|
566
572
|
},
|
|
567
573
|
set(l) {
|
|
568
574
|
l ? tt(a, e) : at(a, e);
|
|
569
575
|
}
|
|
570
|
-
}),
|
|
571
|
-
t == null || t(l),
|
|
576
|
+
}), n = (l) => {
|
|
577
|
+
t == null || t(l), o.value = !0;
|
|
572
578
|
};
|
|
573
579
|
return T(() => {
|
|
574
|
-
|
|
580
|
+
s.on(e, n);
|
|
575
581
|
}), W(() => {
|
|
576
|
-
|
|
577
|
-
}), { open:
|
|
582
|
+
s.off(e, n);
|
|
583
|
+
}), { open: o };
|
|
578
584
|
}
|
|
579
585
|
const it = /* @__PURE__ */ E({
|
|
580
586
|
__name: "index",
|
|
581
587
|
setup(e) {
|
|
582
|
-
const { t } = P(), a = f(""),
|
|
588
|
+
const { t } = P(), a = f(""), o = f(""), n = f(""), l = f(""), c = f(""), r = f("");
|
|
583
589
|
let u = 0, _ = !1;
|
|
584
590
|
const g = (k) => {
|
|
585
|
-
var D,
|
|
591
|
+
var D, p, x, M;
|
|
586
592
|
const i = k;
|
|
587
|
-
a.value = i.title,
|
|
593
|
+
a.value = i.title, o.value = i.text, n.value = ((D = i.cancel) == null ? void 0 : D.color) ?? "primary", l.value = ((p = i.cancel) == null ? void 0 : p.text) ?? t("dlg.common.cancel"), c.value = ((x = i.confirm) == null ? void 0 : x.color) ?? "primary", r.value = ((M = i.confirm) == null ? void 0 : M.text) ?? t("dlg.common.confirm"), u = i.seq, _ = !1, v.value = !0;
|
|
588
594
|
}, { open: v } = ae("confirmDlg", g), L = () => {
|
|
589
|
-
v.value = !1, _ || (
|
|
595
|
+
v.value = !1, _ || (s.emit("confirmDlgResult" + u, !0), _ = !0);
|
|
590
596
|
};
|
|
591
597
|
return N(v, (k) => {
|
|
592
|
-
!k && !_ && (
|
|
598
|
+
!k && !_ && (s.emit("confirmDlgResult" + u, !1), _ = !0);
|
|
593
599
|
}), (k, i) => {
|
|
594
|
-
const D = h("v-card-text"),
|
|
595
|
-
return C(),
|
|
596
|
-
modelValue:
|
|
597
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
600
|
+
const D = h("v-card-text"), p = h("v-btn"), x = h("v-card-actions"), M = h("v-card"), d = h("v-dialog");
|
|
601
|
+
return C(), q(d, {
|
|
602
|
+
modelValue: H(v),
|
|
603
|
+
"onUpdate:modelValue": i[1] || (i[1] = (j) => Y(v) ? v.value = j : null),
|
|
598
604
|
transition: "dialog-top-transition",
|
|
599
605
|
"max-width": "600px",
|
|
600
606
|
onKeydown: [
|
|
601
|
-
i[2] || (i[2] = F(
|
|
602
|
-
F(
|
|
607
|
+
i[2] || (i[2] = F($((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
608
|
+
F($(L, ["stop", "prevent"]), ["enter"])
|
|
603
609
|
]
|
|
604
610
|
}, {
|
|
605
611
|
default: w(() => [
|
|
606
|
-
b(
|
|
612
|
+
b(M, { title: a.value }, {
|
|
607
613
|
default: w(() => [
|
|
608
614
|
b(D, null, {
|
|
609
615
|
default: w(() => [
|
|
610
|
-
|
|
616
|
+
V(R(o.value), 1)
|
|
611
617
|
]),
|
|
612
618
|
_: 1
|
|
613
619
|
}),
|
|
614
620
|
b(x, { class: "d-flex justify-end" }, {
|
|
615
621
|
default: w(() => [
|
|
616
|
-
b(
|
|
617
|
-
color:
|
|
622
|
+
b(p, {
|
|
623
|
+
color: n.value,
|
|
618
624
|
variant: "text",
|
|
619
|
-
onClick: i[0] || (i[0] = (
|
|
625
|
+
onClick: i[0] || (i[0] = (j) => v.value = !1)
|
|
620
626
|
}, {
|
|
621
627
|
default: w(() => [
|
|
622
|
-
|
|
628
|
+
V(R(l.value), 1)
|
|
623
629
|
]),
|
|
624
630
|
_: 1
|
|
625
631
|
}, 8, ["color"]),
|
|
626
|
-
b(
|
|
627
|
-
color:
|
|
632
|
+
b(p, {
|
|
633
|
+
color: c.value,
|
|
628
634
|
variant: "text",
|
|
629
635
|
onClick: L
|
|
630
636
|
}, {
|
|
631
637
|
default: w(() => [
|
|
632
|
-
|
|
638
|
+
V(R(r.value), 1)
|
|
633
639
|
]),
|
|
634
640
|
_: 1
|
|
635
641
|
}, 8, ["color"])
|
|
@@ -650,13 +656,13 @@ const it = /* @__PURE__ */ E({
|
|
|
650
656
|
zIndex: { default: 1 }
|
|
651
657
|
},
|
|
652
658
|
setup(e) {
|
|
653
|
-
const t = ee(), a = e,
|
|
659
|
+
const t = ee(), a = e, o = y(() => ({
|
|
654
660
|
background: t.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
655
661
|
zIndex: a.zIndex
|
|
656
662
|
}));
|
|
657
|
-
return (
|
|
663
|
+
return (n, l) => (C(), Q("div", {
|
|
658
664
|
class: "x-cont",
|
|
659
|
-
style: le(
|
|
665
|
+
style: le(o.value)
|
|
660
666
|
}, l[0] || (l[0] = [
|
|
661
667
|
m("div", { class: "lds-spinner" }, [
|
|
662
668
|
m("div"),
|
|
@@ -676,8 +682,8 @@ const it = /* @__PURE__ */ E({
|
|
|
676
682
|
}
|
|
677
683
|
}), oe = (e, t) => {
|
|
678
684
|
const a = e.__vccOpts || e;
|
|
679
|
-
for (const [
|
|
680
|
-
a[
|
|
685
|
+
for (const [o, n] of t)
|
|
686
|
+
a[o] = n;
|
|
681
687
|
return a;
|
|
682
688
|
}, ft = /* @__PURE__ */ oe(dt, [["__scopeId", "data-v-7ab74c70"]]);
|
|
683
689
|
var gt = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z", vt = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z", mt = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", ht = "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z", wt = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
@@ -691,10 +697,10 @@ const yt = /* @__PURE__ */ E({
|
|
|
691
697
|
},
|
|
692
698
|
emits: ["timeout"],
|
|
693
699
|
setup(e, { emit: t }) {
|
|
694
|
-
const a = e,
|
|
700
|
+
const a = e, o = y(() => ({
|
|
695
701
|
width: "calc(100% - 64px)",
|
|
696
702
|
overflowWrap: "break-word"
|
|
697
|
-
})),
|
|
703
|
+
})), n = y(() => {
|
|
698
704
|
switch (a.type) {
|
|
699
705
|
case "success":
|
|
700
706
|
return vt;
|
|
@@ -707,33 +713,33 @@ const yt = /* @__PURE__ */ E({
|
|
|
707
713
|
default:
|
|
708
714
|
return "";
|
|
709
715
|
}
|
|
710
|
-
}), l = f(!0),
|
|
716
|
+
}), l = f(!0), c = t;
|
|
711
717
|
return T(() => {
|
|
712
718
|
setTimeout(() => {
|
|
713
|
-
|
|
719
|
+
c("timeout", a.id);
|
|
714
720
|
}, a.timeout);
|
|
715
|
-
}), N(l, (
|
|
716
|
-
|
|
717
|
-
}), (
|
|
721
|
+
}), N(l, (r) => {
|
|
722
|
+
r || c("timeout", a.id);
|
|
723
|
+
}), (r, u) => {
|
|
718
724
|
const _ = h("v-icon"), g = h("v-sheet");
|
|
719
|
-
return C(),
|
|
725
|
+
return C(), q(g, {
|
|
720
726
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
721
727
|
color: a.type,
|
|
722
728
|
elevation: 1
|
|
723
729
|
}, {
|
|
724
730
|
default: w(() => [
|
|
725
|
-
|
|
731
|
+
n.value ? (C(), q(_, {
|
|
726
732
|
key: 0,
|
|
727
733
|
class: "mx-1",
|
|
728
|
-
icon:
|
|
734
|
+
icon: n.value
|
|
729
735
|
}, null, 8, ["icon"])) : ce("", !0),
|
|
730
736
|
m("div", {
|
|
731
|
-
style: le(
|
|
732
|
-
},
|
|
737
|
+
style: le(o.value)
|
|
738
|
+
}, R(a.text), 5),
|
|
733
739
|
b(_, {
|
|
734
740
|
class: "mx-1",
|
|
735
|
-
icon:
|
|
736
|
-
onClick: u[0] || (u[0] = (v) =>
|
|
741
|
+
icon: H(mt),
|
|
742
|
+
onClick: u[0] || (u[0] = (v) => c("timeout", a.id))
|
|
737
743
|
}, null, 8, ["icon"])
|
|
738
744
|
]),
|
|
739
745
|
_: 1
|
|
@@ -745,71 +751,71 @@ const yt = /* @__PURE__ */ E({
|
|
|
745
751
|
setup(e) {
|
|
746
752
|
const t = f([]);
|
|
747
753
|
T(() => {
|
|
748
|
-
|
|
754
|
+
s.on("message", a);
|
|
749
755
|
}), W(() => {
|
|
750
|
-
|
|
756
|
+
s.off("message", a);
|
|
751
757
|
});
|
|
752
|
-
const a = (
|
|
753
|
-
const { type: u, text: _, timeout: g } =
|
|
758
|
+
const a = (r) => {
|
|
759
|
+
const { type: u, text: _, timeout: g } = r;
|
|
754
760
|
l(u, _, g);
|
|
755
|
-
},
|
|
756
|
-
r
|
|
761
|
+
}, o = (r) => {
|
|
762
|
+
c(r);
|
|
757
763
|
};
|
|
758
|
-
let
|
|
759
|
-
const l = (
|
|
760
|
-
const g =
|
|
761
|
-
t.value.push({ id: g, type:
|
|
762
|
-
},
|
|
763
|
-
const u = t.value.findIndex((_) => _.id ===
|
|
764
|
+
let n = 0;
|
|
765
|
+
const l = (r, u, _) => {
|
|
766
|
+
const g = n++;
|
|
767
|
+
t.value.push({ id: g, type: r, text: u, timeout: _ });
|
|
768
|
+
}, c = (r) => {
|
|
769
|
+
const u = t.value.findIndex((_) => _.id === r);
|
|
764
770
|
u >= 0 && t.value.splice(u, 1);
|
|
765
771
|
};
|
|
766
|
-
return (
|
|
772
|
+
return (r, u) => (C(), Q("div", {
|
|
767
773
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
768
|
-
onClick: u[0] || (u[0] =
|
|
774
|
+
onClick: u[0] || (u[0] = $(() => {
|
|
769
775
|
}, ["stop"]))
|
|
770
776
|
}, [
|
|
771
|
-
(C(!0), Q(De, null,
|
|
777
|
+
(C(!0), Q(De, null, Me(t.value, (_) => (C(), q(xt, {
|
|
772
778
|
id: _.id,
|
|
773
779
|
key: _.id,
|
|
774
780
|
type: _.type,
|
|
775
781
|
text: _.text,
|
|
776
782
|
timeout: _.timeout,
|
|
777
|
-
onTimeout:
|
|
783
|
+
onTimeout: o
|
|
778
784
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
779
785
|
]));
|
|
780
786
|
}
|
|
781
787
|
}), kt = /* @__PURE__ */ oe(bt, [["__scopeId", "data-v-8fd5d800"]]), Ct = /* @__PURE__ */ E({
|
|
782
788
|
__name: "index",
|
|
783
789
|
setup(e) {
|
|
784
|
-
const { t } = P(), a = f(""),
|
|
790
|
+
const { t } = P(), a = f(""), o = f(""), n = f(""), l = f(""), c = f(), r = f(""), u = f(""), _ = f(""), g = f(""), v = f(""), L = Se("target");
|
|
785
791
|
let k = 0, i = !1;
|
|
786
|
-
const D = async (
|
|
787
|
-
var
|
|
788
|
-
const d =
|
|
789
|
-
a.value = d.title,
|
|
790
|
-
}, { open:
|
|
791
|
-
|
|
792
|
+
const D = async (M) => {
|
|
793
|
+
var j, K, z, B;
|
|
794
|
+
const d = M;
|
|
795
|
+
a.value = d.title, o.value = d.text, n.value = d.label, l.value = d.placeholder, c.value = d.rules, r.value = d.value, u.value = ((j = d.cancel) == null ? void 0 : j.color) ?? "primary", _.value = ((K = d.cancel) == null ? void 0 : K.text) ?? t("dlg.common.cancel"), g.value = ((z = d.confirm) == null ? void 0 : z.color) ?? "primary", v.value = ((B = d.confirm) == null ? void 0 : B.text) ?? t("dlg.common.confirm"), k = d.seq, i = !1, p.value = !0, await te(() => !!L.value), L.value.focus();
|
|
796
|
+
}, { open: p } = ae("promptDlg", D), x = () => {
|
|
797
|
+
p.value = !1, i || (s.emit("promptDlgResult" + k, r.value ?? ""), i = !0);
|
|
792
798
|
};
|
|
793
|
-
return N(
|
|
794
|
-
!
|
|
795
|
-
}), (
|
|
796
|
-
const
|
|
797
|
-
return C(),
|
|
798
|
-
modelValue:
|
|
799
|
-
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(
|
|
799
|
+
return N(p, (M) => {
|
|
800
|
+
!M && !i && (s.emit("promptDlgResult" + k, void 0), i = !0);
|
|
801
|
+
}), (M, d) => {
|
|
802
|
+
const j = h("v-card-text"), K = h("v-text-field"), z = h("v-form"), B = h("v-btn"), he = h("v-card-actions"), we = h("v-card"), ye = h("v-dialog");
|
|
803
|
+
return C(), q(ye, {
|
|
804
|
+
modelValue: H(p),
|
|
805
|
+
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(p) ? p.value = U : null),
|
|
800
806
|
transition: "dialog-top-transition",
|
|
801
807
|
"max-width": "600px",
|
|
802
808
|
onKeydown: [
|
|
803
|
-
d[3] || (d[3] = F(
|
|
804
|
-
F(
|
|
809
|
+
d[3] || (d[3] = F($((U) => p.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
810
|
+
F($(x, ["stop", "prevent"]), ["enter"])
|
|
805
811
|
]
|
|
806
812
|
}, {
|
|
807
813
|
default: w(() => [
|
|
808
814
|
b(we, { title: a.value }, {
|
|
809
815
|
default: w(() => [
|
|
810
|
-
|
|
816
|
+
o.value ? (C(), q(j, { key: 0 }, {
|
|
811
817
|
default: w(() => [
|
|
812
|
-
|
|
818
|
+
V(R(o.value), 1)
|
|
813
819
|
]),
|
|
814
820
|
_: 1
|
|
815
821
|
})) : ce("", !0),
|
|
@@ -818,11 +824,11 @@ const yt = /* @__PURE__ */ E({
|
|
|
818
824
|
b(K, {
|
|
819
825
|
ref_key: "target",
|
|
820
826
|
ref: L,
|
|
821
|
-
modelValue:
|
|
822
|
-
"onUpdate:modelValue": d[0] || (d[0] = (U) =>
|
|
823
|
-
label:
|
|
827
|
+
modelValue: r.value,
|
|
828
|
+
"onUpdate:modelValue": d[0] || (d[0] = (U) => r.value = U),
|
|
829
|
+
label: n.value,
|
|
824
830
|
placeholder: l.value,
|
|
825
|
-
rules:
|
|
831
|
+
rules: c.value
|
|
826
832
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
827
833
|
]),
|
|
828
834
|
_: 1
|
|
@@ -832,10 +838,10 @@ const yt = /* @__PURE__ */ E({
|
|
|
832
838
|
b(B, {
|
|
833
839
|
color: u.value,
|
|
834
840
|
variant: "text",
|
|
835
|
-
onClick: d[1] || (d[1] = (U) =>
|
|
841
|
+
onClick: d[1] || (d[1] = (U) => p.value = !1)
|
|
836
842
|
}, {
|
|
837
843
|
default: w(() => [
|
|
838
|
-
|
|
844
|
+
V(R(_.value), 1)
|
|
839
845
|
]),
|
|
840
846
|
_: 1
|
|
841
847
|
}, 8, ["color"]),
|
|
@@ -845,7 +851,7 @@ const yt = /* @__PURE__ */ E({
|
|
|
845
851
|
onClick: x
|
|
846
852
|
}, {
|
|
847
853
|
default: w(() => [
|
|
848
|
-
|
|
854
|
+
V(R(v.value), 1)
|
|
849
855
|
]),
|
|
850
856
|
_: 1
|
|
851
857
|
}, 8, ["color"])
|
|
@@ -860,24 +866,24 @@ const yt = /* @__PURE__ */ E({
|
|
|
860
866
|
}, 8, ["modelValue", "onKeydown"]);
|
|
861
867
|
};
|
|
862
868
|
}
|
|
863
|
-
}), Lt = { class: "mx-auto my-auto" }, Dt = { class: "w-100 h-100 d-flex align-center justify-center" },
|
|
869
|
+
}), Lt = { class: "mx-auto my-auto" }, Dt = { class: "w-100 h-100 d-flex align-center justify-center" }, Mt = { class: "text-body-1" }, St = /* @__PURE__ */ E({
|
|
864
870
|
__name: "index",
|
|
865
871
|
setup(e) {
|
|
866
|
-
const { t } = P(), a = f(""),
|
|
867
|
-
const
|
|
868
|
-
a.value =
|
|
869
|
-
},
|
|
872
|
+
const { t } = P(), a = f(""), o = (c) => {
|
|
873
|
+
const r = c;
|
|
874
|
+
a.value = r.text ?? t("dlg.common.waiting"), l.value = !0;
|
|
875
|
+
}, n = () => {
|
|
870
876
|
l.value = !1;
|
|
871
|
-
}, { open: l } = ae("waitDlg",
|
|
877
|
+
}, { open: l } = ae("waitDlg", o);
|
|
872
878
|
return T(() => {
|
|
873
|
-
|
|
879
|
+
s.on("closeWaitDlg", n);
|
|
874
880
|
}), W(() => {
|
|
875
|
-
|
|
876
|
-
}), (
|
|
881
|
+
s.off("closeWaitDlg", n);
|
|
882
|
+
}), (c, r) => {
|
|
877
883
|
const u = h("v-card"), _ = h("v-dialog");
|
|
878
|
-
return C(),
|
|
879
|
-
modelValue:
|
|
880
|
-
"onUpdate:modelValue":
|
|
884
|
+
return C(), q(_, {
|
|
885
|
+
modelValue: H(l),
|
|
886
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => Y(l) ? l.value = g : null),
|
|
881
887
|
persistent: "",
|
|
882
888
|
"no-click-animation": "",
|
|
883
889
|
fullscreen: ""
|
|
@@ -891,7 +897,7 @@ const yt = /* @__PURE__ */ E({
|
|
|
891
897
|
}, {
|
|
892
898
|
default: w(() => [
|
|
893
899
|
m("div", Dt, [
|
|
894
|
-
m("span",
|
|
900
|
+
m("span", Mt, R(a.value), 1)
|
|
895
901
|
])
|
|
896
902
|
]),
|
|
897
903
|
_: 1
|
|
@@ -902,11 +908,11 @@ const yt = /* @__PURE__ */ E({
|
|
|
902
908
|
}, 8, ["modelValue"]);
|
|
903
909
|
};
|
|
904
910
|
}
|
|
905
|
-
}),
|
|
906
|
-
e.component("XConfirmDlg", it), e.component("XLoading", ft), e.component("XMessage", kt), e.component("XPromptDlg", Ct), e.component("XWaitDlg",
|
|
907
|
-
},
|
|
908
|
-
const
|
|
909
|
-
return
|
|
911
|
+
}), jt = (e) => {
|
|
912
|
+
e.component("XConfirmDlg", it), e.component("XLoading", ft), e.component("XMessage", kt), e.component("XPromptDlg", Ct), e.component("XWaitDlg", St);
|
|
913
|
+
}, Rt = (e, t, a) => {
|
|
914
|
+
const o = e[t];
|
|
915
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((n, l) => {
|
|
910
916
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
911
917
|
l.bind(
|
|
912
918
|
null,
|
|
@@ -917,53 +923,54 @@ const yt = /* @__PURE__ */ E({
|
|
|
917
923
|
);
|
|
918
924
|
});
|
|
919
925
|
};
|
|
920
|
-
async function
|
|
921
|
-
return (await
|
|
926
|
+
async function oa(e) {
|
|
927
|
+
return (await Rt(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en-iuzmkt0n.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans-m6y1by9n.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
922
928
|
}
|
|
923
|
-
const
|
|
929
|
+
const na = { install: jt };
|
|
924
930
|
export {
|
|
925
|
-
|
|
931
|
+
$e as Permission,
|
|
926
932
|
tt as addView,
|
|
927
933
|
Ue as appAppear,
|
|
928
|
-
|
|
929
|
-
|
|
934
|
+
Pt as clearViews,
|
|
935
|
+
Ht as closeWaitDlg,
|
|
930
936
|
Et as createAxios,
|
|
931
|
-
|
|
937
|
+
na as default,
|
|
932
938
|
at as delView,
|
|
933
|
-
|
|
939
|
+
s as eventBus,
|
|
934
940
|
me as hasView,
|
|
935
941
|
Zt as injectDark,
|
|
936
|
-
|
|
942
|
+
Qt as injectLastAppPath,
|
|
937
943
|
Nt as injectLocale,
|
|
938
944
|
Gt as injectPermissionChecksum,
|
|
939
|
-
|
|
945
|
+
Fe as injectPermissionObjects,
|
|
940
946
|
Qe as injectViews,
|
|
941
947
|
et as isEmpty,
|
|
942
948
|
re as isExist,
|
|
943
|
-
|
|
944
|
-
|
|
949
|
+
Yt as lastView,
|
|
950
|
+
oa as loadLocaleMessageEssential,
|
|
945
951
|
Z as matchRouteMeta,
|
|
946
952
|
Kt as messageError,
|
|
947
953
|
zt as messageInfo,
|
|
948
954
|
Xt as messageSuccess,
|
|
949
955
|
Ft as messageWarning,
|
|
950
|
-
|
|
956
|
+
Jt as onBeforeEach,
|
|
951
957
|
Ut as openConfirmDlg,
|
|
952
958
|
Wt as openPromptDlg,
|
|
953
|
-
|
|
959
|
+
$t as openWaitDlg,
|
|
954
960
|
ot as popView,
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
961
|
+
Ke as provideDark,
|
|
962
|
+
Ne as provideLastAppPath,
|
|
963
|
+
ze as provideLocale,
|
|
964
|
+
Ze as providePermissionChecksum,
|
|
965
|
+
Xe as providePermissionObjects,
|
|
960
966
|
Ge as provideViews,
|
|
961
967
|
G as routeTransName,
|
|
962
968
|
Tt as useColor,
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
969
|
+
ea as useMicroApp,
|
|
970
|
+
ta as usePermission,
|
|
971
|
+
aa as useSystem,
|
|
966
972
|
ae as useViewStack,
|
|
973
|
+
He as verifyPermission,
|
|
967
974
|
Bt as waitMs,
|
|
968
975
|
te as waitUtil
|
|
969
976
|
};
|
|
@@ -130,4 +130,5 @@ export type PermissionObjects = {
|
|
|
130
130
|
[key: string]: PermissionObject;
|
|
131
131
|
};
|
|
132
132
|
export declare function isExist(instanceTree: InstanceTree | undefined, instance: string): boolean;
|
|
133
|
+
export declare function verifyPermission(permissionObjects: PermissionObjects, permission: Permission, instance: string): boolean;
|
|
133
134
|
export {};
|
package/dist/utils/router.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ interface RouteMeta {
|
|
|
8
8
|
}
|
|
9
9
|
export declare function matchRouteMeta(path: string): RouteMeta | undefined;
|
|
10
10
|
export declare const routeTransName: import("vue").Ref<string, string>;
|
|
11
|
-
export declare function onBeforeEach(to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext): void;
|
|
11
|
+
export declare function onBeforeEach(to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext, lastAppPath: string): void;
|
|
12
12
|
export {};
|