x-essential-lib 0.5.17 → 0.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  export * from './color';
2
2
  export * from './microApp';
3
+ export * from './permission';
3
4
  export * from './system';
4
5
  export * from './viewStack';
package/dist/index.js CHANGED
@@ -1,11 +1,30 @@
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-0ce1c82d]{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 f, computed as i, onMounted as C, onBeforeUnmount as S, defineComponent as T, watch as K, resolveComponent as v, openBlock as b, createBlock as j, unref as L, isRef as J, withKeys as F, withModifiers as U, withCtx as m, createVNode as y, createTextVNode as I, toDisplayString as R, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as g, reactive as we, Fragment as he, renderList as ye, createCommentVNode as xe } from "vue";
3
- import { useLocale as G, useTheme as N, useDisplay as ke } from "vuetify";
4
- import { defineStore as be } from "pinia";
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, computed as g, onMounted as V, onBeforeUnmount as I, defineComponent as T, watch as X, resolveComponent as m, openBlock as b, createBlock as j, unref as z, isRef as G, withKeys as F, withModifiers as U, withCtx as h, createVNode as y, createTextVNode as q, toDisplayString as S, createElementBlock as N, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as v, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
3
+ import { useLocale as J, useTheme as K, useDisplay as be } from "vuetify";
4
+ import { defineStore as le } from "pinia";
5
5
  import Ce from "axios";
