x-essential-lib 0.4.0 → 0.4.1
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.js +427 -426
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{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(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
|
|
2
|
+
import { ref as i, watch as W, computed as f, onMounted as C, onBeforeUnmount as V, defineComponent as R, resolveComponent as v, openBlock as b, createBlock as O, unref as N, isRef as F, withKeys as U, withModifiers as M, withCtx as m, createVNode as y, createTextVNode as T, toDisplayString as D, createElementBlock as z, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as g, reactive as he, Fragment as we, renderList as ye, createCommentVNode as ke } from "vue";
|
|
3
|
+
import { useTheme as H, useLocale as J, useDisplay as xe } from "vuetify";
|
|
4
|
+
import { defineStore as le } from "pinia";
|
|
5
|
+
import be from "axios";
|
|
6
|
+
import { useRouter as oe, useRoute as Ce } from "vue-router";
|
|
7
|
+
const X = le(
|
|
3
8
|
"global",
|
|
4
9
|
() => {
|
|
5
|
-
const e =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(
|
|
9
|
-
e.global.name.value =
|
|
10
|
+
const e = H(), a = i();
|
|
11
|
+
W(
|
|
12
|
+
a,
|
|
13
|
+
(n) => {
|
|
14
|
+
e.global.name.value = n ? "dark" : "light";
|
|
10
15
|
},
|
|
11
16
|
{
|
|
12
17
|
immediate: !0
|
|
13
18
|
}
|
|
14
19
|
);
|
|
15
|
-
const t =
|
|
20
|
+
const t = i("en"), l = i({}), o = i("");
|
|
16
21
|
return {
|
|
17
|
-
dark:
|
|
22
|
+
dark: a,
|
|
18
23
|
locale: t,
|
|
19
|
-
permissionObjects:
|
|
20
|
-
permissionChecksum:
|
|
24
|
+
permissionObjects: l,
|
|
25
|
+
permissionChecksum: o
|
|
21
26
|
};
|
|
22
27
|
},
|
|
23
28
|
{
|
|
@@ -28,9 +33,9 @@ const xe = Pinia.defineStore, O = Vue.ref, $e = Vue.watch, be = Vuetify.useTheme
|
|
|
28
33
|
}
|
|
29
34
|
]
|
|
30
35
|
}
|
|
31
|
-
),
|
|
32
|
-
const e =
|
|
33
|
-
function
|
|
36
|
+
), re = le("viewMgr", () => {
|
|
37
|
+
const e = i([]);
|
|
38
|
+
function a() {
|
|
34
39
|
return e.value.length <= 0;
|
|
35
40
|
}
|
|
36
41
|
function t() {
|
|
@@ -38,165 +43,165 @@ const xe = Pinia.defineStore, O = Vue.ref, $e = Vue.watch, be = Vuetify.useTheme
|
|
|
38
43
|
if (s > 0)
|
|
39
44
|
return e.value[s - 1];
|
|
40
45
|
}
|
|
41
|
-
function
|
|
46
|
+
function l(s) {
|
|
42
47
|
return e.value.find((c) => c === s) !== void 0;
|
|
43
48
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
49
|
+
function o(s) {
|
|
50
|
+
n(s), e.value.push(s);
|
|
46
51
|
}
|
|
47
|
-
function
|
|
48
|
-
const c = e.value.findIndex((
|
|
52
|
+
function n(s) {
|
|
53
|
+
const c = e.value.findIndex((w) => w === s);
|
|
49
54
|
c !== -1 && e.value.splice(c, 1);
|
|
50
55
|
}
|
|
51
|
-
function
|
|
56
|
+
function r() {
|
|
52
57
|
e.value.pop();
|
|
53
58
|
}
|
|
54
59
|
function u() {
|
|
55
60
|
e.value = [];
|
|
56
61
|
}
|
|
57
|
-
return { isEmpty:
|
|
58
|
-
}),
|
|
59
|
-
function
|
|
60
|
-
const
|
|
62
|
+
return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
|
|
63
|
+
}), K = require("js-cookie");
|
|
64
|
+
function at(e) {
|
|
65
|
+
const a = be.create({
|
|
61
66
|
timeout: 6e3
|
|
62
67
|
});
|
|
63
|
-
return
|
|
64
|
-
(t) =>
|
|
68
|
+
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
69
|
+
(t) => Se(t),
|
|
65
70
|
(t) => {
|
|
66
|
-
|
|
71
|
+
qe(t, e.onError);
|
|
67
72
|
}
|
|
68
|
-
),
|
|
69
|
-
(t) =>
|
|
70
|
-
(t) =>
|
|
71
|
-
),
|
|
73
|
+
), a.interceptors.response.use(
|
|
74
|
+
(t) => De(t),
|
|
75
|
+
(t) => Ve(t, e.onError)
|
|
76
|
+
), a;
|
|
72
77
|
}
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
return e.headers.Authorization = "Basic " +
|
|
78
|
+
function Se(e) {
|
|
79
|
+
const a = K.get("accessToken") ?? "";
|
|
80
|
+
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
76
81
|
}
|
|
77
|
-
function
|
|
78
|
-
console.error(e),
|
|
82
|
+
function qe(e, a) {
|
|
83
|
+
console.error(e), a("request timeout");
|
|
79
84
|
}
|
|
80
|
-
function
|
|
85
|
+
function De(e) {
|
|
81
86
|
return e.data;
|
|
82
87
|
}
|
|
83
|
-
function
|
|
84
|
-
var
|
|
88
|
+
function Ve(e, a) {
|
|
89
|
+
var o;
|
|
85
90
|
const t = e.response;
|
|
86
91
|
if (!t)
|
|
87
92
|
return Promise.reject(e);
|
|
88
93
|
t.status === 401 && Te();
|
|
89
|
-
let
|
|
90
|
-
return
|
|
94
|
+
let l = (o = t.data) == null ? void 0 : o.message;
|
|
95
|
+
return l || (l = {
|
|
91
96
|
code: t.status,
|
|
92
97
|
message: t.statusText
|
|
93
|
-
}),
|
|
98
|
+
}), a(l), Promise.reject(e);
|
|
94
99
|
}
|
|
95
100
|
function Te() {
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
function
|
|
99
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
}, off: function(
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
}, emit: function(
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}), (
|
|
110
|
-
a
|
|
101
|
+
K.remove("accessToken"), K.remove("refreshToken"), K.remove("activeOrg"), oe().replace({ path: "/passport/login" });
|
|
102
|
+
}
|
|
103
|
+
function Oe(e) {
|
|
104
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
105
|
+
var l = e.get(a);
|
|
106
|
+
l ? l.push(t) : e.set(a, [t]);
|
|
107
|
+
}, off: function(a, t) {
|
|
108
|
+
var l = e.get(a);
|
|
109
|
+
l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
|
|
110
|
+
}, emit: function(a, t) {
|
|
111
|
+
var l = e.get(a);
|
|
112
|
+
l && l.slice().map(function(o) {
|
|
113
|
+
o(t);
|
|
114
|
+
}), (l = e.get("*")) && l.slice().map(function(o) {
|
|
115
|
+
o(a, t);
|
|
111
116
|
});
|
|
112
117
|
} };
|
|
113
118
|
}
|
|
114
|
-
const p =
|
|
115
|
-
async function
|
|
116
|
-
return new Promise((
|
|
117
|
-
setTimeout(
|
|
119
|
+
const p = Oe();
|
|
120
|
+
async function lt(e) {
|
|
121
|
+
return new Promise((a) => {
|
|
122
|
+
setTimeout(a, e);
|
|
118
123
|
});
|
|
119
124
|
}
|
|
120
|
-
async function
|
|
121
|
-
const
|
|
122
|
-
return new Promise((
|
|
123
|
-
const
|
|
124
|
-
e() ?
|
|
125
|
+
async function G(e, a, t) {
|
|
126
|
+
const l = Date.now();
|
|
127
|
+
return new Promise((o) => {
|
|
128
|
+
const n = async () => {
|
|
129
|
+
e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
|
|
125
130
|
};
|
|
126
|
-
|
|
131
|
+
n();
|
|
127
132
|
});
|
|
128
133
|
}
|
|
129
|
-
let
|
|
130
|
-
function
|
|
134
|
+
let P = Date.now();
|
|
135
|
+
function ne() {
|
|
131
136
|
const e = Date.now();
|
|
132
|
-
return e -
|
|
137
|
+
return e - P > 500 ? (P = e, !0) : !1;
|
|
133
138
|
}
|
|
134
|
-
let
|
|
135
|
-
function
|
|
136
|
-
return ++
|
|
139
|
+
let Re = 0;
|
|
140
|
+
function ce() {
|
|
141
|
+
return ++Re;
|
|
137
142
|
}
|
|
138
|
-
async function
|
|
139
|
-
if (!
|
|
143
|
+
async function ot(e) {
|
|
144
|
+
if (!ne())
|
|
140
145
|
return;
|
|
141
|
-
let
|
|
142
|
-
const
|
|
143
|
-
t =
|
|
144
|
-
},
|
|
145
|
-
return p.on("confirmDlgResult" +
|
|
146
|
-
}
|
|
147
|
-
async function
|
|
148
|
-
if (!
|
|
146
|
+
let a = !1, t;
|
|
147
|
+
const l = (n) => {
|
|
148
|
+
t = n, a = !0;
|
|
149
|
+
}, o = ce();
|
|
150
|
+
return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await G(() => a), p.off("confirmDlgResult" + o, l), t;
|
|
151
|
+
}
|
|
152
|
+
async function rt(e) {
|
|
153
|
+
if (!ne())
|
|
149
154
|
return;
|
|
150
|
-
let
|
|
151
|
-
const
|
|
152
|
-
t =
|
|
153
|
-
},
|
|
154
|
-
return p.on("promptDlgResult" +
|
|
155
|
+
let a = !1, t;
|
|
156
|
+
const l = (n) => {
|
|
157
|
+
t = n, a = !0;
|
|
158
|
+
}, o = ce();
|
|
159
|
+
return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await G(() => a), p.off("promptDlgResult" + o, l), t;
|
|
155
160
|
}
|
|
156
|
-
function
|
|
161
|
+
function nt() {
|
|
157
162
|
p.emit("openWaitDlg");
|
|
158
163
|
}
|
|
159
|
-
function
|
|
164
|
+
function ct() {
|
|
160
165
|
p.emit("closeWaitDlg");
|
|
161
166
|
}
|
|
162
|
-
function
|
|
163
|
-
p.emit("message", { type: "error", text: e, timeout:
|
|
167
|
+
function ut(e, a) {
|
|
168
|
+
p.emit("message", { type: "error", text: e, timeout: a });
|
|
164
169
|
}
|
|
165
|
-
function
|
|
166
|
-
p.emit("message", { type: "info", text: e, timeout:
|
|
170
|
+
function st(e, a) {
|
|
171
|
+
p.emit("message", { type: "info", text: e, timeout: a });
|
|
167
172
|
}
|
|
168
|
-
function
|
|
169
|
-
p.emit("message", { type: "success", text: e, timeout:
|
|
173
|
+
function pt(e, a) {
|
|
174
|
+
p.emit("message", { type: "success", text: e, timeout: a });
|
|
170
175
|
}
|
|
171
|
-
function
|
|
172
|
-
p.emit("message", { type: "warning", text: e, timeout:
|
|
176
|
+
function _t(e, a) {
|
|
177
|
+
p.emit("message", { type: "warning", text: e, timeout: a });
|
|
173
178
|
}
|
|
174
|
-
function
|
|
175
|
-
var
|
|
179
|
+
function dt(e) {
|
|
180
|
+
var l, o;
|
|
176
181
|
if (!window.appAppear) {
|
|
177
182
|
window.appAppear = !0;
|
|
178
183
|
return;
|
|
179
184
|
}
|
|
180
|
-
const
|
|
181
|
-
t && (t.remove("app-left", "app-right", "app-reset"), (
|
|
185
|
+
const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
|
|
186
|
+
t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
|
|
182
187
|
t.add("app-reset");
|
|
183
188
|
}, 0));
|
|
184
189
|
}
|
|
185
|
-
var
|
|
186
|
-
function
|
|
190
|
+
var je = /* @__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))(je || {});
|
|
191
|
+
function ee(e, a) {
|
|
187
192
|
if (!e)
|
|
188
193
|
return !1;
|
|
189
194
|
let t = e;
|
|
190
|
-
return Object.keys(t).length <= 0 || (
|
|
195
|
+
return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
|
|
191
196
|
if (Object.keys(t).length <= 0)
|
|
192
197
|
return !0;
|
|
193
|
-
if (t[
|
|
194
|
-
t = t[
|
|
198
|
+
if (t[o])
|
|
199
|
+
t = t[o];
|
|
195
200
|
else
|
|
196
201
|
return !1;
|
|
197
202
|
}), Object.keys(t).length <= 0);
|
|
198
203
|
}
|
|
199
|
-
const
|
|
204
|
+
const ue = require("js-cookie"), Ie = [
|
|
200
205
|
{ path: "/passport/login", level: 0 },
|
|
201
206
|
{ path: "/passport/loginAccount", level: 1 },
|
|
202
207
|
{ path: "/passport/register", level: 1 },
|
|
@@ -216,167 +221,166 @@ const Ne = Vue.ref, ve = require("js-cookie"), Ie = [
|
|
|
216
221
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
217
222
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
218
223
|
];
|
|
219
|
-
function
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
return Ie.forEach((
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
for (let u = 0; u <
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}),
|
|
229
|
-
}
|
|
230
|
-
function
|
|
224
|
+
function Q(e) {
|
|
225
|
+
let a, t = 0;
|
|
226
|
+
const l = e.split("/");
|
|
227
|
+
return Ie.forEach((o) => {
|
|
228
|
+
const n = o.path.split("/");
|
|
229
|
+
let r = 0;
|
|
230
|
+
for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
|
|
231
|
+
r++;
|
|
232
|
+
r >= t && (a = o, t = r);
|
|
233
|
+
}), a;
|
|
234
|
+
}
|
|
235
|
+
function te(e) {
|
|
231
236
|
if (e === "/")
|
|
232
237
|
return { app: "", path: "/", level: -1 };
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
238
|
+
const a = Q(e);
|
|
239
|
+
if (!a)
|
|
235
240
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
236
241
|
const t = e.split("/");
|
|
237
|
-
return console.assert(t.length >= 2), { app: t[1], path:
|
|
242
|
+
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
238
243
|
}
|
|
239
|
-
const
|
|
240
|
-
function
|
|
241
|
-
const t =
|
|
244
|
+
const ae = i("");
|
|
245
|
+
function x(e, a) {
|
|
246
|
+
const t = te(e), l = te(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
|
|
242
247
|
console.info(
|
|
243
|
-
`~~~~before route change~~~~ ${
|
|
244
|
-
),
|
|
248
|
+
`~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
|
|
249
|
+
), o ? n ? ae.value = "" : ae.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
|
|
245
250
|
}
|
|
246
|
-
function
|
|
247
|
-
return !!
|
|
251
|
+
function Ee() {
|
|
252
|
+
return !!ue.get("accessToken");
|
|
248
253
|
}
|
|
249
|
-
function
|
|
250
|
-
return !!
|
|
254
|
+
function $e() {
|
|
255
|
+
return !!ue.get("activeOrg");
|
|
251
256
|
}
|
|
252
|
-
function
|
|
253
|
-
const
|
|
254
|
-
if (!
|
|
257
|
+
function ft(e, a, t) {
|
|
258
|
+
const l = Ee(), o = $e(), n = Q(e.path);
|
|
259
|
+
if (!n) {
|
|
255
260
|
t();
|
|
256
261
|
return;
|
|
257
262
|
}
|
|
258
|
-
if (
|
|
259
|
-
if (
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
+
if (n.requiredState === "auth")
|
|
264
|
+
if (l)
|
|
265
|
+
if (o) {
|
|
266
|
+
const r = "/main";
|
|
267
|
+
x(r, a.path), t({ path: r });
|
|
263
268
|
} else
|
|
264
|
-
|
|
269
|
+
x(e.path, a.path), t();
|
|
265
270
|
else {
|
|
266
|
-
const
|
|
267
|
-
|
|
271
|
+
const r = "/passport/login";
|
|
272
|
+
x(r, a.path), t({ path: r });
|
|
268
273
|
}
|
|
269
|
-
else if (
|
|
270
|
-
if (
|
|
271
|
-
if (
|
|
272
|
-
|
|
274
|
+
else if (n.requiredState === "org")
|
|
275
|
+
if (l)
|
|
276
|
+
if (o)
|
|
277
|
+
x(e.path, a.path), t();
|
|
273
278
|
else {
|
|
274
|
-
const
|
|
275
|
-
|
|
279
|
+
const r = "/org/joinOrCreate";
|
|
280
|
+
x(r, a.path), t({ path: r });
|
|
276
281
|
}
|
|
277
282
|
else {
|
|
278
|
-
const
|
|
279
|
-
|
|
283
|
+
const r = "/passport/login";
|
|
284
|
+
x(r, a.path), t({ path: r });
|
|
280
285
|
}
|
|
281
|
-
else if (
|
|
282
|
-
if (
|
|
283
|
-
const
|
|
284
|
-
|
|
286
|
+
else if (l)
|
|
287
|
+
if (o) {
|
|
288
|
+
const r = "/main";
|
|
289
|
+
x(r, a.path), t({ path: r });
|
|
285
290
|
} else {
|
|
286
|
-
const
|
|
287
|
-
|
|
291
|
+
const r = "/org/joinOrCreate";
|
|
292
|
+
x(r, a.path), t({ path: r });
|
|
288
293
|
}
|
|
289
294
|
else
|
|
290
|
-
|
|
295
|
+
x(e.path, a.path), t();
|
|
291
296
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const t = de(), n = Ae({
|
|
297
|
+
function Y(e, a) {
|
|
298
|
+
const t = re(), l = f({
|
|
295
299
|
get() {
|
|
296
300
|
return t.hasView(e);
|
|
297
301
|
},
|
|
298
|
-
set(
|
|
299
|
-
|
|
302
|
+
set(n) {
|
|
303
|
+
n ? t.addView(e) : t.delView(e);
|
|
300
304
|
}
|
|
301
|
-
}),
|
|
302
|
-
|
|
305
|
+
}), o = (n) => {
|
|
306
|
+
a == null || a(n), l.value = !0;
|
|
303
307
|
};
|
|
304
|
-
return
|
|
305
|
-
p.on(e,
|
|
306
|
-
}),
|
|
307
|
-
p.off(e,
|
|
308
|
-
}), { open:
|
|
308
|
+
return C(() => {
|
|
309
|
+
p.on(e, o);
|
|
310
|
+
}), V(() => {
|
|
311
|
+
p.off(e, o);
|
|
312
|
+
}), { open: l };
|
|
309
313
|
}
|
|
310
|
-
const
|
|
314
|
+
const Me = /* @__PURE__ */ R({
|
|
311
315
|
__name: "index",
|
|
312
316
|
setup(e) {
|
|
313
|
-
const
|
|
317
|
+
const a = J(), { open: t } = Y("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
|
|
314
318
|
var d;
|
|
315
|
-
return ((d =
|
|
316
|
-
}), s =
|
|
319
|
+
return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
|
|
320
|
+
}), s = f(() => {
|
|
317
321
|
var d;
|
|
318
|
-
return ((d =
|
|
319
|
-
}), c =
|
|
322
|
+
return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
323
|
+
}), c = f(() => {
|
|
320
324
|
var d;
|
|
321
|
-
return ((d =
|
|
322
|
-
}),
|
|
325
|
+
return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
|
|
326
|
+
}), w = f(() => {
|
|
323
327
|
var d;
|
|
324
|
-
return ((d =
|
|
328
|
+
return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
325
329
|
});
|
|
326
|
-
let
|
|
327
|
-
const
|
|
328
|
-
|
|
330
|
+
let j = 0, S = !1;
|
|
331
|
+
const A = (d) => {
|
|
332
|
+
l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, S = !1, t.value = !0;
|
|
329
333
|
};
|
|
330
|
-
|
|
331
|
-
p.on("confirmDlg",
|
|
332
|
-
}),
|
|
333
|
-
p.off("confirmDlg",
|
|
334
|
+
C(() => {
|
|
335
|
+
p.on("confirmDlg", A);
|
|
336
|
+
}), V(() => {
|
|
337
|
+
p.off("confirmDlg", A);
|
|
334
338
|
});
|
|
335
|
-
const
|
|
336
|
-
t.value = !1,
|
|
339
|
+
const B = () => {
|
|
340
|
+
t.value = !1, S || (p.emit("confirmDlgResult" + j, !0), S = !0);
|
|
337
341
|
};
|
|
338
|
-
return
|
|
339
|
-
!d && !
|
|
340
|
-
}), (d,
|
|
341
|
-
const
|
|
342
|
-
return
|
|
343
|
-
modelValue:
|
|
344
|
-
"onUpdate:modelValue":
|
|
342
|
+
return W(t, (d) => {
|
|
343
|
+
!d && !S && (p.emit("confirmDlgResult" + j, !1), S = !0);
|
|
344
|
+
}), (d, k) => {
|
|
345
|
+
const q = v("v-card-text"), I = v("v-btn"), L = v("v-card-actions"), _ = v("v-card"), h = v("v-dialog");
|
|
346
|
+
return b(), O(h, {
|
|
347
|
+
modelValue: N(t),
|
|
348
|
+
"onUpdate:modelValue": k[1] || (k[1] = (E) => F(t) ? t.value = E : null),
|
|
345
349
|
onKeydown: [
|
|
346
|
-
|
|
347
|
-
|
|
350
|
+
k[2] || (k[2] = U(M((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
351
|
+
U(M(B, ["stop", "prevent"]), ["enter"])
|
|
348
352
|
],
|
|
349
353
|
transition: "dialog-top-transition",
|
|
350
354
|
"max-width": "600px"
|
|
351
355
|
}, {
|
|
352
|
-
default:
|
|
353
|
-
|
|
354
|
-
default:
|
|
355
|
-
q
|
|
356
|
-
default:
|
|
357
|
-
|
|
356
|
+
default: m(() => [
|
|
357
|
+
y(_, { title: l.value }, {
|
|
358
|
+
default: m(() => [
|
|
359
|
+
y(q, null, {
|
|
360
|
+
default: m(() => [
|
|
361
|
+
T(D(o.value), 1)
|
|
358
362
|
]),
|
|
359
363
|
_: 1
|
|
360
364
|
}),
|
|
361
|
-
|
|
362
|
-
default:
|
|
363
|
-
|
|
364
|
-
onClick:
|
|
365
|
+
y(L, { class: "d-flex justify-end" }, {
|
|
366
|
+
default: m(() => [
|
|
367
|
+
y(I, {
|
|
368
|
+
onClick: k[0] || (k[0] = (E) => t.value = !1),
|
|
365
369
|
color: u.value,
|
|
366
370
|
variant: "text"
|
|
367
371
|
}, {
|
|
368
|
-
default:
|
|
369
|
-
|
|
372
|
+
default: m(() => [
|
|
373
|
+
T(D(s.value), 1)
|
|
370
374
|
]),
|
|
371
375
|
_: 1
|
|
372
376
|
}, 8, ["color"]),
|
|
373
|
-
|
|
374
|
-
onClick:
|
|
377
|
+
y(I, {
|
|
378
|
+
onClick: B,
|
|
375
379
|
color: c.value,
|
|
376
380
|
variant: "text"
|
|
377
381
|
}, {
|
|
378
|
-
default:
|
|
379
|
-
|
|
382
|
+
default: m(() => [
|
|
383
|
+
T(D(w.value), 1)
|
|
380
384
|
]),
|
|
381
385
|
_: 1
|
|
382
386
|
}, 8, ["color"])
|
|
@@ -391,22 +395,22 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
391
395
|
}, 8, ["modelValue", "onKeydown"]);
|
|
392
396
|
};
|
|
393
397
|
}
|
|
394
|
-
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
], -1)),
|
|
408
|
-
|
|
409
|
-
],
|
|
398
|
+
}), Ae = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Be = /* @__PURE__ */ Ae(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
|
|
399
|
+
/* @__PURE__ */ g("div"),
|
|
400
|
+
/* @__PURE__ */ g("div"),
|
|
401
|
+
/* @__PURE__ */ g("div"),
|
|
402
|
+
/* @__PURE__ */ g("div"),
|
|
403
|
+
/* @__PURE__ */ g("div"),
|
|
404
|
+
/* @__PURE__ */ g("div"),
|
|
405
|
+
/* @__PURE__ */ g("div"),
|
|
406
|
+
/* @__PURE__ */ g("div"),
|
|
407
|
+
/* @__PURE__ */ g("div"),
|
|
408
|
+
/* @__PURE__ */ g("div"),
|
|
409
|
+
/* @__PURE__ */ g("div"),
|
|
410
|
+
/* @__PURE__ */ g("div")
|
|
411
|
+
], -1)), Le = [
|
|
412
|
+
Be
|
|
413
|
+
], Ke = /* @__PURE__ */ R({
|
|
410
414
|
__name: "index",
|
|
411
415
|
props: {
|
|
412
416
|
zIndex: {
|
|
@@ -415,21 +419,21 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
415
419
|
}
|
|
416
420
|
},
|
|
417
421
|
setup(e) {
|
|
418
|
-
const
|
|
419
|
-
background:
|
|
422
|
+
const a = H(), t = e, l = f(() => ({
|
|
423
|
+
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
420
424
|
zIndex: t.zIndex
|
|
421
425
|
}));
|
|
422
|
-
return (
|
|
426
|
+
return (o, n) => (b(), z("div", {
|
|
423
427
|
class: "x-cont",
|
|
424
|
-
style:
|
|
425
|
-
},
|
|
428
|
+
style: ge(l.value)
|
|
429
|
+
}, Le, 4));
|
|
426
430
|
}
|
|
427
|
-
}),
|
|
431
|
+
}), se = (e, a) => {
|
|
428
432
|
const t = e.__vccOpts || e;
|
|
429
|
-
for (const [
|
|
430
|
-
t[
|
|
433
|
+
for (const [l, o] of a)
|
|
434
|
+
t[l] = o;
|
|
431
435
|
return t;
|
|
432
|
-
},
|
|
436
|
+
}, Ne = /* @__PURE__ */ se(Ke, [["__scopeId", "data-v-f4ad116e"]]), Ue = /* @__PURE__ */ R({
|
|
433
437
|
__name: "item",
|
|
434
438
|
props: {
|
|
435
439
|
id: {
|
|
@@ -450,39 +454,39 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
450
454
|
}
|
|
451
455
|
},
|
|
452
456
|
emits: ["timeout"],
|
|
453
|
-
setup(e, { emit:
|
|
454
|
-
const t = e,
|
|
455
|
-
let
|
|
457
|
+
setup(e, { emit: a }) {
|
|
458
|
+
const t = e, l = i(!0), o = a, n = f(() => {
|
|
459
|
+
let r = "";
|
|
456
460
|
switch (t.type) {
|
|
457
461
|
case "error":
|
|
458
|
-
|
|
462
|
+
r = "cancel";
|
|
459
463
|
break;
|
|
460
464
|
case "info":
|
|
461
|
-
|
|
465
|
+
r = "info";
|
|
462
466
|
break;
|
|
463
467
|
case "success":
|
|
464
|
-
|
|
468
|
+
r = "check-circle";
|
|
465
469
|
break;
|
|
466
470
|
case "warning":
|
|
467
|
-
|
|
471
|
+
r = "error";
|
|
468
472
|
break;
|
|
469
473
|
}
|
|
470
|
-
return
|
|
474
|
+
return r;
|
|
471
475
|
});
|
|
472
|
-
return
|
|
476
|
+
return C(() => {
|
|
473
477
|
setTimeout(() => {
|
|
474
|
-
|
|
478
|
+
o("timeout", t.id);
|
|
475
479
|
}, t.timeout);
|
|
476
|
-
}),
|
|
477
|
-
|
|
478
|
-
}), (
|
|
479
|
-
const s =
|
|
480
|
-
return
|
|
481
|
-
modelValue:
|
|
482
|
-
"onUpdate:modelValue": u[0] || (u[0] = (c) =>
|
|
480
|
+
}), W(l, (r) => {
|
|
481
|
+
r || o("timeout", t.id);
|
|
482
|
+
}), (r, u) => {
|
|
483
|
+
const s = v("v-alert");
|
|
484
|
+
return b(), O(s, {
|
|
485
|
+
modelValue: l.value,
|
|
486
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
|
|
483
487
|
class: "mt-2",
|
|
484
488
|
type: e.type,
|
|
485
|
-
icon:
|
|
489
|
+
icon: n.value,
|
|
486
490
|
text: e.text,
|
|
487
491
|
"max-width": "90%",
|
|
488
492
|
width: "500px",
|
|
@@ -492,35 +496,35 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
492
496
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
493
497
|
};
|
|
494
498
|
}
|
|
495
|
-
}),
|
|
499
|
+
}), We = /* @__PURE__ */ R({
|
|
496
500
|
__name: "index",
|
|
497
501
|
setup(e) {
|
|
498
|
-
const
|
|
499
|
-
|
|
502
|
+
const a = he({ items: [] });
|
|
503
|
+
C(() => {
|
|
500
504
|
p.on("message", t);
|
|
501
|
-
}),
|
|
505
|
+
}), V(() => {
|
|
502
506
|
p.off("message", t);
|
|
503
507
|
});
|
|
504
508
|
const t = (u) => {
|
|
505
|
-
|
|
506
|
-
}, n = (u) => {
|
|
507
|
-
l(u);
|
|
508
|
-
};
|
|
509
|
-
let a = 0;
|
|
510
|
-
const r = (u, s, c) => {
|
|
511
|
-
const g = a++;
|
|
512
|
-
o.items.push({ id: g, type: u, text: s, timeout: c });
|
|
509
|
+
n(u.type, u.text, u.timeout);
|
|
513
510
|
}, l = (u) => {
|
|
514
|
-
|
|
515
|
-
|
|
511
|
+
r(u);
|
|
512
|
+
};
|
|
513
|
+
let o = 0;
|
|
514
|
+
const n = (u, s, c) => {
|
|
515
|
+
const w = o++;
|
|
516
|
+
a.items.push({ id: w, type: u, text: s, timeout: c });
|
|
517
|
+
}, r = (u) => {
|
|
518
|
+
const s = a.items.findIndex((c) => c.id === u);
|
|
519
|
+
s >= 0 && a.items.splice(s, 1);
|
|
516
520
|
};
|
|
517
|
-
return (u, s) => (
|
|
518
|
-
onClick: s[0] || (s[0] =
|
|
521
|
+
return (u, s) => (b(), z("div", {
|
|
522
|
+
onClick: s[0] || (s[0] = M(() => {
|
|
519
523
|
}, ["stop"])),
|
|
520
524
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
521
525
|
}, [
|
|
522
|
-
(
|
|
523
|
-
onTimeout:
|
|
526
|
+
(b(!0), z(we, null, ye(a.items, (c) => (b(), O(Ue, {
|
|
527
|
+
onTimeout: l,
|
|
524
528
|
id: c.id,
|
|
525
529
|
type: c.type,
|
|
526
530
|
text: c.text,
|
|
@@ -529,65 +533,65 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
529
533
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
530
534
|
]));
|
|
531
535
|
}
|
|
532
|
-
}),
|
|
536
|
+
}), He = /* @__PURE__ */ se(We, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
|
|
533
537
|
__name: "index",
|
|
534
538
|
setup(e) {
|
|
535
|
-
const
|
|
539
|
+
const a = J(), { open: t } = Y("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), w = i(), j = f(() => {
|
|
536
540
|
var _;
|
|
537
541
|
return ((_ = c.value) == null ? void 0 : _.color) ?? "primary";
|
|
538
|
-
}),
|
|
542
|
+
}), S = f(() => {
|
|
539
543
|
var _;
|
|
540
|
-
return ((_ = c.value) == null ? void 0 : _.text) ??
|
|
541
|
-
}),
|
|
544
|
+
return ((_ = c.value) == null ? void 0 : _.text) ?? a.t("cancel");
|
|
545
|
+
}), A = f(() => {
|
|
542
546
|
var _;
|
|
543
|
-
return ((_ =
|
|
544
|
-
}),
|
|
547
|
+
return ((_ = w.value) == null ? void 0 : _.color) ?? "primary";
|
|
548
|
+
}), B = f(() => {
|
|
545
549
|
var _;
|
|
546
|
-
return ((_ =
|
|
547
|
-
}), d =
|
|
548
|
-
let
|
|
549
|
-
const
|
|
550
|
-
var
|
|
551
|
-
|
|
550
|
+
return ((_ = w.value) == null ? void 0 : _.text) ?? a.t("confirm");
|
|
551
|
+
}), d = i();
|
|
552
|
+
let k = 0, q = !1;
|
|
553
|
+
const I = async (_) => {
|
|
554
|
+
var h;
|
|
555
|
+
l.value = _.title, o.value = _.text, n.value = _.label, r.value = _.placeholder, u.value = _.rules, s.value = _.value, c.value = _.cancel, w.value = _.confirm, k = _.seq, q = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (h = d.value) == null || h.focus();
|
|
552
556
|
};
|
|
553
|
-
|
|
554
|
-
p.on("promptDlg",
|
|
555
|
-
}),
|
|
556
|
-
p.off("promptDlg",
|
|
557
|
+
C(() => {
|
|
558
|
+
p.on("promptDlg", I);
|
|
559
|
+
}), V(() => {
|
|
560
|
+
p.off("promptDlg", I);
|
|
557
561
|
});
|
|
558
|
-
const
|
|
559
|
-
t.value = !1,
|
|
562
|
+
const L = () => {
|
|
563
|
+
t.value = !1, q || (p.emit("promptDlgResult" + k, s.value ?? ""), q = !0);
|
|
560
564
|
};
|
|
561
|
-
return
|
|
562
|
-
!_ && !
|
|
563
|
-
}), (_,
|
|
564
|
-
const
|
|
565
|
-
return
|
|
566
|
-
modelValue:
|
|
567
|
-
"onUpdate:modelValue":
|
|
565
|
+
return W(t, (_) => {
|
|
566
|
+
!_ && !q && (p.emit("promptDlgResult" + k, void 0), q = !0);
|
|
567
|
+
}), (_, h) => {
|
|
568
|
+
const E = v("v-card-text"), pe = v("v-text-field"), _e = v("v-form"), Z = v("v-btn"), de = v("v-card-actions"), fe = v("v-card"), ie = v("v-dialog");
|
|
569
|
+
return b(), O(ie, {
|
|
570
|
+
modelValue: N(t),
|
|
571
|
+
"onUpdate:modelValue": h[2] || (h[2] = ($) => F(t) ? t.value = $ : null),
|
|
568
572
|
onKeydown: [
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
h[3] || (h[3] = U(M(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
574
|
+
U(M(L, ["stop", "prevent"]), ["enter"])
|
|
571
575
|
],
|
|
572
576
|
transition: "dialog-top-transition",
|
|
573
577
|
"max-width": "600px"
|
|
574
578
|
}, {
|
|
575
|
-
default:
|
|
576
|
-
|
|
577
|
-
default:
|
|
578
|
-
|
|
579
|
-
default:
|
|
580
|
-
|
|
579
|
+
default: m(() => [
|
|
580
|
+
y(fe, { title: l.value }, {
|
|
581
|
+
default: m(() => [
|
|
582
|
+
o.value ? (b(), O(E, { key: 0 }, {
|
|
583
|
+
default: m(() => [
|
|
584
|
+
T(D(o.value), 1)
|
|
581
585
|
]),
|
|
582
586
|
_: 1
|
|
583
|
-
})) :
|
|
584
|
-
|
|
585
|
-
default:
|
|
586
|
-
|
|
587
|
+
})) : ke("", !0),
|
|
588
|
+
y(_e, { class: "mx-3" }, {
|
|
589
|
+
default: m(() => [
|
|
590
|
+
y(pe, {
|
|
587
591
|
modelValue: s.value,
|
|
588
|
-
"onUpdate:modelValue":
|
|
589
|
-
label:
|
|
590
|
-
placeholder:
|
|
592
|
+
"onUpdate:modelValue": h[0] || (h[0] = ($) => s.value = $),
|
|
593
|
+
label: n.value,
|
|
594
|
+
placeholder: r.value,
|
|
591
595
|
rules: u.value,
|
|
592
596
|
ref_key: "target",
|
|
593
597
|
ref: d
|
|
@@ -595,25 +599,25 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
595
599
|
]),
|
|
596
600
|
_: 1
|
|
597
601
|
}),
|
|
598
|
-
|
|
599
|
-
default:
|
|
600
|
-
|
|
601
|
-
onClick:
|
|
602
|
-
color:
|
|
602
|
+
y(de, { class: "d-flex justify-end" }, {
|
|
603
|
+
default: m(() => [
|
|
604
|
+
y(Z, {
|
|
605
|
+
onClick: h[1] || (h[1] = ($) => t.value = !1),
|
|
606
|
+
color: j.value,
|
|
603
607
|
variant: "text"
|
|
604
608
|
}, {
|
|
605
|
-
default:
|
|
606
|
-
|
|
609
|
+
default: m(() => [
|
|
610
|
+
T(D(S.value), 1)
|
|
607
611
|
]),
|
|
608
612
|
_: 1
|
|
609
613
|
}, 8, ["color"]),
|
|
610
|
-
|
|
611
|
-
onClick:
|
|
612
|
-
color:
|
|
614
|
+
y(Z, {
|
|
615
|
+
onClick: L,
|
|
616
|
+
color: A.value,
|
|
613
617
|
variant: "text"
|
|
614
618
|
}, {
|
|
615
|
-
default:
|
|
616
|
-
|
|
619
|
+
default: m(() => [
|
|
620
|
+
T(D(B.value), 1)
|
|
617
621
|
]),
|
|
618
622
|
_: 1
|
|
619
623
|
}, 8, ["color"])
|
|
@@ -628,37 +632,37 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
628
632
|
}, 8, ["modelValue", "onKeydown"]);
|
|
629
633
|
};
|
|
630
634
|
}
|
|
631
|
-
}),
|
|
635
|
+
}), Fe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Xe = /* @__PURE__ */ R({
|
|
632
636
|
__name: "index",
|
|
633
637
|
setup(e) {
|
|
634
|
-
const
|
|
638
|
+
const a = J(), { open: t } = Y("waitDlg"), l = () => {
|
|
635
639
|
t.value = !0;
|
|
636
|
-
},
|
|
640
|
+
}, o = () => {
|
|
637
641
|
t.value = !1;
|
|
638
642
|
};
|
|
639
|
-
return
|
|
640
|
-
p.on("openWaitDlg",
|
|
641
|
-
}),
|
|
642
|
-
p.off("openWaitDlg",
|
|
643
|
-
}), (
|
|
644
|
-
const u =
|
|
645
|
-
return
|
|
646
|
-
modelValue:
|
|
647
|
-
"onUpdate:modelValue":
|
|
643
|
+
return C(() => {
|
|
644
|
+
p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
|
|
645
|
+
}), V(() => {
|
|
646
|
+
p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
|
|
647
|
+
}), (n, r) => {
|
|
648
|
+
const u = v("v-card"), s = v("v-dialog");
|
|
649
|
+
return b(), O(s, {
|
|
650
|
+
modelValue: N(t),
|
|
651
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => F(t) ? t.value = c : null),
|
|
648
652
|
persistent: "",
|
|
649
653
|
"no-click-animation": "",
|
|
650
654
|
fullscreen: ""
|
|
651
655
|
}, {
|
|
652
|
-
default:
|
|
653
|
-
|
|
654
|
-
|
|
656
|
+
default: m(() => [
|
|
657
|
+
g("div", Fe, [
|
|
658
|
+
y(u, {
|
|
655
659
|
width: "300px",
|
|
656
660
|
height: "80px",
|
|
657
661
|
loading: ""
|
|
658
662
|
}, {
|
|
659
|
-
default:
|
|
660
|
-
|
|
661
|
-
|
|
663
|
+
default: m(() => [
|
|
664
|
+
g("div", Je, [
|
|
665
|
+
g("span", null, D(N(a).t("waitingResponse")), 1)
|
|
662
666
|
])
|
|
663
667
|
]),
|
|
664
668
|
_: 1
|
|
@@ -669,26 +673,25 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
|
|
|
669
673
|
}, 8, ["modelValue"]);
|
|
670
674
|
};
|
|
671
675
|
}
|
|
672
|
-
}),
|
|
673
|
-
e.component("x-confirm-dlg",
|
|
674
|
-
}
|
|
675
|
-
function
|
|
676
|
-
const e =
|
|
676
|
+
}), Ge = (e) => {
|
|
677
|
+
e.component("x-confirm-dlg", Me), e.component("x-loading", Ne), e.component("x-message", He), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Xe);
|
|
678
|
+
};
|
|
679
|
+
function it() {
|
|
680
|
+
const e = H(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
677
681
|
return {
|
|
678
|
-
primaryColor:
|
|
682
|
+
primaryColor: a,
|
|
679
683
|
secondaryColor: t,
|
|
680
|
-
backgroundColor0:
|
|
681
|
-
backgroundColor1:
|
|
682
|
-
backgroundColor2:
|
|
683
|
-
highlightColor:
|
|
684
|
+
backgroundColor0: l,
|
|
685
|
+
backgroundColor1: o,
|
|
686
|
+
backgroundColor2: n,
|
|
687
|
+
highlightColor: r,
|
|
684
688
|
borderColor: u
|
|
685
689
|
};
|
|
686
690
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
const o = no(), t = ao(), n = J(), a = de(), r = (c) => {
|
|
691
|
+
function gt(e) {
|
|
692
|
+
const a = Ce(), t = oe(), l = X(), o = re(), n = (c) => {
|
|
690
693
|
if (c.key === "Escape") {
|
|
691
|
-
|
|
694
|
+
r();
|
|
692
695
|
return;
|
|
693
696
|
}
|
|
694
697
|
if (!e && c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "d") {
|
|
@@ -699,106 +702,104 @@ function $o(e) {
|
|
|
699
702
|
s();
|
|
700
703
|
return;
|
|
701
704
|
}
|
|
702
|
-
},
|
|
703
|
-
var
|
|
704
|
-
if (!
|
|
705
|
-
|
|
705
|
+
}, r = () => {
|
|
706
|
+
var w;
|
|
707
|
+
if (!o.isEmpty()) {
|
|
708
|
+
o.hasView("waitDlg") || o.popView();
|
|
706
709
|
return;
|
|
707
710
|
}
|
|
708
|
-
const c =
|
|
709
|
-
(c == null ? void 0 : c.level) === 0 ? (
|
|
711
|
+
const c = Q(a.path);
|
|
712
|
+
(c == null ? void 0 : c.level) === 0 ? (w = navigator == null ? void 0 : navigator.Backbutton) == null || w.goHome(
|
|
710
713
|
() => {
|
|
711
714
|
},
|
|
712
715
|
() => {
|
|
713
716
|
}
|
|
714
717
|
) : t.back();
|
|
715
718
|
}, u = () => {
|
|
716
|
-
|
|
719
|
+
l.dark = !l.dark;
|
|
717
720
|
}, s = () => {
|
|
718
|
-
|
|
721
|
+
l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
|
|
719
722
|
};
|
|
720
|
-
return
|
|
721
|
-
window.addEventListener("keydown",
|
|
722
|
-
}),
|
|
723
|
-
window.removeEventListener("keydown",
|
|
723
|
+
return C(() => {
|
|
724
|
+
window.addEventListener("keydown", n, !1);
|
|
725
|
+
}), V(() => {
|
|
726
|
+
window.removeEventListener("keydown", n, !1);
|
|
724
727
|
}), {};
|
|
725
728
|
}
|
|
726
|
-
function
|
|
727
|
-
const e =
|
|
728
|
-
function
|
|
729
|
-
const
|
|
730
|
-
return
|
|
729
|
+
function vt() {
|
|
730
|
+
const e = X();
|
|
731
|
+
function a(t, l) {
|
|
732
|
+
const o = e.permissionObjects[t];
|
|
733
|
+
return o ? l ? !(!ee(o.includes, l) || ee(o.excludes, l)) : !0 : !1;
|
|
731
734
|
}
|
|
732
|
-
return { verifyPermission:
|
|
735
|
+
return { verifyPermission: a };
|
|
733
736
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
return e.post("pullPermission", o);
|
|
737
|
+
function Qe(e, a) {
|
|
738
|
+
return e.post("pullPermission", a);
|
|
737
739
|
}
|
|
738
|
-
function
|
|
739
|
-
const
|
|
740
|
+
function mt(e) {
|
|
741
|
+
const a = X();
|
|
740
742
|
let t;
|
|
741
|
-
const
|
|
743
|
+
const l = () => {
|
|
742
744
|
clearTimeout(t), t = setTimeout(async () => {
|
|
743
|
-
await
|
|
745
|
+
await o(), t && l();
|
|
744
746
|
}, 3e3);
|
|
745
|
-
},
|
|
747
|
+
}, o = async () => {
|
|
746
748
|
try {
|
|
747
|
-
const { update:
|
|
748
|
-
checksum:
|
|
749
|
+
const { update: n, permissions: r } = await Qe(e, {
|
|
750
|
+
checksum: a.permissionChecksum
|
|
749
751
|
});
|
|
750
|
-
if (!
|
|
752
|
+
if (!n)
|
|
751
753
|
return;
|
|
752
754
|
const u = {};
|
|
753
|
-
for (const s in
|
|
755
|
+
for (const s in r) {
|
|
754
756
|
if (s === "checksum")
|
|
755
757
|
continue;
|
|
756
|
-
const c =
|
|
758
|
+
const c = r[s];
|
|
757
759
|
u[s] = JSON.parse(c);
|
|
758
760
|
}
|
|
759
|
-
|
|
760
|
-
} catch (
|
|
761
|
-
console.error(
|
|
761
|
+
a.permissionObjects = u, a.permissionChecksum = r.checksum ?? "";
|
|
762
|
+
} catch (n) {
|
|
763
|
+
console.error(n);
|
|
762
764
|
}
|
|
763
765
|
};
|
|
764
|
-
return
|
|
765
|
-
|
|
766
|
-
}),
|
|
766
|
+
return C(() => {
|
|
767
|
+
o(), l();
|
|
768
|
+
}), V(() => {
|
|
767
769
|
clearTimeout(t), t = void 0;
|
|
768
770
|
}), {};
|
|
769
771
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
return { dark: t, sysBarAvail: n, compactWidth: a };
|
|
772
|
+
function ht() {
|
|
773
|
+
const e = H(), a = xe(), t = f(() => e.current.value.dark), l = f(() => !!window.cordova), o = f(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
774
|
+
return { dark: t, sysBarAvail: l, compactWidth: o };
|
|
774
775
|
}
|
|
775
|
-
const
|
|
776
|
+
const wt = { install: Ge };
|
|
776
777
|
export {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
778
|
+
je as Permission,
|
|
779
|
+
dt as appAppear,
|
|
780
|
+
ct as closeWaitDlg,
|
|
781
|
+
at as createAxios,
|
|
782
|
+
wt as default,
|
|
782
783
|
p as eventBus,
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
784
|
+
ee as isExist,
|
|
785
|
+
Q as matchRouteMeta,
|
|
786
|
+
ut as messageError,
|
|
787
|
+
st as messageInfo,
|
|
788
|
+
pt as messageSuccess,
|
|
789
|
+
_t as messageWarning,
|
|
790
|
+
ft as onBeforeEach,
|
|
791
|
+
ot as openConfirmDlg,
|
|
792
|
+
rt as openPromptDlg,
|
|
793
|
+
nt as openWaitDlg,
|
|
794
|
+
ae as routeTransName,
|
|
795
|
+
it as useColor,
|
|
796
|
+
X as useGlobalStore,
|
|
797
|
+
gt as useHotkey,
|
|
798
|
+
vt as usePermission,
|
|
799
|
+
mt as usePullPermission,
|
|
800
|
+
ht as useSystem,
|
|
801
|
+
re as useViewMgrStore,
|
|
802
|
+
Y as useViewStack,
|
|
803
|
+
lt as waitMs,
|
|
804
|
+
G as waitUtil
|
|
804
805
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"typescript": "^5.2.2",
|
|
51
51
|
"vite": "^5.2.0",
|
|
52
52
|
"vite-plugin-css-injected-by-js": "^3.5.0",
|
|
53
|
-
"vite-plugin-externals": "^0.6.2",
|
|
54
53
|
"vite-plugin-vuetify": "^2.0.3",
|
|
55
54
|
"vue-tsc": "^2.0.6"
|
|
56
55
|
}
|