x-essential-lib 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/microApp.d.ts +3 -1
- package/dist/index.js +307 -306
- package/dist/utils/router.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { PermissionObjects } from '../utils';
|
|
3
|
+
export declare function useMicroApp(dark: Ref<boolean | undefined>, locale: Ref<string>, permissionObjects: Ref<PermissionObjects>, permissionChecksum: Ref<string>, lastAppPath: Ref<string>, views: Ref<string[]>): void;
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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
|
|
2
|
+
import { computed as y, provide as O, inject as I, ref as f, getCurrentScope as xe, onScopeDispose as be, unref as $, 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 H, 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
|
|
7
|
-
function
|
|
8
|
-
const e = ee(), t = y(() => e.global.current.value.colors.primary), a = y(() => e.global.current.value.colors.secondary), n = y(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = y(() => e.current.value.dark ? "#272727" : "#eeeeee"), l = y(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"),
|
|
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
|
+
function It() {
|
|
8
|
+
const e = ee(), t = y(() => e.global.current.value.colors.primary), a = y(() => e.global.current.value.colors.secondary), n = y(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = 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
12
|
backgroundColor0: n,
|
|
13
13
|
backgroundColor1: o,
|
|
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 */
|
|
@@ -25,7 +25,7 @@ function X(e) {
|
|
|
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,27 +37,27 @@ var Ie = {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
function J(e, t) {
|
|
40
|
-
function a(o, l,
|
|
40
|
+
function a(o, l, c) {
|
|
41
41
|
if (!(typeof document > "u")) {
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
for (var u in
|
|
45
|
-
|
|
46
|
-
return document.cookie = o + "=" + e.write(l, o) +
|
|
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()), o = encodeURIComponent(o).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 = o + "=" + e.write(l, o) + r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
function n(o) {
|
|
50
50
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
51
|
-
for (var l = document.cookie ? document.cookie.split("; ") : [],
|
|
52
|
-
var u = l[
|
|
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), o === g)
|
|
56
56
|
break;
|
|
57
57
|
} catch {
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return o ?
|
|
60
|
+
return o ? c[o] : c;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return Object.create(
|
|
@@ -86,43 +86,43 @@ function J(e, t) {
|
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
var
|
|
90
|
-
function
|
|
91
|
-
const t =
|
|
89
|
+
var A = J(Ve, { path: "/" });
|
|
90
|
+
function Tt(e) {
|
|
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
|
}
|
|
99
99
|
), t.interceptors.response.use(
|
|
100
|
-
(a) =>
|
|
101
|
-
(a) =>
|
|
100
|
+
(a) => Ie(a),
|
|
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
|
-
function
|
|
108
|
+
function Oe(e, t) {
|
|
109
109
|
console.error(e), t("request timeout");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ie(e) {
|
|
112
112
|
return e.data;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Te(e, t) {
|
|
115
115
|
var o, l;
|
|
116
116
|
const n = e.response;
|
|
117
|
-
return n && (n.status === 401 &&
|
|
117
|
+
return n && (n.status === 401 && Ee(), (o = n.data) != null && o.message ? t((l = n.data) == null ? void 0 : l.message) : t({
|
|
118
118
|
code: n.status,
|
|
119
119
|
message: n.statusText
|
|
120
120
|
})), Promise.reject(e);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
122
|
+
function Ee() {
|
|
123
|
+
A.remove("accessToken"), A.remove("refreshToken"), A.remove("activeOrg"), ue().replace({ path: "/passport/login" });
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Be(e) {
|
|
126
126
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
|
|
127
127
|
var n = e.get(t);
|
|
128
128
|
n ? n.push(a) : e.set(t, [a]);
|
|
@@ -138,10 +138,10 @@ function He(e) {
|
|
|
138
138
|
});
|
|
139
139
|
} };
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
return window.eventBus || (window.eventBus =
|
|
141
|
+
const p = function() {
|
|
142
|
+
return window.eventBus || (window.eventBus = Be()), window.eventBus;
|
|
143
143
|
}();
|
|
144
|
-
async function
|
|
144
|
+
async function Et(e) {
|
|
145
145
|
return new Promise((t) => {
|
|
146
146
|
setTimeout(t, e);
|
|
147
147
|
});
|
|
@@ -155,58 +155,58 @@ async function te(e, t, a) {
|
|
|
155
155
|
l();
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ue(e, t) {
|
|
159
159
|
const a = document.getElementById("single-spa-application:" + e);
|
|
160
160
|
a && (a.classList.remove("app-left", "app-right", "app-reset"), t ? a.classList.add("app-left") : a.classList.add("app-right"), setTimeout(() => {
|
|
161
161
|
a.classList.add("app-reset");
|
|
162
162
|
}, 50));
|
|
163
163
|
}
|
|
164
164
|
let ne = Date.now();
|
|
165
|
-
function
|
|
165
|
+
function pe() {
|
|
166
166
|
const e = Date.now();
|
|
167
167
|
return e - ne > 500 ? (ne = e, !0) : !1;
|
|
168
168
|
}
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
return ++
|
|
169
|
+
let We = 0;
|
|
170
|
+
function se() {
|
|
171
|
+
return ++We;
|
|
172
172
|
}
|
|
173
|
-
async function
|
|
174
|
-
if (!
|
|
173
|
+
async function Bt(e) {
|
|
174
|
+
if (!pe())
|
|
175
175
|
return;
|
|
176
176
|
let t = !1, a;
|
|
177
177
|
const n = (l) => {
|
|
178
178
|
a = l, t = !0;
|
|
179
|
-
}, o =
|
|
180
|
-
return
|
|
179
|
+
}, o = se();
|
|
180
|
+
return p.on("confirmDlgResult" + o, n), p.emit("confirmDlg", { ...e, seq: o }), await te(() => t), p.off("confirmDlgResult" + o, n), a;
|
|
181
181
|
}
|
|
182
|
-
async function
|
|
183
|
-
if (!
|
|
182
|
+
async function Ut(e) {
|
|
183
|
+
if (!pe())
|
|
184
184
|
return;
|
|
185
185
|
let t = !1, a;
|
|
186
186
|
const n = (l) => {
|
|
187
187
|
a = l, t = !0;
|
|
188
|
-
}, o =
|
|
189
|
-
return
|
|
190
|
-
}
|
|
191
|
-
function Bt(e) {
|
|
192
|
-
s.emit("openWaitDlg", { text: e });
|
|
193
|
-
}
|
|
194
|
-
function Ut() {
|
|
195
|
-
s.emit("closeWaitDlg");
|
|
188
|
+
}, o = se();
|
|
189
|
+
return p.on("promptDlgResult" + o, n), p.emit("promptDlg", { ...e, seq: o }), await te(() => t), p.off("promptDlgResult" + o, n), a;
|
|
196
190
|
}
|
|
197
|
-
function Wt(e
|
|
198
|
-
|
|
191
|
+
function Wt(e) {
|
|
192
|
+
p.emit("openWaitDlg", { text: e });
|
|
199
193
|
}
|
|
200
|
-
function Ht(
|
|
201
|
-
|
|
194
|
+
function Ht() {
|
|
195
|
+
p.emit("closeWaitDlg");
|
|
202
196
|
}
|
|
203
197
|
function $t(e, t) {
|
|
204
|
-
|
|
198
|
+
p.emit("message", { type: "error", text: e, timeout: t });
|
|
205
199
|
}
|
|
206
200
|
function Kt(e, t) {
|
|
207
|
-
|
|
201
|
+
p.emit("message", { type: "info", text: e, timeout: t });
|
|
208
202
|
}
|
|
209
|
-
|
|
203
|
+
function zt(e, t) {
|
|
204
|
+
p.emit("message", { type: "success", text: e, timeout: t });
|
|
205
|
+
}
|
|
206
|
+
function Xt(e, t) {
|
|
207
|
+
p.emit("message", { type: "warning", text: e, timeout: t });
|
|
208
|
+
}
|
|
209
|
+
var He = /* @__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))(He || {});
|
|
210
210
|
function re(e, t) {
|
|
211
211
|
if (!e)
|
|
212
212
|
return !1;
|
|
@@ -221,43 +221,43 @@ function re(e, t) {
|
|
|
221
221
|
}), Object.keys(a).length <= 0);
|
|
222
222
|
}
|
|
223
223
|
const _e = "essentialDark", ie = "essentialLocale", de = "essentialPermissionObjects", fe = "essentialPermissionChecksum", ge = "essentialLastAppPath", ve = "essentialViews";
|
|
224
|
-
function
|
|
224
|
+
function $e(e) {
|
|
225
225
|
O(_e, e);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Ft() {
|
|
228
228
|
return I(_e);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Ke(e) {
|
|
231
231
|
O(ie, e);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Zt() {
|
|
234
234
|
return I(ie);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function ze(e) {
|
|
237
237
|
O(de, e);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Xe() {
|
|
240
240
|
return I(de);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Fe(e) {
|
|
243
243
|
O(fe, e);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Nt() {
|
|
246
246
|
return I(fe);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Ze(e) {
|
|
249
249
|
O(ge, e);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Gt() {
|
|
252
252
|
return I(ge);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ne(e) {
|
|
255
255
|
O(ve, e);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ge() {
|
|
258
258
|
return I(ve);
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const Qe = [
|
|
261
261
|
{
|
|
262
262
|
app: "x-passport-mf",
|
|
263
263
|
path: "/passport/login",
|
|
@@ -368,18 +368,17 @@ const Ne = [
|
|
|
368
368
|
function Z(e) {
|
|
369
369
|
let t, a = 0;
|
|
370
370
|
const n = e.split("/").filter((o) => o.trim() !== "");
|
|
371
|
-
return
|
|
372
|
-
const l = o.path.split("/").filter((
|
|
373
|
-
let
|
|
374
|
-
for (let
|
|
375
|
-
|
|
376
|
-
|
|
371
|
+
return Qe.forEach((o) => {
|
|
372
|
+
const l = o.path.split("/").filter((r) => r.trim() !== "");
|
|
373
|
+
let c = 0;
|
|
374
|
+
for (let r = 0; r < n.length && !(r >= l.length || n[r] !== l[r]); r++)
|
|
375
|
+
c++;
|
|
376
|
+
c > 0 && c > a && (t = o, a = c);
|
|
377
377
|
}), t;
|
|
378
378
|
}
|
|
379
379
|
const G = f("");
|
|
380
|
-
function
|
|
381
|
-
|
|
382
|
-
t === "/" && (t = a.value);
|
|
380
|
+
function S(e, t, a) {
|
|
381
|
+
t === "/" && (t = a);
|
|
383
382
|
const n = Z(e), o = Z(t);
|
|
384
383
|
if (!n) {
|
|
385
384
|
console.assert(!1);
|
|
@@ -387,166 +386,168 @@ function M(e, t) {
|
|
|
387
386
|
}
|
|
388
387
|
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !o)
|
|
389
388
|
return;
|
|
390
|
-
const l = n.app === o.app,
|
|
391
|
-
l ?
|
|
389
|
+
const l = n.app === o.app, c = n.path === o.path, r = n.level >= o.level;
|
|
390
|
+
l ? c ? G.value = "" : G.value = r ? "inner-left" : "inner-right" : (G.value = "", Ue(n.app, r));
|
|
392
391
|
}
|
|
393
|
-
function
|
|
394
|
-
return !!
|
|
392
|
+
function Je() {
|
|
393
|
+
return !!A.get("accessToken");
|
|
395
394
|
}
|
|
396
|
-
function
|
|
397
|
-
return !!
|
|
395
|
+
function Ye() {
|
|
396
|
+
return !!A.get("activeOrg");
|
|
398
397
|
}
|
|
399
|
-
function Qt(e, t, a) {
|
|
400
|
-
const
|
|
401
|
-
if (!
|
|
398
|
+
function Qt(e, t, a, n) {
|
|
399
|
+
const o = Je(), l = Ye(), c = Z(e.path);
|
|
400
|
+
if (!c) {
|
|
402
401
|
console.assert(!1), a();
|
|
403
402
|
return;
|
|
404
403
|
}
|
|
405
|
-
if (
|
|
406
|
-
if (
|
|
407
|
-
if (
|
|
404
|
+
if (c.requiredState === "auth")
|
|
405
|
+
if (o)
|
|
406
|
+
if (l) {
|
|
408
407
|
const r = "/main";
|
|
409
|
-
|
|
408
|
+
S(r, t.path, n), a({ path: r });
|
|
410
409
|
} else
|
|
411
|
-
|
|
410
|
+
S(e.path, t.path, n), a();
|
|
412
411
|
else {
|
|
413
412
|
const r = "/passport/login";
|
|
414
|
-
|
|
413
|
+
S(r, t.path, n), a({ path: r });
|
|
415
414
|
}
|
|
416
|
-
else if (
|
|
417
|
-
if (
|
|
418
|
-
if (
|
|
419
|
-
|
|
415
|
+
else if (c.requiredState === "org")
|
|
416
|
+
if (o)
|
|
417
|
+
if (l)
|
|
418
|
+
S(e.path, t.path, n), a();
|
|
420
419
|
else {
|
|
421
420
|
const r = "/org/joinOrCreate";
|
|
422
|
-
|
|
421
|
+
S(r, t.path, n), a({ path: r });
|
|
423
422
|
}
|
|
424
423
|
else {
|
|
425
424
|
const r = "/passport/login";
|
|
426
|
-
|
|
425
|
+
S(r, t.path, n), a({ path: r });
|
|
427
426
|
}
|
|
428
|
-
else if (
|
|
429
|
-
if (
|
|
427
|
+
else if (o)
|
|
428
|
+
if (l) {
|
|
430
429
|
const r = "/main";
|
|
431
|
-
|
|
430
|
+
S(r, t.path, n), a({ path: r });
|
|
432
431
|
} else {
|
|
433
432
|
const r = "/org/joinOrCreate";
|
|
434
|
-
|
|
433
|
+
S(r, t.path, n), a({ path: r });
|
|
435
434
|
}
|
|
436
435
|
else
|
|
437
|
-
|
|
436
|
+
S(e.path, t.path, n), a();
|
|
438
437
|
}
|
|
439
|
-
function
|
|
438
|
+
function Pe(e) {
|
|
440
439
|
return e.value.length <= 0;
|
|
441
440
|
}
|
|
442
441
|
function Jt(e) {
|
|
443
442
|
return e.value.at(-1);
|
|
444
443
|
}
|
|
445
|
-
function
|
|
444
|
+
function me(e, t) {
|
|
446
445
|
return !!e.value.find((a) => a === t);
|
|
447
446
|
}
|
|
448
|
-
function
|
|
447
|
+
function et(e, t) {
|
|
449
448
|
const a = e.value.findIndex((n) => n === t);
|
|
450
449
|
a >= 0 && e.value.splice(a, 1), e.value.push(t);
|
|
451
450
|
}
|
|
452
|
-
function
|
|
451
|
+
function tt(e, t) {
|
|
453
452
|
const a = e.value.findIndex((n) => n === t);
|
|
454
453
|
a >= 0 && e.value.splice(a, 1);
|
|
455
454
|
}
|
|
456
|
-
function
|
|
455
|
+
function at(e) {
|
|
457
456
|
console.assert(e.value.length > 0), e.value.pop();
|
|
458
457
|
}
|
|
459
458
|
function Yt(e) {
|
|
460
459
|
e.value = [];
|
|
461
460
|
}
|
|
462
|
-
function
|
|
463
|
-
return
|
|
461
|
+
function ot(e) {
|
|
462
|
+
return xe() ? (be(e), !0) : !1;
|
|
464
463
|
}
|
|
465
|
-
function
|
|
464
|
+
function nt(e) {
|
|
466
465
|
return typeof e == "function" ? e() : $(e);
|
|
467
466
|
}
|
|
468
|
-
const
|
|
467
|
+
const rt = typeof window < "u" && typeof document < "u";
|
|
469
468
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
470
|
-
const
|
|
471
|
-
function
|
|
472
|
-
const e = f(!1), t =
|
|
469
|
+
const lt = rt ? window : void 0;
|
|
470
|
+
function ct() {
|
|
471
|
+
const e = f(!1), t = Ce();
|
|
473
472
|
return t && T(() => {
|
|
474
473
|
e.value = !0;
|
|
475
474
|
}, t), e;
|
|
476
475
|
}
|
|
477
|
-
function
|
|
478
|
-
const t =
|
|
476
|
+
function ut(e) {
|
|
477
|
+
const t = ct();
|
|
479
478
|
return y(() => (t.value, !!e()));
|
|
480
479
|
}
|
|
481
|
-
function
|
|
482
|
-
const { window: a =
|
|
480
|
+
function pt(e, t = {}) {
|
|
481
|
+
const { window: a = lt } = t, n = ut(() => a && "matchMedia" in a && typeof a.matchMedia == "function");
|
|
483
482
|
let o;
|
|
484
|
-
const l = f(!1),
|
|
483
|
+
const l = f(!1), c = (_) => {
|
|
485
484
|
l.value = _.matches;
|
|
486
|
-
},
|
|
487
|
-
o && ("removeEventListener" in o ? o.removeEventListener("change",
|
|
488
|
-
}, u =
|
|
489
|
-
n.value && (
|
|
485
|
+
}, r = () => {
|
|
486
|
+
o && ("removeEventListener" in o ? o.removeEventListener("change", c) : o.removeListener(c));
|
|
487
|
+
}, u = ke(() => {
|
|
488
|
+
n.value && (r(), o = a.matchMedia(nt(e)), "addEventListener" in o ? o.addEventListener("change", c) : o.addListener(c), l.value = o.matches);
|
|
490
489
|
});
|
|
491
|
-
return
|
|
492
|
-
u(),
|
|
490
|
+
return ot(() => {
|
|
491
|
+
u(), r(), o = void 0;
|
|
493
492
|
}), l;
|
|
494
493
|
}
|
|
495
|
-
function
|
|
496
|
-
return
|
|
494
|
+
function st(e) {
|
|
495
|
+
return pt("(prefers-color-scheme: dark)", e);
|
|
497
496
|
}
|
|
498
|
-
function Pt() {
|
|
499
|
-
const
|
|
497
|
+
function Pt(e, t, a, n, o, l) {
|
|
498
|
+
const c = Re(), r = ue();
|
|
499
|
+
$e(e), Ke(t), ze(a), Fe(n), Ze(o), Ne(l);
|
|
500
|
+
const u = ee(), _ = st();
|
|
500
501
|
N(
|
|
501
|
-
|
|
502
|
+
e,
|
|
502
503
|
() => {
|
|
503
|
-
let
|
|
504
|
-
typeof
|
|
504
|
+
let s = !1;
|
|
505
|
+
typeof e.value == "boolean" ? s = e.value : s = _.value, u.global.name.value = s ? "dark" : "light";
|
|
505
506
|
},
|
|
506
507
|
{ immediate: !0 }
|
|
507
508
|
);
|
|
508
|
-
const g = (
|
|
509
|
-
if (
|
|
509
|
+
const g = (s) => {
|
|
510
|
+
if (s.key === "Escape") {
|
|
510
511
|
v();
|
|
511
512
|
return;
|
|
512
513
|
}
|
|
513
514
|
}, v = () => {
|
|
514
515
|
var x;
|
|
515
|
-
if (!
|
|
516
|
-
|
|
516
|
+
if (!Pe(l)) {
|
|
517
|
+
me(l, "waitDlg") || at(l);
|
|
517
518
|
return;
|
|
518
519
|
}
|
|
519
|
-
const
|
|
520
|
-
(
|
|
520
|
+
const s = Z(c.path);
|
|
521
|
+
(s == null ? void 0 : s.level) === 0 ? (x = navigator == null ? void 0 : navigator.Backbutton) == null || x.goHome(
|
|
521
522
|
() => {
|
|
522
523
|
},
|
|
523
524
|
() => {
|
|
524
525
|
}
|
|
525
|
-
) :
|
|
526
|
+
) : r.back();
|
|
526
527
|
};
|
|
527
528
|
T(() => {
|
|
528
|
-
window.addEventListener("keydown", g),
|
|
529
|
+
window.addEventListener("keydown", g), p.on("backbutton", v);
|
|
529
530
|
}), W(() => {
|
|
530
|
-
window.removeEventListener("keydown", g),
|
|
531
|
+
window.removeEventListener("keydown", g), p.off("backbutton", v);
|
|
531
532
|
});
|
|
532
|
-
const L = (
|
|
533
|
-
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
}, i = (
|
|
537
|
-
const x =
|
|
538
|
-
|
|
539
|
-
}, D = (
|
|
540
|
-
|
|
533
|
+
const L = (s) => {
|
|
534
|
+
e.value = s;
|
|
535
|
+
}, k = (s) => {
|
|
536
|
+
t.value = s;
|
|
537
|
+
}, i = (s) => {
|
|
538
|
+
const x = s;
|
|
539
|
+
a.value = x[0], n.value = x[1];
|
|
540
|
+
}, D = (s) => {
|
|
541
|
+
o.value = s;
|
|
541
542
|
};
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
Le(() => {
|
|
544
|
+
p.on("updateDark", L), p.on("updateLocale", k), p.on("updatePermission", i), p.on("updateLastAppPath", D), p.emit("syncGlobalState");
|
|
544
545
|
}), W(() => {
|
|
545
|
-
|
|
546
|
+
p.off("updateDark", L), p.off("updateLocale", k), p.off("updatePermission", i), p.off("updateLastAppPath", D);
|
|
546
547
|
});
|
|
547
548
|
}
|
|
548
549
|
function ea() {
|
|
549
|
-
const e =
|
|
550
|
+
const e = Xe();
|
|
550
551
|
function t(a, n) {
|
|
551
552
|
const o = e.value[a];
|
|
552
553
|
return o ? n ? !(!re(o.includes, n) || re(o.excludes, n)) : !0 : !1;
|
|
@@ -554,80 +555,80 @@ function ea() {
|
|
|
554
555
|
return { verifyPermission: t };
|
|
555
556
|
}
|
|
556
557
|
function ta() {
|
|
557
|
-
const e = y(() => !!window.cordova), t =
|
|
558
|
+
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");
|
|
558
559
|
return { sysBarAvail: e, compactWidth: a };
|
|
559
560
|
}
|
|
560
561
|
function ae(e, t) {
|
|
561
|
-
const a =
|
|
562
|
+
const a = Ge(), n = y({
|
|
562
563
|
get() {
|
|
563
|
-
return
|
|
564
|
+
return me(a, e);
|
|
564
565
|
},
|
|
565
566
|
set(l) {
|
|
566
|
-
l ?
|
|
567
|
+
l ? et(a, e) : tt(a, e);
|
|
567
568
|
}
|
|
568
569
|
}), o = (l) => {
|
|
569
570
|
t == null || t(l), n.value = !0;
|
|
570
571
|
};
|
|
571
572
|
return T(() => {
|
|
572
|
-
|
|
573
|
+
p.on(e, o);
|
|
573
574
|
}), W(() => {
|
|
574
|
-
|
|
575
|
+
p.off(e, o);
|
|
575
576
|
}), { open: n };
|
|
576
577
|
}
|
|
577
|
-
const
|
|
578
|
+
const _t = /* @__PURE__ */ E({
|
|
578
579
|
__name: "index",
|
|
579
580
|
setup(e) {
|
|
580
|
-
const { t } = P(), a = f(""), n = f(""), o = f(""), l = f(""),
|
|
581
|
+
const { t } = P(), a = f(""), n = f(""), o = f(""), l = f(""), c = f(""), r = f("");
|
|
581
582
|
let u = 0, _ = !1;
|
|
582
|
-
const g = (
|
|
583
|
-
var D,
|
|
584
|
-
const i =
|
|
585
|
-
a.value = i.title, n.value = i.text, o.value = ((D = i.cancel) == null ? void 0 : D.color) ?? "primary", l.value = ((
|
|
583
|
+
const g = (k) => {
|
|
584
|
+
var D, s, x, M;
|
|
585
|
+
const i = k;
|
|
586
|
+
a.value = i.title, n.value = i.text, o.value = ((D = i.cancel) == null ? void 0 : D.color) ?? "primary", l.value = ((s = i.cancel) == null ? void 0 : s.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;
|
|
586
587
|
}, { open: v } = ae("confirmDlg", g), L = () => {
|
|
587
|
-
v.value = !1, _ || (
|
|
588
|
+
v.value = !1, _ || (p.emit("confirmDlgResult" + u, !0), _ = !0);
|
|
588
589
|
};
|
|
589
|
-
return N(v, (
|
|
590
|
-
!
|
|
591
|
-
}), (
|
|
592
|
-
const D = h("v-card-text"),
|
|
593
|
-
return C(),
|
|
590
|
+
return N(v, (k) => {
|
|
591
|
+
!k && !_ && (p.emit("confirmDlgResult" + u, !1), _ = !0);
|
|
592
|
+
}), (k, i) => {
|
|
593
|
+
const D = h("v-card-text"), s = h("v-btn"), x = h("v-card-actions"), M = h("v-card"), d = h("v-dialog");
|
|
594
|
+
return C(), q(d, {
|
|
594
595
|
modelValue: $(v),
|
|
595
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
596
|
+
"onUpdate:modelValue": i[1] || (i[1] = (j) => Y(v) ? v.value = j : null),
|
|
596
597
|
transition: "dialog-top-transition",
|
|
597
598
|
"max-width": "600px",
|
|
598
599
|
onKeydown: [
|
|
599
|
-
i[2] || (i[2] = F(H((
|
|
600
|
+
i[2] || (i[2] = F(H((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
600
601
|
F(H(L, ["stop", "prevent"]), ["enter"])
|
|
601
602
|
]
|
|
602
603
|
}, {
|
|
603
604
|
default: w(() => [
|
|
604
|
-
|
|
605
|
+
b(M, { title: a.value }, {
|
|
605
606
|
default: w(() => [
|
|
606
|
-
|
|
607
|
+
b(D, null, {
|
|
607
608
|
default: w(() => [
|
|
608
|
-
|
|
609
|
+
V(R(n.value), 1)
|
|
609
610
|
]),
|
|
610
611
|
_: 1
|
|
611
612
|
}),
|
|
612
|
-
|
|
613
|
+
b(x, { class: "d-flex justify-end" }, {
|
|
613
614
|
default: w(() => [
|
|
614
|
-
|
|
615
|
+
b(s, {
|
|
615
616
|
color: o.value,
|
|
616
617
|
variant: "text",
|
|
617
|
-
onClick: i[0] || (i[0] = (
|
|
618
|
+
onClick: i[0] || (i[0] = (j) => v.value = !1)
|
|
618
619
|
}, {
|
|
619
620
|
default: w(() => [
|
|
620
|
-
|
|
621
|
+
V(R(l.value), 1)
|
|
621
622
|
]),
|
|
622
623
|
_: 1
|
|
623
624
|
}, 8, ["color"]),
|
|
624
|
-
|
|
625
|
-
color:
|
|
625
|
+
b(s, {
|
|
626
|
+
color: c.value,
|
|
626
627
|
variant: "text",
|
|
627
628
|
onClick: L
|
|
628
629
|
}, {
|
|
629
630
|
default: w(() => [
|
|
630
|
-
|
|
631
|
+
V(R(r.value), 1)
|
|
631
632
|
]),
|
|
632
633
|
_: 1
|
|
633
634
|
}, 8, ["color"])
|
|
@@ -642,7 +643,7 @@ const st = /* @__PURE__ */ E({
|
|
|
642
643
|
}, 8, ["modelValue", "onKeydown"]);
|
|
643
644
|
};
|
|
644
645
|
}
|
|
645
|
-
}),
|
|
646
|
+
}), it = /* @__PURE__ */ E({
|
|
646
647
|
__name: "index",
|
|
647
648
|
props: {
|
|
648
649
|
zIndex: { default: 1 }
|
|
@@ -677,9 +678,9 @@ const st = /* @__PURE__ */ E({
|
|
|
677
678
|
for (const [n, o] of t)
|
|
678
679
|
a[n] = o;
|
|
679
680
|
return a;
|
|
680
|
-
},
|
|
681
|
-
var
|
|
682
|
-
const
|
|
681
|
+
}, dt = /* @__PURE__ */ oe(it, [["__scopeId", "data-v-7ab74c70"]]);
|
|
682
|
+
var ft = "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", gt = "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", vt = "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", mt = "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", ht = "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";
|
|
683
|
+
const wt = /* @__PURE__ */ E({
|
|
683
684
|
__name: "item",
|
|
684
685
|
props: {
|
|
685
686
|
id: {},
|
|
@@ -695,78 +696,78 @@ const mt = /* @__PURE__ */ E({
|
|
|
695
696
|
})), o = y(() => {
|
|
696
697
|
switch (a.type) {
|
|
697
698
|
case "success":
|
|
698
|
-
return
|
|
699
|
+
return gt;
|
|
699
700
|
case "info":
|
|
700
|
-
return
|
|
701
|
+
return ht;
|
|
701
702
|
case "error":
|
|
702
|
-
return
|
|
703
|
+
return mt;
|
|
703
704
|
case "warning":
|
|
704
|
-
return
|
|
705
|
+
return ft;
|
|
705
706
|
default:
|
|
706
707
|
return "";
|
|
707
708
|
}
|
|
708
|
-
}), l = f(!0),
|
|
709
|
+
}), l = f(!0), c = t;
|
|
709
710
|
return T(() => {
|
|
710
711
|
setTimeout(() => {
|
|
711
|
-
|
|
712
|
+
c("timeout", a.id);
|
|
712
713
|
}, a.timeout);
|
|
713
|
-
}), N(l, (
|
|
714
|
-
|
|
715
|
-
}), (
|
|
714
|
+
}), N(l, (r) => {
|
|
715
|
+
r || c("timeout", a.id);
|
|
716
|
+
}), (r, u) => {
|
|
716
717
|
const _ = h("v-icon"), g = h("v-sheet");
|
|
717
|
-
return C(),
|
|
718
|
+
return C(), q(g, {
|
|
718
719
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
719
720
|
color: a.type,
|
|
720
721
|
elevation: 1
|
|
721
722
|
}, {
|
|
722
723
|
default: w(() => [
|
|
723
|
-
o.value ? (C(),
|
|
724
|
+
o.value ? (C(), q(_, {
|
|
724
725
|
key: 0,
|
|
725
726
|
class: "mx-1",
|
|
726
727
|
icon: o.value
|
|
727
728
|
}, null, 8, ["icon"])) : ce("", !0),
|
|
728
729
|
m("div", {
|
|
729
730
|
style: le(n.value)
|
|
730
|
-
},
|
|
731
|
-
|
|
731
|
+
}, R(a.text), 5),
|
|
732
|
+
b(_, {
|
|
732
733
|
class: "mx-1",
|
|
733
|
-
icon: $(
|
|
734
|
-
onClick: u[0] || (u[0] = (v) =>
|
|
734
|
+
icon: $(vt),
|
|
735
|
+
onClick: u[0] || (u[0] = (v) => c("timeout", a.id))
|
|
735
736
|
}, null, 8, ["icon"])
|
|
736
737
|
]),
|
|
737
738
|
_: 1
|
|
738
739
|
}, 8, ["color"]);
|
|
739
740
|
};
|
|
740
741
|
}
|
|
741
|
-
}),
|
|
742
|
+
}), yt = /* @__PURE__ */ oe(wt, [["__scopeId", "data-v-d5cfe252"]]), xt = /* @__PURE__ */ E({
|
|
742
743
|
__name: "index",
|
|
743
744
|
setup(e) {
|
|
744
745
|
const t = f([]);
|
|
745
746
|
T(() => {
|
|
746
|
-
|
|
747
|
+
p.on("message", a);
|
|
747
748
|
}), W(() => {
|
|
748
|
-
|
|
749
|
+
p.off("message", a);
|
|
749
750
|
});
|
|
750
|
-
const a = (
|
|
751
|
-
const { type: u, text: _, timeout: g } =
|
|
751
|
+
const a = (r) => {
|
|
752
|
+
const { type: u, text: _, timeout: g } = r;
|
|
752
753
|
l(u, _, g);
|
|
753
|
-
}, n = (
|
|
754
|
-
r
|
|
754
|
+
}, n = (r) => {
|
|
755
|
+
c(r);
|
|
755
756
|
};
|
|
756
757
|
let o = 0;
|
|
757
|
-
const l = (
|
|
758
|
+
const l = (r, u, _) => {
|
|
758
759
|
const g = o++;
|
|
759
|
-
t.value.push({ id: g, type:
|
|
760
|
-
},
|
|
761
|
-
const u = t.value.findIndex((_) => _.id ===
|
|
760
|
+
t.value.push({ id: g, type: r, text: u, timeout: _ });
|
|
761
|
+
}, c = (r) => {
|
|
762
|
+
const u = t.value.findIndex((_) => _.id === r);
|
|
762
763
|
u >= 0 && t.value.splice(u, 1);
|
|
763
764
|
};
|
|
764
|
-
return (
|
|
765
|
+
return (r, u) => (C(), Q("div", {
|
|
765
766
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
766
767
|
onClick: u[0] || (u[0] = H(() => {
|
|
767
768
|
}, ["stop"]))
|
|
768
769
|
}, [
|
|
769
|
-
(C(!0), Q(
|
|
770
|
+
(C(!0), Q(De, null, Me(t.value, (_) => (C(), q(yt, {
|
|
770
771
|
id: _.id,
|
|
771
772
|
key: _.id,
|
|
772
773
|
type: _.type,
|
|
@@ -776,74 +777,74 @@ const mt = /* @__PURE__ */ E({
|
|
|
776
777
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
777
778
|
]));
|
|
778
779
|
}
|
|
779
|
-
}),
|
|
780
|
+
}), bt = /* @__PURE__ */ oe(xt, [["__scopeId", "data-v-8fd5d800"]]), kt = /* @__PURE__ */ E({
|
|
780
781
|
__name: "index",
|
|
781
782
|
setup(e) {
|
|
782
|
-
const { t } = P(), a = f(""), n = f(""), o = f(""), l = f(""),
|
|
783
|
-
let
|
|
784
|
-
const D = async (
|
|
785
|
-
var
|
|
786
|
-
const d =
|
|
787
|
-
a.value = d.title, n.value = d.text, o.value = d.label, l.value = d.placeholder,
|
|
788
|
-
}, { open:
|
|
789
|
-
|
|
783
|
+
const { t } = P(), a = f(""), n = f(""), o = f(""), l = f(""), c = f(), r = f(""), u = f(""), _ = f(""), g = f(""), v = f(""), L = Se("target");
|
|
784
|
+
let k = 0, i = !1;
|
|
785
|
+
const D = async (M) => {
|
|
786
|
+
var j, K, z, B;
|
|
787
|
+
const d = M;
|
|
788
|
+
a.value = d.title, n.value = d.text, o.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, s.value = !0, await te(() => !!L.value), L.value.focus();
|
|
789
|
+
}, { open: s } = ae("promptDlg", D), x = () => {
|
|
790
|
+
s.value = !1, i || (p.emit("promptDlgResult" + k, r.value ?? ""), i = !0);
|
|
790
791
|
};
|
|
791
|
-
return N(
|
|
792
|
-
!
|
|
793
|
-
}), (
|
|
794
|
-
const
|
|
795
|
-
return C(),
|
|
796
|
-
modelValue: $(
|
|
797
|
-
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(
|
|
792
|
+
return N(s, (M) => {
|
|
793
|
+
!M && !i && (p.emit("promptDlgResult" + k, void 0), i = !0);
|
|
794
|
+
}), (M, d) => {
|
|
795
|
+
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
|
+
return C(), q(ye, {
|
|
797
|
+
modelValue: $(s),
|
|
798
|
+
"onUpdate:modelValue": d[2] || (d[2] = (U) => Y(s) ? s.value = U : null),
|
|
798
799
|
transition: "dialog-top-transition",
|
|
799
800
|
"max-width": "600px",
|
|
800
801
|
onKeydown: [
|
|
801
|
-
d[3] || (d[3] = F(H((U) =>
|
|
802
|
+
d[3] || (d[3] = F(H((U) => s.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
802
803
|
F(H(x, ["stop", "prevent"]), ["enter"])
|
|
803
804
|
]
|
|
804
805
|
}, {
|
|
805
806
|
default: w(() => [
|
|
806
|
-
|
|
807
|
+
b(we, { title: a.value }, {
|
|
807
808
|
default: w(() => [
|
|
808
|
-
n.value ? (C(),
|
|
809
|
+
n.value ? (C(), q(j, { key: 0 }, {
|
|
809
810
|
default: w(() => [
|
|
810
|
-
|
|
811
|
+
V(R(n.value), 1)
|
|
811
812
|
]),
|
|
812
813
|
_: 1
|
|
813
814
|
})) : ce("", !0),
|
|
814
|
-
|
|
815
|
+
b(z, { class: "mx-3" }, {
|
|
815
816
|
default: w(() => [
|
|
816
|
-
|
|
817
|
+
b(K, {
|
|
817
818
|
ref_key: "target",
|
|
818
819
|
ref: L,
|
|
819
|
-
modelValue:
|
|
820
|
-
"onUpdate:modelValue": d[0] || (d[0] = (U) =>
|
|
820
|
+
modelValue: r.value,
|
|
821
|
+
"onUpdate:modelValue": d[0] || (d[0] = (U) => r.value = U),
|
|
821
822
|
label: o.value,
|
|
822
823
|
placeholder: l.value,
|
|
823
|
-
rules:
|
|
824
|
+
rules: c.value
|
|
824
825
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
825
826
|
]),
|
|
826
827
|
_: 1
|
|
827
828
|
}),
|
|
828
|
-
|
|
829
|
+
b(he, { class: "d-flex justify-end" }, {
|
|
829
830
|
default: w(() => [
|
|
830
|
-
|
|
831
|
+
b(B, {
|
|
831
832
|
color: u.value,
|
|
832
833
|
variant: "text",
|
|
833
|
-
onClick: d[1] || (d[1] = (U) =>
|
|
834
|
+
onClick: d[1] || (d[1] = (U) => s.value = !1)
|
|
834
835
|
}, {
|
|
835
836
|
default: w(() => [
|
|
836
|
-
|
|
837
|
+
V(R(_.value), 1)
|
|
837
838
|
]),
|
|
838
839
|
_: 1
|
|
839
840
|
}, 8, ["color"]),
|
|
840
|
-
|
|
841
|
+
b(B, {
|
|
841
842
|
color: g.value,
|
|
842
843
|
variant: "text",
|
|
843
844
|
onClick: x
|
|
844
845
|
}, {
|
|
845
846
|
default: w(() => [
|
|
846
|
-
|
|
847
|
+
V(R(v.value), 1)
|
|
847
848
|
]),
|
|
848
849
|
_: 1
|
|
849
850
|
}, 8, ["color"])
|
|
@@ -858,38 +859,38 @@ const mt = /* @__PURE__ */ E({
|
|
|
858
859
|
}, 8, ["modelValue", "onKeydown"]);
|
|
859
860
|
};
|
|
860
861
|
}
|
|
861
|
-
}),
|
|
862
|
+
}), Ct = { class: "mx-auto my-auto" }, Lt = { class: "w-100 h-100 d-flex align-center justify-center" }, Dt = { class: "text-body-1" }, Mt = /* @__PURE__ */ E({
|
|
862
863
|
__name: "index",
|
|
863
864
|
setup(e) {
|
|
864
|
-
const { t } = P(), a = f(""), n = (
|
|
865
|
-
const
|
|
866
|
-
a.value =
|
|
865
|
+
const { t } = P(), a = f(""), n = (c) => {
|
|
866
|
+
const r = c;
|
|
867
|
+
a.value = r.text ?? t("dlg.common.waiting"), l.value = !0;
|
|
867
868
|
}, o = () => {
|
|
868
869
|
l.value = !1;
|
|
869
870
|
}, { open: l } = ae("waitDlg", n);
|
|
870
871
|
return T(() => {
|
|
871
|
-
|
|
872
|
+
p.on("closeWaitDlg", o);
|
|
872
873
|
}), W(() => {
|
|
873
|
-
|
|
874
|
-
}), (
|
|
874
|
+
p.off("closeWaitDlg", o);
|
|
875
|
+
}), (c, r) => {
|
|
875
876
|
const u = h("v-card"), _ = h("v-dialog");
|
|
876
|
-
return C(),
|
|
877
|
+
return C(), q(_, {
|
|
877
878
|
modelValue: $(l),
|
|
878
|
-
"onUpdate:modelValue":
|
|
879
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => Y(l) ? l.value = g : null),
|
|
879
880
|
persistent: "",
|
|
880
881
|
"no-click-animation": "",
|
|
881
882
|
fullscreen: ""
|
|
882
883
|
}, {
|
|
883
884
|
default: w(() => [
|
|
884
|
-
m("div",
|
|
885
|
-
|
|
885
|
+
m("div", Ct, [
|
|
886
|
+
b(u, {
|
|
886
887
|
width: "300px",
|
|
887
888
|
height: "80px",
|
|
888
889
|
loading: ""
|
|
889
890
|
}, {
|
|
890
891
|
default: w(() => [
|
|
891
|
-
m("div",
|
|
892
|
-
m("span",
|
|
892
|
+
m("div", Lt, [
|
|
893
|
+
m("span", Dt, R(a.value), 1)
|
|
893
894
|
])
|
|
894
895
|
]),
|
|
895
896
|
_: 1
|
|
@@ -900,9 +901,9 @@ const mt = /* @__PURE__ */ E({
|
|
|
900
901
|
}, 8, ["modelValue"]);
|
|
901
902
|
};
|
|
902
903
|
}
|
|
903
|
-
}),
|
|
904
|
-
e.component("XConfirmDlg",
|
|
905
|
-
},
|
|
904
|
+
}), St = (e) => {
|
|
905
|
+
e.component("XConfirmDlg", _t), e.component("XLoading", dt), e.component("XMessage", bt), e.component("XPromptDlg", kt), e.component("XWaitDlg", Mt);
|
|
906
|
+
}, jt = (e, t, a) => {
|
|
906
907
|
const n = e[t];
|
|
907
908
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((o, l) => {
|
|
908
909
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -916,52 +917,52 @@ const mt = /* @__PURE__ */ E({
|
|
|
916
917
|
});
|
|
917
918
|
};
|
|
918
919
|
async function aa(e) {
|
|
919
|
-
return (await
|
|
920
|
+
return (await jt(/* @__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;
|
|
920
921
|
}
|
|
921
|
-
const oa = { install:
|
|
922
|
+
const oa = { install: St };
|
|
922
923
|
export {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
924
|
+
He as Permission,
|
|
925
|
+
et as addView,
|
|
926
|
+
Ue as appAppear,
|
|
926
927
|
Yt as clearViews,
|
|
927
|
-
|
|
928
|
-
|
|
928
|
+
Ht as closeWaitDlg,
|
|
929
|
+
Tt as createAxios,
|
|
929
930
|
oa as default,
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
931
|
+
tt as delView,
|
|
932
|
+
p as eventBus,
|
|
933
|
+
me as hasView,
|
|
934
|
+
Ft as injectDark,
|
|
935
|
+
Gt as injectLastAppPath,
|
|
936
|
+
Zt as injectLocale,
|
|
937
|
+
Nt as injectPermissionChecksum,
|
|
938
|
+
Xe as injectPermissionObjects,
|
|
939
|
+
Ge as injectViews,
|
|
940
|
+
Pe as isEmpty,
|
|
940
941
|
re as isExist,
|
|
941
942
|
Jt as lastView,
|
|
942
943
|
aa as loadLocaleMessageEssential,
|
|
943
944
|
Z as matchRouteMeta,
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
945
|
+
$t as messageError,
|
|
946
|
+
Kt as messageInfo,
|
|
947
|
+
zt as messageSuccess,
|
|
948
|
+
Xt as messageWarning,
|
|
948
949
|
Qt as onBeforeEach,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
950
|
+
Bt as openConfirmDlg,
|
|
951
|
+
Ut as openPromptDlg,
|
|
952
|
+
Wt as openWaitDlg,
|
|
953
|
+
at as popView,
|
|
954
|
+
$e as provideDark,
|
|
955
|
+
Ze as provideLastAppPath,
|
|
956
|
+
Ke as provideLocale,
|
|
957
|
+
Fe as providePermissionChecksum,
|
|
958
|
+
ze as providePermissionObjects,
|
|
959
|
+
Ne as provideViews,
|
|
959
960
|
G as routeTransName,
|
|
960
|
-
|
|
961
|
+
It as useColor,
|
|
961
962
|
Pt as useMicroApp,
|
|
962
963
|
ea as usePermission,
|
|
963
964
|
ta as useSystem,
|
|
964
965
|
ae as useViewStack,
|
|
965
|
-
|
|
966
|
+
Et as waitMs,
|
|
966
967
|
te as waitUtil
|
|
967
968
|
};
|
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 {};
|