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