x-essential-lib 0.9.28 → 0.9.29
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/i18n-en.lqadbyvh.js +102 -0
- package/dist/i18n-zhHans.jagnyxbk.js +102 -0
- package/dist/index.js +486 -454
- package/dist/rolldown-runtime.msh1uh5g.js +11 -0
- package/dist/vendor.fdumcx9j.js +224 -0
- package/package.json +13 -16
- package/dist/en.lh9n40a2.js +0 -2
- package/dist/i18n-en.ioic6dni.js +0 -99
- package/dist/i18n-zhHans.jmqbtwe8.js +0 -99
- package/dist/vendor.nojbp8i6.js +0 -203
- package/dist/zhHans.k0vi0ko0.js +0 -2
package/dist/index.js
CHANGED
|
@@ -1,203 +1,218 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.id=`x-essential-lib`,e.appendChild(document.createTextNode(`.fade-leave-active[data-v-99c4198b]{transition:opacity .5s}.fade-leave-to[data-v-99c4198b]{opacity:0}.x-cont[data-v-99c4198b]{justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.lds-spinner[data-v-99c4198b]{color:official;width:40px;height:40px;display:inline-block;position:relative}.lds-spinner div[data-v-99c4198b]{transform-origin:20px 20px;animation:1.2s linear infinite lds-spinner-99c4198b}.lds-spinner div[data-v-99c4198b]:after{content:" ";background:#9e9e9e;border-radius:5%;width:2px;height:6px;display:block;position:absolute;top:3px;left:18px}.lds-spinner div[data-v-99c4198b]:first-child{animation-delay:-1.1s;transform:rotate(0)}.lds-spinner div[data-v-99c4198b]:nth-child(2){animation-delay:-1s;transform:rotate(30deg)}.lds-spinner div[data-v-99c4198b]:nth-child(3){animation-delay:-.9s;transform:rotate(60deg)}.lds-spinner div[data-v-99c4198b]:nth-child(4){animation-delay:-.8s;transform:rotate(90deg)}.lds-spinner div[data-v-99c4198b]:nth-child(5){animation-delay:-.7s;transform:rotate(120deg)}.lds-spinner div[data-v-99c4198b]:nth-child(6){animation-delay:-.6s;transform:rotate(150deg)}.lds-spinner div[data-v-99c4198b]:nth-child(7){animation-delay:-.5s;transform:rotate(180deg)}.lds-spinner div[data-v-99c4198b]:nth-child(8){animation-delay:-.4s;transform:rotate(210deg)}.lds-spinner div[data-v-99c4198b]:nth-child(9){animation-delay:-.3s;transform:rotate(240deg)}.lds-spinner div[data-v-99c4198b]:nth-child(10){animation-delay:-.2s;transform:rotate(270deg)}.lds-spinner div[data-v-99c4198b]:nth-child(11){animation-delay:-.1s;transform:rotate(300deg)}.lds-spinner div[data-v-99c4198b]:nth-child(12){animation-delay:0s;transform:rotate(330deg)}@keyframes lds-spinner-99c4198b{0%{opacity:1}to{opacity:0}}.x-item[data-v-5b5f6d09]{width:600px}@media (
|
|
2
|
-
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { i as
|
|
3
|
-
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isRef, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, resolveComponent, toDisplayString, unref, useTemplateRef, watch, watchEffect, withCtx, withKeys, withModifiers } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
|
-
import { useDisplay, useTheme } from "vuetify";
|
|
6
|
-
import { useRoute, useRouter } from "vue-router";
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.id=`x-essential-lib`,e.appendChild(document.createTextNode(`.fade-leave-active[data-v-99c4198b]{transition:opacity .5s}.fade-leave-to[data-v-99c4198b]{opacity:0}.x-cont[data-v-99c4198b]{justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.lds-spinner[data-v-99c4198b]{color:official;width:40px;height:40px;display:inline-block;position:relative}.lds-spinner div[data-v-99c4198b]{transform-origin:20px 20px;animation:1.2s linear infinite lds-spinner-99c4198b}.lds-spinner div[data-v-99c4198b]:after{content:" ";background:#9e9e9e;border-radius:5%;width:2px;height:6px;display:block;position:absolute;top:3px;left:18px}.lds-spinner div[data-v-99c4198b]:first-child{animation-delay:-1.1s;transform:rotate(0)}.lds-spinner div[data-v-99c4198b]:nth-child(2){animation-delay:-1s;transform:rotate(30deg)}.lds-spinner div[data-v-99c4198b]:nth-child(3){animation-delay:-.9s;transform:rotate(60deg)}.lds-spinner div[data-v-99c4198b]:nth-child(4){animation-delay:-.8s;transform:rotate(90deg)}.lds-spinner div[data-v-99c4198b]:nth-child(5){animation-delay:-.7s;transform:rotate(120deg)}.lds-spinner div[data-v-99c4198b]:nth-child(6){animation-delay:-.6s;transform:rotate(150deg)}.lds-spinner div[data-v-99c4198b]:nth-child(7){animation-delay:-.5s;transform:rotate(180deg)}.lds-spinner div[data-v-99c4198b]:nth-child(8){animation-delay:-.4s;transform:rotate(210deg)}.lds-spinner div[data-v-99c4198b]:nth-child(9){animation-delay:-.3s;transform:rotate(240deg)}.lds-spinner div[data-v-99c4198b]:nth-child(10){animation-delay:-.2s;transform:rotate(270deg)}.lds-spinner div[data-v-99c4198b]:nth-child(11){animation-delay:-.1s;transform:rotate(300deg)}.lds-spinner div[data-v-99c4198b]:nth-child(12){animation-delay:0s;transform:rotate(330deg)}@keyframes lds-spinner-99c4198b{0%{opacity:1}to{opacity:0}}.x-item[data-v-5b5f6d09]{width:600px}@media (width<=600px){.x-item[data-v-5b5f6d09]{width:calc(100vw - 16px)}}.x-cont[data-v-b482df18]{z-index:9999;position:fixed;bottom:20px;left:50%;transform:translate(-50%)}
|
|
2
|
+
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { i as e, n as t, r as n, t as r } from "./vendor.fdumcx9j.js";
|
|
3
|
+
import { Fragment as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, isRef as h, normalizeStyle as g, onBeforeMount as _, onBeforeUnmount as v, onMounted as y, openBlock as b, provide as x, ref as S, renderList as C, resolveComponent as w, toDisplayString as T, unref as E, useTemplateRef as D, watch as O, watchEffect as k, withCtx as A, withKeys as j, withModifiers as M } from "vue";
|
|
4
|
+
import { useI18n as N } from "vue-i18n";
|
|
5
|
+
import { useDisplay as ee, useTheme as P } from "vuetify";
|
|
6
|
+
import { useRoute as te, useRouter as ne } from "vue-router";
|
|
7
|
+
import re from "axios";
|
|
8
|
+
//#region src/composables/color.ts
|
|
9
|
+
function ie() {
|
|
10
|
+
let e = P();
|
|
10
11
|
return {
|
|
11
|
-
primaryColor:
|
|
12
|
-
secondaryColor:
|
|
13
|
-
backgroundColor0:
|
|
14
|
-
backgroundColor1:
|
|
15
|
-
backgroundColor2:
|
|
16
|
-
highlightColor:
|
|
17
|
-
borderColor:
|
|
12
|
+
primaryColor: o(() => e.global.current.value.colors.primary),
|
|
13
|
+
secondaryColor: o(() => e.global.current.value.colors.secondary),
|
|
14
|
+
backgroundColor0: o(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"),
|
|
15
|
+
backgroundColor1: o(() => e.current.value.dark ? "#272727" : "#eeeeee"),
|
|
16
|
+
backgroundColor2: o(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"),
|
|
17
|
+
highlightColor: o(() => e.current.value.dark ? "#303030" : "#f6f6f6"),
|
|
18
|
+
borderColor: o(() => e.current.value.dark ? "#ffffff1f" : "#0000001f")
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/utils/axios.ts
|
|
23
|
+
function ae(e) {
|
|
24
|
+
let t = re.create({ timeout: 6e3 });
|
|
25
|
+
return t.defaults.baseURL = e.baseUrl, t.interceptors.request.use((e) => oe(e), (t) => {
|
|
26
|
+
se(t, e.onError);
|
|
27
|
+
}), t.interceptors.response.use((e) => ce(e), (t) => le(t, e.onError)), t;
|
|
25
28
|
}
|
|
26
|
-
function
|
|
27
|
-
let
|
|
28
|
-
return e.headers.Authorization = "Basic " +
|
|
29
|
+
function oe(e) {
|
|
30
|
+
let t = n.get("accessToken") ?? "";
|
|
31
|
+
return e.headers.Authorization = "Basic " + t, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
console.error(e),
|
|
33
|
+
function se(e, t) {
|
|
34
|
+
console.error(e), t("request timeout");
|
|
32
35
|
}
|
|
33
|
-
function
|
|
36
|
+
function ce(e) {
|
|
34
37
|
return e.data;
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
code:
|
|
40
|
-
message:
|
|
39
|
+
function le(e, t) {
|
|
40
|
+
let n = e.response;
|
|
41
|
+
return n ? (n.status === 401 && ue(), n.data?.message ? t(n.data?.message) : t({
|
|
42
|
+
code: n.status,
|
|
43
|
+
message: n.statusText
|
|
41
44
|
}), Promise.reject(e)) : Promise.reject(e);
|
|
42
45
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
46
|
+
function ue() {
|
|
47
|
+
n.remove("accessToken"), n.remove("refreshToken"), n.remove("userId"), n.remove("userName"), n.remove("phone"), n.remove("activeOrg"), ne().replace({ path: "/passport/login" });
|
|
45
48
|
}
|
|
46
|
-
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/utils/misc.ts
|
|
51
|
+
var de = (function() {
|
|
47
52
|
return window.globalObjects || (window.globalObjects = {
|
|
48
53
|
router: null,
|
|
49
54
|
i18n: null
|
|
50
55
|
}, console.log("globalObjects created")), window.globalObjects;
|
|
51
|
-
})(),
|
|
52
|
-
return window.eventBus || (window.eventBus =
|
|
56
|
+
})(), F = (function() {
|
|
57
|
+
return window.eventBus || (window.eventBus = t(), console.log("eventBus created")), window.eventBus;
|
|
53
58
|
})();
|
|
54
|
-
async function
|
|
55
|
-
return new Promise((
|
|
56
|
-
setTimeout(
|
|
59
|
+
async function fe(e) {
|
|
60
|
+
return new Promise((t) => {
|
|
61
|
+
setTimeout(t, e);
|
|
57
62
|
});
|
|
58
63
|
}
|
|
59
|
-
async function
|
|
60
|
-
let
|
|
61
|
-
return new Promise((
|
|
62
|
-
let
|
|
63
|
-
e() ?
|
|
64
|
+
async function I(e, t, n) {
|
|
65
|
+
let r = Date.now();
|
|
66
|
+
return new Promise((i) => {
|
|
67
|
+
let a = async () => {
|
|
68
|
+
e() ? i(!0) : t && Date.now() - r > t ? i(!1) : setTimeout(a, n ?? 30);
|
|
64
69
|
};
|
|
65
|
-
|
|
70
|
+
a();
|
|
66
71
|
});
|
|
67
72
|
}
|
|
68
|
-
function
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
function pe(e, t) {
|
|
74
|
+
let n = document.getElementById("single-spa-application:" + e);
|
|
75
|
+
n && (n.classList.remove("app-left", "app-right", "app-reset"), t ? n.classList.add("app-left") : n.classList.add("app-right"), setTimeout(() => {
|
|
76
|
+
n.classList.add("app-reset");
|
|
72
77
|
}, 50));
|
|
73
78
|
}
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/utils/dialog.ts
|
|
81
|
+
var L = Date.now();
|
|
82
|
+
function R() {
|
|
76
83
|
let e = Date.now();
|
|
77
|
-
return e -
|
|
78
|
-
}
|
|
79
|
-
var
|
|
80
|
-
function
|
|
81
|
-
return ++
|
|
82
|
-
}
|
|
83
|
-
async function
|
|
84
|
-
if (!
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
return
|
|
84
|
+
return e - L > 500 ? (L = e, !0) : !1;
|
|
85
|
+
}
|
|
86
|
+
var me = 0;
|
|
87
|
+
function z() {
|
|
88
|
+
return ++me;
|
|
89
|
+
}
|
|
90
|
+
async function he(e) {
|
|
91
|
+
if (!R()) return;
|
|
92
|
+
let t = !1, n, r = (e) => {
|
|
93
|
+
n = e, t = !0;
|
|
94
|
+
}, i = z();
|
|
95
|
+
return F.on("confirmDlgResult" + i, r), F.emit("confirmDlg", {
|
|
89
96
|
...e,
|
|
90
|
-
seq:
|
|
91
|
-
}), await
|
|
92
|
-
}
|
|
93
|
-
async function
|
|
94
|
-
if (!
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
return
|
|
97
|
+
seq: i
|
|
98
|
+
}), await I(() => t), F.off("confirmDlgResult" + i, r), n;
|
|
99
|
+
}
|
|
100
|
+
async function ge(e) {
|
|
101
|
+
if (!R()) return;
|
|
102
|
+
let t = !1, n, r = (e) => {
|
|
103
|
+
n = e, t = !0;
|
|
104
|
+
}, i = z();
|
|
105
|
+
return F.on("numberDlgResult" + i, r), F.emit("numberDlg", {
|
|
99
106
|
...e,
|
|
100
|
-
seq:
|
|
101
|
-
}), await
|
|
102
|
-
}
|
|
103
|
-
async function
|
|
104
|
-
if (!
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
return
|
|
107
|
+
seq: i
|
|
108
|
+
}), await I(() => t), F.off("numberDlgResult" + i, r), n;
|
|
109
|
+
}
|
|
110
|
+
async function _e(e) {
|
|
111
|
+
if (!R()) return;
|
|
112
|
+
let t = !1, n, r = (e) => {
|
|
113
|
+
n = e, t = !0;
|
|
114
|
+
}, i = z();
|
|
115
|
+
return F.on("promptDlgResult" + i, r), F.emit("promptDlg", {
|
|
109
116
|
...e,
|
|
110
|
-
seq:
|
|
111
|
-
}), await
|
|
117
|
+
seq: i
|
|
118
|
+
}), await I(() => t), F.off("promptDlgResult" + i, r), n;
|
|
112
119
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
120
|
+
function ve(e) {
|
|
121
|
+
F.emit("waitDlg", { text: e });
|
|
115
122
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
123
|
+
function ye() {
|
|
124
|
+
F.emit("closeWaitDlg");
|
|
118
125
|
}
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/utils/message.ts
|
|
128
|
+
function be(e, t) {
|
|
129
|
+
F.emit("message", {
|
|
121
130
|
type: "error",
|
|
122
131
|
text: e,
|
|
123
|
-
timeout:
|
|
132
|
+
timeout: t
|
|
124
133
|
});
|
|
125
134
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
135
|
+
function xe(e, t) {
|
|
136
|
+
F.emit("message", {
|
|
128
137
|
type: "info",
|
|
129
138
|
text: e,
|
|
130
|
-
timeout:
|
|
139
|
+
timeout: t
|
|
131
140
|
});
|
|
132
141
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
142
|
+
function Se(e, t) {
|
|
143
|
+
F.emit("message", {
|
|
135
144
|
type: "success",
|
|
136
145
|
text: e,
|
|
137
|
-
timeout:
|
|
146
|
+
timeout: t
|
|
138
147
|
});
|
|
139
148
|
}
|
|
140
|
-
function
|
|
141
|
-
|
|
149
|
+
function Ce(e, t) {
|
|
150
|
+
F.emit("message", {
|
|
142
151
|
type: "warning",
|
|
143
152
|
text: e,
|
|
144
|
-
timeout:
|
|
153
|
+
timeout: t
|
|
145
154
|
});
|
|
146
155
|
}
|
|
147
|
-
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/utils/permission.ts
|
|
158
|
+
var we = /* @__PURE__ */ function(e) {
|
|
148
159
|
return 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.debug_flow = "debug_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_group = "list_org_role_group", e.create_org_role_group = "create_org_role_group", e.delete_org_role_group = "delete_org_role_group", e.update_org_role_group = "update_org_role_group", e.arrange_org_role_group = "arrange_org_role_group", 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.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_table = "filter_table", e;
|
|
149
160
|
}({});
|
|
150
|
-
function
|
|
161
|
+
function B(e, t) {
|
|
151
162
|
if (!e) return !1;
|
|
152
|
-
let
|
|
153
|
-
return Object.keys(
|
|
154
|
-
if (Object.keys(
|
|
155
|
-
if (
|
|
163
|
+
let n = e;
|
|
164
|
+
return Object.keys(n).length <= 0 || (t.split("/").forEach((e) => {
|
|
165
|
+
if (Object.keys(n).length <= 0) return !0;
|
|
166
|
+
if (n[e]) n = n[e];
|
|
156
167
|
else return !1;
|
|
157
|
-
}), Object.keys(
|
|
168
|
+
}), Object.keys(n).length <= 0);
|
|
158
169
|
}
|
|
159
|
-
function
|
|
160
|
-
let
|
|
161
|
-
return
|
|
170
|
+
function V(e, t, n) {
|
|
171
|
+
let r = e[t];
|
|
172
|
+
return r ? n ? !(!B(r.includes, n) || B(r.excludes, n)) : !0 : !1;
|
|
162
173
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/utils/provideInject.ts
|
|
176
|
+
var H = "essentialDark", U = "essentialLocale", W = "essentialPermissionObjects", G = "essentialPermissionChecksum", K = "essentialLastAppPath", q = "essentialViews";
|
|
177
|
+
function Te(e) {
|
|
178
|
+
x(H, e);
|
|
166
179
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
180
|
+
function Ee() {
|
|
181
|
+
return m(H);
|
|
169
182
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
183
|
+
function De(e) {
|
|
184
|
+
x(U, e);
|
|
172
185
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
186
|
+
function Oe() {
|
|
187
|
+
return m(U);
|
|
175
188
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
189
|
+
function ke(e) {
|
|
190
|
+
x(W, e);
|
|
178
191
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
192
|
+
function Ae() {
|
|
193
|
+
return m(W);
|
|
181
194
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
195
|
+
function je(e) {
|
|
196
|
+
x(G, e);
|
|
184
197
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
198
|
+
function Me() {
|
|
199
|
+
return m(G);
|
|
187
200
|
}
|
|
188
|
-
function
|
|
189
|
-
|
|
201
|
+
function Ne(e) {
|
|
202
|
+
x(K, e);
|
|
190
203
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
204
|
+
function Pe() {
|
|
205
|
+
return m(K);
|
|
193
206
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
207
|
+
function Fe(e) {
|
|
208
|
+
x(q, e);
|
|
196
209
|
}
|
|
197
|
-
function
|
|
198
|
-
return
|
|
210
|
+
function Ie() {
|
|
211
|
+
return m(q);
|
|
199
212
|
}
|
|
200
|
-
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/utils/router.ts
|
|
215
|
+
var Le = [
|
|
201
216
|
{
|
|
202
217
|
app: "x-passport-mf",
|
|
203
218
|
path: "/passport/login",
|
|
@@ -308,70 +323,72 @@ var routeMetas = [
|
|
|
308
323
|
mainActive: 2
|
|
309
324
|
}
|
|
310
325
|
];
|
|
311
|
-
function
|
|
312
|
-
let
|
|
313
|
-
return
|
|
314
|
-
let
|
|
315
|
-
for (let e = 0; e <
|
|
316
|
-
|
|
317
|
-
}),
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function
|
|
321
|
-
|
|
322
|
-
let
|
|
323
|
-
if (!
|
|
326
|
+
function J(e) {
|
|
327
|
+
let t, n = 0, r = e.split("/").filter((e) => e.trim() !== "");
|
|
328
|
+
return Le.forEach((e) => {
|
|
329
|
+
let i = e.path.split("/").filter((e) => e.trim() !== ""), a = 0;
|
|
330
|
+
for (let e = 0; e < r.length && !(e >= i.length || r[e] !== i[e]); e++) a++;
|
|
331
|
+
a > 0 && a > n && (t = e, n = a);
|
|
332
|
+
}), t;
|
|
333
|
+
}
|
|
334
|
+
var Y = S("");
|
|
335
|
+
function X(e, t, n) {
|
|
336
|
+
t === "/" && (t = n);
|
|
337
|
+
let r = J(e), i = J(t);
|
|
338
|
+
if (!r) {
|
|
324
339
|
console.assert(!1);
|
|
325
340
|
return;
|
|
326
341
|
}
|
|
327
|
-
if (console.info(`~~~~routeChange~~~~ ${
|
|
328
|
-
let
|
|
329
|
-
|
|
342
|
+
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !i) return;
|
|
343
|
+
let a = r.app === i.app, o = r.path === i.path, s = r.level >= i.level;
|
|
344
|
+
a ? o ? Y.value = "" : Y.value = s ? "inner-left" : "inner-right" : (Y.value = "", pe(r.app, s));
|
|
330
345
|
}
|
|
331
|
-
function
|
|
332
|
-
return !!
|
|
346
|
+
function Re() {
|
|
347
|
+
return !!n.get("accessToken");
|
|
333
348
|
}
|
|
334
|
-
function
|
|
335
|
-
return !!
|
|
349
|
+
function ze() {
|
|
350
|
+
return !!n.get("activeOrg");
|
|
336
351
|
}
|
|
337
|
-
function
|
|
338
|
-
let
|
|
339
|
-
if (!
|
|
340
|
-
if (
|
|
352
|
+
function Be(e, t, n) {
|
|
353
|
+
let r = Re(), i = ze(), a = J(e.path);
|
|
354
|
+
if (!a) throw Error("to route meta invalid");
|
|
355
|
+
if (a.requiredState === "auth") if (r) if (i) {
|
|
341
356
|
let e = "/main";
|
|
342
|
-
return
|
|
357
|
+
return X(e, t.path, n), { path: e };
|
|
343
358
|
} else {
|
|
344
|
-
|
|
359
|
+
X(e.path, t.path, n);
|
|
345
360
|
return;
|
|
346
361
|
}
|
|
347
362
|
else {
|
|
348
363
|
let e = "/passport/login";
|
|
349
|
-
return
|
|
364
|
+
return X(e, t.path, n), { path: e };
|
|
350
365
|
}
|
|
351
|
-
else if (
|
|
352
|
-
|
|
366
|
+
else if (a.requiredState === "org") if (r) if (i) {
|
|
367
|
+
X(e.path, t.path, n);
|
|
353
368
|
return;
|
|
354
369
|
} else {
|
|
355
370
|
let e = "/org/joinOrCreate";
|
|
356
|
-
return
|
|
371
|
+
return X(e, t.path, n), { path: e };
|
|
357
372
|
}
|
|
358
373
|
else {
|
|
359
374
|
let e = "/passport/login";
|
|
360
|
-
return
|
|
375
|
+
return X(e, t.path, n), { path: e };
|
|
361
376
|
}
|
|
362
|
-
else if (
|
|
377
|
+
else if (r) if (i) {
|
|
363
378
|
let e = "/main";
|
|
364
|
-
return
|
|
379
|
+
return X(e, t.path, n), { path: e };
|
|
365
380
|
} else {
|
|
366
381
|
let e = "/org/joinOrCreate";
|
|
367
|
-
return
|
|
382
|
+
return X(e, t.path, n), { path: e };
|
|
368
383
|
}
|
|
369
384
|
else {
|
|
370
|
-
|
|
385
|
+
X(e.path, t.path, n);
|
|
371
386
|
return;
|
|
372
387
|
}
|
|
373
388
|
}
|
|
374
|
-
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/utils/type.ts
|
|
391
|
+
var Ve = [
|
|
375
392
|
"string",
|
|
376
393
|
"number",
|
|
377
394
|
"boolean",
|
|
@@ -379,7 +396,7 @@ const types = [
|
|
|
379
396
|
"object",
|
|
380
397
|
"any"
|
|
381
398
|
];
|
|
382
|
-
function
|
|
399
|
+
function He(e) {
|
|
383
400
|
switch (e) {
|
|
384
401
|
case "string": return "#5ba58c";
|
|
385
402
|
case "number": return "#5b67a5";
|
|
@@ -389,7 +406,7 @@ function getTypeColor(e) {
|
|
|
389
406
|
case "any": return "#9e9e9e";
|
|
390
407
|
}
|
|
391
408
|
}
|
|
392
|
-
function
|
|
409
|
+
function Ue(e) {
|
|
393
410
|
switch (e) {
|
|
394
411
|
case "string": return "";
|
|
395
412
|
case "number": return 0;
|
|
@@ -399,166 +416,178 @@ function getTypeDefault(e) {
|
|
|
399
416
|
case "any": return null;
|
|
400
417
|
}
|
|
401
418
|
}
|
|
402
|
-
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region src/utils/viewMgr.ts
|
|
421
|
+
function We(e) {
|
|
403
422
|
return e.value.length <= 0;
|
|
404
423
|
}
|
|
405
|
-
function
|
|
424
|
+
function Ge(e) {
|
|
406
425
|
if (e.value.length > 0) return e.value[e.value.length - 1];
|
|
407
426
|
}
|
|
408
|
-
function
|
|
409
|
-
return !!e.value.find((e) => e ===
|
|
427
|
+
function Z(e, t) {
|
|
428
|
+
return !!e.value.find((e) => e === t);
|
|
410
429
|
}
|
|
411
|
-
function
|
|
412
|
-
let
|
|
413
|
-
|
|
430
|
+
function Ke(e, t) {
|
|
431
|
+
let n = e.value.findIndex((e) => e === t);
|
|
432
|
+
n >= 0 && e.value.splice(n, 1), e.value.push(t);
|
|
414
433
|
}
|
|
415
|
-
function
|
|
416
|
-
let
|
|
417
|
-
|
|
434
|
+
function qe(e, t) {
|
|
435
|
+
let n = e.value.findIndex((e) => e === t);
|
|
436
|
+
n >= 0 && e.value.splice(n, 1);
|
|
418
437
|
}
|
|
419
|
-
function
|
|
438
|
+
function Je(e) {
|
|
420
439
|
console.assert(e.value.length > 0), e.value.pop();
|
|
421
440
|
}
|
|
422
|
-
function
|
|
441
|
+
function Ye(e) {
|
|
423
442
|
e.value = [];
|
|
424
443
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/composables/microApp.ts
|
|
446
|
+
function Xe(t, n, r, i, a, o) {
|
|
447
|
+
let s = te(), c = ne(), l = e(), u = S(!1);
|
|
448
|
+
k(() => {
|
|
428
449
|
let e;
|
|
429
|
-
e = typeof
|
|
430
|
-
}),
|
|
431
|
-
let
|
|
432
|
-
|
|
433
|
-
|
|
450
|
+
e = typeof t.value == "boolean" ? t.value : l.value, u.value = e;
|
|
451
|
+
}), Te(u), De(n), ke(r), je(i), Ne(a), Fe(o);
|
|
452
|
+
let d = P();
|
|
453
|
+
k(() => {
|
|
454
|
+
d.change(u.value ? "dark" : "light");
|
|
434
455
|
});
|
|
435
|
-
let
|
|
436
|
-
if (!
|
|
437
|
-
|
|
456
|
+
let f = () => {
|
|
457
|
+
if (!We(o)) {
|
|
458
|
+
Z(o, "waitDlg") || Je(o);
|
|
438
459
|
return;
|
|
439
460
|
}
|
|
440
|
-
let e =
|
|
461
|
+
let e = J(s.path);
|
|
441
462
|
if (!e) {
|
|
442
463
|
console.assert(!1);
|
|
443
464
|
return;
|
|
444
465
|
}
|
|
445
|
-
e.level === 0 ? navigator?.Backbutton?.goHome(() => {}, () => {}) :
|
|
446
|
-
},
|
|
466
|
+
e.level === 0 ? navigator?.Backbutton?.goHome(() => {}, () => {}) : c.back();
|
|
467
|
+
}, p = (e) => {
|
|
447
468
|
if (e.key === "Escape") {
|
|
448
|
-
|
|
469
|
+
f();
|
|
449
470
|
return;
|
|
450
471
|
}
|
|
451
|
-
},
|
|
452
|
-
|
|
472
|
+
}, m = () => {
|
|
473
|
+
f();
|
|
453
474
|
};
|
|
454
|
-
|
|
455
|
-
window.addEventListener("keydown",
|
|
456
|
-
}),
|
|
457
|
-
window.removeEventListener("keydown",
|
|
475
|
+
y(() => {
|
|
476
|
+
window.addEventListener("keydown", p), F.on("backbutton", m);
|
|
477
|
+
}), v(() => {
|
|
478
|
+
window.removeEventListener("keydown", p), F.off("backbutton", m);
|
|
458
479
|
});
|
|
459
|
-
let
|
|
460
|
-
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
},
|
|
464
|
-
let
|
|
465
|
-
|
|
466
|
-
},
|
|
467
|
-
|
|
480
|
+
let h = (e) => {
|
|
481
|
+
t.value = e;
|
|
482
|
+
}, g = (e) => {
|
|
483
|
+
n.value = e;
|
|
484
|
+
}, b = (e) => {
|
|
485
|
+
let t = e;
|
|
486
|
+
r.value = t[0], i.value = t[1];
|
|
487
|
+
}, x = (e) => {
|
|
488
|
+
a.value = e;
|
|
468
489
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}),
|
|
472
|
-
|
|
490
|
+
_(() => {
|
|
491
|
+
F.on("updateDark", h), F.on("updateLocale", g), F.on("updatePermission", b), F.on("updateLastAppPath", x), F.emit("syncGlobalState");
|
|
492
|
+
}), v(() => {
|
|
493
|
+
F.off("updateDark", h), F.off("updateLocale", g), F.off("updatePermission", b), F.off("updateLastAppPath", x);
|
|
473
494
|
});
|
|
474
495
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/composables/permission.ts
|
|
498
|
+
function Ze() {
|
|
499
|
+
let e = Ae();
|
|
500
|
+
function t(t, n) {
|
|
501
|
+
return V(e.value, t, n ?? "");
|
|
479
502
|
}
|
|
480
|
-
return { verifyPermission:
|
|
503
|
+
return { verifyPermission: t };
|
|
481
504
|
}
|
|
482
|
-
|
|
483
|
-
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/composables/system.ts
|
|
507
|
+
function Qe() {
|
|
508
|
+
let { locale: e, t } = N(), n = o(() => !!window.cordova), i = ee();
|
|
484
509
|
return {
|
|
485
|
-
sysBarAvail:
|
|
486
|
-
compactWidth:
|
|
487
|
-
isCurvedScreen:
|
|
510
|
+
sysBarAvail: n,
|
|
511
|
+
compactWidth: o(() => i.width.value <= 1280 ? i.width.value + "px" : i.width.value <= 1920 ? "768px" : "1024px"),
|
|
512
|
+
isCurvedScreen: o(() => !1),
|
|
488
513
|
isMobile: () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
|
|
489
|
-
nameList: (
|
|
490
|
-
let
|
|
491
|
-
return
|
|
514
|
+
nameList: (n, r) => {
|
|
515
|
+
let i, a = n.map((e) => t(e));
|
|
516
|
+
return i = r ? `${a.join("/")} <${r.join("/")}>` : e.value === "en" ? a.join(" ") : a.join(""), i;
|
|
492
517
|
},
|
|
493
|
-
sentenceOfAsk: (
|
|
494
|
-
verb:
|
|
495
|
-
object:
|
|
496
|
-
name:
|
|
497
|
-
}) :
|
|
498
|
-
verb:
|
|
499
|
-
object:
|
|
500
|
-
name:
|
|
518
|
+
sentenceOfAsk: (n, i, a) => e.value === "en" ? t("dlg.common.ask", {
|
|
519
|
+
verb: r(t(n)),
|
|
520
|
+
object: r(t(i)),
|
|
521
|
+
name: a
|
|
522
|
+
}) : t("dlg.common.ask", {
|
|
523
|
+
verb: t(n),
|
|
524
|
+
object: t(i),
|
|
525
|
+
name: a
|
|
501
526
|
})
|
|
502
527
|
};
|
|
503
528
|
}
|
|
504
|
-
|
|
505
|
-
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region src/composables/viewStack.ts
|
|
531
|
+
function Q(e, t) {
|
|
532
|
+
let n = Ie(), r = o({
|
|
506
533
|
get() {
|
|
507
|
-
return
|
|
534
|
+
return Z(n, e);
|
|
508
535
|
},
|
|
509
|
-
set(
|
|
510
|
-
|
|
536
|
+
set(t) {
|
|
537
|
+
t ? Ke(n, e) : qe(n, e);
|
|
511
538
|
}
|
|
512
|
-
}),
|
|
513
|
-
|
|
539
|
+
}), i = (e) => {
|
|
540
|
+
t?.(e), r.value = !0;
|
|
514
541
|
};
|
|
515
|
-
return
|
|
516
|
-
|
|
517
|
-
}),
|
|
518
|
-
|
|
519
|
-
}), { open:
|
|
520
|
-
}
|
|
521
|
-
|
|
542
|
+
return y(() => {
|
|
543
|
+
F.on(e, i);
|
|
544
|
+
}), v(() => {
|
|
545
|
+
F.off(e, i);
|
|
546
|
+
}), { open: r };
|
|
547
|
+
}
|
|
548
|
+
//#endregion
|
|
549
|
+
//#region src/components/confirmDlg/index.vue
|
|
550
|
+
var $e = /* @__PURE__ */ p({
|
|
522
551
|
__name: "index",
|
|
523
552
|
setup(e) {
|
|
524
|
-
let { t
|
|
525
|
-
|
|
526
|
-
}),
|
|
527
|
-
|
|
553
|
+
let { t } = N(), n = S(""), r = S(""), i = S(""), a = S(""), o = S(""), c = S(""), l = S(""), u = 0, p = !1, { open: m } = Q("confirmDlg", (e) => {
|
|
554
|
+
n.value = e.title, r.value = e.subtitle ?? "", i.value = e.text, a.value = e.cancel?.color ?? "primary", o.value = e.cancel?.text ?? t("dlg.common.cancel"), c.value = e.confirm?.color ?? "primary", l.value = e.confirm?.text ?? t("dlg.common.confirm"), u = e.seq, p = !1, m.value = !0;
|
|
555
|
+
}), g = () => {
|
|
556
|
+
m.value = !1, p ||= (F.emit("confirmDlgResult" + u, !0), !0);
|
|
528
557
|
};
|
|
529
|
-
return
|
|
530
|
-
!e && !
|
|
531
|
-
}), (e,
|
|
532
|
-
let
|
|
533
|
-
return
|
|
534
|
-
modelValue:
|
|
535
|
-
"onUpdate:modelValue":
|
|
558
|
+
return O(m, (e) => {
|
|
559
|
+
!e && !p && (F.emit("confirmDlgResult" + u, !1), p = !0);
|
|
560
|
+
}), (e, t) => {
|
|
561
|
+
let u = w("v-card-text"), p = w("v-btn"), _ = w("v-card-actions"), v = w("v-card"), y = w("v-dialog");
|
|
562
|
+
return b(), s(y, {
|
|
563
|
+
modelValue: E(m),
|
|
564
|
+
"onUpdate:modelValue": t[1] ||= (e) => h(m) ? m.value = e : null,
|
|
536
565
|
attach: "",
|
|
537
566
|
"max-width": "600px",
|
|
538
567
|
transition: "dialog-top-transition",
|
|
539
|
-
onKeydown: [
|
|
568
|
+
onKeydown: [j(M(g, ["stop", "prevent"]), ["enter"]), t[2] ||= j(M((e) => m.value = !1, ["stop", "prevent"]), ["esc"])]
|
|
540
569
|
}, {
|
|
541
|
-
default:
|
|
542
|
-
subtitle:
|
|
543
|
-
title:
|
|
570
|
+
default: A(() => [f(v, {
|
|
571
|
+
subtitle: r.value,
|
|
572
|
+
title: n.value
|
|
544
573
|
}, {
|
|
545
|
-
default:
|
|
546
|
-
default:
|
|
574
|
+
default: A(() => [f(u, null, {
|
|
575
|
+
default: A(() => [d(T(i.value), 1)]),
|
|
547
576
|
_: 1
|
|
548
|
-
}),
|
|
549
|
-
default:
|
|
550
|
-
color:
|
|
577
|
+
}), f(_, { class: "d-flex justify-end" }, {
|
|
578
|
+
default: A(() => [f(p, {
|
|
579
|
+
color: a.value,
|
|
551
580
|
variant: "text",
|
|
552
|
-
onClick:
|
|
581
|
+
onClick: t[0] ||= (e) => m.value = !1
|
|
553
582
|
}, {
|
|
554
|
-
default:
|
|
583
|
+
default: A(() => [d(T(o.value), 1)]),
|
|
555
584
|
_: 1
|
|
556
|
-
}, 8, ["color"]),
|
|
557
|
-
color:
|
|
585
|
+
}, 8, ["color"]), f(p, {
|
|
586
|
+
color: c.value,
|
|
558
587
|
variant: "text",
|
|
559
|
-
onClick:
|
|
588
|
+
onClick: g
|
|
560
589
|
}, {
|
|
561
|
-
default:
|
|
590
|
+
default: A(() => [d(T(l.value), 1)]),
|
|
562
591
|
_: 1
|
|
563
592
|
}, 8, ["color"])]),
|
|
564
593
|
_: 1
|
|
@@ -569,7 +598,7 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
569
598
|
}, 8, ["modelValue", "onKeydown"]);
|
|
570
599
|
};
|
|
571
600
|
}
|
|
572
|
-
}),
|
|
601
|
+
}), et = /* @__PURE__ */ p({
|
|
573
602
|
__name: "index",
|
|
574
603
|
props: {
|
|
575
604
|
open: {
|
|
@@ -579,37 +608,37 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
579
608
|
zIndex: { default: 1 }
|
|
580
609
|
},
|
|
581
610
|
setup(e) {
|
|
582
|
-
let { backgroundColor2:
|
|
583
|
-
background:
|
|
611
|
+
let { backgroundColor2: t } = ie(), n = o(() => ({
|
|
612
|
+
background: t.value,
|
|
584
613
|
zIndex: e.zIndex
|
|
585
|
-
})),
|
|
586
|
-
return (
|
|
587
|
-
default:
|
|
588
|
-
key:
|
|
614
|
+
})), r = 0;
|
|
615
|
+
return (t, i) => (b(), s(a, { name: "fade" }, {
|
|
616
|
+
default: A(() => [e.open ? (b(), l("div", {
|
|
617
|
+
key: h(r) ? ++r.value : ++r,
|
|
589
618
|
class: "x-cont",
|
|
590
|
-
style:
|
|
591
|
-
}, [...
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
], -1)]], 4)) :
|
|
619
|
+
style: g(n.value)
|
|
620
|
+
}, [...i[0] ||= [u("div", { class: "lds-spinner" }, [
|
|
621
|
+
u("div"),
|
|
622
|
+
u("div"),
|
|
623
|
+
u("div"),
|
|
624
|
+
u("div"),
|
|
625
|
+
u("div"),
|
|
626
|
+
u("div"),
|
|
627
|
+
u("div"),
|
|
628
|
+
u("div"),
|
|
629
|
+
u("div"),
|
|
630
|
+
u("div"),
|
|
631
|
+
u("div"),
|
|
632
|
+
u("div")
|
|
633
|
+
], -1)]], 4)) : c("", !0)]),
|
|
605
634
|
_: 1
|
|
606
635
|
}));
|
|
607
636
|
}
|
|
608
|
-
}),
|
|
609
|
-
let
|
|
610
|
-
for (let [e,
|
|
611
|
-
return
|
|
612
|
-
},
|
|
637
|
+
}), $ = (e, t) => {
|
|
638
|
+
let n = e.__vccOpts || e;
|
|
639
|
+
for (let [e, r] of t) n[e] = r;
|
|
640
|
+
return n;
|
|
641
|
+
}, tt = /* @__PURE__ */ $(et, [["__scopeId", "data-v-99c4198b"]]), nt = /* @__PURE__ */ $(/* @__PURE__ */ p({
|
|
613
642
|
__name: "item",
|
|
614
643
|
props: {
|
|
615
644
|
id: {},
|
|
@@ -618,11 +647,11 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
618
647
|
timeout: { default: 5e3 }
|
|
619
648
|
},
|
|
620
649
|
emits: ["timeout"],
|
|
621
|
-
setup(e, { emit:
|
|
622
|
-
let
|
|
650
|
+
setup(e, { emit: t }) {
|
|
651
|
+
let n = o(() => ({
|
|
623
652
|
width: "calc(100% - 64px)",
|
|
624
653
|
overflowWrap: "break-word"
|
|
625
|
-
})),
|
|
654
|
+
})), r = o(() => {
|
|
626
655
|
switch (e.type) {
|
|
627
656
|
case "success": return "mdi-check-circle";
|
|
628
657
|
case "info": return "mdi-information";
|
|
@@ -630,73 +659,73 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
630
659
|
case "warning": return "mdi-alert-circle";
|
|
631
660
|
default: return "";
|
|
632
661
|
}
|
|
633
|
-
}),
|
|
634
|
-
return
|
|
662
|
+
}), i = S(!0), a = t;
|
|
663
|
+
return y(() => {
|
|
635
664
|
setTimeout(() => {
|
|
636
|
-
|
|
665
|
+
a("timeout", e.id);
|
|
637
666
|
}, e.timeout);
|
|
638
|
-
}),
|
|
639
|
-
|
|
640
|
-
}), (
|
|
641
|
-
let
|
|
642
|
-
return
|
|
667
|
+
}), O(i, (t) => {
|
|
668
|
+
t || a("timeout", e.id);
|
|
669
|
+
}), (t, i) => {
|
|
670
|
+
let o = w("v-icon"), l = w("v-sheet");
|
|
671
|
+
return b(), s(l, {
|
|
643
672
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
644
673
|
color: e.type,
|
|
645
674
|
elevation: 1
|
|
646
675
|
}, {
|
|
647
|
-
default:
|
|
648
|
-
|
|
676
|
+
default: A(() => [
|
|
677
|
+
r.value ? (b(), s(o, {
|
|
649
678
|
key: 0,
|
|
650
679
|
class: "mx-1",
|
|
651
|
-
icon:
|
|
652
|
-
}, null, 8, ["icon"])) :
|
|
653
|
-
|
|
654
|
-
|
|
680
|
+
icon: r.value
|
|
681
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
682
|
+
u("div", { style: g(n.value) }, T(e.text), 5),
|
|
683
|
+
f(o, {
|
|
655
684
|
class: "mx-1",
|
|
656
685
|
icon: "mdi-close",
|
|
657
|
-
onClick:
|
|
686
|
+
onClick: i[0] ||= (t) => a("timeout", e.id)
|
|
658
687
|
})
|
|
659
688
|
]),
|
|
660
689
|
_: 1
|
|
661
690
|
}, 8, ["color"]);
|
|
662
691
|
};
|
|
663
692
|
}
|
|
664
|
-
}), [["__scopeId", "data-v-5b5f6d09"]]),
|
|
693
|
+
}), [["__scopeId", "data-v-5b5f6d09"]]), rt = /* @__PURE__ */ $(/* @__PURE__ */ p({
|
|
665
694
|
__name: "index",
|
|
666
695
|
setup(e) {
|
|
667
|
-
let
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}),
|
|
671
|
-
|
|
696
|
+
let t = S([]);
|
|
697
|
+
y(() => {
|
|
698
|
+
F.on("message", n);
|
|
699
|
+
}), v(() => {
|
|
700
|
+
F.off("message", n);
|
|
672
701
|
});
|
|
673
|
-
let
|
|
674
|
-
let { type:
|
|
675
|
-
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
},
|
|
679
|
-
let
|
|
680
|
-
|
|
681
|
-
id:
|
|
702
|
+
let n = (e) => {
|
|
703
|
+
let { type: t, text: n, timeout: r } = e;
|
|
704
|
+
o(t, n, r);
|
|
705
|
+
}, r = (e) => {
|
|
706
|
+
c(e);
|
|
707
|
+
}, a = 0, o = (e, n, r) => {
|
|
708
|
+
let i = a++;
|
|
709
|
+
t.value.push({
|
|
710
|
+
id: i,
|
|
682
711
|
type: e,
|
|
683
|
-
text:
|
|
684
|
-
timeout:
|
|
712
|
+
text: n,
|
|
713
|
+
timeout: r
|
|
685
714
|
});
|
|
686
|
-
},
|
|
687
|
-
let
|
|
688
|
-
|
|
715
|
+
}, c = (e) => {
|
|
716
|
+
let n = t.value.findIndex((t) => t.id === e);
|
|
717
|
+
n >= 0 && t.value.splice(n, 1);
|
|
689
718
|
};
|
|
690
|
-
return (e,
|
|
719
|
+
return (e, n) => (b(), l("div", {
|
|
691
720
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
692
|
-
onClick:
|
|
693
|
-
}, [(
|
|
721
|
+
onClick: n[0] ||= M(() => {}, ["stop"])
|
|
722
|
+
}, [(b(!0), l(i, null, C(t.value, (e) => (b(), s(nt, {
|
|
694
723
|
id: e.id,
|
|
695
724
|
key: e.id,
|
|
696
725
|
text: e.text,
|
|
697
726
|
timeout: e.timeout,
|
|
698
727
|
type: e.type,
|
|
699
|
-
onTimeout:
|
|
728
|
+
onTimeout: r
|
|
700
729
|
}, null, 8, [
|
|
701
730
|
"id",
|
|
702
731
|
"text",
|
|
@@ -704,64 +733,64 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
704
733
|
"type"
|
|
705
734
|
]))), 128))]));
|
|
706
735
|
}
|
|
707
|
-
}), [["__scopeId", "data-v-b482df18"]]),
|
|
736
|
+
}), [["__scopeId", "data-v-b482df18"]]), it = /* @__PURE__ */ p({
|
|
708
737
|
__name: "index",
|
|
709
738
|
setup(e) {
|
|
710
|
-
let { t
|
|
711
|
-
|
|
712
|
-
}),
|
|
713
|
-
|
|
739
|
+
let { t } = N(), n = S(""), r = S(""), i = S(0), a = S(), o = S(-Infinity), c = S(Infinity), l = S(1), u = 0, p = !1, m = D("target"), { open: g } = Q("numberDlg", async (e) => {
|
|
740
|
+
n.value = e.title, r.value = e.subtitle ?? "", i.value = e.value, a.value = e.precision, o.value = e.min, c.value = e.max, l.value = e.step, u = e.seq, p = !1, g.value = !0, await I(() => !!m.value), m.value.focus();
|
|
741
|
+
}), _ = S(!1), v = () => {
|
|
742
|
+
g.value = !1, p ||= (F.emit(`numberDlgResult${u}`, i.value), !0);
|
|
714
743
|
};
|
|
715
|
-
return
|
|
716
|
-
!e && !
|
|
717
|
-
}), (e,
|
|
718
|
-
let
|
|
719
|
-
return
|
|
720
|
-
modelValue:
|
|
721
|
-
"onUpdate:modelValue":
|
|
744
|
+
return O(g, (e) => {
|
|
745
|
+
!e && !p && (F.emit(`numberDlgResult${u}`, void 0), p = !0);
|
|
746
|
+
}), (e, r) => {
|
|
747
|
+
let u = w("v-number-input"), p = w("v-btn"), y = w("v-card-actions"), x = w("v-form"), S = w("v-card"), C = w("v-dialog");
|
|
748
|
+
return b(), s(C, {
|
|
749
|
+
modelValue: E(g),
|
|
750
|
+
"onUpdate:modelValue": r[3] ||= (e) => h(g) ? g.value = e : null,
|
|
722
751
|
attach: "",
|
|
723
752
|
"max-width": "600px",
|
|
724
753
|
transition: "dialog-top-transition",
|
|
725
|
-
onKeydown:
|
|
754
|
+
onKeydown: r[4] ||= j(M((e) => g.value = !1, ["stop", "prevent"]), ["esc"])
|
|
726
755
|
}, {
|
|
727
|
-
default:
|
|
728
|
-
default:
|
|
729
|
-
modelValue:
|
|
730
|
-
"onUpdate:modelValue":
|
|
756
|
+
default: A(() => [f(S, { title: n.value }, {
|
|
757
|
+
default: A(() => [f(x, {
|
|
758
|
+
modelValue: _.value,
|
|
759
|
+
"onUpdate:modelValue": r[2] ||= (e) => _.value = e,
|
|
731
760
|
class: "mx-3",
|
|
732
|
-
onSubmit:
|
|
761
|
+
onSubmit: M(v, ["prevent"])
|
|
733
762
|
}, {
|
|
734
|
-
default:
|
|
763
|
+
default: A(() => [f(u, {
|
|
735
764
|
ref_key: "target",
|
|
736
|
-
ref:
|
|
737
|
-
modelValue:
|
|
738
|
-
"onUpdate:modelValue":
|
|
765
|
+
ref: m,
|
|
766
|
+
modelValue: i.value,
|
|
767
|
+
"onUpdate:modelValue": r[0] ||= (e) => i.value = e,
|
|
739
768
|
"control-variant": "stacked",
|
|
740
|
-
max:
|
|
741
|
-
min:
|
|
742
|
-
precision:
|
|
743
|
-
step:
|
|
769
|
+
max: c.value,
|
|
770
|
+
min: o.value,
|
|
771
|
+
precision: a.value,
|
|
772
|
+
step: l.value
|
|
744
773
|
}, null, 8, [
|
|
745
774
|
"modelValue",
|
|
746
775
|
"max",
|
|
747
776
|
"min",
|
|
748
777
|
"precision",
|
|
749
778
|
"step"
|
|
750
|
-
]),
|
|
751
|
-
default:
|
|
779
|
+
]), f(y, { class: "d-flex justify-end" }, {
|
|
780
|
+
default: A(() => [f(p, {
|
|
752
781
|
color: "primary",
|
|
753
782
|
variant: "text",
|
|
754
|
-
onClick:
|
|
783
|
+
onClick: r[1] ||= (e) => g.value = !1
|
|
755
784
|
}, {
|
|
756
|
-
default:
|
|
785
|
+
default: A(() => [d(T(E(t)("dlg.common.cancel")), 1)]),
|
|
757
786
|
_: 1
|
|
758
|
-
}),
|
|
787
|
+
}), f(p, {
|
|
759
788
|
color: "primary",
|
|
760
|
-
disabled: !
|
|
789
|
+
disabled: !_.value,
|
|
761
790
|
type: "submit",
|
|
762
791
|
variant: "text"
|
|
763
792
|
}, {
|
|
764
|
-
default:
|
|
793
|
+
default: A(() => [d(T(E(t)("dlg.common.confirm")), 1)]),
|
|
765
794
|
_: 1
|
|
766
795
|
}, 8, ["disabled"])]),
|
|
767
796
|
_: 1
|
|
@@ -774,67 +803,67 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
774
803
|
}, 8, ["modelValue"]);
|
|
775
804
|
};
|
|
776
805
|
}
|
|
777
|
-
}),
|
|
806
|
+
}), at = /* @__PURE__ */ p({
|
|
778
807
|
__name: "index",
|
|
779
808
|
setup(e) {
|
|
780
|
-
let { t
|
|
781
|
-
|
|
782
|
-
}),
|
|
783
|
-
|
|
809
|
+
let { t } = N(), n = S(""), r = S(""), i = S(""), a = S(""), o = S(""), l = S(), u = S(""), p = S(""), m = S(""), g = S(""), _ = S(""), v = 0, y = !1, x = D("target"), { open: C } = Q("promptDlg", async (e) => {
|
|
810
|
+
n.value = e.title, r.value = e.subtitle ?? "", i.value = e.text, a.value = e.label, o.value = e.placeholder, l.value = e.rules, u.value = e.value, p.value = e.cancel?.color ?? "primary", m.value = e.cancel?.text ?? t("dlg.common.cancel"), g.value = e.confirm?.color ?? "primary", _.value = e.confirm?.text ?? t("dlg.common.confirm"), v = e.seq, y = !1, C.value = !0, await I(() => !!x.value), x.value.focus();
|
|
811
|
+
}), k = S(!1), ee = () => {
|
|
812
|
+
C.value = !1, y ||= (F.emit("promptDlgResult" + v, u.value ?? ""), !0);
|
|
784
813
|
};
|
|
785
|
-
return
|
|
786
|
-
!e && !
|
|
787
|
-
}), (e,
|
|
788
|
-
let
|
|
789
|
-
return
|
|
790
|
-
modelValue:
|
|
791
|
-
"onUpdate:modelValue":
|
|
814
|
+
return O(C, (e) => {
|
|
815
|
+
!e && !y && (F.emit("promptDlgResult" + v, void 0), y = !0);
|
|
816
|
+
}), (e, t) => {
|
|
817
|
+
let v = w("v-card-text"), y = w("v-text-field"), S = w("v-btn"), D = w("v-card-actions"), O = w("v-form"), N = w("v-card"), P = w("v-dialog");
|
|
818
|
+
return b(), s(P, {
|
|
819
|
+
modelValue: E(C),
|
|
820
|
+
"onUpdate:modelValue": t[3] ||= (e) => h(C) ? C.value = e : null,
|
|
792
821
|
attach: "",
|
|
793
822
|
"max-width": "600px",
|
|
794
823
|
transition: "dialog-top-transition",
|
|
795
|
-
onKeydown:
|
|
824
|
+
onKeydown: t[4] ||= j(M((e) => C.value = !1, ["stop", "prevent"]), ["esc"])
|
|
796
825
|
}, {
|
|
797
|
-
default:
|
|
798
|
-
subtitle:
|
|
799
|
-
title:
|
|
826
|
+
default: A(() => [f(N, {
|
|
827
|
+
subtitle: r.value,
|
|
828
|
+
title: n.value
|
|
800
829
|
}, {
|
|
801
|
-
default:
|
|
802
|
-
default:
|
|
830
|
+
default: A(() => [i.value ? (b(), s(v, { key: 0 }, {
|
|
831
|
+
default: A(() => [d(T(i.value), 1)]),
|
|
803
832
|
_: 1
|
|
804
|
-
})) :
|
|
805
|
-
modelValue:
|
|
806
|
-
"onUpdate:modelValue":
|
|
833
|
+
})) : c("", !0), f(O, {
|
|
834
|
+
modelValue: k.value,
|
|
835
|
+
"onUpdate:modelValue": t[2] ||= (e) => k.value = e,
|
|
807
836
|
class: "mx-3",
|
|
808
|
-
onSubmit:
|
|
837
|
+
onSubmit: M(ee, ["prevent"])
|
|
809
838
|
}, {
|
|
810
|
-
default:
|
|
839
|
+
default: A(() => [f(y, {
|
|
811
840
|
ref_key: "target",
|
|
812
|
-
ref:
|
|
813
|
-
modelValue:
|
|
814
|
-
"onUpdate:modelValue":
|
|
815
|
-
label:
|
|
816
|
-
placeholder:
|
|
817
|
-
rules:
|
|
841
|
+
ref: x,
|
|
842
|
+
modelValue: u.value,
|
|
843
|
+
"onUpdate:modelValue": t[0] ||= (e) => u.value = e,
|
|
844
|
+
label: a.value,
|
|
845
|
+
placeholder: o.value,
|
|
846
|
+
rules: l.value
|
|
818
847
|
}, null, 8, [
|
|
819
848
|
"modelValue",
|
|
820
849
|
"label",
|
|
821
850
|
"placeholder",
|
|
822
851
|
"rules"
|
|
823
|
-
]),
|
|
824
|
-
default:
|
|
825
|
-
color:
|
|
852
|
+
]), f(D, { class: "d-flex justify-end" }, {
|
|
853
|
+
default: A(() => [f(S, {
|
|
854
|
+
color: p.value,
|
|
826
855
|
variant: "text",
|
|
827
|
-
onClick:
|
|
856
|
+
onClick: t[1] ||= (e) => C.value = !1
|
|
828
857
|
}, {
|
|
829
|
-
default:
|
|
858
|
+
default: A(() => [d(T(m.value), 1)]),
|
|
830
859
|
_: 1
|
|
831
|
-
}, 8, ["color"]),
|
|
832
|
-
color:
|
|
833
|
-
disabled: !
|
|
860
|
+
}, 8, ["color"]), f(S, {
|
|
861
|
+
color: g.value,
|
|
862
|
+
disabled: !k.value,
|
|
834
863
|
type: "submit",
|
|
835
864
|
variant: "text"
|
|
836
865
|
}, {
|
|
837
|
-
default:
|
|
866
|
+
default: A(() => [d(T(_.value), 1)]),
|
|
838
867
|
_: 1
|
|
839
868
|
}, 8, ["color", "disabled"])]),
|
|
840
869
|
_: 1
|
|
@@ -847,55 +876,58 @@ var confirmDlg_default = /* @__PURE__ */ defineComponent({
|
|
|
847
876
|
}, 8, ["modelValue"]);
|
|
848
877
|
};
|
|
849
878
|
}
|
|
850
|
-
}),
|
|
879
|
+
}), ot = { class: "ma-auto" }, st = { class: "w-100 h-100 d-flex align-center justify-center" }, ct = { class: "text-body-large" }, lt = /* @__PURE__ */ p({
|
|
851
880
|
__name: "index",
|
|
852
881
|
setup(e) {
|
|
853
|
-
let { t
|
|
854
|
-
|
|
855
|
-
},
|
|
856
|
-
|
|
857
|
-
}, { open:
|
|
858
|
-
return
|
|
859
|
-
|
|
860
|
-
}),
|
|
861
|
-
|
|
862
|
-
}), (e,
|
|
863
|
-
let
|
|
864
|
-
return
|
|
865
|
-
modelValue:
|
|
866
|
-
"onUpdate:modelValue":
|
|
882
|
+
let { t } = N(), n = S(""), r = (e) => {
|
|
883
|
+
n.value = e.text ?? t("dlg.common.responding"), a.value = !0;
|
|
884
|
+
}, i = () => {
|
|
885
|
+
a.value = !1;
|
|
886
|
+
}, { open: a } = Q("waitDlg", r);
|
|
887
|
+
return y(() => {
|
|
888
|
+
F.on("closeWaitDlg", i);
|
|
889
|
+
}), v(() => {
|
|
890
|
+
F.off("closeWaitDlg", i);
|
|
891
|
+
}), (e, t) => {
|
|
892
|
+
let r = w("v-card"), i = w("v-dialog");
|
|
893
|
+
return b(), s(i, {
|
|
894
|
+
modelValue: E(a),
|
|
895
|
+
"onUpdate:modelValue": t[0] ||= (e) => h(a) ? a.value = e : null,
|
|
867
896
|
attach: "",
|
|
868
897
|
fullscreen: "",
|
|
869
898
|
"no-click-animation": "",
|
|
870
899
|
persistent: ""
|
|
871
900
|
}, {
|
|
872
|
-
default:
|
|
901
|
+
default: A(() => [u("div", ot, [f(r, {
|
|
873
902
|
height: "80px",
|
|
874
903
|
loading: "",
|
|
875
904
|
width: "300px"
|
|
876
905
|
}, {
|
|
877
|
-
default:
|
|
906
|
+
default: A(() => [u("div", st, [u("span", ct, T(n.value), 1)])]),
|
|
878
907
|
_: 1
|
|
879
908
|
})])]),
|
|
880
909
|
_: 1
|
|
881
910
|
}, 8, ["modelValue"]);
|
|
882
911
|
};
|
|
883
912
|
}
|
|
884
|
-
})
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
return O ? typeof O == "function" ? O() : Promise.resolve(O) : new Promise((e, D) => {
|
|
891
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(D.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + T + (T.split("/").length === E ? "" : ". Note that variables only represent file names one level deep."))));
|
|
913
|
+
}), ut = (e) => {
|
|
914
|
+
e.component("XConfirmDlg", $e), e.component("XLoading", tt), e.component("XMessage", rt), e.component("XNumberDlg", it), e.component("XPromptDlg", at), e.component("XWaitDlg", lt);
|
|
915
|
+
}, dt = (e, t, n) => {
|
|
916
|
+
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
917
|
+
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
918
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
892
919
|
});
|
|
893
920
|
};
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/i18n/index.ts
|
|
923
|
+
async function ft(e) {
|
|
924
|
+
return (await dt(/* @__PURE__ */ Object.assign({
|
|
925
|
+
"./locales/en/index.ts": () => import("./i18n-en.lqadbyvh.js").then((e) => e.t),
|
|
926
|
+
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.jagnyxbk.js").then((e) => e.t)
|
|
927
|
+
}), `./locales/${e}/index.ts`, 4)).default;
|
|
928
|
+
}
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region src/index.ts
|
|
931
|
+
var pt = { install: ut };
|
|
932
|
+
//#endregion
|
|
933
|
+
export { we as Permission, Ke as addView, pe as appAppear, Ye as clearViews, ye as closeWaitDlg, ae as createAxios, pt as default, qe as delView, F as eventBus, He as getTypeColor, Ue as getTypeDefault, de as globalObjects, Z as hasView, Ee as injectDark, Pe as injectLastAppPath, Oe as injectLocale, Me as injectPermissionChecksum, Ae as injectPermissionObjects, Ie as injectViews, We as isEmpty, B as isExist, Ge as lastView, ft as loadLocaleMessageEssential, J as matchRouteMeta, be as messageError, xe as messageInfo, Se as messageSuccess, Ce as messageWarning, Be as onBeforeEach, he as openConfirmDlg, ge as openNumberDlg, _e as openPromptDlg, ve as openWaitDlg, Je as popView, Te as provideDark, Ne as provideLastAppPath, De as provideLocale, je as providePermissionChecksum, ke as providePermissionObjects, Fe as provideViews, Y as routeTransName, Ve as types, ie as useColor, Xe as useMicroApp, Ze as usePermission, Qe as useSystem, Q as useViewStack, V as verifyPermission, fe as waitMs, I as waitUtil };
|