x-essential-lib 0.9.3 → 0.9.5

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,5 +1,6 @@
1
1
  export declare function useSystem(): {
2
2
  sysBarAvail: import("vue").ComputedRef<boolean>;
3
3
  compactWidth: import("vue").ComputedRef<string>;
4
+ isCurvedScreen: import("vue").ComputedRef<boolean>;
4
5
  isMobile: () => 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.waod39c6.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,16 @@ 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");
464
- function o() {
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"), o = V(() => t.xs.value);
464
+ function l() {
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
+ return { sysBarAvail: e, compactWidth: a, isCurvedScreen: o, isMobile: l };
470
470
  }
471
471
  function J(e, t) {
472
- const a = Ge(), o = C({
472
+ const a = Ge(), o = V({
473
473
  get() {
474
474
  return me(a, e);
475
475
  },
@@ -502,13 +502,13 @@ const at = /* @__PURE__ */ A({
502
502
  const w = v("v-card-text"), d = v("v-btn"), j = v("v-card-actions"), f = v("v-card"), m = v("v-dialog");
503
503
  return q(), L(m, {
504
504
  modelValue: E(D),
505
- "onUpdate:modelValue": i[1] || (i[1] = (V) => W(D) ? D.value = V : null),
505
+ "onUpdate:modelValue": i[1] || (i[1] = (C) => W(D) ? D.value = C : null),
506
506
  attach: "",
507
507
  "max-width": "600px",
508
508
  transition: "dialog-top-transition",
509
509
  onKeydown: [
510
510
  z(M(y, ["stop", "prevent"]), ["enter"]),
511
- i[2] || (i[2] = z(M((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
511
+ i[2] || (i[2] = z(M((C) => D.value = !1, ["stop", "prevent"]), ["esc"]))
512
512
  ]
513
513
  }, {
514
514
  default: g(() => [
@@ -516,7 +516,7 @@ const at = /* @__PURE__ */ A({
516
516
  default: g(() => [
517
517
  b(w, null, {
518
518
  default: g(() => [
519
- B(S(o.value), 1)
519
+ B(R(o.value), 1)
520
520
  ]),
521
521
  _: 1
522
522
  }),
@@ -525,10 +525,10 @@ const at = /* @__PURE__ */ A({
525
525
  b(d, {
526
526
  color: l.value,
527
527
  variant: "text",
528
- onClick: i[0] || (i[0] = (V) => D.value = !1)
528
+ onClick: i[0] || (i[0] = (C) => D.value = !1)
529
529
  }, {
530
530
  default: g(() => [
531
- B(S(r.value), 1)
531
+ B(R(r.value), 1)
532
532
  ]),
533
533
  _: 1
534
534
  }, 8, ["color"]),
@@ -538,7 +538,7 @@ const at = /* @__PURE__ */ A({
538
538
  onClick: y
539
539
  }, {
540
540
  default: g(() => [
541
- B(S(n.value), 1)
541
+ B(R(n.value), 1)
542
542
  ]),
543
543
  _: 1
544
544
  }, 8, ["color"])
@@ -560,7 +560,7 @@ const at = /* @__PURE__ */ A({
560
560
  zIndex: { default: 1 }
561
561
  },
562
562
  setup(e) {
563
- const { backgroundColor2: t } = Oe(), a = C(() => ({
563
+ const { backgroundColor2: t } = Oe(), a = V(() => ({
564
564
  background: t.value,
565
565
  zIndex: e.zIndex
566
566
  }));
@@ -606,10 +606,10 @@ const at = /* @__PURE__ */ A({
606
606
  },
607
607
  emits: ["timeout"],
608
608
  setup(e, { emit: t }) {
609
- const a = C(() => ({
609
+ const a = V(() => ({
610
610
  width: "calc(100% - 64px)",
611
611
  overflowWrap: "break-word"
612
- })), o = C(() => {
612
+ })), o = V(() => {
613
613
  switch (e.type) {
614
614
  case "success":
615
615
  return "mdi-check-circle";
@@ -644,7 +644,7 @@ const at = /* @__PURE__ */ A({
644
644
  }, null, 8, ["icon"])) : ee("", !0),
645
645
  k("div", {
646
646
  style: ue(a.value)
647
- }, S(e.text), 5),
647
+ }, R(e.text), 5),
648
648
  b(_, {
649
649
  class: "mx-1",
650
650
  icon: "mdi-close",
@@ -683,7 +683,7 @@ const at = /* @__PURE__ */ A({
683
683
  onClick: _[0] || (_[0] = M(() => {
684
684
  }, ["stop"]))
685
685
  }, [
686
- (q(!0), P(De, null, Ve(t.value, (c) => (q(), L(rt, {
686
+ (q(!0), P(De, null, Ce(t.value, (c) => (q(), L(rt, {
687
687
  id: c.id,
688
688
  key: c.id,
689
689
  text: c.text,
@@ -706,21 +706,21 @@ const at = /* @__PURE__ */ A({
706
706
  return F(y, (w) => {
707
707
  !w && !c && (u.emit(`numberDlgResult${_}`, void 0), c = !0);
708
708
  }), (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");
709
+ 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
710
  return q(), L(Y, {
711
711
  modelValue: E(y),
712
- "onUpdate:modelValue": d[3] || (d[3] = (R) => W(y) ? y.value = R : null),
712
+ "onUpdate:modelValue": d[3] || (d[3] = (S) => W(y) ? y.value = S : null),
713
713
  attach: "",
714
714
  "max-width": "600px",
715
715
  transition: "dialog-top-transition",
716
- onKeydown: d[4] || (d[4] = z(M((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
716
+ onKeydown: d[4] || (d[4] = z(M((S) => y.value = !1, ["stop", "prevent"]), ["esc"]))
717
717
  }, {
718
718
  default: g(() => [
719
719
  b(Q, { title: a.value }, {
720
720
  default: g(() => [
721
- b(V, {
721
+ b(C, {
722
722
  modelValue: h.value,
723
- "onUpdate:modelValue": d[2] || (d[2] = (R) => h.value = R),
723
+ "onUpdate:modelValue": d[2] || (d[2] = (S) => h.value = S),
724
724
  class: "mx-3",
725
725
  onSubmit: M(i, ["prevent"])
726
726
  }, {
@@ -729,7 +729,7 @@ const at = /* @__PURE__ */ A({
729
729
  ref_key: "target",
730
730
  ref: x,
731
731
  modelValue: o.value,
732
- "onUpdate:modelValue": d[0] || (d[0] = (R) => o.value = R),
732
+ "onUpdate:modelValue": d[0] || (d[0] = (S) => o.value = S),
733
733
  "control-variant": "stacked",
734
734
  max: s.value,
735
735
  min: r.value,
@@ -741,10 +741,10 @@ const at = /* @__PURE__ */ A({
741
741
  b(f, {
742
742
  color: "primary",
743
743
  variant: "text",
744
- onClick: d[1] || (d[1] = (R) => y.value = !1)
744
+ onClick: d[1] || (d[1] = (S) => y.value = !1)
745
745
  }, {
746
746
  default: g(() => [
747
- B(S(E(t)("dlg.common.cancel")), 1)
747
+ B(R(E(t)("dlg.common.cancel")), 1)
748
748
  ]),
749
749
  _: 1
750
750
  }),
@@ -755,7 +755,7 @@ const at = /* @__PURE__ */ A({
755
755
  variant: "text"
756
756
  }, {
757
757
  default: g(() => [
758
- B(S(E(t)("dlg.common.confirm")), 1)
758
+ B(R(E(t)("dlg.common.confirm")), 1)
759
759
  ]),
760
760
  _: 1
761
761
  }, 8, ["disabled"])
@@ -785,28 +785,28 @@ const at = /* @__PURE__ */ A({
785
785
  };
786
786
  return F(d, (m) => {
787
787
  !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");
788
+ }), (m, C) => {
789
+ 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
790
  return q(), L(he, {
791
791
  modelValue: E(d),
792
- "onUpdate:modelValue": V[3] || (V[3] = (I) => W(d) ? d.value = I : null),
792
+ "onUpdate:modelValue": C[3] || (C[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(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
796
+ onKeydown: C[4] || (C[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
797
797
  }, {
798
798
  default: g(() => [
799
799
  b(xe, { title: a.value }, {
800
800
  default: g(() => [
801
801
  o.value ? (q(), L(Q, { key: 0 }, {
802
802
  default: g(() => [
803
- B(S(o.value), 1)
803
+ B(R(o.value), 1)
804
804
  ]),
805
805
  _: 1
806
806
  })) : ee("", !0),
807
807
  b(ye, {
808
808
  modelValue: j.value,
809
- "onUpdate:modelValue": V[2] || (V[2] = (I) => j.value = I),
809
+ "onUpdate:modelValue": C[2] || (C[2] = (I) => j.value = I),
810
810
  class: "mx-3",
811
811
  onSubmit: M(f, ["prevent"])
812
812
  }, {
@@ -815,31 +815,31 @@ const at = /* @__PURE__ */ A({
815
815
  ref_key: "target",
816
816
  ref: i,
817
817
  modelValue: n.value,
818
- "onUpdate:modelValue": V[0] || (V[0] = (I) => n.value = I),
818
+ "onUpdate:modelValue": C[0] || (C[0] = (I) => n.value = I),
819
819
  label: l.value,
820
820
  placeholder: r.value,
821
821
  rules: s.value
822
822
  }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
823
823
  b(be, { class: "d-flex justify-end" }, {
824
824
  default: g(() => [
825
- b(R, {
825
+ b(S, {
826
826
  color: _.value,
827
827
  variant: "text",
828
- onClick: V[1] || (V[1] = (I) => d.value = !1)
828
+ onClick: C[1] || (C[1] = (I) => d.value = !1)
829
829
  }, {
830
830
  default: g(() => [
831
- B(S(c.value), 1)
831
+ B(R(c.value), 1)
832
832
  ]),
833
833
  _: 1
834
834
  }, 8, ["color"]),
835
- b(R, {
835
+ b(S, {
836
836
  color: x.value,
837
837
  disabled: !j.value,
838
838
  type: "submit",
839
839
  variant: "text"
840
840
  }, {
841
841
  default: g(() => [
842
- B(S(D.value), 1)
842
+ B(R(D.value), 1)
843
843
  ]),
844
844
  _: 1
845
845
  }, 8, ["color", "disabled"])
@@ -889,7 +889,7 @@ const at = /* @__PURE__ */ A({
889
889
  }, {
890
890
  default: g(() => [
891
891
  k("div", dt, [
892
- k("span", it, S(a.value), 1)
892
+ k("span", it, R(a.value), 1)
893
893
  ])
894
894
  ]),
895
895
  _: 1
@@ -917,7 +917,7 @@ export {
917
917
  Pe as addView,
918
918
  Ae as appAppear,
919
919
  Kt as clearViews,
920
- St as closeWaitDlg,
920
+ Rt as closeWaitDlg,
921
921
  kt as createAxios,
922
922
  Ht as default,
923
923
  et as delView,
@@ -940,10 +940,10 @@ export {
940
940
  Lt as messageSuccess,
941
941
  Bt as messageWarning,
942
942
  Ut as onBeforeEach,
943
- Ct as openConfirmDlg,
943
+ Vt as openConfirmDlg,
944
944
  qt as openNumberDlg,
945
945
  jt as openPromptDlg,
946
- Rt as openWaitDlg,
946
+ St as openWaitDlg,
947
947
  tt as popView,
948
948
  Ke as provideDark,
949
949
  He as provideLastAppPath,
@@ -958,6 +958,6 @@ export {
958
958
  Xt as useSystem,
959
959
  J as useViewStack,
960
960
  $e as verifyPermission,
961
- Vt as waitMs,
961
+ Ct as waitMs,
962
962
  X as waitUtil
963
963
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.9.3",
4
+ "version": "0.9.5",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",