x-essential-lib 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +24 -0
- package/dist/index.js +291 -248
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -96,11 +96,35 @@ interface PromptParams {
|
|
|
96
96
|
export declare function openPromptDlg(params: PromptParams): Promise<any>
|
|
97
97
|
|
|
98
98
|
export declare function openWaitDlg()
|
|
99
|
+
|
|
99
100
|
export declare function closeWaitDlg()
|
|
100
101
|
|
|
101
102
|
export declare function messageError(text: string, timeout?: number)
|
|
103
|
+
|
|
102
104
|
export declare function messageInfo(text: string, timeout?: number)
|
|
105
|
+
|
|
103
106
|
export declare function messageSuccess(text: string, timeout?: number)
|
|
107
|
+
|
|
104
108
|
export declare function messageWarning(text: string, timeout?: number)
|
|
105
109
|
|
|
106
110
|
export declare function appAppear(name: string)
|
|
111
|
+
|
|
112
|
+
type RequiredState = 'auth' | 'org'
|
|
113
|
+
|
|
114
|
+
interface RouteMeta {
|
|
115
|
+
path: string
|
|
116
|
+
level: number
|
|
117
|
+
requiredState?: RequiredState
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export declare const routeMetas: RouteMeta[]
|
|
121
|
+
|
|
122
|
+
export declare function matchRouteMeta(path: string): RouteMeta | undefined
|
|
123
|
+
|
|
124
|
+
interface PathInfo {
|
|
125
|
+
app: string
|
|
126
|
+
path: string
|
|
127
|
+
level: number
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare function getPathInfo(path: string): PathInfo
|
package/dist/index.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{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 { getCurrentInstance as ae, inject as
|
|
3
|
-
function
|
|
4
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(
|
|
5
|
-
var o = e.get(
|
|
6
|
-
o ? o.push(
|
|
7
|
-
}, off: function(
|
|
8
|
-
var o = e.get(
|
|
9
|
-
o && (
|
|
10
|
-
}, emit: function(
|
|
11
|
-
var o = e.get(
|
|
2
|
+
import { getCurrentInstance as ae, inject as K, computed as d, defineComponent as q, useModel as H, ref as _, onMounted as R, onBeforeUnmount as L, watch as O, resolveComponent as m, openBlock as k, createBlock as W, withKeys as A, withModifiers as B, withCtx as v, createVNode as x, createTextVNode as b, toDisplayString as w, createElementBlock as U, normalizeStyle as se, pushScopeId as ue, popScopeId as ie, createElementVNode as g, reactive as ce, Fragment as de, renderList as pe, unref as fe } from "vue";
|
|
3
|
+
function me(e) {
|
|
4
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
|
|
5
|
+
var o = e.get(t);
|
|
6
|
+
o ? o.push(n) : e.set(t, [n]);
|
|
7
|
+
}, off: function(t, n) {
|
|
8
|
+
var o = e.get(t);
|
|
9
|
+
o && (n ? o.splice(o.indexOf(n) >>> 0, 1) : e.set(t, []));
|
|
10
|
+
}, emit: function(t, n) {
|
|
11
|
+
var o = e.get(t);
|
|
12
12
|
o && o.slice().map(function(l) {
|
|
13
|
-
l(
|
|
13
|
+
l(n);
|
|
14
14
|
}), (o = e.get("*")) && o.slice().map(function(l) {
|
|
15
|
-
l(
|
|
15
|
+
l(t, n);
|
|
16
16
|
});
|
|
17
17
|
} };
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
async function
|
|
21
|
-
return new Promise((
|
|
22
|
-
setTimeout(
|
|
19
|
+
const i = me();
|
|
20
|
+
async function je(e) {
|
|
21
|
+
return new Promise((t) => {
|
|
22
|
+
setTimeout(t, e);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
async function
|
|
25
|
+
async function z(e, t, n) {
|
|
26
26
|
const o = Date.now();
|
|
27
27
|
return new Promise((l) => {
|
|
28
|
-
const
|
|
29
|
-
e() ? l(!0) :
|
|
28
|
+
const r = async () => {
|
|
29
|
+
e() ? l(!0) : t && Date.now() - o > t ? l(!1) : setTimeout(r, n ?? 30);
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
r();
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function M() {
|
|
35
35
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
const
|
|
39
|
-
return
|
|
36
|
+
if (M.cache.has(e))
|
|
37
|
+
return M.cache.get(e);
|
|
38
|
+
const t = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
39
|
+
return M.cache.set(e, t), t;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
function J(e,
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
41
|
+
M.cache = /* @__PURE__ */ new Map();
|
|
42
|
+
function J(e, t) {
|
|
43
|
+
const n = ae();
|
|
44
|
+
if (!n)
|
|
45
45
|
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
46
|
-
return
|
|
46
|
+
return n;
|
|
47
47
|
}
|
|
48
48
|
function ve() {
|
|
49
49
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
|
|
50
|
-
const
|
|
51
|
-
return
|
|
50
|
+
const t = J(e).type;
|
|
51
|
+
return M((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
|
|
52
52
|
}
|
|
53
53
|
const ge = Symbol.for("vuetify:locale");
|
|
54
|
-
function
|
|
55
|
-
const e =
|
|
54
|
+
function X() {
|
|
55
|
+
const e = K(ge);
|
|
56
56
|
if (!e)
|
|
57
57
|
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
58
58
|
return e;
|
|
59
59
|
}
|
|
60
60
|
const _e = Symbol.for("vuetify:display");
|
|
61
61
|
function xe() {
|
|
62
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
63
|
-
const
|
|
64
|
-
if (!
|
|
62
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ve();
|
|
63
|
+
const n = K(_e);
|
|
64
|
+
if (!n)
|
|
65
65
|
throw new Error("Could not find Vuetify display injection");
|
|
66
66
|
const o = d(() => {
|
|
67
67
|
if (!e.mobileBreakpoint)
|
|
68
|
-
return
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
}), l = d(() =>
|
|
72
|
-
[`${
|
|
68
|
+
return n.mobile.value;
|
|
69
|
+
const r = typeof e.mobileBreakpoint == "number" ? e.mobileBreakpoint : n.thresholds.value[e.mobileBreakpoint];
|
|
70
|
+
return n.width.value < r;
|
|
71
|
+
}), l = d(() => t ? {
|
|
72
|
+
[`${t}--mobile`]: o.value
|
|
73
73
|
} : {});
|
|
74
74
|
return {
|
|
75
|
-
...
|
|
75
|
+
...n,
|
|
76
76
|
displayClasses: l,
|
|
77
77
|
mobile: o
|
|
78
78
|
};
|
|
@@ -80,12 +80,12 @@ function xe() {
|
|
|
80
80
|
const ye = Symbol.for("vuetify:theme");
|
|
81
81
|
function F() {
|
|
82
82
|
J("useTheme");
|
|
83
|
-
const e =
|
|
83
|
+
const e = K(ye, null);
|
|
84
84
|
if (!e)
|
|
85
85
|
throw new Error("Could not find Vuetify theme injection");
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
88
|
+
const he = /* @__PURE__ */ q({
|
|
89
89
|
__name: "index",
|
|
90
90
|
props: {
|
|
91
91
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -93,41 +93,41 @@ const we = /* @__PURE__ */ I({
|
|
|
93
93
|
},
|
|
94
94
|
emits: ["update:modelValue"],
|
|
95
95
|
setup(e) {
|
|
96
|
-
const
|
|
96
|
+
const t = X(), n = H(e, "modelValue"), o = _(""), l = _(""), r = _(), s = _(), a = d(() => {
|
|
97
97
|
var c;
|
|
98
|
-
return ((c =
|
|
99
|
-
}), m = d(() => {
|
|
100
|
-
var c;
|
|
101
|
-
return ((c = s.value) == null ? void 0 : c.text) ?? n.t("cancel");
|
|
98
|
+
return ((c = r.value) == null ? void 0 : c.color) ?? "primary";
|
|
102
99
|
}), f = d(() => {
|
|
103
100
|
var c;
|
|
104
|
-
return ((c =
|
|
101
|
+
return ((c = r.value) == null ? void 0 : c.text) ?? t.t("cancel");
|
|
102
|
+
}), p = d(() => {
|
|
103
|
+
var c;
|
|
104
|
+
return ((c = s.value) == null ? void 0 : c.color) ?? "primary";
|
|
105
105
|
}), C = d(() => {
|
|
106
106
|
var c;
|
|
107
|
-
return ((c =
|
|
107
|
+
return ((c = s.value) == null ? void 0 : c.text) ?? t.t("confirm");
|
|
108
108
|
});
|
|
109
|
-
let
|
|
109
|
+
let V = 0, D = !1;
|
|
110
110
|
const E = (c) => {
|
|
111
|
-
o.value = c.title, l.value = c.text,
|
|
111
|
+
o.value = c.title, l.value = c.text, r.value = c.cancel, s.value = c.confirm, V = c.seq, D = !1, n.value = !0;
|
|
112
112
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}),
|
|
116
|
-
|
|
113
|
+
R(() => {
|
|
114
|
+
i.on("confirmDlg", E);
|
|
115
|
+
}), L(() => {
|
|
116
|
+
i.off("confirmDlg", E);
|
|
117
117
|
});
|
|
118
118
|
const N = () => {
|
|
119
|
-
|
|
119
|
+
n.value = !1, D || (i.emit("confirmDlgResult" + V, !0), D = !0);
|
|
120
120
|
};
|
|
121
|
-
return O(
|
|
122
|
-
!c && !D && (
|
|
123
|
-
}), (c,
|
|
124
|
-
const
|
|
125
|
-
return k(),
|
|
126
|
-
modelValue:
|
|
127
|
-
"onUpdate:modelValue":
|
|
121
|
+
return O(n, (c) => {
|
|
122
|
+
!c && !D && (i.emit("confirmDlgResult" + V, !1), D = !0);
|
|
123
|
+
}), (c, h) => {
|
|
124
|
+
const S = m("v-card-title"), j = m("v-card-text"), I = m("v-btn"), u = m("v-card-actions"), y = m("v-card"), P = m("v-dialog");
|
|
125
|
+
return k(), W(P, {
|
|
126
|
+
modelValue: n.value,
|
|
127
|
+
"onUpdate:modelValue": h[1] || (h[1] = (T) => n.value = T),
|
|
128
128
|
onKeydown: [
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
h[2] || (h[2] = A(B((T) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
130
|
+
A(B(N, ["stop", "prevent"]), ["enter"])
|
|
131
131
|
],
|
|
132
132
|
transition: "dialog-top-transition",
|
|
133
133
|
"max-width": "600px"
|
|
@@ -135,37 +135,37 @@ const we = /* @__PURE__ */ I({
|
|
|
135
135
|
default: v(() => [
|
|
136
136
|
x(y, null, {
|
|
137
137
|
default: v(() => [
|
|
138
|
-
x(
|
|
138
|
+
x(S, null, {
|
|
139
139
|
default: v(() => [
|
|
140
|
-
|
|
140
|
+
b(w(o.value), 1)
|
|
141
141
|
]),
|
|
142
142
|
_: 1
|
|
143
143
|
}),
|
|
144
144
|
x(j, null, {
|
|
145
145
|
default: v(() => [
|
|
146
|
-
|
|
146
|
+
b(w(l.value), 1)
|
|
147
147
|
]),
|
|
148
148
|
_: 1
|
|
149
149
|
}),
|
|
150
|
-
x(
|
|
150
|
+
x(u, { class: "d-flex justify-end" }, {
|
|
151
151
|
default: v(() => [
|
|
152
|
-
x(
|
|
153
|
-
onClick:
|
|
154
|
-
color:
|
|
152
|
+
x(I, {
|
|
153
|
+
onClick: h[0] || (h[0] = (T) => n.value = !1),
|
|
154
|
+
color: a.value,
|
|
155
155
|
variant: "text"
|
|
156
156
|
}, {
|
|
157
157
|
default: v(() => [
|
|
158
|
-
|
|
158
|
+
b(w(f.value), 1)
|
|
159
159
|
]),
|
|
160
160
|
_: 1
|
|
161
161
|
}, 8, ["color"]),
|
|
162
|
-
x(
|
|
162
|
+
x(I, {
|
|
163
163
|
onClick: N,
|
|
164
|
-
color:
|
|
164
|
+
color: p.value,
|
|
165
165
|
variant: "text"
|
|
166
166
|
}, {
|
|
167
167
|
default: v(() => [
|
|
168
|
-
|
|
168
|
+
b(w(C.value), 1)
|
|
169
169
|
]),
|
|
170
170
|
_: 1
|
|
171
171
|
}, 8, ["color"])
|
|
@@ -180,7 +180,7 @@ const we = /* @__PURE__ */ I({
|
|
|
180
180
|
}, 8, ["modelValue", "onKeydown"]);
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
}),
|
|
183
|
+
}), we = (e) => (ue("data-v-a8f3d91f"), e = e(), ie(), e), be = /* @__PURE__ */ we(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
|
|
184
184
|
/* @__PURE__ */ g("div"),
|
|
185
185
|
/* @__PURE__ */ g("div"),
|
|
186
186
|
/* @__PURE__ */ g("div"),
|
|
@@ -194,8 +194,8 @@ const we = /* @__PURE__ */ I({
|
|
|
194
194
|
/* @__PURE__ */ g("div"),
|
|
195
195
|
/* @__PURE__ */ g("div")
|
|
196
196
|
], -1)), ke = [
|
|
197
|
-
|
|
198
|
-
], Ce = /* @__PURE__ */
|
|
197
|
+
be
|
|
198
|
+
], Ce = /* @__PURE__ */ q({
|
|
199
199
|
__name: "index",
|
|
200
200
|
props: {
|
|
201
201
|
zIndex: {
|
|
@@ -204,21 +204,21 @@ const we = /* @__PURE__ */ I({
|
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
206
|
setup(e) {
|
|
207
|
-
const
|
|
208
|
-
background:
|
|
209
|
-
zIndex:
|
|
207
|
+
const t = F(), n = e, o = d(() => ({
|
|
208
|
+
background: t.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
209
|
+
zIndex: n.zIndex
|
|
210
210
|
}));
|
|
211
|
-
return (l,
|
|
211
|
+
return (l, r) => (k(), U("div", {
|
|
212
212
|
class: "x-cont",
|
|
213
213
|
style: se(o.value)
|
|
214
214
|
}, ke, 4));
|
|
215
215
|
}
|
|
216
|
-
}), Q = (e,
|
|
217
|
-
const
|
|
218
|
-
for (const [o, l] of
|
|
219
|
-
|
|
220
|
-
return
|
|
221
|
-
}, De = /* @__PURE__ */ Q(Ce, [["__scopeId", "data-v-a8f3d91f"]]),
|
|
216
|
+
}), Q = (e, t) => {
|
|
217
|
+
const n = e.__vccOpts || e;
|
|
218
|
+
for (const [o, l] of t)
|
|
219
|
+
n[o] = l;
|
|
220
|
+
return n;
|
|
221
|
+
}, De = /* @__PURE__ */ Q(Ce, [["__scopeId", "data-v-a8f3d91f"]]), Se = /* @__PURE__ */ q({
|
|
222
222
|
__name: "item",
|
|
223
223
|
props: {
|
|
224
224
|
id: {
|
|
@@ -239,39 +239,39 @@ const we = /* @__PURE__ */ I({
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
emits: ["timeout"],
|
|
242
|
-
setup(e, { emit:
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
switch (
|
|
242
|
+
setup(e, { emit: t }) {
|
|
243
|
+
const n = e, o = _(!0), l = t, r = d(() => {
|
|
244
|
+
let s = "";
|
|
245
|
+
switch (n.type) {
|
|
246
246
|
case "error":
|
|
247
|
-
|
|
247
|
+
s = "cancel";
|
|
248
248
|
break;
|
|
249
249
|
case "info":
|
|
250
|
-
|
|
250
|
+
s = "info";
|
|
251
251
|
break;
|
|
252
252
|
case "success":
|
|
253
|
-
|
|
253
|
+
s = "check-circle";
|
|
254
254
|
break;
|
|
255
255
|
case "warning":
|
|
256
|
-
|
|
256
|
+
s = "error";
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return s;
|
|
260
260
|
});
|
|
261
|
-
return
|
|
261
|
+
return R(() => {
|
|
262
262
|
setTimeout(() => {
|
|
263
|
-
l("timeout",
|
|
264
|
-
},
|
|
265
|
-
}), O(o, (
|
|
266
|
-
|
|
267
|
-
}), (
|
|
268
|
-
const
|
|
269
|
-
return k(),
|
|
263
|
+
l("timeout", n.id);
|
|
264
|
+
}, n.timeout);
|
|
265
|
+
}), O(o, (s) => {
|
|
266
|
+
s || l("timeout", n.id);
|
|
267
|
+
}), (s, a) => {
|
|
268
|
+
const f = m("v-alert");
|
|
269
|
+
return k(), W(f, {
|
|
270
270
|
modelValue: o.value,
|
|
271
|
-
"onUpdate:modelValue":
|
|
271
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => o.value = p),
|
|
272
272
|
class: "mt-2",
|
|
273
273
|
type: e.type,
|
|
274
|
-
icon:
|
|
274
|
+
icon: r.value,
|
|
275
275
|
text: e.text,
|
|
276
276
|
"max-width": "90%",
|
|
277
277
|
width: "500px",
|
|
@@ -281,44 +281,44 @@ const we = /* @__PURE__ */ I({
|
|
|
281
281
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
}),
|
|
284
|
+
}), qe = /* @__PURE__ */ q({
|
|
285
285
|
__name: "index",
|
|
286
286
|
setup(e) {
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}),
|
|
291
|
-
|
|
287
|
+
const t = ce({ items: [] });
|
|
288
|
+
R(() => {
|
|
289
|
+
i.on("message", n);
|
|
290
|
+
}), L(() => {
|
|
291
|
+
i.off("message", n);
|
|
292
292
|
});
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
}, o = (
|
|
296
|
-
|
|
293
|
+
const n = (a) => {
|
|
294
|
+
r(a.type, a.text, a.timeout);
|
|
295
|
+
}, o = (a) => {
|
|
296
|
+
s(a);
|
|
297
297
|
};
|
|
298
298
|
let l = 0;
|
|
299
|
-
const
|
|
299
|
+
const r = (a, f, p) => {
|
|
300
300
|
const C = l++;
|
|
301
|
-
|
|
302
|
-
},
|
|
303
|
-
const
|
|
304
|
-
|
|
301
|
+
t.items.push({ id: C, type: a, text: f, timeout: p });
|
|
302
|
+
}, s = (a) => {
|
|
303
|
+
const f = t.items.findIndex((p) => p.id === a);
|
|
304
|
+
f >= 0 && t.items.splice(f, 1);
|
|
305
305
|
};
|
|
306
|
-
return (
|
|
307
|
-
onClick:
|
|
306
|
+
return (a, f) => (k(), U("div", {
|
|
307
|
+
onClick: f[0] || (f[0] = B(() => {
|
|
308
308
|
}, ["stop"])),
|
|
309
309
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
310
310
|
}, [
|
|
311
|
-
(k(!0),
|
|
311
|
+
(k(!0), U(de, null, pe(t.items, (p) => (k(), W(Se, {
|
|
312
312
|
onTimeout: o,
|
|
313
|
-
id:
|
|
314
|
-
type:
|
|
315
|
-
text:
|
|
316
|
-
timeout:
|
|
317
|
-
key:
|
|
313
|
+
id: p.id,
|
|
314
|
+
type: p.type,
|
|
315
|
+
text: p.text,
|
|
316
|
+
timeout: p.timeout,
|
|
317
|
+
key: p.id
|
|
318
318
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
319
319
|
]));
|
|
320
320
|
}
|
|
321
|
-
}),
|
|
321
|
+
}), Ve = /* @__PURE__ */ Q(qe, [["__scopeId", "data-v-70ed4b89"]]), Ie = /* @__PURE__ */ q({
|
|
322
322
|
__name: "index",
|
|
323
323
|
props: {
|
|
324
324
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -326,42 +326,42 @@ const we = /* @__PURE__ */ I({
|
|
|
326
326
|
},
|
|
327
327
|
emits: ["update:modelValue"],
|
|
328
328
|
setup(e) {
|
|
329
|
-
const
|
|
330
|
-
var
|
|
331
|
-
return ((
|
|
329
|
+
const t = X(), n = H(e, "modelValue"), o = _(""), l = _(""), r = _(), s = _(), a = _(), f = _(""), p = _(), C = _(), V = d(() => {
|
|
330
|
+
var u;
|
|
331
|
+
return ((u = p.value) == null ? void 0 : u.color) ?? "primary";
|
|
332
332
|
}), D = d(() => {
|
|
333
|
-
var
|
|
334
|
-
return ((
|
|
333
|
+
var u;
|
|
334
|
+
return ((u = p.value) == null ? void 0 : u.text) ?? t.t("cancel");
|
|
335
335
|
}), E = d(() => {
|
|
336
|
-
var
|
|
337
|
-
return ((
|
|
336
|
+
var u;
|
|
337
|
+
return ((u = C.value) == null ? void 0 : u.color) ?? "primary";
|
|
338
338
|
}), N = d(() => {
|
|
339
|
-
var
|
|
340
|
-
return ((
|
|
339
|
+
var u;
|
|
340
|
+
return ((u = C.value) == null ? void 0 : u.text) ?? t.t("confirm");
|
|
341
341
|
}), c = _();
|
|
342
|
-
let
|
|
343
|
-
const j = async (
|
|
342
|
+
let h = 0, S = !1;
|
|
343
|
+
const j = async (u) => {
|
|
344
344
|
var y;
|
|
345
|
-
o.value =
|
|
345
|
+
o.value = u.title, l.value = u.text, r.value = u.label, s.value = u.placeholder, a.value = u.rules, f.value = u.value, p.value = u.cancel, C.value = u.confirm, h = u.seq, S = !1, n.value = !0, await z(() => c.value !== void 0, 1e3), (y = c.value) == null || y.focus();
|
|
346
346
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}),
|
|
350
|
-
|
|
347
|
+
R(() => {
|
|
348
|
+
i.on("promptDlg", j);
|
|
349
|
+
}), L(() => {
|
|
350
|
+
i.off("promptDlg", j);
|
|
351
351
|
});
|
|
352
|
-
const
|
|
353
|
-
|
|
352
|
+
const I = () => {
|
|
353
|
+
n.value = !1, S || (i.emit("promptDlgResult" + h, f.value ?? ""), S = !0);
|
|
354
354
|
};
|
|
355
|
-
return O(
|
|
356
|
-
!
|
|
357
|
-
}), (
|
|
358
|
-
const
|
|
359
|
-
return k(),
|
|
360
|
-
modelValue:
|
|
361
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
355
|
+
return O(n, (u) => {
|
|
356
|
+
!u && !S && (i.emit("promptDlgResult" + h, void 0), S = !0);
|
|
357
|
+
}), (u, y) => {
|
|
358
|
+
const P = m("v-card-title"), T = m("v-card-text"), te = m("v-text-field"), ne = m("v-form"), Z = m("v-btn"), oe = m("v-card-actions"), le = m("v-card"), re = m("v-dialog");
|
|
359
|
+
return k(), W(re, {
|
|
360
|
+
modelValue: n.value,
|
|
361
|
+
"onUpdate:modelValue": y[2] || (y[2] = ($) => n.value = $),
|
|
362
362
|
onKeydown: [
|
|
363
|
-
y[3] || (y[3] =
|
|
364
|
-
|
|
363
|
+
y[3] || (y[3] = A(B(($) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
364
|
+
A(B(I, ["stop", "prevent"]), ["enter"])
|
|
365
365
|
],
|
|
366
366
|
transition: "dialog-top-transition",
|
|
367
367
|
"max-width": "600px"
|
|
@@ -369,26 +369,26 @@ const we = /* @__PURE__ */ I({
|
|
|
369
369
|
default: v(() => [
|
|
370
370
|
x(le, null, {
|
|
371
371
|
default: v(() => [
|
|
372
|
-
x(
|
|
372
|
+
x(P, null, {
|
|
373
373
|
default: v(() => [
|
|
374
|
-
|
|
374
|
+
b(w(o.value), 1)
|
|
375
375
|
]),
|
|
376
376
|
_: 1
|
|
377
377
|
}),
|
|
378
|
-
x(
|
|
378
|
+
x(T, null, {
|
|
379
379
|
default: v(() => [
|
|
380
|
-
|
|
380
|
+
b(w(l.value), 1)
|
|
381
381
|
]),
|
|
382
382
|
_: 1
|
|
383
383
|
}),
|
|
384
384
|
x(ne, { class: "mx-3" }, {
|
|
385
385
|
default: v(() => [
|
|
386
386
|
x(te, {
|
|
387
|
-
modelValue:
|
|
388
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
389
|
-
label:
|
|
390
|
-
placeholder:
|
|
391
|
-
rules:
|
|
387
|
+
modelValue: f.value,
|
|
388
|
+
"onUpdate:modelValue": y[0] || (y[0] = ($) => f.value = $),
|
|
389
|
+
label: r.value,
|
|
390
|
+
placeholder: s.value,
|
|
391
|
+
rules: a.value,
|
|
392
392
|
ref_key: "target",
|
|
393
393
|
ref: c
|
|
394
394
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
@@ -398,22 +398,22 @@ const we = /* @__PURE__ */ I({
|
|
|
398
398
|
x(oe, { class: "d-flex justify-end" }, {
|
|
399
399
|
default: v(() => [
|
|
400
400
|
x(Z, {
|
|
401
|
-
onClick: y[1] || (y[1] = (
|
|
402
|
-
color:
|
|
401
|
+
onClick: y[1] || (y[1] = ($) => n.value = !1),
|
|
402
|
+
color: V.value,
|
|
403
403
|
variant: "text"
|
|
404
404
|
}, {
|
|
405
405
|
default: v(() => [
|
|
406
|
-
|
|
406
|
+
b(w(D.value), 1)
|
|
407
407
|
]),
|
|
408
408
|
_: 1
|
|
409
409
|
}, 8, ["color"]),
|
|
410
410
|
x(Z, {
|
|
411
|
-
onClick:
|
|
411
|
+
onClick: I,
|
|
412
412
|
color: E.value,
|
|
413
413
|
variant: "text"
|
|
414
414
|
}, {
|
|
415
415
|
default: v(() => [
|
|
416
|
-
|
|
416
|
+
b(w(N.value), 1)
|
|
417
417
|
]),
|
|
418
418
|
_: 1
|
|
419
419
|
}, 8, ["color"])
|
|
@@ -428,37 +428,37 @@ const we = /* @__PURE__ */ I({
|
|
|
428
428
|
}, 8, ["modelValue", "onKeydown"]);
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), Te = { class: "mx-auto my-auto" }, $e = { class: "d-flex align-center justify-center w-100 h-100" }, Me = /* @__PURE__ */ q({
|
|
432
432
|
__name: "index",
|
|
433
433
|
setup(e) {
|
|
434
|
-
const
|
|
435
|
-
|
|
434
|
+
const t = X(), n = _(!1), o = () => {
|
|
435
|
+
n.value = !0;
|
|
436
436
|
}, l = () => {
|
|
437
|
-
|
|
437
|
+
n.value = !1;
|
|
438
438
|
};
|
|
439
|
-
return
|
|
440
|
-
|
|
441
|
-
}),
|
|
442
|
-
|
|
443
|
-
}), (
|
|
444
|
-
const
|
|
445
|
-
return k(),
|
|
446
|
-
"model-value":
|
|
447
|
-
"onUpdate:modelValue":
|
|
439
|
+
return R(() => {
|
|
440
|
+
i.on("openWaitDlg", o), i.on("closeWaitDlg", l);
|
|
441
|
+
}), L(() => {
|
|
442
|
+
i.off("openWaitDlg", o), i.off("closeWaitDlg", l);
|
|
443
|
+
}), (r, s) => {
|
|
444
|
+
const a = m("v-card"), f = m("v-dialog");
|
|
445
|
+
return k(), W(f, {
|
|
446
|
+
"model-value": n.value,
|
|
447
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => n.value = p),
|
|
448
448
|
persistent: "",
|
|
449
449
|
"no-click-animation": "",
|
|
450
450
|
fullscreen: ""
|
|
451
451
|
}, {
|
|
452
452
|
default: v(() => [
|
|
453
|
-
g("div",
|
|
454
|
-
x(
|
|
453
|
+
g("div", Te, [
|
|
454
|
+
x(a, {
|
|
455
455
|
width: "300px",
|
|
456
456
|
height: "80px",
|
|
457
457
|
loading: ""
|
|
458
458
|
}, {
|
|
459
459
|
default: v(() => [
|
|
460
|
-
g("div",
|
|
461
|
-
g("span", null,
|
|
460
|
+
g("div", $e, [
|
|
461
|
+
g("span", null, w(fe(t).t("waitingResponse")), 1)
|
|
462
462
|
])
|
|
463
463
|
]),
|
|
464
464
|
_: 1
|
|
@@ -470,99 +470,142 @@ const we = /* @__PURE__ */ I({
|
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
|
-
function
|
|
474
|
-
const e = F(),
|
|
473
|
+
function Ae() {
|
|
474
|
+
const e = F(), t = d(() => e.global.current.value.colors.primary), n = d(() => e.global.current.value.colors.secondary), o = d(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = d(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = d(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), s = d(() => e.current.value.dark ? "#303030" : "#f6f6f6"), a = d(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
475
475
|
return {
|
|
476
|
-
primaryColor:
|
|
477
|
-
secondaryColor:
|
|
476
|
+
primaryColor: t,
|
|
477
|
+
secondaryColor: n,
|
|
478
478
|
backgroundColor0: o,
|
|
479
479
|
backgroundColor1: l,
|
|
480
|
-
backgroundColor2:
|
|
481
|
-
highlightColor:
|
|
482
|
-
borderColor:
|
|
480
|
+
backgroundColor2: r,
|
|
481
|
+
highlightColor: s,
|
|
482
|
+
borderColor: a
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
const e = F(), { width:
|
|
487
|
-
return { dark:
|
|
485
|
+
function Le() {
|
|
486
|
+
const e = F(), { width: t } = xe(), n = d(() => e.current.value.dark), o = _(""), l = d(() => !!window.cordova), r = d(() => t.value <= 1280 ? t.value + "px" : t.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
487
|
+
return { dark: n, routeTransName: o, sysBarAvail: l, compactWidth: r };
|
|
488
488
|
}
|
|
489
489
|
let G = Date.now();
|
|
490
490
|
function Y() {
|
|
491
491
|
const e = Date.now();
|
|
492
492
|
return e - G > 500 ? (G = e, !0) : !1;
|
|
493
493
|
}
|
|
494
|
-
let
|
|
494
|
+
let Be = 0;
|
|
495
495
|
function ee() {
|
|
496
|
-
return ++
|
|
496
|
+
return ++Be;
|
|
497
497
|
}
|
|
498
|
-
async function
|
|
498
|
+
async function Pe(e) {
|
|
499
499
|
if (!Y())
|
|
500
500
|
return;
|
|
501
|
-
let
|
|
502
|
-
const o = (
|
|
503
|
-
|
|
501
|
+
let t = !1, n;
|
|
502
|
+
const o = (r) => {
|
|
503
|
+
n = r, t = !0;
|
|
504
504
|
}, l = ee();
|
|
505
|
-
return
|
|
505
|
+
return i.on("confirmDlgResult" + l, o), i.emit("confirmDlg", { ...e, seq: l }), await z(() => t), i.off("confirmDlgResult" + l, o), n;
|
|
506
506
|
}
|
|
507
507
|
async function Ue(e) {
|
|
508
508
|
if (!Y())
|
|
509
509
|
return;
|
|
510
|
-
let
|
|
511
|
-
const o = (
|
|
512
|
-
|
|
510
|
+
let t = !1, n;
|
|
511
|
+
const o = (r) => {
|
|
512
|
+
n = r, t = !0;
|
|
513
513
|
}, l = ee();
|
|
514
|
-
return
|
|
514
|
+
return i.on("promptDlgResult" + l, o), i.emit("promptDlg", { ...e, seq: l }), await z(() => t), i.off("promptDlgResult" + l, o), n;
|
|
515
515
|
}
|
|
516
516
|
function Ke() {
|
|
517
|
-
|
|
517
|
+
i.emit("openWaitDlg");
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
|
|
519
|
+
function Oe() {
|
|
520
|
+
i.emit("closeWaitDlg");
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
522
|
+
function ze(e, t) {
|
|
523
|
+
i.emit("message", { type: "error", text: e, timeout: t });
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
525
|
+
function Xe(e, t) {
|
|
526
|
+
i.emit("message", { type: "info", text: e, timeout: t });
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
528
|
+
function Fe(e, t) {
|
|
529
|
+
i.emit("message", { type: "success", text: e, timeout: t });
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
|
|
531
|
+
function Ze(e, t) {
|
|
532
|
+
i.emit("message", { type: "warning", text: e, timeout: t });
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Ge(e) {
|
|
535
535
|
var o, l;
|
|
536
536
|
if (!window.appAppear) {
|
|
537
537
|
window.appAppear = !0;
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
const t = "single-spa-application:" + e, n = (o = document.getElementById(t)) == null ? void 0 : o.classList;
|
|
541
|
+
n && (n.remove("app-left", "app-right", "app-reset"), (l = window.routeExtras) != null && l.forward ? n.add("app-left") : n.add("app-right"), setTimeout(() => {
|
|
542
|
+
n.add("app-reset");
|
|
543
543
|
}, 0));
|
|
544
544
|
}
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
|
|
545
|
+
const Re = [
|
|
546
|
+
{ path: "/passport/login", level: 0 },
|
|
547
|
+
{ path: "/passport/loginAccount", level: 1 },
|
|
548
|
+
{ path: "/passport/register", level: 1 },
|
|
549
|
+
{ path: "/org/joinOrCreate", level: 1, requiredState: "auth" },
|
|
550
|
+
{ path: "/org/manager", level: 1, requiredState: "org" },
|
|
551
|
+
{ path: "/main", level: 0, requiredState: "org" },
|
|
552
|
+
{ path: "/mine/personalInfo", level: 1, requiredState: "org" },
|
|
553
|
+
{ path: "/mine/accountSecurity", level: 2, requiredState: "org" },
|
|
554
|
+
{ path: "/mine/settings", level: 1, requiredState: "org" },
|
|
555
|
+
{ path: "/mine/general", level: 2, requiredState: "org" },
|
|
556
|
+
{ path: "/mine/general/darkMode", level: 3, requiredState: "org" },
|
|
557
|
+
{ path: "/mine/general/language", level: 3, requiredState: "org" },
|
|
558
|
+
{ path: "/app/manager", level: 1, requiredState: "org" },
|
|
559
|
+
{ path: "/app/editor", level: 2, requiredState: "org" },
|
|
560
|
+
{ path: "/app/editor/*", level: 2, requiredState: "org" },
|
|
561
|
+
{ path: "/asset", level: 1, requiredState: "org" },
|
|
562
|
+
{ path: "/calc", level: 1, requiredState: "org" },
|
|
563
|
+
{ path: "/data", level: 1, requiredState: "org" }
|
|
564
|
+
];
|
|
565
|
+
function We(e) {
|
|
566
|
+
let t, n = 0;
|
|
567
|
+
const o = e.split("/");
|
|
568
|
+
return Re.forEach((l) => {
|
|
569
|
+
const r = l.path.split("/");
|
|
570
|
+
let s = 0;
|
|
571
|
+
for (let a = 0; a < o.length && !(a >= r.length || o[a] !== r[a]); a++)
|
|
572
|
+
s++;
|
|
573
|
+
s >= n && (t = l, n = s);
|
|
574
|
+
}), t;
|
|
575
|
+
}
|
|
576
|
+
function He(e) {
|
|
577
|
+
if (e === "/")
|
|
578
|
+
return { app: "", path: "/", level: -1 };
|
|
579
|
+
const t = We(e);
|
|
580
|
+
if (!t)
|
|
581
|
+
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
582
|
+
const n = e.split("/");
|
|
583
|
+
return console.assert(n.length >= 2), { app: n[1], path: t.path, level: t.level };
|
|
584
|
+
}
|
|
585
|
+
const Ee = (e) => {
|
|
586
|
+
e.component("x-confirm-dlg", he), e.component("x-loading", De), e.component("x-message", Ve), e.component("x-prompt-dlg", Ie), e.component("x-wait-dlg", Me);
|
|
587
|
+
}, Je = { install: Ee };
|
|
548
588
|
export {
|
|
549
|
-
|
|
589
|
+
he as XConfirmDlg,
|
|
550
590
|
De as XLoading,
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
591
|
+
Ve as XMessage,
|
|
592
|
+
Ie as XPromptDlg,
|
|
593
|
+
Me as XWaitDlg,
|
|
594
|
+
Ge as appAppear,
|
|
595
|
+
Oe as closeWaitDlg,
|
|
596
|
+
Je as default,
|
|
597
|
+
He as getPathInfo,
|
|
598
|
+
We as matchRouteMeta,
|
|
599
|
+
ze as messageError,
|
|
600
|
+
Xe as messageInfo,
|
|
601
|
+
Fe as messageSuccess,
|
|
602
|
+
Ze as messageWarning,
|
|
603
|
+
Pe as openConfirmDlg,
|
|
562
604
|
Ue as openPromptDlg,
|
|
563
605
|
Ke as openWaitDlg,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
606
|
+
Re as routeMetas,
|
|
607
|
+
Ae as useColor,
|
|
608
|
+
Le as useSystem,
|
|
609
|
+
je as waitMs,
|
|
610
|
+
z as waitUtil
|
|
568
611
|
};
|