x-essential-lib 0.8.5 → 0.8.6

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.
@@ -3,13 +3,11 @@ interface Props {
3
3
  id: number;
4
4
  type: Type;
5
5
  text: string;
6
- timeout: number;
6
+ timeout?: number;
7
7
  }
8
8
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
9
  timeout: (...args: any[]) => void;
10
10
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
11
11
  onTimeout?: ((...args: any[]) => any) | undefined;
12
- }>, {
13
- timeout: number;
14
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
13
  export default _default;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.fade-leave-active[data-v-0c686889]{transition:opacity .5s ease}.fade-leave-to[data-v-0c686889]{opacity:0}.x-cont[data-v-0c686889]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-0c686889]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-0c686889]{transform-origin:20px 20px;animation:lds-spinner-0c686889 1.2s linear infinite}.lds-spinner div[data-v-0c686889]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-0c686889]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-0c686889]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-0c686889]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-0c686889]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-0c686889]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-0c686889]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-0c686889]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-0c686889]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-0c686889]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-0c686889]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-0c686889]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-0c686889]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-0c686889{0%{opacity:1}to{opacity:0}}.x-item[data-v-d5cfe252]{width:600px}@media (max-width: 600px){.x-item[data-v-d5cfe252]{width:calc(100vw - 16px)}}.x-cont[data-v-c6a59757]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { computed as x, provide as T, inject as A, ref as g, getCurrentInstance as _e, hasInjectionContext as ie, watch as K, getCurrentScope as je, onScopeDispose as Re, shallowRef as ee, watchEffect as Ve, toValue as q, onMounted as B, unref as z, onBeforeUnmount as $, onBeforeMount as Ae, defineComponent as E, resolveComponent as b, createBlock as V, openBlock as D, withKeys as Z, withModifiers as H, isRef as Q, withCtx as w, createVNode as L, createTextVNode as O, toDisplayString as R, Transition as qe, createElementBlock as te, createCommentVNode as oe, normalizeStyle as de, createElementVNode as y, Fragment as Oe, renderList as Ie, useTemplateRef as Te } from "vue";
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.fade-leave-active[data-v-0c686889]{transition:opacity .5s ease}.fade-leave-to[data-v-0c686889]{opacity:0}.x-cont[data-v-0c686889]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-0c686889]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-0c686889]{transform-origin:20px 20px;animation:lds-spinner-0c686889 1.2s linear infinite}.lds-spinner div[data-v-0c686889]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-0c686889]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-0c686889]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-0c686889]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-0c686889]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-0c686889]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-0c686889]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-0c686889]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-0c686889]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-0c686889]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-0c686889]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-0c686889]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-0c686889]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-0c686889{0%{opacity:1}to{opacity:0}}.x-item[data-v-74835a85]{width:600px}@media (max-width: 600px){.x-item[data-v-74835a85]{width:calc(100vw - 16px)}}.x-cont[data-v-c6a59757]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ import { computed as x, provide as T, inject as A, ref as g, getCurrentInstance as _e, hasInjectionContext as ie, watch as K, getCurrentScope as je, onScopeDispose as Re, shallowRef as Z, watchEffect as Ve, toValue as q, onMounted as B, unref as z, onBeforeUnmount as $, onBeforeMount as Ae, defineComponent as E, resolveComponent as b, createBlock as V, openBlock as D, withKeys as G, withModifiers as H, isRef as J, withCtx as w, createVNode as L, createTextVNode as O, toDisplayString as R, Transition as qe, createElementBlock as te, createCommentVNode as oe, normalizeStyle as de, createElementVNode as y, Fragment as Oe, renderList as Ie, useTemplateRef as Te } from "vue";
3
3
  import { useI18n as ne } from "vue-i18n";
4
4
  import { useTheme as fe, useDisplay as Be } from "vuetify";
5
5
  import { useRouter as ge, useRoute as Ee } from "vue-router";
@@ -369,7 +369,7 @@ const lt = [
369
369
  mainActive: 2
370
370
  }
371
371
  ];
