x-essential-lib 0.3.12 → 0.3.13

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 +126 -126
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
2
  import { VAlert as ve, VBtn as me, VCard as he, VCardActions as we, VCardText as ye, VCardTitle as xe, VDialog as ke, VForm as be, VTextField as Ce } from "vuetify/lib/components/index.mjs";
3
- import { ref as i, computed as f, onMounted as D, onBeforeUnmount as T, defineComponent as O, watch as H, resolveComponent as g, openBlock as V, createBlock as A, unref as W, isRef as J, withKeys as N, withModifiers as $, withCtx as v, createVNode as h, createTextVNode as C, toDisplayString as b, createElementBlock as F, normalizeStyle as Ve, pushScopeId as De, popScopeId as qe, createElementVNode as m, reactive as Se, Fragment as Te, renderList as Oe } from "vue";
4
- import { useLocale as X, useTheme as K, useDisplay as Re } from "vuetify/lib/framework.mjs";
3
+ import { ref as i, computed as f, onMounted as D, onBeforeUnmount as T, defineComponent as R, watch as H, resolveComponent as g, openBlock as C, createBlock as O, unref as U, isRef as J, withKeys as W, withModifiers as A, withCtx as v, createVNode as h, createTextVNode as V, toDisplayString as b, createElementBlock as F, normalizeStyle as Ve, pushScopeId as De, popScopeId as qe, createElementVNode as m, reactive as Se, Fragment as Te, renderList as Oe, createCommentVNode as Re } from "vue";
4
+ import { useLocale as X, useTheme as K, useDisplay as je } from "vuetify/lib/framework.mjs";
5
5
  import { defineStore as oe } from "pinia";
6
- import { useRouter as re, useRoute as je } from "vue-router";
7
- import Ie from "axios";
6
+ import { useRouter as re, useRoute as Ie } from "vue-router";
7
+ import Ee from "axios";
8
8
  const ne = oe("viewMgr", () => {
9
9
  const e = i([]);
10
10
  function a() {
@@ -33,7 +33,7 @@ const ne = oe("viewMgr", () => {
33
33
  }
34
34
  return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
35
35
  });
36
- function Ee(e) {
36
+ function $e(e) {
37
37
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
38
38
  var l = e.get(a);
39
39
  l ? l.push(t) : e.set(a, [t]);
@@ -49,8 +49,8 @@ function Ee(e) {
49
49
  });
50
50
  } };
51
51
  }
52
- const _ = Ee();
53
- async function dt(e) {
52
+ const _ = $e();
53
+ async function ft(e) {
54
54
  return new Promise((a) => {
55
55
  setTimeout(a, e);
56
56
  });
@@ -81,7 +81,7 @@ function Q(e, a) {
81
81
  _.off(e, o);
82
82
  }), { open: l };
83
83
  }
