x-essential-lib 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/loading/index.vue.d.ts +25 -11
- package/dist/index.js +258 -264
- package/dist/utils/misc.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
zIndex
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
zIndex:
|
|
8
|
-
|
|
9
|
-
default: number;
|
|
10
|
-
};
|
|
11
|
-
}>>, {
|
|
1
|
+
interface Props {
|
|
2
|
+
zIndex?: number;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
5
|
+
zIndex: number;
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
7
|
+
zIndex: number;
|
|
8
|
+
}>>>, {
|
|
12
9
|
zIndex: number;
|
|
13
10
|
}, {}>;
|
|
14
11
|
export default _default;
|
|
12
|
+
type __VLS_WithDefaults<P, D> = {
|
|
13
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
14
|
+
default: D[K];
|
|
15
|
+
}> : P[K];
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Prettify<T> = {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} & {};
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToOption<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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-
|
|
2
|
-
import { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as
|
|
3
|
-
import { useI18n as
|
|
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-d525e6f5]{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 { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as N, resolveComponent as h, openBlock as D, createBlock as O, withKeys as F, withModifiers as W, withCtx as w, createVNode as b, createTextVNode as E, toDisplayString as q, createElementBlock as J, normalizeStyle as ne, pushScopeId as fe, popScopeId as ge, createElementVNode as v, createCommentVNode as le, unref as re, Fragment as ve, renderList as me, getCurrentScope as he, onScopeDispose as we, watchEffect as ye, getCurrentInstance as xe } from "vue";
|
|
3
|
+
import { useI18n as P } from "vue-i18n";
|
|
4
4
|
import { defineStore as ce } from "pinia";
|
|
5
5
|
import ke from "axios";
|
|
6
6
|
import { useRouter as ue, useRoute as be } from "vue-router";
|
|
7
|
-
import { useTheme as
|
|
8
|
-
const
|
|
9
|
-
const e = d(),
|
|
7
|
+
import { useTheme as ee, useDisplay as Ce } from "vuetify";
|
|
8
|
+
const Z = ce("global", () => {
|
|
9
|
+
const e = d(), a = d("en"), t = d({}), n = d(""), o = d("");
|
|
10
10
|
return {
|
|
11
11
|
dark: e,
|
|
12
|
-
locale:
|
|
13
|
-
permissionObjects:
|
|
12
|
+
locale: a,
|
|
13
|
+
permissionObjects: t,
|
|
14
14
|
permissionChecksum: n,
|
|
15
15
|
lastAppPath: o
|
|
16
16
|
};
|
|
17
17
|
}), $ = ce("viewMgr", () => {
|
|
18
18
|
const e = d([]);
|
|
19
|
-
function
|
|
19
|
+
function a() {
|
|
20
20
|
return e.value.length <= 0;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function t() {
|
|
23
23
|
const u = e.value.length;
|
|
24
24
|
if (u > 0)
|
|
25
25
|
return e.value[u - 1];
|
|
@@ -43,8 +43,8 @@ const G = ce("global", () => {
|
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
views: e,
|
|
46
|
-
isEmpty:
|
|
47
|
-
lastView:
|
|
46
|
+
isEmpty: a,
|
|
47
|
+
lastView: t,
|
|
48
48
|
hasView: n,
|
|
49
49
|
addView: o,
|
|
50
50
|
delView: r,
|
|
@@ -53,11 +53,11 @@ const G = ce("global", () => {
|
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
55
|
/*! js-cookie v3.0.5 | MIT */
|
|
56
|
-
function
|
|
57
|
-
for (var
|
|
58
|
-
var
|
|
59
|
-
for (var n in
|
|
60
|
-
e[n] =
|
|
56
|
+
function X(e) {
|
|
57
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
58
|
+
var t = arguments[a];
|
|
59
|
+
for (var n in t)
|
|
60
|
+
e[n] = t[n];
|
|
61
61
|
}
|
|
62
62
|
return e;
|
|
63
63
|
}
|
|
@@ -72,10 +72,10 @@ var De = {
|
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
function
|
|
76
|
-
function
|
|
75
|
+
function Y(e, a) {
|
|
76
|
+
function t(o, r, l) {
|
|
77
77
|
if (!(typeof document > "u")) {
|
|
78
|
-
l =
|
|
78
|
+
l = X({}, a, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
79
79
|
var c = "";
|
|
80
80
|
for (var u in l)
|
|
81
81
|
l[u] && (c += "; " + u, l[u] !== !0 && (c += "=" + l[u].split(";")[0]));
|
|
@@ -98,83 +98,83 @@ function J(e, t) {
|
|
|
98
98
|
}
|
|
99
99
|
return Object.create(
|
|
100
100
|
{
|
|
101
|
-
set:
|
|
101
|
+
set: t,
|
|
102
102
|
get: n,
|
|
103
103
|
remove: function(o, r) {
|
|
104
|
-
|
|
104
|
+
t(
|
|
105
105
|
o,
|
|
106
106
|
"",
|
|
107
|
-
|
|
107
|
+
X({}, r, {
|
|
108
108
|
expires: -1
|
|
109
109
|
})
|
|
110
110
|
);
|
|
111
111
|
},
|
|
112
112
|
withAttributes: function(o) {
|
|
113
|
-
return
|
|
113
|
+
return Y(this.converter, X({}, this.attributes, o));
|
|
114
114
|
},
|
|
115
115
|
withConverter: function(o) {
|
|
116
|
-
return
|
|
116
|
+
return Y(X({}, this.converter, o), this.attributes);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
attributes: { value: Object.freeze(
|
|
120
|
+
attributes: { value: Object.freeze(a) },
|
|
121
121
|
converter: { value: Object.freeze(e) }
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
var
|
|
126
|
-
function
|
|
127
|
-
const
|
|
125
|
+
var j = Y(De, { path: "/" });
|
|
126
|
+
function xt(e) {
|
|
127
|
+
const a = ke.create({
|
|
128
128
|
timeout: 6e3
|
|
129
129
|
});
|
|
130
|
-
return
|
|
131
|
-
(
|
|
132
|
-
(
|
|
133
|
-
Ve(
|
|
130
|
+
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
131
|
+
(t) => Le(t),
|
|
132
|
+
(t) => {
|
|
133
|
+
Ve(t, e.onError);
|
|
134
134
|
}
|
|
135
|
-
),
|
|
136
|
-
(
|
|
137
|
-
(
|
|
138
|
-
),
|
|
135
|
+
), a.interceptors.response.use(
|
|
136
|
+
(t) => Me(t),
|
|
137
|
+
(t) => Se(t, e.onError)
|
|
138
|
+
), a;
|
|
139
139
|
}
|
|
140
140
|
function Le(e) {
|
|
141
|
-
const
|
|
142
|
-
return e.headers.Authorization = "Basic " +
|
|
141
|
+
const a = j.get("accessToken") ?? "";
|
|
142
|
+
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
143
143
|
}
|
|
144
|
-
function Ve(e,
|
|
145
|
-
console.error(e),
|
|
144
|
+
function Ve(e, a) {
|
|
145
|
+
console.error(e), a("request timeout");
|
|
146
146
|
}
|
|
147
147
|
function Me(e) {
|
|
148
148
|
return e.data;
|
|
149
149
|
}
|
|
150
|
-
function Se(e,
|
|
150
|
+
function Se(e, a) {
|
|
151
151
|
var o;
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
152
|
+
const t = e.response;
|
|
153
|
+
if (!t)
|
|
154
154
|
return Promise.reject(e);
|
|
155
|
-
|
|
156
|
-
let n = (o =
|
|
155
|
+
t.status === 401 && Ae();
|
|
156
|
+
let n = (o = t.data) == null ? void 0 : o.message;
|
|
157
157
|
return n || (n = {
|
|
158
|
-
code:
|
|
159
|
-
message:
|
|
160
|
-
}),
|
|
158
|
+
code: t.status,
|
|
159
|
+
message: t.statusText
|
|
160
|
+
}), a(n), Promise.reject(e);
|
|
161
161
|
}
|
|
162
162
|
function Ae() {
|
|
163
|
-
|
|
163
|
+
j.remove("accessToken"), j.remove("refreshToken"), j.remove("activeOrg"), ue().replace({ path: "/passport/login" });
|
|
164
164
|
}
|
|
165
165
|
function qe(e) {
|
|
166
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(
|
|
167
|
-
var n = e.get(
|
|
168
|
-
n ? n.push(
|
|
169
|
-
}, off: function(
|
|
170
|
-
var n = e.get(
|
|
171
|
-
n && (
|
|
172
|
-
}, emit: function(
|
|
173
|
-
var n = e.get(
|
|
166
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
167
|
+
var n = e.get(a);
|
|
168
|
+
n ? n.push(t) : e.set(a, [t]);
|
|
169
|
+
}, off: function(a, t) {
|
|
170
|
+
var n = e.get(a);
|
|
171
|
+
n && (t ? n.splice(n.indexOf(t) >>> 0, 1) : e.set(a, []));
|
|
172
|
+
}, emit: function(a, t) {
|
|
173
|
+
var n = e.get(a);
|
|
174
174
|
n && n.slice().map(function(o) {
|
|
175
|
-
o(
|
|
175
|
+
o(t);
|
|
176
176
|
}), (n = e.get("*")) && n.slice().map(function(o) {
|
|
177
|
-
o(
|
|
177
|
+
o(a, t);
|
|
178
178
|
});
|
|
179
179
|
} };
|
|
180
180
|
}
|
|
@@ -182,25 +182,22 @@ const s = function() {
|
|
|
182
182
|
return window.eventBus || (window.eventBus = qe()), window.eventBus;
|
|
183
183
|
}();
|
|
184
184
|
async function kt(e) {
|
|
185
|
-
return new Promise((
|
|
186
|
-
setTimeout(
|
|
185
|
+
return new Promise((a) => {
|
|
186
|
+
setTimeout(a, e);
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
async function
|
|
189
|
+
async function G(e, a, t) {
|
|
190
190
|
const n = Date.now();
|
|
191
191
|
return new Promise((o) => {
|
|
192
192
|
const r = async () => {
|
|
193
|
-
e() ? o(!0) :
|
|
193
|
+
e() ? o(!0) : a && Date.now() - n > a ? o(!1) : setTimeout(r, t ?? 30);
|
|
194
194
|
};
|
|
195
195
|
r();
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Re(e,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
n && (n.remove("app-left", "app-right", "app-reset"), t ? n.add("app-left") : n.add("app-right"), setTimeout(() => {
|
|
202
|
-
n.add("app-reset");
|
|
203
|
-
}, 50));
|
|
198
|
+
async function Re(e, a) {
|
|
199
|
+
const t = document.getElementById("single-spa-application:" + e);
|
|
200
|
+
t && (t.classList.remove("app-left", "app-right", "app-reset"), a ? t.classList.add("app-left") : t.classList.add("app-right"), await G(() => t.hasChildNodes(), 5e3), t.classList.add("app-reset"));
|
|
204
201
|
}
|
|
205
202
|
let ae = Date.now();
|
|
206
203
|
function se() {
|
|
@@ -214,20 +211,20 @@ function pe() {
|
|
|
214
211
|
async function bt(e) {
|
|
215
212
|
if (!se())
|
|
216
213
|
return;
|
|
217
|
-
let
|
|
214
|
+
let a = !1, t;
|
|
218
215
|
const n = (r) => {
|
|
219
|
-
|
|
216
|
+
t = r, a = !0;
|
|
220
217
|
}, o = pe();
|
|
221
|
-
return s.on("confirmDlgResult" + o, n), s.emit("confirmDlg", { ...e, seq: o }), await
|
|
218
|
+
return s.on("confirmDlgResult" + o, n), s.emit("confirmDlg", { ...e, seq: o }), await G(() => a), s.off("confirmDlgResult" + o, n), t;
|
|
222
219
|
}
|
|
223
220
|
async function Ct(e) {
|
|
224
221
|
if (!se())
|
|
225
222
|
return;
|
|
226
|
-
let
|
|
223
|
+
let a = !1, t;
|
|
227
224
|
const n = (r) => {
|
|
228
|
-
|
|
225
|
+
t = r, a = !0;
|
|
229
226
|
}, o = pe();
|
|
230
|
-
return s.on("promptDlgResult" + o, n), s.emit("promptDlg", { ...e, seq: o }), await
|
|
227
|
+
return s.on("promptDlgResult" + o, n), s.emit("promptDlg", { ...e, seq: o }), await G(() => a), s.off("promptDlgResult" + o, n), t;
|
|
231
228
|
}
|
|
232
229
|
function Dt(e) {
|
|
233
230
|
s.emit("openWaitDlg", { text: e });
|
|
@@ -235,33 +232,33 @@ function Dt(e) {
|
|
|
235
232
|
function Lt() {
|
|
236
233
|
s.emit("closeWaitDlg");
|
|
237
234
|
}
|
|
238
|
-
function Vt(e,
|
|
239
|
-
s.emit("message", { type: "error", text: e, timeout:
|
|
235
|
+
function Vt(e, a) {
|
|
236
|
+
s.emit("message", { type: "error", text: e, timeout: a });
|
|
240
237
|
}
|
|
241
|
-
function Mt(e,
|
|
242
|
-
s.emit("message", { type: "info", text: e, timeout:
|
|
238
|
+
function Mt(e, a) {
|
|
239
|
+
s.emit("message", { type: "info", text: e, timeout: a });
|
|
243
240
|
}
|
|
244
|
-
function St(e,
|
|
245
|
-
s.emit("message", { type: "success", text: e, timeout:
|
|
241
|
+
function St(e, a) {
|
|
242
|
+
s.emit("message", { type: "success", text: e, timeout: a });
|
|
246
243
|
}
|
|
247
|
-
function At(e,
|
|
248
|
-
s.emit("message", { type: "warning", text: e, timeout:
|
|
244
|
+
function At(e, a) {
|
|
245
|
+
s.emit("message", { type: "warning", text: e, timeout: a });
|
|
249
246
|
}
|
|
250
247
|
var Oe = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Oe || {});
|
|
251
|
-
function oe(e,
|
|
248
|
+
function oe(e, a) {
|
|
252
249
|
if (!e)
|
|
253
250
|
return !1;
|
|
254
|
-
let
|
|
255
|
-
return Object.keys(
|
|
256
|
-
if (Object.keys(
|
|
251
|
+
let t = e;
|
|
252
|
+
return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
|
|
253
|
+
if (Object.keys(t).length <= 0)
|
|
257
254
|
return !0;
|
|
258
|
-
if (
|
|
259
|
-
|
|
255
|
+
if (t[o])
|
|
256
|
+
t = t[o];
|
|
260
257
|
else
|
|
261
258
|
return !1;
|
|
262
|
-
}), Object.keys(
|
|
259
|
+
}), Object.keys(t).length <= 0);
|
|
263
260
|
}
|
|
264
|
-
const
|
|
261
|
+
const Ee = [
|
|
265
262
|
{
|
|
266
263
|
app: "x-passport-mf",
|
|
267
264
|
path: "/passport/login",
|
|
@@ -369,92 +366,92 @@ const je = [
|
|
|
369
366
|
mainActive: 2
|
|
370
367
|
}
|
|
371
368
|
];
|
|
372
|
-
function
|
|
373
|
-
let
|
|
369
|
+
function K(e) {
|
|
370
|
+
let a, t = 0;
|
|
374
371
|
const n = e.split("/").filter((o) => o.trim() !== "");
|
|
375
|
-
return
|
|
372
|
+
return Ee.forEach((o) => {
|
|
376
373
|
const r = o.path.split("/").filter((c) => c.trim() !== "");
|
|
377
374
|
let l = 0;
|
|
378
375
|
for (let c = 0; c < n.length && !(c >= r.length || n[c] !== r[c]); c++)
|
|
379
376
|
l++;
|
|
380
|
-
l > 0 && l >
|
|
381
|
-
}),
|
|
382
|
-
}
|
|
383
|
-
const
|
|
384
|
-
function L(e,
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
const n =
|
|
377
|
+
l > 0 && l > t && (a = o, t = l);
|
|
378
|
+
}), a;
|
|
379
|
+
}
|
|
380
|
+
const Q = d("");
|
|
381
|
+
function L(e, a) {
|
|
382
|
+
const t = Z();
|
|
383
|
+
a === "/" && (a = t.lastAppPath);
|
|
384
|
+
const n = K(e), o = K(a);
|
|
388
385
|
if (!n) {
|
|
389
386
|
console.assert(!1);
|
|
390
387
|
return;
|
|
391
388
|
}
|
|
392
|
-
if (console.info(`~~~~routeChange~~~~ ${
|
|
389
|
+
if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
|
|
393
390
|
return;
|
|
394
391
|
const r = n.app === o.app, l = n.path === o.path, c = n.level >= o.level;
|
|
395
|
-
r ? l ?
|
|
392
|
+
r ? l ? Q.value = "" : Q.value = c ? "inner-left" : "inner-right" : (Q.value = "", Re(n.app, c));
|
|
396
393
|
}
|
|
397
|
-
function
|
|
398
|
-
return !!
|
|
394
|
+
function je() {
|
|
395
|
+
return !!j.get("accessToken");
|
|
399
396
|
}
|
|
400
397
|
function Te() {
|
|
401
|
-
return !!
|
|
398
|
+
return !!j.get("activeOrg");
|
|
402
399
|
}
|
|
403
|
-
function qt(e,
|
|
404
|
-
const n =
|
|
400
|
+
function qt(e, a, t) {
|
|
401
|
+
const n = je(), o = Te(), r = K(e.path);
|
|
405
402
|
if (!r) {
|
|
406
|
-
console.assert(!1),
|
|
403
|
+
console.assert(!1), t();
|
|
407
404
|
return;
|
|
408
405
|
}
|
|
409
406
|
if (r.requiredState === "auth")
|
|
410
407
|
if (n)
|
|
411
408
|
if (o) {
|
|
412
409
|
const l = "/main";
|
|
413
|
-
L(l,
|
|
410
|
+
L(l, a.path), t({ path: l });
|
|
414
411
|
} else
|
|
415
|
-
L(e.path,
|
|
412
|
+
L(e.path, a.path), t();
|
|
416
413
|
else {
|
|
417
414
|
const l = "/passport/login";
|
|
418
|
-
L(l,
|
|
415
|
+
L(l, a.path), t({ path: l });
|
|
419
416
|
}
|
|
420
417
|
else if (r.requiredState === "org")
|
|
421
418
|
if (n)
|
|
422
419
|
if (o)
|
|
423
|
-
L(e.path,
|
|
420
|
+
L(e.path, a.path), t();
|
|
424
421
|
else {
|
|
425
422
|
const l = "/org/joinOrCreate";
|
|
426
|
-
L(l,
|
|
423
|
+
L(l, a.path), t({ path: l });
|
|
427
424
|
}
|
|
428
425
|
else {
|
|
429
426
|
const l = "/passport/login";
|
|
430
|
-
L(l,
|
|
427
|
+
L(l, a.path), t({ path: l });
|
|
431
428
|
}
|
|
432
429
|
else if (n)
|
|
433
430
|
if (o) {
|
|
434
431
|
const l = "/main";
|
|
435
|
-
L(l,
|
|
432
|
+
L(l, a.path), t({ path: l });
|
|
436
433
|
} else {
|
|
437
434
|
const l = "/org/joinOrCreate";
|
|
438
|
-
L(l,
|
|
435
|
+
L(l, a.path), t({ path: l });
|
|
439
436
|
}
|
|
440
437
|
else
|
|
441
|
-
L(e.path,
|
|
438
|
+
L(e.path, a.path), t();
|
|
442
439
|
}
|
|
443
440
|
const Be = /* @__PURE__ */ T({
|
|
444
441
|
__name: "index",
|
|
445
442
|
setup(e) {
|
|
446
|
-
const { t } =
|
|
443
|
+
const { t: a } = P(), t = $(), n = g({
|
|
447
444
|
get() {
|
|
448
|
-
return
|
|
445
|
+
return t.hasView("confirmDlg");
|
|
449
446
|
},
|
|
450
447
|
set(m) {
|
|
451
|
-
m ?
|
|
448
|
+
m ? t.addView("confirmDlg") : t.delView("confirmDlg");
|
|
452
449
|
}
|
|
453
450
|
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(""), p = d("");
|
|
454
|
-
let _ = 0,
|
|
451
|
+
let _ = 0, y = !1;
|
|
455
452
|
const i = (m) => {
|
|
456
|
-
var
|
|
457
|
-
o.value = m.title, r.value = m.text, l.value = ((
|
|
453
|
+
var x, C, S, R;
|
|
454
|
+
o.value = m.title, r.value = m.text, l.value = ((x = m.cancel) == null ? void 0 : x.color) ?? "primary", c.value = ((C = m.cancel) == null ? void 0 : C.text) ?? a("dlg.common.cancel"), u.value = ((S = m.confirm) == null ? void 0 : S.color) ?? "primary", p.value = ((R = m.confirm) == null ? void 0 : R.text) ?? a("dlg.common.confirm"), _ = m.seq, y = !1, n.value = !0;
|
|
458
455
|
};
|
|
459
456
|
V(() => {
|
|
460
457
|
s.on("confirmDlg", i);
|
|
@@ -462,50 +459,50 @@ const Be = /* @__PURE__ */ T({
|
|
|
462
459
|
s.off("confirmDlg", i);
|
|
463
460
|
});
|
|
464
461
|
const M = () => {
|
|
465
|
-
n.value = !1,
|
|
462
|
+
n.value = !1, y || (s.emit("confirmDlgResult" + _, !0), y = !0);
|
|
466
463
|
};
|
|
467
|
-
return
|
|
468
|
-
!m && !
|
|
469
|
-
}), (m,
|
|
464
|
+
return N(n, (m) => {
|
|
465
|
+
!m && !y && (s.emit("confirmDlgResult" + _, !1), y = !0);
|
|
466
|
+
}), (m, x) => {
|
|
470
467
|
const C = h("v-card-text"), S = h("v-btn"), R = h("v-card-actions"), f = h("v-card"), k = h("v-dialog");
|
|
471
468
|
return D(), O(k, {
|
|
472
469
|
modelValue: n.value,
|
|
473
|
-
"onUpdate:modelValue":
|
|
474
|
-
onKeydown: [
|
|
475
|
-
y[2] || (y[2] = K(W((A) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
476
|
-
K(W(M, ["stop", "prevent"]), ["enter"])
|
|
477
|
-
],
|
|
470
|
+
"onUpdate:modelValue": x[1] || (x[1] = (A) => n.value = A),
|
|
478
471
|
transition: "dialog-top-transition",
|
|
479
|
-
"max-width": "600px"
|
|
472
|
+
"max-width": "600px",
|
|
473
|
+
onKeydown: [
|
|
474
|
+
x[2] || (x[2] = F(W((A) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
475
|
+
F(W(M, ["stop", "prevent"]), ["enter"])
|
|
476
|
+
]
|
|
480
477
|
}, {
|
|
481
478
|
default: w(() => [
|
|
482
479
|
b(f, { title: o.value }, {
|
|
483
480
|
default: w(() => [
|
|
484
481
|
b(C, null, {
|
|
485
482
|
default: w(() => [
|
|
486
|
-
|
|
483
|
+
E(q(r.value), 1)
|
|
487
484
|
]),
|
|
488
485
|
_: 1
|
|
489
486
|
}),
|
|
490
487
|
b(R, { class: "d-flex justify-end" }, {
|
|
491
488
|
default: w(() => [
|
|
492
489
|
b(S, {
|
|
493
|
-
onClick: y[0] || (y[0] = (A) => n.value = !1),
|
|
494
490
|
color: l.value,
|
|
495
|
-
variant: "text"
|
|
491
|
+
variant: "text",
|
|
492
|
+
onClick: x[0] || (x[0] = (A) => n.value = !1)
|
|
496
493
|
}, {
|
|
497
494
|
default: w(() => [
|
|
498
|
-
|
|
495
|
+
E(q(c.value), 1)
|
|
499
496
|
]),
|
|
500
497
|
_: 1
|
|
501
498
|
}, 8, ["color"]),
|
|
502
499
|
b(S, {
|
|
503
|
-
onClick: M,
|
|
504
500
|
color: u.value,
|
|
505
|
-
variant: "text"
|
|
501
|
+
variant: "text",
|
|
502
|
+
onClick: M
|
|
506
503
|
}, {
|
|
507
504
|
default: w(() => [
|
|
508
|
-
|
|
505
|
+
E(q(p.value), 1)
|
|
509
506
|
]),
|
|
510
507
|
_: 1
|
|
511
508
|
}, 8, ["color"])
|
|
@@ -520,7 +517,7 @@ const Be = /* @__PURE__ */ T({
|
|
|
520
517
|
}, 8, ["modelValue", "onKeydown"]);
|
|
521
518
|
};
|
|
522
519
|
}
|
|
523
|
-
}), Ue = (e) => (fe("data-v-
|
|
520
|
+
}), Ue = (e) => (fe("data-v-7ab74c70"), e = e(), ge(), e), We = /* @__PURE__ */ Ue(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
|
|
524
521
|
/* @__PURE__ */ v("div"),
|
|
525
522
|
/* @__PURE__ */ v("div"),
|
|
526
523
|
/* @__PURE__ */ v("div"),
|
|
@@ -538,29 +535,26 @@ const Be = /* @__PURE__ */ T({
|
|
|
538
535
|
], He = /* @__PURE__ */ T({
|
|
539
536
|
__name: "index",
|
|
540
537
|
props: {
|
|
541
|
-
zIndex: {
|
|
542
|
-
type: Number,
|
|
543
|
-
default: 1
|
|
544
|
-
}
|
|
538
|
+
zIndex: { default: 1 }
|
|
545
539
|
},
|
|
546
540
|
setup(e) {
|
|
547
|
-
const
|
|
548
|
-
background:
|
|
549
|
-
zIndex:
|
|
541
|
+
const a = ee(), t = e, n = g(() => ({
|
|
542
|
+
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
543
|
+
zIndex: t.zIndex
|
|
550
544
|
}));
|
|
551
|
-
return (o, r) => (D(),
|
|
545
|
+
return (o, r) => (D(), J("div", {
|
|
552
546
|
class: "x-cont",
|
|
553
547
|
style: ne(n.value)
|
|
554
548
|
}, $e, 4));
|
|
555
549
|
}
|
|
556
|
-
}), te = (e,
|
|
557
|
-
const
|
|
558
|
-
for (const [n, o] of
|
|
559
|
-
|
|
560
|
-
return
|
|
561
|
-
}, ze = /* @__PURE__ */ te(He, [["__scopeId", "data-v-
|
|
562
|
-
var
|
|
563
|
-
const
|
|
550
|
+
}), te = (e, a) => {
|
|
551
|
+
const t = e.__vccOpts || e;
|
|
552
|
+
for (const [n, o] of a)
|
|
553
|
+
t[n] = o;
|
|
554
|
+
return t;
|
|
555
|
+
}, ze = /* @__PURE__ */ te(He, [["__scopeId", "data-v-7ab74c70"]]);
|
|
556
|
+
var Xe = "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", Fe = "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", Ke = "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", Ne = "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", Ze = "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";
|
|
557
|
+
const Ge = /* @__PURE__ */ T({
|
|
564
558
|
__name: "item",
|
|
565
559
|
props: {
|
|
566
560
|
id: {},
|
|
@@ -569,35 +563,35 @@ const Xe = /* @__PURE__ */ T({
|
|
|
569
563
|
timeout: { default: 5e3 }
|
|
570
564
|
},
|
|
571
565
|
emits: ["timeout"],
|
|
572
|
-
setup(e, { emit:
|
|
573
|
-
const
|
|
566
|
+
setup(e, { emit: a }) {
|
|
567
|
+
const t = e, n = g(() => ({
|
|
574
568
|
width: "calc(100% - 64px)",
|
|
575
569
|
overflowWrap: "break-word"
|
|
576
570
|
})), o = g(() => {
|
|
577
|
-
switch (
|
|
571
|
+
switch (t.type) {
|
|
578
572
|
case "success":
|
|
579
|
-
return
|
|
573
|
+
return Fe;
|
|
580
574
|
case "info":
|
|
581
|
-
return Ge;
|
|
582
|
-
case "error":
|
|
583
575
|
return Ze;
|
|
576
|
+
case "error":
|
|
577
|
+
return Ne;
|
|
584
578
|
case "warning":
|
|
585
|
-
return
|
|
579
|
+
return Xe;
|
|
586
580
|
default:
|
|
587
581
|
return "";
|
|
588
582
|
}
|
|
589
|
-
}), r = d(!0), l =
|
|
583
|
+
}), r = d(!0), l = a;
|
|
590
584
|
return V(() => {
|
|
591
585
|
setTimeout(() => {
|
|
592
|
-
l("timeout",
|
|
593
|
-
},
|
|
594
|
-
}),
|
|
595
|
-
c || l("timeout",
|
|
586
|
+
l("timeout", t.id);
|
|
587
|
+
}, t.timeout);
|
|
588
|
+
}), N(r, (c) => {
|
|
589
|
+
c || l("timeout", t.id);
|
|
596
590
|
}), (c, u) => {
|
|
597
591
|
const p = h("v-icon"), _ = h("v-sheet");
|
|
598
592
|
return D(), O(_, {
|
|
599
|
-
class: "x-item d-flex align-center mb-2",
|
|
600
|
-
color:
|
|
593
|
+
class: "x-item d-flex align-center py-2 mb-2",
|
|
594
|
+
color: t.type,
|
|
601
595
|
elevation: 1
|
|
602
596
|
}, {
|
|
603
597
|
default: w(() => [
|
|
@@ -608,27 +602,27 @@ const Xe = /* @__PURE__ */ T({
|
|
|
608
602
|
}, null, 8, ["icon"])) : le("", !0),
|
|
609
603
|
v("div", {
|
|
610
604
|
style: ne(n.value)
|
|
611
|
-
}, q(
|
|
605
|
+
}, q(t.text), 5),
|
|
612
606
|
b(p, {
|
|
613
|
-
onClick: u[0] || (u[0] = (x) => l("timeout", a.id)),
|
|
614
607
|
class: "mx-1",
|
|
615
|
-
icon: re(
|
|
608
|
+
icon: re(Ke),
|
|
609
|
+
onClick: u[0] || (u[0] = (y) => l("timeout", t.id))
|
|
616
610
|
}, null, 8, ["icon"])
|
|
617
611
|
]),
|
|
618
612
|
_: 1
|
|
619
613
|
}, 8, ["color"]);
|
|
620
614
|
};
|
|
621
615
|
}
|
|
622
|
-
}), Qe = /* @__PURE__ */ te(
|
|
616
|
+
}), Qe = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-d5cfe252"]]), Je = /* @__PURE__ */ T({
|
|
623
617
|
__name: "index",
|
|
624
618
|
setup(e) {
|
|
625
|
-
const
|
|
619
|
+
const a = d([]);
|
|
626
620
|
V(() => {
|
|
627
|
-
s.on("message",
|
|
621
|
+
s.on("message", t);
|
|
628
622
|
}), I(() => {
|
|
629
|
-
s.off("message",
|
|
623
|
+
s.off("message", t);
|
|
630
624
|
});
|
|
631
|
-
const
|
|
625
|
+
const t = (c) => {
|
|
632
626
|
r(c.type, c.text, c.timeout);
|
|
633
627
|
}, n = (c) => {
|
|
634
628
|
l(c);
|
|
@@ -636,41 +630,41 @@ const Xe = /* @__PURE__ */ T({
|
|
|
636
630
|
let o = 0;
|
|
637
631
|
const r = (c, u, p) => {
|
|
638
632
|
const _ = o++;
|
|
639
|
-
|
|
633
|
+
a.value.push({ id: _, type: c, text: u, timeout: p });
|
|
640
634
|
}, l = (c) => {
|
|
641
|
-
const u =
|
|
642
|
-
u >= 0 &&
|
|
635
|
+
const u = a.value.findIndex((p) => p.id === c);
|
|
636
|
+
u >= 0 && a.value.splice(u, 1);
|
|
643
637
|
};
|
|
644
|
-
return (c, u) => (D(),
|
|
638
|
+
return (c, u) => (D(), J("div", {
|
|
639
|
+
class: "x-cont d-flex flex-column-reverse align-center",
|
|
645
640
|
onClick: u[0] || (u[0] = W(() => {
|
|
646
|
-
}, ["stop"]))
|
|
647
|
-
class: "x-cont d-flex flex-column-reverse align-center"
|
|
641
|
+
}, ["stop"]))
|
|
648
642
|
}, [
|
|
649
|
-
(D(!0),
|
|
650
|
-
key: p.id,
|
|
651
|
-
onTimeout: n,
|
|
643
|
+
(D(!0), J(ve, null, me(a.value, (p) => (D(), O(Qe, {
|
|
652
644
|
id: p.id,
|
|
645
|
+
key: p.id,
|
|
653
646
|
type: p.type,
|
|
654
647
|
text: p.text,
|
|
655
|
-
timeout: p.timeout
|
|
648
|
+
timeout: p.timeout,
|
|
649
|
+
onTimeout: n
|
|
656
650
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
657
651
|
]));
|
|
658
652
|
}
|
|
659
|
-
}), Ye = /* @__PURE__ */ te(Je, [["__scopeId", "data-v-
|
|
653
|
+
}), Ye = /* @__PURE__ */ te(Je, [["__scopeId", "data-v-d525e6f5"]]), Pe = /* @__PURE__ */ T({
|
|
660
654
|
__name: "index",
|
|
661
655
|
setup(e) {
|
|
662
|
-
const { t } =
|
|
656
|
+
const { t: a } = P(), t = $(), n = g({
|
|
663
657
|
get() {
|
|
664
|
-
return
|
|
658
|
+
return t.hasView("promptDlg");
|
|
665
659
|
},
|
|
666
660
|
set(f) {
|
|
667
|
-
f ?
|
|
661
|
+
f ? t.addView("promptDlg") : t.delView("promptDlg");
|
|
668
662
|
}
|
|
669
|
-
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(), p = d(""), _ = d(""),
|
|
670
|
-
let
|
|
663
|
+
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(), p = d(""), _ = d(""), y = d(""), i = d(""), M = d(""), m = d();
|
|
664
|
+
let x = 0, C = !1;
|
|
671
665
|
const S = async (f) => {
|
|
672
666
|
var k, A, H, z, B;
|
|
673
|
-
o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, _.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary",
|
|
667
|
+
o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, _.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary", y.value = ((A = f.cancel) == null ? void 0 : A.text) ?? a("dlg.common.cancel"), i.value = ((H = f.confirm) == null ? void 0 : H.color) ?? "primary", M.value = ((z = f.confirm) == null ? void 0 : z.text) ?? a("dlg.common.confirm"), x = f.seq, C = !1, n.value = !0, await G(() => !!m.value, 1e3), (B = m.value) == null || B.focus();
|
|
674
668
|
};
|
|
675
669
|
V(() => {
|
|
676
670
|
s.on("promptDlg", S);
|
|
@@ -678,41 +672,41 @@ const Xe = /* @__PURE__ */ T({
|
|
|
678
672
|
s.off("promptDlg", S);
|
|
679
673
|
});
|
|
680
674
|
const R = () => {
|
|
681
|
-
n.value = !1, C || (s.emit("promptDlgResult" +
|
|
675
|
+
n.value = !1, C || (s.emit("promptDlgResult" + x, p.value ?? ""), C = !0);
|
|
682
676
|
};
|
|
683
|
-
return
|
|
684
|
-
!f && !C && (s.emit("promptDlgResult" +
|
|
677
|
+
return N(n, (f) => {
|
|
678
|
+
!f && !C && (s.emit("promptDlgResult" + x, void 0), C = !0);
|
|
685
679
|
}), (f, k) => {
|
|
686
680
|
const A = h("v-card-text"), H = h("v-text-field"), z = h("v-form"), B = h("v-btn"), de = h("v-card-actions"), _e = h("v-card"), ie = h("v-dialog");
|
|
687
681
|
return D(), O(ie, {
|
|
688
682
|
modelValue: n.value,
|
|
689
683
|
"onUpdate:modelValue": k[2] || (k[2] = (U) => n.value = U),
|
|
690
|
-
onKeydown: [
|
|
691
|
-
k[3] || (k[3] = K(W((U) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
692
|
-
K(W(R, ["stop", "prevent"]), ["enter"])
|
|
693
|
-
],
|
|
694
684
|
transition: "dialog-top-transition",
|
|
695
|
-
"max-width": "600px"
|
|
685
|
+
"max-width": "600px",
|
|
686
|
+
onKeydown: [
|
|
687
|
+
k[3] || (k[3] = F(W((U) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
688
|
+
F(W(R, ["stop", "prevent"]), ["enter"])
|
|
689
|
+
]
|
|
696
690
|
}, {
|
|
697
691
|
default: w(() => [
|
|
698
692
|
b(_e, { title: o.value }, {
|
|
699
693
|
default: w(() => [
|
|
700
694
|
r.value ? (D(), O(A, { key: 0 }, {
|
|
701
695
|
default: w(() => [
|
|
702
|
-
|
|
696
|
+
E(q(r.value), 1)
|
|
703
697
|
]),
|
|
704
698
|
_: 1
|
|
705
699
|
})) : le("", !0),
|
|
706
700
|
b(z, { class: "mx-3" }, {
|
|
707
701
|
default: w(() => [
|
|
708
702
|
b(H, {
|
|
703
|
+
ref_key: "target",
|
|
704
|
+
ref: m,
|
|
709
705
|
modelValue: p.value,
|
|
710
706
|
"onUpdate:modelValue": k[0] || (k[0] = (U) => p.value = U),
|
|
711
707
|
label: l.value,
|
|
712
708
|
placeholder: c.value,
|
|
713
|
-
rules: u.value
|
|
714
|
-
ref_key: "target",
|
|
715
|
-
ref: m
|
|
709
|
+
rules: u.value
|
|
716
710
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
717
711
|
]),
|
|
718
712
|
_: 1
|
|
@@ -720,22 +714,22 @@ const Xe = /* @__PURE__ */ T({
|
|
|
720
714
|
b(de, { class: "d-flex justify-end" }, {
|
|
721
715
|
default: w(() => [
|
|
722
716
|
b(B, {
|
|
723
|
-
onClick: k[1] || (k[1] = (U) => n.value = !1),
|
|
724
717
|
color: _.value,
|
|
725
|
-
variant: "text"
|
|
718
|
+
variant: "text",
|
|
719
|
+
onClick: k[1] || (k[1] = (U) => n.value = !1)
|
|
726
720
|
}, {
|
|
727
721
|
default: w(() => [
|
|
728
|
-
|
|
722
|
+
E(q(y.value), 1)
|
|
729
723
|
]),
|
|
730
724
|
_: 1
|
|
731
725
|
}, 8, ["color"]),
|
|
732
726
|
b(B, {
|
|
733
|
-
onClick: R,
|
|
734
727
|
color: i.value,
|
|
735
|
-
variant: "text"
|
|
728
|
+
variant: "text",
|
|
729
|
+
onClick: R
|
|
736
730
|
}, {
|
|
737
731
|
default: w(() => [
|
|
738
|
-
|
|
732
|
+
E(q(M.value), 1)
|
|
739
733
|
]),
|
|
740
734
|
_: 1
|
|
741
735
|
}, 8, ["color"])
|
|
@@ -753,15 +747,15 @@ const Xe = /* @__PURE__ */ T({
|
|
|
753
747
|
}), et = { class: "mx-auto my-auto" }, tt = { class: "w-100 h-100 d-flex align-center justify-center" }, at = { class: "text-body-1" }, ot = /* @__PURE__ */ T({
|
|
754
748
|
__name: "index",
|
|
755
749
|
setup(e) {
|
|
756
|
-
const { t } =
|
|
750
|
+
const { t: a } = P(), t = $(), n = g({
|
|
757
751
|
get() {
|
|
758
|
-
return
|
|
752
|
+
return t.hasView("waitDlg");
|
|
759
753
|
},
|
|
760
754
|
set(c) {
|
|
761
|
-
c ?
|
|
755
|
+
c ? t.addView("waitDlg") : t.delView("waitDlg");
|
|
762
756
|
}
|
|
763
757
|
}), o = d(""), r = (c) => {
|
|
764
|
-
o.value = c.text ??
|
|
758
|
+
o.value = c.text ?? a("dlg.common.waiting"), n.value = !0;
|
|
765
759
|
}, l = () => {
|
|
766
760
|
n.value = !1;
|
|
767
761
|
};
|
|
@@ -773,7 +767,7 @@ const Xe = /* @__PURE__ */ T({
|
|
|
773
767
|
const p = h("v-card"), _ = h("v-dialog");
|
|
774
768
|
return D(), O(_, {
|
|
775
769
|
modelValue: n.value,
|
|
776
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
770
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => n.value = y),
|
|
777
771
|
persistent: "",
|
|
778
772
|
"no-click-animation": "",
|
|
779
773
|
fullscreen: ""
|
|
@@ -799,13 +793,13 @@ const Xe = /* @__PURE__ */ T({
|
|
|
799
793
|
};
|
|
800
794
|
}
|
|
801
795
|
}), nt = (e) => {
|
|
802
|
-
e.component("
|
|
796
|
+
e.component("XConfirmDlg", Be), e.component("XLoading", ze), e.component("XMessage", Ye), e.component("XPromptDlg", Pe), e.component("XWaitDlg", ot);
|
|
803
797
|
};
|
|
804
798
|
function Rt() {
|
|
805
|
-
const e =
|
|
799
|
+
const e = ee(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), n = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
806
800
|
return {
|
|
807
|
-
primaryColor:
|
|
808
|
-
secondaryColor:
|
|
801
|
+
primaryColor: a,
|
|
802
|
+
secondaryColor: t,
|
|
809
803
|
backgroundColor0: n,
|
|
810
804
|
backgroundColor1: o,
|
|
811
805
|
backgroundColor2: r,
|
|
@@ -823,24 +817,24 @@ const ct = typeof window < "u" && typeof document < "u";
|
|
|
823
817
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
824
818
|
const ut = ct ? window : void 0;
|
|
825
819
|
function st() {
|
|
826
|
-
const e = d(!1),
|
|
827
|
-
return
|
|
820
|
+
const e = d(!1), a = xe();
|
|
821
|
+
return a && V(() => {
|
|
828
822
|
e.value = !0;
|
|
829
|
-
},
|
|
823
|
+
}, a), e;
|
|
830
824
|
}
|
|
831
825
|
function pt(e) {
|
|
832
|
-
const
|
|
833
|
-
return g(() => (
|
|
826
|
+
const a = st();
|
|
827
|
+
return g(() => (a.value, !!e()));
|
|
834
828
|
}
|
|
835
|
-
function dt(e,
|
|
836
|
-
const { window:
|
|
829
|
+
function dt(e, a = {}) {
|
|
830
|
+
const { window: t = ut } = a, n = pt(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
|
|
837
831
|
let o;
|
|
838
832
|
const r = d(!1), l = (p) => {
|
|
839
833
|
r.value = p.matches;
|
|
840
834
|
}, c = () => {
|
|
841
835
|
o && ("removeEventListener" in o ? o.removeEventListener("change", l) : o.removeListener(l));
|
|
842
|
-
}, u =
|
|
843
|
-
n.value && (c(), o =
|
|
836
|
+
}, u = ye(() => {
|
|
837
|
+
n.value && (c(), o = t.matchMedia(rt(e)), "addEventListener" in o ? o.addEventListener("change", l) : o.addListener(l), r.value = o.matches);
|
|
844
838
|
});
|
|
845
839
|
return lt(() => {
|
|
846
840
|
u(), c(), o = void 0;
|
|
@@ -850,15 +844,15 @@ function _t(e) {
|
|
|
850
844
|
return dt("(prefers-color-scheme: dark)", e);
|
|
851
845
|
}
|
|
852
846
|
function it() {
|
|
853
|
-
const e = Ce(),
|
|
847
|
+
const e = Ce(), a = Z(), t = _t(), n = g(() => typeof a.dark == "boolean" ? a.dark : t.value), o = g(() => !!window.cordova), r = g(() => e.width.value <= 1280 ? e.width.value + "px" : e.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
854
848
|
return { dark: n, sysBarAvail: o, compactWidth: r };
|
|
855
849
|
}
|
|
856
850
|
function It() {
|
|
857
|
-
const e = be(),
|
|
858
|
-
|
|
851
|
+
const e = be(), a = ue(), t = ee(), { dark: n } = it(), o = Z(), r = $();
|
|
852
|
+
N(
|
|
859
853
|
n,
|
|
860
854
|
(i) => {
|
|
861
|
-
|
|
855
|
+
t.global.name.value = i ? "dark" : "light";
|
|
862
856
|
},
|
|
863
857
|
{ immediate: !0 }
|
|
864
858
|
);
|
|
@@ -873,13 +867,13 @@ function It() {
|
|
|
873
867
|
r.hasView("waitDlg") || r.popView();
|
|
874
868
|
return;
|
|
875
869
|
}
|
|
876
|
-
const i =
|
|
870
|
+
const i = K(e.path);
|
|
877
871
|
(i == null ? void 0 : i.level) === 0 ? (M = navigator == null ? void 0 : navigator.Backbutton) == null || M.goHome(
|
|
878
872
|
() => {
|
|
879
873
|
},
|
|
880
874
|
() => {
|
|
881
875
|
}
|
|
882
|
-
) :
|
|
876
|
+
) : a.back();
|
|
883
877
|
};
|
|
884
878
|
V(() => {
|
|
885
879
|
window.addEventListener("keydown", l), s.on("backbutton", c);
|
|
@@ -892,33 +886,33 @@ function It() {
|
|
|
892
886
|
o.locale = i;
|
|
893
887
|
}, _ = (i) => {
|
|
894
888
|
o.permissionObjects = i[0], o.permissionChecksum = i[1];
|
|
895
|
-
},
|
|
889
|
+
}, y = (i) => {
|
|
896
890
|
o.lastAppPath = i;
|
|
897
891
|
};
|
|
898
892
|
V(() => {
|
|
899
|
-
s.on("updateDark", u), s.on("updateLocale", p), s.on("updatePermission", _), s.on("updateLastAppPath",
|
|
893
|
+
s.on("updateDark", u), s.on("updateLocale", p), s.on("updatePermission", _), s.on("updateLastAppPath", y), s.emit("syncGlobalState");
|
|
900
894
|
}), I(() => {
|
|
901
|
-
s.off("updateDark", u), s.off("updateLocale", p), s.off("updatePermission", _), s.off("updateLastAppPath",
|
|
895
|
+
s.off("updateDark", u), s.off("updateLocale", p), s.off("updatePermission", _), s.off("updateLastAppPath", y);
|
|
902
896
|
});
|
|
903
897
|
}
|
|
904
898
|
function Ot() {
|
|
905
|
-
const e =
|
|
906
|
-
function t
|
|
907
|
-
const o = e.permissionObjects[
|
|
899
|
+
const e = Z();
|
|
900
|
+
function a(t, n) {
|
|
901
|
+
const o = e.permissionObjects[t];
|
|
908
902
|
return o ? n ? !(!oe(o.includes, n) || oe(o.excludes, n)) : !0 : !1;
|
|
909
903
|
}
|
|
910
|
-
return { verifyPermission:
|
|
904
|
+
return { verifyPermission: a };
|
|
911
905
|
}
|
|
912
|
-
function
|
|
913
|
-
const
|
|
906
|
+
function Et(e, a) {
|
|
907
|
+
const t = $(), n = g({
|
|
914
908
|
get() {
|
|
915
|
-
return
|
|
909
|
+
return t.hasView(e);
|
|
916
910
|
},
|
|
917
911
|
set(r) {
|
|
918
|
-
r ?
|
|
912
|
+
r ? t.addView(e) : t.delView(e);
|
|
919
913
|
}
|
|
920
914
|
}), o = (r) => {
|
|
921
|
-
|
|
915
|
+
a == null || a(r), n.value = !0;
|
|
922
916
|
};
|
|
923
917
|
return V(() => {
|
|
924
918
|
s.on(e, o);
|
|
@@ -926,20 +920,20 @@ function jt(e, t) {
|
|
|
926
920
|
s.off(e, o);
|
|
927
921
|
}), { open: n };
|
|
928
922
|
}
|
|
929
|
-
const ft = (e,
|
|
930
|
-
const n = e[
|
|
923
|
+
const ft = (e, a, t) => {
|
|
924
|
+
const n = e[a];
|
|
931
925
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((o, r) => {
|
|
932
926
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
933
927
|
r.bind(
|
|
934
928
|
null,
|
|
935
929
|
new Error(
|
|
936
|
-
"Unknown variable dynamic import: " +
|
|
930
|
+
"Unknown variable dynamic import: " + a + (a.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
937
931
|
)
|
|
938
932
|
)
|
|
939
933
|
);
|
|
940
934
|
});
|
|
941
935
|
};
|
|
942
|
-
async function
|
|
936
|
+
async function jt(e) {
|
|
943
937
|
return (await ft(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./en-iuzmkt0n.js"), "./locales/zhHans/index.ts": () => import("./zhHans-m6y1by9n.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
944
938
|
}
|
|
945
939
|
const Tt = { install: nt };
|
|
@@ -947,12 +941,12 @@ export {
|
|
|
947
941
|
Oe as Permission,
|
|
948
942
|
Re as appAppear,
|
|
949
943
|
Lt as closeWaitDlg,
|
|
950
|
-
|
|
944
|
+
xt as createAxios,
|
|
951
945
|
Tt as default,
|
|
952
946
|
s as eventBus,
|
|
953
947
|
oe as isExist,
|
|
954
|
-
|
|
955
|
-
|
|
948
|
+
jt as loadLocaleMessageEssential,
|
|
949
|
+
K as matchRouteMeta,
|
|
956
950
|
Vt as messageError,
|
|
957
951
|
Mt as messageInfo,
|
|
958
952
|
St as messageSuccess,
|
|
@@ -961,14 +955,14 @@ export {
|
|
|
961
955
|
bt as openConfirmDlg,
|
|
962
956
|
Ct as openPromptDlg,
|
|
963
957
|
Dt as openWaitDlg,
|
|
964
|
-
|
|
958
|
+
Q as routeTransName,
|
|
965
959
|
Rt as useColor,
|
|
966
|
-
|
|
960
|
+
Z as useGlobalStore,
|
|
967
961
|
It as useMicroApp,
|
|
968
962
|
Ot as usePermission,
|
|
969
963
|
it as useSystem,
|
|
970
964
|
$ as useViewMgrStore,
|
|
971
|
-
|
|
965
|
+
Et as useViewStack,
|
|
972
966
|
kt as waitMs,
|
|
973
|
-
|
|
967
|
+
G as waitUtil
|
|
974
968
|
};
|
package/dist/utils/misc.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { Emitter, EventType } from 'mitt';
|
|
|
2
2
|
export declare const eventBus: Emitter<Record<EventType, unknown>>;
|
|
3
3
|
export declare function waitMs(ms: number): Promise<void>;
|
|
4
4
|
export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
|
|
5
|
-
export declare function appAppear(name: string, forward: boolean): void
|
|
5
|
+
export declare function appAppear(name: string, forward: boolean): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"axios": "^1.7.2",
|
|
31
31
|
"pinia": "^2.1.7",
|
|
32
32
|
"pinia-plugin-persistedstate": "^3.2.1",
|
|
33
|
-
"vue": "^3.4.
|
|
33
|
+
"vue": "^3.4.32",
|
|
34
34
|
"vue-i18n": "^9.13.1",
|
|
35
35
|
"vue-router": "^4.4.0",
|
|
36
|
-
"vuetify": "^3.6.
|
|
36
|
+
"vuetify": "^3.6.13"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@mdi/js": "^7.4.47",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-vue": "^9.27.0",
|
|
48
48
|
"husky": "^9.0.11",
|
|
49
49
|
"lint-staged": "^15.2.7",
|
|
50
|
-
"prettier": "3.3.
|
|
50
|
+
"prettier": "3.3.3",
|
|
51
51
|
"sass": "^1.77.7",
|
|
52
52
|
"typescript": "^5.5.3",
|
|
53
53
|
"vite": "^5.3.3",
|