372
- function G(e) {
372
+ function Q(e) {
373
373
  let t, a = 0;
374
374
  const o = e.split("/").filter((n) => n.trim() !== "");
375
375
  return lt.forEach((n) => {
@@ -380,10 +380,10 @@ function G(e) {
380
380
  c > 0 && c > a && (t = n, a = c);
381
381
  }), t;
382
382
  }
383
- const J = g("");
383
+ const Y = g("");
384
384
  function S(e, t, a) {
385
385
  t === "/" && (t = a);
386
- const o = G(e), n = G(t);
386
+ const o = Q(e), n = Q(t);
387
387
  if (!o) {
388
388
  console.assert(!1);
389
389
  return;
@@ -391,7 +391,7 @@ function S(e, t, a) {
391
391
  if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !n)
392
392
  return;
393
393
  const l = o.app === n.app, c = o.path === n.path, r = o.level >= n.level;
394
- l ? c ? J.value = "" : J.value = r ? "inner-left" : "inner-right" : (J.value = "", Ze(o.app, r));
394
+ l ? c ? Y.value = "" : Y.value = r ? "inner-left" : "inner-right" : (Y.value = "", Ze(o.app, r));
395
395
  }
396
396
  function ct() {
397
397
  return !!I.get("accessToken");
@@ -400,7 +400,7 @@ function ut() {
400
400
  return !!I.get("activeOrg");
401
401
  }
402
402
  function _a(e, t, a, o) {
403
- const n = ct(), l = ut(), c = G(e.path);
403
+ const n = ct(), l = ut(), c = Q(e.path);
404
404
  if (!c) {
405
405
  console.assert(!1), a();
406
406
  return;
@@ -465,19 +465,19 @@ function da(e) {
465
465
  function dt(e) {
466
466
  return je() ? (Re(e), !0) : !1;
467
467
  }
468
- const Y = /* @__PURE__ */ new WeakMap(), ft = (...e) => {
468
+ const P = /* @__PURE__ */ new WeakMap(), ft = (...e) => {
469
469
  var t;
470
470
  const a = e[0], o = (t = _e()) == null ? void 0 : t.proxy;
471
471
  if (o == null && !ie())
472
472
  throw new Error("injectLocal must be called in setup");
473
- return o && Y.has(o) && a in Y.get(o) ? Y.get(o)[a] : A(...e);
473
+ return o && P.has(o) && a in P.get(o) ? P.get(o)[a] : A(...e);
474
474
  }, gt = typeof window < "u" && typeof document < "u";
475
475
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
476
476
  const vt = Object.prototype.toString, mt = (e) => vt.call(e) === "[object Object]";
477
477
  function pe(e) {
478
478
  return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
479
479
  }
480
- function P(e) {
480
+ function ee(e) {
481
481
  return Array.isArray(e) ? e : [e];
482
482
  }
483
483
  function ht(e, t, a) {
@@ -500,15 +500,15 @@ function wt(...e) {
500
500
  const t = [], a = () => {
501
501
  t.forEach((r) => r()), t.length = 0;
502
502
  }, o = (r, u, s, i) => (r.addEventListener(u, s, i), () => r.removeEventListener(u, s, i)), n = x(() => {
503
- const r = P(q(e[0])).filter((u) => u != null);
503
+ const r = ee(q(e[0])).filter((u) => u != null);
504
504
  return r.every((u) => typeof u != "string") ? r : void 0;
505
505
  }), l = ht(
506
506
  () => {
507
507
  var r, u;
508
508
  return [
509
509
  (u = (r = n.value) == null ? void 0 : r.map((s) => yt(s))) != null ? u : [Le].filter((s) => s != null),
510
- P(q(n.value ? e[1] : e[0])),
511
- P(z(n.value ? e[2] : e[1])),
510
+ ee(q(n.value ? e[1] : e[0])),
511
+ ee(z(n.value ? e[2] : e[1])),
512
512
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
513
513
  q(n.value ? e[3] : e[2])
514
514
  ];
@@ -532,7 +532,7 @@ function wt(...e) {
532
532
  return dt(a), c;
533
533
  }
534
534
  function xt() {
535
- const e = ee(!1), t = _e();
535
+ const e = Z(!1), t = _e();
536
536
  return t && B(() => {
537
537
  e.value = !0;
538
538
  }, t), e;
@@ -547,7 +547,7 @@ function Ct() {
547
547
  return typeof e == "number" ? e : void 0;
548
548
  }
549
549
  function Lt(e, t = {}) {
550
- const { window: a = Le, ssrWidth: o = Ct() } = t, n = bt(() => a && "matchMedia" in a && typeof a.matchMedia == "function"), l = g(typeof o == "number"), c = ee(), r = ee(!1), u = (s) => {
550
+ const { window: a = Le, ssrWidth: o = Ct() } = t, n = bt(() => a && "matchMedia" in a && typeof a.matchMedia == "function"), l = Z(typeof o == "number"), c = Z(), r = Z(!1), u = (s) => {
551
551
  r.value = s.matches;
552
552
  };
553
553
  return Ve(() => {
@@ -585,7 +585,7 @@ function fa(e, t, a, o, n, l) {
585
585
  Ce(l, "waitDlg") || it(l);
586
586
  return;
587
587
  }
588
- const d = G(c.path);
588
+ const d = Q(c.path);
589
589
  if (!d) {
590
590
  console.assert(!1);
591
591
  return;
@@ -675,13 +675,13 @@ const Mt = /* @__PURE__ */ E({
675
675
  const M = b("v-card-text"), h = b("v-btn"), d = b("v-card-actions"), C = b("v-card"), f = b("v-dialog");
676
676
  return D(), V(f, {
677
677
  modelValue: z(v),
678
- "onUpdate:modelValue": _[1] || (_[1] = (j) => Q(v) ? v.value = j : null),
678
+ "onUpdate:modelValue": _[1] || (_[1] = (j) => J(v) ? v.value = j : null),
679
679
  transition: "dialog-top-transition",
680
680
  "max-width": "600px",
681
681
  attach: "",
682
682
  onKeydown: [
683
- _[2] || (_[2] = Z(H((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
684
- Z(H(k, ["stop", "prevent"]), ["enter"])
683
+ _[2] || (_[2] = G(H((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
684
+ G(H(k, ["stop", "prevent"]), ["enter"])
685
685
  ]
686
686
  }, {
687
687
  default: w(() => [
@@ -741,7 +741,7 @@ const Mt = /* @__PURE__ */ E({
741
741
  return (n, l) => (D(), V(qe, { name: "fade" }, {
742
742
  default: w(() => [
743
743
  n.open ? (D(), te("div", {
744
- key: Q(o) ? ++o.value : ++o,
744
+ key: J(o) ? ++o.value : ++o,
745
745
  class: "x-cont",
746
746
  style: de(a.value)
747
747
  }, l[0] || (l[0] = [
@@ -781,11 +781,11 @@ const It = /* @__PURE__ */ E({
781
781
  },
782
782
  emits: ["timeout"],
783
783
  setup(e, { emit: t }) {
784
- const a = e, o = x(() => ({
784
+ const a = x(() => ({
785
785
  width: "calc(100% - 64px)",
786
786
  overflowWrap: "break-word"
787
- })), n = x(() => {
788
- switch (a.type) {
787
+ })), o = x(() => {
788
+ switch (e.type) {
789
789
  case "success":
790
790
  return Vt;
791
791
  case "info":
@@ -797,40 +797,40 @@ const It = /* @__PURE__ */ E({
797
797
  default:
798
798
  return "";
799
799
  }
800
- }), l = g(!0), c = t;
800
+ }), n = g(!0), l = t;
801
801
  return B(() => {
802
802
  setTimeout(() => {
803
- c("timeout", a.id);
804
- }, a.timeout);
805
- }), K(l, (r) => {
806
- r || c("timeout", a.id);
807
- }), (r, u) => {
808
- const s = b("v-icon"), i = b("v-sheet");
809
- return D(), V(i, {
803
+ l("timeout", e.id);
804
+ }, e.timeout);
805
+ }), K(n, (c) => {
806
+ c || l("timeout", e.id);
807
+ }), (c, r) => {
808
+ const u = b("v-icon"), s = b("v-sheet");
809
+ return D(), V(s, {
810
810
  class: "x-item d-flex align-center py-2 mb-2",
811
- color: a.type,
811
+ color: c.type,
812
812
  elevation: 1
813
813
  }, {
814
814
  default: w(() => [
815
- n.value ? (D(), V(s, {
815
+ o.value ? (D(), V(u, {
816
816
  key: 0,
817
817
  class: "mx-1",
818
- icon: n.value
818
+ icon: o.value
819
819
  }, null, 8, ["icon"])) : oe("", !0),
820
820
  y("div", {
821
- style: de(o.value)
822
- }, R(a.text), 5),
823
- L(s, {
821
+ style: de(a.value)
822
+ }, R(c.text), 5),
823
+ L(u, {
824
824
  class: "mx-1",
825
825
  icon: z(At),
826
- onClick: u[0] || (u[0] = (v) => c("timeout", a.id))
826
+ onClick: r[0] || (r[0] = (i) => l("timeout", c.id))
827
827
  }, null, 8, ["icon"])
828
828
  ]),
829
829
  _: 1
830
830
  }, 8, ["color"]);
831
831
  };
832
832
  }
833
- }), Tt = /* @__PURE__ */ ce(It, [["__scopeId", "data-v-d5cfe252"]]), Bt = /* @__PURE__ */ E({
833
+ }), Tt = /* @__PURE__ */ ce(It, [["__scopeId", "data-v-74835a85"]]), Bt = /* @__PURE__ */ E({
834
834
  __name: "index",
835
835
  setup(e) {
836
836
  const t = g([]);
@@ -886,13 +886,13 @@ const It = /* @__PURE__ */ E({
886
886
  const j = b("v-card-text"), F = b("v-text-field"), X = b("v-form"), W = b("v-btn"), De = b("v-card-actions"), Me = b("v-card"), Se = b("v-dialog");
887
887
  return D(), V(Se, {
888
888
  modelValue: z(h),
889
- "onUpdate:modelValue": f[2] || (f[2] = (U) => Q(h) ? h.value = U : null),
889
+ "onUpdate:modelValue": f[2] || (f[2] = (U) => J(h) ? h.value = U : null),
890
890
  transition: "dialog-top-transition",
891
891
  "max-width": "600px",
892
892
  attach: "",
893
893
  onKeydown: [
894
- f[3] || (f[3] = Z(H((U) => h.value = !1, ["stop", "prevent"]), ["esc"])),
895
- Z(H(d, ["stop", "prevent"]), ["enter"])
894
+ f[3] || (f[3] = G(H((U) => h.value = !1, ["stop", "prevent"]), ["esc"])),
895
+ G(H(d, ["stop", "prevent"]), ["enter"])
896
896
  ]
897
897
  }, {
898
898
  default: w(() => [
@@ -968,7 +968,7 @@ const It = /* @__PURE__ */ E({
968
968
  const u = b("v-card"), s = b("v-dialog");
969
969
  return D(), V(s, {
970
970
  modelValue: z(l),
971
- "onUpdate:modelValue": r[0] || (r[0] = (i) => Q(l) ? l.value = i : null),
971
+ "onUpdate:modelValue": r[0] || (r[0] = (i) => J(l) ? l.value = i : null),
972
972
  persistent: "",
973
973
  "no-click-animation": "",
974
974
  fullscreen: "",
@@ -1034,7 +1034,7 @@ export {
1034
1034
  se as isExist,
1035
1035
  ia as lastView,
1036
1036
  ma as loadLocaleMessageEssential,
1037
- G as matchRouteMeta,
1037
+ Q as matchRouteMeta,
1038
1038
  oa as messageError,
1039
1039
  na as messageInfo,
1040
1040
  ra as messageSuccess,
@@ -1050,7 +1050,7 @@ export {
1050
1050
  at as providePermissionChecksum,
1051
1051
  et as providePermissionObjects,
1052
1052
  nt as provideViews,
1053
- J as routeTransName,
1053
+ Y as routeTransName,
1054
1054
  Ue as useColor,
1055
1055
  fa as useMicroApp,
1056
1056
  ga as usePermission,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.8.5",
4
+ "version": "0.8.6",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -22,34 +22,36 @@
22
22
  "*": "prettier --write ."
23
23
  },
24
24
  "dependencies": {
25
- "@vueuse/core": "^12.7.0",
26
- "axios": "^1.7.9",
25
+ "@vueuse/core": "^13.0.0",
26
+ "axios": "^1.8.4",
27
27
  "js-cookie": "^3.0.5",
28
28
  "mitt": "^3.0.1",
29
29
  "vue": "^3.5.13",
30
- "vue-i18n": "^11.1.1",
30
+ "vue-i18n": "^11.1.3",
31
31
  "vue-router": "^4.5.0",
32
- "vuetify": "^3.7.13"
32
+ "vuetify": "^3.8.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^9.21.0",
35
+ "@eslint/js": "^9.24.0",
36
36
  "@mdi/js": "^7.4.47",
37
37
  "@types/js-cookie": "^3.0.6",
38
- "@types/node": "^22.13.5",
39
- "@vitejs/plugin-vue": "^5.2.1",
40
- "eslint": "^9.21.0",
41
- "eslint-config-prettier": "^10.0.1",
42
- "eslint-plugin-prettier": "^5.2.3",
43
- "eslint-plugin-vue": "^9.32.0",
38
+ "@types/node": "^22.14.0",
39
+ "@vitejs/plugin-vue": "^5.2.3",
40
+ "eslint": "^9.24.0",
41
+ "eslint-config-prettier": "^10.1.1",
42
+ "eslint-plugin-prettier": "^5.2.6",
43
+ "eslint-plugin-vue": "^10.0.0",
44
+ "globals": "^16.0.0",
44
45
  "husky": "^9.1.7",
45
- "lint-staged": "^15.4.3",
46
- "prettier": "3.5.2",
47
- "sass": "^1.85.1",
48
- "typescript": "^5.7.3",
49
- "typescript-eslint": "^8.25.0",
50
- "vite": "^6.2.0",
46
+ "lint-staged": "^15.5.0",
47
+ "prettier": "3.5.3",
48
+ "sass": "^1.86.3",
49
+ "typescript": "^5.8.3",
50
+ "typescript-eslint": "^8.29.1",
51
+ "vite": "^6.2.5",
51
52
  "vite-plugin-css-injected-by-js": "^3.5.2",
52
- "vite-plugin-vuetify": "^2.1.0",
53
- "vue-tsc": "^2.2.4"
53
+ "vite-plugin-vuetify": "^2.1.1",
54
+ "vue-eslint-parser": "^10.1.3",
55
+ "vue-tsc": "^2.2.8"
54
56
  }
55
57
  }