x-essential-lib 0.5.61 → 0.5.67

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 q, 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 A, 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,29 +120,29 @@ 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 ot(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),
134
+ (t) => Se(t),
164
135
  (t) => qe(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
148
  function qe(e, a) {
@@ -179,17 +150,17 @@ function qe(e, a) {
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 && Ae();
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 Ae() {
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,10 +176,10 @@ 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
- async function nt(e) {
182
+ async function lt(e) {
212
183
  return new Promise((a) => {
213
184
  setTimeout(a, e);
214
185
  });
@@ -216,22 +187,17 @@ 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) {
226
- var l;
227
- const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
228
- t && t.remove("app-left", "app-right");
229
- }
230
- function je(e, a) {
196
+ function Oe(e, a) {
231
197
  var o;
232
198
  const t = "single-spa-application:" + e, l = (o = document.getElementById(t)) == null ? void 0 : o.classList;
233
- l && (l.remove("app-left", "app-right"), setTimeout(() => {
234
- a ? l.add("app-left") : l.add("app-right");
199
+ l && (l.remove("app-left", "app-right", "app-reset"), a ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
200
+ l.add("app-reset");
235
201
  }, 0));
236
202
  }
237
203
  let ae = Date.now();
@@ -239,47 +205,47 @@ function ce() {
239
205
  const e = Date.now();
240
206
  return e - ae > 500 ? (ae = e, !0) : !1;
241
207
  }
242
- let Ie = 0;
208
+ let je = 0;
243
209
  function ue() {
244
- return ++Ie;
210
+ return ++je;
245
211
  }
246
- async function ct(e) {
212
+ async function nt(e) {
247
213
  if (!ce())
248
214
  return;
249
215
  let a = !1, t;
250
- const l = (n) => {
251
- t = n, a = !0;
216
+ const l = (r) => {
217
+ t = r, a = !0;
252
218
  }, 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;
219
+ 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
220
  }
255
- async function ut(e) {
221
+ async function rt(e) {
256
222
  if (!ce())
257
223
  return;
258
224
  let a = !1, t;
259
- const l = (n) => {
260
- t = n, a = !0;
225
+ const l = (r) => {
226
+ t = r, a = !0;
261
227
  }, 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;
228
+ 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
229
  }
264
- function st() {
265
- p.emit("openWaitDlg");
230
+ function ct() {
231
+ u.emit("openWaitDlg");
266
232
  }
267
- function pt() {
268
- p.emit("closeWaitDlg");
233
+ function ut() {
234
+ u.emit("closeWaitDlg");
269
235
  }
270
- function _t(e, a) {
271
- p.emit("message", { type: "error", text: e, timeout: a });
236
+ function pt(e, a) {
237
+ u.emit("message", { type: "error", text: e, timeout: a });
272
238
  }
273
- function dt(e, a) {
274
- p.emit("message", { type: "info", text: e, timeout: a });
239
+ function st(e, a) {
240
+ u.emit("message", { type: "info", text: e, timeout: a });
275
241
  }
276
- function it(e, a) {
277
- p.emit("message", { type: "success", text: e, timeout: a });
242
+ function _t(e, a) {
243
+ u.emit("message", { type: "success", text: e, timeout: a });
278
244
  }
279
- function ft(e, a) {
280
- p.emit("message", { type: "warning", text: e, timeout: a });
245
+ function dt(e, a) {
246
+ u.emit("message", { type: "warning", text: e, timeout: a });
281
247
  }
282
- 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 || {});
248
+ var Te = /* @__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))(Te || {});
283
249
  function oe(e, a) {
284
250
  if (!e)
285
251
  return !1;
@@ -293,7 +259,7 @@ function oe(e, a) {
293
259
  return !1;
294
260
  }), Object.keys(t).length <= 0);
295
261
  }
296
- const Ee = [
262
+ const Be = [
297
263
  {
298
264
  app: "x-passport-mf",
299
265
  path: "/passport/login",
@@ -401,164 +367,164 @@ const Ee = [
401
367
  mainActive: 2
402
368
  }
403
369
  ];
404
- function L(e) {
370
+ function K(e) {
405
371
  let a, t = 0;
406
372
  const l = e.split("/").filter((o) => o.trim() !== "");
407
- 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);
373
+ return Be.forEach((o) => {
374
+ const r = o.path.split("/").filter((c) => c.trim() !== "");
375
+ let n = 0;
376
+ for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
377
+ n++;
378
+ n > 0 && n >= t && (a = o, t = n);
413
379
  }), a;
414
380
  }
415
- const J = i("");
416
- function D(e, a) {
381
+ const N = i("");
382
+ function b(e, a) {
417
383
  const t = Z();
418
384
  a === "/" && (a = t.lastAppPath);
419
- const l = L(e), o = L(a);
385
+ const l = K(e), o = K(a);
420
386
  if (!l) {
421
387
  console.assert(!1, "invalid to route meta");
422
388
  return;
423
389
  }
424
390
  if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
425
391
  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));
392
+ const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
393
+ r ? n ? N.value = "" : N.value = c ? "inner-left" : "inner-right" : (N.value = "", Oe(l.app, c));
428
394
  }
429
- function Me() {
430
- return !!B.get("accessToken");
395
+ function Ee() {
396
+ return !!I.get("accessToken");
431
397
  }
432
- function $e() {
433
- return !!B.get("activeOrg");
398
+ function Me() {
399
+ return !!I.get("activeOrg");
434
400
  }
435
- function gt(e, a, t) {
436
- const l = Me(), o = $e(), n = L(e.path);
437
- if (!n) {
401
+ function ft(e, a, t) {
402
+ const l = Ee(), o = Me(), r = K(e.path);
403
+ if (!r) {
438
404
  t();
439
405
  return;
440
406
  }
441
- if (n.requiredState === "auth")
407
+ if (r.requiredState === "auth")
442
408
  if (l)
443
409
  if (o) {
444
- const r = "/main";
445
- D(r, a.path), t({ path: r });
410
+ const n = "/main";
411
+ b(n, a.path), t({ path: n });
446
412
  } else
447
- D(e.path, a.path), t();
413
+ b(e.path, a.path), t();
448
414
  else {
449
- const r = "/passport/login";
450
- D(r, a.path), t({ path: r });
415
+ const n = "/passport/login";
416
+ b(n, a.path), t({ path: n });
451
417
  }
452
- else if (n.requiredState === "org")
418
+ else if (r.requiredState === "org")
453
419
  if (l)
454
420
  if (o)
455
- D(e.path, a.path), t();
421
+ b(e.path, a.path), t();
456
422
  else {
457
- const r = "/org/joinOrCreate";
458
- D(r, a.path), t({ path: r });
423
+ const n = "/org/joinOrCreate";
424
+ b(n, a.path), t({ path: n });
459
425
  }
460
426
  else {
461
- const r = "/passport/login";
462
- D(r, a.path), t({ path: r });
427
+ const n = "/passport/login";
428
+ b(n, a.path), t({ path: n });
463
429
  }
464
430
  else if (l)
465
431
  if (o) {
466
- const r = "/main";
467
- D(r, a.path), t({ path: r });
432
+ const n = "/main";
433
+ b(n, a.path), t({ path: n });
468
434
  } else {
469
- const r = "/org/joinOrCreate";
470
- D(r, a.path), t({ path: r });
435
+ const n = "/org/joinOrCreate";
436
+ b(n, a.path), t({ path: n });
471
437
  }
472
438
  else
473
- D(e.path, a.path), t();
439
+ b(e.path, a.path), t();
474
440
  }
475
441
  function ee(e, a) {
476
- const t = ne(), l = f({
442
+ const t = re(), l = g({
477
443
  get() {
478
444
  return t.hasView(e);
479
445
  },
480
- set(n) {
481
- n ? t.addView(e) : t.delView(e);
446
+ set(r) {
447
+ r ? t.addView(e) : t.delView(e);
482
448
  }
483
- }), o = (n) => {
484
- a == null || a(n), l.value = !0;
449
+ }), o = (r) => {
450
+ a == null || a(r), l.value = !0;
485
451
  };
486
- return R(() => {
487
- p.on(e, o);
488
- }), O(() => {
489
- p.off(e, o);
452
+ return q(() => {
453
+ u.on(e, o);
454
+ }), j(() => {
455
+ u.off(e, o);
490
456
  }), { open: l };
491
457
  }
492
- const Ue = /* @__PURE__ */ M({
458
+ const Ue = /* @__PURE__ */ T({
493
459
  __name: "index",
494
460
  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");
461
+ const a = Q(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = g(() => {
462
+ var d;
463
+ return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
464
+ }), p = g(() => {
465
+ var d;
466
+ return ((d = r.value) == null ? void 0 : d.text) ?? a.t("cancel");
467
+ }), s = g(() => {
468
+ var d;
469
+ return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
470
+ }), v = g(() => {
471
+ var d;
472
+ return ((d = n.value) == null ? void 0 : d.text) ?? a.t("confirm");
507
473
  });
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;
474
+ let C = 0, f = !1;
475
+ const R = (d) => {
476
+ 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
477
  };
512
- R(() => {
513
- p.on("confirmDlg", T);
514
- }), O(() => {
515
- p.off("confirmDlg", T);
478
+ q(() => {
479
+ u.on("confirmDlg", R);
480
+ }), j(() => {
481
+ u.off("confirmDlg", R);
516
482
  });
517
- const j = () => {
518
- t.value = !1, C || (p.emit("confirmDlgResult" + y, !0), C = !0);
483
+ const $ = () => {
484
+ t.value = !1, f || (u.emit("confirmDlgResult" + C, !0), f = !0);
519
485
  };
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, {
486
+ return G(t, (d) => {
487
+ !d && !f && (u.emit("confirmDlgResult" + C, !1), f = !0);
488
+ }), (d, k) => {
489
+ const V = h("v-card-text"), B = h("v-btn"), L = h("v-card-actions"), _ = h("v-card"), x = h("v-dialog");
490
+ return D(), O(x, {
525
491
  modelValue: z(t),
526
- "onUpdate:modelValue": g[1] || (g[1] = ($) => Q(t) ? t.value = $ : null),
492
+ "onUpdate:modelValue": k[1] || (k[1] = (E) => J(t) ? t.value = E : null),
527
493
  onKeydown: [
528
- g[2] || (g[2] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
529
- F(K(j, ["stop", "prevent"]), ["enter"])
494
+ k[2] || (k[2] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
495
+ F(U($, ["stop", "prevent"]), ["enter"])
530
496
  ],
531
497
  transition: "dialog-top-transition",
532
498
  "max-width": "600px"
533
499
  }, {
534
500
  default: w(() => [
535
- k(d, { title: l.value }, {
501
+ y(_, { title: l.value }, {
536
502
  default: w(() => [
537
- k(b, null, {
503
+ y(V, null, {
538
504
  default: w(() => [
539
- I(A(o.value), 1)
505
+ A(S(o.value), 1)
540
506
  ]),
541
507
  _: 1
542
508
  }),
543
- k(q, { class: "d-flex justify-end" }, {
509
+ y(L, { class: "d-flex justify-end" }, {
544
510
  default: w(() => [
545
- k(V, {
546
- onClick: g[0] || (g[0] = ($) => t.value = !1),
511
+ y(B, {
512
+ onClick: k[0] || (k[0] = (E) => t.value = !1),
547
513
  color: c.value,
548
514
  variant: "text"
549
515
  }, {
550
516
  default: w(() => [
551
- I(A(s.value), 1)
517
+ A(S(p.value), 1)
552
518
  ]),
553
519
  _: 1
554
520
  }, 8, ["color"]),
555
- k(V, {
556
- onClick: j,
557
- color: _.value,
521
+ y(B, {
522
+ onClick: $,
523
+ color: s.value,
558
524
  variant: "text"
559
525
  }, {
560
526
  default: w(() => [
561
- I(A(v.value), 1)
527
+ A(S(v.value), 1)
562
528
  ]),
563
529
  _: 1
564
530
  }, 8, ["color"])
@@ -573,7 +539,7 @@ const Ue = /* @__PURE__ */ M({
573
539
  }, 8, ["modelValue", "onKeydown"]);
574
540
  };
575
541
  }
576
- }), Ke = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Le = /* @__PURE__ */ Ke(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
542
+ }), $e = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Le = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
577
543
  /* @__PURE__ */ m("div"),
578
544
  /* @__PURE__ */ m("div"),
579
545
  /* @__PURE__ */ m("div"),
@@ -588,7 +554,7 @@ const Ue = /* @__PURE__ */ M({
588
554
  /* @__PURE__ */ m("div")
589
555
  ], -1)), We = [
590
556
  Le
591
- ], ze = /* @__PURE__ */ M({
557
+ ], ze = /* @__PURE__ */ T({
592
558
  __name: "index",
593
559
  props: {
594
560
  zIndex: {
@@ -597,21 +563,21 @@ const Ue = /* @__PURE__ */ M({
597
563
  }
598
564
  },
599
565
  setup(e) {
600
- const a = H(), t = e, l = f(() => ({
566
+ const a = Y(), t = e, l = g(() => ({
601
567
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
602
568
  zIndex: t.zIndex
603
569
  }));
604
- return (o, n) => (S(), X("div", {
570
+ return (o, r) => (D(), H("div", {
605
571
  class: "x-cont",
606
572
  style: ge(l.value)
607
573
  }, We, 4));
608
574
  }
609
- }), se = (e, a) => {
575
+ }), pe = (e, a) => {
610
576
  const t = e.__vccOpts || e;
611
577
  for (const [l, o] of a)
612
578
  t[l] = o;
613
579
  return t;
614
- }, Fe = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
580
+ }, Fe = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Ke = /* @__PURE__ */ T({
615
581
  __name: "item",
616
582
  props: {
617
583
  id: {},
@@ -622,150 +588,150 @@ const Ue = /* @__PURE__ */ M({
622
588
  emits: ["timeout"],
623
589
  setup(e, { emit: a }) {
624
590
  const t = e, l = i(!0), o = a;
625
- return R(() => {
591
+ return q(() => {
626
592
  setTimeout(() => {
627
593
  o("timeout", t.id);
628
594
  }, t.timeout);
629
- }), N(l, (n) => {
630
- n || o("timeout", t.id);
631
- }), (n, r) => {
595
+ }), G(l, (r) => {
596
+ r || o("timeout", t.id);
597
+ }), (r, n) => {
632
598
  const c = h("v-alert");
633
- return S(), E(c, {
599
+ return D(), O(c, {
634
600
  modelValue: l.value,
635
- "onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
601
+ "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
636
602
  class: "mt-2",
637
603
  "max-width": "90%",
638
604
  width: "500px",
639
605
  elevation: "1",
640
606
  density: "compact",
641
607
  closable: "",
642
- type: n.type,
643
- text: n.text
608
+ type: r.type,
609
+ text: r.text
644
610
  }, null, 8, ["modelValue", "type", "text"]);
645
611
  };
646
612
  }
647
- }), He = /* @__PURE__ */ M({
613
+ }), Ne = /* @__PURE__ */ T({
648
614
  __name: "index",
649
615
  setup(e) {
650
616
  const a = he({ items: [] });
651
- R(() => {
652
- p.on("message", t);
653
- }), O(() => {
654
- p.off("message", t);
617
+ q(() => {
618
+ u.on("message", t);
619
+ }), j(() => {
620
+ u.off("message", t);
655
621
  });
656
622
  const t = (c) => {
657
- n(c.type, c.text, c.timeout);
623
+ r(c.type, c.text, c.timeout);
658
624
  }, l = (c) => {
659
- r(c);
625
+ n(c);
660
626
  };
661
627
  let o = 0;
662
- const n = (c, s, _) => {
628
+ const r = (c, p, s) => {
663
629
  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);
630
+ a.items.push({ id: v, type: c, text: p, timeout: s });
631
+ }, n = (c) => {
632
+ const p = a.items.findIndex((s) => s.id === c);
633
+ p >= 0 && a.items.splice(p, 1);
668
634
  };
669
- return (c, s) => (S(), X("div", {
670
- onClick: s[0] || (s[0] = K(() => {
635
+ return (c, p) => (D(), H("div", {
636
+ onClick: p[0] || (p[0] = U(() => {
671
637
  }, ["stop"])),
672
638
  class: "x-cont d-flex flex-column-reverse align-center"
673
639
  }, [
674
- (S(!0), X(we, null, xe(a.items, (_) => (S(), E(Ne, {
640
+ (D(!0), H(we, null, xe(a.items, (s) => (D(), O(Ke, {
675
641
  onTimeout: l,
676
- id: _.id,
677
- type: _.type,
678
- text: _.text,
679
- timeout: _.timeout,
680
- key: _.id
642
+ id: s.id,
643
+ type: s.type,
644
+ text: s.text,
645
+ timeout: s.timeout,
646
+ key: s.id
681
647
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
682
648
  ]));
683
649
  }
684
- }), Je = /* @__PURE__ */ se(He, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ M({
650
+ }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ T({
685
651
  __name: "index",
686
652
  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) => {
653
+ 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(() => {
654
+ var _;
655
+ return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
656
+ }), f = g(() => {
657
+ var _;
658
+ return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
659
+ }), R = g(() => {
660
+ var _;
661
+ return ((_ = v.value) == null ? void 0 : _.color) ?? "primary";
662
+ }), $ = g(() => {
663
+ var _;
664
+ return ((_ = v.value) == null ? void 0 : _.text) ?? a.t("confirm");
665
+ }), d = i();
666
+ let k = 0, V = !1;
667
+ const B = async (_) => {
702
668
  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();
669
+ 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
670
  };
705
- R(() => {
706
- p.on("promptDlg", V);
707
- }), O(() => {
708
- p.off("promptDlg", V);
671
+ q(() => {
672
+ u.on("promptDlg", B);
673
+ }), j(() => {
674
+ u.off("promptDlg", B);
709
675
  });
710
- const q = () => {
711
- t.value = !1, b || (p.emit("promptDlgResult" + g, s.value ?? ""), b = !0);
676
+ const L = () => {
677
+ t.value = !1, V || (u.emit("promptDlgResult" + k, p.value ?? ""), V = !0);
712
678
  };
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, {
679
+ return G(t, (_) => {
680
+ !_ && !V && (u.emit("promptDlgResult" + k, void 0), V = !0);
681
+ }), (_, x) => {
682
+ 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");
683
+ return D(), O(ie, {
718
684
  modelValue: z(t),
719
- "onUpdate:modelValue": x[2] || (x[2] = (U) => Q(t) ? t.value = U : null),
685
+ "onUpdate:modelValue": x[2] || (x[2] = (M) => J(t) ? t.value = M : null),
720
686
  onKeydown: [
721
- x[3] || (x[3] = F(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
722
- F(K(q, ["stop", "prevent"]), ["enter"])
687
+ x[3] || (x[3] = F(U((M) => t.value = !1, ["stop", "prevent"]), ["esc"])),
688
+ F(U(L, ["stop", "prevent"]), ["enter"])
723
689
  ],
724
690
  transition: "dialog-top-transition",
725
691
  "max-width": "600px"
726
692
  }, {
727
693
  default: w(() => [
728
- k(ie, { title: l.value }, {
694
+ y(fe, { title: l.value }, {
729
695
  default: w(() => [
730
- o.value ? (S(), E($, { key: 0 }, {
696
+ o.value ? (D(), O(E, { key: 0 }, {
731
697
  default: w(() => [
732
- I(A(o.value), 1)
698
+ A(S(o.value), 1)
733
699
  ]),
734
700
  _: 1
735
701
  })) : ye("", !0),
736
- k(_e, { class: "mx-3" }, {
702
+ y(_e, { class: "mx-3" }, {
737
703
  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,
704
+ y(se, {
705
+ modelValue: p.value,
706
+ "onUpdate:modelValue": x[0] || (x[0] = (M) => p.value = M),
707
+ label: r.value,
708
+ placeholder: n.value,
743
709
  rules: c.value,
744
710
  ref_key: "target",
745
- ref: u
711
+ ref: d
746
712
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
747
713
  ]),
748
714
  _: 1
749
715
  }),
750
- k(de, { class: "d-flex justify-end" }, {
716
+ y(de, { class: "d-flex justify-end" }, {
751
717
  default: w(() => [
752
- k(te, {
753
- onClick: x[1] || (x[1] = (U) => t.value = !1),
754
- color: y.value,
718
+ y(te, {
719
+ onClick: x[1] || (x[1] = (M) => t.value = !1),
720
+ color: C.value,
755
721
  variant: "text"
756
722
  }, {
757
723
  default: w(() => [
758
- I(A(C.value), 1)
724
+ A(S(f.value), 1)
759
725
  ]),
760
726
  _: 1
761
727
  }, 8, ["color"]),
762
- k(te, {
763
- onClick: q,
764
- color: T.value,
728
+ y(te, {
729
+ onClick: L,
730
+ color: R.value,
765
731
  variant: "text"
766
732
  }, {
767
733
  default: w(() => [
768
- I(A(j.value), 1)
734
+ A(S($.value), 1)
769
735
  ]),
770
736
  _: 1
771
737
  }, 8, ["color"])
@@ -780,37 +746,37 @@ const Ue = /* @__PURE__ */ M({
780
746
  }, 8, ["modelValue", "onKeydown"]);
781
747
  };
782
748
  }
783
- }), Ge = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ M({
749
+ }), Ge = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ T({
784
750
  __name: "index",
785
751
  setup(e) {
786
- const a = Y(), { open: t } = ee("waitDlg"), l = () => {
752
+ const a = Q(), { open: t } = ee("waitDlg"), l = () => {
787
753
  t.value = !0;
788
754
  }, o = () => {
789
755
  t.value = !1;
790
756
  };
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, {
757
+ return q(() => {
758
+ u.on("openWaitDlg", l), u.on("closeWaitDlg", o);
759
+ }), j(() => {
760
+ u.off("openWaitDlg", l), u.off("closeWaitDlg", o);
761
+ }), (r, n) => {
762
+ const c = h("v-card"), p = h("v-dialog");
763
+ return D(), O(p, {
798
764
  modelValue: z(t),
799
- "onUpdate:modelValue": r[0] || (r[0] = (_) => Q(t) ? t.value = _ : null),
765
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => J(t) ? t.value = s : null),
800
766
  persistent: "",
801
767
  "no-click-animation": "",
802
768
  fullscreen: ""
803
769
  }, {
804
770
  default: w(() => [
805
771
  m("div", Ge, [
806
- k(c, {
772
+ y(c, {
807
773
  width: "300px",
808
774
  height: "80px",
809
775
  loading: ""
810
776
  }, {
811
777
  default: w(() => [
812
- m("div", Qe, [
813
- m("span", null, A(z(a).t("waitingResponse")), 1)
778
+ m("div", Je, [
779
+ m("span", null, S(z(a).t("waitingResponse")), 1)
814
780
  ])
815
781
  ]),
816
782
  _: 1
@@ -821,106 +787,60 @@ const Ue = /* @__PURE__ */ M({
821
787
  }, 8, ["modelValue"]);
822
788
  };
823
789
  }
824
- }), 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);
790
+ }), Ye = (e) => {
791
+ e.component("x-confirm-dlg", Ue), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Qe);
826
792
  };
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");
793
+ function it() {
794
+ 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
795
  return {
830
796
  primaryColor: a,
831
797
  secondaryColor: t,
832
798
  backgroundColor0: l,
833
799
  backgroundColor1: o,
834
- backgroundColor2: n,
835
- highlightColor: r,
800
+ backgroundColor2: r,
801
+ highlightColor: n,
836
802
  borderColor: c
837
803
  };
838
804
  }
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();
805
+ function gt() {
806
+ const e = be(), a = ne(), t = Z(), l = re(), o = () => {
807
+ console.log("onPause");
808
+ }, r = () => {
809
+ console.log("onResume");
810
+ }, n = () => {
811
+ var R;
812
+ if (!l.isEmpty()) {
813
+ l.hasView("waitDlg") || l.popView();
853
814
  return;
854
815
  }
855
- const u = L(t.path);
856
- (u == null ? void 0 : u.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
816
+ const f = K(e.path);
817
+ (f == null ? void 0 : f.level) === 0 ? (R = navigator == null ? void 0 : navigator.Backbutton) == null || R.goHome(
857
818
  () => {
858
819
  },
859
820
  () => {
860
821
  }
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
- _();
822
+ ) : a.back();
823
+ }, c = (f) => {
824
+ t.dark = f;
825
+ }, p = (f) => {
826
+ t.locale = f;
827
+ }, s = (f) => {
828
+ t.permissionObjects = f[0], t.permissionChecksum = f[1];
829
+ }, v = (f) => {
830
+ t.lastAppPath = f;
831
+ }, C = (f) => {
832
+ if (f.key === "Escape") {
833
+ n();
871
834
  return;
872
835
  }
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();
879
- return;
880
- }
881
- };
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
836
  };
917
- R(() => {
918
- a && T(!0);
919
- }), O(() => {
920
- j();
837
+ q(() => {
838
+ 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");
839
+ }), j(() => {
840
+ 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
841
  });
922
842
  }
923
- function ht() {
843
+ function vt() {
924
844
  const e = Z();
925
845
  function a(t, l) {
926
846
  const o = e.permissionObjects[t];
@@ -928,37 +848,36 @@ function ht() {
928
848
  }
929
849
  return { verifyPermission: a };
930
850
  }
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");
851
+ function mt() {
852
+ 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
853
  return { dark: t, sysBarAvail: l, compactWidth: o };
934
854
  }
935
- const xt = { install: Ze };
855
+ const ht = { install: Ye };
936
856
  export {
937
- Be as Permission,
938
- je as appAppear,
939
- Ae as clearAppAppear,
940
- pt as closeWaitDlg,
941
- rt as createAxios,
942
- xt as default,
943
- p as eventBus,
857
+ Te as Permission,
858
+ Oe as appAppear,
859
+ ut as closeWaitDlg,
860
+ ot as createAxios,
861
+ ht as default,
862
+ u as eventBus,
944
863
  oe as isExist,
945
- L as matchRouteMeta,
946
- _t as messageError,
947
- dt as messageInfo,
948
- it as messageSuccess,
949
- 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,
864
+ K as matchRouteMeta,
865
+ pt as messageError,
866
+ st as messageInfo,
867
+ _t as messageSuccess,
868
+ dt as messageWarning,
869
+ ft as onBeforeEach,
870
+ nt as openConfirmDlg,
871
+ rt as openPromptDlg,
872
+ ct as openWaitDlg,
873
+ N as routeTransName,
874
+ it as useColor,
956
875
  Z as useGlobalStore,
957
- mt as useMicroApp,
958
- ht as usePermission,
959
- wt as useSystem,
960
- ne as useViewMgrStore,
876
+ gt as useMicroApp,
877
+ vt as usePermission,
878
+ mt as useSystem,
879
+ re as useViewMgrStore,
961
880
  ee as useViewStack,
962
- nt as waitMs,
881
+ lt as waitMs,
963
882
  P as waitUtil
964
883
  };
@@ -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>;
@@ -2,5 +2,4 @@ import { Emitter, EventType } from 'mitt';
2
2
  export declare const eventBus: Emitter<Record<EventType, unknown>>;
3
3
  export declare function waitMs(ms: number): Promise<void>;
4
4
  export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
5
- export declare function clearAppAppear(name: string): void;
6
5
  export declare function appAppear(name: string, forward: boolean): void;
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.67",
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",