6
- import { useRouter as ne, useRoute as De } from "vue-router";
7
- const re = be("viewMgr", () => {
8
- const e = f([]);
6
+ import { useRouter as re, useRoute as De } from "vue-router";
7
+ const ne = le(
8
+ "global",
9
+ () => {
10
+ const e = i(), a = i("en"), t = i({}), l = i("");
11
+ return {
12
+ dark: e,
13
+ locale: a,
14
+ permissionObjects: t,
15
+ permissionChecksum: l
16
+ };
17
+ },
18
+ {
19
+ persist: [
20
+ {
21
+ storage: localStorage,
22
+ paths: ["dark", "locale", "permissionObjects", "permissionChecksum"]
23
+ }
24
+ ]
25
+ }
26
+ ), ce = le("viewMgr", () => {
27
+ const e = i([]);
9
28
  function a() {
10
29
  return e.value.length <= 0;
11
30
  }
@@ -20,11 +39,11 @@ const re = be("viewMgr", () => {
20
39
  function o(u) {
21
40
  e.value.push(u);
22
41
  }
23
- function r(u) {
24
- const s = e.value.findIndex((w) => w === u);
42
+ function n(u) {
43
+ const s = e.value.findIndex((_) => _ === u);
25
44
  s !== -1 && e.value.splice(s, e.value.length - s);
26
45
  }
27
- function n() {
46
+ function r() {
28
47
  console.assert(e.value.length > 0), e.value.pop();
29
48
  }
30
49
  function c() {
@@ -36,13 +55,13 @@ const re = be("viewMgr", () => {
36
55
  lastView: t,
37
56
  hasView: l,
38
57
  addView: o,
39
- delView: r,
40
- popView: n,
58
+ delView: n,
59
+ popView: r,
41
60
  clearViews: c
42
61
  };
43
62
  });
44
63
  /*! js-cookie v3.0.5 | MIT */
45
- function z(e) {
64
+ function L(e) {
46
65
  for (var a = 1; a < arguments.length; a++) {
47
66
  var t = arguments[a];
48
67
  for (var l in t)
@@ -50,7 +69,7 @@ function z(e) {
50
69
  }
51
70
  return e;
52
71
  }
53
- var Ve = {
72
+ var Se = {
54
73
  read: function(e) {
55
74
  return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
56
75
  },
@@ -61,48 +80,48 @@ var Ve = {
61
80
  );
62
81
  }
63
82
  };
64
- function X(e, a) {
65
- function t(o, r, n) {
83
+ function H(e, a) {
84
+ function t(o, n, r) {
66
85
  if (!(typeof document > "u")) {
67
- n = z({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
86
+ r = L({}, 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);
68
87
  var c = "";
69
- for (var u in n)
70
- n[u] && (c += "; " + u, n[u] !== !0 && (c += "=" + n[u].split(";")[0]));
71
- return document.cookie = o + "=" + e.write(r, o) + c;
88
+ for (var u in r)
89
+ r[u] && (c += "; " + u, r[u] !== !0 && (c += "=" + r[u].split(";")[0]));
90
+ return document.cookie = o + "=" + e.write(n, o) + c;
72
91
  }
73
92
  }
74
93
  function l(o) {
75
94
  if (!(typeof document > "u" || arguments.length && !o)) {
76
- for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
77
- var u = r[c].split("="), s = u.slice(1).join("=");
95
+ for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
96
+ var u = n[c].split("="), s = u.slice(1).join("=");
78
97
  try {
79
- var w = decodeURIComponent(u[0]);
80
- if (n[w] = e.read(s, w), o === w)
98
+ var _ = decodeURIComponent(u[0]);
99
+ if (r[_] = e.read(s, _), o === _)
81
100
  break;
82
101
  } catch {
83
102
  }
84
103
  }
85
- return o ? n[o] : n;
104
+ return o ? r[o] : r;
86
105
  }
87
106
  }
88
107
  return Object.create(
89
108
  {
90
109
  set: t,
91
110
  get: l,
92
- remove: function(o, r) {
111
+ remove: function(o, n) {
93
112
  t(
94
113
  o,
95
114
  "",
96
- z({}, r, {
115
+ L({}, n, {
97
116
  expires: -1
98
117
  })
99
118
  );
100
119
  },
101
120
  withAttributes: function(o) {
102
- return X(this.converter, z({}, this.attributes, o));
121
+ return H(this.converter, L({}, this.attributes, o));
103
122
  },
104
123
  withConverter: function(o) {
105
- return X(z({}, this.converter, o), this.attributes);
124
+ return H(L({}, this.converter, o), this.attributes);
106
125
  }
107
126
  },
108
127
  {
@@ -111,47 +130,47 @@ function X(e, a) {
111
130
  }
112
131
  );
113
132
  }
114
- var O = X(Ve, { path: "/" });
115
- function lt(e) {
133
+ var O = H(Se, { path: "/" });
134
+ function ot(e) {
116
135
  const a = Ce.create({
117
136
  timeout: 6e3
118
137
  });
119
138
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
120
- (t) => Re(t),
139
+ (t) => Ve(t),
121
140
  (t) => {
122
- Se(t, e.onError);
141
+ Re(t, e.onError);
123
142
  }
124
143
  ), a.interceptors.response.use(
125
144
  (t) => qe(t),
126
- (t) => Ie(t, e.onError)
145
+ (t) => Oe(t, e.onError)
127
146
  ), a;
128
147
  }
129
- function Re(e) {
148
+ function Ve(e) {
130
149
  const a = O.get("accessToken") ?? "";
131
150
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
132
151
  }
133
- function Se(e, a) {
152
+ function Re(e, a) {
134
153
  console.error(e), a("request timeout");
135
154
  }
136
155
  function qe(e) {
137
156
  return e.data;
138
157
  }
139
- function Ie(e, a) {
158
+ function Oe(e, a) {
140
159
  var o;
141
160
  const t = e.response;
142
161
  if (!t)
143
162
  return Promise.reject(e);
144
- t.status === 401 && Oe();
163
+ t.status === 401 && je();
145
164
  let l = (o = t.data) == null ? void 0 : o.message;
146
165
  return l || (l = {
147
166
  code: t.status,
148
167
  message: t.statusText
149
168
  }), a(l), Promise.reject(e);
150
169
  }
151
- function Oe() {
152
- O.remove("accessToken"), O.remove("refreshToken"), O.remove("activeOrg"), ne().replace({ path: "/passport/login" });
170
+ function je() {
171
+ O.remove("accessToken"), O.remove("refreshToken"), O.remove("activeOrg"), re().replace({ path: "/passport/login" });
153
172
  }
154
- function je(e) {
173
+ function Ie(e) {
155
174
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
156
175
  var l = e.get(a);
157
176
  l ? l.push(t) : e.set(a, [t]);
@@ -168,19 +187,9 @@ function je(e) {
168
187
  } };
169
188
  }
170
189
  const p = function() {
171
- return window.eventBus || (window.eventBus = je()), window.eventBus;
172
- }(), ee = function() {
173
- return window.dark || (window.dark = f()), window.dark;
174
- }(), nt = function() {
175
- return window.locale || (window.locale = f("en")), window.locale;
176
- }(), Te = function() {
177
- return window.permissionObjects || (window.permissionObjects = f()), window.permissionObjects;
178
- }(), rt = function() {
179
- return window.permissionChecksum || (window.permissionChecksum = f("")), window.permissionChecksum;
180
- }(), ct = function() {
181
- return window.mainActive || (window.mainActive = f(1)), window.mainActive;
190
+ return window.eventBus || (window.eventBus = Ie()), window.eventBus;
182
191
  }();
183
- async function ut(e) {
192
+ async function lt(e) {
184
193
  return new Promise((a) => {
185
194
  setTimeout(a, e);
186
195
  });
@@ -188,13 +197,13 @@ async function ut(e) {
188
197
  async function Q(e, a, t) {
189
198
  const l = Date.now();
190
199
  return new Promise((o) => {
191
- const r = async () => {
192
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
200
+ const n = async () => {
201
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
193
202
  };
194
- r();
203
+ n();
195
204
  });
196
205
  }
197
- function pt(e) {
206
+ function rt(e) {
198
207
  var l, o;
199
208
  if (!window.appAppear) {
200
209
  window.appAppear = !0;
@@ -205,53 +214,53 @@ function pt(e) {
205
214
  t.add("app-reset");
206
215
  }, 0));
207
216
  }
208
- let te = Date.now();
209
- function ce() {
217
+ let ee = Date.now();
218
+ function ue() {
210
219
  const e = Date.now();
211
- return e - te > 500 ? (te = e, !0) : !1;
220
+ return e - ee > 500 ? (ee = e, !0) : !1;
212
221
  }
213
- let Ae = 0;
214
- function ue() {
215
- return ++Ae;
222
+ let Te = 0;
223
+ function pe() {
224
+ return ++Te;
216
225
  }
217
- async function _t(e) {
218
- if (!ce())
226
+ async function nt(e) {
227
+ if (!ue())
219
228
  return;
220
229
  let a = !1, t;
221
- const l = (r) => {
222
- t = r, a = !0;
223
- }, o = ue();
230
+ const l = (n) => {
231
+ t = n, a = !0;
232
+ }, o = pe();
224
233
  return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await Q(() => a), p.off("confirmDlgResult" + o, l), t;
225
234
  }
226
- async function st(e) {
227
- if (!ce())
235
+ async function ct(e) {
236
+ if (!ue())
228
237
  return;
229
238
  let a = !1, t;
230
- const l = (r) => {
231
- t = r, a = !0;
232
- }, o = ue();
239
+ const l = (n) => {
240
+ t = n, a = !0;
241
+ }, o = pe();
233
242
  return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await Q(() => a), p.off("promptDlgResult" + o, l), t;
234
243
  }
235
- function dt() {
244
+ function ut() {
236
245
  p.emit("openWaitDlg");
237
246
  }
238
- function ft() {
247
+ function pt() {
239
248
  p.emit("closeWaitDlg");
240
249
  }
241
- function it(e, a) {
250
+ function st(e, a) {
242
251
  p.emit("message", { type: "error", text: e, timeout: a });
243
252
  }
244
- function gt(e, a) {
253
+ function _t(e, a) {
245
254
  p.emit("message", { type: "info", text: e, timeout: a });
246
255
  }
247
- function vt(e, a) {
256
+ function dt(e, a) {
248
257
  p.emit("message", { type: "success", text: e, timeout: a });
249
258
  }
250
- function mt(e, a) {
259
+ function ft(e, a) {
251
260
  p.emit("message", { type: "warning", text: e, timeout: a });
252
261
  }
253
262
  var Be = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Be || {});
254
- function ae(e, a) {
263
+ function te(e, a) {
255
264
  if (!e)
256
265
  return !1;
257
266
  let t = e;
@@ -264,10 +273,6 @@ function ae(e, a) {
264
273
  return !1;
265
274
  }), Object.keys(t).length <= 0);
266
275
  }
267
- function wt(e, a) {
268
- const t = Te.value[e];
269
- return t ? a ? !(!ae(t.includes, a) || ae(t.excludes, a)) : !0 : !1;
270
- }
271
276
  const Ee = [
272
277
  { path: "/passport/login", level: 0 },
273
278
  { path: "/passport/loginAccount", level: 1 },
@@ -291,14 +296,14 @@ function Y(e) {
291
296
  let a, t = 0;
292
297
  const l = e.split("/").filter((o) => o.trim() !== "");
293
298
  return Ee.forEach((o) => {
294
- const r = o.path.split("/").filter((c) => c.trim() !== "");
295
- let n = 0;
296
- for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
297
- n++;
298
- n > 0 && n >= t && (a = o, t = n);
299
+ const n = o.path.split("/").filter((c) => c.trim() !== "");
300
+ let r = 0;
301
+ for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
302
+ r++;
303
+ r > 0 && r >= t && (a = o, t = r);
299
304
  }), a;
300
305
  }
301
- function oe(e) {
306
+ function ae(e) {
302
307
  if (e === "/")
303
308
  return { app: "", path: "/", level: -1 };
304
309
  const a = Y(e);
@@ -307,146 +312,146 @@ function oe(e) {
307
312
  const t = e.split("/");
308
313
  return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
309
314
  }
310
- const le = f("");
315
+ const oe = i("");
311
316
  function k(e, a) {
312
- const t = oe(e), l = oe(a), o = t.app === l.app, r = t.path === l.path, n = t.level >= l.level;
317
+ const t = ae(e), l = ae(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
313
318
  console.info(
314
- `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${n}`
315
- ), o ? r ? le.value = "" : le.value = n ? "inner-left" : "inner-right" : window.routeExtras = { forward: n };
319
+ `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
320
+ ), o ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
316
321
  }
317
- function Ue() {
322
+ function Ae() {
318
323
  return !!O.get("accessToken");
319
324
  }
320
- function Me() {
325
+ function Ue() {
321
326
  return !!O.get("activeOrg");
322
327
  }
323
- function ht(e, a, t) {
324
- const l = Ue(), o = Me(), r = Y(e.path);
325
- if (!r) {
328
+ function it(e, a, t) {
329
+ const l = Ae(), o = Ue(), n = Y(e.path);
330
+ if (!n) {
326
331
  t();
327
332
  return;
328
333
  }
329
- if (r.requiredState === "auth")
334
+ if (n.requiredState === "auth")
330
335
  if (l)
331
336
  if (o) {
332
- const n = "/main";
333
- k(n, a.path), t({ path: n });
337
+ const r = "/main";
338
+ k(r, a.path), t({ path: r });
334
339
  } else
335
340
  k(e.path, a.path), t();
336
341
  else {
337
- const n = "/passport/login";
338
- k(n, a.path), t({ path: n });
342
+ const r = "/passport/login";
343
+ k(r, a.path), t({ path: r });
339
344
  }
340
- else if (r.requiredState === "org")
345
+ else if (n.requiredState === "org")
341
346
  if (l)
342
347
  if (o)
343
348
  k(e.path, a.path), t();
344
349
  else {
345
- const n = "/org/joinOrCreate";
346
- k(n, a.path), t({ path: n });
350
+ const r = "/org/joinOrCreate";
351
+ k(r, a.path), t({ path: r });
347
352
  }
348
353
  else {
349
- const n = "/passport/login";
350
- k(n, a.path), t({ path: n });
354
+ const r = "/passport/login";
355
+ k(r, a.path), t({ path: r });
351
356
  }
352
357
  else if (l)
353
358
  if (o) {
354
- const n = "/main";
355
- k(n, a.path), t({ path: n });
359
+ const r = "/main";
360
+ k(r, a.path), t({ path: r });
356
361
  } else {
357
- const n = "/org/joinOrCreate";
358
- k(n, a.path), t({ path: n });
362
+ const r = "/org/joinOrCreate";
363
+ k(r, a.path), t({ path: r });
359
364
  }
360
365
  else
361
366
  k(e.path, a.path), t();
362
367
  }
363
368
  function Z(e, a) {
364
- const t = re(), l = i({
369
+ const t = ce(), l = g({
365
370
  get() {
366
371
  return t.hasView(e);
367
372
  },
368
- set(r) {
369
- r ? t.addView(e) : t.delView(e);
373
+ set(n) {
374
+ n ? t.addView(e) : t.delView(e);
370
375
  }
371
- }), o = (r) => {
372
- a == null || a(r), l.value = !0;
376
+ }), o = (n) => {
377
+ a == null || a(n), l.value = !0;
373
378
  };
374
- return C(() => {
379
+ return V(() => {
375
380
  p.on(e, o);
376
- }), S(() => {
381
+ }), I(() => {
377
382
  p.off(e, o);
378
383
  }), { open: l };
379
384
  }
380
- const $e = /* @__PURE__ */ T({
385
+ const Me = /* @__PURE__ */ T({
381
386
  __name: "index",
382
387
  setup(e) {
383
- const a = G(), { open: t } = Z("confirmDlg"), l = f(""), o = f(""), r = f(), n = f(), c = i(() => {
384
- var d;
385
- return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
386
- }), u = i(() => {
387
- var d;
388
- return ((d = r.value) == null ? void 0 : d.text) ?? a.t("cancel");
389
- }), s = i(() => {
390
- var d;
391
- return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
392
- }), w = i(() => {
393
- var d;
394
- return ((d = n.value) == null ? void 0 : d.text) ?? a.t("confirm");
388
+ const a = J(), { open: t } = Z("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), c = g(() => {
389
+ var f;
390
+ return ((f = n.value) == null ? void 0 : f.color) ?? "primary";
391
+ }), u = g(() => {
392
+ var f;
393
+ return ((f = n.value) == null ? void 0 : f.text) ?? a.t("cancel");
394
+ }), s = g(() => {
395
+ var f;
396
+ return ((f = r.value) == null ? void 0 : f.color) ?? "primary";
397
+ }), _ = g(() => {
398
+ var f;
399
+ return ((f = r.value) == null ? void 0 : f.text) ?? a.t("confirm");
395
400
  });
396
- let q = 0, D = !1;
397
- const M = (d) => {
398
- l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, q = d.seq, D = !1, t.value = !0;
401
+ let R = 0, C = !1;
402
+ const M = (f) => {
403
+ l.value = f.title, o.value = f.text, n.value = f.cancel, r.value = f.confirm, R = f.seq, C = !1, t.value = !0;
399
404
  };
400
- C(() => {
405
+ V(() => {
401
406
  p.on("confirmDlg", M);
402
- }), S(() => {
407
+ }), I(() => {
403
408
  p.off("confirmDlg", M);
404
409
  });
405
410
  const $ = () => {
406
- t.value = !1, D || (p.emit("confirmDlgResult" + q, !0), D = !0);
411
+ t.value = !1, C || (p.emit("confirmDlgResult" + R, !0), C = !0);
407
412
  };
408
- return K(t, (d) => {
409
- !d && !D && (p.emit("confirmDlgResult" + q, !1), D = !0);
410
- }), (d, x) => {
411
- const V = v("v-card-text"), A = v("v-btn"), W = v("v-card-actions"), _ = v("v-card"), h = v("v-dialog");
412
- return b(), j(h, {
413
- modelValue: L(t),
414
- "onUpdate:modelValue": x[1] || (x[1] = (B) => J(t) ? t.value = B : null),
413
+ return X(t, (f) => {
414
+ !f && !C && (p.emit("confirmDlgResult" + R, !1), C = !0);
415
+ }), (f, x) => {
416
+ const D = m("v-card-text"), B = m("v-btn"), W = m("v-card-actions"), d = m("v-card"), w = m("v-dialog");
417
+ return b(), j(w, {
418
+ modelValue: z(t),
419
+ "onUpdate:modelValue": x[1] || (x[1] = (E) => G(t) ? t.value = E : null),
415
420
  onKeydown: [
416
- x[2] || (x[2] = F(U((B) => t.value = !1, ["stop", "prevent"]), ["esc"])),
421
+ x[2] || (x[2] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
417
422
  F(U($, ["stop", "prevent"]), ["enter"])
418
423
  ],
419
424
  transition: "dialog-top-transition",
420
425
  "max-width": "600px"
421
426
  }, {
422
- default: m(() => [
423
- y(_, { title: l.value }, {
424
- default: m(() => [
425
- y(V, null, {
426
- default: m(() => [
427
- I(R(o.value), 1)
427
+ default: h(() => [
428
+ y(d, { title: l.value }, {
429
+ default: h(() => [
430
+ y(D, null, {
431
+ default: h(() => [
432
+ q(S(o.value), 1)
428
433
  ]),
429
434
  _: 1
430
435
  }),
431
436
  y(W, { class: "d-flex justify-end" }, {
432
- default: m(() => [
433
- y(A, {
434
- onClick: x[0] || (x[0] = (B) => t.value = !1),
437
+ default: h(() => [
438
+ y(B, {
439
+ onClick: x[0] || (x[0] = (E) => t.value = !1),
435
440
  color: c.value,
436
441
  variant: "text"
437
442
  }, {
438
- default: m(() => [
439
- I(R(u.value), 1)
443
+ default: h(() => [
444
+ q(S(u.value), 1)
440
445
  ]),
441
446
  _: 1
442
447
  }, 8, ["color"]),
443
- y(A, {
448
+ y(B, {
444
449
  onClick: $,
445
450
  color: s.value,
446
451
  variant: "text"
447
452
  }, {
448
- default: m(() => [
449
- I(R(w.value), 1)
453
+ default: h(() => [
454
+ q(S(_.value), 1)
450
455
  ]),
451
456
  _: 1
452
457
  }, 8, ["color"])
@@ -461,22 +466,22 @@ const $e = /* @__PURE__ */ T({
461
466
  }, 8, ["modelValue", "onKeydown"]);
462
467
  };
463
468
  }
464
- }), We = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), ze = /* @__PURE__ */ We(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
465
- /* @__PURE__ */ g("div"),
466
- /* @__PURE__ */ g("div"),
467
- /* @__PURE__ */ g("div"),
468
- /* @__PURE__ */ g("div"),
469
- /* @__PURE__ */ g("div"),
470
- /* @__PURE__ */ g("div"),
471
- /* @__PURE__ */ g("div"),
472
- /* @__PURE__ */ g("div"),
473
- /* @__PURE__ */ g("div"),
474
- /* @__PURE__ */ g("div"),
475
- /* @__PURE__ */ g("div"),
476
- /* @__PURE__ */ g("div")
469
+ }), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), We = /* @__PURE__ */ $e(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
470
+ /* @__PURE__ */ v("div"),
471
+ /* @__PURE__ */ v("div"),
472
+ /* @__PURE__ */ v("div"),
473
+ /* @__PURE__ */ v("div"),
474
+ /* @__PURE__ */ v("div"),
475
+ /* @__PURE__ */ v("div"),
476
+ /* @__PURE__ */ v("div"),
477
+ /* @__PURE__ */ v("div"),
478
+ /* @__PURE__ */ v("div"),
479
+ /* @__PURE__ */ v("div"),
480
+ /* @__PURE__ */ v("div"),
481
+ /* @__PURE__ */ v("div")
477
482
  ], -1)), Le = [
478
- ze
479
- ], Fe = /* @__PURE__ */ T({
483
+ We
484
+ ], ze = /* @__PURE__ */ T({
480
485
  __name: "index",
481
486
  props: {
482
487
  zIndex: {
@@ -485,21 +490,21 @@ const $e = /* @__PURE__ */ T({
485
490
  }
486
491
  },
487
492
  setup(e) {
488
- const a = N(), t = e, l = i(() => ({
493
+ const a = K(), t = e, l = g(() => ({
489
494
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
490
495
  zIndex: t.zIndex
491
496
  }));
492
- return (o, r) => (b(), H("div", {
497
+ return (o, n) => (b(), N("div", {
493
498
  class: "x-cont",
494
- style: ge(l.value)
499
+ style: ve(l.value)
495
500
  }, Le, 4));
496
501
  }
497
- }), pe = (e, a) => {
502
+ }), se = (e, a) => {
498
503
  const t = e.__vccOpts || e;
499
504
  for (const [l, o] of a)
500
505
  t[l] = o;
501
506
  return t;
502
- }, Ke = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ T({
507
+ }, Fe = /* @__PURE__ */ se(ze, [["__scopeId", "data-v-f4ad116e"]]), Ke = /* @__PURE__ */ T({
503
508
  __name: "item",
504
509
  props: {
505
510
  id: {},
@@ -509,57 +514,57 @@ const $e = /* @__PURE__ */ T({
509
514
  },
510
515
  emits: ["timeout"],
511
516
  setup(e, { emit: a }) {
512
- const t = e, l = f(!0), o = a;
513
- return C(() => {
517
+ const t = e, l = i(!0), o = a;
518
+ return V(() => {
514
519
  setTimeout(() => {
515
520
  o("timeout", t.id);
516
521
  }, t.timeout);
517
- }), K(l, (r) => {
518
- r || o("timeout", t.id);
519
- }), (r, n) => {
520
- const c = v("v-alert");
522
+ }), X(l, (n) => {
523
+ n || o("timeout", t.id);
524
+ }), (n, r) => {
525
+ const c = m("v-alert");
521
526
  return b(), j(c, {
522
527
  modelValue: l.value,
523
- "onUpdate:modelValue": n[0] || (n[0] = (u) => l.value = u),
528
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => l.value = u),
524
529
  class: "mt-2",
525
530
  "max-width": "90%",
526
531
  width: "500px",
527
532
  elevation: "1",
528
533
  density: "compact",
529
534
  closable: "",
530
- type: r.type,
531
- text: r.text
535
+ type: n.type,
536
+ text: n.text
532
537
  }, null, 8, ["modelValue", "type", "text"]);
533
538
  };
534
539
  }
535
- }), He = /* @__PURE__ */ T({
540
+ }), Ne = /* @__PURE__ */ T({
536
541
  __name: "index",
537
542
  setup(e) {
538
543
  const a = we({ items: [] });
539
- C(() => {
544
+ V(() => {
540
545
  p.on("message", t);
541
- }), S(() => {
546
+ }), I(() => {
542
547
  p.off("message", t);
543
548
  });
544
549
  const t = (c) => {
545
- r(c.type, c.text, c.timeout);
550
+ n(c.type, c.text, c.timeout);
546
551
  }, l = (c) => {
547
- n(c);
552
+ r(c);
548
553
  };
549
554
  let o = 0;
550
- const r = (c, u, s) => {
551
- const w = o++;
552
- a.items.push({ id: w, type: c, text: u, timeout: s });
553
- }, n = (c) => {
555
+ const n = (c, u, s) => {
556
+ const _ = o++;
557
+ a.items.push({ id: _, type: c, text: u, timeout: s });
558
+ }, r = (c) => {
554
559
  const u = a.items.findIndex((s) => s.id === c);
555
560
  u >= 0 && a.items.splice(u, 1);
556
561
  };
557
- return (c, u) => (b(), H("div", {
562
+ return (c, u) => (b(), N("div", {
558
563
  onClick: u[0] || (u[0] = U(() => {
559
564
  }, ["stop"])),
560
565
  class: "x-cont d-flex flex-column-reverse align-center"
561
566
  }, [
562
- (b(!0), H(he, null, ye(a.items, (s) => (b(), j(Ne, {
567
+ (b(!0), N(ye, null, xe(a.items, (s) => (b(), j(Ke, {
563
568
  onTimeout: l,
564
569
  id: s.id,
565
570
  type: s.type,
@@ -569,81 +574,81 @@ const $e = /* @__PURE__ */ T({
569
574
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
570
575
  ]));
571
576
  }
572
- }), Xe = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-0ce1c82d"]]), Je = /* @__PURE__ */ T({
577
+ }), He = /* @__PURE__ */ se(Ne, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ T({
573
578
  __name: "index",
574
579
  setup(e) {
575
- const a = G(), { open: t } = Z("promptDlg"), l = f(""), o = f(""), r = f(), n = f(), c = f(), u = f(""), s = f(), w = f(), q = i(() => {
576
- var _;
577
- return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
578
- }), D = i(() => {
579
- var _;
580
- return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
581
- }), M = i(() => {
582
- var _;
583
- return ((_ = w.value) == null ? void 0 : _.color) ?? "primary";
584
- }), $ = i(() => {
585
- var _;
586
- return ((_ = w.value) == null ? void 0 : _.text) ?? a.t("confirm");
587
- }), d = f();
588
- let x = 0, V = !1;
589
- const A = async (_) => {
590
- var h;
591
- l.value = _.title, o.value = _.text, r.value = _.label, n.value = _.placeholder, c.value = _.rules, u.value = _.value, s.value = _.cancel, w.value = _.confirm, x = _.seq, V = !1, t.value = !0, await Q(() => d.value !== void 0, 1e3), (h = d.value) == null || h.focus();
580
+ const a = J(), { open: t } = Z("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), c = i(), u = i(""), s = i(), _ = i(), R = g(() => {
581
+ var d;
582
+ return ((d = s.value) == null ? void 0 : d.color) ?? "primary";
583
+ }), C = g(() => {
584
+ var d;
585
+ return ((d = s.value) == null ? void 0 : d.text) ?? a.t("cancel");
586
+ }), M = g(() => {
587
+ var d;
588
+ return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
589
+ }), $ = g(() => {
590
+ var d;
591
+ return ((d = _.value) == null ? void 0 : d.text) ?? a.t("confirm");
592
+ }), f = i();
593
+ let x = 0, D = !1;
594
+ const B = async (d) => {
595
+ var w;
596
+ l.value = d.title, o.value = d.text, n.value = d.label, r.value = d.placeholder, c.value = d.rules, u.value = d.value, s.value = d.cancel, _.value = d.confirm, x = d.seq, D = !1, t.value = !0, await Q(() => f.value !== void 0, 1e3), (w = f.value) == null || w.focus();
592
597
  };
593
- C(() => {
594
- p.on("promptDlg", A);
595
- }), S(() => {
596
- p.off("promptDlg", A);
598
+ V(() => {
599
+ p.on("promptDlg", B);
600
+ }), I(() => {
601
+ p.off("promptDlg", B);
597
602
  });
598
603
  const W = () => {
599
- t.value = !1, V || (p.emit("promptDlgResult" + x, u.value ?? ""), V = !0);
604
+ t.value = !1, D || (p.emit("promptDlgResult" + x, u.value ?? ""), D = !0);
600
605
  };
601
- return K(t, (_) => {
602
- !_ && !V && (p.emit("promptDlgResult" + x, void 0), V = !0);
603
- }), (_, h) => {
604
- const B = v("v-card-text"), _e = v("v-text-field"), se = v("v-form"), P = v("v-btn"), de = v("v-card-actions"), fe = v("v-card"), ie = v("v-dialog");
605
- return b(), j(ie, {
606
- modelValue: L(t),
607
- "onUpdate:modelValue": h[2] || (h[2] = (E) => J(t) ? t.value = E : null),
606
+ return X(t, (d) => {
607
+ !d && !D && (p.emit("promptDlgResult" + x, void 0), D = !0);
608
+ }), (d, w) => {
609
+ const E = m("v-card-text"), _e = m("v-text-field"), de = m("v-form"), P = m("v-btn"), fe = m("v-card-actions"), ie = m("v-card"), ge = m("v-dialog");
610
+ return b(), j(ge, {
611
+ modelValue: z(t),
612
+ "onUpdate:modelValue": w[2] || (w[2] = (A) => G(t) ? t.value = A : null),
608
613
  onKeydown: [
609
- h[3] || (h[3] = F(U((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
614
+ w[3] || (w[3] = F(U((A) => t.value = !1, ["stop", "prevent"]), ["esc"])),
610
615
  F(U(W, ["stop", "prevent"]), ["enter"])
611
616
  ],
612
617
  transition: "dialog-top-transition",
613
618
  "max-width": "600px"
614
619
  }, {
615
- default: m(() => [
616
- y(fe, { title: l.value }, {
617
- default: m(() => [
618
- o.value ? (b(), j(B, { key: 0 }, {
619
- default: m(() => [
620
- I(R(o.value), 1)
620
+ default: h(() => [
621
+ y(ie, { title: l.value }, {
622
+ default: h(() => [
623
+ o.value ? (b(), j(E, { key: 0 }, {
624
+ default: h(() => [
625
+ q(S(o.value), 1)
621
626
  ]),
622
627
  _: 1
623
- })) : xe("", !0),
624
- y(se, { class: "mx-3" }, {
625
- default: m(() => [
628
+ })) : ke("", !0),
629
+ y(de, { class: "mx-3" }, {
630
+ default: h(() => [
626
631
  y(_e, {
627
632
  modelValue: u.value,
628
- "onUpdate:modelValue": h[0] || (h[0] = (E) => u.value = E),
629
- label: r.value,
630
- placeholder: n.value,
633
+ "onUpdate:modelValue": w[0] || (w[0] = (A) => u.value = A),
634
+ label: n.value,
635
+ placeholder: r.value,
631
636
  rules: c.value,
632
637
  ref_key: "target",
633
- ref: d
638
+ ref: f
634
639
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
635
640
  ]),
636
641
  _: 1
637
642
  }),
638
- y(de, { class: "d-flex justify-end" }, {
639
- default: m(() => [
643
+ y(fe, { class: "d-flex justify-end" }, {
644
+ default: h(() => [
640
645
  y(P, {
641
- onClick: h[1] || (h[1] = (E) => t.value = !1),
642
- color: q.value,
646
+ onClick: w[1] || (w[1] = (A) => t.value = !1),
647
+ color: R.value,
643
648
  variant: "text"
644
649
  }, {
645
- default: m(() => [
646
- I(R(D.value), 1)
650
+ default: h(() => [
651
+ q(S(C.value), 1)
647
652
  ]),
648
653
  _: 1
649
654
  }, 8, ["color"]),
@@ -652,8 +657,8 @@ const $e = /* @__PURE__ */ T({
652
657
  color: M.value,
653
658
  variant: "text"
654
659
  }, {
655
- default: m(() => [
656
- I(R($.value), 1)
660
+ default: h(() => [
661
+ q(S($.value), 1)
657
662
  ]),
658
663
  _: 1
659
664
  }, 8, ["color"])
@@ -668,37 +673,37 @@ const $e = /* @__PURE__ */ T({
668
673
  }, 8, ["modelValue", "onKeydown"]);
669
674
  };
670
675
  }
671
- }), Ge = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ T({
676
+ }), Ge = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ T({
672
677
  __name: "index",
673
678
  setup(e) {
674
- const a = G(), { open: t } = Z("waitDlg"), l = () => {
679
+ const a = J(), { open: t } = Z("waitDlg"), l = () => {
675
680
  t.value = !0;
676
681
  }, o = () => {
677
682
  t.value = !1;
678
683
  };
679
- return C(() => {
684
+ return V(() => {
680
685
  p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
681
- }), S(() => {
686
+ }), I(() => {
682
687
  p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
683
- }), (r, n) => {
684
- const c = v("v-card"), u = v("v-dialog");
688
+ }), (n, r) => {
689
+ const c = m("v-card"), u = m("v-dialog");
685
690
  return b(), j(u, {
686
- modelValue: L(t),
687
- "onUpdate:modelValue": n[0] || (n[0] = (s) => J(t) ? t.value = s : null),
691
+ modelValue: z(t),
692
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => G(t) ? t.value = s : null),
688
693
  persistent: "",
689
694
  "no-click-animation": "",
690
695
  fullscreen: ""
691
696
  }, {
692
- default: m(() => [
693
- g("div", Ge, [
697
+ default: h(() => [
698
+ v("div", Ge, [
694
699
  y(c, {
695
700
  width: "300px",
696
701
  height: "80px",
697
702
  loading: ""
698
703
  }, {
699
- default: m(() => [
700
- g("div", Qe, [
701
- g("span", null, R(L(a).t("waitingResponse")), 1)
704
+ default: h(() => [
705
+ v("div", Je, [
706
+ v("span", null, S(z(a).t("waitingResponse")), 1)
702
707
  ])
703
708
  ]),
704
709
  _: 1
@@ -709,88 +714,85 @@ const $e = /* @__PURE__ */ T({
709
714
  }, 8, ["modelValue"]);
710
715
  };
711
716
  }
712
- }), Ze = (e) => {
713
- e.component("x-confirm-dlg", $e), e.component("x-loading", Ke), e.component("x-message", Xe), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Ye);
717
+ }), Ye = (e) => {
718
+ e.component("x-confirm-dlg", Me), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Xe), e.component("x-wait-dlg", Qe);
714
719
  };
715
- function yt() {
716
- const e = N(), 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"), r = i(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = i(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
720
+ function gt() {
721
+ const e = K(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
717
722
  return {
718
723
  primaryColor: a,
719
724
  secondaryColor: t,
720
725
  backgroundColor0: l,
721
726
  backgroundColor1: o,
722
- backgroundColor2: r,
723
- highlightColor: n,
727
+ backgroundColor2: n,
728
+ highlightColor: r,
724
729
  borderColor: c
725
730
  };
726
731
  }
727
- function xt() {
728
- const e = De(), a = ne(), t = N(), l = re();
729
- K(
730
- ee,
731
- () => {
732
- t.global.name.value = ee.value ? "dark" : "light";
733
- },
734
- { immediate: !0 }
735
- );
736
- const o = () => {
737
- if (!l.isEmpty()) {
738
- l.hasView("waitDlg") || l.popView();
732
+ function vt() {
733
+ const e = De(), a = re(), t = K(), l = ne(), o = ce(), n = (_) => {
734
+ l.dark = _, t.global.name.value = l.dark ? "dark" : "light";
735
+ }, r = (_) => {
736
+ l.locale = _;
737
+ }, c = (_) => {
738
+ l.permissionObjects = _.permissionObjects, l.permissionChecksum = _.permissionChecksum;
739
+ }, u = () => {
740
+ if (!o.isEmpty()) {
741
+ o.hasView("waitDlg") || o.popView();
739
742
  return;
740
743
  }
741
- const n = Y(e.path);
742
- (n == null ? void 0 : n.level) === 0 || a.back();
743
- };
744
- C(() => {
745
- p.on("backbutton", o);
746
- }), S(() => {
747
- p.off("backbutton", o);
748
- });
749
- const r = (n) => {
750
- if (n.key === "Escape") {
751
- o();
744
+ const _ = Y(e.path);
745
+ (_ == null ? void 0 : _.level) === 0 || a.back();
746
+ }, s = (_) => {
747
+ if (_.key === "Escape") {
748
+ u();
752
749
  return;
753
750
  }
754
751
  };
755
- C(() => {
756
- window.addEventListener("keydown", r);
757
- }), S(() => {
758
- window.removeEventListener("keydown", r);
752
+ V(() => {
753
+ p.on("darkchange", n), p.on("localechange", r), p.on("permissionchange", c), p.on("backbutton", u), window.addEventListener("keydown", s);
754
+ }), I(() => {
755
+ p.off("darkchange", n), p.off("localechange", r), p.off("permissionchange", c), p.off("backbutton", u), window.removeEventListener("keydown", s);
759
756
  });
760
757
  }
761
- function kt() {
762
- const e = N(), a = ke(), 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");
758
+ function mt() {
759
+ const e = ne();
760
+ function a(t, l) {
761
+ const o = e.permissionObjects[t];
762
+ return o ? l ? !(!te(o.includes, l) || te(o.excludes, l)) : !0 : !1;
763
+ }
764
+ return { verifyPermission: a };
765
+ }
766
+ function ht() {
767
+ const e = K(), a = be(), t = g(() => e.current.value.dark), l = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
763
768
  return { dark: t, sysBarAvail: l, compactWidth: o };
764
769
  }
765
- const bt = { install: Ze };
770
+ const wt = { install: Ye };
766
771
  export {
767
772
  Be as Permission,
768
- pt as appAppear,
769
- ft as closeWaitDlg,
770
- lt as createAxios,
771
- ee as dark,
772
- bt as default,
773
+ rt as appAppear,
774
+ pt as closeWaitDlg,
775
+ ot as createAxios,
776
+ wt as default,
773
777
  p as eventBus,
774
- nt as locale,
775
- ct as mainActive,
778
+ te as isExist,
776
779
  Y as matchRouteMeta,
777
- it as messageError,
778
- gt as messageInfo,
779
- vt as messageSuccess,
780
- mt as messageWarning,
781
- ht as onBeforeEach,
782
- _t as openConfirmDlg,
783
- st as openPromptDlg,
784
- dt as openWaitDlg,
785
- rt as permissionChecksum,
786
- Te as permissionObjects,
787
- le as routeTransName,
788
- yt as useColor,
789
- xt as useMicroApp,
790
- kt as useSystem,
791
- re as useViewMgrStore,
780
+ st as messageError,
781
+ _t as messageInfo,
782
+ dt as messageSuccess,
783
+ ft as messageWarning,
784
+ it as onBeforeEach,
785
+ nt as openConfirmDlg,
786
+ ct as openPromptDlg,
787
+ ut as openWaitDlg,
788
+ oe as routeTransName,
789
+ gt as useColor,
790
+ ne as useGlobalStore,
791
+ vt as useMicroApp,
792
+ mt as usePermission,
793
+ ht as useSystem,
794
+ ce as useViewMgrStore,
792
795
  Z as useViewStack,
793
- wt as verifyPermission,
794
- ut as waitMs,
796
+ lt as waitMs,
795
797
  Q as waitUtil
796
798
  };
@@ -1,21 +1,15 @@
1
- import { PermissionObjects } from '../utils/permission';
1
+ import { PermissionObjects } from '../utils';
2
2
  export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
3
- running: import("vue").Ref<boolean>;
4
- mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
5
3
  dark: import("vue").Ref<boolean | undefined>;
6
4
  locale: import("vue").Ref<string>;
7
5
  permissionObjects: import("vue").Ref<PermissionObjects>;
8
6
  permissionChecksum: import("vue").Ref<string>;
9
- }, "mainActive" | "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
10
- running: import("vue").Ref<boolean>;
11
- mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
7
+ }, "dark" | "locale" | "permissionObjects" | "permissionChecksum">>, Pick<{
12
8
  dark: import("vue").Ref<boolean | undefined>;
13
9
  locale: import("vue").Ref<string>;
14
10
  permissionObjects: import("vue").Ref<PermissionObjects>;
15
11
  permissionChecksum: import("vue").Ref<string>;
16
12
  }, never>, Pick<{
17
- running: import("vue").Ref<boolean>;
18
- mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
19
13
  dark: import("vue").Ref<boolean | undefined>;
20
14
  locale: import("vue").Ref<string>;
21
15
  permissionObjects: import("vue").Ref<PermissionObjects>;
@@ -1 +1,2 @@
1
+ export * from './global';
1
2
  export * from './viewMgr';
@@ -1,5 +1,4 @@
1
1
  export * from './axios';
2
- export * from './core';
3
2
  export * from './dialog';
4
3
  export * from './message';
5
4
  export * from './misc';
@@ -1,3 +1,5 @@
1
+ import { Emitter, EventType } from 'mitt';
2
+ export declare const eventBus: Emitter<Record<EventType, unknown>>;
1
3
  export declare function waitMs(ms: number): Promise<void>;
2
4
  export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
3
5
  export declare function appAppear(name: string): void;
@@ -129,5 +129,5 @@ type PermissionObject = {
129
129
  export type PermissionObjects = {
130
130
  [key: string]: PermissionObject;
131
131
  };
132
- export declare function verifyPermission(permission: Permission, instance: string): boolean;
132
+ export declare function isExist(instanceTree: InstanceTree | undefined, instance: string): boolean;
133
133
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.17",
4
+ "version": "0.5.19",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,5 +0,0 @@
1
- export declare function useHotkey(prod: boolean): {
2
- onHotkeyEscape: () => void;
3
- onHotkeyCtrlShiftD: () => void;
4
- onHotkeyCtrlShiftL: () => void;
5
- };
@@ -1,2 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- export declare function usePullPermission(instance: AxiosInstance): {};
@@ -1,9 +0,0 @@
1
- import { Emitter, EventType } from 'mitt';
2
- import { Ref } from 'vue';
3
- import { PermissionObjects } from './permission';
4
- export declare const eventBus: Emitter<Record<EventType, unknown>>;
5
- export declare const dark: Ref<boolean | undefined>;
6
- export declare const locale: Ref<string>;
7
- export declare const permissionObjects: Ref<PermissionObjects>;
8
- export declare const permissionChecksum: Ref<string>;
9
- export declare const mainActive: Ref<0 | 1 | 2 | 3 | 4>;
@@ -1,7 +0,0 @@
1
- import { Permission, PermissionObjects } from './permission';
2
- export declare const mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
3
- export declare const dark: import("vue").Ref<boolean | undefined>;
4
- export declare const locale: import("vue").Ref<string>;
5
- export declare const permissionObjects: import("vue").Ref<PermissionObjects>;
6
- export declare const permissionChecksum: import("vue").Ref<string>;
7
- export declare function verifyPermission(permission: Permission, instance: string): boolean;