x-essential-lib 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +33 -33
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var d=document.createElement("style");d.id="x-essential-lib",d.appendChild(document.createTextNode('.fade-leave-active[data-v-83c3cd1d]{transition:opacity .5s ease}.fade-leave-to[data-v-83c3cd1d]{opacity:0}.x-cont[data-v-83c3cd1d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-83c3cd1d]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-83c3cd1d]{transform-origin:20px 20px;animation:lds-spinner-83c3cd1d 1.2s linear infinite}.lds-spinner div[data-v-83c3cd1d]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-83c3cd1d]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-83c3cd1d]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-83c3cd1d]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-83c3cd1d]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-83c3cd1d]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-83c3cd1d]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-83c3cd1d]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-83c3cd1d]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-83c3cd1d]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-83c3cd1d{0%{opacity:1}to{opacity:0}}.x-item[data-v-f1f60167]{width:600px}@media (max-width: 600px){.x-item[data-v-f1f60167]{width:calc(100vw - 16px)}}.x-cont[data-v-b482df18]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(d)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { computed as C, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as we, defineComponent as I, watch as F, resolveComponent as v, createBlock as L, openBlock as q, withKeys as z, unref as E, withModifiers as A, isRef as W, withCtx as g, createVNode as b, createTextVNode as B, toDisplayString as S, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ve, useTemplateRef as ce } from "vue";
2
+ import { computed as C, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as we, defineComponent as A, watch as F, resolveComponent as v, createBlock as L, openBlock as q, withKeys as z, unref as E, withModifiers as M, isRef as W, withCtx as g, createVNode as b, createTextVNode as B, toDisplayString as S, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ve, useTemplateRef as ce } from "vue";
3
3
  import { useI18n as G } from "vue-i18n";
4
4
  import { useTheme as se, useDisplay as Ce } from "vuetify";
5
5
  import { useRouter as pe, useRoute as qe } from "vue-router";
@@ -28,7 +28,7 @@ function kt(e) {
28
28
  }
29
29
  ), t.interceptors.response.use(
30
30
  (a) => Be(a),
31
- (a) => Me(a, e.onError)
31
+ (a) => Ie(a, e.onError)
32
32
  ), t;
33
33
  }
