x-essential-lib 0.3.11 → 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.
package/dist/index.js CHANGED
@@ -1,116 +1,124 @@
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";
5
- import { defineStore as le } from "pinia";
6
- import { useRouter as re, useRoute as je } from "vue-router";
7
- import Ie from "axios";
8
- const ne = le("viewMgr", () => {
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
+ import { defineStore as oe } from "pinia";
6
+ import { useRouter as re, useRoute as Ie } from "vue-router";
7
+ import Ee from "axios";
8
+ const ne = oe("viewMgr", () => {
9
9
  const e = i([]);
10
10
  function a() {
11
11
  return e.value.length <= 0;
12
12
  }
13
- function t(r) {
14
- return e.value.find((c) => c === r) !== void 0;
13
+ function t() {
14
+ const s = e.value.length;
15
+ if (s > 0)
16
+ return e.value[s - 1];
15
17
  }
16
- function o(r) {
17
- l(r), e.value.push(r);
18
+ function l(s) {
19
+ return e.value.find((c) => c === s) !== void 0;
18
20
  }
19
- function l(r) {
20
- const c = e.value.findIndex((_) => _ === r);
21
+ function o(s) {
22
+ n(s), e.value.push(s);
23
+ }
24
+ function n(s) {
25
+ const c = e.value.findIndex((y) => y === s);
21
26
  c !== -1 && e.value.splice(c, 1);
22
27
  }
23
- function n() {
28
+ function r() {
24
29
  e.value.pop();
25
30
  }
26
- return { isEmpty: a, hasView: t, addView: o, delView: l, popView: n };
31
+ function u() {
32
+ e.value = [];
33
+ }
34
+ return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
27
35
  });
28
- function Ee(e) {
36
+ function $e(e) {
29
37
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
30
- var o = e.get(a);
31
- o ? o.push(t) : e.set(a, [t]);
38
+ var l = e.get(a);
39
+ l ? l.push(t) : e.set(a, [t]);
32
40
  }, off: function(a, t) {
33
- var o = e.get(a);
34
- o && (t ? o.splice(o.indexOf(t) >>> 0, 1) : e.set(a, []));
41
+ var l = e.get(a);
42
+ l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
35
43
  }, emit: function(a, t) {
36
- var o = e.get(a);
37
- o && o.slice().map(function(l) {
38
- l(t);
39
- }), (o = e.get("*")) && o.slice().map(function(l) {
40
- l(a, t);
44
+ var l = e.get(a);
45
+ l && l.slice().map(function(o) {
46
+ o(t);
47
+ }), (l = e.get("*")) && l.slice().map(function(o) {
48
+ o(a, t);
41
49
  });
42
50
  } };
43
51
  }
44
- const s = Ee();
45
- async function dt(e) {
52
+ const _ = $e();
53
+ async function ft(e) {
46
54
  return new Promise((a) => {
47
55
  setTimeout(a, e);
48
56
  });
49
57
  }
50
58
  async function G(e, a, t) {
51
- const o = Date.now();
52
- return new Promise((l) => {
59
+ const l = Date.now();
60
+ return new Promise((o) => {
53
61
  const n = async () => {
54
- e() ? l(!0) : a && Date.now() - o > a ? l(!1) : setTimeout(n, t ?? 30);
62
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
55
63
  };
56
64
  n();
57
65
  });
58
66
  }
59
67
  function Q(e, a) {
60
- const t = ne(), o = f({
68
+ const t = ne(), l = f({
61
69
  get() {
62
70
  return t.hasView(e);
63
71
  },
64
72
  set(n) {
65
73
  n ? t.addView(e) : t.delView(e);
66
74
  }
67
- }), l = (n) => {
68
- a == null || a(n), o.value = !0;
75
+ }), o = (n) => {
76
+ a == null || a(n), l.value = !0;
69
77
  };
70
78
  return D(() => {
71
- s.on(e, l);
79
+ _.on(e, o);
72
80
  }), T(() => {
73
- s.off(e, l);
74
- }), { open: o };
81
+ _.off(e, o);
82
+ }), { open: l };
75
83
  }
76
- const $e = /* @__PURE__ */ O({
84
+ const Ae = /* @__PURE__ */ R({
77
85
  __name: "index",
78
86
  setup(e) {
79
- const a = X(), { open: t } = Q("confirmDlg"), o = i(""), l = i(""), n = i(), r = i(), c = f(() => {
87
+ const a = X(), { open: t } = Q("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
80
88
  var d;
81
89
  return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
82
- }), _ = f(() => {
90
+ }), s = f(() => {
83
91
  var d;
84
92
  return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
85
- }), u = f(() => {
93
+ }), c = f(() => {
86
94
  var d;
87
95
  return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
88
96
  }), y = f(() => {
89
97
  var d;
90
98
  return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
91
99
  });
92
- let R = 0, q = !1;
100
+ let j = 0, q = !1;
93
101
  const M = (d) => {
94
- o.value = d.title, l.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;
95
103
  };
96
104
  D(() => {
97
- s.on("confirmDlg", M);
105
+ _.on("confirmDlg", M);
98
106
  }), T(() => {
99
- s.off("confirmDlg", M);
107
+ _.off("confirmDlg", M);
100
108
  });
101
109
  const B = () => {
102
- t.value = !1, q || (s.emit("confirmDlgResult" + R, !0), q = !0);
110
+ t.value = !1, q || (_.emit("confirmDlgResult" + j, !0), q = !0);
103
111
  };
104
112
  return H(t, (d) => {
105
- !d && !q && (s.emit("confirmDlgResult" + R, !1), q = !0);
113
+ !d && !q && (_.emit("confirmDlgResult" + j, !1), q = !0);
106
114
  }), (d, x) => {
107
- 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");
108
- return V(), A(z, {
109
- modelValue: W(t),
110
- "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),
111
119
  onKeydown: [
112
- x[2] || (x[2] = N($((I) => t.value = !1, ["stop", "prevent"]), ["esc"])),
113
- 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"])
114
122
  ],
115
123
  transition: "dialog-top-transition",
116
124
  "max-width": "600px"
@@ -120,35 +128,35 @@ const $e = /* @__PURE__ */ O({
120
128
  default: v(() => [
121
129
  h(S, null, {
122
130
  default: v(() => [
123
- C(b(o.value), 1)
131
+ V(b(l.value), 1)
124
132
  ]),
125
133
  _: 1
126
134
  }),
127
135
  h(L, null, {
128
136
  default: v(() => [
129
- C(b(l.value), 1)
137
+ V(b(o.value), 1)
130
138
  ]),
131
139
  _: 1
132
140
  }),
133
141
  h(p, { class: "d-flex justify-end" }, {
134
142
  default: v(() => [
135
- h(j, {
136
- onClick: x[0] || (x[0] = (I) => t.value = !1),
137
- color: c.value,
143
+ h(I, {
144
+ onClick: x[0] || (x[0] = (E) => t.value = !1),
145
+ color: u.value,
138
146
  variant: "text"
139
147
  }, {
140
148
  default: v(() => [
141
- C(b(_.value), 1)
149
+ V(b(s.value), 1)
142
150
  ]),
143
151
  _: 1
144
152
  }, 8, ["color"]),
145
- h(j, {
153
+ h(I, {
146
154
  onClick: B,
147
- color: u.value,
155
+ color: c.value,
148
156
  variant: "text"
149
157
  }, {
150
158
  default: v(() => [
151
- C(b(y.value), 1)
159
+ V(b(y.value), 1)
152
160
  ]),
153
161
  _: 1
154
162
  }, 8, ["color"])
@@ -163,7 +171,7 @@ const $e = /* @__PURE__ */ O({
163
171
  }, 8, ["modelValue", "onKeydown"]);
164
172
  };
165
173
  }
166
- }), 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" }, [
167
175
  /* @__PURE__ */ m("div"),
168
176
  /* @__PURE__ */ m("div"),
169
177
  /* @__PURE__ */ m("div"),
@@ -176,9 +184,9 @@ const $e = /* @__PURE__ */ O({
176
184
  /* @__PURE__ */ m("div"),
177
185
  /* @__PURE__ */ m("div"),
178
186
  /* @__PURE__ */ m("div")
179
- ], -1)), Be = [
180
- Me
181
- ], Le = /* @__PURE__ */ O({
187
+ ], -1)), Le = [
188
+ Be
189
+ ], Ne = /* @__PURE__ */ R({
182
190
  __name: "index",
183
191
  props: {
184
192
  zIndex: {
@@ -187,21 +195,21 @@ const $e = /* @__PURE__ */ O({
187
195
  }
188
196
  },
189
197
  setup(e) {
190
- const a = K(), t = e, o = f(() => ({
198
+ const a = K(), t = e, l = f(() => ({
191
199
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
192
200
  zIndex: t.zIndex
193
201
  }));
194
- return (l, n) => (V(), F("div", {
202
+ return (o, n) => (C(), F("div", {
195
203
  class: "x-cont",
196
- style: Ve(o.value)
197
- }, Be, 4));
204
+ style: Ve(l.value)
205
+ }, Le, 4));
198
206
  }
199
207
  }), ce = (e, a) => {
200
208
  const t = e.__vccOpts || e;
201
- for (const [o, l] of a)
202
- t[o] = l;
209
+ for (const [l, o] of a)
210
+ t[l] = o;
203
211
  return t;
204
- }, Ue = /* @__PURE__ */ ce(Le, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ O({
212
+ }, Ue = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ R({
205
213
  __name: "item",
206
214
  props: {
207
215
  id: {
@@ -223,7 +231,7 @@ const $e = /* @__PURE__ */ O({
223
231
  },
224
232
  emits: ["timeout"],
225
233
  setup(e, { emit: a }) {
226
- const t = e, o = i(!0), l = a, n = f(() => {
234
+ const t = e, l = i(!0), o = a, n = f(() => {
227
235
  let r = "";
228
236
  switch (t.type) {
229
237
  case "error":
@@ -243,15 +251,15 @@ const $e = /* @__PURE__ */ O({
243
251
  });
244
252
  return D(() => {
245
253
  setTimeout(() => {
246
- l("timeout", t.id);
254
+ o("timeout", t.id);
247
255
  }, t.timeout);
248
- }), H(o, (r) => {
249
- r || l("timeout", t.id);
250
- }), (r, c) => {
251
- const _ = g("v-alert");
252
- return V(), A(_, {
253
- modelValue: o.value,
254
- "onUpdate:modelValue": c[0] || (c[0] = (u) => o.value = u),
256
+ }), H(l, (r) => {
257
+ r || o("timeout", t.id);
258
+ }), (r, u) => {
259
+ const s = g("v-alert");
260
+ return C(), O(s, {
261
+ modelValue: l.value,
262
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
255
263
  class: "mt-2",
256
264
  type: e.type,
257
265
  icon: n.value,
@@ -264,52 +272,52 @@ const $e = /* @__PURE__ */ O({
264
272
  }, null, 8, ["modelValue", "type", "icon", "text"]);
265
273
  };
266
274
  }
267
- }), Ne = /* @__PURE__ */ O({
275
+ }), He = /* @__PURE__ */ R({
268
276
  __name: "index",
269
277
  setup(e) {
270
278
  const a = Se({ items: [] });
271
279
  D(() => {
272
- s.on("message", t);
280
+ _.on("message", t);
273
281
  }), T(() => {
274
- s.off("message", t);
282
+ _.off("message", t);
275
283
  });
276
- const t = (c) => {
277
- n(c.type, c.text, c.timeout);
278
- }, o = (c) => {
279
- r(c);
284
+ const t = (u) => {
285
+ n(u.type, u.text, u.timeout);
286
+ }, l = (u) => {
287
+ r(u);
280
288
  };
281
- let l = 0;
282
- const n = (c, _, u) => {
283
- const y = l++;
284
- a.items.push({ id: y, type: c, text: _, timeout: u });
285
- }, r = (c) => {
286
- const _ = a.items.findIndex((u) => u.id === c);
287
- _ >= 0 && a.items.splice(_, 1);
289
+ let o = 0;
290
+ const n = (u, s, c) => {
291
+ const y = o++;
292
+ a.items.push({ id: y, type: u, text: s, timeout: c });
293
+ }, r = (u) => {
294
+ const s = a.items.findIndex((c) => c.id === u);
295
+ s >= 0 && a.items.splice(s, 1);
288
296
  };
289
- return (c, _) => (V(), F("div", {
290
- onClick: _[0] || (_[0] = $(() => {
297
+ return (u, s) => (C(), F("div", {
298
+ onClick: s[0] || (s[0] = A(() => {
291
299
  }, ["stop"])),
292
300
  class: "x-cont d-flex flex-column-reverse align-center"
293
301
  }, [
294
- (V(!0), F(Te, null, Oe(a.items, (u) => (V(), A(We, {
295
- onTimeout: o,
296
- id: u.id,
297
- type: u.type,
298
- text: u.text,
299
- timeout: u.timeout,
300
- key: u.id
302
+ (C(!0), F(Te, null, Oe(a.items, (c) => (C(), O(We, {
303
+ onTimeout: l,
304
+ id: c.id,
305
+ type: c.type,
306
+ text: c.text,
307
+ timeout: c.timeout,
308
+ key: c.id
301
309
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
302
310
  ]));
303
311
  }
304
- }), He = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-70ed4b89"]]), Ke = /* @__PURE__ */ O({
312
+ }), Ke = /* @__PURE__ */ ce(He, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
305
313
  __name: "index",
306
314
  setup(e) {
307
- const a = X(), { open: t } = Q("promptDlg"), o = i(""), l = i(""), n = i(), r = i(), c = i(), _ = i(""), u = 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(() => {
308
316
  var p;
309
- return ((p = u.value) == null ? void 0 : p.color) ?? "primary";
317
+ return ((p = c.value) == null ? void 0 : p.color) ?? "primary";
310
318
  }), q = f(() => {
311
319
  var p;
312
- return ((p = u.value) == null ? void 0 : p.text) ?? a.t("cancel");
320
+ return ((p = c.value) == null ? void 0 : p.text) ?? a.t("cancel");
313
321
  }), M = f(() => {
314
322
  var p;
315
323
  return ((p = y.value) == null ? void 0 : p.color) ?? "primary";
@@ -320,26 +328,26 @@ const $e = /* @__PURE__ */ O({
320
328
  let x = 0, S = !1;
321
329
  const L = async (p) => {
322
330
  var w;
323
- o.value = p.title, l.value = p.text, n.value = p.label, r.value = p.placeholder, c.value = p.rules, _.value = p.value, u.value = p.cancel, y.value = p.confirm, x = p.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
331
+ l.value = p.title, o.value = p.text, n.value = p.label, r.value = p.placeholder, u.value = p.rules, s.value = p.value, c.value = p.cancel, y.value = p.confirm, x = p.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
324
332
  };
325
333
  D(() => {
326
- s.on("promptDlg", L);
334
+ _.on("promptDlg", L);
327
335
  }), T(() => {
328
- s.off("promptDlg", L);
336
+ _.off("promptDlg", L);
329
337
  });
330
- const j = () => {
331
- t.value = !1, S || (s.emit("promptDlgResult" + x, _.value ?? ""), S = !0);
338
+ const I = () => {
339
+ t.value = !1, S || (_.emit("promptDlgResult" + x, s.value ?? ""), S = !0);
332
340
  };
333
341
  return H(t, (p) => {
334
- !p && !S && (s.emit("promptDlgResult" + x, void 0), S = !0);
342
+ !p && !S && (_.emit("promptDlgResult" + x, void 0), S = !0);
335
343
  }), (p, w) => {
336
- 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");
337
- return V(), A(ge, {
338
- modelValue: W(t),
339
- "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),
340
348
  onKeydown: [
341
- w[3] || (w[3] = N($((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
342
- 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"])
343
351
  ],
344
352
  transition: "dialog-top-transition",
345
353
  "max-width": "600px"
@@ -349,24 +357,24 @@ const $e = /* @__PURE__ */ O({
349
357
  default: v(() => [
350
358
  h(z, null, {
351
359
  default: v(() => [
352
- C(b(o.value), 1)
360
+ V(b(l.value), 1)
353
361
  ]),
354
362
  _: 1
355
363
  }),
356
- h(I, null, {
364
+ o.value ? (C(), O(E, { key: 0 }, {
357
365
  default: v(() => [
358
- C(b(l.value), 1)
366
+ V(b(o.value), 1)
359
367
  ]),
360
368
  _: 1
361
- }),
369
+ })) : Re("", !0),
362
370
  h(de, { class: "mx-3" }, {
363
371
  default: v(() => [
364
372
  h(pe, {
365
- modelValue: _.value,
366
- "onUpdate:modelValue": w[0] || (w[0] = (E) => _.value = E),
373
+ modelValue: s.value,
374
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
367
375
  label: n.value,
368
376
  placeholder: r.value,
369
- rules: c.value,
377
+ rules: u.value,
370
378
  ref_key: "target",
371
379
  ref: d
372
380
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
@@ -376,22 +384,22 @@ const $e = /* @__PURE__ */ O({
376
384
  h(fe, { class: "d-flex justify-end" }, {
377
385
  default: v(() => [
378
386
  h(P, {
379
- onClick: w[1] || (w[1] = (E) => t.value = !1),
380
- color: R.value,
387
+ onClick: w[1] || (w[1] = ($) => t.value = !1),
388
+ color: j.value,
381
389
  variant: "text"
382
390
  }, {
383
391
  default: v(() => [
384
- C(b(q.value), 1)
392
+ V(b(q.value), 1)
385
393
  ]),
386
394
  _: 1
387
395
  }, 8, ["color"]),
388
396
  h(P, {
389
- onClick: j,
397
+ onClick: I,
390
398
  color: M.value,
391
399
  variant: "text"
392
400
  }, {
393
401
  default: v(() => [
394
- C(b(B.value), 1)
402
+ V(b(B.value), 1)
395
403
  ]),
396
404
  _: 1
397
405
  }, 8, ["color"])
@@ -406,37 +414,37 @@ const $e = /* @__PURE__ */ O({
406
414
  }, 8, ["modelValue", "onKeydown"]);
407
415
  };
408
416
  }
409
- }), 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({
410
418
  __name: "index",
411
419
  setup(e) {
412
- const a = X(), { open: t } = Q("waitDlg"), o = () => {
420
+ const a = X(), { open: t } = Q("waitDlg"), l = () => {
413
421
  t.value = !0;
414
- }, l = () => {
422
+ }, o = () => {
415
423
  t.value = !1;
416
424
  };
417
425
  return D(() => {
418
- s.on("openWaitDlg", o), s.on("closeWaitDlg", l);
426
+ _.on("openWaitDlg", l), _.on("closeWaitDlg", o);
419
427
  }), T(() => {
420
- s.off("openWaitDlg", o), s.off("closeWaitDlg", l);
428
+ _.off("openWaitDlg", l), _.off("closeWaitDlg", o);
421
429
  }), (n, r) => {
422
- const c = g("v-card"), _ = g("v-dialog");
423
- return V(), A(_, {
424
- modelValue: W(t),
425
- "onUpdate:modelValue": r[0] || (r[0] = (u) => J(t) ? t.value = u : null),
430
+ const u = g("v-card"), s = g("v-dialog");
431
+ return C(), O(s, {
432
+ modelValue: U(t),
433
+ "onUpdate:modelValue": r[0] || (r[0] = (c) => J(t) ? t.value = c : null),
426
434
  persistent: "",
427
435
  "no-click-animation": "",
428
436
  fullscreen: ""
429
437
  }, {
430
438
  default: v(() => [
431
- m("div", ze, [
432
- h(c, {
439
+ m("div", Fe, [
440
+ h(u, {
433
441
  width: "300px",
434
442
  height: "80px",
435
443
  loading: ""
436
444
  }, {
437
445
  default: v(() => [
438
- m("div", Fe, [
439
- m("span", null, b(W(a).t("waitingResponse")), 1)
446
+ m("div", Je, [
447
+ m("span", null, b(U(a).t("waitingResponse")), 1)
440
448
  ])
441
449
  ]),
442
450
  _: 1
@@ -447,22 +455,22 @@ const $e = /* @__PURE__ */ O({
447
455
  }, 8, ["modelValue"]);
448
456
  };
449
457
  }
450
- }), Xe = (e) => {
451
- 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);
452
460
  };
453
- function ft() {
454
- const e = K(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), o = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = 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");
461
+ function it() {
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");
455
463
  return {
456
464
  primaryColor: a,
457
465
  secondaryColor: t,
458
- backgroundColor0: o,
459
- backgroundColor1: l,
466
+ backgroundColor0: l,
467
+ backgroundColor1: o,
460
468
  backgroundColor2: n,
461
469
  highlightColor: r,
462
- borderColor: c
470
+ borderColor: u
463
471
  };
464
472
  }
465
- const Y = le(
473
+ const Y = oe(
466
474
  "global",
467
475
  () => {
468
476
  const e = K(), a = i(!1);
@@ -475,12 +483,12 @@ const Y = le(
475
483
  immediate: !0
476
484
  }
477
485
  );
478
- const t = i("en"), o = i({}), l = i("");
486
+ const t = i("en"), l = i({}), o = i("");
479
487
  return {
480
488
  dark: a,
481
489
  locale: t,
482
- permissionObjects: o,
483
- permissionChecksum: l
490
+ permissionObjects: l,
491
+ permissionChecksum: o
484
492
  };
485
493
  },
486
494
  {
@@ -491,117 +499,117 @@ const Y = le(
491
499
  }
492
500
  ]
493
501
  }
494
- ), U = require("js-cookie");
495
- function it(e) {
496
- const a = Ie.create({
502
+ ), N = require("js-cookie");
503
+ function gt(e) {
504
+ const a = Ee.create({
497
505
  timeout: 6e3
498
506
  });
499
507
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
500
- (t) => Ge(t),
508
+ (t) => Qe(t),
501
509
  (t) => {
502
- Qe(t, e.onError);
510
+ Ye(t, e.onError);
503
511
  }
504
512
  ), a.interceptors.response.use(
505
- (t) => Ye(t),
506
- (t) => Ze(t, e.onError)
513
+ (t) => Ze(t),
514
+ (t) => Pe(t, e.onError)
507
515
  ), a;
508
516
  }
509
- function Ge(e) {
510
- const a = U.get("accessToken") ?? "";
517
+ function Qe(e) {
518
+ const a = N.get("accessToken") ?? "";
511
519
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
512
520
  }
513
- function Qe(e, a) {
521
+ function Ye(e, a) {
514
522
  console.error(e), a("request timeout");
515
523
  }
516
- function Ye(e) {
524
+ function Ze(e) {
517
525
  return e.data;
518
526
  }
519
- function Ze(e, a) {
520
- var l;
527
+ function Pe(e, a) {
528
+ var o;
521
529
  const t = e.response;
522
530
  if (!t)
523
531
  return Promise.reject(e);
524
- t.status === 401 && Pe();
525
- let o = (l = t.data) == null ? void 0 : l.message;
526
- return o || (o = {
532
+ t.status === 401 && et();
533
+ let l = (o = t.data) == null ? void 0 : o.message;
534
+ return l || (l = {
527
535
  code: t.status,
528
536
  message: t.statusText
529
- }), a(o), Promise.reject(e);
537
+ }), a(l), Promise.reject(e);
530
538
  }
531
- function Pe() {
532
- 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" });
533
541
  }
534
542
  let ee = Date.now();
535
543
  function ue() {
536
544
  const e = Date.now();
537
545
  return e - ee > 500 ? (ee = e, !0) : !1;
538
546
  }
539
- let et = 0;
547
+ let tt = 0;
540
548
  function se() {
541
- return ++et;
549
+ return ++tt;
542
550
  }
543
- async function gt(e) {
551
+ async function vt(e) {
544
552
  if (!ue())
545
553
  return;
546
554
  let a = !1, t;
547
- const o = (n) => {
555
+ const l = (n) => {
548
556
  t = n, a = !0;
549
- }, l = se();
550
- return s.on("confirmDlgResult" + l, o), s.emit("confirmDlg", { ...e, seq: l }), await G(() => a), s.off("confirmDlgResult" + l, o), t;
557
+ }, o = se();
558
+ return _.on("confirmDlgResult" + o, l), _.emit("confirmDlg", { ...e, seq: o }), await G(() => a), _.off("confirmDlgResult" + o, l), t;
551
559
  }
552
- async function vt(e) {
560
+ async function mt(e) {
553
561
  if (!ue())
554
562
  return;
555
563
  let a = !1, t;
556
- const o = (n) => {
564
+ const l = (n) => {
557
565
  t = n, a = !0;
558
- }, l = se();
559
- return s.on("promptDlgResult" + l, o), s.emit("promptDlg", { ...e, seq: l }), await G(() => a), s.off("promptDlgResult" + l, o), t;
560
- }
561
- function mt() {
562
- s.emit("openWaitDlg");
566
+ }, o = se();
567
+ return _.on("promptDlgResult" + o, l), _.emit("promptDlg", { ...e, seq: o }), await G(() => a), _.off("promptDlgResult" + o, l), t;
563
568
  }
564
569
  function ht() {
565
- s.emit("closeWaitDlg");
570
+ _.emit("openWaitDlg");
566
571
  }
567
- function wt(e, a) {
568
- s.emit("message", { type: "error", text: e, timeout: a });
572
+ function wt() {
573
+ _.emit("closeWaitDlg");
569
574
  }
570
575
  function yt(e, a) {
571
- s.emit("message", { type: "info", text: e, timeout: a });
576
+ _.emit("message", { type: "error", text: e, timeout: a });
572
577
  }
573
578
  function xt(e, a) {
574
- s.emit("message", { type: "success", text: e, timeout: a });
579
+ _.emit("message", { type: "info", text: e, timeout: a });
575
580
  }
576
581
  function kt(e, a) {
577
- s.emit("message", { type: "warning", text: e, timeout: a });
582
+ _.emit("message", { type: "success", text: e, timeout: a });
583
+ }
584
+ function bt(e, a) {
585
+ _.emit("message", { type: "warning", text: e, timeout: a });
578
586
  }
579
- function bt(e) {
580
- var o, l;
587
+ function Ct(e) {
588
+ var l, o;
581
589
  if (!window.appAppear) {
582
590
  window.appAppear = !0;
583
591
  return;
584
592
  }
585
- const a = "single-spa-application:" + e, t = (o = document.getElementById(a)) == null ? void 0 : o.classList;
586
- t && (t.remove("app-left", "app-right", "app-reset"), (l = window.routeExtras) != null && l.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
593
+ const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
594
+ t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
587
595
  t.add("app-reset");
588
596
  }, 0));
589
597
  }
590
- 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 || {});
591
599
  function te(e, a) {
592
600
  if (!e)
593
601
  return !1;
594
602
  let t = e;
595
- return Object.keys(t).length <= 0 || (a.split("/").forEach((l) => {
603
+ return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
596
604
  if (Object.keys(t).length <= 0)
597
605
  return !0;
598
- if (t[l])
599
- t = t[l];
606
+ if (t[o])
607
+ t = t[o];
600
608
  else
601
609
  return !1;
602
610
  }), Object.keys(t).length <= 0);
603
611
  }
604
- const _e = require("js-cookie"), at = [
612
+ const _e = require("js-cookie"), lt = [
605
613
  { path: "/passport/login", level: 0 },
606
614
  { path: "/passport/loginAccount", level: 1 },
607
615
  { path: "/passport/register", level: 1 },
@@ -623,13 +631,13 @@ const _e = require("js-cookie"), at = [
623
631
  ];
624
632
  function Z(e) {
625
633
  let a, t = 0;
626
- const o = e.split("/");
627
- return at.forEach((l) => {
628
- const n = l.path.split("/");
634
+ const l = e.split("/");
635
+ return lt.forEach((o) => {
636
+ const n = o.path.split("/");
629
637
  let r = 0;
630
- for (let c = 0; c < o.length && !(c >= n.length || o[c] !== n[c]); c++)
638
+ for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
631
639
  r++;
632
- r >= t && (a = l, t = r);
640
+ r >= t && (a = o, t = r);
633
641
  }), a;
634
642
  }
635
643
  function ae(e) {
@@ -641,28 +649,28 @@ function ae(e) {
641
649
  const t = e.split("/");
642
650
  return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
643
651
  }
644
- const oe = i("");
652
+ const le = i("");
645
653
  function k(e, a) {
646
- const t = ae(e), o = ae(a), l = t.app === o.app, n = t.path === o.path, r = t.level >= o.level;
654
+ const t = ae(e), l = ae(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
647
655
  console.info(
648
- `~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${l} forward=${r}`
649
- ), l ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
656
+ `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
657
+ ), o ? n ? le.value = "" : le.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
650
658
  }
651
659
  function ot() {
652
660
  return !!_e.get("accessToken");
653
661
  }
654
- function lt() {
662
+ function rt() {
655
663
  return !!_e.get("activeOrg");
656
664
  }
657
- function Ct(e, a, t) {
658
- const o = ot(), l = lt(), n = Z(e.path);
665
+ function Vt(e, a, t) {
666
+ const l = ot(), o = rt(), n = Z(e.path);
659
667
  if (!n) {
660
668
  t();
661
669
  return;
662
670
  }
663
671
  if (n.requiredState === "auth")
664
- if (o)
665
- if (l) {
672
+ if (l)
673
+ if (o) {
666
674
  const r = "/main";
667
675
  k(r, a.path), t({ path: r });
668
676
  } else
@@ -672,8 +680,8 @@ function Ct(e, a, t) {
672
680
  k(r, a.path), t({ path: r });
673
681
  }
674
682
  else if (n.requiredState === "org")
675
- if (o)
676
- if (l)
683
+ if (l)
684
+ if (o)
677
685
  k(e.path, a.path), t();
678
686
  else {
679
687
  const r = "/org/joinOrCreate";
@@ -683,8 +691,8 @@ function Ct(e, a, t) {
683
691
  const r = "/passport/login";
684
692
  k(r, a.path), t({ path: r });
685
693
  }
686
- else if (o)
687
- if (l) {
694
+ else if (l)
695
+ if (o) {
688
696
  const r = "/main";
689
697
  k(r, a.path), t({ path: r });
690
698
  } else {
@@ -694,37 +702,37 @@ function Ct(e, a, t) {
694
702
  else
695
703
  k(e.path, a.path), t();
696
704
  }
697
- function Vt(e) {
698
- const a = je(), t = re(), o = Y(), l = ne(), n = (u) => {
699
- if (u.key === "Escape") {
705
+ function Dt(e) {
706
+ const a = Ie(), t = re(), l = Y(), o = ne(), n = (c) => {
707
+ if (c.key === "Escape") {
700
708
  r();
701
709
  return;
702
710
  }
703
- if (!e && u.ctrlKey && u.key.toLowerCase() === "d") {
704
- c();
711
+ if (!e && c.ctrlKey && c.key.toLowerCase() === "d") {
712
+ u();
705
713
  return;
706
714
  }
707
- if (!e && u.ctrlKey && u.key.toLowerCase() === "l") {
708
- _();
715
+ if (!e && c.ctrlKey && c.key.toLowerCase() === "l") {
716
+ s();
709
717
  return;
710
718
  }
711
719
  }, r = () => {
712
720
  var y;
713
- if (!l.isEmpty()) {
714
- l.hasView("waitDlg") || l.popView();
721
+ if (!o.isEmpty()) {
722
+ o.hasView("waitDlg") || o.popView();
715
723
  return;
716
724
  }
717
- const u = Z(a.path);
718
- (u == null ? void 0 : u.level) === 0 ? (y = navigator == null ? void 0 : navigator.Backbutton) == null || y.goHome(
725
+ const c = Z(a.path);
726
+ (c == null ? void 0 : c.level) === 0 ? (y = navigator == null ? void 0 : navigator.Backbutton) == null || y.goHome(
719
727
  () => {
720
728
  },
721
729
  () => {
722
730
  }
723
731
  ) : t.back();
724
- }, c = () => {
725
- o.dark = !o.dark;
726
- }, _ = () => {
727
- o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
732
+ }, u = () => {
733
+ l.dark = !l.dark;
734
+ }, s = () => {
735
+ l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
728
736
  };
729
737
  return D(() => {
730
738
  window.addEventListener("keydown", n, !1);
@@ -732,80 +740,80 @@ function Vt(e) {
732
740
  window.removeEventListener("keydown", n, !1);
733
741
  }), {};
734
742
  }
735
- function Dt() {
743
+ function qt() {
736
744
  const e = Y();
737
- function a(t, o) {
738
- const l = e.permissionObjects[t];
739
- return l ? o ? !(!te(l.includes, o) || te(l.excludes, o)) : !0 : !1;
745
+ function a(t, l) {
746
+ const o = e.permissionObjects[t];
747
+ return o ? l ? !(!te(o.includes, l) || te(o.excludes, l)) : !0 : !1;
740
748
  }
741
749
  return { verifyPermission: a };
742
750
  }
743
- function rt(e, a) {
751
+ function nt(e, a) {
744
752
  return e.post("pullPermission", a);
745
753
  }
746
- function qt(e) {
754
+ function St(e) {
747
755
  const a = Y();
748
756
  let t;
749
- const o = () => {
757
+ const l = () => {
750
758
  clearTimeout(t), t = setTimeout(async () => {
751
- await l(), t && o();
759
+ await o(), t && l();
752
760
  }, 3e3);
753
- }, l = async () => {
761
+ }, o = async () => {
754
762
  try {
755
- const { update: n, permissions: r } = await rt(e, {
763
+ const { update: n, permissions: r } = await nt(e, {
756
764
  checksum: a.permissionChecksum
757
765
  });
758
766
  if (!n)
759
767
  return;
760
- const c = {};
761
- for (const _ in r) {
762
- if (_ === "checksum")
768
+ const u = {};
769
+ for (const s in r) {
770
+ if (s === "checksum")
763
771
  continue;
764
- const u = r[_];
765
- c[_] = JSON.parse(u);
772
+ const c = r[s];
773
+ u[s] = JSON.parse(c);
766
774
  }
767
- a.permissionObjects = c, a.permissionChecksum = r.checksum ?? "";
775
+ a.permissionObjects = u, a.permissionChecksum = r.checksum ?? "";
768
776
  } catch (n) {
769
777
  console.error(n);
770
778
  }
771
779
  };
772
780
  return D(() => {
773
- l(), o();
781
+ o(), l();
774
782
  }), T(() => {
775
783
  clearTimeout(t), t = void 0;
776
784
  }), {};
777
785
  }
778
- function St() {
779
- const e = K(), { width: a } = Re(), t = f(() => e.global.name.value), o = f(() => !!window.cordova), l = f(() => a.value <= 1280 ? a.value + "px" : a.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
780
- return { dark: t, sysBarAvail: o, compactWidth: l };
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
+ return { dark: t, sysBarAvail: l, compactWidth: o };
781
789
  }
782
- const Tt = { install: Xe };
790
+ const Ot = { install: Ge };
783
791
  export {
784
- tt as Permission,
785
- bt as appAppear,
786
- ht as closeWaitDlg,
787
- it as createAxios,
788
- Tt as default,
789
- s as eventBus,
792
+ at as Permission,
793
+ Ct as appAppear,
794
+ wt as closeWaitDlg,
795
+ gt as createAxios,
796
+ Ot as default,
797
+ _ as eventBus,
790
798
  te as isExist,
791
799
  Z as matchRouteMeta,
792
- wt as messageError,
793
- yt as messageInfo,
794
- xt as messageSuccess,
795
- kt as messageWarning,
796
- Ct as onBeforeEach,
797
- gt as openConfirmDlg,
798
- vt as openPromptDlg,
799
- mt as openWaitDlg,
800
- oe as routeTransName,
801
- ft as useColor,
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
+ le as routeTransName,
809
+ it as useColor,
802
810
  Y as useGlobalStore,
803
- Vt as useHotkey,
804
- Dt as usePermission,
805
- qt as usePullPermission,
806
- St as useSystem,
811
+ Dt as useHotkey,
812
+ qt as usePermission,
813
+ St as usePullPermission,
814
+ Tt as useSystem,
807
815
  ne as useViewMgrStore,
808
816
  Q as useViewStack,
809
- dt as waitMs,
817
+ ft as waitMs,
810
818
  G as waitUtil
811
819
  };
@@ -1,19 +1,25 @@
1
1
  export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr", import("pinia")._UnwrapAll<Pick<{
2
2
  isEmpty: () => boolean;
3
+ lastView: () => string | undefined;
3
4
  hasView: (name: string) => boolean;
4
5
  addView: (name: string) => void;
5
6
  delView: (name: string) => void;
6
7
  popView: () => void;
8
+ clearViews: () => void;
7
9
  }, never>>, Pick<{
8
10
  isEmpty: () => boolean;
11
+ lastView: () => string | undefined;
9
12
  hasView: (name: string) => boolean;
10
13
  addView: (name: string) => void;
11
14
  delView: (name: string) => void;
12
15
  popView: () => void;
16
+ clearViews: () => void;
13
17
  }, never>, Pick<{
14
18
  isEmpty: () => boolean;
19
+ lastView: () => string | undefined;
15
20
  hasView: (name: string) => boolean;
16
21
  addView: (name: string) => void;
17
22
  delView: (name: string) => void;
18
23
  popView: () => void;
19
- }, "isEmpty" | "hasView" | "addView" | "delView" | "popView">>;
24
+ clearViews: () => void;
25
+ }, "isEmpty" | "lastView" | "hasView" | "addView" | "delView" | "popView" | "clearViews">>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.3.11",
4
+ "version": "0.3.13",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",