x-essential-lib 0.9.2 → 0.9.4

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.
@@ -2,4 +2,5 @@ export declare function useSystem(): {
2
2
  sysBarAvail: import("vue").ComputedRef<boolean>;
3
3
  compactWidth: import("vue").ComputedRef<string>;
4
4
  isMobile: () => boolean;
5
+ isCurvedScreen: () => boolean;
5
6
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
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 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";
2
+ import { computed as V, 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 R, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ce, useTemplateRef as ce } from "vue";
3
3
  import { useI18n as G } from "vue-i18n";
4
- import { useTheme as se, useDisplay as Ce } from "vuetify";
4
+ import { useTheme as se, useDisplay as Ve } from "vuetify";
5
5
  import { useRouter as pe, useRoute as qe } from "vue-router";
6
6
  import je from "axios";
7
- import { a as T, m as Re, u as Se } from "./vendor.lvdyytxg.js";
7
+ import { a as T, m as Se, u as Re } from "./vendor.waod39c6.js";
8
8
  function Oe() {
9
- const e = se(), t = C(() => e.global.current.value.colors.primary), a = C(() => e.global.current.value.colors.secondary), o = C(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = C(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = C(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), s = C(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = C(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
9
+ const e = se(), t = V(() => e.global.current.value.colors.primary), a = V(() => e.global.current.value.colors.secondary), o = V(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = V(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = V(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), s = V(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = V(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
10
10
  return {
11
11
  primaryColor: t,
12
12
  secondaryColor: a,
@@ -57,9 +57,9 @@ const Dt = (function() {
57
57
  i18n: null
58
58
  }, console.log("globalObjects created")), window.globalObjects;
59
59
  })(), u = (function() {
60
- return window.eventBus || (window.eventBus = Re(), console.log("eventBus created")), window.eventBus;
60
+ return window.eventBus || (window.eventBus = Se(), console.log("eventBus created")), window.eventBus;
61
61
  })();
62
- async function Vt(e) {
62
+ async function Ct(e) {
63
63
  return new Promise((t) => {
64
64
  setTimeout(t, e);
65
65
  });
@@ -88,7 +88,7 @@ let Ee = 0;
88
88
  function ae() {
89
89
  return ++Ee;
90
90
  }
91
- async function Ct(e) {
91
+ async function Vt(e) {
92
92
  if (!te())
93
93
  return;
94
94
  let t = !1, a;
@@ -115,10 +115,10 @@ async function jt(e) {
115
115
  }, l = ae();
116
116
  return u.on("promptDlgResult" + l, o), u.emit("promptDlg", { ...e, seq: l }), await X(() => t), u.off("promptDlgResult" + l, o), a;
117
117
  }
118
- function Rt(e) {
118
+ function St(e) {
119
119
  u.emit("waitDlg", { text: e });
120
120
  }
121
- function St() {
121
+ function Rt() {
122
122
  u.emit("closeWaitDlg");
123
123
  }
124
124
  function Ot(e, t) {
@@ -394,7 +394,7 @@ function Kt(e) {
394
394
  e.value = [];
395
395
  }
396
396
  function Nt(e, t, a, o, l, r) {
397
- const s = qe(), n = pe(), _ = Se(), c = p(!1);
397
+ const s = qe(), n = pe(), _ = Re(), c = p(!1);
398
398
  le(() => {
399
399
  let f = !1;
400
400
  typeof e.value == "boolean" ? f = e.value : f = _.value, c.value = f;
@@ -460,16 +460,19 @@ function Wt() {
460
460
  return { verifyPermission: t };
461
461
  }
462
462
  function Xt() {
463
- const e = C(() => !!window.cordova), t = Ce(), a = C(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
463
+ const e = V(() => !!window.cordova), t = Ve(), a = V(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
464
464
  function o() {
465
465
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
466
466
  navigator.userAgent
467
467
  );
468
468
  }
469
- return { sysBarAvail: e, compactWidth: a, isMobile: o };
469
+ function l() {
470
+ return !!t.xs.value;
471
+ }
472
+ return { sysBarAvail: e, compactWidth: a, isMobile: o, isCurvedScreen: l };
470
473
  }
471
474
  function J(e, t) {
472
- const a = Ge(), o = C({
475
+ const a = Ge(), o = V({
473
476
  get() {
474
477
  return me(a, e);
475
478
  },
@@ -502,13 +505,13 @@ const at = /* @__PURE__ */ A({
502
505
  const w = v("v-card-text"), d = v("v-btn"), j = v("v-card-actions"), f = v("v-card"), m = v("v-dialog");
503
506
  return q(), L(m, {
504
507
  modelValue: E(D),
505
- "onUpdate:modelValue": i[1] || (i[1] = (V) => W(D) ? D.value = V : null),
508
+ "onUpdate:modelValue": i[1] || (i[1] = (C) => W(D) ? D.value = C : null),
506
509
  attach: "",
507
510
  "max-width": "600px",
508
511
  transition: "dialog-top-transition",
509
512
  onKeydown: [
510
513
  z(M(y, ["stop", "prevent"]), ["enter"]),
511
- i[2] || (i[2] = z(M((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
514
+ i[2] || (i[2] = z(M((C) => D.value = !1, ["stop", "prevent"]), ["esc"]))
512
515
  ]
513
516
  }, {
514
517
  default: g(() => [
@@ -516,7 +519,7 @@ const at = /* @__PURE__ */ A({
516
519
  default: g(() => [
517
520
  b(w, null, {
518
521
  default: g(() => [
519
- B(S(o.value), 1)
522
+ B(R(o.value), 1)
520
523
  ]),
521
524
  _: 1
522
525
  }),
@@ -525,10 +528,10 @@ const at = /* @__PURE__ */ A({
525
528
  b(d, {
526
529
  color: l.value,
527
530
  variant: "text",
528
- onClick: i[0] || (i[0] = (V) => D.value = !1)
531
+ onClick: i[0] || (i[0] = (C) => D.value = !1)
529
532
  }, {
530
533
  default: g(() => [
531
- B(S(r.value), 1)
534
+ B(R(r.value), 1)
532
535
  ]),
533
536
  _: 1
534
537
  }, 8, ["color"]),
@@ -538,7 +541,7 @@ const at = /* @__PURE__ */ A({
538
541
  onClick: y
539
542
  }, {
540
543
  default: g(() => [
541
- B(S(n.value), 1)
544
+ B(R(n.value), 1)
542
545
  ]),
543
546
  _: 1
544
547
  }, 8, ["color"])
@@ -560,7 +563,7 @@ const at = /* @__PURE__ */ A({
560
563
  zIndex: { default: 1 }
561
564
  },
562
565
  setup(e) {
563
- const { backgroundColor2: t } = Oe(), a = C(() => ({
566
+ const { backgroundColor2: t } = Oe(), a = V(() => ({
564
567
  background: t.value,
565
568
  zIndex: e.zIndex
566
569
  }));
@@ -606,10 +609,10 @@ const at = /* @__PURE__ */ A({
606
609
  },
607
610
  emits: ["timeout"],
608
611
  setup(e, { emit: t }) {
609
- const a = C(() => ({
612
+ const a = V(() => ({
610
613
  width: "calc(100% - 64px)",
611
614
  overflowWrap: "break-word"
612
- })), o = C(() => {
615
+ })), o = V(() => {
613
616
  switch (e.type) {
614
617
  case "success":
615
618
  return "mdi-check-circle";
@@ -644,7 +647,7 @@ const at = /* @__PURE__ */ A({
644
647
  }, null, 8, ["icon"])) : ee("", !0),
645
648
  k("div", {
646
649
  style: ue(a.value)
647
- }, S(e.text), 5),
650
+ }, R(e.text), 5),
648
651
  b(_, {
649
652
  class: "mx-1",
650
653
  icon: "mdi-close",
@@ -683,7 +686,7 @@ const at = /* @__PURE__ */ A({
683
686
  onClick: _[0] || (_[0] = M(() => {
684
687
  }, ["stop"]))
685
688
  }, [
686
- (q(!0), P(De, null, Ve(t.value, (c) => (q(), L(rt, {
689
+ (q(!0), P(De, null, Ce(t.value, (c) => (q(), L(rt, {
687
690
  id: c.id,
688
691
  key: c.id,
689
692
  text: c.text,
@@ -706,21 +709,21 @@ const at = /* @__PURE__ */ A({
706
709
  return F(y, (w) => {
707
710
  !w && !c && (u.emit(`numberDlgResult${_}`, void 0), c = !0);
708
711
  }), (w, d) => {
709
- const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"), V = v("v-form"), Q = v("v-card"), Y = v("v-dialog");
712
+ const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"), C = v("v-form"), Q = v("v-card"), Y = v("v-dialog");
710
713
  return q(), L(Y, {
711
714
  modelValue: E(y),
712
- "onUpdate:modelValue": d[3] || (d[3] = (R) => W(y) ? y.value = R : null),
715
+ "onUpdate:modelValue": d[3] || (d[3] = (S) => W(y) ? y.value = S : null),
713
716
  attach: "",
714
717
  "max-width": "600px",
715
718
  transition: "dialog-top-transition",
716
- onKeydown: d[4] || (d[4] = z(M((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
719
+ onKeydown: d[4] || (d[4] = z(M((S) => y.value = !1, ["stop", "prevent"]), ["esc"]))
717
720
  }, {
718
721
  default: g(() => [
719
722
  b(Q, { title: a.value }, {
720
723
  default: g(() => [
721
- b(V, {
724
+ b(C, {
722
725
  modelValue: h.value,
723
- "onUpdate:modelValue": d[2] || (d[2] = (R) => h.value = R),
726
+ "onUpdate:modelValue": d[2] || (d[2] = (S) => h.value = S),
724
727
  class: "mx-3",
725
728
  onSubmit: M(i, ["prevent"])
726
729
  }, {
@@ -729,7 +732,7 @@ const at = /* @__PURE__ */ A({
729
732
  ref_key: "target",
730
733
  ref: x,
731
734
  modelValue: o.value,
732
- "onUpdate:modelValue": d[0] || (d[0] = (R) => o.value = R),
735
+ "onUpdate:modelValue": d[0] || (d[0] = (S) => o.value = S),
733
736
  "control-variant": "stacked",
734
737
  max: s.value,
735
738
  min: r.value,
@@ -741,10 +744,10 @@ const at = /* @__PURE__ */ A({
741
744
  b(f, {
742
745
  color: "primary",
743
746
  variant: "text",
744
- onClick: d[1] || (d[1] = (R) => y.value = !1)
747
+ onClick: d[1] || (d[1] = (S) => y.value = !1)
745
748
  }, {
746
749
  default: g(() => [
747
- B(S(E(t)("dlg.common.cancel")), 1)
750
+ B(R(E(t)("dlg.common.cancel")), 1)
748
751
  ]),
749
752
  _: 1
750
753
  }),
@@ -755,7 +758,7 @@ const at = /* @__PURE__ */ A({
755
758
  variant: "text"
756
759
  }, {
757
760
  default: g(() => [
758
- B(S(E(t)("dlg.common.confirm")), 1)
761
+ B(R(E(t)("dlg.common.confirm")), 1)
759
762
  ]),
760
763
  _: 1
761
764
  }, 8, ["disabled"])
@@ -785,28 +788,28 @@ const at = /* @__PURE__ */ A({
785
788
  };
786
789
  return F(d, (m) => {
787
790
  !m && !h && (u.emit("promptDlgResult" + y, void 0), h = !0);
788
- }), (m, V) => {
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");
791
+ }), (m, C) => {
792
+ const Q = v("v-card-text"), Y = v("v-text-field"), S = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"), xe = v("v-card"), he = v("v-dialog");
790
793
  return q(), L(he, {
791
794
  modelValue: E(d),
792
- "onUpdate:modelValue": V[3] || (V[3] = (I) => W(d) ? d.value = I : null),
795
+ "onUpdate:modelValue": C[3] || (C[3] = (I) => W(d) ? d.value = I : null),
793
796
  attach: "",
794
797
  "max-width": "600px",
795
798
  transition: "dialog-top-transition",
796
- onKeydown: V[4] || (V[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
799
+ onKeydown: C[4] || (C[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
797
800
  }, {
798
801
  default: g(() => [
799
802
  b(xe, { title: a.value }, {
800
803
  default: g(() => [
801
804
  o.value ? (q(), L(Q, { key: 0 }, {
802
805
  default: g(() => [
803
- B(S(o.value), 1)
806
+ B(R(o.value), 1)
804
807
  ]),
805
808
  _: 1
806
809
  })) : ee("", !0),
807
810
  b(ye, {
808
811
  modelValue: j.value,
809
- "onUpdate:modelValue": V[2] || (V[2] = (I) => j.value = I),
812
+ "onUpdate:modelValue": C[2] || (C[2] = (I) => j.value = I),
810
813
  class: "mx-3",
811
814
  onSubmit: M(f, ["prevent"])
812
815
  }, {
@@ -815,31 +818,31 @@ const at = /* @__PURE__ */ A({
815
818
  ref_key: "target",
816
819
  ref: i,
817
820
  modelValue: n.value,
818
- "onUpdate:modelValue": V[0] || (V[0] = (I) => n.value = I),
821
+ "onUpdate:modelValue": C[0] || (C[0] = (I) => n.value = I),
819
822
  label: l.value,
820
823
  placeholder: r.value,
821
824
  rules: s.value
822
825
  }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
823
826
  b(be, { class: "d-flex justify-end" }, {
824
827
  default: g(() => [
825
- b(R, {
828
+ b(S, {
826
829
  color: _.value,
827
830
  variant: "text",
828
- onClick: V[1] || (V[1] = (I) => d.value = !1)
831
+ onClick: C[1] || (C[1] = (I) => d.value = !1)
829
832
  }, {
830
833
  default: g(() => [
831
- B(S(c.value), 1)
834
+ B(R(c.value), 1)
832
835
  ]),
833
836
  _: 1
834
837
  }, 8, ["color"]),
835
- b(R, {
838
+ b(S, {
836
839
  color: x.value,
837
840
  disabled: !j.value,
838
841
  type: "submit",
839
842
  variant: "text"
840
843
  }, {
841
844
  default: g(() => [
842
- B(S(D.value), 1)
845
+ B(R(D.value), 1)
843
846
  ]),
844
847
  _: 1
845
848
  }, 8, ["color", "disabled"])
@@ -889,7 +892,7 @@ const at = /* @__PURE__ */ A({
889
892
  }, {
890
893
  default: g(() => [
891
894
  k("div", dt, [
892
- k("span", it, S(a.value), 1)
895
+ k("span", it, R(a.value), 1)
893
896
  ])
894
897
  ]),
895
898
  _: 1
@@ -917,7 +920,7 @@ export {
917
920
  Pe as addView,
918
921
  Ae as appAppear,
919
922
  Kt as clearViews,
920
- St as closeWaitDlg,
923
+ Rt as closeWaitDlg,
921
924
  kt as createAxios,
922
925
  Ht as default,
923
926
  et as delView,
@@ -940,10 +943,10 @@ export {
940
943
  Lt as messageSuccess,
941
944
  Bt as messageWarning,
942
945
  Ut as onBeforeEach,
943
- Ct as openConfirmDlg,
946
+ Vt as openConfirmDlg,
944
947
  qt as openNumberDlg,
945
948
  jt as openPromptDlg,
946
- Rt as openWaitDlg,
949
+ St as openWaitDlg,
947
950
  tt as popView,
948
951
  Ke as provideDark,
949
952
  He as provideLastAppPath,
@@ -958,6 +961,6 @@ export {
958
961
  Xt as useSystem,
959
962
  J as useViewStack,
960
963
  $e as verifyPermission,
961
- Vt as waitMs,
964
+ Ct as waitMs,
962
965
  X as waitUtil
963
966
  };
@@ -89,7 +89,6 @@ function H(e, n = {}) {
89
89
  function X(e) {
90
90
  return H("(prefers-color-scheme: dark)", e);
91
91
  }
92
- /*! js-cookie v3.0.5 | MIT */
93
92
  function m(e) {
94
93
  for (var n = 1; n < arguments.length; n++) {
95
94
  var t = arguments[n];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.9.2",
4
+ "version": "0.9.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -23,34 +23,34 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@vueuse/core": "^14.0.0",
26
- "axios": "^1.12.2",
26
+ "axios": "^1.13.2",
27
27
  "js-cookie": "^3.0.5",
28
28
  "mitt": "^3.0.1",
29
- "vue": "^3.5.22",
29
+ "vue": "^3.5.23",
30
30
  "vue-i18n": "^11.1.12",
31
31
  "vue-router": "^4.6.3",
32
- "vuetify": "^3.10.7"
32
+ "vuetify": "^3.10.9"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^9.38.0",
35
+ "@eslint/js": "^9.39.1",
36
36
  "@types/js-cookie": "^3.0.6",
37
- "@types/node": "^24.9.1",
37
+ "@types/node": "^24.10.0",
38
38
  "@vitejs/plugin-vue": "^6.0.1",
39
- "eslint": "^9.38.0",
39
+ "eslint": "^9.39.1",
40
40
  "eslint-config-prettier": "^10.1.8",
41
41
  "eslint-plugin-prettier": "^5.5.4",
42
42
  "eslint-plugin-vue": "^10.5.1",
43
- "globals": "^16.4.0",
43
+ "globals": "^16.5.0",
44
44
  "husky": "^9.1.7",
45
45
  "lint-staged": "^16.2.6",
46
46
  "prettier": "3.6.2",
47
- "sass": "^1.93.2",
47
+ "sass": "^1.93.3",
48
48
  "typescript": "^5.9.3",
49
- "typescript-eslint": "^8.46.2",
50
- "vite": "^7.1.11",
49
+ "typescript-eslint": "^8.46.3",
50
+ "vite": "^7.2.1",
51
51
  "vite-plugin-css-injected-by-js": "^3.5.2",
52
52
  "vite-plugin-vuetify": "^2.1.2",
53
53
  "vue-eslint-parser": "^10.2.0",
54
- "vue-tsc": "^3.1.1"
54
+ "vue-tsc": "^3.1.3"
55
55
  }
56
56
  }