x-essential-lib 0.5.27 → 0.5.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
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 V, createBlock as E, unref as z, isRef as G, withKeys as L, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as I, toDisplayString as j, createElementBlock as J, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
2
+ import { ref as f, watch as N, computed as i, onMounted as S, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as V, createBlock as E, unref as z, isRef as G, withKeys as L, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as I, toDisplayString as j, createElementBlock as J, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as xe, renderList as ye, createCommentVNode as ke } from "vue";
3
3
  import { useTheme as H, useLocale as Q, useDisplay as be } from "vuetify";
4
4
  import { defineStore as re } from "pinia";
5
5
  import Ce from "axios";
@@ -7,7 +7,7 @@ import { useRouter as ne, useRoute as De } from "vue-router";
7
7
  const Y = re(
8
8
  "global",
9
9
  () => {
10
- const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), n = i("/");
10
+ const e = H(), a = f(), t = f("en"), l = f({}), o = f(""), n = f("/");
11
11
  return N(
12
12
  a,
13
13
  () => {
@@ -35,23 +35,23 @@ const Y = re(
35
35
  ]
36
36
  }
37
37
  ), ce = re("viewMgr", () => {
38
- const e = i([]);
38
+ const e = f([]);
39
39
  function a() {
40
40
  return e.value.length <= 0;
41
41
  }
42
42
  function t() {
43
- const s = e.value.length;
44
- if (s > 0)
45
- return e.value[s - 1];
43
+ const p = e.value.length;
44
+ if (p > 0)
45
+ return e.value[p - 1];
46
46
  }
47
- function l(s) {
48
- return e.value.find((_) => _ === s) !== void 0;
47
+ function l(p) {
48
+ return e.value.find((_) => _ === p) !== void 0;
49
49
  }
50
- function o(s) {
51
- e.value.push(s);
50
+ function o(p) {
51
+ e.value.push(p);
52
52
  }
53
- function n(s) {
54
- const _ = e.value.findIndex((v) => v === s);
53
+ function n(p) {
54
+ const _ = e.value.findIndex((v) => v === p);
55
55
  _ !== -1 && e.value.splice(_, e.value.length - _);
56
56
  }
57
57
  function r() {
@@ -96,17 +96,17 @@ function X(e, a) {
96
96
  if (!(typeof document > "u")) {
97
97
  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);
98
98
  var c = "";
99
- for (var s in r)
100
- r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
99
+ for (var p in r)
100
+ r[p] && (c += "; " + p, r[p] !== !0 && (c += "=" + r[p].split(";")[0]));
101
101
  return document.cookie = o + "=" + e.write(n, o) + c;
102
102
  }
103
103
  }
104
104
  function l(o) {
105
105
  if (!(typeof document > "u" || arguments.length && !o)) {
106
106
  for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
107
- var s = n[c].split("="), _ = s.slice(1).join("=");
107
+ var p = n[c].split("="), _ = p.slice(1).join("=");
108
108
  try {
109
- var v = decodeURIComponent(s[0]);
109
+ var v = decodeURIComponent(p[0]);
110
110
  if (r[v] = e.read(_, v), o === v)
111
111
  break;
112
112
  } catch {
@@ -197,7 +197,7 @@ function je(e) {
197
197
  });
198
198
  } };
199
199
  }
200
- const p = function() {
200
+ const s = function() {
201
201
  return window.eventBus || (window.eventBus = je()), window.eventBus;
202
202
  }();
203
203
  async function rt(e) {
@@ -221,7 +221,7 @@ function nt(e) {
221
221
  return;
222
222
  }
223
223
  const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
224
- t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
224
+ t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-right") : t.add("app-left"), setTimeout(() => {
225
225
  t.add("app-reset");
226
226
  }, 0));
227
227
  }
@@ -231,7 +231,7 @@ function ue() {
231
231
  return e - te > 500 ? (te = e, !0) : !1;
232
232
  }
233
233
  let Ae = 0;
234
- function se() {
234
+ function pe() {
235
235
  return ++Ae;
236
236
  }
237
237
  async function ct(e) {
@@ -240,8 +240,8 @@ async function ct(e) {
240
240
  let a = !1, t;
241
241
  const l = (n) => {
242
242
  t = n, a = !0;
243
- }, o = se();
244
- return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await Z(() => a), p.off("confirmDlgResult" + o, l), t;
243
+ }, o = pe();
244
+ return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await Z(() => a), s.off("confirmDlgResult" + o, l), t;
245
245
  }
246
246
  async function ut(e) {
247
247
  if (!ue())
@@ -249,26 +249,26 @@ async function ut(e) {
249
249
  let a = !1, t;
250
250
  const l = (n) => {
251
251
  t = n, a = !0;
252
- }, o = se();
253
- return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await Z(() => a), p.off("promptDlgResult" + o, l), t;
254
- }
255
- function st() {
256
- p.emit("openWaitDlg");
252
+ }, o = pe();
253
+ return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await Z(() => a), s.off("promptDlgResult" + o, l), t;
257
254
  }
258
255
  function pt() {
259
- p.emit("closeWaitDlg");
256
+ s.emit("openWaitDlg");
257
+ }
258
+ function st() {
259
+ s.emit("closeWaitDlg");
260
260
  }
261
261
  function _t(e, a) {
262
- p.emit("message", { type: "error", text: e, timeout: a });
262
+ s.emit("message", { type: "error", text: e, timeout: a });
263
263
  }
264
264
  function dt(e, a) {
265
- p.emit("message", { type: "info", text: e, timeout: a });
266
- }
267
- function it(e, a) {
268
- p.emit("message", { type: "success", text: e, timeout: a });
265
+ s.emit("message", { type: "info", text: e, timeout: a });
269
266
  }
270
267
  function ft(e, a) {
271
- p.emit("message", { type: "warning", text: e, timeout: a });
268
+ s.emit("message", { type: "success", text: e, timeout: a });
269
+ }
270
+ function it(e, a) {
271
+ s.emit("message", { type: "warning", text: e, timeout: a });
272
272
  }
273
273
  var Ie = /* @__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))(Ie || {});
274
274
  function ae(e, a) {
@@ -285,23 +285,23 @@ function ae(e, a) {
285
285
  }), Object.keys(t).length <= 0);
286
286
  }
287
287
  const Be = [
288
- { path: "/passport/login", level: 0 },
289
- { path: "/passport/loginAccount", level: 1 },
290
- { path: "/passport/register", level: 1 },
291
- { path: "/org/joinOrCreate", level: 1, requiredState: "auth" },
292
- { path: "/org/manager", level: 1, requiredState: "org", mainActive: 2 },
293
- { path: "/main", level: 0, requiredState: "org" },
294
- { path: "/mine/personalInfo", level: 1, requiredState: "org", mainActive: 4 },
295
- { path: "/mine/accountSecurity", level: 2, requiredState: "org" },
296
- { path: "/mine/settings", level: 1, requiredState: "org", mainActive: 4 },
297
- { path: "/mine/general", level: 2, requiredState: "org" },
298
- { path: "/mine/general/darkMode", level: 3, requiredState: "org" },
299
- { path: "/mine/general/language", level: 3, requiredState: "org" },
300
- { path: "/app/manager", level: 1, requiredState: "org", mainActive: 2 },
301
- { path: "/app/editor", level: 2, requiredState: "org" },
302
- { path: "/asset", level: 1, requiredState: "org", mainActive: 2 },
303
- { path: "/calc", level: 1, requiredState: "org", mainActive: 2 },
304
- { path: "/data", level: 1, requiredState: "org", mainActive: 2 }
288
+ { app: "x-passport-mf", path: "/passport/login", level: 0 },
289
+ { app: "x-passport-mf", path: "/passport/loginAccount", level: 1 },
290
+ { app: "x-passport-mf", path: "/passport/register", level: 1 },
291
+ { app: "x-org-mf", path: "/org/joinOrCreate", level: 1, requiredState: "auth" },
292
+ { app: "x-org-mf", path: "/org/manager", level: 1, requiredState: "org", mainActive: 2 },
293
+ { app: "x-main-mf", path: "/main", level: 0, requiredState: "org" },
294
+ { app: "x-mine-mf", path: "/mine/personalInfo", level: 1, requiredState: "org", mainActive: 4 },
295
+ { app: "x-mine-mf", path: "/mine/accountSecurity", level: 2, requiredState: "org" },
296
+ { app: "x-mine-mf", path: "/mine/settings", level: 1, requiredState: "org", mainActive: 4 },
297
+ { app: "x-mine-mf", path: "/mine/general", level: 2, requiredState: "org" },
298
+ { app: "x-mine-mf", path: "/mine/general/darkMode", level: 3, requiredState: "org" },
299
+ { app: "x-mine-mf", path: "/mine/general/language", level: 3, requiredState: "org" },
300
+ { app: "x-app-mf", path: "/app/manager", level: 1, requiredState: "org", mainActive: 2 },
301
+ { app: "x-app-mf", path: "/app/editor", level: 2, requiredState: "org" },
302
+ { app: "x-asset-mf", path: "/asset", level: 1, requiredState: "org", mainActive: 2 },
303
+ { app: "x-calc-mf", path: "/calc", level: 1, requiredState: "org", mainActive: 2 },
304
+ { app: "x-data-mf", path: "/data", level: 1, requiredState: "org", mainActive: 2 }
305
305
  ];
306
306
  function F(e) {
307
307
  let a, t = 0;
@@ -323,7 +323,7 @@ function oe(e) {
323
323
  const l = e.split("/");
324
324
  return console.assert(l.length >= 2), { app: l[1], path: t.path, level: t.level };
325
325
  }
326
- const le = i("");
326
+ const le = f("");
327
327
  function D(e, a) {
328
328
  const t = oe(e), l = oe(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
329
329
  console.info(
@@ -377,7 +377,7 @@ function gt(e, a, t) {
377
377
  D(e.path, a.path), t();
378
378
  }
379
379
  function P(e, a) {
380
- const t = ce(), l = f({
380
+ const t = ce(), l = i({
381
381
  get() {
382
382
  return t.hasView(e);
383
383
  },
@@ -388,44 +388,44 @@ function P(e, a) {
388
388
  a == null || a(n), l.value = !0;
389
389
  };
390
390
  return S(() => {
391
- p.on(e, o);
391
+ s.on(e, o);
392
392
  }), O(() => {
393
- p.off(e, o);
393
+ s.off(e, o);
394
394
  }), { open: l };
395
395
  }
396
396
  const Ue = /* @__PURE__ */ M({
397
397
  __name: "index",
398
398
  setup(e) {
399
- const a = Q(), { open: t } = P("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), c = f(() => {
399
+ const a = Q(), { open: t } = P("confirmDlg"), l = f(""), o = f(""), n = f(), r = f(), c = i(() => {
400
400
  var u;
401
401
  return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
402
- }), s = f(() => {
402
+ }), p = i(() => {
403
403
  var u;
404
404
  return ((u = n.value) == null ? void 0 : u.text) ?? a.t("cancel");
405
- }), _ = f(() => {
405
+ }), _ = i(() => {
406
406
  var u;
407
407
  return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
408
- }), v = f(() => {
408
+ }), v = i(() => {
409
409
  var u;
410
410
  return ((u = r.value) == null ? void 0 : u.text) ?? a.t("confirm");
411
411
  });
412
- let x = 0, C = !1;
412
+ let y = 0, C = !1;
413
413
  const T = (u) => {
414
- l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, x = u.seq, C = !1, t.value = !0;
414
+ l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, y = u.seq, C = !1, t.value = !0;
415
415
  };
416
416
  S(() => {
417
- p.on("confirmDlg", T);
417
+ s.on("confirmDlg", T);
418
418
  }), O(() => {
419
- p.off("confirmDlg", T);
419
+ s.off("confirmDlg", T);
420
420
  });
421
421
  const A = () => {
422
- t.value = !1, C || (p.emit("confirmDlgResult" + x, !0), C = !0);
422
+ t.value = !1, C || (s.emit("confirmDlgResult" + y, !0), C = !0);
423
423
  };
424
424
  return N(t, (u) => {
425
- !u && !C && (p.emit("confirmDlgResult" + x, !1), C = !0);
425
+ !u && !C && (s.emit("confirmDlgResult" + y, !1), C = !0);
426
426
  }), (u, g) => {
427
- const b = h("v-card-text"), q = h("v-btn"), R = h("v-card-actions"), d = h("v-card"), y = h("v-dialog");
428
- return V(), E(y, {
427
+ const b = h("v-card-text"), q = h("v-btn"), R = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
428
+ return V(), E(x, {
429
429
  modelValue: z(t),
430
430
  "onUpdate:modelValue": g[1] || (g[1] = (U) => G(t) ? t.value = U : null),
431
431
  onKeydown: [
@@ -452,7 +452,7 @@ const Ue = /* @__PURE__ */ M({
452
452
  variant: "text"
453
453
  }, {
454
454
  default: w(() => [
455
- I(j(s.value), 1)
455
+ I(j(p.value), 1)
456
456
  ]),
457
457
  _: 1
458
458
  }, 8, ["color"]),
@@ -501,7 +501,7 @@ const Ue = /* @__PURE__ */ M({
501
501
  }
502
502
  },
503
503
  setup(e) {
504
- const a = H(), t = e, l = f(() => ({
504
+ const a = H(), t = e, l = i(() => ({
505
505
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
506
506
  zIndex: t.zIndex
507
507
  }));
@@ -510,12 +510,12 @@ const Ue = /* @__PURE__ */ M({
510
510
  style: ve(l.value)
511
511
  }, We, 4));
512
512
  }
513
- }), pe = (e, a) => {
513
+ }), se = (e, a) => {
514
514
  const t = e.__vccOpts || e;
515
515
  for (const [l, o] of a)
516
516
  t[l] = o;
517
517
  return t;
518
- }, Le = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Fe = /* @__PURE__ */ M({
518
+ }, Le = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Fe = /* @__PURE__ */ M({
519
519
  __name: "item",
520
520
  props: {
521
521
  id: {},
@@ -525,7 +525,7 @@ const Ue = /* @__PURE__ */ M({
525
525
  },
526
526
  emits: ["timeout"],
527
527
  setup(e, { emit: a }) {
528
- const t = e, l = i(!0), o = a;
528
+ const t = e, l = f(!0), o = a;
529
529
  return S(() => {
530
530
  setTimeout(() => {
531
531
  o("timeout", t.id);
@@ -536,7 +536,7 @@ const Ue = /* @__PURE__ */ M({
536
536
  const c = h("v-alert");
537
537
  return V(), E(c, {
538
538
  modelValue: l.value,
539
- "onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
539
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => l.value = p),
540
540
  class: "mt-2",
541
541
  "max-width": "90%",
542
542
  width: "500px",
@@ -553,9 +553,9 @@ const Ue = /* @__PURE__ */ M({
553
553
  setup(e) {
554
554
  const a = we({ items: [] });
555
555
  S(() => {
556
- p.on("message", t);
556
+ s.on("message", t);
557
557
  }), O(() => {
558
- p.off("message", t);
558
+ s.off("message", t);
559
559
  });
560
560
  const t = (c) => {
561
561
  n(c.type, c.text, c.timeout);
@@ -563,19 +563,19 @@ const Ue = /* @__PURE__ */ M({
563
563
  r(c);
564
564
  };
565
565
  let o = 0;
566
- const n = (c, s, _) => {
566
+ const n = (c, p, _) => {
567
567
  const v = o++;
568
- a.items.push({ id: v, type: c, text: s, timeout: _ });
568
+ a.items.push({ id: v, type: c, text: p, timeout: _ });
569
569
  }, r = (c) => {
570
- const s = a.items.findIndex((_) => _.id === c);
571
- s >= 0 && a.items.splice(s, 1);
570
+ const p = a.items.findIndex((_) => _.id === c);
571
+ p >= 0 && a.items.splice(p, 1);
572
572
  };
573
- return (c, s) => (V(), J("div", {
574
- onClick: s[0] || (s[0] = K(() => {
573
+ return (c, p) => (V(), J("div", {
574
+ onClick: p[0] || (p[0] = K(() => {
575
575
  }, ["stop"])),
576
576
  class: "x-cont d-flex flex-column-reverse align-center"
577
577
  }, [
578
- (V(!0), J(ye, null, xe(a.items, (_) => (V(), E(Fe, {
578
+ (V(!0), J(xe, null, ye(a.items, (_) => (V(), E(Fe, {
579
579
  onTimeout: l,
580
580
  id: _.id,
581
581
  type: _.type,
@@ -585,51 +585,51 @@ const Ue = /* @__PURE__ */ M({
585
585
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
586
586
  ]));
587
587
  }
588
- }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ M({
588
+ }), He = /* @__PURE__ */ se(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ M({
589
589
  __name: "index",
590
590
  setup(e) {
591
- const a = Q(), { open: t } = P("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), c = i(), s = i(""), _ = i(), v = i(), x = f(() => {
591
+ const a = Q(), { open: t } = P("promptDlg"), l = f(""), o = f(""), n = f(), r = f(), c = f(), p = f(""), _ = f(), v = f(), y = i(() => {
592
592
  var d;
593
593
  return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
594
- }), C = f(() => {
594
+ }), C = i(() => {
595
595
  var d;
596
596
  return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
597
- }), T = f(() => {
597
+ }), T = i(() => {
598
598
  var d;
599
599
  return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
600
- }), A = f(() => {
600
+ }), A = i(() => {
601
601
  var d;
602
602
  return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
603
- }), u = i();
603
+ }), u = f();
604
604
  let g = 0, b = !1;
605
605
  const q = async (d) => {
606
- var y;
607
- 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 Z(() => u.value !== void 0, 1e3), (y = u.value) == null || y.focus();
606
+ var x;
607
+ l.value = d.title, o.value = d.text, n.value = d.label, r.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 Z(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
608
608
  };
609
609
  S(() => {
610
- p.on("promptDlg", q);
610
+ s.on("promptDlg", q);
611
611
  }), O(() => {
612
- p.off("promptDlg", q);
612
+ s.off("promptDlg", q);
613
613
  });
614
614
  const R = () => {
615
- t.value = !1, b || (p.emit("promptDlgResult" + g, s.value ?? ""), b = !0);
615
+ t.value = !1, b || (s.emit("promptDlgResult" + g, p.value ?? ""), b = !0);
616
616
  };
617
617
  return N(t, (d) => {
618
- !d && !b && (p.emit("promptDlgResult" + g, void 0), b = !0);
619
- }), (d, y) => {
620
- const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), ee = h("v-btn"), ie = h("v-card-actions"), fe = h("v-card"), ge = h("v-dialog");
618
+ !d && !b && (s.emit("promptDlgResult" + g, void 0), b = !0);
619
+ }), (d, x) => {
620
+ const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), ee = h("v-btn"), fe = h("v-card-actions"), ie = h("v-card"), ge = h("v-dialog");
621
621
  return V(), E(ge, {
622
622
  modelValue: z(t),
623
- "onUpdate:modelValue": y[2] || (y[2] = ($) => G(t) ? t.value = $ : null),
623
+ "onUpdate:modelValue": x[2] || (x[2] = ($) => G(t) ? t.value = $ : null),
624
624
  onKeydown: [
625
- y[3] || (y[3] = L(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
625
+ x[3] || (x[3] = L(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
626
626
  L(K(R, ["stop", "prevent"]), ["enter"])
627
627
  ],
628
628
  transition: "dialog-top-transition",
629
629
  "max-width": "600px"
630
630
  }, {
631
631
  default: w(() => [
632
- k(fe, { title: l.value }, {
632
+ k(ie, { title: l.value }, {
633
633
  default: w(() => [
634
634
  o.value ? (V(), E(U, { key: 0 }, {
635
635
  default: w(() => [
@@ -640,8 +640,8 @@ const Ue = /* @__PURE__ */ M({
640
640
  k(de, { class: "mx-3" }, {
641
641
  default: w(() => [
642
642
  k(_e, {
643
- modelValue: s.value,
644
- "onUpdate:modelValue": y[0] || (y[0] = ($) => s.value = $),
643
+ modelValue: p.value,
644
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => p.value = $),
645
645
  label: n.value,
646
646
  placeholder: r.value,
647
647
  rules: c.value,
@@ -651,11 +651,11 @@ const Ue = /* @__PURE__ */ M({
651
651
  ]),
652
652
  _: 1
653
653
  }),
654
- k(ie, { class: "d-flex justify-end" }, {
654
+ k(fe, { class: "d-flex justify-end" }, {
655
655
  default: w(() => [
656
656
  k(ee, {
657
- onClick: y[1] || (y[1] = ($) => t.value = !1),
658
- color: x.value,
657
+ onClick: x[1] || (x[1] = ($) => t.value = !1),
658
+ color: y.value,
659
659
  variant: "text"
660
660
  }, {
661
661
  default: w(() => [
@@ -693,12 +693,12 @@ const Ue = /* @__PURE__ */ M({
693
693
  t.value = !1;
694
694
  };
695
695
  return S(() => {
696
- p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
696
+ s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
697
697
  }), O(() => {
698
- p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
698
+ s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
699
699
  }), (n, r) => {
700
- const c = h("v-card"), s = h("v-dialog");
701
- return V(), E(s, {
700
+ const c = h("v-card"), p = h("v-dialog");
701
+ return V(), E(p, {
702
702
  modelValue: z(t),
703
703
  "onUpdate:modelValue": r[0] || (r[0] = (_) => G(t) ? t.value = _ : null),
704
704
  persistent: "",
@@ -729,7 +729,7 @@ const Ue = /* @__PURE__ */ M({
729
729
  e.component("x-confirm-dlg", Ue), e.component("x-loading", Le), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
730
730
  };
731
731
  function vt() {
732
- 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");
732
+ const e = H(), a = i(() => e.global.current.value.colors.primary), t = i(() => e.global.current.value.colors.secondary), l = i(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = i(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = i(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = i(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
733
733
  return {
734
734
  primaryColor: a,
735
735
  secondaryColor: t,
@@ -748,7 +748,7 @@ function mt(e, a) {
748
748
  let r = !0;
749
749
  const c = () => {
750
750
  r = !1;
751
- }, s = () => {
751
+ }, p = () => {
752
752
  r = !0;
753
753
  }, _ = () => {
754
754
  var g;
@@ -765,9 +765,9 @@ function mt(e, a) {
765
765
  ) : l.back();
766
766
  };
767
767
  S(() => {
768
- p.on("pause", c), p.on("resume", s), p.on("backbutton", _);
768
+ s.on("pause", c), s.on("resume", p), s.on("backbutton", _);
769
769
  }), O(() => {
770
- p.off("pause", c), p.off("resume", s), p.off("backbutton", _);
770
+ s.off("pause", c), s.off("resume", p), s.off("backbutton", _);
771
771
  });
772
772
  const v = (u) => {
773
773
  if (u.key === "Escape") {
@@ -788,7 +788,7 @@ function mt(e, a) {
788
788
  }), O(() => {
789
789
  window.removeEventListener("keydown", v);
790
790
  });
791
- let x;
791
+ let y;
792
792
  const C = async () => {
793
793
  if (!r)
794
794
  return;
@@ -812,11 +812,11 @@ function mt(e, a) {
812
812
  console.error(g);
813
813
  }
814
814
  }, T = async (u) => {
815
- u && await C(), clearTimeout(x), x = setTimeout(async () => {
816
- await C(), x && T();
815
+ u && await C(), clearTimeout(y), y = setTimeout(async () => {
816
+ await C(), y && T();
817
817
  }, 3e3);
818
818
  }, A = () => {
819
- clearTimeout(x), x = void 0;
819
+ clearTimeout(y), y = void 0;
820
820
  };
821
821
  S(() => {
822
822
  a && T(!0);
@@ -833,27 +833,27 @@ function ht() {
833
833
  return { verifyPermission: a };
834
834
  }
835
835
  function wt() {
836
- const e = H(), a = be(), 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");
836
+ const e = H(), a = be(), t = i(() => e.current.value.dark), l = i(() => !!window.cordova), o = i(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
837
837
  return { dark: t, sysBarAvail: l, compactWidth: o };
838
838
  }
839
- const yt = { install: Ye };
839
+ const xt = { install: Ye };
840
840
  export {
841
841
  Ie as Permission,
842
842
  nt as appAppear,
843
- pt as closeWaitDlg,
843
+ st as closeWaitDlg,
844
844
  lt as createAxios,
845
- yt as default,
846
- p as eventBus,
845
+ xt as default,
846
+ s as eventBus,
847
847
  ae as isExist,
848
848
  F as matchRouteMeta,
849
849
  _t as messageError,
850
850
  dt as messageInfo,
851
- it as messageSuccess,
852
- ft as messageWarning,
851
+ ft as messageSuccess,
852
+ it as messageWarning,
853
853
  gt as onBeforeEach,
854
854
  ct as openConfirmDlg,
855
855
  ut as openPromptDlg,
856
- st as openWaitDlg,
856
+ pt as openWaitDlg,
857
857
  le as routeTransName,
858
858
  vt as useColor,
859
859
  Y as useGlobalStore,
@@ -1,6 +1,7 @@
1
1
  import { RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
2
2
  type RequiredState = 'auth' | 'org';
3
3
  interface RouteMeta {
4
+ app: 'x-app-mf' | 'x-asset-mf' | 'x-calc-mf' | 'x-data-mf' | 'x-main-mf' | 'x-mine-mf' | 'x-org-mf' | 'x-passport-mf';
4
5
  path: string;
5
6
  level: number;
6
7
  requiredState?: RequiredState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.27",
4
+ "version": "0.5.28",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",