x-essential-lib 0.5.57 → 0.5.59

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.
Files changed (2) hide show
  1. package/dist/index.js +170 -168
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
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 S, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as R, 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 ye, createCommentVNode as xe } from "vue";
2
+ import { ref as i, watch as N, computed as f, onMounted as S, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as R, 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
3
  import { useTheme as H, useLocale as Y, useDisplay as ke } from "vuetify";
4
4
  import { defineStore as le } from "pinia";
5
5
  import be from "axios";
6
- import { useRouter as ne, useRoute as Ce } from "vue-router";
6
+ import { useRouter as re, useRoute as Ce } from "vue-router";
7
7
  const Z = le(
8
8
  "global",
9
9
  () => {
10
- const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), r = i("");
10
+ const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), n = i("");
11
11
  return N(
12
12
  a,
13
13
  () => {
@@ -21,12 +21,15 @@ const Z = le(
21
21
  locale: t,
22
22
  permissionObjects: l,
23
23
  permissionChecksum: o,
24
- lastAppPath: r
24
+ lastAppPath: n
25
25
  };
26
26
  },
27
27
  {
28
28
  persist: [
29
29
  {
30
+ afterRestore: (e) => {
31
+ console.log("afterRestore", e.store.$id);
32
+ },
30
33
  storage: localStorage,
31
34
  paths: ["dark", "locale"]
32
35
  },
@@ -36,27 +39,27 @@ const Z = le(
36
39
  }
37
40
  ]
38
41
  }
39
- ), re = le("viewMgr", () => {
42
+ ), ne = le("viewMgr", () => {
40
43
  const e = i([]);
41
44
  function a() {
42
45
  return e.value.length <= 0;
43
46
  }
44
47
  function t() {
45
- const p = e.value.length;
46
- if (p > 0)
47
- return e.value[p - 1];
48
+ const s = e.value.length;
49
+ if (s > 0)
50
+ return e.value[s - 1];
48
51
  }
49
- function l(p) {
50
- return e.value.find((_) => _ === p) !== void 0;
52
+ function l(s) {
53
+ return e.value.find((_) => _ === s) !== void 0;
51
54
  }
52
- function o(p) {
53
- e.value.push(p);
55
+ function o(s) {
56
+ e.value.push(s);
54
57
  }
55
- function r(p) {
56
- const _ = e.value.findIndex((v) => v === p);
58
+ function n(s) {
59
+ const _ = e.value.findIndex((v) => v === s);
57
60
  _ !== -1 && e.value.splice(_, 1);
58
61
  }
59
- function n() {
62
+ function r() {
60
63
  console.assert(e.value.length > 0), e.value.pop();
61
64
  }
62
65
  function c() {
@@ -68,8 +71,8 @@ const Z = le(
68
71
  lastView: t,
69
72
  hasView: l,
70
73
  addView: o,
71
- delView: r,
72
- popView: n,
74
+ delView: n,
75
+ popView: r,
73
76
  clearViews: c
74
77
  };
75
78
  });
@@ -94,38 +97,38 @@ var De = {
94
97
  }
95
98
  };
96
99
  function G(e, a) {
97
- function t(o, r, n) {
100
+ function t(o, n, r) {
98
101
  if (!(typeof document > "u")) {
99
- 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);
102
+ 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);
100
103
  var c = "";
101
- for (var p in n)
102
- n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
103
- return document.cookie = o + "=" + e.write(r, o) + c;
104
+ for (var s in r)
105
+ r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
106
+ return document.cookie = o + "=" + e.write(n, o) + c;
104
107
  }
105
108
  }
106
109
  function l(o) {
107
110
  if (!(typeof document > "u" || arguments.length && !o)) {
108
- for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
109
- var p = r[c].split("="), _ = p.slice(1).join("=");
111
+ for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
112
+ var s = n[c].split("="), _ = s.slice(1).join("=");
110
113
  try {
111
- var v = decodeURIComponent(p[0]);
112
- if (n[v] = e.read(_, v), o === v)
114
+ var v = decodeURIComponent(s[0]);
115
+ if (r[v] = e.read(_, v), o === v)
113
116
  break;
114
117
  } catch {
115
118
  }
116
119
  }
117
- return o ? n[o] : n;
120
+ return o ? r[o] : r;
118
121
  }
119
122
  }
120
123
  return Object.create(
121
124
  {
122
125
  set: t,
123
126
  get: l,
124
- remove: function(o, r) {
127
+ remove: function(o, n) {
125
128
  t(
126
129
  o,
127
130
  "",
128
- W({}, r, {
131
+ W({}, n, {
129
132
  expires: -1
130
133
  })
131
134
  );
@@ -144,7 +147,7 @@ function G(e, a) {
144
147
  );
145
148
  }
146
149
  var B = G(De, { path: "/" });
147
- function nt(e) {
150
+ function rt(e) {
148
151
  const a = be.create({
149
152
  timeout: 6e3
150
153
  });
@@ -181,7 +184,7 @@ function qe(e, a) {
181
184
  }), a(l), Promise.reject(e);
182
185
  }
183
186
  function Oe() {
184
- B.remove("accessToken"), B.remove("refreshToken"), B.remove("activeOrg"), ne().replace({ path: "/passport/login" });
187
+ B.remove("accessToken"), B.remove("refreshToken"), B.remove("activeOrg"), re().replace({ path: "/passport/login" });
185
188
  }
186
189
  function Te(e) {
187
190
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
@@ -199,10 +202,10 @@ function Te(e) {
199
202
  });
200
203
  } };
201
204
  }
202
- const s = function() {
205
+ const p = function() {
203
206
  return window.eventBus || (window.eventBus = Te()), window.eventBus;
204
207
  }();
205
- async function rt(e) {
208
+ async function nt(e) {
206
209
  return new Promise((a) => {
207
210
  setTimeout(a, e);
208
211
  });
@@ -210,10 +213,10 @@ async function rt(e) {
210
213
  async function P(e, a, t) {
211
214
  const l = Date.now();
212
215
  return new Promise((o) => {
213
- const r = async () => {
214
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
216
+ const n = async () => {
217
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
215
218
  };
216
- r();
219
+ n();
217
220
  });
218
221
  }
219
222
  function Ae(e) {
@@ -241,37 +244,37 @@ async function ct(e) {
241
244
  if (!ce())
242
245
  return;
243
246
  let a = !1, t;
244
- const l = (r) => {
245
- t = r, a = !0;
247
+ const l = (n) => {
248
+ t = n, a = !0;
246
249
  }, o = ue();
247
- return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), s.off("confirmDlgResult" + o, l), t;
250
+ 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;
248
251
  }
249
252
  async function ut(e) {
250
253
  if (!ce())
251
254
  return;
252
255
  let a = !1, t;
253
- const l = (r) => {
254
- t = r, a = !0;
256
+ const l = (n) => {
257
+ t = n, a = !0;
255
258
  }, o = ue();
256
- return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), s.off("promptDlgResult" + o, l), t;
257
- }
258
- function pt() {
259
- s.emit("openWaitDlg");
259
+ 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;
260
260
  }
261
261
  function st() {
262
- s.emit("closeWaitDlg");
262
+ p.emit("openWaitDlg");
263
+ }
264
+ function pt() {
265
+ p.emit("closeWaitDlg");
263
266
  }
264
267
  function _t(e, a) {
265
- s.emit("message", { type: "error", text: e, timeout: a });
268
+ p.emit("message", { type: "error", text: e, timeout: a });
266
269
  }
267
270
  function dt(e, a) {
268
- s.emit("message", { type: "info", text: e, timeout: a });
271
+ p.emit("message", { type: "info", text: e, timeout: a });
269
272
  }
270
273
  function it(e, a) {
271
- s.emit("message", { type: "success", text: e, timeout: a });
274
+ p.emit("message", { type: "success", text: e, timeout: a });
272
275
  }
273
276
  function ft(e, a) {
274
- s.emit("message", { type: "warning", text: e, timeout: a });
277
+ p.emit("message", { type: "warning", text: e, timeout: a });
275
278
  }
276
279
  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 || {});
277
280
  function oe(e, a) {
@@ -399,11 +402,11 @@ function L(e) {
399
402
  let a, t = 0;
400
403
  const l = e.split("/").filter((o) => o.trim() !== "");
401
404
  return Ee.forEach((o) => {
402
- const r = o.path.split("/").filter((c) => c.trim() !== "");
403
- let n = 0;
404
- for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
405
- n++;
406
- n > 0 && n >= t && (a = o, t = n);
405
+ const n = o.path.split("/").filter((c) => c.trim() !== "");
406
+ let r = 0;
407
+ for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
408
+ r++;
409
+ r > 0 && r >= t && (a = o, t = r);
407
410
  }), a;
408
411
  }
409
412
  const J = i("");
@@ -417,8 +420,8 @@ function D(e, a) {
417
420
  }
418
421
  if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
419
422
  return;
420
- const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
421
- r ? n ? J.value = "" : (J.value = c ? "inner-left" : "inner-right", Ae(l.app)) : (J.value = "", je(l.app, c));
423
+ const n = l.app === o.app, r = l.path === o.path, c = l.level >= o.level;
424
+ n ? r ? J.value = "" : (J.value = c ? "inner-left" : "inner-right", Ae(l.app)) : (J.value = "", je(l.app, c));
422
425
  }
423
426
  function Me() {
424
427
  return !!B.get("accessToken");
@@ -427,95 +430,95 @@ function Ue() {
427
430
  return !!B.get("activeOrg");
428
431
  }
429
432
  function gt(e, a, t) {
430
- const l = Me(), o = Ue(), r = L(e.path);
431
- if (!r) {
433
+ const l = Me(), o = Ue(), n = L(e.path);
434
+ if (!n) {
432
435
  t();
433
436
  return;
434
437
  }
435
- if (r.requiredState === "auth")
438
+ if (n.requiredState === "auth")
436
439
  if (l)
437
440
  if (o) {
438
- const n = "/main";
439
- D(n, a.path), t({ path: n });
441
+ const r = "/main";
442
+ D(r, a.path), t({ path: r });
440
443
  } else
441
444
  D(e.path, a.path), t();
442
445
  else {
443
- const n = "/passport/login";
444
- D(n, a.path), t({ path: n });
446
+ const r = "/passport/login";
447
+ D(r, a.path), t({ path: r });
445
448
  }
446
- else if (r.requiredState === "org")
449
+ else if (n.requiredState === "org")
447
450
  if (l)
448
451
  if (o)
449
452
  D(e.path, a.path), t();
450
453
  else {
451
- const n = "/org/joinOrCreate";
452
- D(n, a.path), t({ path: n });
454
+ const r = "/org/joinOrCreate";
455
+ D(r, a.path), t({ path: r });
453
456
  }
454
457
  else {
455
- const n = "/passport/login";
456
- D(n, a.path), t({ path: n });
458
+ const r = "/passport/login";
459
+ D(r, a.path), t({ path: r });
457
460
  }
458
461
  else if (l)
459
462
  if (o) {
460
- const n = "/main";
461
- D(n, a.path), t({ path: n });
463
+ const r = "/main";
464
+ D(r, a.path), t({ path: r });
462
465
  } else {
463
- const n = "/org/joinOrCreate";
464
- D(n, a.path), t({ path: n });
466
+ const r = "/org/joinOrCreate";
467
+ D(r, a.path), t({ path: r });
465
468
  }
466
469
  else
467
470
  D(e.path, a.path), t();
468
471
  }
469
472
  function ee(e, a) {
470
- const t = re(), l = f({
473
+ const t = ne(), l = f({
471
474
  get() {
472
475
  return t.hasView(e);
473
476
  },
474
- set(r) {
475
- r ? t.addView(e) : t.delView(e);
477
+ set(n) {
478
+ n ? t.addView(e) : t.delView(e);
476
479
  }
477
- }), o = (r) => {
478
- a == null || a(r), l.value = !0;
480
+ }), o = (n) => {
481
+ a == null || a(n), l.value = !0;
479
482
  };
480
483
  return S(() => {
481
- s.on(e, o);
484
+ p.on(e, o);
482
485
  }), O(() => {
483
- s.off(e, o);
486
+ p.off(e, o);
484
487
  }), { open: l };
485
488
  }
486
489
  const $e = /* @__PURE__ */ M({
487
490
  __name: "index",
488
491
  setup(e) {
489
- const a = Y(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = f(() => {
492
+ const a = Y(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), n = i(), r = i(), c = f(() => {
490
493
  var u;
491
- return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
492
- }), p = f(() => {
494
+ return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
495
+ }), s = f(() => {
493
496
  var u;
494
- return ((u = r.value) == null ? void 0 : u.text) ?? a.t("cancel");
497
+ return ((u = n.value) == null ? void 0 : u.text) ?? a.t("cancel");
495
498
  }), _ = f(() => {
496
499
  var u;
497
- return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
500
+ return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
498
501
  }), v = f(() => {
499
502
  var u;
500
- return ((u = n.value) == null ? void 0 : u.text) ?? a.t("confirm");
503
+ return ((u = r.value) == null ? void 0 : u.text) ?? a.t("confirm");
501
504
  });
502
- let x = 0, C = !1;
505
+ let y = 0, C = !1;
503
506
  const T = (u) => {
504
- l.value = u.title, o.value = u.text, r.value = u.cancel, n.value = u.confirm, x = u.seq, C = !1, t.value = !0;
507
+ l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, y = u.seq, C = !1, t.value = !0;
505
508
  };
506
509
  S(() => {
507
- s.on("confirmDlg", T);
510
+ p.on("confirmDlg", T);
508
511
  }), O(() => {
509
- s.off("confirmDlg", T);
512
+ p.off("confirmDlg", T);
510
513
  });
511
514
  const j = () => {
512
- t.value = !1, C || (s.emit("confirmDlgResult" + x, !0), C = !0);
515
+ t.value = !1, C || (p.emit("confirmDlgResult" + y, !0), C = !0);
513
516
  };
514
517
  return N(t, (u) => {
515
- !u && !C && (s.emit("confirmDlgResult" + x, !1), C = !0);
518
+ !u && !C && (p.emit("confirmDlgResult" + y, !1), C = !0);
516
519
  }), (u, g) => {
517
- const b = h("v-card-text"), V = h("v-btn"), q = h("v-card-actions"), d = h("v-card"), y = h("v-dialog");
518
- return R(), E(y, {
520
+ const b = h("v-card-text"), V = h("v-btn"), q = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
521
+ return R(), E(x, {
519
522
  modelValue: z(t),
520
523
  "onUpdate:modelValue": g[1] || (g[1] = (U) => Q(t) ? t.value = U : null),
521
524
  onKeydown: [
@@ -542,7 +545,7 @@ const $e = /* @__PURE__ */ M({
542
545
  variant: "text"
543
546
  }, {
544
547
  default: w(() => [
545
- I(A(p.value), 1)
548
+ I(A(s.value), 1)
546
549
  ]),
547
550
  _: 1
548
551
  }, 8, ["color"]),
@@ -595,17 +598,17 @@ const $e = /* @__PURE__ */ M({
595
598
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
596
599
  zIndex: t.zIndex
597
600
  }));
598
- return (o, r) => (R(), X("div", {
601
+ return (o, n) => (R(), X("div", {
599
602
  class: "x-cont",
600
603
  style: ge(l.value)
601
604
  }, We, 4));
602
605
  }
603
- }), pe = (e, a) => {
606
+ }), se = (e, a) => {
604
607
  const t = e.__vccOpts || e;
605
608
  for (const [l, o] of a)
606
609
  t[l] = o;
607
610
  return t;
608
- }, Fe = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
611
+ }, Fe = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
609
612
  __name: "item",
610
613
  props: {
611
614
  id: {},
@@ -620,21 +623,21 @@ const $e = /* @__PURE__ */ M({
620
623
  setTimeout(() => {
621
624
  o("timeout", t.id);
622
625
  }, t.timeout);
623
- }), N(l, (r) => {
624
- r || o("timeout", t.id);
625
- }), (r, n) => {
626
+ }), N(l, (n) => {
627
+ n || o("timeout", t.id);
628
+ }), (n, r) => {
626
629
  const c = h("v-alert");
627
630
  return R(), E(c, {
628
631
  modelValue: l.value,
629
- "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
632
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
630
633
  class: "mt-2",
631
634
  "max-width": "90%",
632
635
  width: "500px",
633
636
  elevation: "1",
634
637
  density: "compact",
635
638
  closable: "",
636
- type: r.type,
637
- text: r.text
639
+ type: n.type,
640
+ text: n.text
638
641
  }, null, 8, ["modelValue", "type", "text"]);
639
642
  };
640
643
  }
@@ -643,29 +646,29 @@ const $e = /* @__PURE__ */ M({
643
646
  setup(e) {
644
647
  const a = he({ items: [] });
645
648
  S(() => {
646
- s.on("message", t);
649
+ p.on("message", t);
647
650
  }), O(() => {
648
- s.off("message", t);
651
+ p.off("message", t);
649
652
  });
650
653
  const t = (c) => {
651
- r(c.type, c.text, c.timeout);
654
+ n(c.type, c.text, c.timeout);
652
655
  }, l = (c) => {
653
- n(c);
656
+ r(c);
654
657
  };
655
658
  let o = 0;
656
- const r = (c, p, _) => {
659
+ const n = (c, s, _) => {
657
660
  const v = o++;
658
- a.items.push({ id: v, type: c, text: p, timeout: _ });
659
- }, n = (c) => {
660
- const p = a.items.findIndex((_) => _.id === c);
661
- p >= 0 && a.items.splice(p, 1);
661
+ a.items.push({ id: v, type: c, text: s, timeout: _ });
662
+ }, r = (c) => {
663
+ const s = a.items.findIndex((_) => _.id === c);
664
+ s >= 0 && a.items.splice(s, 1);
662
665
  };
663
- return (c, p) => (R(), X("div", {
664
- onClick: p[0] || (p[0] = K(() => {
666
+ return (c, s) => (R(), X("div", {
667
+ onClick: s[0] || (s[0] = K(() => {
665
668
  }, ["stop"])),
666
669
  class: "x-cont d-flex flex-column-reverse align-center"
667
670
  }, [
668
- (R(!0), X(we, null, ye(a.items, (_) => (R(), E(Ne, {
671
+ (R(!0), X(we, null, xe(a.items, (_) => (R(), E(Ne, {
669
672
  onTimeout: l,
670
673
  id: _.id,
671
674
  type: _.type,
@@ -675,10 +678,10 @@ const $e = /* @__PURE__ */ M({
675
678
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
676
679
  ]));
677
680
  }
678
- }), Je = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ M({
681
+ }), Je = /* @__PURE__ */ se(He, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ M({
679
682
  __name: "index",
680
683
  setup(e) {
681
- const a = Y(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), _ = i(), v = i(), x = f(() => {
684
+ const a = Y(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), n = i(), r = i(), c = i(), s = i(""), _ = i(), v = i(), y = f(() => {
682
685
  var d;
683
686
  return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
684
687
  }), C = f(() => {
@@ -693,26 +696,26 @@ const $e = /* @__PURE__ */ M({
693
696
  }), u = i();
694
697
  let g = 0, b = !1;
695
698
  const V = async (d) => {
696
- var y;
697
- l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.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), (y = u.value) == null || y.focus();
699
+ var x;
700
+ 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();
698
701
  };
699
702
  S(() => {
700
- s.on("promptDlg", V);
703
+ p.on("promptDlg", V);
701
704
  }), O(() => {
702
- s.off("promptDlg", V);
705
+ p.off("promptDlg", V);
703
706
  });
704
707
  const q = () => {
705
- t.value = !1, b || (s.emit("promptDlgResult" + g, p.value ?? ""), b = !0);
708
+ t.value = !1, b || (p.emit("promptDlgResult" + g, s.value ?? ""), b = !0);
706
709
  };
707
710
  return N(t, (d) => {
708
- !d && !b && (s.emit("promptDlgResult" + g, void 0), b = !0);
709
- }), (d, y) => {
710
- const U = h("v-card-text"), se = 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");
711
+ !d && !b && (p.emit("promptDlgResult" + g, void 0), b = !0);
712
+ }), (d, x) => {
713
+ const U = 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");
711
714
  return R(), E(fe, {
712
715
  modelValue: z(t),
713
- "onUpdate:modelValue": y[2] || (y[2] = ($) => Q(t) ? t.value = $ : null),
716
+ "onUpdate:modelValue": x[2] || (x[2] = ($) => Q(t) ? t.value = $ : null),
714
717
  onKeydown: [
715
- y[3] || (y[3] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
718
+ x[3] || (x[3] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
716
719
  F(K(q, ["stop", "prevent"]), ["enter"])
717
720
  ],
718
721
  transition: "dialog-top-transition",
@@ -726,14 +729,14 @@ const $e = /* @__PURE__ */ M({
726
729
  I(A(o.value), 1)
727
730
  ]),
728
731
  _: 1
729
- })) : xe("", !0),
732
+ })) : ye("", !0),
730
733
  k(_e, { class: "mx-3" }, {
731
734
  default: w(() => [
732
- k(se, {
733
- modelValue: p.value,
734
- "onUpdate:modelValue": y[0] || (y[0] = ($) => p.value = $),
735
- label: r.value,
736
- placeholder: n.value,
735
+ k(pe, {
736
+ modelValue: s.value,
737
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => s.value = $),
738
+ label: n.value,
739
+ placeholder: r.value,
737
740
  rules: c.value,
738
741
  ref_key: "target",
739
742
  ref: u
@@ -744,8 +747,8 @@ const $e = /* @__PURE__ */ M({
744
747
  k(de, { class: "d-flex justify-end" }, {
745
748
  default: w(() => [
746
749
  k(te, {
747
- onClick: y[1] || (y[1] = ($) => t.value = !1),
748
- color: x.value,
750
+ onClick: x[1] || (x[1] = ($) => t.value = !1),
751
+ color: y.value,
749
752
  variant: "text"
750
753
  }, {
751
754
  default: w(() => [
@@ -783,14 +786,14 @@ const $e = /* @__PURE__ */ M({
783
786
  t.value = !1;
784
787
  };
785
788
  return S(() => {
786
- s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
789
+ p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
787
790
  }), O(() => {
788
- s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
789
- }), (r, n) => {
790
- const c = h("v-card"), p = h("v-dialog");
791
- return R(), E(p, {
791
+ p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
792
+ }), (n, r) => {
793
+ const c = h("v-card"), s = h("v-dialog");
794
+ return R(), E(s, {
792
795
  modelValue: z(t),
793
- "onUpdate:modelValue": n[0] || (n[0] = (_) => Q(t) ? t.value = _ : null),
796
+ "onUpdate:modelValue": r[0] || (r[0] = (_) => Q(t) ? t.value = _ : null),
794
797
  persistent: "",
795
798
  "no-click-animation": "",
796
799
  fullscreen: ""
@@ -819,14 +822,14 @@ const $e = /* @__PURE__ */ M({
819
822
  e.component("x-confirm-dlg", $e), e.component("x-loading", Fe), e.component("x-message", Je), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Ye);
820
823
  };
821
824
  function vt() {
822
- 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"), r = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
825
+ 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");
823
826
  return {
824
827
  primaryColor: a,
825
828
  secondaryColor: t,
826
829
  backgroundColor0: l,
827
830
  backgroundColor1: o,
828
- backgroundColor2: r,
829
- highlightColor: n,
831
+ backgroundColor2: n,
832
+ highlightColor: r,
830
833
  borderColor: c
831
834
  };
832
835
  }
@@ -834,17 +837,16 @@ function Pe(e, a) {
834
837
  return e.post("pullPermission", a);
835
838
  }
836
839
  function mt(e, a) {
837
- const t = Ce(), l = ne(), o = Z(), r = re();
838
- o.$hydrate();
839
- let n = !0;
840
+ const t = Ce(), l = re(), o = Z(), n = ne();
841
+ let r = !0;
840
842
  const c = () => {
841
- n = !1;
842
- }, p = () => {
843
- n = !0;
843
+ r = !1;
844
+ }, s = () => {
845
+ r = !0;
844
846
  }, _ = () => {
845
847
  var g;
846
- if (!r.isEmpty()) {
847
- r.hasView("waitDlg") || r.popView();
848
+ if (!n.isEmpty()) {
849
+ n.hasView("waitDlg") || n.popView();
848
850
  return;
849
851
  }
850
852
  const u = L(t.path);
@@ -856,9 +858,9 @@ function mt(e, a) {
856
858
  ) : l.back();
857
859
  };
858
860
  S(() => {
859
- s.on("pause", c), s.on("resume", p), s.on("backbutton", _);
861
+ p.on("pause", c), p.on("resume", s), p.on("backbutton", _);
860
862
  }), O(() => {
861
- s.off("pause", c), s.off("resume", p), s.off("backbutton", _);
863
+ p.off("pause", c), p.off("resume", s), p.off("backbutton", _);
862
864
  });
863
865
  const v = (u) => {
864
866
  if (u.key === "Escape") {
@@ -879,9 +881,9 @@ function mt(e, a) {
879
881
  }), O(() => {
880
882
  window.removeEventListener("keydown", v);
881
883
  });
882
- let x;
884
+ let y;
883
885
  const C = async () => {
884
- if (!n)
886
+ if (!r)
885
887
  return;
886
888
  const u = L(t.path);
887
889
  if (!(!u || u.requiredState !== "org"))
@@ -903,11 +905,11 @@ function mt(e, a) {
903
905
  console.error(g);
904
906
  }
905
907
  }, T = async (u) => {
906
- u && await C(), clearTimeout(x), x = setTimeout(async () => {
907
- await C(), x && T();
908
+ u && await C(), clearTimeout(y), y = setTimeout(async () => {
909
+ await C(), y && T();
908
910
  }, 3e3);
909
911
  }, j = () => {
910
- clearTimeout(x), x = void 0;
912
+ clearTimeout(y), y = void 0;
911
913
  };
912
914
  S(() => {
913
915
  a && T(!0);
@@ -927,15 +929,15 @@ function wt() {
927
929
  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");
928
930
  return { dark: t, sysBarAvail: l, compactWidth: o };
929
931
  }
930
- const yt = { install: Ze };
932
+ const xt = { install: Ze };
931
933
  export {
932
934
  Be as Permission,
933
935
  je as appAppear,
934
936
  Ae as clearAppAppear,
935
- st as closeWaitDlg,
936
- nt as createAxios,
937
- yt as default,
938
- s as eventBus,
937
+ pt as closeWaitDlg,
938
+ rt as createAxios,
939
+ xt as default,
940
+ p as eventBus,
939
941
  oe as isExist,
940
942
  L as matchRouteMeta,
941
943
  _t as messageError,
@@ -945,15 +947,15 @@ export {
945
947
  gt as onBeforeEach,
946
948
  ct as openConfirmDlg,
947
949
  ut as openPromptDlg,
948
- pt as openWaitDlg,
950
+ st as openWaitDlg,
949
951
  J as routeTransName,
950
952
  vt as useColor,
951
953
  Z as useGlobalStore,
952
954
  mt as useMicroApp,
953
955
  ht as usePermission,
954
956
  wt as useSystem,
955
- re as useViewMgrStore,
957
+ ne as useViewMgrStore,
956
958
  ee as useViewStack,
957
- rt as waitMs,
959
+ nt as waitMs,
958
960
  P as waitUtil
959
961
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.57",
4
+ "version": "0.5.59",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",