nicklabs-ui 1.0.54 → 1.0.55
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/dist/index.mjs
CHANGED
|
@@ -844,36 +844,47 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
844
844
|
copy: (e) => {
|
|
845
845
|
navigator.clipboard.writeText(e);
|
|
846
846
|
}
|
|
847
|
-
}, ut = []
|
|
848
|
-
|
|
849
|
-
ut.
|
|
850
|
-
let
|
|
851
|
-
a.
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
|
|
847
|
+
}, ut = [];
|
|
848
|
+
function dt(e = "", t = !1, n = !1) {
|
|
849
|
+
return ut.clear(), new Promise((r, i) => {
|
|
850
|
+
let a = document.createElement("input");
|
|
851
|
+
ut.push(a), a.hidden = !0, a.type = "file", a.accept = e, a.multiple = t, a.onchange = async () => {
|
|
852
|
+
let e = [];
|
|
853
|
+
if (!a.files || a.files.length === 0) {
|
|
854
|
+
r(t ? [] : void 0);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
for (let t of a.files) {
|
|
858
|
+
let r = {
|
|
859
|
+
name: t.name,
|
|
860
|
+
size: t.size,
|
|
861
|
+
sizeInKB: parseFloat((t.size / 1024).toFixed(2)),
|
|
862
|
+
sizeInMB: parseFloat((t.size / 1024 / 1024).toFixed(2)),
|
|
863
|
+
type: t.type,
|
|
864
|
+
file: t
|
|
865
|
+
};
|
|
866
|
+
n && (r.base64String = await $.file.convertBase64(t)), e.push(r);
|
|
867
|
+
}
|
|
868
|
+
r(t ? e : e[0]);
|
|
869
|
+
}, a.onerror = (e) => {
|
|
870
|
+
i(e);
|
|
871
|
+
}, a.click();
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
function ft(e = !1, t = !1) {
|
|
875
|
+
return dt("", e, t);
|
|
876
|
+
}
|
|
877
|
+
function pt(e = !1, t = !1) {
|
|
878
|
+
return dt([
|
|
870
879
|
"image/jpg",
|
|
871
880
|
"image/jpeg",
|
|
872
881
|
"image/png",
|
|
873
882
|
"image/gif",
|
|
874
883
|
"image/bmp"
|
|
875
|
-
].join(","), e, t)
|
|
876
|
-
|
|
884
|
+
].join(","), e, t);
|
|
885
|
+
}
|
|
886
|
+
function mt(e = !1, t = !1) {
|
|
887
|
+
return dt([
|
|
877
888
|
".pdf",
|
|
878
889
|
"application/pdf",
|
|
879
890
|
".doc",
|
|
@@ -883,35 +894,49 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
883
894
|
".txt",
|
|
884
895
|
"text/plain",
|
|
885
896
|
".md"
|
|
886
|
-
].join(","), e, t)
|
|
887
|
-
|
|
897
|
+
].join(","), e, t);
|
|
898
|
+
}
|
|
899
|
+
function ht(e = !1, t = !1) {
|
|
900
|
+
return dt([
|
|
888
901
|
"video/mp4",
|
|
889
902
|
"video/quicktime",
|
|
890
903
|
"video/webm",
|
|
891
904
|
"video/ogg"
|
|
892
|
-
].join(","), e, t)
|
|
893
|
-
|
|
905
|
+
].join(","), e, t);
|
|
906
|
+
}
|
|
907
|
+
function gt(e = !1, t = !1) {
|
|
908
|
+
return dt([
|
|
894
909
|
"audio/mp3",
|
|
895
910
|
"audio/wav",
|
|
896
911
|
"audio/ogg",
|
|
897
912
|
"audio/aac",
|
|
898
913
|
"audio/flac"
|
|
899
|
-
].join(","), e, t)
|
|
900
|
-
|
|
901
|
-
|
|
914
|
+
].join(","), e, t);
|
|
915
|
+
}
|
|
916
|
+
function _t(e = "", t = !1, n = !1) {
|
|
917
|
+
return dt(e, t, n);
|
|
918
|
+
}
|
|
919
|
+
var vt = {
|
|
920
|
+
all: ft,
|
|
921
|
+
image: pt,
|
|
922
|
+
documentFile: mt,
|
|
923
|
+
video: ht,
|
|
924
|
+
audio: gt,
|
|
925
|
+
custom: _t
|
|
926
|
+
}, yt = (e) => new Promise((t, n) => {
|
|
902
927
|
let r = new FileReader();
|
|
903
928
|
r.readAsDataURL(e), r.onload = () => {
|
|
904
929
|
let e = r.result.split(";base64,");
|
|
905
930
|
e.length > 1 ? t(e[1]) : n(/* @__PURE__ */ Error("Failed to convert file to base64 string."));
|
|
906
931
|
}, r.onerror = n;
|
|
907
|
-
}),
|
|
908
|
-
convertBase64:
|
|
909
|
-
createImageUrlFromFile:
|
|
910
|
-
createImageUrlFromBlob:
|
|
932
|
+
}), bt = (e) => xt(new Blob([e], { type: "xxxx" })), xt = (e) => (window.URL || window.webkitURL).createObjectURL(e), St = {
|
|
933
|
+
convertBase64: yt,
|
|
934
|
+
createImageUrlFromFile: bt,
|
|
935
|
+
createImageUrlFromBlob: xt,
|
|
911
936
|
revokeObjectUrl: (e) => {
|
|
912
937
|
(window.URL || window.webkitURL).revokeObjectURL(e);
|
|
913
938
|
}
|
|
914
|
-
},
|
|
939
|
+
}, Ct = {
|
|
915
940
|
download: (e, t) => {
|
|
916
941
|
let n = document.createElement("a");
|
|
917
942
|
n.target = "_blank", t && (n.download = t), n.href = e, n.click(), n.remove();
|
|
@@ -920,12 +945,12 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
920
945
|
let t = document.createElement("a");
|
|
921
946
|
t.target = "_blank", t.href = e, t.click(), t.remove();
|
|
922
947
|
}
|
|
923
|
-
},
|
|
948
|
+
}, wt = async (e) => {
|
|
924
949
|
let t = e.includes("data:image/") ? e : `data:image/jpeg;base64,${e}`;
|
|
925
950
|
return (await fetch(t)).blob();
|
|
926
|
-
},
|
|
951
|
+
}, Tt = (e) => new Promise(async (t, n) => {
|
|
927
952
|
try {
|
|
928
|
-
let r = typeof e == "string" ? await
|
|
953
|
+
let r = typeof e == "string" ? await wt(e) : e, i = window.URL || window.webkitURL, a = i.createObjectURL(r), o = document.createElement("img");
|
|
929
954
|
o.src = a, o.onload = () => {
|
|
930
955
|
i.revokeObjectURL(a), t(o);
|
|
931
956
|
}, o.onerror = (e) => {
|
|
@@ -934,39 +959,39 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
934
959
|
} catch (e) {
|
|
935
960
|
n(e);
|
|
936
961
|
}
|
|
937
|
-
}),
|
|
962
|
+
}), Et = (e, t) => {
|
|
938
963
|
let n = Math.min(t / e.width, t / e.height, 1), r = n * e.width, i = n * e.height, a = document.createElement("canvas"), o = a.getContext("2d");
|
|
939
964
|
return a.width = r, a.height = i, o.drawImage(e, 0, 0, r, i), a;
|
|
940
|
-
},
|
|
965
|
+
}, Dt = (e) => {
|
|
941
966
|
let t = e.toDataURL("image/jpeg", .8).split(";base64,");
|
|
942
967
|
return t.length > 1 ? t[1] : "";
|
|
943
|
-
},
|
|
968
|
+
}, Ot = (e) => new Promise((t, n) => {
|
|
944
969
|
e.toBlob((e) => {
|
|
945
970
|
e ? t(e) : n(/* @__PURE__ */ Error("Failed to create Blob from canvas."));
|
|
946
971
|
}, "image/jpeg", .8);
|
|
947
|
-
}),
|
|
948
|
-
thumbnailFromBlobToBase64: async (e, t) =>
|
|
949
|
-
thumbnailFromBlobToBlob: async (e, t) =>
|
|
950
|
-
thumbnailFromBase64ToBase64: async (e, t) =>
|
|
951
|
-
thumbnailFromBase64ToBlob: async (e, t) =>
|
|
952
|
-
},
|
|
972
|
+
}), kt = async (e, t) => Et(await Tt(e), t), At = {
|
|
973
|
+
thumbnailFromBlobToBase64: async (e, t) => Dt(await kt(e, t)),
|
|
974
|
+
thumbnailFromBlobToBlob: async (e, t) => Ot(await kt(e, t)),
|
|
975
|
+
thumbnailFromBase64ToBase64: async (e, t) => Dt(await kt(e, t)),
|
|
976
|
+
thumbnailFromBase64ToBlob: async (e, t) => Ot(await kt(e, t))
|
|
977
|
+
}, jt = () => {
|
|
953
978
|
let e = navigator.userAgent;
|
|
954
979
|
return !!/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e);
|
|
955
|
-
},
|
|
980
|
+
}, Mt = () => {
|
|
956
981
|
let e = navigator.userAgent;
|
|
957
982
|
return !!/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e);
|
|
958
983
|
}, $ = {
|
|
959
984
|
store: st,
|
|
960
985
|
screen: ct,
|
|
961
986
|
str: lt,
|
|
962
|
-
input:
|
|
963
|
-
file:
|
|
964
|
-
link:
|
|
965
|
-
image:
|
|
987
|
+
input: vt,
|
|
988
|
+
file: St,
|
|
989
|
+
link: Ct,
|
|
990
|
+
image: At,
|
|
966
991
|
device: {
|
|
967
|
-
isMobile:
|
|
968
|
-
isTablet:
|
|
969
|
-
isDesktop: () =>
|
|
992
|
+
isMobile: jt,
|
|
993
|
+
isTablet: Mt,
|
|
994
|
+
isDesktop: () => jt() == 0 && Mt() == 0
|
|
970
995
|
},
|
|
971
996
|
date: { getCalendarByDate: (e) => {
|
|
972
997
|
e.setDate(1);
|
|
@@ -990,7 +1015,7 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
990
1015
|
e > 0 && window.clearTimeout(e), e = window.setTimeout(t, n);
|
|
991
1016
|
};
|
|
992
1017
|
})() }
|
|
993
|
-
},
|
|
1018
|
+
}, Nt = { class: "file-select" }, Pt = ["textContent"], Ft = ["aria-disabled"], It = { class: "inner" }, Lt = { class: "text" }, Rt = ["textContent"], zt = ["textContent"], Bt = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
994
1019
|
__name: "NFileSelect",
|
|
995
1020
|
props: {
|
|
996
1021
|
multiple: {
|
|
@@ -1010,18 +1035,24 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
1010
1035
|
setup(e, { emit: t }) {
|
|
1011
1036
|
let n = t, r = async () => {
|
|
1012
1037
|
if (!e.disabled) try {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1038
|
+
if (e.multiple) {
|
|
1039
|
+
let t = await $.input.custom(e.accept, !0);
|
|
1040
|
+
if (t.length === 0) return;
|
|
1041
|
+
n("change:files", t);
|
|
1042
|
+
} else {
|
|
1043
|
+
let t = await $.input.custom(e.accept, !1);
|
|
1044
|
+
if (!t) return;
|
|
1045
|
+
n("change:file", t);
|
|
1046
|
+
}
|
|
1016
1047
|
} catch (e) {
|
|
1017
1048
|
console.log(e);
|
|
1018
1049
|
}
|
|
1019
1050
|
};
|
|
1020
|
-
return (t, n) => (y(), s("div",
|
|
1051
|
+
return (t, n) => (y(), s("div", Nt, [e.title ? (y(), s("div", {
|
|
1021
1052
|
key: 0,
|
|
1022
1053
|
class: "label",
|
|
1023
1054
|
textContent: w(e.title)
|
|
1024
|
-
}, null, 8,
|
|
1055
|
+
}, null, 8, Pt)) : o("", !0), c("div", {
|
|
1025
1056
|
class: h(["select", {
|
|
1026
1057
|
multiple: e.multiple,
|
|
1027
1058
|
disabled: e.disabled
|
|
@@ -1029,7 +1060,7 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
1029
1060
|
tabindex: "0",
|
|
1030
1061
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
1031
1062
|
onClick: r
|
|
1032
|
-
}, [c("div",
|
|
1063
|
+
}, [c("div", It, [n[0] ||= c("span", {
|
|
1033
1064
|
class: "icon",
|
|
1034
1065
|
"aria-hidden": "true"
|
|
1035
1066
|
}, [c("svg", {
|
|
@@ -1042,47 +1073,47 @@ var I = { class: "breadcrumbs" }, L = ["onClick"], R = {
|
|
|
1042
1073
|
"stroke-linejoin": "round",
|
|
1043
1074
|
"stroke-width": "2",
|
|
1044
1075
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
1045
|
-
})])], -1), c("div",
|
|
1076
|
+
})])], -1), c("div", Lt, [c("p", {
|
|
1046
1077
|
class: "label",
|
|
1047
1078
|
textContent: w(e.label)
|
|
1048
|
-
}, null, 8,
|
|
1079
|
+
}, null, 8, Rt), c("p", {
|
|
1049
1080
|
class: "hint",
|
|
1050
1081
|
textContent: w(e.hint)
|
|
1051
|
-
}, null, 8,
|
|
1082
|
+
}, null, 8, zt)])])], 10, Ft)]));
|
|
1052
1083
|
}
|
|
1053
|
-
}), [["__scopeId", "data-v-
|
|
1054
|
-
function
|
|
1084
|
+
}), [["__scopeId", "data-v-ef36f4d5"]]), Vt = x(!1), Ht = (e, t) => e.children?.some((e) => e.route === t) ?? !1, Ut = (e, t) => e.route === t;
|
|
1085
|
+
function Wt(e = "default") {
|
|
1055
1086
|
let t = `NSidebar:${e}:expanded`, n = b($.store.get(t, {}));
|
|
1056
|
-
|
|
1087
|
+
Vt.value = $.store.get("NSidebar:expanded", !1);
|
|
1057
1088
|
let r = (e) => !!n[e];
|
|
1058
1089
|
return {
|
|
1059
1090
|
isMenuExpanded: r,
|
|
1060
1091
|
toggleMenu: (e) => {
|
|
1061
1092
|
n[e] = !r(e), $.store.set(t, n);
|
|
1062
1093
|
},
|
|
1063
|
-
isSidebarExpanded: () =>
|
|
1094
|
+
isSidebarExpanded: () => Vt.value,
|
|
1064
1095
|
toggleSidebar: () => {
|
|
1065
|
-
|
|
1096
|
+
Vt.value = !Vt.value, $.store.set("NSidebar:expanded", Vt.value);
|
|
1066
1097
|
},
|
|
1067
1098
|
setMenuActiveResolver: (e) => {
|
|
1068
|
-
|
|
1099
|
+
Ht = e;
|
|
1069
1100
|
},
|
|
1070
1101
|
setItemActiveResolver: (e) => {
|
|
1071
|
-
|
|
1102
|
+
Ut = e;
|
|
1072
1103
|
},
|
|
1073
|
-
resolveMenuActive:
|
|
1074
|
-
resolveItemActive:
|
|
1104
|
+
resolveMenuActive: Ht,
|
|
1105
|
+
resolveItemActive: Ut
|
|
1075
1106
|
};
|
|
1076
1107
|
}
|
|
1077
1108
|
//#endregion
|
|
1078
1109
|
//#region src/layouts/NHeroSection.vue?vue&type=script&setup=true&lang.ts
|
|
1079
|
-
var
|
|
1110
|
+
var Gt = { class: "hero-section-container" }, Kt = { class: "hero-section" }, qt = { class: "header" }, Jt = ["innerHTML"], Yt = { class: "body" }, Xt = { class: "title-section" }, Zt = { class: "title" }, Qt = { key: 0 }, $t = {
|
|
1080
1111
|
key: 1,
|
|
1081
1112
|
class: "description"
|
|
1082
|
-
},
|
|
1113
|
+
}, en = {
|
|
1083
1114
|
key: 0,
|
|
1084
1115
|
class: "toolbar"
|
|
1085
|
-
},
|
|
1116
|
+
}, tn = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1086
1117
|
__name: "NHeroSection",
|
|
1087
1118
|
props: {
|
|
1088
1119
|
icon: { default: "" },
|
|
@@ -1090,11 +1121,11 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1090
1121
|
description: { default: "" }
|
|
1091
1122
|
},
|
|
1092
1123
|
setup(e) {
|
|
1093
|
-
let t =
|
|
1094
|
-
return (n, r) => (y(), s("div",
|
|
1124
|
+
let t = Wt();
|
|
1125
|
+
return (n, r) => (y(), s("div", Gt, [c("div", Kt, [
|
|
1095
1126
|
r[2] ||= c("div", { class: "effect-background-left" }, null, -1),
|
|
1096
1127
|
r[3] ||= c("div", { class: "effect-background-right" }, null, -1),
|
|
1097
|
-
c("div",
|
|
1128
|
+
c("div", qt, [f(M, {
|
|
1098
1129
|
class: "sidebar-toggle-button",
|
|
1099
1130
|
padding: "8px",
|
|
1100
1131
|
intent: "none",
|
|
@@ -1122,14 +1153,14 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1122
1153
|
key: 0,
|
|
1123
1154
|
class: "icon-bg",
|
|
1124
1155
|
innerHTML: e.icon
|
|
1125
|
-
}, null, 8,
|
|
1126
|
-
c("div",
|
|
1156
|
+
}, null, 8, Jt)) : o("", !0),
|
|
1157
|
+
c("div", Yt, [c("div", Xt, [c("div", Zt, [e.title ? (y(), s("h1", Qt, w(e.title), 1)) : o("", !0), n.$slots.description || e.description ? (y(), s("div", $t, [C(n.$slots, "description", {}, () => [d(w(e.description), 1)], !0)])) : o("", !0)])]), n.$slots.toolbar ? (y(), s("div", en, [C(n.$slots, "toolbar", {}, void 0, !0)])) : o("", !0)])
|
|
1127
1158
|
])]));
|
|
1128
1159
|
}
|
|
1129
|
-
}), [["__scopeId", "data-v-65913adc"]]),
|
|
1160
|
+
}), [["__scopeId", "data-v-65913adc"]]), nn = { class: "content-container" }, rn = {
|
|
1130
1161
|
key: 0,
|
|
1131
1162
|
class: "nav-tabs"
|
|
1132
|
-
},
|
|
1163
|
+
}, an = ["textContent", "onClick"], on = { class: "tab-content" }, sn = { class: "footer" }, cn = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1133
1164
|
__name: "NForm",
|
|
1134
1165
|
props: {
|
|
1135
1166
|
model: { default: () => ({}) },
|
|
@@ -1154,7 +1185,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1154
1185
|
}, m = () => {
|
|
1155
1186
|
t.disabled || r("reset");
|
|
1156
1187
|
};
|
|
1157
|
-
return (n, i) => (y(), s("div",
|
|
1188
|
+
return (n, i) => (y(), s("div", nn, [C(n.$slots, "heroSection", {}, () => [f(tn, {
|
|
1158
1189
|
icon: t.icon,
|
|
1159
1190
|
title: t.title,
|
|
1160
1191
|
description: t.description
|
|
@@ -1173,19 +1204,19 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1173
1204
|
onSubmit: O(p, ["prevent"]),
|
|
1174
1205
|
onReset: O(m, ["prevent"])
|
|
1175
1206
|
}, [
|
|
1176
|
-
t.tabs.length > 0 ? (y(), s("div",
|
|
1207
|
+
t.tabs.length > 0 ? (y(), s("div", rn, [(y(!0), s(e, null, S(t.tabs, (e, t) => (y(), s("button", {
|
|
1177
1208
|
key: `${e}${t}`,
|
|
1178
1209
|
class: h(["nav-link", { active: d.value === t }]),
|
|
1179
1210
|
textContent: w(e),
|
|
1180
1211
|
onClick: () => {
|
|
1181
1212
|
u.value = t, T($).store.set(a, t), r("update:modelValue", t);
|
|
1182
1213
|
}
|
|
1183
|
-
}, null, 10,
|
|
1184
|
-
c("div",
|
|
1185
|
-
c("div",
|
|
1214
|
+
}, null, 10, an))), 128))])) : o("", !0),
|
|
1215
|
+
c("div", on, [t.tabs.length > 0 ? (y(!0), s(e, { key: 0 }, S(t.tabs, (t, r) => (y(), s(e, null, [d.value === r ? C(n.$slots, `tab${r}`, { key: 0 }, void 0, !0) : o("", !0)], 64))), 256)) : o("", !0), t.tabs.length == 0 && n.$slots.tab0 ? C(n.$slots, "tab0", { key: 1 }, void 0, !0) : o("", !0)]),
|
|
1216
|
+
c("div", sn, [C(n.$slots, "footer", {}, void 0, !0)])
|
|
1186
1217
|
], 32)]));
|
|
1187
1218
|
}
|
|
1188
|
-
}), [["__scopeId", "data-v-fc11e625"]]),
|
|
1219
|
+
}), [["__scopeId", "data-v-fc11e625"]]), ln = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1189
1220
|
__name: "NCard",
|
|
1190
1221
|
props: {
|
|
1191
1222
|
size: { default: "md" },
|
|
@@ -1197,32 +1228,37 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1197
1228
|
[`radius-${e.radius}`]: !0
|
|
1198
1229
|
}]) }, [C(t.$slots, "default", {}, void 0, !0)], 2));
|
|
1199
1230
|
}
|
|
1200
|
-
}), [["__scopeId", "data-v-56a18223"]]),
|
|
1231
|
+
}), [["__scopeId", "data-v-56a18223"]]), un = {
|
|
1201
1232
|
key: 0,
|
|
1202
1233
|
class: "paginate"
|
|
1203
|
-
},
|
|
1234
|
+
}, dn = { class: "summary" }, fn = { class: "pages" }, pn = {
|
|
1204
1235
|
key: 1,
|
|
1205
1236
|
class: "separator"
|
|
1206
|
-
},
|
|
1237
|
+
}, mn = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1207
1238
|
__name: "NPaginate",
|
|
1208
1239
|
props: {
|
|
1209
1240
|
totalItems: {},
|
|
1241
|
+
currentPage: {},
|
|
1210
1242
|
pageSize: {},
|
|
1211
1243
|
maxPageButtons: { default: 7 }
|
|
1212
1244
|
},
|
|
1213
1245
|
emits: ["onPageChange"],
|
|
1214
1246
|
setup(t, { emit: n }) {
|
|
1215
|
-
let r = n, l = x(1)
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1247
|
+
let r = n, l = x(1);
|
|
1248
|
+
ne(() => t.currentPage, (e) => {
|
|
1249
|
+
l.value = e;
|
|
1250
|
+
}, { immediate: !0 });
|
|
1251
|
+
let u = i(() => Math.max(1, Math.ceil(t.totalItems / t.pageSize))), p = i(() => {
|
|
1252
|
+
let e = u.value, n = Math.max(5, t.maxPageButtons);
|
|
1253
|
+
if (e <= n) return Array.from({ length: e }, (e, t) => t + 1);
|
|
1254
|
+
let r = [], i = Math.max(1, Math.floor((n - 3) / 2)), a = Math.max(2, l.value - i), o = Math.min(e - 1, l.value + i), s = 2 + (o - a + 1) + 2;
|
|
1255
|
+
if (s > n) {
|
|
1256
|
+
let e = s - n;
|
|
1257
|
+
o = Math.max(a, o - e);
|
|
1222
1258
|
}
|
|
1223
|
-
|
|
1224
|
-
for (let e =
|
|
1225
|
-
return
|
|
1259
|
+
r.push(1), a > 2 && r.push("...l");
|
|
1260
|
+
for (let e = a; e <= o; e++) r.push(e);
|
|
1261
|
+
return o < e - 1 && r.push("...r"), r.push(e), r;
|
|
1226
1262
|
});
|
|
1227
1263
|
function m() {
|
|
1228
1264
|
l.value <= 1 || (--l.value, r("onPageChange", l.value));
|
|
@@ -1234,13 +1270,13 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1234
1270
|
let t = Math.min(Math.max(1, e), u.value);
|
|
1235
1271
|
l.value !== t && (l.value = t, r("onPageChange", l.value));
|
|
1236
1272
|
}
|
|
1237
|
-
return (n, r) => t.totalItems > 0 ? (y(), s("div",
|
|
1273
|
+
return (n, r) => t.totalItems > 0 ? (y(), s("div", un, [c("span", dn, "第 " + w(l.value) + " / " + w(u.value) + " 頁,共 " + w(t.totalItems) + " 筆", 1), c("div", fn, [
|
|
1238
1274
|
f(M, {
|
|
1239
1275
|
variant: "outline",
|
|
1240
1276
|
padding: "",
|
|
1241
1277
|
width: "35px",
|
|
1242
1278
|
height: "35px",
|
|
1243
|
-
disabled:
|
|
1279
|
+
disabled: t.currentPage <= 1,
|
|
1244
1280
|
onClick: m
|
|
1245
1281
|
}, {
|
|
1246
1282
|
default: D(() => [...r[0] ||= [c("svg", {
|
|
@@ -1256,28 +1292,28 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1256
1292
|
}, [c("path", { d: "M15 18l-6-6 6-6" })], -1)]]),
|
|
1257
1293
|
_: 1
|
|
1258
1294
|
}, 8, ["disabled"]),
|
|
1259
|
-
(y(!0), s(e, null, S(p.value, (
|
|
1295
|
+
(y(!0), s(e, null, S(p.value, (n) => (y(), s(e, { key: "p-" + n }, [typeof n == "number" ? (y(), a(M, {
|
|
1260
1296
|
key: 0,
|
|
1261
|
-
variant:
|
|
1262
|
-
intent:
|
|
1297
|
+
variant: t.currentPage === n ? "solid" : "outline",
|
|
1298
|
+
intent: t.currentPage === n ? "primary" : "none",
|
|
1263
1299
|
padding: "",
|
|
1264
1300
|
width: "35px",
|
|
1265
1301
|
height: "35px",
|
|
1266
|
-
onClick: (e) => g(
|
|
1302
|
+
onClick: (e) => g(n)
|
|
1267
1303
|
}, {
|
|
1268
|
-
default: D(() => [d(w(
|
|
1304
|
+
default: D(() => [d(w(n), 1)]),
|
|
1269
1305
|
_: 2
|
|
1270
1306
|
}, 1032, [
|
|
1271
1307
|
"variant",
|
|
1272
1308
|
"intent",
|
|
1273
1309
|
"onClick"
|
|
1274
|
-
])) : (y(), s("span",
|
|
1310
|
+
])) : (y(), s("span", pn, "…"))], 64))), 128)),
|
|
1275
1311
|
f(M, {
|
|
1276
1312
|
variant: "outline",
|
|
1277
1313
|
padding: "",
|
|
1278
1314
|
width: "35px",
|
|
1279
1315
|
height: "35px",
|
|
1280
|
-
disabled:
|
|
1316
|
+
disabled: t.currentPage >= u.value,
|
|
1281
1317
|
onClick: h
|
|
1282
1318
|
}, {
|
|
1283
1319
|
default: D(() => [...r[1] ||= [c("svg", {
|
|
@@ -1295,13 +1331,13 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1295
1331
|
}, 8, ["disabled"])
|
|
1296
1332
|
])])) : o("", !0);
|
|
1297
1333
|
}
|
|
1298
|
-
}), [["__scopeId", "data-v-
|
|
1334
|
+
}), [["__scopeId", "data-v-a191a116"]]), hn = ["innerHTML"], gn = { class: "title" }, _n = {
|
|
1299
1335
|
key: 1,
|
|
1300
1336
|
class: "description"
|
|
1301
|
-
},
|
|
1337
|
+
}, vn = {
|
|
1302
1338
|
key: 2,
|
|
1303
1339
|
class: "action"
|
|
1304
|
-
},
|
|
1340
|
+
}, yn = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1305
1341
|
__name: "NEmpty",
|
|
1306
1342
|
props: {
|
|
1307
1343
|
title: { default: "目前沒有資料" },
|
|
@@ -1315,37 +1351,37 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1315
1351
|
key: 0,
|
|
1316
1352
|
class: "icon",
|
|
1317
1353
|
innerHTML: e.icon
|
|
1318
|
-
}, null, 8,
|
|
1319
|
-
c("p",
|
|
1320
|
-
e.description ? (y(), s("p",
|
|
1321
|
-
t.$slots.default ? (y(), s("div",
|
|
1354
|
+
}, null, 8, hn)) : o("", !0),
|
|
1355
|
+
c("p", gn, w(e.title), 1),
|
|
1356
|
+
e.description ? (y(), s("p", _n, w(e.description), 1)) : o("", !0),
|
|
1357
|
+
t.$slots.default ? (y(), s("div", vn, [C(t.$slots, "default", {}, void 0, !0)])) : o("", !0)
|
|
1322
1358
|
], 2));
|
|
1323
1359
|
}
|
|
1324
|
-
}), [["__scopeId", "data-v-b9482c23"]]),
|
|
1360
|
+
}), [["__scopeId", "data-v-b9482c23"]]), bn = {
|
|
1325
1361
|
key: 0,
|
|
1326
1362
|
class: "loading-fullscreen"
|
|
1327
|
-
},
|
|
1363
|
+
}, xn = { class: "content" }, Sn = {
|
|
1328
1364
|
key: 0,
|
|
1329
1365
|
class: "title"
|
|
1330
|
-
},
|
|
1366
|
+
}, Cn = {
|
|
1331
1367
|
key: 1,
|
|
1332
1368
|
class: "loading-wrapper"
|
|
1333
|
-
},
|
|
1369
|
+
}, wn = {
|
|
1334
1370
|
key: 0,
|
|
1335
1371
|
class: "overlay"
|
|
1336
|
-
},
|
|
1372
|
+
}, Tn = { class: "content" }, En = {
|
|
1337
1373
|
key: 0,
|
|
1338
1374
|
class: "title"
|
|
1339
|
-
},
|
|
1375
|
+
}, Dn = {
|
|
1340
1376
|
key: 0,
|
|
1341
1377
|
class: "loading-inline"
|
|
1342
|
-
},
|
|
1378
|
+
}, On = {
|
|
1343
1379
|
key: 0,
|
|
1344
1380
|
class: "title"
|
|
1345
|
-
},
|
|
1381
|
+
}, kn = {
|
|
1346
1382
|
key: 0,
|
|
1347
1383
|
class: "title"
|
|
1348
|
-
},
|
|
1384
|
+
}, An = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1349
1385
|
__name: "NLoading",
|
|
1350
1386
|
props: {
|
|
1351
1387
|
loading: {
|
|
@@ -1368,42 +1404,42 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1368
1404
|
key: 0,
|
|
1369
1405
|
to: "body"
|
|
1370
1406
|
}, [f(n, { name: "fade" }, {
|
|
1371
|
-
default: D(() => [r.loading ? (y(), s("div",
|
|
1407
|
+
default: D(() => [r.loading ? (y(), s("div", bn, [c("div", xn, [l[0] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1372
1408
|
cx: "25",
|
|
1373
1409
|
cy: "25",
|
|
1374
1410
|
r: "20",
|
|
1375
1411
|
fill: "none",
|
|
1376
1412
|
"stroke-width": "4"
|
|
1377
|
-
})])], -1), r.title ? (y(), s("p",
|
|
1413
|
+
})])], -1), r.title ? (y(), s("p", Sn, w(r.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1378
1414
|
_: 1
|
|
1379
|
-
})])) : r.overlay ? (y(), s("div",
|
|
1380
|
-
default: D(() => [r.loading ? (y(), s("div",
|
|
1415
|
+
})])) : r.overlay ? (y(), s("div", Cn, [C(i.$slots, "default", {}, void 0, !0), f(n, { name: "fade" }, {
|
|
1416
|
+
default: D(() => [r.loading ? (y(), s("div", wn, [c("div", Tn, [l[1] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1381
1417
|
cx: "25",
|
|
1382
1418
|
cy: "25",
|
|
1383
1419
|
r: "20",
|
|
1384
1420
|
fill: "none",
|
|
1385
1421
|
"stroke-width": "4"
|
|
1386
|
-
})])], -1), r.title ? (y(), s("p",
|
|
1422
|
+
})])], -1), r.title ? (y(), s("p", En, w(r.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1387
1423
|
_: 1
|
|
1388
|
-
})])) : (y(), s(e, { key: 2 }, [r.loading ? (y(), s("div",
|
|
1424
|
+
})])) : (y(), s(e, { key: 2 }, [r.loading ? (y(), s("div", Dn, [r.variant === "spinner" ? (y(), s(e, { key: 0 }, [l[2] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1389
1425
|
cx: "25",
|
|
1390
1426
|
cy: "25",
|
|
1391
1427
|
r: "20",
|
|
1392
1428
|
fill: "none",
|
|
1393
1429
|
"stroke-width": "4"
|
|
1394
|
-
})])], -1), r.title ? (y(), s("p",
|
|
1430
|
+
})])], -1), r.title ? (y(), s("p", On, w(r.title), 1)) : o("", !0)], 64)) : o("", !0), r.variant === "dots" ? (y(), s(e, { key: 1 }, [l[3] ||= c("div", { class: "dots" }, [
|
|
1395
1431
|
c("span"),
|
|
1396
1432
|
c("span"),
|
|
1397
1433
|
c("span")
|
|
1398
|
-
], -1), r.title ? (y(), s("p",
|
|
1434
|
+
], -1), r.title ? (y(), s("p", kn, w(r.title), 1)) : o("", !0)], 64)) : o("", !0)])) : C(i.$slots, "default", { key: 1 }, void 0, !0)], 64));
|
|
1399
1435
|
}
|
|
1400
|
-
}), [["__scopeId", "data-v-f3aa02fe"]]),
|
|
1436
|
+
}), [["__scopeId", "data-v-f3aa02fe"]]), jn = { class: "table-scroll" }, Mn = {
|
|
1401
1437
|
key: 0,
|
|
1402
1438
|
class: "batch"
|
|
1403
|
-
},
|
|
1439
|
+
}, Nn = ["onClick"], Pn = { class: "th-content" }, Fn = {
|
|
1404
1440
|
key: 0,
|
|
1405
1441
|
class: "sort-icon"
|
|
1406
|
-
},
|
|
1442
|
+
}, In = {
|
|
1407
1443
|
key: 0,
|
|
1408
1444
|
viewBox: "0 0 24 24",
|
|
1409
1445
|
fill: "none",
|
|
@@ -1411,7 +1447,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1411
1447
|
"stroke-width": "2",
|
|
1412
1448
|
"stroke-linecap": "round",
|
|
1413
1449
|
"stroke-linejoin": "round"
|
|
1414
|
-
},
|
|
1450
|
+
}, Ln = {
|
|
1415
1451
|
key: 1,
|
|
1416
1452
|
viewBox: "0 0 24 24",
|
|
1417
1453
|
fill: "none",
|
|
@@ -1419,7 +1455,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1419
1455
|
"stroke-width": "2",
|
|
1420
1456
|
"stroke-linecap": "round",
|
|
1421
1457
|
"stroke-linejoin": "round"
|
|
1422
|
-
},
|
|
1458
|
+
}, Rn = {
|
|
1423
1459
|
key: 2,
|
|
1424
1460
|
viewBox: "0 0 24 24",
|
|
1425
1461
|
fill: "none",
|
|
@@ -1427,13 +1463,13 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1427
1463
|
"stroke-width": "2",
|
|
1428
1464
|
"stroke-linecap": "round",
|
|
1429
1465
|
"stroke-linejoin": "round"
|
|
1430
|
-
},
|
|
1466
|
+
}, zn = {
|
|
1431
1467
|
key: 1,
|
|
1432
1468
|
class: "actions"
|
|
1433
|
-
},
|
|
1469
|
+
}, Bn = { key: 0 }, Vn = ["onClick"], Hn = {
|
|
1434
1470
|
key: 0,
|
|
1435
1471
|
class: "actions"
|
|
1436
|
-
},
|
|
1472
|
+
}, Un = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1437
1473
|
__name: "NTable",
|
|
1438
1474
|
props: {
|
|
1439
1475
|
columns: { default: () => [] },
|
|
@@ -1462,37 +1498,37 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1462
1498
|
}), a = (e) => {
|
|
1463
1499
|
e.sortable && (i.value.key === e.key ? i.value.order = i.value.order === "asc" ? "desc" : "asc" : (i.value.key = e.key, i.value.order = "asc"), r("sort", { ...i.value }));
|
|
1464
1500
|
};
|
|
1465
|
-
return (n, l) => (y(), s("div", { class: h(["table", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [f(
|
|
1501
|
+
return (n, l) => (y(), s("div", { class: h(["table", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [f(An, {
|
|
1466
1502
|
loading: t.loading,
|
|
1467
1503
|
overlay: ""
|
|
1468
1504
|
}, {
|
|
1469
|
-
default: D(() => [c("div",
|
|
1470
|
-
n.$slots.batch ? (y(), s("th",
|
|
1505
|
+
default: D(() => [c("div", jn, [c("table", null, [c("thead", null, [c("tr", null, [
|
|
1506
|
+
n.$slots.batch ? (y(), s("th", Mn, [C(n.$slots, "batch", {}, void 0, !0)])) : o("", !0),
|
|
1471
1507
|
(y(!0), s(e, null, S(t.columns, (e) => (y(), s("th", {
|
|
1472
1508
|
key: e.key,
|
|
1473
1509
|
class: h({ sortable: e.sortable }),
|
|
1474
1510
|
onClick: (t) => a(e)
|
|
1475
|
-
}, [c("span",
|
|
1476
|
-
n.$slots.actions ? (y(), s("th",
|
|
1477
|
-
])]), !t.loading && t.items.length > 0 ? (y(), s("tbody",
|
|
1511
|
+
}, [c("span", Pn, [d(w(e.label) + " ", 1), e.sortable ? (y(), s("span", Fn, [i.value.key !== e.key || i.value.order === null ? (y(), s("svg", In, [...l[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : i.value.order === "asc" ? (y(), s("svg", Ln, [...l[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (y(), s("svg", Rn, [...l[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 10, Nn))), 128)),
|
|
1512
|
+
n.$slots.actions ? (y(), s("th", zn, [C(n.$slots, "actions-header", {}, () => [l[3] ||= d("操作", -1)], !0)])) : o("", !0)
|
|
1513
|
+
])]), !t.loading && t.items.length > 0 ? (y(), s("tbody", Bn, [(y(!0), s(e, null, S(t.items, (e, i) => (y(), s("tr", {
|
|
1478
1514
|
key: e[t.itemKey] ?? i,
|
|
1479
1515
|
onClick: (t) => r("click", e)
|
|
1480
1516
|
}, [C(n.$slots, "item", {
|
|
1481
1517
|
index: i,
|
|
1482
1518
|
item: e,
|
|
1483
1519
|
column: t.columns[i]
|
|
1484
|
-
}, void 0, !0), n.$slots.actions ? (y(), s("td",
|
|
1520
|
+
}, void 0, !0), n.$slots.actions ? (y(), s("td", Hn, [C(n.$slots, "actions", {
|
|
1485
1521
|
index: i,
|
|
1486
1522
|
item: e,
|
|
1487
1523
|
column: t.columns[i]
|
|
1488
|
-
}, void 0, !0)])) : o("", !0)], 8,
|
|
1524
|
+
}, void 0, !0)])) : o("", !0)], 8, Vn))), 128))])) : o("", !0)])])]),
|
|
1489
1525
|
_: 3
|
|
1490
|
-
}, 8, ["loading"]), t.items.length === 0 ? C(n.$slots, "empty", { key: 0 }, () => [f(
|
|
1526
|
+
}, 8, ["loading"]), t.items.length === 0 ? C(n.$slots, "empty", { key: 0 }, () => [f(yn, {
|
|
1491
1527
|
title: t.emptyTitle,
|
|
1492
1528
|
description: t.emptyDescription
|
|
1493
1529
|
}, null, 8, ["title", "description"])], !0) : o("", !0)], 2));
|
|
1494
1530
|
}
|
|
1495
|
-
}), [["__scopeId", "data-v-77619033"]]),
|
|
1531
|
+
}), [["__scopeId", "data-v-77619033"]]), Wn = { class: "content-container" }, Gn = { key: 0 }, Kn = { class: "actions" }, qn = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1496
1532
|
__name: "NList",
|
|
1497
1533
|
props: {
|
|
1498
1534
|
title: { default: "" },
|
|
@@ -1500,6 +1536,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1500
1536
|
items: { default: () => [] },
|
|
1501
1537
|
itemKey: { default: "id" },
|
|
1502
1538
|
totalItems: { default: 0 },
|
|
1539
|
+
currentPage: { default: 1 },
|
|
1503
1540
|
pageSize: { default: 10 },
|
|
1504
1541
|
creatable: {
|
|
1505
1542
|
type: Boolean,
|
|
@@ -1561,7 +1598,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1561
1598
|
function ee() {
|
|
1562
1599
|
r.value.clear();
|
|
1563
1600
|
}
|
|
1564
|
-
return (t, r) => (y(), s("div",
|
|
1601
|
+
return (t, r) => (y(), s("div", Wn, [f(tn, {
|
|
1565
1602
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"></path>\n <circle cx=\"12\" cy=\"7\" r=\"4\"></circle>\n </svg>",
|
|
1566
1603
|
title: e.title,
|
|
1567
1604
|
description: e.description
|
|
@@ -1657,11 +1694,11 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1657
1694
|
})) : o("", !0)
|
|
1658
1695
|
]),
|
|
1659
1696
|
key: "0"
|
|
1660
|
-
} : void 0]), 1032, ["title", "description"]), f(
|
|
1697
|
+
} : void 0]), 1032, ["title", "description"]), f(ln, {
|
|
1661
1698
|
size: "none",
|
|
1662
1699
|
radius: "xl"
|
|
1663
1700
|
}, {
|
|
1664
|
-
default: D(() => [f(
|
|
1701
|
+
default: D(() => [f(Un, {
|
|
1665
1702
|
columns: e.columns,
|
|
1666
1703
|
items: e.items,
|
|
1667
1704
|
hoverable: "",
|
|
@@ -1684,7 +1721,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1684
1721
|
} : void 0,
|
|
1685
1722
|
t.$slots.item ? {
|
|
1686
1723
|
name: "item",
|
|
1687
|
-
fn: D(({ item: n, column: r, index: i }) => [e.batchDeletable ? (y(), s("td",
|
|
1724
|
+
fn: D(({ item: n, column: r, index: i }) => [e.batchDeletable ? (y(), s("td", Gn, [f(H, {
|
|
1688
1725
|
onClick: O((e) => h(n), ["stop"]),
|
|
1689
1726
|
"model-value": p(n.id)
|
|
1690
1727
|
}, null, 8, ["onClick", "model-value"])])) : o("", !0), C(t.$slots, "item", {
|
|
@@ -1699,7 +1736,7 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1699
1736
|
fn: D(({ item: r, index: i }) => [C(t.$slots, "actions", {
|
|
1700
1737
|
item: r,
|
|
1701
1738
|
index: i
|
|
1702
|
-
}, () => [c("div",
|
|
1739
|
+
}, () => [c("div", Kn, [e.updatable ? (y(), a(M, {
|
|
1703
1740
|
key: 0,
|
|
1704
1741
|
variant: "outline",
|
|
1705
1742
|
onClick: O(() => n("update", r), ["stop"])
|
|
@@ -1729,25 +1766,27 @@ var zt = { class: "hero-section-container" }, Bt = { class: "hero-section" }, Vt
|
|
|
1729
1766
|
"empty-icon",
|
|
1730
1767
|
"empty-title",
|
|
1731
1768
|
"empty-description"
|
|
1732
|
-
]), e.items.length > 0 ? (y(), a(
|
|
1769
|
+
]), e.items.length > 0 ? (y(), a(mn, {
|
|
1733
1770
|
key: 0,
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1771
|
+
"total-items": e.totalItems,
|
|
1772
|
+
"current-page": e.currentPage,
|
|
1773
|
+
"page-size": e.pageSize,
|
|
1774
|
+
"max-page-buttons": e.maxPageButtons,
|
|
1737
1775
|
onOnPageChange: r[7] ||= (e) => n("pageChange", e)
|
|
1738
1776
|
}, null, 8, [
|
|
1739
|
-
"
|
|
1740
|
-
"
|
|
1741
|
-
"
|
|
1777
|
+
"total-items",
|
|
1778
|
+
"current-page",
|
|
1779
|
+
"page-size",
|
|
1780
|
+
"max-page-buttons"
|
|
1742
1781
|
])) : o("", !0)]),
|
|
1743
1782
|
_: 3
|
|
1744
1783
|
})]));
|
|
1745
1784
|
}
|
|
1746
|
-
}), [["__scopeId", "data-v-
|
|
1747
|
-
function
|
|
1785
|
+
}), [["__scopeId", "data-v-13c996f8"]]), Jn = 0, Yn = b([]);
|
|
1786
|
+
function Xn() {
|
|
1748
1787
|
let e = function(e, n = {}) {
|
|
1749
|
-
let r = ++
|
|
1750
|
-
|
|
1788
|
+
let r = ++Jn, i = n.duration ?? 4e3;
|
|
1789
|
+
Yn.push({
|
|
1751
1790
|
id: r,
|
|
1752
1791
|
description: e,
|
|
1753
1792
|
status: n.status ?? "info",
|
|
@@ -1769,31 +1808,31 @@ function Wn() {
|
|
|
1769
1808
|
status: "info"
|
|
1770
1809
|
});
|
|
1771
1810
|
function t(e) {
|
|
1772
|
-
let t =
|
|
1773
|
-
t !== -1 &&
|
|
1811
|
+
let t = Yn.findIndex((t) => t.id === e);
|
|
1812
|
+
t !== -1 && Yn.splice(t, 1);
|
|
1774
1813
|
}
|
|
1775
1814
|
return {
|
|
1776
|
-
toasts:
|
|
1815
|
+
toasts: Yn,
|
|
1777
1816
|
toast: e,
|
|
1778
1817
|
removeToast: t
|
|
1779
1818
|
};
|
|
1780
1819
|
}
|
|
1781
1820
|
//#endregion
|
|
1782
1821
|
//#region src/components/NToast.vue?vue&type=script&setup=true&lang.ts
|
|
1783
|
-
var
|
|
1822
|
+
var Zn = { class: "icon-wrap" }, Qn = ["innerHTML"], $n = {
|
|
1784
1823
|
key: 0,
|
|
1785
1824
|
class: "arc-timer",
|
|
1786
1825
|
viewBox: "0 0 36 36",
|
|
1787
1826
|
width: "36",
|
|
1788
1827
|
height: "36",
|
|
1789
1828
|
"shape-rendering": "geometricPrecision"
|
|
1790
|
-
},
|
|
1829
|
+
}, er = { class: "body" }, tr = {
|
|
1791
1830
|
key: 0,
|
|
1792
1831
|
class: "title"
|
|
1793
|
-
},
|
|
1832
|
+
}, nr = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1794
1833
|
__name: "NToast",
|
|
1795
1834
|
setup(n) {
|
|
1796
|
-
let { toasts: i } =
|
|
1835
|
+
let { toasts: i } = Xn(), l = {
|
|
1797
1836
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>",
|
|
1798
1837
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <path d=\"m15 9-6 6\"/>\n <path d=\"m9 9 6 6\"/>\n </svg>",
|
|
1799
1838
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>\n <path d=\"M12 9v4\"/>\n <path d=\"M12 17h.01\"/>\n </svg>",
|
|
@@ -1807,10 +1846,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1807
1846
|
default: D(() => [(y(!0), s(e, null, S(T(i), (e) => (y(), s("div", {
|
|
1808
1847
|
key: e.id,
|
|
1809
1848
|
class: h(["toast", [`${e.status}`]])
|
|
1810
|
-
}, [c("div",
|
|
1849
|
+
}, [c("div", Zn, [c("div", {
|
|
1811
1850
|
class: "icon",
|
|
1812
1851
|
innerHTML: l[e.status]
|
|
1813
|
-
}, null, 8,
|
|
1852
|
+
}, null, 8, Qn), e.duration > 0 ? (y(), s("svg", $n, [u[0] ||= c("circle", {
|
|
1814
1853
|
class: "arc-track",
|
|
1815
1854
|
cx: "18",
|
|
1816
1855
|
cy: "18",
|
|
@@ -1822,17 +1861,17 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1822
1861
|
r: "16",
|
|
1823
1862
|
transform: "rotate(-90 18 18)",
|
|
1824
1863
|
style: g({ animationDuration: `${e.duration}ms` })
|
|
1825
|
-
}, null, 4)])) : o("", !0)]), c("div",
|
|
1864
|
+
}, null, 4)])) : o("", !0)]), c("div", er, [e.title ? (y(), s("p", tr, w(e.title), 1)) : o("", !0), e.description ? (y(), s("p", {
|
|
1826
1865
|
key: 1,
|
|
1827
1866
|
class: h(e.title ? "description" : "title")
|
|
1828
1867
|
}, w(e.description), 3)) : o("", !0)])], 2))), 128))]),
|
|
1829
1868
|
_: 1
|
|
1830
1869
|
})]));
|
|
1831
1870
|
}
|
|
1832
|
-
}), [["__scopeId", "data-v-53892c5f"]]),
|
|
1871
|
+
}), [["__scopeId", "data-v-53892c5f"]]), rr = { class: "code" }, ir = {
|
|
1833
1872
|
key: 0,
|
|
1834
1873
|
class: "header"
|
|
1835
|
-
},
|
|
1874
|
+
}, ar = { class: "language-label" }, or = {
|
|
1836
1875
|
key: 0,
|
|
1837
1876
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1838
1877
|
width: "14",
|
|
@@ -1843,7 +1882,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1843
1882
|
"stroke-width": "2",
|
|
1844
1883
|
"stroke-linecap": "round",
|
|
1845
1884
|
"stroke-linejoin": "round"
|
|
1846
|
-
},
|
|
1885
|
+
}, sr = {
|
|
1847
1886
|
key: 1,
|
|
1848
1887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1849
1888
|
width: "14",
|
|
@@ -1854,10 +1893,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1854
1893
|
"stroke-width": "2",
|
|
1855
1894
|
"stroke-linecap": "round",
|
|
1856
1895
|
"stroke-linejoin": "round"
|
|
1857
|
-
},
|
|
1896
|
+
}, cr = { class: "code-body" }, lr = {
|
|
1858
1897
|
key: 0,
|
|
1859
1898
|
class: "gutter"
|
|
1860
|
-
},
|
|
1899
|
+
}, ur = ["textContent"], dr = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1861
1900
|
__name: "NCode",
|
|
1862
1901
|
props: {
|
|
1863
1902
|
code: {},
|
|
@@ -1876,28 +1915,28 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1876
1915
|
}, 2e3);
|
|
1877
1916
|
} catch {}
|
|
1878
1917
|
}
|
|
1879
|
-
return (i, l) => (y(), s("div",
|
|
1918
|
+
return (i, l) => (y(), s("div", rr, [(t.language, y(), s("div", ir, [c("span", ar, w(t.language || "code"), 1), c("button", {
|
|
1880
1919
|
class: h(["copy-btn", { copied: n.value }]),
|
|
1881
1920
|
onClick: a
|
|
1882
|
-
}, [n.value ? (y(), s("svg",
|
|
1921
|
+
}, [n.value ? (y(), s("svg", sr, [...l[1] ||= [c("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (y(), s("svg", or, [...l[0] ||= [c("rect", {
|
|
1883
1922
|
x: "9",
|
|
1884
1923
|
y: "9",
|
|
1885
1924
|
width: "13",
|
|
1886
1925
|
height: "13",
|
|
1887
1926
|
rx: "2",
|
|
1888
1927
|
ry: "2"
|
|
1889
|
-
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, w(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div",
|
|
1928
|
+
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, w(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div", cr, [t.showLineNumbers ? (y(), s("div", lr, [(y(!0), s(e, null, S(r.value, (e, t) => (y(), s("span", {
|
|
1890
1929
|
key: t,
|
|
1891
1930
|
class: "line-number"
|
|
1892
1931
|
}, w(t + 1), 1))), 128))])) : o("", !0), c("pre", {
|
|
1893
1932
|
class: "code-content",
|
|
1894
1933
|
textContent: w(t.code.trim())
|
|
1895
|
-
}, null, 8,
|
|
1934
|
+
}, null, 8, ur)])]));
|
|
1896
1935
|
}
|
|
1897
|
-
}), [["__scopeId", "data-v-6fed5425"]]),
|
|
1936
|
+
}), [["__scopeId", "data-v-6fed5425"]]), fr = {
|
|
1898
1937
|
key: 0,
|
|
1899
1938
|
class: "label"
|
|
1900
|
-
},
|
|
1939
|
+
}, pr = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1901
1940
|
__name: "NSwitch",
|
|
1902
1941
|
props: {
|
|
1903
1942
|
modelValue: {
|
|
@@ -1922,7 +1961,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1922
1961
|
let e = !n.modelValue;
|
|
1923
1962
|
r("update:modelValue", e), r("change", e);
|
|
1924
1963
|
};
|
|
1925
|
-
return (t, n) => (y(), s("div", { class: h(["switch-wrapper", { inline: e.inline }]) }, [e.title ? (y(), s("label",
|
|
1964
|
+
return (t, n) => (y(), s("div", { class: h(["switch-wrapper", { inline: e.inline }]) }, [e.title ? (y(), s("label", fr, w(e.title), 1)) : o("", !0), c("div", {
|
|
1926
1965
|
class: h(["switch", [
|
|
1927
1966
|
`size-${e.size}`,
|
|
1928
1967
|
{ checked: a.value },
|
|
@@ -1931,7 +1970,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1931
1970
|
onClick: l
|
|
1932
1971
|
}, [...n[0] ||= [c("div", { class: "inner" }, [c("div", { class: "handle" })], -1)]], 2)], 2));
|
|
1933
1972
|
}
|
|
1934
|
-
}), [["__scopeId", "data-v-efa08615"]]),
|
|
1973
|
+
}), [["__scopeId", "data-v-efa08615"]]), mr = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
1935
1974
|
__name: "NTag",
|
|
1936
1975
|
props: {
|
|
1937
1976
|
intent: { default: "none" },
|
|
@@ -1980,49 +2019,49 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
1980
2019
|
y2: "18"
|
|
1981
2020
|
})], -1)]])) : o("", !0)], 2));
|
|
1982
2021
|
}
|
|
1983
|
-
}), [["__scopeId", "data-v-55e5be0f"]]),
|
|
2022
|
+
}), [["__scopeId", "data-v-55e5be0f"]]), hr = {
|
|
1984
2023
|
key: 0,
|
|
1985
2024
|
class: "label"
|
|
1986
|
-
},
|
|
2025
|
+
}, gr = {
|
|
1987
2026
|
key: 0,
|
|
1988
2027
|
class: "picker-dropdown"
|
|
1989
|
-
},
|
|
2028
|
+
}, _r = { class: "picker-header" }, vr = { class: "header-nav" }, yr = { class: "header-nav" }, br = { class: "picker-body" }, xr = { class: "weekday-grid" }, Sr = { class: "day-grid" }, Cr = {
|
|
1990
2029
|
key: 1,
|
|
1991
2030
|
class: "year-grid"
|
|
1992
|
-
},
|
|
2031
|
+
}, wr = {
|
|
1993
2032
|
key: 0,
|
|
1994
2033
|
class: "time-section"
|
|
1995
|
-
},
|
|
2034
|
+
}, Tr = { class: "time-sliders" }, Er = {
|
|
1996
2035
|
key: 0,
|
|
1997
2036
|
class: "time-row"
|
|
1998
|
-
},
|
|
2037
|
+
}, Dr = ["value"], Or = { class: "time-val" }, kr = {
|
|
1999
2038
|
key: 1,
|
|
2000
2039
|
class: "time-row"
|
|
2001
|
-
},
|
|
2040
|
+
}, Ar = ["value"], jr = { class: "time-val" }, Mr = { class: "mobile-sheet" }, Nr = { class: "picker-header" }, Pr = { class: "header-nav" }, Fr = { class: "header-nav" }, Ir = { class: "picker-body" }, Lr = { class: "weekday-grid" }, Rr = { class: "day-grid" }, zr = {
|
|
2002
2041
|
key: 1,
|
|
2003
2042
|
class: "year-grid"
|
|
2004
|
-
},
|
|
2043
|
+
}, Br = {
|
|
2005
2044
|
key: 0,
|
|
2006
2045
|
class: "time-section"
|
|
2007
|
-
},
|
|
2046
|
+
}, Vr = { class: "time-sliders" }, Hr = {
|
|
2008
2047
|
key: 0,
|
|
2009
2048
|
class: "time-row"
|
|
2010
|
-
},
|
|
2049
|
+
}, Ur = ["value"], Wr = { class: "time-val" }, Gr = {
|
|
2011
2050
|
key: 1,
|
|
2012
2051
|
class: "time-row"
|
|
2013
|
-
},
|
|
2052
|
+
}, Kr = ["value"], qr = { class: "time-val" }, Jr = { class: "range-modal" }, Yr = { class: "range-body" }, Xr = {
|
|
2014
2053
|
key: 0,
|
|
2015
2054
|
class: "range-sep"
|
|
2016
|
-
},
|
|
2055
|
+
}, Zr = { class: "range-cal" }, Qr = { class: "picker-header" }, $r = { class: "header-nav" }, ei = {
|
|
2017
2056
|
key: 1,
|
|
2018
2057
|
class: "header-nav-placeholder"
|
|
2019
|
-
},
|
|
2058
|
+
}, ti = { class: "header-title no-click" }, ni = { class: "header-nav" }, ri = {
|
|
2020
2059
|
key: 1,
|
|
2021
2060
|
class: "header-nav-placeholder"
|
|
2022
|
-
},
|
|
2061
|
+
}, ii = { class: "weekday-grid" }, ai = { class: "day-grid range-day-grid" }, oi = ["onClick", "onMouseenter"], si = { class: "range-footer" }, ci = { class: "range-display" }, li = { class: "mobile-sheet" }, ui = {
|
|
2023
2062
|
class: "picker-header",
|
|
2024
2063
|
style: { "margin-top": "8px" }
|
|
2025
|
-
},
|
|
2064
|
+
}, di = { class: "header-nav" }, fi = { class: "header-title no-click" }, pi = { class: "header-nav" }, mi = { class: "weekday-grid" }, hi = { class: "day-grid range-day-grid" }, gi = ["onClick"], _i = { class: "range-footer" }, vi = { class: "range-display" }, yi = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
2026
2065
|
__name: "NDatePicker",
|
|
2027
2066
|
props: {
|
|
2028
2067
|
modelValue: { default: "" },
|
|
@@ -2307,7 +2346,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2307
2346
|
ref: C,
|
|
2308
2347
|
class: "datepicker"
|
|
2309
2348
|
}, [
|
|
2310
|
-
t.title ? (y(), s("label",
|
|
2349
|
+
t.title ? (y(), s("label", hr, w(t.title), 1)) : o("", !0),
|
|
2311
2350
|
c("div", { class: h(["date-picker", {
|
|
2312
2351
|
open: b.value && !t.range && !T.value,
|
|
2313
2352
|
disabled: t.disabled
|
|
@@ -2334,9 +2373,9 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2334
2373
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
2335
2374
|
_: 1
|
|
2336
2375
|
})) : o("", !0)]), f(n, { name: "fade" }, {
|
|
2337
|
-
default: D(() => [b.value && !t.range && !T.value ? (y(), s("div",
|
|
2338
|
-
c("div",
|
|
2339
|
-
c("div",
|
|
2376
|
+
default: D(() => [b.value && !t.range && !T.value ? (y(), s("div", gr, [
|
|
2377
|
+
c("div", _r, [
|
|
2378
|
+
c("div", vr, [f(M, {
|
|
2340
2379
|
variant: "ghost",
|
|
2341
2380
|
square: "",
|
|
2342
2381
|
onClick: i[0] ||= (e) => Ce(-1)
|
|
@@ -2376,7 +2415,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2376
2415
|
class: "header-title",
|
|
2377
2416
|
onClick: He
|
|
2378
2417
|
}, [P.value === "date" ? (y(), s(e, { key: 0 }, [d(w(re[ue.value]) + " " + w(z.value), 1)], 64)) : (y(), s(e, { key: 1 }, [d(w(B.value[0]) + " - " + w(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2379
|
-
c("div",
|
|
2418
|
+
c("div", yr, [P.value === "date" ? (y(), a(M, {
|
|
2380
2419
|
key: 0,
|
|
2381
2420
|
variant: "ghost",
|
|
2382
2421
|
square: "",
|
|
@@ -2413,10 +2452,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2413
2452
|
_: 1
|
|
2414
2453
|
})])
|
|
2415
2454
|
]),
|
|
2416
|
-
c("div",
|
|
2455
|
+
c("div", br, [P.value === "date" ? (y(), s(e, { key: 0 }, [c("div", xr, [(y(), s(e, null, S(k, (e) => c("span", {
|
|
2417
2456
|
key: e,
|
|
2418
2457
|
class: "weekday"
|
|
2419
|
-
}, w(e), 1)), 64))]), c("div",
|
|
2458
|
+
}, w(e), 1)), 64))]), c("div", Sr, [(y(!0), s(e, null, S(fe.value, (e, t) => (y(), a(M, {
|
|
2420
2459
|
key: t,
|
|
2421
2460
|
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2422
2461
|
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
@@ -2431,7 +2470,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2431
2470
|
"intent",
|
|
2432
2471
|
"class",
|
|
2433
2472
|
"onClick"
|
|
2434
|
-
]))), 128))])], 64)) : (y(), s("div",
|
|
2473
|
+
]))), 128))])], 64)) : (y(), s("div", Cr, [(y(!0), s(e, null, S(B.value, (e) => (y(), a(M, {
|
|
2435
2474
|
key: e,
|
|
2436
2475
|
variant: e === z.value ? "solid" : "ghost",
|
|
2437
2476
|
intent: e === z.value ? "primary" : "none",
|
|
@@ -2445,7 +2484,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2445
2484
|
"intent",
|
|
2446
2485
|
"onClick"
|
|
2447
2486
|
]))), 128))]))]),
|
|
2448
|
-
v.value && P.value === "date" ? (y(), s("div",
|
|
2487
|
+
v.value && P.value === "date" ? (y(), s("div", wr, [c("div", Tr, [m.value ? (y(), s("div", Er, [
|
|
2449
2488
|
i[27] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2450
2489
|
f(M, {
|
|
2451
2490
|
variant: "ghost",
|
|
@@ -2476,7 +2515,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2476
2515
|
max: "23",
|
|
2477
2516
|
value: L.value,
|
|
2478
2517
|
onInput: i[5] ||= (e) => Te(e, "H")
|
|
2479
|
-
}, null, 40,
|
|
2518
|
+
}, null, 40, Dr),
|
|
2480
2519
|
f(M, {
|
|
2481
2520
|
variant: "ghost",
|
|
2482
2521
|
square: "",
|
|
@@ -2499,8 +2538,8 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2499
2538
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2500
2539
|
_: 1
|
|
2501
2540
|
}),
|
|
2502
|
-
c("span",
|
|
2503
|
-
])) : o("", !0), g.value ? (y(), s("div",
|
|
2541
|
+
c("span", Or, w(N(L.value)), 1)
|
|
2542
|
+
])) : o("", !0), g.value ? (y(), s("div", kr, [
|
|
2504
2543
|
i[30] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2505
2544
|
f(M, {
|
|
2506
2545
|
variant: "ghost",
|
|
@@ -2531,7 +2570,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2531
2570
|
max: "59",
|
|
2532
2571
|
value: R.value,
|
|
2533
2572
|
onInput: i[8] ||= (e) => Te(e, "m")
|
|
2534
|
-
}, null, 40,
|
|
2573
|
+
}, null, 40, Ar),
|
|
2535
2574
|
f(M, {
|
|
2536
2575
|
variant: "ghost",
|
|
2537
2576
|
square: "",
|
|
@@ -2554,7 +2593,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2554
2593
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2555
2594
|
_: 1
|
|
2556
2595
|
}),
|
|
2557
|
-
c("span",
|
|
2596
|
+
c("span", jr, w(N(R.value)), 1)
|
|
2558
2597
|
])) : o("", !0)])])) : o("", !0)
|
|
2559
2598
|
])) : o("", !0)]),
|
|
2560
2599
|
_: 1
|
|
@@ -2564,10 +2603,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2564
2603
|
key: 0,
|
|
2565
2604
|
class: "mobile-overlay",
|
|
2566
2605
|
onClick: O(Ve, ["self"])
|
|
2567
|
-
}, [c("div",
|
|
2606
|
+
}, [c("div", Mr, [
|
|
2568
2607
|
i[41] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2569
|
-
c("div",
|
|
2570
|
-
c("div",
|
|
2608
|
+
c("div", Nr, [
|
|
2609
|
+
c("div", Pr, [f(M, {
|
|
2571
2610
|
variant: "ghost",
|
|
2572
2611
|
square: "",
|
|
2573
2612
|
onClick: i[10] ||= (e) => Ce(-1)
|
|
@@ -2607,7 +2646,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2607
2646
|
class: "header-title",
|
|
2608
2647
|
onClick: He
|
|
2609
2648
|
}, [P.value === "date" ? (y(), s(e, { key: 0 }, [d(w(re[ue.value]) + " " + w(z.value), 1)], 64)) : (y(), s(e, { key: 1 }, [d(w(B.value[0]) + " - " + w(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2610
|
-
c("div",
|
|
2649
|
+
c("div", Fr, [P.value === "date" ? (y(), a(M, {
|
|
2611
2650
|
key: 0,
|
|
2612
2651
|
variant: "ghost",
|
|
2613
2652
|
square: "",
|
|
@@ -2644,10 +2683,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2644
2683
|
_: 1
|
|
2645
2684
|
})])
|
|
2646
2685
|
]),
|
|
2647
|
-
c("div",
|
|
2686
|
+
c("div", Ir, [P.value === "date" ? (y(), s(e, { key: 0 }, [c("div", Lr, [(y(), s(e, null, S(k, (e) => c("span", {
|
|
2648
2687
|
key: e,
|
|
2649
2688
|
class: "weekday"
|
|
2650
|
-
}, w(e), 1)), 64))]), c("div",
|
|
2689
|
+
}, w(e), 1)), 64))]), c("div", Rr, [(y(!0), s(e, null, S(fe.value, (e, t) => (y(), a(M, {
|
|
2651
2690
|
key: t,
|
|
2652
2691
|
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2653
2692
|
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
@@ -2662,7 +2701,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2662
2701
|
"intent",
|
|
2663
2702
|
"class",
|
|
2664
2703
|
"onClick"
|
|
2665
|
-
]))), 128))])], 64)) : (y(), s("div",
|
|
2704
|
+
]))), 128))])], 64)) : (y(), s("div", zr, [(y(!0), s(e, null, S(B.value, (e) => (y(), a(M, {
|
|
2666
2705
|
key: e,
|
|
2667
2706
|
variant: e === z.value ? "solid" : "ghost",
|
|
2668
2707
|
intent: e === z.value ? "primary" : "none",
|
|
@@ -2676,7 +2715,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2676
2715
|
"intent",
|
|
2677
2716
|
"onClick"
|
|
2678
2717
|
]))), 128))]))]),
|
|
2679
|
-
v.value && P.value === "date" ? (y(), s("div",
|
|
2718
|
+
v.value && P.value === "date" ? (y(), s("div", Br, [c("div", Vr, [m.value ? (y(), s("div", Hr, [
|
|
2680
2719
|
i[37] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2681
2720
|
f(M, {
|
|
2682
2721
|
variant: "ghost",
|
|
@@ -2707,7 +2746,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2707
2746
|
max: "23",
|
|
2708
2747
|
value: L.value,
|
|
2709
2748
|
onInput: i[15] ||= (e) => Te(e, "H")
|
|
2710
|
-
}, null, 40,
|
|
2749
|
+
}, null, 40, Ur),
|
|
2711
2750
|
f(M, {
|
|
2712
2751
|
variant: "ghost",
|
|
2713
2752
|
square: "",
|
|
@@ -2730,8 +2769,8 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2730
2769
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2731
2770
|
_: 1
|
|
2732
2771
|
}),
|
|
2733
|
-
c("span",
|
|
2734
|
-
])) : o("", !0), g.value ? (y(), s("div",
|
|
2772
|
+
c("span", Wr, w(N(L.value)), 1)
|
|
2773
|
+
])) : o("", !0), g.value ? (y(), s("div", Gr, [
|
|
2735
2774
|
i[40] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2736
2775
|
f(M, {
|
|
2737
2776
|
variant: "ghost",
|
|
@@ -2762,7 +2801,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2762
2801
|
max: "59",
|
|
2763
2802
|
value: R.value,
|
|
2764
2803
|
onInput: i[18] ||= (e) => Te(e, "m")
|
|
2765
|
-
}, null, 40,
|
|
2804
|
+
}, null, 40, Kr),
|
|
2766
2805
|
f(M, {
|
|
2767
2806
|
variant: "ghost",
|
|
2768
2807
|
square: "",
|
|
@@ -2785,7 +2824,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2785
2824
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2786
2825
|
_: 1
|
|
2787
2826
|
}),
|
|
2788
|
-
c("span",
|
|
2827
|
+
c("span", qr, w(N(R.value)), 1)
|
|
2789
2828
|
])) : o("", !0)])])) : o("", !0)
|
|
2790
2829
|
])])) : o("", !0)]),
|
|
2791
2830
|
_: 1
|
|
@@ -2795,11 +2834,11 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2795
2834
|
key: 0,
|
|
2796
2835
|
class: "range-overlay",
|
|
2797
2836
|
onClick: O(Ve, ["self"])
|
|
2798
|
-
}, [c("div",
|
|
2837
|
+
}, [c("div", Jr, [
|
|
2799
2838
|
i[46] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2800
|
-
c("div",
|
|
2801
|
-
c("div",
|
|
2802
|
-
c("div",
|
|
2839
|
+
c("div", Yr, [(y(!0), s(e, null, S(Y.value, (t) => (y(), s(e, { key: t.isLeft ? "left" : "right" }, [t.isLeft ? o("", !0) : (y(), s("div", Xr)), c("div", Zr, [
|
|
2840
|
+
c("div", Qr, [
|
|
2841
|
+
c("div", $r, [t.isLeft ? (y(), a(M, {
|
|
2803
2842
|
key: 0,
|
|
2804
2843
|
variant: "ghost",
|
|
2805
2844
|
square: "",
|
|
@@ -2817,9 +2856,9 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2817
2856
|
"stroke-linejoin": "round"
|
|
2818
2857
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2819
2858
|
_: 1
|
|
2820
|
-
})) : (y(), s("div",
|
|
2821
|
-
c("div",
|
|
2822
|
-
c("div",
|
|
2859
|
+
})) : (y(), s("div", ei))]),
|
|
2860
|
+
c("div", ti, w(re[t.month]) + " " + w(t.year), 1),
|
|
2861
|
+
c("div", ni, [t.isLeft ? (y(), s("div", ri)) : (y(), a(M, {
|
|
2823
2862
|
key: 0,
|
|
2824
2863
|
variant: "ghost",
|
|
2825
2864
|
square: "",
|
|
@@ -2839,18 +2878,18 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2839
2878
|
_: 1
|
|
2840
2879
|
}))])
|
|
2841
2880
|
]),
|
|
2842
|
-
c("div",
|
|
2881
|
+
c("div", ii, [(y(), s(e, null, S(k, (e) => c("span", {
|
|
2843
2882
|
key: e,
|
|
2844
2883
|
class: "weekday"
|
|
2845
2884
|
}, w(e), 1)), 64))]),
|
|
2846
|
-
c("div",
|
|
2885
|
+
c("div", ai, [(y(!0), s(e, null, S(t.days, (e, t) => (y(), s("div", {
|
|
2847
2886
|
key: t,
|
|
2848
2887
|
class: h(["range-day", Re(e)]),
|
|
2849
2888
|
onClick: (t) => Le(e),
|
|
2850
2889
|
onMouseenter: (t) => J.value = e
|
|
2851
|
-
}, w(e.day), 43,
|
|
2890
|
+
}, w(e.day), 43, oi))), 128))])
|
|
2852
2891
|
])], 64))), 128))]),
|
|
2853
|
-
c("div",
|
|
2892
|
+
c("div", si, [c("div", ci, [
|
|
2854
2893
|
c("span", { class: h(["range-val", { "is-empty": !X.value }]) }, w(X.value || "開始日期"), 3),
|
|
2855
2894
|
i[44] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2856
2895
|
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, w(Pe.value || "結束日期"), 3)
|
|
@@ -2872,11 +2911,11 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2872
2911
|
key: 0,
|
|
2873
2912
|
class: "mobile-overlay",
|
|
2874
2913
|
onClick: O(Ve, ["self"])
|
|
2875
|
-
}, [c("div",
|
|
2914
|
+
}, [c("div", li, [
|
|
2876
2915
|
i[51] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2877
2916
|
i[52] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2878
|
-
c("div",
|
|
2879
|
-
c("div",
|
|
2917
|
+
c("div", ui, [
|
|
2918
|
+
c("div", di, [f(M, {
|
|
2880
2919
|
variant: "ghost",
|
|
2881
2920
|
square: "",
|
|
2882
2921
|
onClick: Fe
|
|
@@ -2894,8 +2933,8 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2894
2933
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2895
2934
|
_: 1
|
|
2896
2935
|
})]),
|
|
2897
|
-
c("div",
|
|
2898
|
-
c("div",
|
|
2936
|
+
c("div", fi, w(re[W.value]) + " " + w(U.value), 1),
|
|
2937
|
+
c("div", pi, [f(M, {
|
|
2899
2938
|
variant: "ghost",
|
|
2900
2939
|
square: "",
|
|
2901
2940
|
onClick: Ie
|
|
@@ -2914,16 +2953,16 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2914
2953
|
_: 1
|
|
2915
2954
|
})])
|
|
2916
2955
|
]),
|
|
2917
|
-
c("div",
|
|
2956
|
+
c("div", mi, [(y(), s(e, null, S(k, (e) => c("span", {
|
|
2918
2957
|
key: e,
|
|
2919
2958
|
class: "weekday"
|
|
2920
2959
|
}, w(e), 1)), 64))]),
|
|
2921
|
-
c("div",
|
|
2960
|
+
c("div", hi, [(y(!0), s(e, null, S(ke.value, (e, t) => (y(), s("div", {
|
|
2922
2961
|
key: t,
|
|
2923
2962
|
class: h(["range-day", Re(e)]),
|
|
2924
2963
|
onClick: (t) => Le(e)
|
|
2925
|
-
}, w(e.day), 11,
|
|
2926
|
-
c("div",
|
|
2964
|
+
}, w(e.day), 11, gi))), 128))]),
|
|
2965
|
+
c("div", _i, [c("div", vi, [
|
|
2927
2966
|
c("span", { class: h(["range-val", { "is-empty": !X.value }]) }, w(X.value || "開始日期"), 3),
|
|
2928
2967
|
i[49] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2929
2968
|
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, w(Pe.value || "結束日期"), 3)
|
|
@@ -2942,7 +2981,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2942
2981
|
})
|
|
2943
2982
|
], 512));
|
|
2944
2983
|
}
|
|
2945
|
-
}), [["__scopeId", "data-v-9f942c6b"]]),
|
|
2984
|
+
}), [["__scopeId", "data-v-9f942c6b"]]), bi = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
2946
2985
|
__name: "NTooltip",
|
|
2947
2986
|
props: {
|
|
2948
2987
|
content: { default: "" },
|
|
@@ -2977,10 +3016,10 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
2977
3016
|
_: 3
|
|
2978
3017
|
})], 32));
|
|
2979
3018
|
}
|
|
2980
|
-
}), [["__scopeId", "data-v-7a53ca0a"]]),
|
|
3019
|
+
}), [["__scopeId", "data-v-7a53ca0a"]]), xi = { class: "modal-header" }, Si = { class: "modal-title" }, Ci = { class: "modal-content" }, wi = {
|
|
2981
3020
|
key: 0,
|
|
2982
3021
|
class: "modal-footer"
|
|
2983
|
-
},
|
|
3022
|
+
}, Ti = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
2984
3023
|
__name: "NModal",
|
|
2985
3024
|
props: {
|
|
2986
3025
|
show: {
|
|
@@ -3024,7 +3063,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
3024
3063
|
class: "modal-container",
|
|
3025
3064
|
style: g({ width: e.width })
|
|
3026
3065
|
}, [
|
|
3027
|
-
c("header",
|
|
3066
|
+
c("header", xi, [c("h3", Si, w(e.title), 1), e.showClose ? (y(), s("button", {
|
|
3028
3067
|
key: 0,
|
|
3029
3068
|
class: "close-btn",
|
|
3030
3069
|
onClick: l
|
|
@@ -3036,16 +3075,16 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
3036
3075
|
fill: "currentColor",
|
|
3037
3076
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
3038
3077
|
})], -1)]])) : o("", !0)]),
|
|
3039
|
-
c("main",
|
|
3040
|
-
r.$slots.footer ? (y(), s("footer",
|
|
3078
|
+
c("main", Ci, [C(r.$slots, "default", {}, void 0, !0)]),
|
|
3079
|
+
r.$slots.footer ? (y(), s("footer", wi, [C(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
3041
3080
|
], 4)], 4)) : o("", !0)]),
|
|
3042
3081
|
_: 3
|
|
3043
3082
|
})]));
|
|
3044
3083
|
}
|
|
3045
|
-
}), [["__scopeId", "data-v-ee2fac3c"]]),
|
|
3084
|
+
}), [["__scopeId", "data-v-ee2fac3c"]]), Ei = { class: "drawer-header" }, Di = { class: "drawer-title" }, Oi = { class: "drawer-body" }, ki = {
|
|
3046
3085
|
key: 0,
|
|
3047
3086
|
class: "drawer-footer"
|
|
3048
|
-
},
|
|
3087
|
+
}, Ai = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3049
3088
|
__name: "NDrawer",
|
|
3050
3089
|
props: {
|
|
3051
3090
|
show: {
|
|
@@ -3090,7 +3129,7 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
3090
3129
|
class: h(["drawer-container", [`placement-${e.placement}`]]),
|
|
3091
3130
|
style: g({ width: e.width })
|
|
3092
3131
|
}, [
|
|
3093
|
-
c("header",
|
|
3132
|
+
c("header", Ei, [c("h3", Di, [C(r.$slots, "title", {}, () => [d(w(e.title), 1)], !0)]), e.showClose ? (y(), s("button", {
|
|
3094
3133
|
key: 0,
|
|
3095
3134
|
class: "close-btn",
|
|
3096
3135
|
onClick: l
|
|
@@ -3102,18 +3141,18 @@ var Gn = { class: "icon-wrap" }, Kn = ["innerHTML"], qn = {
|
|
|
3102
3141
|
fill: "currentColor",
|
|
3103
3142
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
3104
3143
|
})], -1)]])) : o("", !0)]),
|
|
3105
|
-
c("main",
|
|
3106
|
-
r.$slots.footer ? (y(), s("footer",
|
|
3144
|
+
c("main", Oi, [C(r.$slots, "default", {}, void 0, !0)]),
|
|
3145
|
+
r.$slots.footer ? (y(), s("footer", ki, [C(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
3107
3146
|
], 6)], 4)) : o("", !0)]),
|
|
3108
3147
|
_: 3
|
|
3109
3148
|
})]));
|
|
3110
3149
|
}
|
|
3111
|
-
}), [["__scopeId", "data-v-f8c0a0bb"]]),
|
|
3112
|
-
function
|
|
3150
|
+
}), [["__scopeId", "data-v-f8c0a0bb"]]), ji = 0, Mi = b([]);
|
|
3151
|
+
function Ni() {
|
|
3113
3152
|
let e = function(e, t = {}) {
|
|
3114
|
-
let n = ++
|
|
3153
|
+
let n = ++ji;
|
|
3115
3154
|
return new Promise((r) => {
|
|
3116
|
-
|
|
3155
|
+
Mi.push({
|
|
3117
3156
|
id: n,
|
|
3118
3157
|
type: "alert",
|
|
3119
3158
|
message: e,
|
|
@@ -3139,8 +3178,8 @@ function Di() {
|
|
|
3139
3178
|
});
|
|
3140
3179
|
function t(e, t = {}) {
|
|
3141
3180
|
return new Promise((n) => {
|
|
3142
|
-
let r = ++
|
|
3143
|
-
|
|
3181
|
+
let r = ++ji;
|
|
3182
|
+
Mi.push({
|
|
3144
3183
|
id: r,
|
|
3145
3184
|
type: "confirm",
|
|
3146
3185
|
message: e,
|
|
@@ -3153,10 +3192,10 @@ function Di() {
|
|
|
3153
3192
|
});
|
|
3154
3193
|
}
|
|
3155
3194
|
function n() {
|
|
3156
|
-
for (;
|
|
3195
|
+
for (; Mi.length > 0;) Mi.shift().resolve(!1);
|
|
3157
3196
|
}
|
|
3158
3197
|
return {
|
|
3159
|
-
alerts:
|
|
3198
|
+
alerts: Mi,
|
|
3160
3199
|
alert: e,
|
|
3161
3200
|
confirm: t,
|
|
3162
3201
|
clearAlerts: n
|
|
@@ -3164,13 +3203,13 @@ function Di() {
|
|
|
3164
3203
|
}
|
|
3165
3204
|
//#endregion
|
|
3166
3205
|
//#region src/components/NAlert.vue?vue&type=script&setup=true&lang.ts
|
|
3167
|
-
var
|
|
3206
|
+
var Pi = { class: "cards-wrapper" }, Fi = ["innerHTML"], Ii = { class: "card-body" }, Li = {
|
|
3168
3207
|
key: 0,
|
|
3169
3208
|
class: "card-title"
|
|
3170
|
-
},
|
|
3209
|
+
}, Ri = { class: "card-message" }, zi = { class: "card-footer" }, Bi = ["onClick"], Vi = ["onClick"], Hi = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3171
3210
|
__name: "NAlert",
|
|
3172
3211
|
setup(n) {
|
|
3173
|
-
let { alerts: r, clearAlerts: i } =
|
|
3212
|
+
let { alerts: r, clearAlerts: i } = Ni(), l = {
|
|
3174
3213
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12l3 3 5-6\"/></svg>",
|
|
3175
3214
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>",
|
|
3176
3215
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>",
|
|
@@ -3207,7 +3246,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3207
3246
|
}
|
|
3208
3247
|
return _(() => document.addEventListener("keydown", m)), v(() => {
|
|
3209
3248
|
document.removeEventListener("keydown", m), i();
|
|
3210
|
-
}), (n, i) => (y(), a(t, { to: "body" }, [c("div", { class: h(["backdrop", { open: T(r).length > 0 }]) }, null, 2), c("div", { class: h(["alert-stack", { open: T(r).length > 0 }]) }, [c("div",
|
|
3249
|
+
}), (n, i) => (y(), a(t, { to: "body" }, [c("div", { class: h(["backdrop", { open: T(r).length > 0 }]) }, null, 2), c("div", { class: h(["alert-stack", { open: T(r).length > 0 }]) }, [c("div", Pi, [(y(!0), s(e, null, S(T(r), (e, t) => (y(), s("div", {
|
|
3211
3250
|
key: e.id,
|
|
3212
3251
|
class: h(["alert-card", `status-${e.status}`]),
|
|
3213
3252
|
style: g(d(t))
|
|
@@ -3215,25 +3254,25 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3215
3254
|
c("div", {
|
|
3216
3255
|
class: "card-icon",
|
|
3217
3256
|
innerHTML: u(e)
|
|
3218
|
-
}, null, 8,
|
|
3219
|
-
c("div",
|
|
3220
|
-
c("div",
|
|
3257
|
+
}, null, 8, Fi),
|
|
3258
|
+
c("div", Ii, [e.title ? (y(), s("p", Li, w(e.title), 1)) : o("", !0), c("p", Ri, w(e.message), 1)]),
|
|
3259
|
+
c("div", zi, [e.type === "confirm" ? (y(), s("button", {
|
|
3221
3260
|
key: 0,
|
|
3222
3261
|
class: "btn btn-cancel",
|
|
3223
3262
|
onClick: (t) => p(e)
|
|
3224
|
-
}, w(e.cancelText), 9,
|
|
3263
|
+
}, w(e.cancelText), 9, Bi)) : o("", !0), c("button", {
|
|
3225
3264
|
class: h(["btn btn-confirm", `btn-${e.status}`]),
|
|
3226
3265
|
onClick: (t) => f(e)
|
|
3227
|
-
}, w(e.confirmText), 11,
|
|
3266
|
+
}, w(e.confirmText), 11, Vi)])
|
|
3228
3267
|
], 6))), 128))])], 2)]));
|
|
3229
3268
|
}
|
|
3230
|
-
}), [["__scopeId", "data-v-20105bbb"]]),
|
|
3269
|
+
}), [["__scopeId", "data-v-20105bbb"]]), Ui = { class: "nav" }, Wi = ["onClick"], Gi = ["innerHTML"], Ki = { class: "nav-list" }, qi = ["href", "onClick"], Ji = ["innerHTML"], Yi = { class: "nav-text" }, Xi = ["href", "onClick"], Zi = { class: "title no-children" }, Qi = ["innerHTML"], $i = { class: "user-capsule" }, ea = { class: "user-avatar" }, ta = ["src"], na = {
|
|
3231
3270
|
key: 1,
|
|
3232
3271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3233
3272
|
width: "36",
|
|
3234
3273
|
height: "36",
|
|
3235
3274
|
viewBox: "0 0 36 36"
|
|
3236
|
-
},
|
|
3275
|
+
}, ra = { class: "user-info" }, ia = { class: "user-name-row" }, aa = { class: "user-name" }, oa = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3237
3276
|
__name: "NSidebar",
|
|
3238
3277
|
props: {
|
|
3239
3278
|
isOpen: {
|
|
@@ -3251,7 +3290,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3251
3290
|
"navigate"
|
|
3252
3291
|
],
|
|
3253
3292
|
setup(n, { emit: r }) {
|
|
3254
|
-
let { isMenuExpanded: i, toggleMenu: o, resolveMenuActive: l, resolveItemActive: d } =
|
|
3293
|
+
let { isMenuExpanded: i, toggleMenu: o, resolveMenuActive: l, resolveItemActive: d } = Wt(), p = x(!1), m = r, g = (e) => {
|
|
3255
3294
|
n.currentPath !== e.route && m("navigate", e);
|
|
3256
3295
|
}, ee = (e) => {
|
|
3257
3296
|
!e.route || n.currentPath === e.route || m("navigate", {
|
|
@@ -3286,7 +3325,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3286
3325
|
onMouseenter: _[2] ||= (e) => p.value = !0
|
|
3287
3326
|
}, [
|
|
3288
3327
|
_[9] ||= c("div", { class: "header" }, [c("div", { class: "brand-logo" }, [c("span", { class: "logo-text" }, "NICKLABS"), c("span", { class: "logo-icon" }, "N")])], -1),
|
|
3289
|
-
c("div",
|
|
3328
|
+
c("div", Ui, [(y(!0), s(e, null, S(n.menus, (t) => (y(), s(e, null, [t.children?.length ? (y(), s("div", {
|
|
3290
3329
|
key: 0,
|
|
3291
3330
|
class: h(["menu", {
|
|
3292
3331
|
open: T(i)(t.title),
|
|
@@ -3295,7 +3334,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3295
3334
|
}, [c("div", {
|
|
3296
3335
|
class: "title",
|
|
3297
3336
|
onClick: (e) => T(o)(t.title)
|
|
3298
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
3337
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Gi), c("span", null, w(t.title), 1)]), _[6] ||= c("svg", {
|
|
3299
3338
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3300
3339
|
width: "14",
|
|
3301
3340
|
height: "14",
|
|
@@ -3306,23 +3345,23 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3306
3345
|
"stroke-linecap": "round",
|
|
3307
3346
|
"stroke-linejoin": "round",
|
|
3308
3347
|
class: "icon"
|
|
3309
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
3348
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, Wi), c("div", Ki, [c("div", null, [(y(!0), s(e, null, S(t.children, (e) => (y(), s("a", {
|
|
3310
3349
|
href: e.route,
|
|
3311
3350
|
onClick: O((t) => g(e), ["prevent"])
|
|
3312
|
-
}, [c("div", { class: h(["nav-item", { active: T(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8,
|
|
3351
|
+
}, [c("div", { class: h(["nav-item", { active: T(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8, Ji), c("span", Yi, w(e.title), 1)], 2)], 8, qi))), 256))])])], 2)) : (y(), s("div", {
|
|
3313
3352
|
key: 1,
|
|
3314
3353
|
class: h(["menu", { active: t.route === n.currentPath }])
|
|
3315
3354
|
}, [c("a", {
|
|
3316
3355
|
href: t.route,
|
|
3317
3356
|
onClick: O((e) => ee(t), ["prevent"])
|
|
3318
|
-
}, [c("div",
|
|
3319
|
-
c("div",
|
|
3320
|
-
c("div",
|
|
3357
|
+
}, [c("div", Zi, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Qi), c("span", null, w(t.title), 1)])])], 8, Xi)], 2))], 64))), 256))]),
|
|
3358
|
+
c("div", $i, [C(r.$slots, "user", {}, () => [
|
|
3359
|
+
c("div", ea, [n.userAvatarUrl ? (y(), s("img", {
|
|
3321
3360
|
key: 0,
|
|
3322
3361
|
src: n.userAvatarUrl,
|
|
3323
3362
|
alt: "User Avatar"
|
|
3324
|
-
}, null, 8,
|
|
3325
|
-
c("div",
|
|
3363
|
+
}, null, 8, ta)) : (y(), s("svg", na, [..._[7] ||= [u("<defs data-v-c84404ab><clipPath id=\"avatarClip\" data-v-c84404ab><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-c84404ab></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-c84404ab></circle><g clip-path=\"url(#avatarClip)\" data-v-c84404ab><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-c84404ab></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-c84404ab></path></g>", 3)]]))]),
|
|
3364
|
+
c("div", ra, [c("div", ia, [c("span", aa, w(n.userName || "ADMINISTRATOR"), 1)])]),
|
|
3326
3365
|
f(M, {
|
|
3327
3366
|
class: "logout-btn",
|
|
3328
3367
|
intent: "error",
|
|
@@ -3361,7 +3400,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3361
3400
|
}, null, 2)]))
|
|
3362
3401
|
], 34));
|
|
3363
3402
|
}
|
|
3364
|
-
}), [["__scopeId", "data-v-c84404ab"]]),
|
|
3403
|
+
}), [["__scopeId", "data-v-c84404ab"]]), sa = { class: "layout" }, ca = { class: "main-content" }, la = { class: "copyright" }, ua = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3365
3404
|
__name: "NLayout",
|
|
3366
3405
|
props: {
|
|
3367
3406
|
isShowSidebar: {
|
|
@@ -3374,8 +3413,8 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3374
3413
|
},
|
|
3375
3414
|
emits: ["logout", "navigate"],
|
|
3376
3415
|
setup(e, { emit: t }) {
|
|
3377
|
-
let n =
|
|
3378
|
-
return (t, i) => (y(), s("div",
|
|
3416
|
+
let n = Wt(), r = t;
|
|
3417
|
+
return (t, i) => (y(), s("div", sa, [e.isShowSidebar ? (y(), a(oa, {
|
|
3379
3418
|
key: 0,
|
|
3380
3419
|
isOpen: T(n).isSidebarExpanded(),
|
|
3381
3420
|
"onUpdate:isOpen": i[0] ||= (e) => T(n).toggleSidebar(),
|
|
@@ -3387,18 +3426,18 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3387
3426
|
"isOpen",
|
|
3388
3427
|
"menus",
|
|
3389
3428
|
"currentPath"
|
|
3390
|
-
])) : o("", !0), c("main",
|
|
3429
|
+
])) : o("", !0), c("main", ca, [C(t.$slots, "default", {}, void 0, !0), c("div", la, w(e.copyright), 1)])]));
|
|
3391
3430
|
}
|
|
3392
|
-
}), [["__scopeId", "data-v-42c0ab8b"]]),
|
|
3431
|
+
}), [["__scopeId", "data-v-42c0ab8b"]]), da = { class: "topbar" }, fa = { class: "topbar-left" }, pa = { class: "topbar-right" }, ma = {
|
|
3393
3432
|
key: 0,
|
|
3394
3433
|
class: "pill"
|
|
3395
|
-
},
|
|
3434
|
+
}, ha = {
|
|
3396
3435
|
key: 0,
|
|
3397
3436
|
class: "name"
|
|
3398
|
-
},
|
|
3437
|
+
}, ga = {
|
|
3399
3438
|
key: 1,
|
|
3400
3439
|
class: "separator"
|
|
3401
|
-
},
|
|
3440
|
+
}, _a = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3402
3441
|
__name: "NNavigation",
|
|
3403
3442
|
props: {
|
|
3404
3443
|
isShowSidebar: {
|
|
@@ -3423,7 +3462,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3423
3462
|
let n = t, r = () => {
|
|
3424
3463
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
3425
3464
|
};
|
|
3426
|
-
return (t, i) => (y(), s("header",
|
|
3465
|
+
return (t, i) => (y(), s("header", da, [c("div", fa, [e.isShowSidebar ? (y(), a(M, {
|
|
3427
3466
|
key: 0,
|
|
3428
3467
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
3429
3468
|
padding: "8px"
|
|
@@ -3466,9 +3505,9 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3466
3505
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
3467
3506
|
], -1)]]),
|
|
3468
3507
|
_: 1
|
|
3469
|
-
})) : o("", !0)]), c("div",
|
|
3470
|
-
e.isShowUser ? (y(), s("span",
|
|
3471
|
-
e.isShowUser && e.isShowLogoutButton ? (y(), s("div",
|
|
3508
|
+
})) : o("", !0)]), c("div", pa, [e.isShowUser || e.isShowLogoutButton ? (y(), s("div", ma, [
|
|
3509
|
+
e.isShowUser ? (y(), s("span", ha, "Nick")) : o("", !0),
|
|
3510
|
+
e.isShowUser && e.isShowLogoutButton ? (y(), s("div", ga)) : o("", !0),
|
|
3472
3511
|
e.isShowLogoutButton ? (y(), a(M, {
|
|
3473
3512
|
key: 2,
|
|
3474
3513
|
variant: "mute",
|
|
@@ -3494,10 +3533,10 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3494
3533
|
})) : o("", !0)
|
|
3495
3534
|
])) : o("", !0)])]));
|
|
3496
3535
|
}
|
|
3497
|
-
}), [["__scopeId", "data-v-f38a4beb"]]),
|
|
3536
|
+
}), [["__scopeId", "data-v-f38a4beb"]]), va = { class: "brand" }, ya = ["src", "alt"], ba = {
|
|
3498
3537
|
key: 1,
|
|
3499
3538
|
class: "icon"
|
|
3500
|
-
},
|
|
3539
|
+
}, xa = { key: 2 }, Sa = { key: 3 }, Ca = /* @__PURE__ */ j(/* @__PURE__ */ p({
|
|
3501
3540
|
__name: "NLoginLayout",
|
|
3502
3541
|
props: {
|
|
3503
3542
|
backgroundImage: { default: "" },
|
|
@@ -3510,20 +3549,20 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3510
3549
|
return (n, r) => (y(), s("div", {
|
|
3511
3550
|
class: "login-wrapper",
|
|
3512
3551
|
style: g({ "--login-bg": e.backgroundImage ? `url('${e.backgroundImage}')` : "var(--bg-gradient)" })
|
|
3513
|
-
}, [f(
|
|
3552
|
+
}, [f(ln, {
|
|
3514
3553
|
size: "lg",
|
|
3515
3554
|
radius: "xl",
|
|
3516
3555
|
class: "card"
|
|
3517
3556
|
}, {
|
|
3518
|
-
default: D(() => [c("div",
|
|
3557
|
+
default: D(() => [c("div", va, [
|
|
3519
3558
|
t.value ? (y(), s("img", {
|
|
3520
3559
|
key: 0,
|
|
3521
3560
|
class: "logo-img",
|
|
3522
3561
|
src: e.logo,
|
|
3523
3562
|
alt: e.title
|
|
3524
|
-
}, null, 8,
|
|
3525
|
-
e.title ? (y(), s("h1",
|
|
3526
|
-
e.description ? (y(), s("p",
|
|
3563
|
+
}, null, 8, ya)) : (y(), s("div", ba, w(e.logo), 1)),
|
|
3564
|
+
e.title ? (y(), s("h1", xa, w(e.title), 1)) : o("", !0),
|
|
3565
|
+
e.description ? (y(), s("p", Sa, w(e.description), 1)) : o("", !0)
|
|
3527
3566
|
]), C(n.$slots, "default", {}, void 0, !0)]),
|
|
3528
3567
|
_: 3
|
|
3529
3568
|
})], 4));
|
|
@@ -3531,7 +3570,7 @@ var Oi = { class: "cards-wrapper" }, ki = ["innerHTML"], Ai = { class: "card-bod
|
|
|
3531
3570
|
}), [["__scopeId", "data-v-f0866bc5"]]);
|
|
3532
3571
|
//#endregion
|
|
3533
3572
|
//#region src/composables/useRouteModal.ts
|
|
3534
|
-
function
|
|
3573
|
+
function wa(e) {
|
|
3535
3574
|
let t = i(() => {
|
|
3536
3575
|
let t = A();
|
|
3537
3576
|
return t ? t.currentRoute.value.matched.some((t) => t.name === e.routeName) : !1;
|
|
@@ -3555,7 +3594,7 @@ function va(e) {
|
|
|
3555
3594
|
}
|
|
3556
3595
|
//#endregion
|
|
3557
3596
|
//#region src/composables/useDisclosure.ts
|
|
3558
|
-
function
|
|
3597
|
+
function Ta() {
|
|
3559
3598
|
let e = x(!1);
|
|
3560
3599
|
function t() {
|
|
3561
3600
|
e.value = !0;
|
|
@@ -3571,37 +3610,37 @@ function ya() {
|
|
|
3571
3610
|
}
|
|
3572
3611
|
//#endregion
|
|
3573
3612
|
//#region src/index.ts
|
|
3574
|
-
var
|
|
3613
|
+
var Ea = {
|
|
3575
3614
|
NButton: M,
|
|
3576
3615
|
NBreadcrumb: ce,
|
|
3577
3616
|
NInput: me,
|
|
3578
3617
|
NTextarea: ye,
|
|
3579
3618
|
NCheckbox: H,
|
|
3580
3619
|
NSelect: Ae,
|
|
3581
|
-
NFileSelect:
|
|
3582
|
-
NForm:
|
|
3583
|
-
NList:
|
|
3584
|
-
NEmpty:
|
|
3585
|
-
NToast:
|
|
3586
|
-
NLoading:
|
|
3587
|
-
NCode:
|
|
3588
|
-
NSwitch:
|
|
3589
|
-
NTag:
|
|
3590
|
-
NDatePicker:
|
|
3591
|
-
NTooltip:
|
|
3592
|
-
NModal:
|
|
3593
|
-
NDrawer:
|
|
3594
|
-
NAlert:
|
|
3595
|
-
NTable:
|
|
3596
|
-
NLayout:
|
|
3597
|
-
NNavigation:
|
|
3598
|
-
NSidebar:
|
|
3599
|
-
NCard:
|
|
3600
|
-
NLoginLayout:
|
|
3601
|
-
},
|
|
3602
|
-
Object.entries(
|
|
3620
|
+
NFileSelect: Bt,
|
|
3621
|
+
NForm: cn,
|
|
3622
|
+
NList: qn,
|
|
3623
|
+
NEmpty: yn,
|
|
3624
|
+
NToast: nr,
|
|
3625
|
+
NLoading: An,
|
|
3626
|
+
NCode: dr,
|
|
3627
|
+
NSwitch: pr,
|
|
3628
|
+
NTag: mr,
|
|
3629
|
+
NDatePicker: yi,
|
|
3630
|
+
NTooltip: bi,
|
|
3631
|
+
NModal: Ti,
|
|
3632
|
+
NDrawer: Ai,
|
|
3633
|
+
NAlert: Hi,
|
|
3634
|
+
NTable: Un,
|
|
3635
|
+
NLayout: ua,
|
|
3636
|
+
NNavigation: _a,
|
|
3637
|
+
NSidebar: oa,
|
|
3638
|
+
NCard: ln,
|
|
3639
|
+
NLoginLayout: Ca
|
|
3640
|
+
}, Da = { install(e, t = {}) {
|
|
3641
|
+
Object.entries(Ea).forEach(([t, n]) => {
|
|
3603
3642
|
e.component(t, n);
|
|
3604
3643
|
}), t.router && ie(t.router);
|
|
3605
3644
|
} };
|
|
3606
3645
|
//#endregion
|
|
3607
|
-
export {
|
|
3646
|
+
export { Hi as NAlert, M as NButton, ln as NCard, H as NCheckbox, dr as NCode, yi as NDatePicker, Ai as NDrawer, yn as NEmpty, Bt as NFileSelect, cn as NForm, me as NInput, ua as NLayout, qn as NList, An as NLoading, Ca as NLoginLayout, Ti as NModal, _a as NNavigation, Ae as NSelect, oa as NSidebar, pr as NSwitch, Un as NTable, mr as NTag, ye as NTextarea, nr as NToast, bi as NTooltip, Da as NickLabsUI, Ni as useAlert, F as useBreadcrumb, Ta as useDisclosure, wa as useRouteModal, Wt as useSidebarManager, Xn as useToast };
|