x-essential-lib 0.5.18 → 0.5.20

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