34
34
  function Te(e) {
@@ -41,15 +41,15 @@ function Le(e, t) {
41
41
  function Be(e) {
42
42
  return e.data;
43
43
  }
44
- function Me(e, t) {
44
+ function Ie(e, t) {
45
45
  const o = e.response;
46
- return o && (o.status === 401 && Ae(), o.data?.message ? t(o.data?.message) : t({
46
+ return o && (o.status === 401 && Me(), o.data?.message ? t(o.data?.message) : t({
47
47
  code: o.status,
48
48
  message: o.statusText
49
49
  })), Promise.reject(e);
50
50
  }
51
- function Ae() {
52
- T.remove("accessToken"), T.remove("refreshToken"), T.remove("userid"), T.remove("username"), T.remove("phone"), T.remove("activeOrg"), pe().replace({ path: "/passport/login" });
51
+ function Me() {
52
+ T.remove("accessToken"), T.remove("refreshToken"), T.remove("userId"), T.remove("userName"), T.remove("phone"), T.remove("activeOrg"), pe().replace({ path: "/passport/login" });
53
53
  }
54
54
  const Dt = (function() {
55
55
  return window.globalObjects || (window.globalObjects = {
@@ -73,7 +73,7 @@ async function X(e, t, a) {
73
73
  r();
74
74
  });
75
75
  }
76
- function Ie(e, t) {
76
+ function Ae(e, t) {
77
77
  const a = document.getElementById("single-spa-application:" + e);
78
78
  a && (a.classList.remove("app-left", "app-right", "app-reset"), t ? a.classList.add("app-left") : a.classList.add("app-right"), setTimeout(() => {
79
79
  a.classList.add("app-reset");
@@ -155,13 +155,13 @@ const _e = "essentialDark", de = "essentialLocale", ie = "essentialPermissionObj
155
155
  function Ke(e) {
156
156
  U(_e, e);
157
157
  }
158
- function Mt() {
158
+ function It() {
159
159
  return $(_e);
160
160
  }
161
161
  function Ne(e) {
162
162
  U(de, e);
163
163
  }
164
- function At() {
164
+ function Mt() {
165
165
  return $(de);
166
166
  }
167
167
  function We(e) {
@@ -173,7 +173,7 @@ function Xe() {
173
173
  function ze(e) {
174
174
  U(fe, e);
175
175
  }
176
- function It() {
176
+ function At() {
177
177
  return $(fe);
178
178
  }
179
179
  function He(e) {
@@ -321,7 +321,7 @@ function O(e, t, a) {
321
321
  if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !l)
322
322
  return;
323
323
  const r = o.app === l.app, s = o.path === l.path, n = o.level >= l.level;
324
- r ? s ? Z.value = "" : Z.value = n ? "inner-left" : "inner-right" : (Z.value = "", Ie(o.app, n));
324
+ r ? s ? Z.value = "" : Z.value = n ? "inner-left" : "inner-right" : (Z.value = "", Ae(o.app, n));
325
325
  }
326
326
  function Qe() {
327
327
  return !!T.get("accessToken");
@@ -485,7 +485,7 @@ function J(e, t) {
485
485
  u.off(e, l);
486
486
  }), { open: o };
487
487
  }
488
- const at = /* @__PURE__ */ I({
488
+ const at = /* @__PURE__ */ A({
489
489
  __name: "index",
490
490
  setup(e) {
491
491
  const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), s = p(""), n = p("");
@@ -507,8 +507,8 @@ const at = /* @__PURE__ */ I({
507
507
  "max-width": "600px",
508
508
  transition: "dialog-top-transition",
509
509
  onKeydown: [
510
- z(A(y, ["stop", "prevent"]), ["enter"]),
511
- i[2] || (i[2] = z(A((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
510
+ z(M(y, ["stop", "prevent"]), ["enter"]),
511
+ i[2] || (i[2] = z(M((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
512
512
  ]
513
513
  }, {
514
514
  default: g(() => [
@@ -553,7 +553,7 @@ const at = /* @__PURE__ */ I({
553
553
  }, 8, ["modelValue", "onKeydown"]);
554
554
  };
555
555
  }
556
- }), ot = /* @__PURE__ */ I({
556
+ }), ot = /* @__PURE__ */ A({
557
557
  __name: "index",
558
558
  props: {
559
559
  open: { type: Boolean, default: !0 },
@@ -596,7 +596,7 @@ const at = /* @__PURE__ */ I({
596
596
  for (const [o, l] of t)
597
597
  a[o] = l;
598
598
  return a;
599
- }, lt = /* @__PURE__ */ oe(ot, [["__scopeId", "data-v-83c3cd1d"]]), nt = /* @__PURE__ */ I({
599
+ }, lt = /* @__PURE__ */ oe(ot, [["__scopeId", "data-v-83c3cd1d"]]), nt = /* @__PURE__ */ A({
600
600
  __name: "item",
601
601
  props: {
602
602
  id: {},
@@ -655,7 +655,7 @@ const at = /* @__PURE__ */ I({
655
655
  }, 8, ["color"]);
656
656
  };
657
657
  }
658
- }), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ I({
658
+ }), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ A({
659
659
  __name: "index",
660
660
  setup(e) {
661
661
  const t = p([]);
@@ -680,7 +680,7 @@ const at = /* @__PURE__ */ I({
680
680
  };
681
681
  return (n, _) => (q(), P("div", {
682
682
  class: "x-cont d-flex flex-column-reverse align-center",
683
- onClick: _[0] || (_[0] = A(() => {
683
+ onClick: _[0] || (_[0] = M(() => {
684
684
  }, ["stop"]))
685
685
  }, [
686
686
  (q(!0), P(De, null, Ve(t.value, (c) => (q(), L(rt, {
@@ -693,7 +693,7 @@ const at = /* @__PURE__ */ I({
693
693
  }, null, 8, ["id", "text", "timeout", "type"]))), 128))
694
694
  ]));
695
695
  }
696
- }), ct = /* @__PURE__ */ oe(ut, [["__scopeId", "data-v-b482df18"]]), st = /* @__PURE__ */ I({
696
+ }), ct = /* @__PURE__ */ oe(ut, [["__scopeId", "data-v-b482df18"]]), st = /* @__PURE__ */ A({
697
697
  __name: "index",
698
698
  setup(e) {
699
699
  const { t } = G(), a = p(""), o = p(0), l = p(), r = p(-1 / 0), s = p(1 / 0), n = p(1);
@@ -713,7 +713,7 @@ const at = /* @__PURE__ */ I({
713
713
  attach: "",
714
714
  "max-width": "600px",
715
715
  transition: "dialog-top-transition",
716
- onKeydown: d[4] || (d[4] = z(A((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
716
+ onKeydown: d[4] || (d[4] = z(M((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
717
717
  }, {
718
718
  default: g(() => [
719
719
  b(Q, { title: a.value }, {
@@ -722,7 +722,7 @@ const at = /* @__PURE__ */ I({
722
722
  modelValue: h.value,
723
723
  "onUpdate:modelValue": d[2] || (d[2] = (R) => h.value = R),
724
724
  class: "mx-3",
725
- onSubmit: A(i, ["prevent"])
725
+ onSubmit: M(i, ["prevent"])
726
726
  }, {
727
727
  default: g(() => [
728
728
  b(j, {
@@ -773,7 +773,7 @@ const at = /* @__PURE__ */ I({
773
773
  }, 8, ["modelValue"]);
774
774
  };
775
775
  }
776
- }), pt = /* @__PURE__ */ I({
776
+ }), pt = /* @__PURE__ */ A({
777
777
  __name: "index",
778
778
  setup(e) {
779
779
  const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), s = p(), n = p(""), _ = p(""), c = p(""), x = p(""), D = p("");
@@ -789,11 +789,11 @@ const at = /* @__PURE__ */ I({
789
789
  const Q = v("v-card-text"), Y = v("v-text-field"), R = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"), xe = v("v-card"), he = v("v-dialog");
790
790
  return q(), L(he, {
791
791
  modelValue: E(d),
792
- "onUpdate:modelValue": V[3] || (V[3] = (M) => W(d) ? d.value = M : null),
792
+ "onUpdate:modelValue": V[3] || (V[3] = (I) => W(d) ? d.value = I : null),
793
793
  attach: "",
794
794
  "max-width": "600px",
795
795
  transition: "dialog-top-transition",
796
- onKeydown: V[4] || (V[4] = z(A((M) => d.value = !1, ["stop", "prevent"]), ["esc"]))
796
+ onKeydown: V[4] || (V[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
797
797
  }, {
798
798
  default: g(() => [
799
799
  b(xe, { title: a.value }, {
@@ -806,16 +806,16 @@ const at = /* @__PURE__ */ I({
806
806
  })) : ee("", !0),
807
807
  b(ye, {
808
808
  modelValue: j.value,
809
- "onUpdate:modelValue": V[2] || (V[2] = (M) => j.value = M),
809
+ "onUpdate:modelValue": V[2] || (V[2] = (I) => j.value = I),
810
810
  class: "mx-3",
811
- onSubmit: A(f, ["prevent"])
811
+ onSubmit: M(f, ["prevent"])
812
812
  }, {
813
813
  default: g(() => [
814
814
  b(Y, {
815
815
  ref_key: "target",
816
816
  ref: i,
817
817
  modelValue: n.value,
818
- "onUpdate:modelValue": V[0] || (V[0] = (M) => n.value = M),
818
+ "onUpdate:modelValue": V[0] || (V[0] = (I) => n.value = I),
819
819
  label: l.value,
820
820
  placeholder: r.value,
821
821
  rules: s.value
@@ -825,7 +825,7 @@ const at = /* @__PURE__ */ I({
825
825
  b(R, {
826
826
  color: _.value,
827
827
  variant: "text",
828
- onClick: V[1] || (V[1] = (M) => d.value = !1)
828
+ onClick: V[1] || (V[1] = (I) => d.value = !1)
829
829
  }, {
830
830
  default: g(() => [
831
831
  B(S(c.value), 1)
@@ -857,7 +857,7 @@ const at = /* @__PURE__ */ I({
857
857
  }, 8, ["modelValue"]);
858
858
  };
859
859
  }
860
- }), _t = { class: "ma-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */ I({
860
+ }), _t = { class: "ma-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */ A({
861
861
  __name: "index",
862
862
  setup(e) {
863
863
  const { t } = G(), a = p(""), o = (s) => {
@@ -915,7 +915,7 @@ const Ht = { install: gt };
915
915
  export {
916
916
  Ue as Permission,
917
917
  Pe as addView,
918
- Ie as appAppear,
918
+ Ae as appAppear,
919
919
  Kt as clearViews,
920
920
  St as closeWaitDlg,
921
921
  kt as createAxios,
@@ -924,10 +924,10 @@ export {
924
924
  u as eventBus,
925
925
  Dt as globalObjects,
926
926
  me as hasView,
927
- Mt as injectDark,
927
+ It as injectDark,
928
928
  Et as injectLastAppPath,
929
- At as injectLocale,
930
- It as injectPermissionChecksum,
929
+ Mt as injectLocale,
930
+ At as injectPermissionChecksum,
931
931
  Xe as injectPermissionObjects,
932
932
  Ge as injectViews,
933
933
  Ze as isEmpty,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.9.1",
4
+ "version": "0.9.2",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",