x-essential-lib 0.5.61 → 0.5.66

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.
@@ -1,3 +1 @@
1
- import { AxiosInstance } from 'axios';
2
- import 'pinia-plugin-persistedstate';
3
- export declare function useMicroApp(prod: boolean, instance?: AxiosInstance): void;
1
+ export declare function useMicroApp(): void;
package/dist/index.js CHANGED
@@ -1,68 +1,39 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-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-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { ref as i, watch as N, computed as f, onMounted as R, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as S, createBlock as E, unref as z, isRef as Q, withKeys as F, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as I, toDisplayString as A, createElementBlock as X, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
3
- import { useTheme as H, useLocale as Y, useDisplay as ke } from "vuetify";
2
+ import { ref as i, computed as g, onMounted as A, onBeforeUnmount as j, defineComponent as T, watch as G, resolveComponent as h, openBlock as D, createBlock as O, unref as z, isRef as J, withKeys as F, withModifiers as U, withCtx as w, createVNode as y, createTextVNode as q, toDisplayString as S, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
3
+ import { useLocale as Q, useTheme as Y, useDisplay as ke } from "vuetify";
4
4
  import { defineStore as le } from "pinia";
5
- import be from "axios";
6
- import { useRouter as re, useRoute as Ce } from "vue-router";
7
- const Z = le(
8
- "global",
9
- () => {
10
- const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), n = i("");
11
- return N(
12
- a,
13
- () => {
14
- window.dispatchEvent(
15
- new CustomEvent("darkchange", { detail: a.value })
16
- ), e.global.name.value = a.value ? "dark" : "light";
17
- },
18
- { immediate: !0 }
19
- ), {
20
- dark: a,
21
- locale: t,
22
- permissionObjects: l,
23
- permissionChecksum: o,
24
- lastAppPath: n
25
- };
26
- },
27
- {
28
- persist: [
29
- {
30
- beforeRestore: (e) => {
31
- console.log("beforeRestore", e.store.$state);
32
- },
33
- afterRestore: (e) => {
34
- console.log("afterRestore", e.store.$state);
35
- },
36
- storage: localStorage,
37
- paths: ["dark", "locale"]
38
- },
39
- {
40
- storage: sessionStorage,
41
- paths: ["permissionObjects", "permissionChecksum", "lastAppPath"]
42
- }
43
- ]
44
- }
45
- ), ne = le("viewMgr", () => {
5
+ import Ce from "axios";
6
+ import { useRouter as ne, useRoute as be } from "vue-router";
7
+ const Z = le("global", () => {
8
+ const e = i(!1), a = i("en"), t = i({}), l = i(""), o = i("");
9
+ return {
10
+ dark: e,
11
+ locale: a,
12
+ permissionObjects: t,
13
+ permissionChecksum: l,
14
+ lastAppPath: o
15
+ };
16
+ }), re = le("viewMgr", () => {
46
17
  const e = i([]);
47
18
  function a() {
48
19
  return e.value.length <= 0;
49
20
  }
50
21
  function t() {
51
- const s = e.value.length;
52
- if (s > 0)
53
- return e.value[s - 1];
22
+ const p = e.value.length;
23
+ if (p > 0)
24
+ return e.value[p - 1];
54
25
  }
55
- function l(s) {
56
- return e.value.find((_) => _ === s) !== void 0;
26
+ function l(p) {
27
+ return e.value.find((s) => s === p) !== void 0;
57
28
  }
58
- function o(s) {
59
- e.value.push(s);
29
+ function o(p) {
30
+ e.value.push(p);
60
31
  }
61
- function n(s) {
62
- const _ = e.value.findIndex((v) => v === s);
63
- _ !== -1 && e.value.splice(_, 1);
32
+ function r(p) {
33
+ const s = e.value.findIndex((v) => v === p);
34
+ s !== -1 && e.value.splice(s, 1);
64
35
  }
65
- function r() {
36
+ function n() {
66
37
  console.assert(e.value.length > 0), e.value.pop();
67
38
  }
68
39
  function c() {
@@ -74,8 +45,8 @@ const Z = le(
74
45
  lastView: t,
75
46
  hasView: l,
76
47
  addView: o,
77
- delView: n,
78
- popView: r,
48
+ delView: r,
49
+ popView: n,
79
50
  clearViews: c
80
51
  };
81
52
  });
@@ -99,48 +70,48 @@ var De = {
99
70
  );
100
71
  }
101
72
  };
102
- function G(e, a) {
103
- function t(o, n, r) {
73
+ function X(e, a) {
74
+ function t(o, r, n) {
104
75
  if (!(typeof document > "u")) {
105
- r = W({}, a, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
76
+ n = W({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
106
77
  var c = "";
107
- for (var s in r)
108
- r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
109
- return document.cookie = o + "=" + e.write(n, o) + c;
78
+ for (var p in n)
79
+ n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
80
+ return document.cookie = o + "=" + e.write(r, o) + c;
110
81
  }
111
82
  }
112
83
  function l(o) {
113
84
  if (!(typeof document > "u" || arguments.length && !o)) {
114
- for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
115
- var s = n[c].split("="), _ = s.slice(1).join("=");
85
+ for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
86
+ var p = r[c].split("="), s = p.slice(1).join("=");
116
87
  try {
117
- var v = decodeURIComponent(s[0]);
118
- if (r[v] = e.read(_, v), o === v)
88
+ var v = decodeURIComponent(p[0]);
89
+ if (n[v] = e.read(s, v), o === v)
119
90
  break;
120
91
  } catch {
121
92
  }
122
93
  }
123
- return o ? r[o] : r;
94
+ return o ? n[o] : n;
124
95
  }
125
96
  }
126
97
  return Object.create(
127
98
  {
128
99
  set: t,
129
100
  get: l,
130
- remove: function(o, n) {
101
+ remove: function(o, r) {
131
102
  t(
132
103
  o,
133
104
  "",
134
- W({}, n, {
105
+ W({}, r, {
135
106
  expires: -1
136
107
  })
137
108
  );
138
109
  },
139
110
  withAttributes: function(o) {
140
- return G(this.converter, W({}, this.attributes, o));
111
+ return X(this.converter, W({}, this.attributes, o));
141
112
  },
142
113
  withConverter: function(o) {
143
- return G(W({}, this.converter, o), this.attributes);
114
+ return X(W({}, this.converter, o), this.attributes);
144
115
  }
145
116
  },
146
117
  {
@@ -149,47 +120,47 @@ function G(e, a) {
149
120
  }
150
121
  );
151
122
  }
152
- var B = G(De, { path: "/" });
153
- function rt(e) {
154
- const a = be.create({
123
+ var I = X(De, { path: "/" });
124
+ function lt(e) {
125
+ const a = Ce.create({
155
126
  timeout: 6e3
156
127
  });
157
128
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
158
129
  (t) => Re(t),
159
130
  (t) => {
160
- Se(t, e.onError);
131
+ Ve(t, e.onError);
161
132
  }
162
133
  ), a.interceptors.response.use(
163
- (t) => Ve(t),
164
- (t) => qe(t, e.onError)
134
+ (t) => Se(t),
135
+ (t) => Ae(t, e.onError)
165
136
  ), a;
166
137
  }
167
138
  function Re(e) {
168
- const a = B.get("accessToken") ?? "";
139
+ const a = I.get("accessToken") ?? "";
169
140
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
170
141
  }
171
- function Se(e, a) {
142
+ function Ve(e, a) {
172
143
  console.error(e), a("request timeout");
173
144
  }
174
- function Ve(e) {
145
+ function Se(e) {
175
146
  return e.data;
176
147
  }
177
- function qe(e, a) {
148
+ function Ae(e, a) {
178
149
  var o;
179
150
  const t = e.response;
180
151
  if (!t)
181
152
  return Promise.reject(e);
182
- t.status === 401 && Oe();
153
+ t.status === 401 && qe();
183
154
  let l = (o = t.data) == null ? void 0 : o.message;
184
155
  return l || (l = {
185
156
  code: t.status,
186
157
  message: t.statusText
187
158
  }), a(l), Promise.reject(e);
188
159
  }
189
- function Oe() {
190
- B.remove("accessToken"), B.remove("refreshToken"), B.remove("activeOrg"), re().replace({ path: "/passport/login" });
160
+ function qe() {
161
+ I.remove("accessToken"), I.remove("refreshToken"), I.remove("activeOrg"), ne().replace({ path: "/passport/login" });
191
162
  }
192
- function Te(e) {
163
+ function Ie(e) {
193
164
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
194
165
  var l = e.get(a);
195
166
  l ? l.push(t) : e.set(a, [t]);
@@ -205,8 +176,8 @@ function Te(e) {
205
176
  });
206
177
  } };
207
178
  }
208
- const p = function() {
209
- return window.eventBus || (window.eventBus = Te()), window.eventBus;
179
+ const u = function() {
180
+ return window.eventBus || (window.eventBus = Ie()), window.eventBus;
210
181
  }();
211
182
  async function nt(e) {
212
183
  return new Promise((a) => {
@@ -216,13 +187,13 @@ async function nt(e) {
216
187
  async function P(e, a, t) {
217
188
  const l = Date.now();
218
189
  return new Promise((o) => {
219
- const n = async () => {
220
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
190
+ const r = async () => {
191
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
221
192
  };
222
- n();
193
+ r();
223
194
  });
224
195
  }
225
- function Ae(e) {
196
+ function Oe(e) {
226
197
  var l;
227
198
  const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
228
199
  t && t.remove("app-left", "app-right");
@@ -239,45 +210,45 @@ function ce() {
239
210
  const e = Date.now();
240
211
  return e - ae > 500 ? (ae = e, !0) : !1;
241
212
  }
242
- let Ie = 0;
213
+ let Te = 0;
243
214
  function ue() {
244
- return ++Ie;
215
+ return ++Te;
245
216
  }
246
- async function ct(e) {
217
+ async function rt(e) {
247
218
  if (!ce())
248
219
  return;
249
220
  let a = !1, t;
250
- const l = (n) => {
251
- t = n, a = !0;
221
+ const l = (r) => {
222
+ t = r, a = !0;
252
223
  }, o = ue();
253
- return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), p.off("confirmDlgResult" + o, l), t;
224
+ return u.on("confirmDlgResult" + o, l), u.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), u.off("confirmDlgResult" + o, l), t;
254
225
  }
255
- async function ut(e) {
226
+ async function ct(e) {
256
227
  if (!ce())
257
228
  return;
258
229
  let a = !1, t;
259
- const l = (n) => {
260
- t = n, a = !0;
230
+ const l = (r) => {
231
+ t = r, a = !0;
261
232
  }, o = ue();
262
- return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), p.off("promptDlgResult" + o, l), t;
233
+ return u.on("promptDlgResult" + o, l), u.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), u.off("promptDlgResult" + o, l), t;
263
234
  }
264
- function st() {
265
- p.emit("openWaitDlg");
235
+ function ut() {
236
+ u.emit("openWaitDlg");
266
237
  }
267
238
  function pt() {
268
- p.emit("closeWaitDlg");
239
+ u.emit("closeWaitDlg");
240
+ }
241
+ function st(e, a) {
242
+ u.emit("message", { type: "error", text: e, timeout: a });
269
243
  }
270
244
  function _t(e, a) {
271
- p.emit("message", { type: "error", text: e, timeout: a });
245
+ u.emit("message", { type: "info", text: e, timeout: a });
272
246
  }
273
247
  function dt(e, a) {
274
- p.emit("message", { type: "info", text: e, timeout: a });
275
- }
276
- function it(e, a) {
277
- p.emit("message", { type: "success", text: e, timeout: a });
248
+ u.emit("message", { type: "success", text: e, timeout: a });
278
249
  }
279
250
  function ft(e, a) {
280
- p.emit("message", { type: "warning", text: e, timeout: a });
251
+ u.emit("message", { type: "warning", text: e, timeout: a });
281
252
  }
282
253
  var Be = /* @__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))(Be || {});
283
254
  function oe(e, a) {
@@ -401,164 +372,164 @@ const Ee = [
401
372
  mainActive: 2
402
373
  }
403
374
  ];
404
- function L(e) {
375
+ function K(e) {
405
376
  let a, t = 0;
406
377
  const l = e.split("/").filter((o) => o.trim() !== "");
407
378
  return Ee.forEach((o) => {
408
- const n = o.path.split("/").filter((c) => c.trim() !== "");
409
- let r = 0;
410
- for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
411
- r++;
412
- r > 0 && r >= t && (a = o, t = r);
379
+ const r = o.path.split("/").filter((c) => c.trim() !== "");
380
+ let n = 0;
381
+ for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
382
+ n++;
383
+ n > 0 && n >= t && (a = o, t = n);
413
384
  }), a;
414
385
  }
415
- const J = i("");
416
- function D(e, a) {
386
+ const N = i("");
387
+ function b(e, a) {
417
388
  const t = Z();
418
389
  a === "/" && (a = t.lastAppPath);
419
- const l = L(e), o = L(a);
390
+ const l = K(e), o = K(a);
420
391
  if (!l) {
421
392
  console.assert(!1, "invalid to route meta");
422
393
  return;
423
394
  }
424
395
  if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
425
396
  return;
426
- const n = l.app === o.app, r = l.path === o.path, c = l.level >= o.level;
427
- n ? r ? J.value = "" : (J.value = c ? "inner-left" : "inner-right", Ae(l.app)) : (J.value = "", je(l.app, c));
397
+ const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
398
+ r ? n ? N.value = "" : (N.value = c ? "inner-left" : "inner-right", Oe(l.app)) : (N.value = "", je(l.app, c));
428
399
  }
429
400
  function Me() {
430
- return !!B.get("accessToken");
401
+ return !!I.get("accessToken");
431
402
  }
432
- function $e() {
433
- return !!B.get("activeOrg");
403
+ function Ue() {
404
+ return !!I.get("activeOrg");
434
405
  }
435
- function gt(e, a, t) {
436
- const l = Me(), o = $e(), n = L(e.path);
437
- if (!n) {
406
+ function it(e, a, t) {
407
+ const l = Me(), o = Ue(), r = K(e.path);
408
+ if (!r) {
438
409
  t();
439
410
  return;
440
411
  }
441
- if (n.requiredState === "auth")
412
+ if (r.requiredState === "auth")
442
413
  if (l)
443
414
  if (o) {
444
- const r = "/main";
445
- D(r, a.path), t({ path: r });
415
+ const n = "/main";
416
+ b(n, a.path), t({ path: n });
446
417
  } else
447
- D(e.path, a.path), t();
418
+ b(e.path, a.path), t();
448
419
  else {
449
- const r = "/passport/login";
450
- D(r, a.path), t({ path: r });
420
+ const n = "/passport/login";
421
+ b(n, a.path), t({ path: n });
451
422
  }
452
- else if (n.requiredState === "org")
423
+ else if (r.requiredState === "org")
453
424
  if (l)
454
425
  if (o)
455
- D(e.path, a.path), t();
426
+ b(e.path, a.path), t();
456
427
  else {
457
- const r = "/org/joinOrCreate";
458
- D(r, a.path), t({ path: r });
428
+ const n = "/org/joinOrCreate";
429
+ b(n, a.path), t({ path: n });
459
430
  }
460
431
  else {
461
- const r = "/passport/login";
462
- D(r, a.path), t({ path: r });
432
+ const n = "/passport/login";
433
+ b(n, a.path), t({ path: n });
463
434
  }
464
435
  else if (l)
465
436
  if (o) {
466
- const r = "/main";
467
- D(r, a.path), t({ path: r });
437
+ const n = "/main";
438
+ b(n, a.path), t({ path: n });
468
439
  } else {
469
- const r = "/org/joinOrCreate";
470
- D(r, a.path), t({ path: r });
440
+ const n = "/org/joinOrCreate";
441
+ b(n, a.path), t({ path: n });
471
442
  }
472
443
  else
473
- D(e.path, a.path), t();
444
+ b(e.path, a.path), t();
474
445
  }
475
446
  function ee(e, a) {
476
- const t = ne(), l = f({
447
+ const t = re(), l = g({
477
448
  get() {
478
449
  return t.hasView(e);
479
450
  },
480
- set(n) {
481
- n ? t.addView(e) : t.delView(e);
451
+ set(r) {
452
+ r ? t.addView(e) : t.delView(e);
482
453
  }
483
- }), o = (n) => {
484
- a == null || a(n), l.value = !0;
454
+ }), o = (r) => {
455
+ a == null || a(r), l.value = !0;
485
456
  };
486
- return R(() => {
487
- p.on(e, o);
488
- }), O(() => {
489
- p.off(e, o);
457
+ return A(() => {
458
+ u.on(e, o);
459
+ }), j(() => {
460
+ u.off(e, o);
490
461
  }), { open: l };
491
462
  }
492
- const Ue = /* @__PURE__ */ M({
463
+ const $e = /* @__PURE__ */ T({
493
464
  __name: "index",
494
465
  setup(e) {
495
- const a = Y(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), n = i(), r = i(), c = f(() => {
496
- var u;
497
- return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
498
- }), s = f(() => {
499
- var u;
500
- return ((u = n.value) == null ? void 0 : u.text) ?? a.t("cancel");
501
- }), _ = f(() => {
502
- var u;
503
- return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
504
- }), v = f(() => {
505
- var u;
506
- return ((u = r.value) == null ? void 0 : u.text) ?? a.t("confirm");
466
+ const a = Q(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = g(() => {
467
+ var d;
468
+ return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
469
+ }), p = g(() => {
470
+ var d;
471
+ return ((d = r.value) == null ? void 0 : d.text) ?? a.t("cancel");
472
+ }), s = g(() => {
473
+ var d;
474
+ return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
475
+ }), v = g(() => {
476
+ var d;
477
+ return ((d = n.value) == null ? void 0 : d.text) ?? a.t("confirm");
507
478
  });
508
- let y = 0, C = !1;
509
- const T = (u) => {
510
- l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, y = u.seq, C = !1, t.value = !0;
479
+ let C = 0, f = !1;
480
+ const R = (d) => {
481
+ l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, C = d.seq, f = !1, t.value = !0;
511
482
  };
512
- R(() => {
513
- p.on("confirmDlg", T);
514
- }), O(() => {
515
- p.off("confirmDlg", T);
483
+ A(() => {
484
+ u.on("confirmDlg", R);
485
+ }), j(() => {
486
+ u.off("confirmDlg", R);
516
487
  });
517
- const j = () => {
518
- t.value = !1, C || (p.emit("confirmDlgResult" + y, !0), C = !0);
488
+ const $ = () => {
489
+ t.value = !1, f || (u.emit("confirmDlgResult" + C, !0), f = !0);
519
490
  };
520
- return N(t, (u) => {
521
- !u && !C && (p.emit("confirmDlgResult" + y, !1), C = !0);
522
- }), (u, g) => {
523
- const b = h("v-card-text"), V = h("v-btn"), q = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
524
- return S(), E(x, {
491
+ return G(t, (d) => {
492
+ !d && !f && (u.emit("confirmDlgResult" + C, !1), f = !0);
493
+ }), (d, k) => {
494
+ const V = h("v-card-text"), B = h("v-btn"), L = h("v-card-actions"), _ = h("v-card"), x = h("v-dialog");
495
+ return D(), O(x, {
525
496
  modelValue: z(t),
526
- "onUpdate:modelValue": g[1] || (g[1] = ($) => Q(t) ? t.value = $ : null),
497
+ "onUpdate:modelValue": k[1] || (k[1] = (E) => J(t) ? t.value = E : null),
527
498
  onKeydown: [
528
- g[2] || (g[2] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
529
- F(K(j, ["stop", "prevent"]), ["enter"])
499
+ k[2] || (k[2] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
500
+ F(U($, ["stop", "prevent"]), ["enter"])
530
501
  ],
531
502
  transition: "dialog-top-transition",
532
503
  "max-width": "600px"
533
504
  }, {
534
505
  default: w(() => [
535
- k(d, { title: l.value }, {
506
+ y(_, { title: l.value }, {
536
507
  default: w(() => [
537
- k(b, null, {
508
+ y(V, null, {
538
509
  default: w(() => [
539
- I(A(o.value), 1)
510
+ q(S(o.value), 1)
540
511
  ]),
541
512
  _: 1
542
513
  }),
543
- k(q, { class: "d-flex justify-end" }, {
514
+ y(L, { class: "d-flex justify-end" }, {
544
515
  default: w(() => [
545
- k(V, {
546
- onClick: g[0] || (g[0] = ($) => t.value = !1),
516
+ y(B, {
517
+ onClick: k[0] || (k[0] = (E) => t.value = !1),
547
518
  color: c.value,
548
519
  variant: "text"
549
520
  }, {
550
521
  default: w(() => [
551
- I(A(s.value), 1)
522
+ q(S(p.value), 1)
552
523
  ]),
553
524
  _: 1
554
525
  }, 8, ["color"]),
555
- k(V, {
556
- onClick: j,
557
- color: _.value,
526
+ y(B, {
527
+ onClick: $,
528
+ color: s.value,
558
529
  variant: "text"
559
530
  }, {
560
531
  default: w(() => [
561
- I(A(v.value), 1)
532
+ q(S(v.value), 1)
562
533
  ]),
563
534
  _: 1
564
535
  }, 8, ["color"])
@@ -573,7 +544,7 @@ const Ue = /* @__PURE__ */ M({
573
544
  }, 8, ["modelValue", "onKeydown"]);
574
545
  };
575
546
  }
576
- }), Ke = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Le = /* @__PURE__ */ Ke(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
547
+ }), Le = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), We = /* @__PURE__ */ Le(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
577
548
  /* @__PURE__ */ m("div"),
578
549
  /* @__PURE__ */ m("div"),
579
550
  /* @__PURE__ */ m("div"),
@@ -586,9 +557,9 @@ const Ue = /* @__PURE__ */ M({
586
557
  /* @__PURE__ */ m("div"),
587
558
  /* @__PURE__ */ m("div"),
588
559
  /* @__PURE__ */ m("div")
589
- ], -1)), We = [
590
- Le
591
- ], ze = /* @__PURE__ */ M({
560
+ ], -1)), ze = [
561
+ We
562
+ ], Fe = /* @__PURE__ */ T({
592
563
  __name: "index",
593
564
  props: {
594
565
  zIndex: {
@@ -597,21 +568,21 @@ const Ue = /* @__PURE__ */ M({
597
568
  }
598
569
  },
599
570
  setup(e) {
600
- const a = H(), t = e, l = f(() => ({
571
+ const a = Y(), t = e, l = g(() => ({
601
572
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
602
573
  zIndex: t.zIndex
603
574
  }));
604
- return (o, n) => (S(), X("div", {
575
+ return (o, r) => (D(), H("div", {
605
576
  class: "x-cont",
606
577
  style: ge(l.value)
607
- }, We, 4));
578
+ }, ze, 4));
608
579
  }
609
- }), se = (e, a) => {
580
+ }), pe = (e, a) => {
610
581
  const t = e.__vccOpts || e;
611
582
  for (const [l, o] of a)
612
583
  t[l] = o;
613
584
  return t;
614
- }, Fe = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
585
+ }, Ke = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ T({
615
586
  __name: "item",
616
587
  props: {
617
588
  id: {},
@@ -622,150 +593,150 @@ const Ue = /* @__PURE__ */ M({
622
593
  emits: ["timeout"],
623
594
  setup(e, { emit: a }) {
624
595
  const t = e, l = i(!0), o = a;
625
- return R(() => {
596
+ return A(() => {
626
597
  setTimeout(() => {
627
598
  o("timeout", t.id);
628
599
  }, t.timeout);
629
- }), N(l, (n) => {
630
- n || o("timeout", t.id);
631
- }), (n, r) => {
600
+ }), G(l, (r) => {
601
+ r || o("timeout", t.id);
602
+ }), (r, n) => {
632
603
  const c = h("v-alert");
633
- return S(), E(c, {
604
+ return D(), O(c, {
634
605
  modelValue: l.value,
635
- "onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
606
+ "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
636
607
  class: "mt-2",
637
608
  "max-width": "90%",
638
609
  width: "500px",
639
610
  elevation: "1",
640
611
  density: "compact",
641
612
  closable: "",
642
- type: n.type,
643
- text: n.text
613
+ type: r.type,
614
+ text: r.text
644
615
  }, null, 8, ["modelValue", "type", "text"]);
645
616
  };
646
617
  }
647
- }), He = /* @__PURE__ */ M({
618
+ }), He = /* @__PURE__ */ T({
648
619
  __name: "index",
649
620
  setup(e) {
650
621
  const a = he({ items: [] });
651
- R(() => {
652
- p.on("message", t);
653
- }), O(() => {
654
- p.off("message", t);
622
+ A(() => {
623
+ u.on("message", t);
624
+ }), j(() => {
625
+ u.off("message", t);
655
626
  });
656
627
  const t = (c) => {
657
- n(c.type, c.text, c.timeout);
628
+ r(c.type, c.text, c.timeout);
658
629
  }, l = (c) => {
659
- r(c);
630
+ n(c);
660
631
  };
661
632
  let o = 0;
662
- const n = (c, s, _) => {
633
+ const r = (c, p, s) => {
663
634
  const v = o++;
664
- a.items.push({ id: v, type: c, text: s, timeout: _ });
665
- }, r = (c) => {
666
- const s = a.items.findIndex((_) => _.id === c);
667
- s >= 0 && a.items.splice(s, 1);
635
+ a.items.push({ id: v, type: c, text: p, timeout: s });
636
+ }, n = (c) => {
637
+ const p = a.items.findIndex((s) => s.id === c);
638
+ p >= 0 && a.items.splice(p, 1);
668
639
  };
669
- return (c, s) => (S(), X("div", {
670
- onClick: s[0] || (s[0] = K(() => {
640
+ return (c, p) => (D(), H("div", {
641
+ onClick: p[0] || (p[0] = U(() => {
671
642
  }, ["stop"])),
672
643
  class: "x-cont d-flex flex-column-reverse align-center"
673
644
  }, [
674
- (S(!0), X(we, null, xe(a.items, (_) => (S(), E(Ne, {
645
+ (D(!0), H(we, null, xe(a.items, (s) => (D(), O(Ne, {
675
646
  onTimeout: l,
676
- id: _.id,
677
- type: _.type,
678
- text: _.text,
679
- timeout: _.timeout,
680
- key: _.id
647
+ id: s.id,
648
+ type: s.type,
649
+ text: s.text,
650
+ timeout: s.timeout,
651
+ key: s.id
681
652
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
682
653
  ]));
683
654
  }
684
- }), Je = /* @__PURE__ */ se(He, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ M({
655
+ }), Xe = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-8c2268ea"]]), Ge = /* @__PURE__ */ T({
685
656
  __name: "index",
686
657
  setup(e) {
687
- const a = Y(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), n = i(), r = i(), c = i(), s = i(""), _ = i(), v = i(), y = f(() => {
688
- var d;
689
- return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
690
- }), C = f(() => {
691
- var d;
692
- return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
693
- }), T = f(() => {
694
- var d;
695
- return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
696
- }), j = f(() => {
697
- var d;
698
- return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
699
- }), u = i();
700
- let g = 0, b = !1;
701
- const V = async (d) => {
658
+ const a = Q(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), s = i(), v = i(), C = g(() => {
659
+ var _;
660
+ return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
661
+ }), f = g(() => {
662
+ var _;
663
+ return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
664
+ }), R = g(() => {
665
+ var _;
666
+ return ((_ = v.value) == null ? void 0 : _.color) ?? "primary";
667
+ }), $ = g(() => {
668
+ var _;
669
+ return ((_ = v.value) == null ? void 0 : _.text) ?? a.t("confirm");
670
+ }), d = i();
671
+ let k = 0, V = !1;
672
+ const B = async (_) => {
702
673
  var x;
703
- l.value = d.title, o.value = d.text, n.value = d.label, r.value = d.placeholder, c.value = d.rules, s.value = d.value, _.value = d.cancel, v.value = d.confirm, g = d.seq, b = !1, t.value = !0, await P(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
674
+ l.value = _.title, o.value = _.text, r.value = _.label, n.value = _.placeholder, c.value = _.rules, p.value = _.value, s.value = _.cancel, v.value = _.confirm, k = _.seq, V = !1, t.value = !0, await P(() => d.value !== void 0, 1e3), (x = d.value) == null || x.focus();
704
675
  };
705
- R(() => {
706
- p.on("promptDlg", V);
707
- }), O(() => {
708
- p.off("promptDlg", V);
676
+ A(() => {
677
+ u.on("promptDlg", B);
678
+ }), j(() => {
679
+ u.off("promptDlg", B);
709
680
  });
710
- const q = () => {
711
- t.value = !1, b || (p.emit("promptDlgResult" + g, s.value ?? ""), b = !0);
681
+ const L = () => {
682
+ t.value = !1, V || (u.emit("promptDlgResult" + k, p.value ?? ""), V = !0);
712
683
  };
713
- return N(t, (d) => {
714
- !d && !b && (p.emit("promptDlgResult" + g, void 0), b = !0);
715
- }), (d, x) => {
716
- const $ = h("v-card-text"), pe = h("v-text-field"), _e = h("v-form"), te = h("v-btn"), de = h("v-card-actions"), ie = h("v-card"), fe = h("v-dialog");
717
- return S(), E(fe, {
684
+ return G(t, (_) => {
685
+ !_ && !V && (u.emit("promptDlgResult" + k, void 0), V = !0);
686
+ }), (_, x) => {
687
+ const E = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), te = h("v-btn"), de = h("v-card-actions"), fe = h("v-card"), ie = h("v-dialog");
688
+ return D(), O(ie, {
718
689
  modelValue: z(t),
719
- "onUpdate:modelValue": x[2] || (x[2] = (U) => Q(t) ? t.value = U : null),
690
+ "onUpdate:modelValue": x[2] || (x[2] = (M) => J(t) ? t.value = M : null),
720
691
  onKeydown: [
721
- x[3] || (x[3] = F(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
722
- F(K(q, ["stop", "prevent"]), ["enter"])
692
+ x[3] || (x[3] = F(U((M) => t.value = !1, ["stop", "prevent"]), ["esc"])),
693
+ F(U(L, ["stop", "prevent"]), ["enter"])
723
694
  ],
724
695
  transition: "dialog-top-transition",
725
696
  "max-width": "600px"
726
697
  }, {
727
698
  default: w(() => [
728
- k(ie, { title: l.value }, {
699
+ y(fe, { title: l.value }, {
729
700
  default: w(() => [
730
- o.value ? (S(), E($, { key: 0 }, {
701
+ o.value ? (D(), O(E, { key: 0 }, {
731
702
  default: w(() => [
732
- I(A(o.value), 1)
703
+ q(S(o.value), 1)
733
704
  ]),
734
705
  _: 1
735
706
  })) : ye("", !0),
736
- k(_e, { class: "mx-3" }, {
707
+ y(_e, { class: "mx-3" }, {
737
708
  default: w(() => [
738
- k(pe, {
739
- modelValue: s.value,
740
- "onUpdate:modelValue": x[0] || (x[0] = (U) => s.value = U),
741
- label: n.value,
742
- placeholder: r.value,
709
+ y(se, {
710
+ modelValue: p.value,
711
+ "onUpdate:modelValue": x[0] || (x[0] = (M) => p.value = M),
712
+ label: r.value,
713
+ placeholder: n.value,
743
714
  rules: c.value,
744
715
  ref_key: "target",
745
- ref: u
716
+ ref: d
746
717
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
747
718
  ]),
748
719
  _: 1
749
720
  }),
750
- k(de, { class: "d-flex justify-end" }, {
721
+ y(de, { class: "d-flex justify-end" }, {
751
722
  default: w(() => [
752
- k(te, {
753
- onClick: x[1] || (x[1] = (U) => t.value = !1),
754
- color: y.value,
723
+ y(te, {
724
+ onClick: x[1] || (x[1] = (M) => t.value = !1),
725
+ color: C.value,
755
726
  variant: "text"
756
727
  }, {
757
728
  default: w(() => [
758
- I(A(C.value), 1)
729
+ q(S(f.value), 1)
759
730
  ]),
760
731
  _: 1
761
732
  }, 8, ["color"]),
762
- k(te, {
763
- onClick: q,
764
- color: T.value,
733
+ y(te, {
734
+ onClick: L,
735
+ color: R.value,
765
736
  variant: "text"
766
737
  }, {
767
738
  default: w(() => [
768
- I(A(j.value), 1)
739
+ q(S($.value), 1)
769
740
  ]),
770
741
  _: 1
771
742
  }, 8, ["color"])
@@ -780,37 +751,37 @@ const Ue = /* @__PURE__ */ M({
780
751
  }, 8, ["modelValue", "onKeydown"]);
781
752
  };
782
753
  }
783
- }), Ge = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ M({
754
+ }), Je = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ T({
784
755
  __name: "index",
785
756
  setup(e) {
786
- const a = Y(), { open: t } = ee("waitDlg"), l = () => {
757
+ const a = Q(), { open: t } = ee("waitDlg"), l = () => {
787
758
  t.value = !0;
788
759
  }, o = () => {
789
760
  t.value = !1;
790
761
  };
791
- return R(() => {
792
- p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
793
- }), O(() => {
794
- p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
795
- }), (n, r) => {
796
- const c = h("v-card"), s = h("v-dialog");
797
- return S(), E(s, {
762
+ return A(() => {
763
+ u.on("openWaitDlg", l), u.on("closeWaitDlg", o);
764
+ }), j(() => {
765
+ u.off("openWaitDlg", l), u.off("closeWaitDlg", o);
766
+ }), (r, n) => {
767
+ const c = h("v-card"), p = h("v-dialog");
768
+ return D(), O(p, {
798
769
  modelValue: z(t),
799
- "onUpdate:modelValue": r[0] || (r[0] = (_) => Q(t) ? t.value = _ : null),
770
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => J(t) ? t.value = s : null),
800
771
  persistent: "",
801
772
  "no-click-animation": "",
802
773
  fullscreen: ""
803
774
  }, {
804
775
  default: w(() => [
805
- m("div", Ge, [
806
- k(c, {
776
+ m("div", Je, [
777
+ y(c, {
807
778
  width: "300px",
808
779
  height: "80px",
809
780
  loading: ""
810
781
  }, {
811
782
  default: w(() => [
812
783
  m("div", Qe, [
813
- m("span", null, A(z(a).t("waitingResponse")), 1)
784
+ m("span", null, S(z(a).t("waitingResponse")), 1)
814
785
  ])
815
786
  ]),
816
787
  _: 1
@@ -822,105 +793,59 @@ const Ue = /* @__PURE__ */ M({
822
793
  };
823
794
  }
824
795
  }), Ze = (e) => {
825
- e.component("x-confirm-dlg", Ue), e.component("x-loading", Fe), e.component("x-message", Je), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Ye);
796
+ e.component("x-confirm-dlg", $e), e.component("x-loading", Ke), e.component("x-message", Xe), e.component("x-prompt-dlg", Ge), e.component("x-wait-dlg", Ye);
826
797
  };
827
- function vt() {
828
- 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"), c = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
798
+ function gt() {
799
+ const e = Y(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
829
800
  return {
830
801
  primaryColor: a,
831
802
  secondaryColor: t,
832
803
  backgroundColor0: l,
833
804
  backgroundColor1: o,
834
- backgroundColor2: n,
835
- highlightColor: r,
805
+ backgroundColor2: r,
806
+ highlightColor: n,
836
807
  borderColor: c
837
808
  };
838
809
  }
839
- function Pe(e, a) {
840
- return e.post("pullPermission", a);
841
- }
842
- function mt(e, a) {
843
- const t = Ce(), l = re(), o = Z(), n = ne();
844
- let r = !0;
845
- const c = () => {
846
- r = !1;
847
- }, s = () => {
848
- r = !0;
849
- }, _ = () => {
850
- var g;
851
- if (!n.isEmpty()) {
852
- n.hasView("waitDlg") || n.popView();
810
+ function vt() {
811
+ const e = be(), a = ne(), t = Z(), l = re(), o = () => {
812
+ console.log("onPause");
813
+ }, r = () => {
814
+ console.log("onResume");
815
+ }, n = () => {
816
+ var R;
817
+ if (!l.isEmpty()) {
818
+ l.hasView("waitDlg") || l.popView();
853
819
  return;
854
820
  }
855
- const u = L(t.path);
856
- (u == null ? void 0 : u.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
821
+ const f = K(e.path);
822
+ (f == null ? void 0 : f.level) === 0 ? (R = navigator == null ? void 0 : navigator.Backbutton) == null || R.goHome(
857
823
  () => {
858
824
  },
859
825
  () => {
860
826
  }
861
- ) : l.back();
862
- };
863
- R(() => {
864
- p.on("pause", c), p.on("resume", s), p.on("backbutton", _);
865
- }), O(() => {
866
- p.off("pause", c), p.off("resume", s), p.off("backbutton", _);
867
- });
868
- const v = (u) => {
869
- if (u.key === "Escape") {
870
- _();
871
- return;
872
- }
873
- if (!e && u.ctrlKey && u.altKey && u.code === "KeyD") {
874
- o.dark = !o.dark, o.$persist();
875
- return;
876
- }
877
- if (!e && u.ctrlKey && u.altKey && u.code === "KeyL") {
878
- o.locale === "en" ? o.locale = "zhHans" : o.locale = "en", o.$persist();
827
+ ) : a.back();
828
+ }, c = (f) => {
829
+ t.dark = f;
830
+ }, p = (f) => {
831
+ t.locale = f;
832
+ }, s = (f) => {
833
+ t.permissionObjects = f[0], t.permissionChecksum = f[1];
834
+ }, v = (f) => {
835
+ t.lastAppPath = f;
836
+ }, C = (f) => {
837
+ if (f.key === "Escape") {
838
+ n();
879
839
  return;
880
840
  }
881
841
  };
882
- R(() => {
883
- window.addEventListener("keydown", v);
884
- }), O(() => {
885
- window.removeEventListener("keydown", v);
886
- });
887
- let y;
888
- const C = async () => {
889
- if (!r)
890
- return;
891
- const u = L(t.path);
892
- if (!(!u || u.requiredState !== "org"))
893
- try {
894
- const { update: g, permissions: b } = await Pe(a, {
895
- checksum: o.permissionChecksum
896
- });
897
- if (!g)
898
- return;
899
- const V = {};
900
- for (const q in b) {
901
- if (q === "checksum")
902
- continue;
903
- const d = b[q];
904
- V[q] = JSON.parse(d);
905
- }
906
- o.permissionObjects = V, o.permissionChecksum = b.checksum ?? "", o.$persist();
907
- } catch (g) {
908
- console.error(g);
909
- }
910
- }, T = async (u) => {
911
- u && await C(), clearTimeout(y), y = setTimeout(async () => {
912
- await C(), y && T();
913
- }, 3e3);
914
- }, j = () => {
915
- clearTimeout(y), y = void 0;
916
- };
917
- R(() => {
918
- a && T(!0);
919
- }), O(() => {
920
- j();
842
+ A(() => {
843
+ u.on("pause", o), u.on("resume", r), u.on("backbutton", n), u.on("darkChange", c), u.on("localeChange", p), u.on("permissionChange", s), u.on("lastAppPathChange", v), window.addEventListener("keydown", C), u.emit("microAppReady");
844
+ }), j(() => {
845
+ u.off("pause", o), u.off("resume", r), u.off("backbutton", n), u.off("darkChange", c), u.off("localeChange", p), u.off("permissionChange", s), u.off("lastAppPathChange", v), window.removeEventListener("keydown", C);
921
846
  });
922
847
  }
923
- function ht() {
848
+ function mt() {
924
849
  const e = Z();
925
850
  function a(t, l) {
926
851
  const o = e.permissionObjects[t];
@@ -928,36 +853,36 @@ function ht() {
928
853
  }
929
854
  return { verifyPermission: a };
930
855
  }
931
- function wt() {
932
- const e = H(), a = ke(), 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");
856
+ function ht() {
857
+ const e = Y(), a = ke(), t = g(() => e.current.value.dark), l = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
933
858
  return { dark: t, sysBarAvail: l, compactWidth: o };
934
859
  }
935
- const xt = { install: Ze };
860
+ const wt = { install: Ze };
936
861
  export {
937
862
  Be as Permission,
938
863
  je as appAppear,
939
- Ae as clearAppAppear,
864
+ Oe as clearAppAppear,
940
865
  pt as closeWaitDlg,
941
- rt as createAxios,
942
- xt as default,
943
- p as eventBus,
866
+ lt as createAxios,
867
+ wt as default,
868
+ u as eventBus,
944
869
  oe as isExist,
945
- L as matchRouteMeta,
946
- _t as messageError,
947
- dt as messageInfo,
948
- it as messageSuccess,
870
+ K as matchRouteMeta,
871
+ st as messageError,
872
+ _t as messageInfo,
873
+ dt as messageSuccess,
949
874
  ft as messageWarning,
950
- gt as onBeforeEach,
951
- ct as openConfirmDlg,
952
- ut as openPromptDlg,
953
- st as openWaitDlg,
954
- J as routeTransName,
955
- vt as useColor,
875
+ it as onBeforeEach,
876
+ rt as openConfirmDlg,
877
+ ct as openPromptDlg,
878
+ ut as openWaitDlg,
879
+ N as routeTransName,
880
+ gt as useColor,
956
881
  Z as useGlobalStore,
957
- mt as useMicroApp,
958
- ht as usePermission,
959
- wt as useSystem,
960
- ne as useViewMgrStore,
882
+ vt as useMicroApp,
883
+ mt as usePermission,
884
+ ht as useSystem,
885
+ re as useViewMgrStore,
961
886
  ee as useViewStack,
962
887
  nt as waitMs,
963
888
  P as waitUtil
@@ -1,19 +1,18 @@
1
- import 'pinia-plugin-persistedstate';
2
1
  import { PermissionObjects } from '../utils';
3
2
  export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
4
- dark: import("vue").Ref<boolean | undefined>;
3
+ dark: import("vue").Ref<boolean>;
5
4
  locale: import("vue").Ref<string>;
6
5
  permissionObjects: import("vue").Ref<PermissionObjects>;
7
6
  permissionChecksum: import("vue").Ref<string>;
8
7
  lastAppPath: import("vue").Ref<string>;
9
8
  }, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "lastAppPath">>, Pick<{
10
- dark: import("vue").Ref<boolean | undefined>;
9
+ dark: import("vue").Ref<boolean>;
11
10
  locale: import("vue").Ref<string>;
12
11
  permissionObjects: import("vue").Ref<PermissionObjects>;
13
12
  permissionChecksum: import("vue").Ref<string>;
14
13
  lastAppPath: import("vue").Ref<string>;
15
14
  }, never>, Pick<{
16
- dark: import("vue").Ref<boolean | undefined>;
15
+ dark: import("vue").Ref<boolean>;
17
16
  locale: import("vue").Ref<string>;
18
17
  permissionObjects: import("vue").Ref<PermissionObjects>;
19
18
  permissionChecksum: import("vue").Ref<string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.61",
4
+ "version": "0.5.66",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -28,6 +28,7 @@
28
28
  "peerDependencies": {
29
29
  "axios": "^1.6.8",
30
30
  "pinia": "^2.1.7",
31
+ "pinia-plugin-persistedstate": "^3.2.1",
31
32
  "vue": "^3.4.30",
32
33
  "vue-i18n": "^9.13.1",
33
34
  "vue-router": "^4.4.0",
@@ -44,7 +45,6 @@
44
45
  "eslint-plugin-vue": "^9.24.1",
45
46
  "husky": "^9.0.11",
46
47
  "lint-staged": "^15.2.2",
47
- "pinia-plugin-persistedstate": "^3.2.1",
48
48
  "prettier": "3.2.5",
49
49
  "sass": "^1.74.1",
50
50
  "typescript": "^5.2.2",