84
- const $e = /* @__PURE__ */ O({
84
+ const Ae = /* @__PURE__ */ R({
85
85
  __name: "index",
86
86
  setup(e) {
87
87
  const a = X(), { open: t } = Q("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
@@ -97,9 +97,9 @@ const $e = /* @__PURE__ */ O({
97
97
  var d;
98
98
  return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
99
99
  });
100
- let R = 0, q = !1;
100
+ let j = 0, q = !1;
101
101
  const M = (d) => {
102
- l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, R = d.seq, q = !1, t.value = !0;
102
+ l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, q = !1, t.value = !0;
103
103
  };
104
104
  D(() => {
105
105
  _.on("confirmDlg", M);
@@ -107,18 +107,18 @@ const $e = /* @__PURE__ */ O({
107
107
  _.off("confirmDlg", M);
108
108
  });
109
109
  const B = () => {
110
- t.value = !1, q || (_.emit("confirmDlgResult" + R, !0), q = !0);
110
+ t.value = !1, q || (_.emit("confirmDlgResult" + j, !0), q = !0);
111
111
  };
112
112
  return H(t, (d) => {
113
- !d && !q && (_.emit("confirmDlgResult" + R, !1), q = !0);
113
+ !d && !q && (_.emit("confirmDlgResult" + j, !1), q = !0);
114
114
  }), (d, x) => {
115
- const S = g("v-card-title"), L = g("v-card-text"), j = g("v-btn"), p = g("v-card-actions"), w = g("v-card"), z = g("v-dialog");
116
- return V(), A(z, {
117
- modelValue: W(t),
118
- "onUpdate:modelValue": x[1] || (x[1] = (I) => J(t) ? t.value = I : null),
115
+ const S = g("v-card-title"), L = g("v-card-text"), I = g("v-btn"), p = g("v-card-actions"), w = g("v-card"), z = g("v-dialog");
116
+ return C(), O(z, {
117
+ modelValue: U(t),
118
+ "onUpdate:modelValue": x[1] || (x[1] = (E) => J(t) ? t.value = E : null),
119
119
  onKeydown: [
120
- x[2] || (x[2] = N($((I) => t.value = !1, ["stop", "prevent"]), ["esc"])),
121
- N($(B, ["stop", "prevent"]), ["enter"])
120
+ x[2] || (x[2] = W(A((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
121
+ W(A(B, ["stop", "prevent"]), ["enter"])
122
122
  ],
123
123
  transition: "dialog-top-transition",
124
124
  "max-width": "600px"
@@ -128,35 +128,35 @@ const $e = /* @__PURE__ */ O({
128
128
  default: v(() => [
129
129
  h(S, null, {
130
130
  default: v(() => [
131
- C(b(l.value), 1)
131
+ V(b(l.value), 1)
132
132
  ]),
133
133
  _: 1
134
134
  }),
135
135
  h(L, null, {
136
136
  default: v(() => [
137
- C(b(o.value), 1)
137
+ V(b(o.value), 1)
138
138
  ]),
139
139
  _: 1
140
140
  }),
141
141
  h(p, { class: "d-flex justify-end" }, {
142
142
  default: v(() => [
143
- h(j, {
144
- onClick: x[0] || (x[0] = (I) => t.value = !1),
143
+ h(I, {
144
+ onClick: x[0] || (x[0] = (E) => t.value = !1),
145
145
  color: u.value,
146
146
  variant: "text"
147
147
  }, {
148
148
  default: v(() => [
149
- C(b(s.value), 1)
149
+ V(b(s.value), 1)
150
150
  ]),
151
151
  _: 1
152
152
  }, 8, ["color"]),
153
- h(j, {
153
+ h(I, {
154
154
  onClick: B,
155
155
  color: c.value,
156
156
  variant: "text"
157
157
  }, {
158
158
  default: v(() => [
159
- C(b(y.value), 1)
159
+ V(b(y.value), 1)
160
160
  ]),
161
161
  _: 1
162
162
  }, 8, ["color"])
@@ -171,7 +171,7 @@ const $e = /* @__PURE__ */ O({
171
171
  }, 8, ["modelValue", "onKeydown"]);
172
172
  };
173
173
  }
174
- }), Ae = (e) => (De("data-v-a8f3d91f"), e = e(), qe(), e), Me = /* @__PURE__ */ Ae(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
174
+ }), Me = (e) => (De("data-v-a8f3d91f"), e = e(), qe(), e), Be = /* @__PURE__ */ Me(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
175
175
  /* @__PURE__ */ m("div"),
176
176
  /* @__PURE__ */ m("div"),
177
177
  /* @__PURE__ */ m("div"),
@@ -184,9 +184,9 @@ const $e = /* @__PURE__ */ O({
184
184
  /* @__PURE__ */ m("div"),
185
185
  /* @__PURE__ */ m("div"),
186
186
  /* @__PURE__ */ m("div")
187
- ], -1)), Be = [
188
- Me
189
- ], Le = /* @__PURE__ */ O({
187
+ ], -1)), Le = [
188
+ Be
189
+ ], Ne = /* @__PURE__ */ R({
190
190
  __name: "index",
191
191
  props: {
192
192
  zIndex: {
@@ -199,17 +199,17 @@ const $e = /* @__PURE__ */ O({
199
199
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
200
200
  zIndex: t.zIndex
201
201
  }));
202
- return (o, n) => (V(), F("div", {
202
+ return (o, n) => (C(), F("div", {
203
203
  class: "x-cont",
204
204
  style: Ve(l.value)
205
- }, Be, 4));
205
+ }, Le, 4));
206
206
  }
207
207
  }), ce = (e, a) => {
208
208
  const t = e.__vccOpts || e;
209
209
  for (const [l, o] of a)
210
210
  t[l] = o;
211
211
  return t;
212
- }, Ue = /* @__PURE__ */ ce(Le, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ O({
212
+ }, Ue = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ R({
213
213
  __name: "item",
214
214
  props: {
215
215
  id: {
@@ -257,7 +257,7 @@ const $e = /* @__PURE__ */ O({
257
257
  r || o("timeout", t.id);
258
258
  }), (r, u) => {
259
259
  const s = g("v-alert");
260
- return V(), A(s, {
260
+ return C(), O(s, {
261
261
  modelValue: l.value,
262
262
  "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
263
263
  class: "mt-2",
@@ -272,7 +272,7 @@ const $e = /* @__PURE__ */ O({
272
272
  }, null, 8, ["modelValue", "type", "icon", "text"]);
273
273
  };
274
274
  }
275
- }), Ne = /* @__PURE__ */ O({
275
+ }), He = /* @__PURE__ */ R({
276
276
  __name: "index",
277
277
  setup(e) {
278
278
  const a = Se({ items: [] });
@@ -294,12 +294,12 @@ const $e = /* @__PURE__ */ O({
294
294
  const s = a.items.findIndex((c) => c.id === u);
295
295
  s >= 0 && a.items.splice(s, 1);
296
296
  };
297
- return (u, s) => (V(), F("div", {
298
- onClick: s[0] || (s[0] = $(() => {
297
+ return (u, s) => (C(), F("div", {
298
+ onClick: s[0] || (s[0] = A(() => {
299
299
  }, ["stop"])),
300
300
  class: "x-cont d-flex flex-column-reverse align-center"
301
301
  }, [
302
- (V(!0), F(Te, null, Oe(a.items, (c) => (V(), A(We, {
302
+ (C(!0), F(Te, null, Oe(a.items, (c) => (C(), O(We, {
303
303
  onTimeout: l,
304
304
  id: c.id,
305
305
  type: c.type,
@@ -309,10 +309,10 @@ const $e = /* @__PURE__ */ O({
309
309
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
310
310
  ]));
311
311
  }
312
- }), He = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-70ed4b89"]]), Ke = /* @__PURE__ */ O({
312
+ }), Ke = /* @__PURE__ */ ce(He, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
313
313
  __name: "index",
314
314
  setup(e) {
315
- const a = X(), { open: t } = Q("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), y = i(), R = f(() => {
315
+ const a = X(), { open: t } = Q("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), y = i(), j = f(() => {
316
316
  var p;
317
317
  return ((p = c.value) == null ? void 0 : p.color) ?? "primary";
318
318
  }), q = f(() => {
@@ -335,19 +335,19 @@ const $e = /* @__PURE__ */ O({
335
335
  }), T(() => {
336
336
  _.off("promptDlg", L);
337
337
  });
338
- const j = () => {
338
+ const I = () => {
339
339
  t.value = !1, S || (_.emit("promptDlgResult" + x, s.value ?? ""), S = !0);
340
340
  };
341
341
  return H(t, (p) => {
342
342
  !p && !S && (_.emit("promptDlgResult" + x, void 0), S = !0);
343
343
  }), (p, w) => {
344
- const z = g("v-card-title"), I = g("v-card-text"), pe = g("v-text-field"), de = g("v-form"), P = g("v-btn"), fe = g("v-card-actions"), ie = g("v-card"), ge = g("v-dialog");
345
- return V(), A(ge, {
346
- modelValue: W(t),
347
- "onUpdate:modelValue": w[2] || (w[2] = (E) => J(t) ? t.value = E : null),
344
+ const z = g("v-card-title"), E = g("v-card-text"), pe = g("v-text-field"), de = g("v-form"), P = g("v-btn"), fe = g("v-card-actions"), ie = g("v-card"), ge = g("v-dialog");
345
+ return C(), O(ge, {
346
+ modelValue: U(t),
347
+ "onUpdate:modelValue": w[2] || (w[2] = ($) => J(t) ? t.value = $ : null),
348
348
  onKeydown: [
349
- w[3] || (w[3] = N($((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
350
- N($(j, ["stop", "prevent"]), ["enter"])
349
+ w[3] || (w[3] = W(A(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
350
+ W(A(I, ["stop", "prevent"]), ["enter"])
351
351
  ],
352
352
  transition: "dialog-top-transition",
353
353
  "max-width": "600px"
@@ -357,21 +357,21 @@ const $e = /* @__PURE__ */ O({
357
357
  default: v(() => [
358
358
  h(z, null, {
359
359
  default: v(() => [
360
- C(b(l.value), 1)
360
+ V(b(l.value), 1)
361
361
  ]),
362
362
  _: 1
363
363
  }),
364
- h(I, null, {
364
+ o.value ? (C(), O(E, { key: 0 }, {
365
365
  default: v(() => [
366
- C(b(o.value), 1)
366
+ V(b(o.value), 1)
367
367
  ]),
368
368
  _: 1
369
- }),
369
+ })) : Re("", !0),
370
370
  h(de, { class: "mx-3" }, {
371
371
  default: v(() => [
372
372
  h(pe, {
373
373
  modelValue: s.value,
374
- "onUpdate:modelValue": w[0] || (w[0] = (E) => s.value = E),
374
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
375
375
  label: n.value,
376
376
  placeholder: r.value,
377
377
  rules: u.value,
@@ -384,22 +384,22 @@ const $e = /* @__PURE__ */ O({
384
384
  h(fe, { class: "d-flex justify-end" }, {
385
385
  default: v(() => [
386
386
  h(P, {
387
- onClick: w[1] || (w[1] = (E) => t.value = !1),
388
- color: R.value,
387
+ onClick: w[1] || (w[1] = ($) => t.value = !1),
388
+ color: j.value,
389
389
  variant: "text"
390
390
  }, {
391
391
  default: v(() => [
392
- C(b(q.value), 1)
392
+ V(b(q.value), 1)
393
393
  ]),
394
394
  _: 1
395
395
  }, 8, ["color"]),
396
396
  h(P, {
397
- onClick: j,
397
+ onClick: I,
398
398
  color: M.value,
399
399
  variant: "text"
400
400
  }, {
401
401
  default: v(() => [
402
- C(b(B.value), 1)
402
+ V(b(B.value), 1)
403
403
  ]),
404
404
  _: 1
405
405
  }, 8, ["color"])
@@ -414,7 +414,7 @@ const $e = /* @__PURE__ */ O({
414
414
  }, 8, ["modelValue", "onKeydown"]);
415
415
  };
416
416
  }
417
- }), ze = { class: "mx-auto my-auto" }, Fe = { class: "d-flex align-center justify-center w-100 h-100" }, Je = /* @__PURE__ */ O({
417
+ }), Fe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Xe = /* @__PURE__ */ R({
418
418
  __name: "index",
419
419
  setup(e) {
420
420
  const a = X(), { open: t } = Q("waitDlg"), l = () => {
@@ -428,23 +428,23 @@ const $e = /* @__PURE__ */ O({
428
428
  _.off("openWaitDlg", l), _.off("closeWaitDlg", o);
429
429
  }), (n, r) => {
430
430
  const u = g("v-card"), s = g("v-dialog");
431
- return V(), A(s, {
432
- modelValue: W(t),
431
+ return C(), O(s, {
432
+ modelValue: U(t),
433
433
  "onUpdate:modelValue": r[0] || (r[0] = (c) => J(t) ? t.value = c : null),
434
434
  persistent: "",
435
435
  "no-click-animation": "",
436
436
  fullscreen: ""
437
437
  }, {
438
438
  default: v(() => [
439
- m("div", ze, [
439
+ m("div", Fe, [
440
440
  h(u, {
441
441
  width: "300px",
442
442
  height: "80px",
443
443
  loading: ""
444
444
  }, {
445
445
  default: v(() => [
446
- m("div", Fe, [
447
- m("span", null, b(W(a).t("waitingResponse")), 1)
446
+ m("div", Je, [
447
+ m("span", null, b(U(a).t("waitingResponse")), 1)
448
448
  ])
449
449
  ]),
450
450
  _: 1
@@ -455,10 +455,10 @@ const $e = /* @__PURE__ */ O({
455
455
  }, 8, ["modelValue"]);
456
456
  };
457
457
  }
458
- }), Xe = (e) => {
459
- e.component("v-alert", ve), e.component("v-btn", me), e.component("v-card", he), e.component("v-card-actions", we), e.component("v-card-text", ye), e.component("v-card-title", xe), e.component("v-dialog", ke), e.component("v-form", be), e.component("v-text-field", Ce), e.component("x-confirm-dlg", $e), e.component("x-loading", Ue), e.component("x-message", He), e.component("x-prompt-dlg", Ke), e.component("x-wait-dlg", Je);
458
+ }), Ge = (e) => {
459
+ e.component("v-alert", ve), e.component("v-btn", me), e.component("v-card", he), e.component("v-card-actions", we), e.component("v-card-text", ye), e.component("v-card-title", xe), e.component("v-dialog", ke), e.component("v-form", be), e.component("v-text-field", Ce), e.component("x-confirm-dlg", Ae), e.component("x-loading", Ue), e.component("x-message", Ke), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Xe);
460
460
  };
461
- function ft() {
461
+ function it() {
462
462
  const e = K(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
463
463
  return {
464
464
  primaryColor: a,
@@ -499,56 +499,56 @@ const Y = oe(
499
499
  }
500
500
  ]
501
501
  }
502
- ), U = require("js-cookie");
503
- function it(e) {
504
- const a = Ie.create({
502
+ ), N = require("js-cookie");
503
+ function gt(e) {
504
+ const a = Ee.create({
505
505
  timeout: 6e3
506
506
  });
507
507
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
508
- (t) => Ge(t),
508
+ (t) => Qe(t),
509
509
  (t) => {
510
- Qe(t, e.onError);
510
+ Ye(t, e.onError);
511
511
  }
512
512
  ), a.interceptors.response.use(
513
- (t) => Ye(t),
514
- (t) => Ze(t, e.onError)
513
+ (t) => Ze(t),
514
+ (t) => Pe(t, e.onError)
515
515
  ), a;
516
516
  }
517
- function Ge(e) {
518
- const a = U.get("accessToken") ?? "";
517
+ function Qe(e) {
518
+ const a = N.get("accessToken") ?? "";
519
519
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
520
520
  }
521
- function Qe(e, a) {
521
+ function Ye(e, a) {
522
522
  console.error(e), a("request timeout");
523
523
  }
524
- function Ye(e) {
524
+ function Ze(e) {
525
525
  return e.data;
526
526
  }
527
- function Ze(e, a) {
527
+ function Pe(e, a) {
528
528
  var o;
529
529
  const t = e.response;
530
530
  if (!t)
531
531
  return Promise.reject(e);
532
- t.status === 401 && Pe();
532
+ t.status === 401 && et();
533
533
  let l = (o = t.data) == null ? void 0 : o.message;
534
534
  return l || (l = {
535
535
  code: t.status,
536
536
  message: t.statusText
537
537
  }), a(l), Promise.reject(e);
538
538
  }
539
- function Pe() {
540
- U.remove("accessToken"), U.remove("refreshToken"), U.remove("activeOrg"), re().replace({ path: "/passport/login" });
539
+ function et() {
540
+ N.remove("accessToken"), N.remove("refreshToken"), N.remove("activeOrg"), re().replace({ path: "/passport/login" });
541
541
  }
542
542
  let ee = Date.now();
543
543
  function ue() {
544
544
  const e = Date.now();
545
545
  return e - ee > 500 ? (ee = e, !0) : !1;
546
546
  }
547
- let et = 0;
547
+ let tt = 0;
548
548
  function se() {
549
- return ++et;
549
+ return ++tt;
550
550
  }
551
- async function gt(e) {
551
+ async function vt(e) {
552
552
  if (!ue())
553
553
  return;
554
554
  let a = !1, t;
@@ -557,7 +557,7 @@ async function gt(e) {
557
557
  }, o = se();
558
558
  return _.on("confirmDlgResult" + o, l), _.emit("confirmDlg", { ...e, seq: o }), await G(() => a), _.off("confirmDlgResult" + o, l), t;
559
559
  }
560
- async function vt(e) {
560
+ async function mt(e) {
561
561
  if (!ue())
562
562
  return;
563
563
  let a = !1, t;
@@ -566,25 +566,25 @@ async function vt(e) {
566
566
  }, o = se();
567
567
  return _.on("promptDlgResult" + o, l), _.emit("promptDlg", { ...e, seq: o }), await G(() => a), _.off("promptDlgResult" + o, l), t;
568
568
  }
569
- function mt() {
569
+ function ht() {
570
570
  _.emit("openWaitDlg");
571
571
  }
572
- function ht() {
572
+ function wt() {
573
573
  _.emit("closeWaitDlg");
574
574
  }
575
- function wt(e, a) {
575
+ function yt(e, a) {
576
576
  _.emit("message", { type: "error", text: e, timeout: a });
577
577
  }
578
- function yt(e, a) {
578
+ function xt(e, a) {
579
579
  _.emit("message", { type: "info", text: e, timeout: a });
580
580
  }
581
- function xt(e, a) {
581
+ function kt(e, a) {
582
582
  _.emit("message", { type: "success", text: e, timeout: a });
583
583
  }
584
- function kt(e, a) {
584
+ function bt(e, a) {
585
585
  _.emit("message", { type: "warning", text: e, timeout: a });
586
586
  }
587
- function bt(e) {
587
+ function Ct(e) {
588
588
  var l, o;
589
589
  if (!window.appAppear) {
590
590
  window.appAppear = !0;
@@ -595,7 +595,7 @@ function bt(e) {
595
595
  t.add("app-reset");
596
596
  }, 0));
597
597
  }
598
- var tt = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(tt || {});
598
+ var at = /* @__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))(at || {});
599
599
  function te(e, a) {
600
600
  if (!e)
601
601
  return !1;
@@ -609,7 +609,7 @@ function te(e, a) {
609
609
  return !1;
610
610
  }), Object.keys(t).length <= 0);
611
611
  }
612
- const _e = require("js-cookie"), at = [
612
+ const _e = require("js-cookie"), lt = [
613
613
  { path: "/passport/login", level: 0 },
614
614
  { path: "/passport/loginAccount", level: 1 },
615
615
  { path: "/passport/register", level: 1 },
@@ -632,7 +632,7 @@ const _e = require("js-cookie"), at = [
632
632
  function Z(e) {
633
633
  let a, t = 0;
634
634
  const l = e.split("/");
635
- return at.forEach((o) => {
635
+ return lt.forEach((o) => {
636
636
  const n = o.path.split("/");
637
637
  let r = 0;
638
638
  for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
@@ -656,14 +656,14 @@ function k(e, a) {
656
656
  `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
657
657
  ), o ? n ? le.value = "" : le.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
658
658
  }
659
- function lt() {
659
+ function ot() {
660
660
  return !!_e.get("accessToken");
661
661
  }
662
- function ot() {
662
+ function rt() {
663
663
  return !!_e.get("activeOrg");
664
664
  }
665
- function Ct(e, a, t) {
666
- const l = lt(), o = ot(), n = Z(e.path);
665
+ function Vt(e, a, t) {
666
+ const l = ot(), o = rt(), n = Z(e.path);
667
667
  if (!n) {
668
668
  t();
669
669
  return;
@@ -702,8 +702,8 @@ function Ct(e, a, t) {
702
702
  else
703
703
  k(e.path, a.path), t();
704
704
  }
705
- function Vt(e) {
706
- const a = je(), t = re(), l = Y(), o = ne(), n = (c) => {
705
+ function Dt(e) {
706
+ const a = Ie(), t = re(), l = Y(), o = ne(), n = (c) => {
707
707
  if (c.key === "Escape") {
708
708
  r();
709
709
  return;
@@ -740,7 +740,7 @@ function Vt(e) {
740
740
  window.removeEventListener("keydown", n, !1);
741
741
  }), {};
742
742
  }
743
- function Dt() {
743
+ function qt() {
744
744
  const e = Y();
745
745
  function a(t, l) {
746
746
  const o = e.permissionObjects[t];
@@ -748,10 +748,10 @@ function Dt() {
748
748
  }
749
749
  return { verifyPermission: a };
750
750
  }
751
- function rt(e, a) {
751
+ function nt(e, a) {
752
752
  return e.post("pullPermission", a);
753
753
  }
754
- function qt(e) {
754
+ function St(e) {
755
755
  const a = Y();
756
756
  let t;
757
757
  const l = () => {
@@ -760,7 +760,7 @@ function qt(e) {
760
760
  }, 3e3);
761
761
  }, o = async () => {
762
762
  try {
763
- const { update: n, permissions: r } = await rt(e, {
763
+ const { update: n, permissions: r } = await nt(e, {
764
764
  checksum: a.permissionChecksum
765
765
  });
766
766
  if (!n)
@@ -783,37 +783,37 @@ function qt(e) {
783
783
  clearTimeout(t), t = void 0;
784
784
  }), {};
785
785
  }
786
- function St() {
787
- const e = K(), { width: a } = Re(), t = f(() => e.global.name.value), l = f(() => !!window.cordova), o = f(() => a.value <= 1280 ? a.value + "px" : a.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
786
+ function Tt() {
787
+ const e = K(), { width: a } = je(), t = f(() => e.global.name.value), l = f(() => !!window.cordova), o = f(() => a.value <= 1280 ? a.value + "px" : a.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
788
788
  return { dark: t, sysBarAvail: l, compactWidth: o };
789
789
  }
790
- const Tt = { install: Xe };
790
+ const Ot = { install: Ge };
791
791
  export {
792
- tt as Permission,
793
- bt as appAppear,
794
- ht as closeWaitDlg,
795
- it as createAxios,
796
- Tt as default,
792
+ at as Permission,
793
+ Ct as appAppear,
794
+ wt as closeWaitDlg,
795
+ gt as createAxios,
796
+ Ot as default,
797
797
  _ as eventBus,
798
798
  te as isExist,
799
799
  Z as matchRouteMeta,
800
- wt as messageError,
801
- yt as messageInfo,
802
- xt as messageSuccess,
803
- kt as messageWarning,
804
- Ct as onBeforeEach,
805
- gt as openConfirmDlg,
806
- vt as openPromptDlg,
807
- mt as openWaitDlg,
800
+ yt as messageError,
801
+ xt as messageInfo,
802
+ kt as messageSuccess,
803
+ bt as messageWarning,
804
+ Vt as onBeforeEach,
805
+ vt as openConfirmDlg,
806
+ mt as openPromptDlg,
807
+ ht as openWaitDlg,
808
808
  le as routeTransName,
809
- ft as useColor,
809
+ it as useColor,
810
810
  Y as useGlobalStore,
811
- Vt as useHotkey,
812
- Dt as usePermission,
813
- qt as usePullPermission,
814
- St as useSystem,
811
+ Dt as useHotkey,
812
+ qt as usePermission,
813
+ St as usePullPermission,
814
+ Tt as useSystem,
815
815
  ne as useViewMgrStore,
816
816
  Q as useViewStack,
817
- dt as waitMs,
817
+ ft as waitMs,
818
818
  G as waitUtil
819
819
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.3.12",
4
+ "version": "0.3.13",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",