mgv-backoffice 1.8.0 → 1.11.0
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.
- package/README.md +74 -4
- package/dist/src/components/BaseSpinner.vue.d.ts +10 -1
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +168 -147
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +6 -2
- package/src/components/BaseSpinner.vue +76 -3
- package/src/utils/format.test.ts +129 -0
- package/src/utils/format.ts +6 -6
- package/src/utils/httpColors.test.ts +62 -0
- package/src/utils/pnl.test.ts +45 -0
- package/src/utils/sanitizeHtml.test.ts +77 -0
- package/src/utils/util.test.ts +28 -0
- package/tailwind.safelist.css +3 -1
- package/tailwind.safelist.js +11 -2
package/dist/ui-lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, nextTick as d, normalizeClass as f, onBeforeUnmount as p, onMounted as m, onScopeDispose as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useSlots as T, vModelText as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
|
|
2
|
-
import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as
|
|
2
|
+
import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as re, DocumentDuplicateIcon as ie, ExclamationCircleIcon as ae, ExclamationTriangleIcon as P, FolderIcon as oe, InformationCircleIcon as se, MagnifyingGlassIcon as ce, XMarkIcon as F } from "@heroicons/vue/24/outline";
|
|
3
3
|
import { HomeIcon as le } from "@heroicons/vue/24/solid";
|
|
4
4
|
import { useRoute as ue, useRouter as de } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
@@ -143,7 +143,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
143
143
|
key: t,
|
|
144
144
|
class: "inline-flex items-center",
|
|
145
145
|
style: { "margin-left": "0" }
|
|
146
|
-
}, [c(w(
|
|
146
|
+
}, [c(w(re), { class: "h-4 w-4 text-gray-500" }), c(r, {
|
|
147
147
|
to: e.url,
|
|
148
148
|
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white"
|
|
149
149
|
}, {
|
|
@@ -586,7 +586,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
586
586
|
"aria-modal": "true",
|
|
587
587
|
"aria-labelledby": "modal-title-" + t.title
|
|
588
588
|
}, [t.mode === w(U).DELETE ? (_(), a("div", Re, [
|
|
589
|
-
c(w(
|
|
589
|
+
c(w(ae), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
590
590
|
o("h3", {
|
|
591
591
|
id: "modal-title-" + t.title,
|
|
592
592
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
@@ -621,21 +621,45 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
621
621
|
}
|
|
622
622
|
return (e, t) => (_(), a("div", { class: f(n()) }, [b(e.$slots, "default")], 2));
|
|
623
623
|
}
|
|
624
|
-
}), We =
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
|
|
624
|
+
}), We = /* @__PURE__ */ l({
|
|
625
|
+
__name: "BaseSpinner",
|
|
626
|
+
props: {
|
|
627
|
+
size: { default: "sm" },
|
|
628
|
+
color: { default: "blue" }
|
|
629
|
+
},
|
|
630
|
+
setup(e) {
|
|
631
|
+
let t = e, r = n(() => ({
|
|
632
|
+
sm: "w-4 h-4 border-2",
|
|
633
|
+
md: "w-6 h-6 border-2",
|
|
634
|
+
lg: "w-8 h-8 border-4",
|
|
635
|
+
xl: "w-12 h-12 border-4"
|
|
636
|
+
})[t.size]), i = n(() => ({
|
|
637
|
+
blue: "border-t-blue-500",
|
|
638
|
+
emerald: "border-t-emerald-500",
|
|
639
|
+
sky: "border-t-sky-500",
|
|
640
|
+
indigo: "border-t-indigo-500",
|
|
641
|
+
teal: "border-t-teal-500",
|
|
642
|
+
purple: "border-t-purple-500",
|
|
643
|
+
red: "border-t-red-500",
|
|
644
|
+
amber: "border-t-amber-500"
|
|
645
|
+
})[t.color]);
|
|
646
|
+
return (e, t) => (_(), a("div", {
|
|
647
|
+
class: f(["border-gray-200 rounded-full animate-spin", [r.value, i.value]]),
|
|
648
|
+
role: "status",
|
|
649
|
+
"aria-label": "Loading"
|
|
650
|
+
}, null, 2));
|
|
651
|
+
}
|
|
652
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
629
653
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
630
654
|
}({}), K = /* @__PURE__ */ function(e) {
|
|
631
655
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
632
|
-
}({}),
|
|
656
|
+
}({}), Ge = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, Ke = { class: "ml-3 text-sm font-normal" }, qe = {
|
|
633
657
|
key: 3,
|
|
634
658
|
type: "button",
|
|
635
659
|
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700",
|
|
636
660
|
"data-dismiss-target": "#toast-danger",
|
|
637
661
|
"aria-label": "Close"
|
|
638
|
-
},
|
|
662
|
+
}, Je = /* @__PURE__ */ l({
|
|
639
663
|
__name: "BaseToast",
|
|
640
664
|
props: {
|
|
641
665
|
mode: {
|
|
@@ -713,25 +737,25 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
713
737
|
id: "toast-top-right",
|
|
714
738
|
class: f(u()),
|
|
715
739
|
role: "alert"
|
|
716
|
-
}, [o("div",
|
|
740
|
+
}, [o("div", Ge, [
|
|
717
741
|
e.mode == w(G).ERROR ? (_(), a("div", {
|
|
718
742
|
key: 0,
|
|
719
743
|
class: f(l())
|
|
720
|
-
}, [c(w(
|
|
744
|
+
}, [c(w(ae), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(G).SUCCESS ? (_(), a("div", {
|
|
721
745
|
key: 1,
|
|
722
746
|
class: f(l())
|
|
723
747
|
}, [c(w(ne), { class: "h-6 w-6 text-green-500" }), r[1] ||= o("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == w(G).WARNING ? (_(), a("div", {
|
|
724
748
|
key: 2,
|
|
725
749
|
class: f(l())
|
|
726
|
-
}, [c(w(
|
|
727
|
-
o("div",
|
|
728
|
-
e.hasCloseIcon ? (_(), a("button",
|
|
750
|
+
}, [c(w(P), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= o("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : i("", !0),
|
|
751
|
+
o("div", Ke, C(e.description), 1),
|
|
752
|
+
e.hasCloseIcon ? (_(), a("button", qe, [r[3] ||= o("span", { class: "sr-only" }, "Close", -1), c(w(F), {
|
|
729
753
|
class: "h-6 w-6 text-gray-500 cursor-pointer",
|
|
730
754
|
onClick: s
|
|
731
755
|
})])) : i("", !0)
|
|
732
756
|
])], 2)) : i("", !0);
|
|
733
757
|
}
|
|
734
|
-
}),
|
|
758
|
+
}), Ye = { class: "w-13" }, Xe = /* @__PURE__ */ l({
|
|
735
759
|
__name: "ColoredSquares",
|
|
736
760
|
props: { color: {
|
|
737
761
|
type: String,
|
|
@@ -770,12 +794,12 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
770
794
|
}
|
|
771
795
|
return "font-bold bg-" + e + "-100 text-" + e + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
772
796
|
}
|
|
773
|
-
return (e, t) => (_(), a("div",
|
|
797
|
+
return (e, t) => (_(), a("div", Ye, [o("div", { class: f(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [b(e.$slots, "default"), o("div", { class: f(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
774
798
|
}
|
|
775
|
-
}),
|
|
799
|
+
}), Ze = { class: "relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6 dark:border-orange-700 dark:bg-slate-800" }, Qe = {
|
|
776
800
|
key: 0,
|
|
777
801
|
class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500 dark:bg-orange-900/40 dark:text-orange-400"
|
|
778
|
-
},
|
|
802
|
+
}, $e = { class: "flex items-start justify-between" }, et = { class: "text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, tt = { class: "mt-1 text-4xl font-bold text-gray-400 dark:text-slate-300" }, nt = { class: "mt-1 text-sm font-medium text-orange-400 dark:text-orange-400" }, rt = /* @__PURE__ */ l({
|
|
779
803
|
__name: "EarningsCard",
|
|
780
804
|
props: {
|
|
781
805
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -790,10 +814,10 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
790
814
|
minimumFractionDigits: t.decimals,
|
|
791
815
|
maximumFractionDigits: t.decimals
|
|
792
816
|
}));
|
|
793
|
-
return (t, n) => (_(), a("div",
|
|
794
|
-
o("p",
|
|
795
|
-
o("p",
|
|
796
|
-
o("p",
|
|
817
|
+
return (t, n) => (_(), a("div", Ze, [e.badge ? (_(), a("div", Qe, C(e.badge), 1)) : i("", !0), o("div", $e, [o("div", null, [
|
|
818
|
+
o("p", et, C(e.title), 1),
|
|
819
|
+
o("p", tt, C(r.value), 1),
|
|
820
|
+
o("p", nt, C(e.subtitle), 1)
|
|
797
821
|
]), n[0] ||= o("div", { class: "mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50 dark:bg-orange-900/30" }, [o("svg", {
|
|
798
822
|
class: "h-6 w-6 text-orange-400",
|
|
799
823
|
viewBox: "0 0 24 24",
|
|
@@ -804,10 +828,10 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
804
828
|
"stroke-linejoin": "round"
|
|
805
829
|
}, [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }), o("polyline", { points: "16 7 22 7 22 13" })])], -1)])]));
|
|
806
830
|
}
|
|
807
|
-
}),
|
|
831
|
+
}), it = {
|
|
808
832
|
key: 0,
|
|
809
833
|
class: "font-bold text-green-800"
|
|
810
|
-
},
|
|
834
|
+
}, at = { key: 0 }, ot = { key: 0 }, st = "font-bold", ct = /* @__PURE__ */ l({
|
|
811
835
|
__name: "EuroAmount",
|
|
812
836
|
props: {
|
|
813
837
|
amount: {
|
|
@@ -827,15 +851,15 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
827
851
|
},
|
|
828
852
|
setup(t) {
|
|
829
853
|
let r = t, o = n(() => r.amount !== null && r.amount !== void 0), c = n(() => o.value && r.amount < 0), l = n(() => r.beforeAmount === null || r.beforeAmount === void 0 ? !1 : r.amount < r.beforeAmount), u = n(() => c.value || l.value), d = n(() => !c.value && !l.value && !(r.beforeAmount === null || r.beforeAmount === void 0));
|
|
830
|
-
return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span",
|
|
854
|
+
return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span", it, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", at, "€")) : i("", !0)])) : i("", !0), o.value && !d.value ? (_(), a("span", {
|
|
831
855
|
key: 1,
|
|
832
|
-
class: f([
|
|
833
|
-
}, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span",
|
|
856
|
+
class: f([st, u.value ? "text-red-800" : "text-gray-800"])
|
|
857
|
+
}, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", ot, "€")) : i("", !0)], 2)) : i("", !0)], 64));
|
|
834
858
|
}
|
|
835
|
-
}),
|
|
859
|
+
}), lt = ["onClick", "onKeydown"], ut = {
|
|
836
860
|
key: 1,
|
|
837
861
|
style: { cursor: "not-allowed" }
|
|
838
|
-
},
|
|
862
|
+
}, dt = /* @__PURE__ */ W(/* @__PURE__ */ l({
|
|
839
863
|
__name: "Pagination",
|
|
840
864
|
props: {
|
|
841
865
|
totalItems: {
|
|
@@ -878,15 +902,15 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
878
902
|
onClick: (t) => d(e),
|
|
879
903
|
onKeydown: j((t) => d(e), ["enter"]),
|
|
880
904
|
class: f({ active: e === s.value })
|
|
881
|
-
}, C(e), 43,
|
|
905
|
+
}, C(e), 43, lt)), e === 0 ? (_(), a("span", ut, "...")) : i("", !0)]))), 128))])]));
|
|
882
906
|
}
|
|
883
|
-
}), [["__scopeId", "data-v-d7ebb6ac"]]),
|
|
907
|
+
}), [["__scopeId", "data-v-d7ebb6ac"]]), ft = { key: 0 }, pt = {
|
|
884
908
|
key: 0,
|
|
885
909
|
class: "flex items-center space-x-2"
|
|
886
|
-
},
|
|
910
|
+
}, mt = {
|
|
887
911
|
key: 1,
|
|
888
912
|
class: "flex items-center space-x-2"
|
|
889
|
-
},
|
|
913
|
+
}, ht = /* @__PURE__ */ l({
|
|
890
914
|
__name: "TrendArrow",
|
|
891
915
|
props: {
|
|
892
916
|
number: {
|
|
@@ -900,18 +924,18 @@ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e
|
|
|
900
924
|
},
|
|
901
925
|
setup(e) {
|
|
902
926
|
let t = e, r = n(() => t.number !== null && t.number !== void 0 && t.number < 0);
|
|
903
|
-
return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div",
|
|
927
|
+
return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div", ft, [r.value ? (_(), a("span", pt, [c(R, { color: w(L).RED }, {
|
|
904
928
|
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
905
929
|
_: 1
|
|
906
|
-
}, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span",
|
|
930
|
+
}, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span", mt, [c(R, { color: w(L).GREEN }, {
|
|
907
931
|
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
908
932
|
_: 1
|
|
909
933
|
}, 8, ["color"]), c(w(te), { class: "h-5 w-5 text-green-500" })]))])) : i("", !0);
|
|
910
934
|
}
|
|
911
|
-
}), q = v(!1),
|
|
912
|
-
function
|
|
913
|
-
if (!
|
|
914
|
-
if (
|
|
935
|
+
}), q = v(!1), gt = !1, J = "mgv-theme";
|
|
936
|
+
function _t(e) {
|
|
937
|
+
if (!gt) {
|
|
938
|
+
if (gt = !0, J = e, typeof window < "u") {
|
|
915
939
|
let e = window.localStorage?.getItem(J);
|
|
916
940
|
e ? q.value = e === "dark" : typeof window.matchMedia == "function" && (q.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
917
941
|
}
|
|
@@ -923,7 +947,7 @@ function bt(e) {
|
|
|
923
947
|
}
|
|
924
948
|
}
|
|
925
949
|
function Y(e) {
|
|
926
|
-
|
|
950
|
+
_t(e?.storageKey ?? J);
|
|
927
951
|
function t() {
|
|
928
952
|
q.value = !q.value;
|
|
929
953
|
}
|
|
@@ -970,7 +994,7 @@ function Z(e) {
|
|
|
970
994
|
}
|
|
971
995
|
//#endregion
|
|
972
996
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
973
|
-
var
|
|
997
|
+
var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { class: "flex-1" }, xt = { class: "mt-4" }, St = { class: "mt-6 flex gap-3 justify-end" }, Q = /* @__PURE__ */ l({
|
|
974
998
|
__name: "BaseModalShell",
|
|
975
999
|
props: {
|
|
976
1000
|
title: {},
|
|
@@ -997,16 +1021,16 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
997
1021
|
}, [o("div", {
|
|
998
1022
|
class: f(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, d.value]]),
|
|
999
1023
|
onClick: i[0] ||= M(() => {}, ["stop"])
|
|
1000
|
-
}, [o("div",
|
|
1001
|
-
o("div",
|
|
1024
|
+
}, [o("div", vt, [
|
|
1025
|
+
o("div", yt, [b(n.$slots, "icon"), o("div", bt, [o("h3", {
|
|
1002
1026
|
id: u,
|
|
1003
1027
|
class: f(["text-lg font-medium", w(l).primaryText])
|
|
1004
1028
|
}, C(e.title), 3)])]),
|
|
1005
|
-
o("div",
|
|
1006
|
-
o("div",
|
|
1029
|
+
o("div", xt, [b(n.$slots, "default")]),
|
|
1030
|
+
o("div", St, [b(n.$slots, "footer")])
|
|
1007
1031
|
])], 2)])]));
|
|
1008
1032
|
}
|
|
1009
|
-
}),
|
|
1033
|
+
}), Ct = ["aria-expanded"], wt = { class: "flex items-center gap-3" }, Tt = /* @__PURE__ */ l({
|
|
1010
1034
|
__name: "BaseCollapsibleSection",
|
|
1011
1035
|
props: {
|
|
1012
1036
|
title: {},
|
|
@@ -1022,7 +1046,7 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1022
1046
|
class: f(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1023
1047
|
"aria-expanded": !e.collapsed,
|
|
1024
1048
|
onClick: n[0] ||= (e) => s("toggle")
|
|
1025
|
-
}, [o("div",
|
|
1049
|
+
}, [o("div", wt, [o("h2", { class: f(["text-base font-semibold", u.value]) }, C(e.title), 3), e.badge ? (_(), a("span", {
|
|
1026
1050
|
key: 0,
|
|
1027
1051
|
class: f(["text-xs px-2 py-0.5 rounded-full", p.value])
|
|
1028
1052
|
}, C(e.badge), 3)) : i("", !0)]), (_(), a("svg", {
|
|
@@ -1036,15 +1060,15 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1036
1060
|
"stroke-linecap": "round",
|
|
1037
1061
|
"stroke-linejoin": "round",
|
|
1038
1062
|
d: "M19 9l-7 7-7-7"
|
|
1039
|
-
}, null, -1)]], 2))], 10,
|
|
1063
|
+
}, null, -1)]], 2))], 10, Ct), A(o("div", { class: f(["p-6 border-t", [w(l).border, m.value]]) }, [b(t.$slots, "default")], 2), [[D, !e.collapsed]])], 2));
|
|
1040
1064
|
}
|
|
1041
|
-
}),
|
|
1065
|
+
}), Et = ["disabled"], Dt = ["disabled"], Ot = {
|
|
1042
1066
|
key: 0,
|
|
1043
1067
|
class: "w-4 h-4 animate-spin",
|
|
1044
1068
|
fill: "none",
|
|
1045
1069
|
viewBox: "0 0 24 24",
|
|
1046
1070
|
"aria-hidden": "true"
|
|
1047
|
-
},
|
|
1071
|
+
}, kt = /* @__PURE__ */ l({
|
|
1048
1072
|
__name: "BaseConfirmModal",
|
|
1049
1073
|
props: {
|
|
1050
1074
|
title: {},
|
|
@@ -1072,7 +1096,7 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1072
1096
|
"manual-close": e.submitting,
|
|
1073
1097
|
onCancel: m
|
|
1074
1098
|
}, {
|
|
1075
|
-
icon: k(() => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? w(u) ? "bg-red-900/30" : "bg-red-50" : w(u) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [c(w(
|
|
1099
|
+
icon: k(() => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? w(u) ? "bg-red-900/30" : "bg-red-50" : w(u) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [c(w(P), {
|
|
1076
1100
|
class: f(["h-6 w-6", e.variant === "danger" ? "text-red-600" : "text-amber-600"]),
|
|
1077
1101
|
"aria-hidden": "true"
|
|
1078
1102
|
}, null, 8, ["class"])], 2)]),
|
|
@@ -1081,12 +1105,12 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1081
1105
|
disabled: e.submitting,
|
|
1082
1106
|
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", [w(d).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1083
1107
|
onClick: m
|
|
1084
|
-
}, C(e.cancelText), 11,
|
|
1108
|
+
}, C(e.cancelText), 11, Et), o("button", {
|
|
1085
1109
|
type: "button",
|
|
1086
1110
|
disabled: e.submitting,
|
|
1087
1111
|
class: f(["inline-flex items-center justify-center gap-2 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", [e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1088
1112
|
onClick: p
|
|
1089
|
-
}, [e.submitting ? (_(), a("svg",
|
|
1113
|
+
}, [e.submitting ? (_(), a("svg", Ot, [...n[0] ||= [o("circle", {
|
|
1090
1114
|
class: "opacity-25",
|
|
1091
1115
|
cx: "12",
|
|
1092
1116
|
cy: "12",
|
|
@@ -1097,12 +1121,12 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1097
1121
|
class: "opacity-75",
|
|
1098
1122
|
fill: "currentColor",
|
|
1099
1123
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1100
|
-
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10,
|
|
1124
|
+
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Dt)]),
|
|
1101
1125
|
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3)]),
|
|
1102
1126
|
_: 1
|
|
1103
1127
|
}, 8, ["title", "manual-close"]));
|
|
1104
1128
|
}
|
|
1105
|
-
}),
|
|
1129
|
+
}), At = { class: "mt-4" }, jt = ["placeholder"], Mt = ["disabled"], Nt = /* @__PURE__ */ l({
|
|
1106
1130
|
__name: "BaseTextInputModal",
|
|
1107
1131
|
props: {
|
|
1108
1132
|
title: {},
|
|
@@ -1138,7 +1162,7 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1138
1162
|
"manual-close": "",
|
|
1139
1163
|
onBackdrop: g
|
|
1140
1164
|
}, {
|
|
1141
|
-
icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(
|
|
1165
|
+
icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(ie), {
|
|
1142
1166
|
class: "h-6 w-6 text-emerald-600",
|
|
1143
1167
|
"aria-hidden": "true"
|
|
1144
1168
|
})], 2)])]),
|
|
@@ -1151,8 +1175,8 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1151
1175
|
disabled: !l.value.trim() || e.submitting,
|
|
1152
1176
|
class: f(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1153
1177
|
onClick: p
|
|
1154
|
-
}, C(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1155
|
-
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div",
|
|
1178
|
+
}, C(e.submitting ? e.submittingText : e.confirmText), 11, Mt)]),
|
|
1179
|
+
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div", At, [o("label", { class: f(["block text-sm font-medium mb-1", w(s).label]) }, C(e.inputLabel), 3), A(o("input", {
|
|
1156
1180
|
ref_key: "nameInput",
|
|
1157
1181
|
ref: u,
|
|
1158
1182
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
@@ -1160,11 +1184,11 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1160
1184
|
placeholder: e.placeholder,
|
|
1161
1185
|
class: f(["w-full px-3 py-2 rounded-md border text-sm transition-colors", w(a) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1162
1186
|
onKeyup: j(p, ["enter"])
|
|
1163
|
-
}, null, 42,
|
|
1187
|
+
}, null, 42, jt), [[E, l.value]])])]),
|
|
1164
1188
|
_: 3
|
|
1165
1189
|
}, 8, ["title"]));
|
|
1166
1190
|
}
|
|
1167
|
-
}),
|
|
1191
|
+
}), Pt = { class: "flex items-center justify-center min-h-[60vh]" }, Ft = { class: "text-center px-6" }, It = /* @__PURE__ */ l({
|
|
1168
1192
|
__name: "BaseNotFoundPage",
|
|
1169
1193
|
props: {
|
|
1170
1194
|
code: { default: "404" },
|
|
@@ -1177,8 +1201,8 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1177
1201
|
function s() {
|
|
1178
1202
|
n.push({ name: t.homeRouteName });
|
|
1179
1203
|
}
|
|
1180
|
-
return (t, n) => (_(), a("div",
|
|
1181
|
-
c(w(
|
|
1204
|
+
return (t, n) => (_(), a("div", Pt, [o("div", Ft, [
|
|
1205
|
+
c(w(P), { class: f(["w-16 h-16 mx-auto mb-4", w(i).illustration]) }, null, 8, ["class"]),
|
|
1182
1206
|
o("h1", { class: f(["text-4xl font-bold mb-2", w(r) ? "text-gray-200" : "text-gray-800"]) }, C(e.code), 3),
|
|
1183
1207
|
o("p", { class: f(["text-lg mb-6", w(i).dimTextAlt]) }, C(e.message), 3),
|
|
1184
1208
|
o("button", {
|
|
@@ -1188,7 +1212,7 @@ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { clas
|
|
|
1188
1212
|
])]));
|
|
1189
1213
|
}
|
|
1190
1214
|
}), $ = v(!1);
|
|
1191
|
-
function
|
|
1215
|
+
function Lt() {
|
|
1192
1216
|
function e() {
|
|
1193
1217
|
$.value = !0;
|
|
1194
1218
|
}
|
|
@@ -1207,11 +1231,11 @@ function Bt() {
|
|
|
1207
1231
|
}
|
|
1208
1232
|
//#endregion
|
|
1209
1233
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1210
|
-
var
|
|
1234
|
+
var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }, Bt = { class: "px-5 pt-5 pb-4 flex items-center justify-center relative" }, Vt = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Ht = { class: "px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500" }, Ut = { class: "space-y-0.5" }, Wt = ["aria-current", "onClick"], Gt = [
|
|
1211
1235
|
"title",
|
|
1212
1236
|
"aria-label",
|
|
1213
1237
|
"aria-pressed"
|
|
1214
|
-
],
|
|
1238
|
+
], Kt = /* @__PURE__ */ W(/* @__PURE__ */ l({
|
|
1215
1239
|
__name: "BaseSidebar",
|
|
1216
1240
|
props: {
|
|
1217
1241
|
sections: {},
|
|
@@ -1224,7 +1248,7 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1224
1248
|
}
|
|
1225
1249
|
},
|
|
1226
1250
|
setup(t) {
|
|
1227
|
-
let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } = Y(), { mobileOpen: x, close: T, toggle: E } =
|
|
1251
|
+
let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } = Y(), { mobileOpen: x, close: T, toggle: E } = Lt(), D = v(null), k = null;
|
|
1228
1252
|
O(x, async (e) => {
|
|
1229
1253
|
e ? (k = document.activeElement instanceof HTMLElement ? document.activeElement : null, await d(), D.value?.focus()) : (k?.focus(), k = null);
|
|
1230
1254
|
}), m(() => {}), g(() => {});
|
|
@@ -1257,7 +1281,7 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1257
1281
|
key: 0,
|
|
1258
1282
|
class: "w-6 h-6",
|
|
1259
1283
|
"aria-hidden": "true"
|
|
1260
|
-
}))], 10,
|
|
1284
|
+
}))], 10, Rt)], 2),
|
|
1261
1285
|
w(x) ? (_(), a("div", {
|
|
1262
1286
|
key: 0,
|
|
1263
1287
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
@@ -1268,8 +1292,8 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1268
1292
|
role: "navigation",
|
|
1269
1293
|
"aria-label": "Main navigation",
|
|
1270
1294
|
class: f(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-transform duration-300 lg:pointer-events-auto", [w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200", w(x) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50"]])
|
|
1271
|
-
}, [o("div",
|
|
1272
|
-
o("div",
|
|
1295
|
+
}, [o("div", zt, [
|
|
1296
|
+
o("div", Bt, [o("button", {
|
|
1273
1297
|
type: "button",
|
|
1274
1298
|
onClick: A,
|
|
1275
1299
|
class: "cursor-pointer",
|
|
@@ -1285,12 +1309,12 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1285
1309
|
class: "w-5 h-5",
|
|
1286
1310
|
"aria-hidden": "true"
|
|
1287
1311
|
})], 2)]),
|
|
1288
|
-
o("nav",
|
|
1312
|
+
o("nav", Vt, [(_(!0), a(e, null, y(t.sections, (t) => (_(), a("div", { key: t.title }, [o("p", Ht, C(t.title), 1), o("ul", Ut, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("li", { key: e.name }, [o("button", {
|
|
1289
1313
|
type: "button",
|
|
1290
1314
|
"aria-current": j(e.name) ? "page" : void 0,
|
|
1291
1315
|
onClick: (t) => M(e.name),
|
|
1292
1316
|
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(e.name) ? w(p) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1293
|
-
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10,
|
|
1317
|
+
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10, Wt)]))), 128))])]))), 128))]),
|
|
1294
1318
|
o("div", { class: f(["px-4 py-4 border-t transition-colors space-y-3", w(p) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1295
1319
|
t.showThemeToggle ? (_(), a("button", {
|
|
1296
1320
|
key: 0,
|
|
@@ -1300,7 +1324,7 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1300
1324
|
"aria-label": w(p) ? "Switch to light mode" : "Switch to dark mode",
|
|
1301
1325
|
"aria-pressed": w(p),
|
|
1302
1326
|
class: f(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1303
|
-
}, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10,
|
|
1327
|
+
}, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10, Gt)) : i("", !0),
|
|
1304
1328
|
b(n.$slots, "status", {}, void 0, !0),
|
|
1305
1329
|
b(n.$slots, "footer", {}, () => [t.appName || t.version ? (_(), a("div", {
|
|
1306
1330
|
key: 0,
|
|
@@ -1314,26 +1338,26 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1314
1338
|
])], 2)
|
|
1315
1339
|
]));
|
|
1316
1340
|
}
|
|
1317
|
-
}), [["__scopeId", "data-v-e27f267e"]]),
|
|
1341
|
+
}), [["__scopeId", "data-v-e27f267e"]]), qt = {
|
|
1318
1342
|
key: 1,
|
|
1319
1343
|
class: "mt-4 flex justify-center py-6"
|
|
1320
|
-
},
|
|
1344
|
+
}, Jt = {
|
|
1321
1345
|
key: 2,
|
|
1322
1346
|
class: "mt-4 text-sm text-red-500",
|
|
1323
1347
|
role: "alert"
|
|
1324
|
-
},
|
|
1348
|
+
}, Yt = {
|
|
1325
1349
|
key: 3,
|
|
1326
1350
|
class: "mt-4"
|
|
1327
|
-
},
|
|
1351
|
+
}, Xt = { class: "relative" }, Zt = ["placeholder"], Qt = {
|
|
1328
1352
|
key: 4,
|
|
1329
1353
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1330
|
-
},
|
|
1354
|
+
}, $t = ["onClick"], en = { class: "flex-1 min-w-0" }, tn = {
|
|
1331
1355
|
key: 0,
|
|
1332
1356
|
class: "text-center py-6"
|
|
1333
|
-
},
|
|
1357
|
+
}, nn = {
|
|
1334
1358
|
key: 1,
|
|
1335
1359
|
class: "text-center py-6"
|
|
1336
|
-
},
|
|
1360
|
+
}, rn = ["disabled"], an = ["disabled"], on = /* @__PURE__ */ l({
|
|
1337
1361
|
__name: "BaseEntityPickerModal",
|
|
1338
1362
|
props: {
|
|
1339
1363
|
title: {},
|
|
@@ -1467,13 +1491,13 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1467
1491
|
function ne() {
|
|
1468
1492
|
!T.value || l.submitting || u("confirm", T.value);
|
|
1469
1493
|
}
|
|
1470
|
-
function
|
|
1494
|
+
function re() {
|
|
1471
1495
|
l.submitting || u("cancel");
|
|
1472
1496
|
}
|
|
1473
1497
|
return (n, s) => (_(), r(Q, {
|
|
1474
1498
|
title: t.title,
|
|
1475
1499
|
"manual-close": t.submitting,
|
|
1476
|
-
onCancel:
|
|
1500
|
+
onCancel: re
|
|
1477
1501
|
}, {
|
|
1478
1502
|
icon: k(() => [b(n.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", N.value.iconBg]) }, [c(w(oe), {
|
|
1479
1503
|
class: f(["h-6 w-6", N.value.iconText]),
|
|
@@ -1483,20 +1507,20 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1483
1507
|
type: "button",
|
|
1484
1508
|
disabled: t.submitting,
|
|
1485
1509
|
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 disabled:opacity-50 disabled:cursor-not-allowed", w(h).ghostButton]),
|
|
1486
|
-
onClick:
|
|
1487
|
-
}, C(t.cancelText), 11,
|
|
1510
|
+
onClick: re
|
|
1511
|
+
}, C(t.cancelText), 11, rn), o("button", {
|
|
1488
1512
|
type: "button",
|
|
1489
1513
|
disabled: !T.value || t.submitting,
|
|
1490
1514
|
class: f(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", !T.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
|
|
1491
1515
|
onClick: ne
|
|
1492
|
-
}, C(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
1516
|
+
}, C(t.submitting ? t.submittingText : t.confirmText), 11, an)]),
|
|
1493
1517
|
default: k(() => [
|
|
1494
1518
|
t.message ? (_(), a("p", {
|
|
1495
1519
|
key: 0,
|
|
1496
1520
|
class: f(["text-sm", w(p) ? "text-gray-300" : "text-gray-600"])
|
|
1497
1521
|
}, C(t.message), 3)) : i("", !0),
|
|
1498
|
-
x.value ? (_(), a("div",
|
|
1499
|
-
!x.value && !S.value && j.value.length > 0 ? (_(), a("div",
|
|
1522
|
+
x.value ? (_(), a("div", qt, [c(We)])) : S.value ? (_(), a("div", Jt, C(S.value), 1)) : i("", !0),
|
|
1523
|
+
!x.value && !S.value && j.value.length > 0 ? (_(), a("div", Yt, [o("div", Xt, [c(w(ce), {
|
|
1500
1524
|
class: f(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", w(h).dimText]),
|
|
1501
1525
|
"aria-hidden": "true"
|
|
1502
1526
|
}, null, 8, ["class"]), A(o("input", {
|
|
@@ -1506,14 +1530,14 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1506
1530
|
type: "text",
|
|
1507
1531
|
placeholder: t.searchPlaceholder,
|
|
1508
1532
|
class: f(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [w(p) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", N.value.inputFocus]])
|
|
1509
|
-
}, null, 10,
|
|
1510
|
-
!x.value && !S.value ? (_(), a("div",
|
|
1533
|
+
}, null, 10, Zt), [[E, D.value]])])])) : i("", !0),
|
|
1534
|
+
!x.value && !S.value ? (_(), a("div", Qt, [(_(!0), a(e, null, y(M.value, (e) => (_(), a("div", {
|
|
1511
1535
|
key: e.id,
|
|
1512
1536
|
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors", [T.value === e.id ? N.value.selectedRow : w(p) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1513
1537
|
onClick: (t) => T.value = e.id
|
|
1514
1538
|
}, [
|
|
1515
1539
|
c(w(oe), { class: f(["w-5 h-5 flex-shrink-0", w(h).dimText]) }, null, 8, ["class"]),
|
|
1516
|
-
o("div",
|
|
1540
|
+
o("div", en, [o("p", { class: f(["text-sm font-medium truncate", w(h).bodyText]) }, C(e.label), 3)]),
|
|
1517
1541
|
T.value === e.id ? (_(), a("div", {
|
|
1518
1542
|
key: 0,
|
|
1519
1543
|
class: f(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
|
|
@@ -1529,15 +1553,15 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1529
1553
|
"stroke-linejoin": "round",
|
|
1530
1554
|
d: "M5 13l4 4L19 7"
|
|
1531
1555
|
})], -1)]], 2)) : i("", !0)
|
|
1532
|
-
], 10,
|
|
1556
|
+
], 10, $t))), 128)), j.value.length === 0 ? (_(), a("div", tn, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.emptyMessage), 3)])) : M.value.length === 0 ? (_(), a("div", nn, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.noMatchMessage), 3)])) : i("", !0)])) : i("", !0)
|
|
1533
1557
|
]),
|
|
1534
1558
|
_: 3
|
|
1535
1559
|
}, 8, ["title", "manual-close"]));
|
|
1536
1560
|
}
|
|
1537
|
-
}),
|
|
1561
|
+
}), sn = {
|
|
1538
1562
|
href: "#main-content",
|
|
1539
1563
|
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1540
|
-
},
|
|
1564
|
+
}, cn = ["inert"], ln = /* @__PURE__ */ l({
|
|
1541
1565
|
__name: "BaseAppLayout",
|
|
1542
1566
|
props: {
|
|
1543
1567
|
showSidebar: {
|
|
@@ -1547,19 +1571,19 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1547
1571
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1548
1572
|
},
|
|
1549
1573
|
setup(e) {
|
|
1550
|
-
let t = e, { isDark: r } = Y(), { mobileOpen: s } =
|
|
1574
|
+
let t = e, { isDark: r } = Y(), { mobileOpen: s } = Lt(), c = n(() => t.showSidebar);
|
|
1551
1575
|
return (t, n) => (_(), a("div", { class: f(["min-h-screen transition-colors duration-300", w(r) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1552
|
-
o("a",
|
|
1576
|
+
o("a", sn, C(e.skipLinkLabel), 1),
|
|
1553
1577
|
c.value ? b(t.$slots, "sidebar", { key: 0 }) : i("", !0),
|
|
1554
1578
|
o("main", {
|
|
1555
1579
|
id: "main-content",
|
|
1556
1580
|
tabindex: "-1",
|
|
1557
1581
|
inert: c.value && w(s) ? !0 : void 0,
|
|
1558
1582
|
class: f(c.value ? "pt-14 lg:pt-0 lg:ml-60" : "")
|
|
1559
|
-
}, [b(t.$slots, "default")], 10,
|
|
1583
|
+
}, [b(t.$slots, "default")], 10, cn)
|
|
1560
1584
|
], 2));
|
|
1561
1585
|
}
|
|
1562
|
-
}),
|
|
1586
|
+
}), un = { class: "flex items-center justify-between mb-8" }, dn = { class: "flex items-center gap-3" }, fn = { class: "flex items-center gap-2" }, pn = /* @__PURE__ */ l({
|
|
1563
1587
|
__name: "BasePageHeader",
|
|
1564
1588
|
props: {
|
|
1565
1589
|
title: {},
|
|
@@ -1609,16 +1633,16 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1609
1633
|
}[t.iconColor];
|
|
1610
1634
|
return r.value ? e.dark : e.light;
|
|
1611
1635
|
});
|
|
1612
|
-
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div",
|
|
1636
|
+
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div", un, [o("div", dn, [o("div", { class: f(["w-10 h-10 rounded-lg flex items-center justify-center", c.value]) }, [b(t.$slots, "icon", { iconClass: l.value })], 2), o("div", null, [o("h1", { class: f(["text-2xl font-bold", w(s).primaryTextSoft]) }, C(e.title), 3), e.subtitle ? (_(), a("p", {
|
|
1613
1637
|
key: 0,
|
|
1614
1638
|
class: f(["text-sm", w(s).dimTextAlt])
|
|
1615
|
-
}, C(e.subtitle), 3)) : i("", !0)])]), o("div",
|
|
1639
|
+
}, C(e.subtitle), 3)) : i("", !0)])]), o("div", fn, [b(t.$slots, "actions")])])], 2));
|
|
1616
1640
|
}
|
|
1617
|
-
}),
|
|
1641
|
+
}), mn = [
|
|
1618
1642
|
"type",
|
|
1619
1643
|
"disabled",
|
|
1620
1644
|
"title"
|
|
1621
|
-
],
|
|
1645
|
+
], hn = { key: 0 }, gn = /* @__PURE__ */ l({
|
|
1622
1646
|
__name: "BaseToolbarButton",
|
|
1623
1647
|
props: {
|
|
1624
1648
|
label: { default: "" },
|
|
@@ -1651,14 +1675,14 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1651
1675
|
title: e.title,
|
|
1652
1676
|
class: f(["inline-flex shrink-0 items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap", o.value]),
|
|
1653
1677
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1654
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1678
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", hn, C(e.label), 1)) : i("", !0)], 10, mn));
|
|
1655
1679
|
}
|
|
1656
|
-
}),
|
|
1680
|
+
}), _n = [
|
|
1657
1681
|
"type",
|
|
1658
1682
|
"disabled",
|
|
1659
1683
|
"title",
|
|
1660
1684
|
"aria-label"
|
|
1661
|
-
],
|
|
1685
|
+
], vn = { key: 0 }, yn = /* @__PURE__ */ l({
|
|
1662
1686
|
__name: "BaseActionButton",
|
|
1663
1687
|
props: {
|
|
1664
1688
|
label: { default: "" },
|
|
@@ -1757,12 +1781,12 @@ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }
|
|
|
1757
1781
|
"aria-label": e.ariaLabel,
|
|
1758
1782
|
class: f(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
1759
1783
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1760
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1784
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", vn, C(e.label), 1)) : i("", !0)], 10, _n));
|
|
1761
1785
|
}
|
|
1762
1786
|
});
|
|
1763
1787
|
//#endregion
|
|
1764
1788
|
//#region src/composables/useDebounce.ts
|
|
1765
|
-
function
|
|
1789
|
+
function bn(e, t = 300) {
|
|
1766
1790
|
let n = v(e.value), r = null;
|
|
1767
1791
|
return O(e, (e) => {
|
|
1768
1792
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -1774,7 +1798,7 @@ function Cn(e, t = 300) {
|
|
|
1774
1798
|
}
|
|
1775
1799
|
//#endregion
|
|
1776
1800
|
//#region src/composables/useToast.ts
|
|
1777
|
-
function
|
|
1801
|
+
function xn(e = 3e3) {
|
|
1778
1802
|
let t = v(!1), n = v(""), r = v(G.SUCCESS), i = null;
|
|
1779
1803
|
function a() {
|
|
1780
1804
|
i &&= (clearTimeout(i), null);
|
|
@@ -1795,16 +1819,16 @@ function wn(e = 3e3) {
|
|
|
1795
1819
|
}
|
|
1796
1820
|
//#endregion
|
|
1797
1821
|
//#region src/enums/BaseBadgeEnum.ts
|
|
1798
|
-
var
|
|
1822
|
+
var Sn = /* @__PURE__ */ function(e) {
|
|
1799
1823
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
1800
|
-
}({}),
|
|
1824
|
+
}({}), Cn = {
|
|
1801
1825
|
GET: "bg-blue-600",
|
|
1802
1826
|
POST: "bg-emerald-600",
|
|
1803
1827
|
PUT: "bg-amber-600",
|
|
1804
1828
|
DELETE: "bg-red-600",
|
|
1805
1829
|
PATCH: "bg-purple-600",
|
|
1806
1830
|
HEAD: "bg-gray-600"
|
|
1807
|
-
},
|
|
1831
|
+
}, wn = {
|
|
1808
1832
|
GET: "bg-blue-500",
|
|
1809
1833
|
POST: "bg-green-500",
|
|
1810
1834
|
PUT: "bg-yellow-500",
|
|
@@ -1812,23 +1836,23 @@ var Tn = /* @__PURE__ */ function(e) {
|
|
|
1812
1836
|
PATCH: "bg-purple-500",
|
|
1813
1837
|
HEAD: "bg-gray-500"
|
|
1814
1838
|
};
|
|
1815
|
-
function
|
|
1816
|
-
return e ?
|
|
1839
|
+
function Tn(e) {
|
|
1840
|
+
return e ? Cn[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
1817
1841
|
}
|
|
1818
|
-
function
|
|
1819
|
-
return e ?
|
|
1842
|
+
function En(e) {
|
|
1843
|
+
return e ? wn[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
1820
1844
|
}
|
|
1821
|
-
function
|
|
1845
|
+
function Dn(e) {
|
|
1822
1846
|
let t = e ?? 0;
|
|
1823
1847
|
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
1824
1848
|
}
|
|
1825
|
-
function
|
|
1849
|
+
function On(e, t) {
|
|
1826
1850
|
let n = e ?? 200;
|
|
1827
1851
|
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
1828
1852
|
}
|
|
1829
1853
|
//#endregion
|
|
1830
1854
|
//#region src/utils/sanitizeHtml.ts
|
|
1831
|
-
var
|
|
1855
|
+
var kn = new Set([
|
|
1832
1856
|
"A",
|
|
1833
1857
|
"B",
|
|
1834
1858
|
"STRONG",
|
|
@@ -1843,7 +1867,7 @@ var Mn = new Set([
|
|
|
1843
1867
|
"LI",
|
|
1844
1868
|
"SPAN",
|
|
1845
1869
|
"DIV"
|
|
1846
|
-
]),
|
|
1870
|
+
]), An = new Set([
|
|
1847
1871
|
"SCRIPT",
|
|
1848
1872
|
"STYLE",
|
|
1849
1873
|
"IFRAME",
|
|
@@ -1851,56 +1875,53 @@ var Mn = new Set([
|
|
|
1851
1875
|
"EMBED",
|
|
1852
1876
|
"NOSCRIPT",
|
|
1853
1877
|
"TEMPLATE"
|
|
1854
|
-
]),
|
|
1855
|
-
function
|
|
1878
|
+
]), jn = { A: new Set(["href", "title"]) };
|
|
1879
|
+
function Mn(e) {
|
|
1856
1880
|
let t = e.trim().toLowerCase();
|
|
1857
1881
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
1858
1882
|
}
|
|
1859
|
-
function
|
|
1883
|
+
function Nn(e) {
|
|
1860
1884
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
1861
1885
|
let t = e, n = t.tagName.toUpperCase();
|
|
1862
|
-
if (!
|
|
1863
|
-
|
|
1886
|
+
if (!kn.has(n)) {
|
|
1887
|
+
An.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
1864
1888
|
return;
|
|
1865
1889
|
}
|
|
1866
|
-
let r =
|
|
1890
|
+
let r = jn[n] ?? /* @__PURE__ */ new Set();
|
|
1867
1891
|
for (let e of Array.from(t.attributes)) {
|
|
1868
1892
|
if (!r.has(e.name.toLowerCase())) {
|
|
1869
1893
|
t.removeAttribute(e.name);
|
|
1870
1894
|
continue;
|
|
1871
1895
|
}
|
|
1872
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
1896
|
+
n === "A" && e.name.toLowerCase() === "href" && !Mn(e.value) && t.removeAttribute(e.name);
|
|
1873
1897
|
}
|
|
1874
1898
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
1875
|
-
for (let e of Array.from(t.childNodes))
|
|
1899
|
+
for (let e of Array.from(t.childNodes)) Nn(e);
|
|
1876
1900
|
}
|
|
1877
|
-
function
|
|
1901
|
+
function Pn(e) {
|
|
1878
1902
|
if (!e) return "";
|
|
1879
1903
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
1880
1904
|
if (!t) return "";
|
|
1881
|
-
for (let e of Array.from(t.childNodes))
|
|
1905
|
+
for (let e of Array.from(t.childNodes)) Nn(e);
|
|
1882
1906
|
return t.innerHTML;
|
|
1883
1907
|
}
|
|
1884
1908
|
//#endregion
|
|
1885
1909
|
//#region src/utils/format.ts
|
|
1886
|
-
var
|
|
1887
|
-
function
|
|
1888
|
-
if (e == null) return
|
|
1910
|
+
var Fn = "—";
|
|
1911
|
+
function In(e, t = 4) {
|
|
1912
|
+
if (e == null || typeof e == "string" && e.trim() === "") return Fn;
|
|
1889
1913
|
let n = typeof e == "string" ? Number(e) : e;
|
|
1890
1914
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
1891
1915
|
minimumFractionDigits: t,
|
|
1892
1916
|
maximumFractionDigits: t
|
|
1893
|
-
}) :
|
|
1917
|
+
}) : Fn;
|
|
1894
1918
|
}
|
|
1895
|
-
function
|
|
1896
|
-
if (e == null || e === "") return
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
} catch {
|
|
1900
|
-
return String(e);
|
|
1901
|
-
}
|
|
1919
|
+
function Ln(e) {
|
|
1920
|
+
if (e == null || e === "") return Fn;
|
|
1921
|
+
let t = new Date(e);
|
|
1922
|
+
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
1902
1923
|
}
|
|
1903
|
-
function
|
|
1924
|
+
function Rn(e) {
|
|
1904
1925
|
return new Date(e).toLocaleString(void 0, {
|
|
1905
1926
|
month: "short",
|
|
1906
1927
|
day: "numeric",
|
|
@@ -1908,13 +1929,13 @@ function Vn(e) {
|
|
|
1908
1929
|
minute: "2-digit"
|
|
1909
1930
|
});
|
|
1910
1931
|
}
|
|
1911
|
-
function
|
|
1932
|
+
function zn(e) {
|
|
1912
1933
|
return new Date(e).toLocaleDateString(void 0, {
|
|
1913
1934
|
month: "short",
|
|
1914
1935
|
day: "numeric"
|
|
1915
1936
|
});
|
|
1916
1937
|
}
|
|
1917
|
-
function
|
|
1938
|
+
function Bn(e) {
|
|
1918
1939
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
1919
1940
|
let t = Math.abs(e), n = 2;
|
|
1920
1941
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -1922,15 +1943,15 @@ function Un(e) {
|
|
|
1922
1943
|
maximumFractionDigits: n
|
|
1923
1944
|
});
|
|
1924
1945
|
}
|
|
1925
|
-
function
|
|
1946
|
+
function Vn(e, t = 2) {
|
|
1926
1947
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
1927
1948
|
}
|
|
1928
|
-
function
|
|
1929
|
-
return `${e
|
|
1949
|
+
function Hn(e) {
|
|
1950
|
+
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
1930
1951
|
}
|
|
1931
1952
|
//#endregion
|
|
1932
1953
|
//#region src/utils/pnl.ts
|
|
1933
|
-
function
|
|
1954
|
+
function Un(e) {
|
|
1934
1955
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
1935
1956
|
pnlUsd: null,
|
|
1936
1957
|
pnlPct: null
|
|
@@ -1945,4 +1966,4 @@ function Kn(e) {
|
|
|
1945
1966
|
};
|
|
1946
1967
|
}
|
|
1947
1968
|
//#endregion
|
|
1948
|
-
export { I as AlertEnum,
|
|
1969
|
+
export { I as AlertEnum, yn as BaseActionButton, he as BaseAlert, ln as BaseAppLayout, R as BaseBadge, Sn as BaseBadgeEnum, be as BaseBreadcrumb, ke as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, Tt as BaseCollapsibleSection, kt as BaseConfirmModal, on as BaseEntityPickerModal, Ne as BaseLine, Pe as BaseLoginEnum, Ie as BaseLogo, H as BaseLogoEnum, He as BaseModal, U as BaseModalEnum, Q as BaseModalShell, It as BaseNotFoundPage, pn as BasePageHeader, Ue as BaseRow, Kt as BaseSidebar, We as BaseSpinner, Nt as BaseTextInputModal, Je as BaseToast, G as BaseToastEnum, gn as BaseToolbarButton, Xe as ColoredSquares, L as ColorsEnums, rt as EarningsCard, ct as EuroAmount, V as LineEnum, dt as Pagination, K as PositioningEnum, ht as TrendArrow, Un as computePnL, Ln as fmtDate, zn as fmtDateShort, Rn as fmtDateTime, In as fmtNumber, Vn as fmtPct, Bn as fmtPrice, Hn as fmtUsd, fe as getBaseColor, pe as getBaseColorOf, Mn as isSafeHref, En as methodBadgeBright, Tn as methodBadgeSolid, Pn as sanitizeHtml, Dn as statusBadgeSolid, On as statusBadgeTinted, bn as useDebouncedRef, Z as useEscapeKey, Lt as useMobileSidebar, Y as useTheme, X as useThemeClasses, xn as useToast };
|