x-essential-lib 0.7.9 → 0.7.11
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/components/loading/index.vue.d.ts +1 -3
- package/dist/index.js +300 -293
- package/dist/utils/permission.d.ts +1 -0
- package/package.json +3 -5
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
zIndex?: number;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
5
|
-
zIndex: number;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
5
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import { computed as y, provide as O, inject as I, ref as f, getCurrentScope as xe, onScopeDispose as be, unref as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.x-cont[data-v-44b1d3e4]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-44b1d3e4]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-44b1d3e4]{transform-origin:20px 20px;animation:lds-spinner-44b1d3e4 1.2s linear infinite}.lds-spinner div[data-v-44b1d3e4]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-44b1d3e4]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-44b1d3e4]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-44b1d3e4]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-44b1d3e4]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-44b1d3e4]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-44b1d3e4]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-44b1d3e4]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-44b1d3e4]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-44b1d3e4]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-44b1d3e4]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-44b1d3e4]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-44b1d3e4]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-44b1d3e4{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(t)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
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 re, createElementVNode as m, createCommentVNode as le, Fragment as De, renderList as Me, useTemplateRef as Se } from "vue";
|
|
3
3
|
import { useI18n as P } from "vue-i18n";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as ce, useDisplay as je } from "vuetify";
|
|
5
5
|
import { useRouter as ue, useRoute as Re } from "vue-router";
|
|
6
6
|
import qe from "axios";
|
|
7
|
-
function
|
|
8
|
-
const e =
|
|
7
|
+
function Tt() {
|
|
8
|
+
const e = ce(), 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
15
|
highlightColor: c,
|
|
16
16
|
borderColor: r
|
|
@@ -20,8 +20,8 @@ function It() {
|
|
|
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
|
}
|
|
@@ -37,47 +37,47 @@ var Ve = {
|
|
|
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
|
-
c = X({}, t, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()),
|
|
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
43
|
var r = "";
|
|
44
44
|
for (var u in c)
|
|
45
45
|
c[u] && (r += "; " + u, c[u] !== !0 && (r += "=" + c[u].split(";")[0]));
|
|
46
|
-
return document.cookie =
|
|
46
|
+
return document.cookie = n + "=" + e.write(l, n) + r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function n
|
|
50
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
49
|
+
function o(n) {
|
|
50
|
+
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
51
51
|
for (var l = document.cookie ? document.cookie.split("; ") : [], c = {}, r = 0; r < l.length; r++) {
|
|
52
52
|
var u = l[r].split("="), _ = u.slice(1).join("=");
|
|
53
53
|
try {
|
|
54
54
|
var g = decodeURIComponent(u[0]);
|
|
55
|
-
if (c[g] = e.read(_, g),
|
|
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
|
{
|
|
@@ -87,7 +87,7 @@ function J(e, t) {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
var A = J(Ve, { path: "/" });
|
|
90
|
-
function
|
|
90
|
+
function Et(e) {
|
|
91
91
|
const t = qe.create({
|
|
92
92
|
timeout: 6e3
|
|
93
93
|
});
|
|
@@ -112,11 +112,11 @@ 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() {
|
|
@@ -124,33 +124,33 @@ function Ee() {
|
|
|
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
|
-
async function
|
|
144
|
+
async function Bt(e) {
|
|
145
145
|
return new Promise((t) => {
|
|
146
146
|
setTimeout(t, e);
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
150
|
-
const
|
|
151
|
-
return new Promise((
|
|
149
|
+
async function ee(e, t, a) {
|
|
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
|
});
|
|
@@ -161,103 +161,107 @@ function Ue(e, t) {
|
|
|
161
161
|
a.classList.add("app-reset");
|
|
162
162
|
}, 50));
|
|
163
163
|
}
|
|
164
|
-
let
|
|
165
|
-
function
|
|
164
|
+
let oe = Date.now();
|
|
165
|
+
function se() {
|
|
166
166
|
const e = Date.now();
|
|
167
|
-
return e -
|
|
167
|
+
return e - oe > 500 ? (oe = e, !0) : !1;
|
|
168
168
|
}
|
|
169
169
|
let We = 0;
|
|
170
|
-
function
|
|
170
|
+
function pe() {
|
|
171
171
|
return ++We;
|
|
172
172
|
}
|
|
173
|
-
async function
|
|
174
|
-
if (!
|
|
173
|
+
async function Ut(e) {
|
|
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 ee(() => t), s.off("confirmDlgResult" + n, o), a;
|
|
181
181
|
}
|
|
182
|
-
async function
|
|
183
|
-
if (!
|
|
182
|
+
async function Wt(e) {
|
|
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 ee(() => 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
194
|
function Ht() {
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
function $t(e, t) {
|
|
198
|
-
p.emit("message", { type: "error", text: e, timeout: t });
|
|
195
|
+
s.emit("closeWaitDlg");
|
|
199
196
|
}
|
|
200
197
|
function Kt(e, t) {
|
|
201
|
-
|
|
198
|
+
s.emit("message", { type: "error", text: e, timeout: t });
|
|
202
199
|
}
|
|
203
200
|
function zt(e, t) {
|
|
204
|
-
|
|
201
|
+
s.emit("message", { type: "info", text: e, timeout: t });
|
|
205
202
|
}
|
|
206
203
|
function Xt(e, t) {
|
|
207
|
-
|
|
204
|
+
s.emit("message", { type: "success", text: e, timeout: t });
|
|
208
205
|
}
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
function Ft(e, t) {
|
|
207
|
+
s.emit("message", { type: "warning", text: e, timeout: t });
|
|
208
|
+
}
|
|
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
|
+
function ne(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 ? !(!ne(o.includes, a) || ne(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
|
-
function
|
|
231
|
+
function Zt() {
|
|
228
232
|
return I(_e);
|
|
229
233
|
}
|
|
230
|
-
function
|
|
234
|
+
function ze(e) {
|
|
231
235
|
O(ie, e);
|
|
232
236
|
}
|
|
233
|
-
function
|
|
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
|
-
function
|
|
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
|
-
function
|
|
258
|
+
function Ge(e) {
|
|
255
259
|
O(ve, e);
|
|
256
260
|
}
|
|
257
|
-
function
|
|
261
|
+
function Qe() {
|
|
258
262
|
return I(ve);
|
|
259
263
|
}
|
|
260
|
-
const
|
|
264
|
+
const Je = [
|
|
261
265
|
{
|
|
262
266
|
app: "x-passport-mf",
|
|
263
267
|
path: "/passport/login",
|
|
@@ -367,158 +371,158 @@ const Qe = [
|
|
|
367
371
|
];
|
|
368
372
|
function Z(e) {
|
|
369
373
|
let t, a = 0;
|
|
370
|
-
const
|
|
371
|
-
return
|
|
372
|
-
const l =
|
|
374
|
+
const o = e.split("/").filter((n) => n.trim() !== "");
|
|
375
|
+
return Je.forEach((n) => {
|
|
376
|
+
const l = n.path.split("/").filter((r) => r.trim() !== "");
|
|
373
377
|
let c = 0;
|
|
374
|
-
for (let r = 0; r <
|
|
378
|
+
for (let r = 0; r < o.length && !(r >= l.length || o[r] !== l[r]); r++)
|
|
375
379
|
c++;
|
|
376
|
-
c > 0 && c > a && (t =
|
|
380
|
+
c > 0 && c > a && (t = n, a = c);
|
|
377
381
|
}), t;
|
|
378
382
|
}
|
|
379
383
|
const G = f("");
|
|
380
384
|
function S(e, t, a) {
|
|
381
385
|
t === "/" && (t = a);
|
|
382
|
-
const
|
|
383
|
-
if (!
|
|
386
|
+
const o = Z(e), n = Z(t);
|
|
387
|
+
if (!o) {
|
|
384
388
|
console.assert(!1);
|
|
385
389
|
return;
|
|
386
390
|
}
|
|
387
|
-
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !
|
|
391
|
+
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !n)
|
|
388
392
|
return;
|
|
389
|
-
const l =
|
|
390
|
-
l ? c ? G.value = "" : G.value = r ? "inner-left" : "inner-right" : (G.value = "", Ue(
|
|
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));
|
|
391
395
|
}
|
|
392
|
-
function
|
|
396
|
+
function Ye() {
|
|
393
397
|
return !!A.get("accessToken");
|
|
394
398
|
}
|
|
395
|
-
function
|
|
399
|
+
function Pe() {
|
|
396
400
|
return !!A.get("activeOrg");
|
|
397
401
|
}
|
|
398
|
-
function
|
|
399
|
-
const
|
|
402
|
+
function Jt(e, t, a, o) {
|
|
403
|
+
const n = Ye(), l = Pe(), c = Z(e.path);
|
|
400
404
|
if (!c) {
|
|
401
405
|
console.assert(!1), a();
|
|
402
406
|
return;
|
|
403
407
|
}
|
|
404
408
|
if (c.requiredState === "auth")
|
|
405
|
-
if (
|
|
409
|
+
if (n)
|
|
406
410
|
if (l) {
|
|
407
411
|
const r = "/main";
|
|
408
|
-
S(r, t.path,
|
|
412
|
+
S(r, t.path, o), a({ path: r });
|
|
409
413
|
} else
|
|
410
|
-
S(e.path, t.path,
|
|
414
|
+
S(e.path, t.path, o), a();
|
|
411
415
|
else {
|
|
412
416
|
const r = "/passport/login";
|
|
413
|
-
S(r, t.path,
|
|
417
|
+
S(r, t.path, o), a({ path: r });
|
|
414
418
|
}
|
|
415
419
|
else if (c.requiredState === "org")
|
|
416
|
-
if (
|
|
420
|
+
if (n)
|
|
417
421
|
if (l)
|
|
418
|
-
S(e.path, t.path,
|
|
422
|
+
S(e.path, t.path, o), a();
|
|
419
423
|
else {
|
|
420
424
|
const r = "/org/joinOrCreate";
|
|
421
|
-
S(r, t.path,
|
|
425
|
+
S(r, t.path, o), a({ path: r });
|
|
422
426
|
}
|
|
423
427
|
else {
|
|
424
428
|
const r = "/passport/login";
|
|
425
|
-
S(r, t.path,
|
|
429
|
+
S(r, t.path, o), a({ path: r });
|
|
426
430
|
}
|
|
427
|
-
else if (
|
|
431
|
+
else if (n)
|
|
428
432
|
if (l) {
|
|
429
433
|
const r = "/main";
|
|
430
|
-
S(r, t.path,
|
|
434
|
+
S(r, t.path, o), a({ path: r });
|
|
431
435
|
} else {
|
|
432
436
|
const r = "/org/joinOrCreate";
|
|
433
|
-
S(r, t.path,
|
|
437
|
+
S(r, t.path, o), a({ path: r });
|
|
434
438
|
}
|
|
435
439
|
else
|
|
436
|
-
S(e.path, t.path,
|
|
440
|
+
S(e.path, t.path, o), a();
|
|
437
441
|
}
|
|
438
|
-
function
|
|
442
|
+
function et(e) {
|
|
439
443
|
return e.value.length <= 0;
|
|
440
444
|
}
|
|
441
|
-
function
|
|
445
|
+
function Yt(e) {
|
|
442
446
|
return e.value.at(-1);
|
|
443
447
|
}
|
|
444
448
|
function me(e, t) {
|
|
445
449
|
return !!e.value.find((a) => a === t);
|
|
446
450
|
}
|
|
447
|
-
function
|
|
448
|
-
const a = e.value.findIndex((
|
|
451
|
+
function tt(e, t) {
|
|
452
|
+
const a = e.value.findIndex((o) => o === t);
|
|
449
453
|
a >= 0 && e.value.splice(a, 1), e.value.push(t);
|
|
450
454
|
}
|
|
451
|
-
function
|
|
452
|
-
const a = e.value.findIndex((
|
|
455
|
+
function at(e, t) {
|
|
456
|
+
const a = e.value.findIndex((o) => o === t);
|
|
453
457
|
a >= 0 && e.value.splice(a, 1);
|
|
454
458
|
}
|
|
455
|
-
function
|
|
459
|
+
function ot(e) {
|
|
456
460
|
console.assert(e.value.length > 0), e.value.pop();
|
|
457
461
|
}
|
|
458
|
-
function
|
|
462
|
+
function Pt(e) {
|
|
459
463
|
e.value = [];
|
|
460
464
|
}
|
|
461
|
-
function
|
|
465
|
+
function nt(e) {
|
|
462
466
|
return xe() ? (be(e), !0) : !1;
|
|
463
467
|
}
|
|
464
|
-
function
|
|
465
|
-
return typeof e == "function" ? e() :
|
|
468
|
+
function rt(e) {
|
|
469
|
+
return typeof e == "function" ? e() : H(e);
|
|
466
470
|
}
|
|
467
|
-
const
|
|
471
|
+
const lt = typeof window < "u" && typeof document < "u";
|
|
468
472
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
469
|
-
const
|
|
470
|
-
function
|
|
473
|
+
const ct = lt ? window : void 0;
|
|
474
|
+
function ut() {
|
|
471
475
|
const e = f(!1), t = Ce();
|
|
472
476
|
return t && T(() => {
|
|
473
477
|
e.value = !0;
|
|
474
478
|
}, t), e;
|
|
475
479
|
}
|
|
476
|
-
function
|
|
477
|
-
const t =
|
|
480
|
+
function st(e) {
|
|
481
|
+
const t = ut();
|
|
478
482
|
return y(() => (t.value, !!e()));
|
|
479
483
|
}
|
|
480
484
|
function pt(e, t = {}) {
|
|
481
|
-
const { window: a =
|
|
482
|
-
let
|
|
485
|
+
const { window: a = ct } = t, o = st(() => a && "matchMedia" in a && typeof a.matchMedia == "function");
|
|
486
|
+
let n;
|
|
483
487
|
const l = f(!1), c = (_) => {
|
|
484
488
|
l.value = _.matches;
|
|
485
489
|
}, r = () => {
|
|
486
|
-
|
|
490
|
+
n && ("removeEventListener" in n ? n.removeEventListener("change", c) : n.removeListener(c));
|
|
487
491
|
}, u = ke(() => {
|
|
488
|
-
|
|
492
|
+
o.value && (r(), n = a.matchMedia(rt(e)), "addEventListener" in n ? n.addEventListener("change", c) : n.addListener(c), l.value = n.matches);
|
|
489
493
|
});
|
|
490
|
-
return
|
|
491
|
-
u(), r(),
|
|
494
|
+
return nt(() => {
|
|
495
|
+
u(), r(), n = void 0;
|
|
492
496
|
}), l;
|
|
493
497
|
}
|
|
494
|
-
function
|
|
498
|
+
function _t(e) {
|
|
495
499
|
return pt("(prefers-color-scheme: dark)", e);
|
|
496
500
|
}
|
|
497
|
-
function
|
|
501
|
+
function ea(e, t, a, o, n, l) {
|
|
498
502
|
const c = Re(), r = ue();
|
|
499
|
-
|
|
500
|
-
const u =
|
|
503
|
+
Ke(e), ze(t), Xe(a), Ze(o), Ne(n), Ge(l);
|
|
504
|
+
const u = ce(), _ = _t();
|
|
501
505
|
N(
|
|
502
506
|
e,
|
|
503
507
|
() => {
|
|
504
|
-
let
|
|
505
|
-
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";
|
|
506
510
|
},
|
|
507
511
|
{ immediate: !0 }
|
|
508
512
|
);
|
|
509
|
-
const g = (
|
|
510
|
-
if (
|
|
513
|
+
const g = (p) => {
|
|
514
|
+
if (p.key === "Escape") {
|
|
511
515
|
v();
|
|
512
516
|
return;
|
|
513
517
|
}
|
|
514
518
|
}, v = () => {
|
|
515
519
|
var x;
|
|
516
|
-
if (!
|
|
517
|
-
me(l, "waitDlg") ||
|
|
520
|
+
if (!et(l)) {
|
|
521
|
+
me(l, "waitDlg") || ot(l);
|
|
518
522
|
return;
|
|
519
523
|
}
|
|
520
|
-
const
|
|
521
|
-
(
|
|
524
|
+
const p = Z(c.path);
|
|
525
|
+
(p == null ? void 0 : p.level) === 0 ? (x = navigator == null ? void 0 : navigator.Backbutton) == null || x.goHome(
|
|
522
526
|
() => {
|
|
523
527
|
},
|
|
524
528
|
() => {
|
|
@@ -526,79 +530,82 @@ function Pt(e, t, a, n, o, l) {
|
|
|
526
530
|
) : r.back();
|
|
527
531
|
};
|
|
528
532
|
T(() => {
|
|
529
|
-
window.addEventListener("keydown", g),
|
|
533
|
+
window.addEventListener("keydown", g), s.on("backbutton", v);
|
|
530
534
|
}), W(() => {
|
|
531
|
-
window.removeEventListener("keydown", g),
|
|
535
|
+
window.removeEventListener("keydown", g), s.off("backbutton", v);
|
|
532
536
|
});
|
|
533
|
-
const L = (
|
|
534
|
-
e.value =
|
|
535
|
-
}, k = (
|
|
536
|
-
t.value =
|
|
537
|
-
}, i = (
|
|
538
|
-
const x =
|
|
539
|
-
a.value = x[0],
|
|
540
|
-
}, D = (
|
|
541
|
-
|
|
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;
|
|
542
546
|
};
|
|
543
547
|
Le(() => {
|
|
544
|
-
|
|
548
|
+
s.on("updateDark", L), s.on("updateLocale", k), s.on("updatePermission", i), s.on("updateLastAppPath", D), s.emit("syncGlobalState");
|
|
545
549
|
}), W(() => {
|
|
546
|
-
|
|
550
|
+
s.off("updateDark", L), s.off("updateLocale", k), s.off("updatePermission", i), s.off("updateLastAppPath", D);
|
|
547
551
|
});
|
|
548
552
|
}
|
|
549
|
-
function
|
|
550
|
-
const e =
|
|
551
|
-
function t(a,
|
|
552
|
-
|
|
553
|
-
|
|
553
|
+
function ta() {
|
|
554
|
+
const e = Fe();
|
|
555
|
+
function t(a, o) {
|
|
556
|
+
return He(
|
|
557
|
+
e.value,
|
|
558
|
+
a,
|
|
559
|
+
o
|
|
560
|
+
);
|
|
554
561
|
}
|
|
555
562
|
return { verifyPermission: t };
|
|
556
563
|
}
|
|
557
|
-
function
|
|
564
|
+
function aa() {
|
|
558
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");
|
|
559
566
|
return { sysBarAvail: e, compactWidth: a };
|
|
560
567
|
}
|
|
561
|
-
function
|
|
562
|
-
const a =
|
|
568
|
+
function te(e, t) {
|
|
569
|
+
const a = Qe(), o = y({
|
|
563
570
|
get() {
|
|
564
571
|
return me(a, e);
|
|
565
572
|
},
|
|
566
573
|
set(l) {
|
|
567
|
-
l ?
|
|
574
|
+
l ? tt(a, e) : at(a, e);
|
|
568
575
|
}
|
|
569
|
-
}),
|
|
570
|
-
t == null || t(l),
|
|
576
|
+
}), n = (l) => {
|
|
577
|
+
t == null || t(l), o.value = !0;
|
|
571
578
|
};
|
|
572
579
|
return T(() => {
|
|
573
|
-
|
|
580
|
+
s.on(e, n);
|
|
574
581
|
}), W(() => {
|
|
575
|
-
|
|
576
|
-
}), { open:
|
|
582
|
+
s.off(e, n);
|
|
583
|
+
}), { open: o };
|
|
577
584
|
}
|
|
578
|
-
const
|
|
585
|
+
const it = /* @__PURE__ */ E({
|
|
579
586
|
__name: "index",
|
|
580
587
|
setup(e) {
|
|
581
|
-
const { t } = P(), a = f(""),
|
|
588
|
+
const { t } = P(), a = f(""), o = f(""), n = f(""), l = f(""), c = f(""), r = f("");
|
|
582
589
|
let u = 0, _ = !1;
|
|
583
590
|
const g = (k) => {
|
|
584
|
-
var D,
|
|
591
|
+
var D, p, x, M;
|
|
585
592
|
const i = k;
|
|
586
|
-
a.value = i.title,
|
|
587
|
-
}, { open: v } =
|
|
588
|
-
v.value = !1, _ || (
|
|
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;
|
|
594
|
+
}, { open: v } = te("confirmDlg", g), L = () => {
|
|
595
|
+
v.value = !1, _ || (s.emit("confirmDlgResult" + u, !0), _ = !0);
|
|
589
596
|
};
|
|
590
597
|
return N(v, (k) => {
|
|
591
|
-
!k && !_ && (
|
|
598
|
+
!k && !_ && (s.emit("confirmDlgResult" + u, !1), _ = !0);
|
|
592
599
|
}), (k, i) => {
|
|
593
|
-
const D = h("v-card-text"),
|
|
600
|
+
const D = h("v-card-text"), p = h("v-btn"), x = h("v-card-actions"), M = h("v-card"), d = h("v-dialog");
|
|
594
601
|
return C(), q(d, {
|
|
595
|
-
modelValue:
|
|
602
|
+
modelValue: H(v),
|
|
596
603
|
"onUpdate:modelValue": i[1] || (i[1] = (j) => Y(v) ? v.value = j : null),
|
|
597
604
|
transition: "dialog-top-transition",
|
|
598
605
|
"max-width": "600px",
|
|
599
606
|
onKeydown: [
|
|
600
|
-
i[2] || (i[2] = F(
|
|
601
|
-
F(
|
|
607
|
+
i[2] || (i[2] = F($((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
608
|
+
F($(L, ["stop", "prevent"]), ["enter"])
|
|
602
609
|
]
|
|
603
610
|
}, {
|
|
604
611
|
default: w(() => [
|
|
@@ -606,14 +613,14 @@ const _t = /* @__PURE__ */ E({
|
|
|
606
613
|
default: w(() => [
|
|
607
614
|
b(D, null, {
|
|
608
615
|
default: w(() => [
|
|
609
|
-
V(R(
|
|
616
|
+
V(R(o.value), 1)
|
|
610
617
|
]),
|
|
611
618
|
_: 1
|
|
612
619
|
}),
|
|
613
620
|
b(x, { class: "d-flex justify-end" }, {
|
|
614
621
|
default: w(() => [
|
|
615
|
-
b(
|
|
616
|
-
color:
|
|
622
|
+
b(p, {
|
|
623
|
+
color: n.value,
|
|
617
624
|
variant: "text",
|
|
618
625
|
onClick: i[0] || (i[0] = (j) => v.value = !1)
|
|
619
626
|
}, {
|
|
@@ -622,7 +629,7 @@ const _t = /* @__PURE__ */ E({
|
|
|
622
629
|
]),
|
|
623
630
|
_: 1
|
|
624
631
|
}, 8, ["color"]),
|
|
625
|
-
b(
|
|
632
|
+
b(p, {
|
|
626
633
|
color: c.value,
|
|
627
634
|
variant: "text",
|
|
628
635
|
onClick: L
|
|
@@ -643,20 +650,19 @@ const _t = /* @__PURE__ */ E({
|
|
|
643
650
|
}, 8, ["modelValue", "onKeydown"]);
|
|
644
651
|
};
|
|
645
652
|
}
|
|
646
|
-
}),
|
|
653
|
+
}), dt = /* @__PURE__ */ E({
|
|
647
654
|
__name: "index",
|
|
648
655
|
props: {
|
|
649
656
|
zIndex: { default: 1 }
|
|
650
657
|
},
|
|
651
658
|
setup(e) {
|
|
652
|
-
const t =
|
|
653
|
-
|
|
654
|
-
zIndex: a.zIndex
|
|
659
|
+
const t = y(() => ({
|
|
660
|
+
zIndex: e.zIndex
|
|
655
661
|
}));
|
|
656
|
-
return (
|
|
662
|
+
return (a, o) => (C(), Q("div", {
|
|
657
663
|
class: "x-cont",
|
|
658
|
-
style:
|
|
659
|
-
},
|
|
664
|
+
style: re(t.value)
|
|
665
|
+
}, o[0] || (o[0] = [
|
|
660
666
|
m("div", { class: "lds-spinner" }, [
|
|
661
667
|
m("div"),
|
|
662
668
|
m("div"),
|
|
@@ -673,14 +679,14 @@ const _t = /* @__PURE__ */ E({
|
|
|
673
679
|
], -1)
|
|
674
680
|
]), 4));
|
|
675
681
|
}
|
|
676
|
-
}),
|
|
682
|
+
}), ae = (e, t) => {
|
|
677
683
|
const a = e.__vccOpts || e;
|
|
678
|
-
for (const [
|
|
679
|
-
a[
|
|
684
|
+
for (const [o, n] of t)
|
|
685
|
+
a[o] = n;
|
|
680
686
|
return a;
|
|
681
|
-
},
|
|
682
|
-
var
|
|
683
|
-
const
|
|
687
|
+
}, ft = /* @__PURE__ */ ae(dt, [["__scopeId", "data-v-44b1d3e4"]]);
|
|
688
|
+
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";
|
|
689
|
+
const yt = /* @__PURE__ */ E({
|
|
684
690
|
__name: "item",
|
|
685
691
|
props: {
|
|
686
692
|
id: {},
|
|
@@ -690,19 +696,19 @@ const wt = /* @__PURE__ */ E({
|
|
|
690
696
|
},
|
|
691
697
|
emits: ["timeout"],
|
|
692
698
|
setup(e, { emit: t }) {
|
|
693
|
-
const a = e,
|
|
699
|
+
const a = e, o = y(() => ({
|
|
694
700
|
width: "calc(100% - 64px)",
|
|
695
701
|
overflowWrap: "break-word"
|
|
696
|
-
})),
|
|
702
|
+
})), n = y(() => {
|
|
697
703
|
switch (a.type) {
|
|
698
704
|
case "success":
|
|
699
|
-
return
|
|
705
|
+
return vt;
|
|
700
706
|
case "info":
|
|
701
|
-
return
|
|
707
|
+
return wt;
|
|
702
708
|
case "error":
|
|
703
|
-
return
|
|
709
|
+
return ht;
|
|
704
710
|
case "warning":
|
|
705
|
-
return
|
|
711
|
+
return gt;
|
|
706
712
|
default:
|
|
707
713
|
return "";
|
|
708
714
|
}
|
|
@@ -721,17 +727,17 @@ const wt = /* @__PURE__ */ E({
|
|
|
721
727
|
elevation: 1
|
|
722
728
|
}, {
|
|
723
729
|
default: w(() => [
|
|
724
|
-
|
|
730
|
+
n.value ? (C(), q(_, {
|
|
725
731
|
key: 0,
|
|
726
732
|
class: "mx-1",
|
|
727
|
-
icon:
|
|
728
|
-
}, null, 8, ["icon"])) :
|
|
733
|
+
icon: n.value
|
|
734
|
+
}, null, 8, ["icon"])) : le("", !0),
|
|
729
735
|
m("div", {
|
|
730
|
-
style:
|
|
736
|
+
style: re(o.value)
|
|
731
737
|
}, R(a.text), 5),
|
|
732
738
|
b(_, {
|
|
733
739
|
class: "mx-1",
|
|
734
|
-
icon:
|
|
740
|
+
icon: H(mt),
|
|
735
741
|
onClick: u[0] || (u[0] = (v) => c("timeout", a.id))
|
|
736
742
|
}, null, 8, ["icon"])
|
|
737
743
|
]),
|
|
@@ -739,24 +745,24 @@ const wt = /* @__PURE__ */ E({
|
|
|
739
745
|
}, 8, ["color"]);
|
|
740
746
|
};
|
|
741
747
|
}
|
|
742
|
-
}),
|
|
748
|
+
}), xt = /* @__PURE__ */ ae(yt, [["__scopeId", "data-v-d5cfe252"]]), bt = /* @__PURE__ */ E({
|
|
743
749
|
__name: "index",
|
|
744
750
|
setup(e) {
|
|
745
751
|
const t = f([]);
|
|
746
752
|
T(() => {
|
|
747
|
-
|
|
753
|
+
s.on("message", a);
|
|
748
754
|
}), W(() => {
|
|
749
|
-
|
|
755
|
+
s.off("message", a);
|
|
750
756
|
});
|
|
751
757
|
const a = (r) => {
|
|
752
758
|
const { type: u, text: _, timeout: g } = r;
|
|
753
759
|
l(u, _, g);
|
|
754
|
-
},
|
|
760
|
+
}, o = (r) => {
|
|
755
761
|
c(r);
|
|
756
762
|
};
|
|
757
|
-
let
|
|
763
|
+
let n = 0;
|
|
758
764
|
const l = (r, u, _) => {
|
|
759
|
-
const g =
|
|
765
|
+
const g = n++;
|
|
760
766
|
t.value.push({ id: g, type: r, text: u, timeout: _ });
|
|
761
767
|
}, c = (r) => {
|
|
762
768
|
const u = t.value.findIndex((_) => _.id === r);
|
|
@@ -764,54 +770,54 @@ const wt = /* @__PURE__ */ E({
|
|
|
764
770
|
};
|
|
765
771
|
return (r, u) => (C(), Q("div", {
|
|
766
772
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
767
|
-
onClick: u[0] || (u[0] =
|
|
773
|
+
onClick: u[0] || (u[0] = $(() => {
|
|
768
774
|
}, ["stop"]))
|
|
769
775
|
}, [
|
|
770
|
-
(C(!0), Q(De, null, Me(t.value, (_) => (C(), q(
|
|
776
|
+
(C(!0), Q(De, null, Me(t.value, (_) => (C(), q(xt, {
|
|
771
777
|
id: _.id,
|
|
772
778
|
key: _.id,
|
|
773
779
|
type: _.type,
|
|
774
780
|
text: _.text,
|
|
775
781
|
timeout: _.timeout,
|
|
776
|
-
onTimeout:
|
|
782
|
+
onTimeout: o
|
|
777
783
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
778
784
|
]));
|
|
779
785
|
}
|
|
780
|
-
}),
|
|
786
|
+
}), kt = /* @__PURE__ */ ae(bt, [["__scopeId", "data-v-8fd5d800"]]), Ct = /* @__PURE__ */ E({
|
|
781
787
|
__name: "index",
|
|
782
788
|
setup(e) {
|
|
783
|
-
const { t } = P(), a = f(""),
|
|
789
|
+
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");
|
|
784
790
|
let k = 0, i = !1;
|
|
785
791
|
const D = async (M) => {
|
|
786
792
|
var j, K, z, B;
|
|
787
793
|
const d = M;
|
|
788
|
-
a.value = d.title,
|
|
789
|
-
}, { open:
|
|
790
|
-
|
|
794
|
+
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 ee(() => !!L.value), L.value.focus();
|
|
795
|
+
}, { open: p } = te("promptDlg", D), x = () => {
|
|
796
|
+
p.value = !1, i || (s.emit("promptDlgResult" + k, r.value ?? ""), i = !0);
|
|
791
797
|
};
|
|
792
|
-
return N(
|
|
793
|
-
!M && !i && (
|
|
798
|
+
return N(p, (M) => {
|
|
799
|
+
!M && !i && (s.emit("promptDlgResult" + k, void 0), i = !0);
|
|
794
800
|
}), (M, d) => {
|
|
795
801
|
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");
|
|
796
802
|
return C(), q(ye, {
|
|
797
|
-
modelValue:
|
|
798
|
-
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(
|
|
803
|
+
modelValue: H(p),
|
|
804
|
+
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(p) ? p.value = U : null),
|
|
799
805
|
transition: "dialog-top-transition",
|
|
800
806
|
"max-width": "600px",
|
|
801
807
|
onKeydown: [
|
|
802
|
-
d[3] || (d[3] = F(
|
|
803
|
-
F(
|
|
808
|
+
d[3] || (d[3] = F($((U) => p.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
809
|
+
F($(x, ["stop", "prevent"]), ["enter"])
|
|
804
810
|
]
|
|
805
811
|
}, {
|
|
806
812
|
default: w(() => [
|
|
807
813
|
b(we, { title: a.value }, {
|
|
808
814
|
default: w(() => [
|
|
809
|
-
|
|
815
|
+
o.value ? (C(), q(j, { key: 0 }, {
|
|
810
816
|
default: w(() => [
|
|
811
|
-
V(R(
|
|
817
|
+
V(R(o.value), 1)
|
|
812
818
|
]),
|
|
813
819
|
_: 1
|
|
814
|
-
})) :
|
|
820
|
+
})) : le("", !0),
|
|
815
821
|
b(z, { class: "mx-3" }, {
|
|
816
822
|
default: w(() => [
|
|
817
823
|
b(K, {
|
|
@@ -819,7 +825,7 @@ const wt = /* @__PURE__ */ E({
|
|
|
819
825
|
ref: L,
|
|
820
826
|
modelValue: r.value,
|
|
821
827
|
"onUpdate:modelValue": d[0] || (d[0] = (U) => r.value = U),
|
|
822
|
-
label:
|
|
828
|
+
label: n.value,
|
|
823
829
|
placeholder: l.value,
|
|
824
830
|
rules: c.value
|
|
825
831
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
@@ -831,7 +837,7 @@ const wt = /* @__PURE__ */ E({
|
|
|
831
837
|
b(B, {
|
|
832
838
|
color: u.value,
|
|
833
839
|
variant: "text",
|
|
834
|
-
onClick: d[1] || (d[1] = (U) =>
|
|
840
|
+
onClick: d[1] || (d[1] = (U) => p.value = !1)
|
|
835
841
|
}, {
|
|
836
842
|
default: w(() => [
|
|
837
843
|
V(R(_.value), 1)
|
|
@@ -859,38 +865,38 @@ const wt = /* @__PURE__ */ E({
|
|
|
859
865
|
}, 8, ["modelValue", "onKeydown"]);
|
|
860
866
|
};
|
|
861
867
|
}
|
|
862
|
-
}),
|
|
868
|
+
}), 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({
|
|
863
869
|
__name: "index",
|
|
864
870
|
setup(e) {
|
|
865
|
-
const { t } = P(), a = f(""),
|
|
871
|
+
const { t } = P(), a = f(""), o = (c) => {
|
|
866
872
|
const r = c;
|
|
867
873
|
a.value = r.text ?? t("dlg.common.waiting"), l.value = !0;
|
|
868
|
-
},
|
|
874
|
+
}, n = () => {
|
|
869
875
|
l.value = !1;
|
|
870
|
-
}, { open: l } =
|
|
876
|
+
}, { open: l } = te("waitDlg", o);
|
|
871
877
|
return T(() => {
|
|
872
|
-
|
|
878
|
+
s.on("closeWaitDlg", n);
|
|
873
879
|
}), W(() => {
|
|
874
|
-
|
|
880
|
+
s.off("closeWaitDlg", n);
|
|
875
881
|
}), (c, r) => {
|
|
876
882
|
const u = h("v-card"), _ = h("v-dialog");
|
|
877
883
|
return C(), q(_, {
|
|
878
|
-
modelValue:
|
|
884
|
+
modelValue: H(l),
|
|
879
885
|
"onUpdate:modelValue": r[0] || (r[0] = (g) => Y(l) ? l.value = g : null),
|
|
880
886
|
persistent: "",
|
|
881
887
|
"no-click-animation": "",
|
|
882
888
|
fullscreen: ""
|
|
883
889
|
}, {
|
|
884
890
|
default: w(() => [
|
|
885
|
-
m("div",
|
|
891
|
+
m("div", Lt, [
|
|
886
892
|
b(u, {
|
|
887
893
|
width: "300px",
|
|
888
894
|
height: "80px",
|
|
889
895
|
loading: ""
|
|
890
896
|
}, {
|
|
891
897
|
default: w(() => [
|
|
892
|
-
m("div",
|
|
893
|
-
m("span",
|
|
898
|
+
m("div", Dt, [
|
|
899
|
+
m("span", Mt, R(a.value), 1)
|
|
894
900
|
])
|
|
895
901
|
]),
|
|
896
902
|
_: 1
|
|
@@ -901,11 +907,11 @@ const wt = /* @__PURE__ */ E({
|
|
|
901
907
|
}, 8, ["modelValue"]);
|
|
902
908
|
};
|
|
903
909
|
}
|
|
904
|
-
}),
|
|
905
|
-
e.component("XConfirmDlg",
|
|
906
|
-
},
|
|
907
|
-
const
|
|
908
|
-
return
|
|
910
|
+
}), jt = (e) => {
|
|
911
|
+
e.component("XConfirmDlg", it), e.component("XLoading", ft), e.component("XMessage", kt), e.component("XPromptDlg", Ct), e.component("XWaitDlg", St);
|
|
912
|
+
}, Rt = (e, t, a) => {
|
|
913
|
+
const o = e[t];
|
|
914
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((n, l) => {
|
|
909
915
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
910
916
|
l.bind(
|
|
911
917
|
null,
|
|
@@ -916,53 +922,54 @@ const wt = /* @__PURE__ */ E({
|
|
|
916
922
|
);
|
|
917
923
|
});
|
|
918
924
|
};
|
|
919
|
-
async function
|
|
920
|
-
return (await
|
|
925
|
+
async function oa(e) {
|
|
926
|
+
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;
|
|
921
927
|
}
|
|
922
|
-
const
|
|
928
|
+
const na = { install: jt };
|
|
923
929
|
export {
|
|
924
|
-
|
|
925
|
-
|
|
930
|
+
$e as Permission,
|
|
931
|
+
tt as addView,
|
|
926
932
|
Ue as appAppear,
|
|
927
|
-
|
|
933
|
+
Pt as clearViews,
|
|
928
934
|
Ht as closeWaitDlg,
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
935
|
+
Et as createAxios,
|
|
936
|
+
na as default,
|
|
937
|
+
at as delView,
|
|
938
|
+
s as eventBus,
|
|
933
939
|
me as hasView,
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
940
|
+
Zt as injectDark,
|
|
941
|
+
Qt as injectLastAppPath,
|
|
942
|
+
Nt as injectLocale,
|
|
943
|
+
Gt as injectPermissionChecksum,
|
|
944
|
+
Fe as injectPermissionObjects,
|
|
945
|
+
Qe as injectViews,
|
|
946
|
+
et as isEmpty,
|
|
947
|
+
ne as isExist,
|
|
948
|
+
Yt as lastView,
|
|
949
|
+
oa as loadLocaleMessageEssential,
|
|
944
950
|
Z as matchRouteMeta,
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
951
|
+
Kt as messageError,
|
|
952
|
+
zt as messageInfo,
|
|
953
|
+
Xt as messageSuccess,
|
|
954
|
+
Ft as messageWarning,
|
|
955
|
+
Jt as onBeforeEach,
|
|
956
|
+
Ut as openConfirmDlg,
|
|
957
|
+
Wt as openPromptDlg,
|
|
958
|
+
$t as openWaitDlg,
|
|
959
|
+
ot as popView,
|
|
960
|
+
Ke as provideDark,
|
|
961
|
+
Ne as provideLastAppPath,
|
|
962
|
+
ze as provideLocale,
|
|
963
|
+
Ze as providePermissionChecksum,
|
|
964
|
+
Xe as providePermissionObjects,
|
|
965
|
+
Ge as provideViews,
|
|
960
966
|
G as routeTransName,
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
967
|
+
Tt as useColor,
|
|
968
|
+
ea as useMicroApp,
|
|
969
|
+
ta as usePermission,
|
|
970
|
+
aa as useSystem,
|
|
971
|
+
te as useViewStack,
|
|
972
|
+
He as verifyPermission,
|
|
973
|
+
Bt as waitMs,
|
|
974
|
+
ee as waitUtil
|
|
968
975
|
};
|
|
@@ -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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@vueuse/core": "^11.1.0",
|
|
26
|
-
"js-cookie": "^3.0.5",
|
|
27
|
-
"mitt": "^3.0.1"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
26
|
"axios": "^1.7.7",
|
|
27
|
+
"js-cookie": "^3.0.5",
|
|
28
|
+
"mitt": "^3.0.1",
|
|
31
29
|
"vue": "^3.5.12",
|
|
32
30
|
"vue-i18n": "^10.0.4",
|
|
33
31
|
"vue-router": "^4.4.3",
|