@opengis/cms 0.0.51 → 0.0.52
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/{ArticlesPage-BcR1hbds.js → ArticlesPage-Cddv2qte.js} +5 -5
- package/dist/{BuilderPage-CK_osM89.js → BuilderPage-BgcBJcw7.js} +158 -158
- package/dist/{CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js → CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-C-k8QGA-.js} +1 -1
- package/dist/{CollectionsPage-JfmrHNR_.js → CollectionsPage-d5MLIIAG.js} +3 -3
- package/dist/{CreateForm-BMOBeP4G.js → CreateForm-B0srHu5e.js} +2 -2
- package/dist/{EditCollectionPage-DtgvKGm-.js → EditCollectionPage-NUVatLkY.js} +65 -59
- package/dist/{EmptyData-DaZt_nAm.js → EmptyData-BSW20VKP.js} +5 -5
- package/dist/{MenuAddPage-Bf48Z-ah.js → MenuAddPage-Cn3JN04F.js} +3 -3
- package/dist/{MenuItemPage-BSwUW8tv.js → MenuItemPage-B0Th9EOe.js} +3 -3
- package/dist/{MenuPage-tJZtK46W.js → MenuPage-DQpD3IXx.js} +4 -4
- package/dist/{MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.js → MonacoEditor.vue_vue_type_script_setup_true_lang-CTKNG0qR.js} +2 -2
- package/dist/{UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js → UniversalTable.vue_vue_type_script_setup_true_lang-DW6O-xoY.js} +6 -6
- package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js → UniversalTablePagination.vue_vue_type_script_setup_true_lang-DBIPBmpm.js} +4 -4
- package/dist/contentForm-C4Jp-FbQ.js +586 -0
- package/dist/{getField-C7EZs-YQ.js → getField-CKcz_b0t.js} +960 -933
- package/dist/index.js +10 -10
- package/dist/style.css +1 -1
- package/dist/{vuedraggable-CoAPPFYd.js → vuedraggable-mqqAYsch.js} +107 -107
- package/locales/en.json +6 -1
- package/locales/uk.json +4 -1
- package/package.json +4 -4
- package/server/functions/getContent.js +6 -15
- package/server/functions/getSearchData.js +2 -12
- package/server/functions/utils/mock.reply.js +56 -0
- package/server/routes/cms/controllers/getPermissions.js +15 -15
- package/server/routes/cms/controllers/listMedia.js +30 -3
- package/server/routes/cms/controllers/searchContent.js +2 -2
- package/server/routes/cms/controllers/setPermissions.js +49 -49
- package/server/templates/select/core.user_mentioned.sql +1 -1
- package/dist/contentForm-NcG15_5z.js +0 -553
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Edit as
|
|
3
|
-
import { d as
|
|
4
|
-
import { VsDrawer as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { inputs as
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { useRoute as
|
|
9
|
-
const
|
|
1
|
+
import { createElementBlock as n, openBlock as o, createStaticVNode as z, createElementVNode as t, createCommentVNode as j, toDisplayString as c, useModel as Z, Fragment as L, renderList as P, unref as y, createBlock as F, resolveDynamicComponent as Ie, resolveComponent as me, mergeModels as W, ref as A, computed as R, watch as H, createVNode as $, withCtx as U, normalizeClass as Q, onMounted as de, onUpdated as at, withModifiers as J, createTextVNode as X, mergeProps as ot, Teleport as Me, normalizeStyle as nt, withDirectives as De, vModelText as Te, renderSlot as dt, normalizeProps as it, guardReactiveProps as ut, defineAsyncComponent as Le } from "vue";
|
|
2
|
+
import { Edit as ct, Trash2 as ee, GripVertical as xe, File as vt, Folder as Ne, FileText as pt, ChevronRight as je, Download as ge, Loader2 as he, Plus as ye, Image as gt, Search as ht, ChevronDown as bt, LayoutGrid as yt, List as mt, Pencil as xt } from "lucide-vue-next";
|
|
3
|
+
import { d as Ge } from "./vuedraggable-mqqAYsch.js";
|
|
4
|
+
import { VsDrawer as Qe, notify as ie, confirm as Ze, VsModal as Ue } from "@opengis/core";
|
|
5
|
+
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { inputs as Ve, VForm as We, VsInputSelect as ft } from "@opengis/form";
|
|
7
|
+
import { useI18n as Y } from "vue-i18n";
|
|
8
|
+
import { useRoute as wt, useRouter as kt } from "vue-router";
|
|
9
|
+
const Re = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC", Pe = {
|
|
10
10
|
faq: {
|
|
11
11
|
schema: {
|
|
12
12
|
title: {
|
|
@@ -782,7 +782,7 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
},
|
|
785
|
+
}, oe = [
|
|
786
786
|
{
|
|
787
787
|
text: "reference.faq",
|
|
788
788
|
id: "faq"
|
|
@@ -859,10 +859,10 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
859
859
|
text: "reference.iframe",
|
|
860
860
|
id: "iframe"
|
|
861
861
|
}
|
|
862
|
-
],
|
|
862
|
+
], _t = { class: "h-full w-full flex flex-col" }, $t = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Ct = { class: "text-xs font-medium text-gray-600" }, At = {
|
|
863
863
|
key: 0,
|
|
864
864
|
class: "text-xs text-gray-500"
|
|
865
|
-
},
|
|
865
|
+
}, Fe = {
|
|
866
866
|
__name: "cards-skeleton",
|
|
867
867
|
props: {
|
|
868
868
|
text: {
|
|
@@ -875,18 +875,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
875
875
|
}
|
|
876
876
|
},
|
|
877
877
|
setup(e) {
|
|
878
|
-
return (l,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
e.count && e.count > 0 ? (
|
|
878
|
+
return (l, a) => (o(), n("div", _t, [
|
|
879
|
+
a[0] || (a[0] = z('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>', 1)),
|
|
880
|
+
t("div", $t, [
|
|
881
|
+
t("div", Ct, c(l.$t(e.text)), 1),
|
|
882
|
+
e.count && e.count > 0 ? (o(), n("div", At, c(e.count), 1)) : j("", !0)
|
|
883
883
|
])
|
|
884
884
|
]));
|
|
885
885
|
}
|
|
886
|
-
},
|
|
886
|
+
}, Mt = { class: "h-full w-full flex flex-col" }, jt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Vt = { class: "text-xs font-medium text-gray-600" }, Ft = {
|
|
887
887
|
key: 0,
|
|
888
888
|
class: "text-xs text-gray-500"
|
|
889
|
-
},
|
|
889
|
+
}, Bt = {
|
|
890
890
|
__name: "faq-skeleton",
|
|
891
891
|
props: {
|
|
892
892
|
text: {
|
|
@@ -899,18 +899,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
899
899
|
}
|
|
900
900
|
},
|
|
901
901
|
setup(e) {
|
|
902
|
-
return (l,
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
e.count && e.count > 0 ? (
|
|
902
|
+
return (l, a) => (o(), n("div", Mt, [
|
|
903
|
+
a[0] || (a[0] = z('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>', 2)),
|
|
904
|
+
t("div", jt, [
|
|
905
|
+
t("div", Vt, c(l.$t(e.text)), 1),
|
|
906
|
+
e.count && e.count > 0 ? (o(), n("div", Ft, c(e.count), 1)) : j("", !0)
|
|
907
907
|
])
|
|
908
908
|
]));
|
|
909
909
|
}
|
|
910
|
-
},
|
|
910
|
+
}, St = { class: "h-full w-full flex flex-col" }, qt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, zt = { class: "text-xs font-medium text-gray-600" }, Et = {
|
|
911
911
|
key: 0,
|
|
912
912
|
class: "text-xs text-gray-500"
|
|
913
|
-
},
|
|
913
|
+
}, Be = {
|
|
914
914
|
__name: "banner-skeleton",
|
|
915
915
|
props: {
|
|
916
916
|
text: {
|
|
@@ -923,18 +923,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
923
923
|
}
|
|
924
924
|
},
|
|
925
925
|
setup(e) {
|
|
926
|
-
return (l,
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
e.count && e.count > 0 ? (
|
|
926
|
+
return (l, a) => (o(), n("div", St, [
|
|
927
|
+
a[0] || (a[0] = z('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>', 1)),
|
|
928
|
+
t("div", qt, [
|
|
929
|
+
t("div", zt, c(l.$t(e.text)), 1),
|
|
930
|
+
e.count && e.count > 0 ? (o(), n("div", Et, c(e.count), 1)) : j("", !0)
|
|
931
931
|
])
|
|
932
932
|
]));
|
|
933
933
|
}
|
|
934
|
-
},
|
|
934
|
+
}, It = { class: "h-full w-full flex flex-col" }, Dt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Tt = { class: "text-xs font-medium text-gray-600" }, Lt = {
|
|
935
935
|
key: 0,
|
|
936
936
|
class: "text-xs text-gray-500"
|
|
937
|
-
},
|
|
937
|
+
}, Nt = {
|
|
938
938
|
__name: "form-skeleton",
|
|
939
939
|
props: {
|
|
940
940
|
text: {
|
|
@@ -947,18 +947,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
947
947
|
}
|
|
948
948
|
},
|
|
949
949
|
setup(e) {
|
|
950
|
-
return (l,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
e.count && e.count > 0 ? (
|
|
950
|
+
return (l, a) => (o(), n("div", It, [
|
|
951
|
+
a[0] || (a[0] = z('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>', 3)),
|
|
952
|
+
t("div", Dt, [
|
|
953
|
+
t("div", Tt, c(l.$t(e.text)), 1),
|
|
954
|
+
e.count && e.count > 0 ? (o(), n("div", Lt, c(e.count), 1)) : j("", !0)
|
|
955
955
|
])
|
|
956
956
|
]));
|
|
957
957
|
}
|
|
958
|
-
},
|
|
958
|
+
}, Gt = { class: "h-full w-full flex flex-col" }, Qt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Zt = { class: "text-xs font-medium text-gray-600" }, Ut = {
|
|
959
959
|
key: 0,
|
|
960
960
|
class: "text-xs text-gray-500"
|
|
961
|
-
},
|
|
961
|
+
}, Se = {
|
|
962
962
|
__name: "news-skeleton",
|
|
963
963
|
props: {
|
|
964
964
|
text: {
|
|
@@ -971,18 +971,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
971
971
|
}
|
|
972
972
|
},
|
|
973
973
|
setup(e) {
|
|
974
|
-
return (l,
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
e.count && e.count > 0 ? (
|
|
974
|
+
return (l, a) => (o(), n("div", Gt, [
|
|
975
|
+
a[0] || (a[0] = z('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>', 2)),
|
|
976
|
+
t("div", Qt, [
|
|
977
|
+
t("div", Zt, c(l.$t(e.text)), 1),
|
|
978
|
+
e.count && e.count > 0 ? (o(), n("div", Ut, c(e.count), 1)) : j("", !0)
|
|
979
979
|
])
|
|
980
980
|
]));
|
|
981
981
|
}
|
|
982
|
-
},
|
|
982
|
+
}, Wt = { class: "h-full w-full flex flex-col" }, Rt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Pt = { class: "text-xs font-medium text-gray-600" }, Ht = {
|
|
983
983
|
key: 0,
|
|
984
984
|
class: "text-xs text-gray-500"
|
|
985
|
-
},
|
|
985
|
+
}, Ot = {
|
|
986
986
|
__name: "team-skeleton",
|
|
987
987
|
props: {
|
|
988
988
|
text: {
|
|
@@ -995,18 +995,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
995
995
|
}
|
|
996
996
|
},
|
|
997
997
|
setup(e) {
|
|
998
|
-
return (l,
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
e.count && e.count > 0 ? (
|
|
998
|
+
return (l, a) => (o(), n("div", Wt, [
|
|
999
|
+
a[0] || (a[0] = z('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>', 1)),
|
|
1000
|
+
t("div", Rt, [
|
|
1001
|
+
t("div", Pt, c(l.$t(e.text)), 1),
|
|
1002
|
+
e.count && e.count > 0 ? (o(), n("div", Ht, c(e.count), 1)) : j("", !0)
|
|
1003
1003
|
])
|
|
1004
1004
|
]));
|
|
1005
1005
|
}
|
|
1006
|
-
},
|
|
1006
|
+
}, Yt = { class: "h-full w-full flex flex-col" }, Kt = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Jt = { class: "text-xs font-medium text-gray-600" }, Xt = {
|
|
1007
1007
|
key: 0,
|
|
1008
1008
|
class: "text-xs text-gray-500"
|
|
1009
|
-
},
|
|
1009
|
+
}, qe = {
|
|
1010
1010
|
__name: "usefulLinks-skeleton",
|
|
1011
1011
|
props: {
|
|
1012
1012
|
text: {
|
|
@@ -1019,18 +1019,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1019
1019
|
}
|
|
1020
1020
|
},
|
|
1021
1021
|
setup(e) {
|
|
1022
|
-
return (l,
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
e.count && e.count > 0 ? (
|
|
1022
|
+
return (l, a) => (o(), n("div", Yt, [
|
|
1023
|
+
a[0] || (a[0] = z('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>', 2)),
|
|
1024
|
+
t("div", Kt, [
|
|
1025
|
+
t("div", Jt, c(l.$t(e.text)), 1),
|
|
1026
|
+
e.count && e.count > 0 ? (o(), n("div", Xt, c(e.count), 1)) : j("", !0)
|
|
1027
1027
|
])
|
|
1028
1028
|
]));
|
|
1029
1029
|
}
|
|
1030
|
-
},
|
|
1030
|
+
}, er = { class: "h-full w-full flex flex-col" }, tr = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, rr = { class: "text-xs font-medium text-gray-600" }, lr = {
|
|
1031
1031
|
key: 0,
|
|
1032
1032
|
class: "text-xs text-gray-500"
|
|
1033
|
-
},
|
|
1033
|
+
}, sr = {
|
|
1034
1034
|
__name: "video-skeleton",
|
|
1035
1035
|
props: {
|
|
1036
1036
|
text: {
|
|
@@ -1043,18 +1043,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1043
1043
|
}
|
|
1044
1044
|
},
|
|
1045
1045
|
setup(e) {
|
|
1046
|
-
return (l,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
e.count && e.count > 0 ? (
|
|
1046
|
+
return (l, a) => (o(), n("div", er, [
|
|
1047
|
+
a[0] || (a[0] = z('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>', 2)),
|
|
1048
|
+
t("div", tr, [
|
|
1049
|
+
t("div", rr, c(l.$t(e.text)), 1),
|
|
1050
|
+
e.count && e.count > 0 ? (o(), n("div", lr, c(e.count), 1)) : j("", !0)
|
|
1051
1051
|
])
|
|
1052
1052
|
]));
|
|
1053
1053
|
}
|
|
1054
|
-
},
|
|
1054
|
+
}, ar = { class: "h-full w-full flex flex-col" }, or = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, nr = { class: "text-xs font-medium text-gray-600" }, dr = {
|
|
1055
1055
|
key: 0,
|
|
1056
1056
|
class: "text-xs text-gray-500"
|
|
1057
|
-
},
|
|
1057
|
+
}, ir = {
|
|
1058
1058
|
__name: "about-skeleton",
|
|
1059
1059
|
props: {
|
|
1060
1060
|
text: {
|
|
@@ -1067,18 +1067,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1067
1067
|
}
|
|
1068
1068
|
},
|
|
1069
1069
|
setup(e) {
|
|
1070
|
-
return (l,
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
e.count && e.count > 0 ? (
|
|
1070
|
+
return (l, a) => (o(), n("div", ar, [
|
|
1071
|
+
a[0] || (a[0] = z('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>', 1)),
|
|
1072
|
+
t("div", or, [
|
|
1073
|
+
t("div", nr, c(l.$t(e.text)), 1),
|
|
1074
|
+
e.count && e.count > 0 ? (o(), n("div", dr, c(e.count), 1)) : j("", !0)
|
|
1075
1075
|
])
|
|
1076
1076
|
]));
|
|
1077
1077
|
}
|
|
1078
|
-
},
|
|
1078
|
+
}, ur = { class: "h-full w-full flex flex-col" }, cr = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, vr = { class: "text-xs font-medium text-gray-600" }, pr = {
|
|
1079
1079
|
key: 0,
|
|
1080
1080
|
class: "text-xs text-gray-500"
|
|
1081
|
-
},
|
|
1081
|
+
}, gr = {
|
|
1082
1082
|
__name: "slider-skeleton",
|
|
1083
1083
|
props: {
|
|
1084
1084
|
text: {
|
|
@@ -1091,18 +1091,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1091
1091
|
}
|
|
1092
1092
|
},
|
|
1093
1093
|
setup(e) {
|
|
1094
|
-
return (l,
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
e.count && e.count > 0 ? (
|
|
1094
|
+
return (l, a) => (o(), n("div", ur, [
|
|
1095
|
+
a[0] || (a[0] = z('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>', 4)),
|
|
1096
|
+
t("div", cr, [
|
|
1097
|
+
t("div", vr, c(l.$t(e.text)), 1),
|
|
1098
|
+
e.count && e.count > 0 ? (o(), n("div", pr, c(e.count), 1)) : j("", !0)
|
|
1099
1099
|
])
|
|
1100
1100
|
]));
|
|
1101
1101
|
}
|
|
1102
|
-
},
|
|
1102
|
+
}, hr = { class: "h-full flex flex-col" }, br = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, yr = { class: "text-xs font-medium text-gray-600" }, mr = {
|
|
1103
1103
|
key: 0,
|
|
1104
1104
|
class: "text-xs text-gray-500"
|
|
1105
|
-
},
|
|
1105
|
+
}, xr = {
|
|
1106
1106
|
__name: "infoLine-skeleton",
|
|
1107
1107
|
props: {
|
|
1108
1108
|
text: {
|
|
@@ -1115,18 +1115,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1115
1115
|
}
|
|
1116
1116
|
},
|
|
1117
1117
|
setup(e) {
|
|
1118
|
-
return (l,
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
e.count && e.count > 0 ? (
|
|
1118
|
+
return (l, a) => (o(), n("div", hr, [
|
|
1119
|
+
a[0] || (a[0] = z('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>', 1)),
|
|
1120
|
+
t("div", br, [
|
|
1121
|
+
t("div", yr, c(l.$t(e.text)), 1),
|
|
1122
|
+
e.count && e.count > 0 ? (o(), n("div", mr, c(e.count), 1)) : j("", !0)
|
|
1123
1123
|
])
|
|
1124
1124
|
]));
|
|
1125
1125
|
}
|
|
1126
|
-
},
|
|
1126
|
+
}, fr = { class: "h-full flex flex-col" }, wr = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, kr = { class: "text-xs font-medium text-gray-600" }, _r = {
|
|
1127
1127
|
key: 0,
|
|
1128
1128
|
class: "text-xs text-gray-500"
|
|
1129
|
-
},
|
|
1129
|
+
}, $r = {
|
|
1130
1130
|
__name: "tabs-skeleton",
|
|
1131
1131
|
props: {
|
|
1132
1132
|
text: {
|
|
@@ -1139,18 +1139,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1139
1139
|
}
|
|
1140
1140
|
},
|
|
1141
1141
|
setup(e) {
|
|
1142
|
-
return (l,
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
e.count && e.count > 0 ? (
|
|
1142
|
+
return (l, a) => (o(), n("div", fr, [
|
|
1143
|
+
a[0] || (a[0] = z('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>', 3)),
|
|
1144
|
+
t("div", wr, [
|
|
1145
|
+
t("div", kr, c(l.$t(e.text)), 1),
|
|
1146
|
+
e.count && e.count > 0 ? (o(), n("div", _r, c(e.count), 1)) : j("", !0)
|
|
1147
1147
|
])
|
|
1148
1148
|
]));
|
|
1149
1149
|
}
|
|
1150
|
-
},
|
|
1150
|
+
}, Cr = { class: "h-full flex flex-col" }, Ar = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Mr = { class: "text-xs font-medium text-gray-600" }, jr = {
|
|
1151
1151
|
key: 0,
|
|
1152
1152
|
class: "text-xs text-gray-500"
|
|
1153
|
-
},
|
|
1153
|
+
}, ze = {
|
|
1154
1154
|
__name: "documents-skeleton",
|
|
1155
1155
|
props: {
|
|
1156
1156
|
text: {
|
|
@@ -1163,18 +1163,18 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1163
1163
|
}
|
|
1164
1164
|
},
|
|
1165
1165
|
setup(e) {
|
|
1166
|
-
return (l,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
e.count && e.count > 0 ? (
|
|
1166
|
+
return (l, a) => (o(), n("div", Cr, [
|
|
1167
|
+
a[0] || (a[0] = z('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>', 2)),
|
|
1168
|
+
t("div", Ar, [
|
|
1169
|
+
t("div", Mr, c(l.$t(e.text)), 1),
|
|
1170
|
+
e.count && e.count > 0 ? (o(), n("div", jr, c(e.count), 1)) : j("", !0)
|
|
1171
1171
|
])
|
|
1172
1172
|
]));
|
|
1173
1173
|
}
|
|
1174
|
-
},
|
|
1174
|
+
}, Vr = { class: "h-full flex flex-col" }, Fr = { class: "flex justify-between items-center mt-2 pt-2 border-t border-gray-300" }, Br = { class: "text-xs font-medium text-gray-600" }, Sr = {
|
|
1175
1175
|
key: 0,
|
|
1176
1176
|
class: "text-xs text-gray-500"
|
|
1177
|
-
},
|
|
1177
|
+
}, qr = {
|
|
1178
1178
|
__name: "body-skeleton",
|
|
1179
1179
|
props: {
|
|
1180
1180
|
text: {
|
|
@@ -1187,35 +1187,35 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1187
1187
|
}
|
|
1188
1188
|
},
|
|
1189
1189
|
setup(e) {
|
|
1190
|
-
return (l,
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
e.count && e.count > 0 ? (
|
|
1190
|
+
return (l, a) => (o(), n("div", Vr, [
|
|
1191
|
+
a[0] || (a[0] = z('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>', 1)),
|
|
1192
|
+
t("div", Fr, [
|
|
1193
|
+
t("div", Br, c(l.$t(e.text)), 1),
|
|
1194
|
+
e.count && e.count > 0 ? (o(), n("div", Sr, c(e.count), 1)) : j("", !0)
|
|
1195
1195
|
])
|
|
1196
1196
|
]));
|
|
1197
1197
|
}
|
|
1198
|
-
},
|
|
1199
|
-
faq:
|
|
1200
|
-
banner:
|
|
1201
|
-
slider:
|
|
1202
|
-
video:
|
|
1203
|
-
about:
|
|
1204
|
-
cards:
|
|
1205
|
-
usefulLinks:
|
|
1206
|
-
team:
|
|
1207
|
-
news:
|
|
1208
|
-
form:
|
|
1209
|
-
tabs:
|
|
1210
|
-
vertical_tabs:
|
|
1211
|
-
documents:
|
|
1212
|
-
infoLine:
|
|
1213
|
-
body:
|
|
1214
|
-
photoGrid:
|
|
1215
|
-
interested:
|
|
1216
|
-
contact:
|
|
1217
|
-
iframe:
|
|
1218
|
-
},
|
|
1198
|
+
}, ne = {
|
|
1199
|
+
faq: Bt,
|
|
1200
|
+
banner: Be,
|
|
1201
|
+
slider: gr,
|
|
1202
|
+
video: sr,
|
|
1203
|
+
about: ir,
|
|
1204
|
+
cards: Fe,
|
|
1205
|
+
usefulLinks: qe,
|
|
1206
|
+
team: Ot,
|
|
1207
|
+
news: Se,
|
|
1208
|
+
form: Nt,
|
|
1209
|
+
tabs: $r,
|
|
1210
|
+
vertical_tabs: Se,
|
|
1211
|
+
documents: ze,
|
|
1212
|
+
infoLine: xr,
|
|
1213
|
+
body: qr,
|
|
1214
|
+
photoGrid: Fe,
|
|
1215
|
+
interested: qe,
|
|
1216
|
+
contact: ze,
|
|
1217
|
+
iframe: Be
|
|
1218
|
+
}, zr = { class: "grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4" }, Er = ["onClick"], Ir = { class: "wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer" }, Dr = ["src"], Tr = {
|
|
1219
1219
|
__name: "vs-form-reference-choce",
|
|
1220
1220
|
props: {
|
|
1221
1221
|
modelValue: {
|
|
@@ -1226,36 +1226,36 @@ const Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1226
1226
|
},
|
|
1227
1227
|
emits: ["update:modelValue"],
|
|
1228
1228
|
setup(e) {
|
|
1229
|
-
const l =
|
|
1230
|
-
return (
|
|
1231
|
-
(
|
|
1229
|
+
const l = Z(e, "modelValue");
|
|
1230
|
+
return (a, b) => (o(), n("div", zr, [
|
|
1231
|
+
(o(!0), n(L, null, P(y(oe), (u) => (o(), n("div", {
|
|
1232
1232
|
key: u.id,
|
|
1233
|
-
onClick: (
|
|
1233
|
+
onClick: (d) => l.value = u.id,
|
|
1234
1234
|
class: "relative"
|
|
1235
1235
|
}, [
|
|
1236
|
-
|
|
1237
|
-
y(
|
|
1236
|
+
t("div", Ir, [
|
|
1237
|
+
y(ne)[u.id] ? (o(), F(Ie(y(ne)[u.id]), {
|
|
1238
1238
|
key: 0,
|
|
1239
1239
|
text: u == null ? void 0 : u.text,
|
|
1240
1240
|
count: (u == null ? void 0 : u.data) || 0
|
|
1241
|
-
}, null, 8, ["text", "count"])) : (
|
|
1241
|
+
}, null, 8, ["text", "count"])) : (o(), n("img", {
|
|
1242
1242
|
key: 1,
|
|
1243
|
-
src: y(
|
|
1243
|
+
src: y(Re),
|
|
1244
1244
|
alt: "Team collaboration",
|
|
1245
1245
|
class: "w-full h-full object-cover"
|
|
1246
|
-
}, null, 8,
|
|
1246
|
+
}, null, 8, Dr))
|
|
1247
1247
|
])
|
|
1248
|
-
], 8,
|
|
1248
|
+
], 8, Er))), 128))
|
|
1249
1249
|
]));
|
|
1250
1250
|
}
|
|
1251
|
-
},
|
|
1252
|
-
function
|
|
1253
|
-
const
|
|
1254
|
-
return
|
|
1251
|
+
}, Lr = {};
|
|
1252
|
+
function Nr(e, l, a, b, u, d) {
|
|
1253
|
+
const x = me("vs-richtext");
|
|
1254
|
+
return o(), F(x, { class: "w-full" });
|
|
1255
1255
|
}
|
|
1256
|
-
const
|
|
1256
|
+
const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4" }, Zr = { class: "text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full" }, Ur = { class: "flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700" }, Wr = {
|
|
1257
1257
|
__name: "vs-form-reference-add",
|
|
1258
|
-
props: /* @__PURE__ */
|
|
1258
|
+
props: /* @__PURE__ */ W({
|
|
1259
1259
|
title: {
|
|
1260
1260
|
type: String,
|
|
1261
1261
|
required: !0
|
|
@@ -1269,14 +1269,14 @@ const Lr = /* @__PURE__ */ ee(Dr, [["render", Tr]]), Nr = { class: "flex gap-4"
|
|
|
1269
1269
|
}),
|
|
1270
1270
|
emits: ["update:modelValue"],
|
|
1271
1271
|
setup(e) {
|
|
1272
|
-
const { t: l } =
|
|
1273
|
-
|
|
1274
|
-
const
|
|
1272
|
+
const { t: l } = Y();
|
|
1273
|
+
Ve["vs-input-reference"] = Xr, Ve["vs-input-tiptap-editor"] = Gr;
|
|
1274
|
+
const a = Z(e, "modelValue"), b = A(!1), u = A({}), d = A(null), x = A({}), m = R(() => {
|
|
1275
1275
|
var p;
|
|
1276
|
-
return ((p =
|
|
1277
|
-
}),
|
|
1276
|
+
return ((p = Pe[d.value]) == null ? void 0 : p.schema) || null;
|
|
1277
|
+
}), f = async () => {
|
|
1278
1278
|
if (await u.value.validate()) {
|
|
1279
|
-
|
|
1279
|
+
ie({
|
|
1280
1280
|
type: "warning",
|
|
1281
1281
|
title: l("cms.common.actions.warning"),
|
|
1282
1282
|
message: l("cms.builder.editFieldFailed")
|
|
@@ -1284,73 +1284,73 @@ const Lr = /* @__PURE__ */ ee(Dr, [["render", Tr]]), Nr = { class: "flex gap-4"
|
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
1286
|
try {
|
|
1287
|
-
Object.keys(
|
|
1288
|
-
...
|
|
1287
|
+
Object.keys(x.value).length !== 0 && (a.value = [
|
|
1288
|
+
...a.value || [],
|
|
1289
1289
|
{
|
|
1290
|
-
...
|
|
1290
|
+
...x.value,
|
|
1291
1291
|
id: Math.random().toString(36).substring(2, 15),
|
|
1292
|
-
reference_type:
|
|
1292
|
+
reference_type: d.value
|
|
1293
1293
|
}
|
|
1294
|
-
]),
|
|
1295
|
-
} catch (
|
|
1296
|
-
console.log(
|
|
1294
|
+
]), b.value = !1, d.value = null, x.value = {};
|
|
1295
|
+
} catch (r) {
|
|
1296
|
+
console.log(r);
|
|
1297
1297
|
}
|
|
1298
1298
|
};
|
|
1299
|
-
return
|
|
1300
|
-
|
|
1301
|
-
}), (p,
|
|
1302
|
-
|
|
1299
|
+
return H(b, () => {
|
|
1300
|
+
b.value || (d.value = null, x.value = {});
|
|
1301
|
+
}), (p, r) => (o(), n("div", null, [
|
|
1302
|
+
t("button", {
|
|
1303
1303
|
type: "button",
|
|
1304
1304
|
class: "inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",
|
|
1305
|
-
onClick:
|
|
1306
|
-
},
|
|
1307
|
-
|
|
1308
|
-
visible:
|
|
1309
|
-
"onUpdate:visible":
|
|
1305
|
+
onClick: r[0] || (r[0] = (i) => b.value = !b.value)
|
|
1306
|
+
}, c(p.$t("cms.builder.create")), 1),
|
|
1307
|
+
$(y(Qe), {
|
|
1308
|
+
visible: b.value,
|
|
1309
|
+
"onUpdate:visible": r[6] || (r[6] = (i) => b.value = i),
|
|
1310
1310
|
position: "right",
|
|
1311
1311
|
closeClickBackdrop: !1,
|
|
1312
|
-
onClose:
|
|
1313
|
-
title:
|
|
1312
|
+
onClose: r[7] || (r[7] = (i) => b.value = !1),
|
|
1313
|
+
title: d.value ? p.$t("cms.builder." + d.value) : p.$t("cms.builder.selectType"),
|
|
1314
1314
|
size: "50vw"
|
|
1315
1315
|
}, {
|
|
1316
|
-
footer:
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
onClick:
|
|
1316
|
+
footer: U(() => [
|
|
1317
|
+
t("div", Ur, [
|
|
1318
|
+
t("button", {
|
|
1319
|
+
onClick: r[5] || (r[5] = (i) => b.value = !1),
|
|
1320
1320
|
class: "inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1323
|
-
onClick:
|
|
1321
|
+
}, c(p.$t("cms.builder.cancel")), 1),
|
|
1322
|
+
t("button", {
|
|
1323
|
+
onClick: f,
|
|
1324
1324
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
1325
|
-
},
|
|
1325
|
+
}, c(p.$t("cms.builder.create")), 1)
|
|
1326
1326
|
])
|
|
1327
1327
|
]),
|
|
1328
|
-
default:
|
|
1329
|
-
var
|
|
1328
|
+
default: U(() => {
|
|
1329
|
+
var i;
|
|
1330
1330
|
return [
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1331
|
+
d.value ? (o(), n(L, { key: 1 }, [
|
|
1332
|
+
t("div", Qr, [
|
|
1333
|
+
t("div", Zr, [
|
|
1334
|
+
t("span", null, c((i = y(oe).find((M) => M.id === d.value)) == null ? void 0 : i.text), 1)
|
|
1335
1335
|
]),
|
|
1336
|
-
|
|
1336
|
+
t("button", {
|
|
1337
1337
|
class: "py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",
|
|
1338
|
-
onClick:
|
|
1339
|
-
},
|
|
1338
|
+
onClick: r[2] || (r[2] = (M) => d.value = null)
|
|
1339
|
+
}, c(p.$t("cms.builder.changeType")), 1)
|
|
1340
1340
|
]),
|
|
1341
|
-
|
|
1342
|
-
key:
|
|
1343
|
-
schema:
|
|
1344
|
-
modelValue:
|
|
1345
|
-
"onUpdate:modelValue":
|
|
1341
|
+
m.value ? (o(), F(y(We), {
|
|
1342
|
+
key: d.value,
|
|
1343
|
+
schema: m.value,
|
|
1344
|
+
modelValue: x.value,
|
|
1345
|
+
"onUpdate:modelValue": r[3] || (r[3] = (M) => x.value = M),
|
|
1346
1346
|
form: u.value,
|
|
1347
|
-
"onUpdate:form":
|
|
1348
|
-
}, null, 8, ["schema", "modelValue", "form"])) :
|
|
1349
|
-
], 64)) : (
|
|
1347
|
+
"onUpdate:form": r[4] || (r[4] = (M) => u.value = M)
|
|
1348
|
+
}, null, 8, ["schema", "modelValue", "form"])) : j("", !0)
|
|
1349
|
+
], 64)) : (o(), F(Tr, {
|
|
1350
1350
|
key: 0,
|
|
1351
|
-
modelValue:
|
|
1352
|
-
"onUpdate:modelValue":
|
|
1353
|
-
options: y(
|
|
1351
|
+
modelValue: d.value,
|
|
1352
|
+
"onUpdate:modelValue": r[1] || (r[1] = (M) => d.value = M),
|
|
1353
|
+
options: y(oe)
|
|
1354
1354
|
}, null, 8, ["modelValue", "options"]))
|
|
1355
1355
|
];
|
|
1356
1356
|
}),
|
|
@@ -1358,9 +1358,9 @@ const Lr = /* @__PURE__ */ ee(Dr, [["render", Tr]]), Nr = { class: "flex gap-4"
|
|
|
1358
1358
|
}, 8, ["visible", "title"])
|
|
1359
1359
|
]));
|
|
1360
1360
|
}
|
|
1361
|
-
},
|
|
1361
|
+
}, Rr = { class: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10" }, Pr = { class: "flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700" }, Hr = {
|
|
1362
1362
|
__name: "vs-form-reference-controls",
|
|
1363
|
-
props: /* @__PURE__ */
|
|
1363
|
+
props: /* @__PURE__ */ W({
|
|
1364
1364
|
title: {
|
|
1365
1365
|
type: String,
|
|
1366
1366
|
required: !0
|
|
@@ -1379,81 +1379,81 @@ const Lr = /* @__PURE__ */ ee(Dr, [["render", Tr]]), Nr = { class: "flex gap-4"
|
|
|
1379
1379
|
}),
|
|
1380
1380
|
emits: ["update:modelValue", "update:parent"],
|
|
1381
1381
|
setup(e) {
|
|
1382
|
-
const { t: l } =
|
|
1382
|
+
const { t: l } = Y(), a = Z(e, "modelValue"), b = Z(e, "parent"), u = A(!1), d = A({}), x = A({}), m = R(() => {
|
|
1383
1383
|
var p;
|
|
1384
|
-
return ((p =
|
|
1384
|
+
return ((p = Pe[a.value.reference_type]) == null ? void 0 : p.schema) || null;
|
|
1385
1385
|
});
|
|
1386
|
-
|
|
1387
|
-
p && (
|
|
1386
|
+
H(u, (p) => {
|
|
1387
|
+
p && (d.value = { ...a.value });
|
|
1388
1388
|
});
|
|
1389
|
-
const
|
|
1389
|
+
const f = async () => {
|
|
1390
1390
|
try {
|
|
1391
|
-
if (await
|
|
1392
|
-
|
|
1391
|
+
if (await x.value.validate()) {
|
|
1392
|
+
ie({
|
|
1393
1393
|
type: "warning",
|
|
1394
1394
|
title: l("cms.common.actions.warning"),
|
|
1395
1395
|
message: l("cms.builder.editFieldFailed")
|
|
1396
1396
|
});
|
|
1397
1397
|
return;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
a.value = { ...d.value }, u.value = !1;
|
|
1400
1400
|
} catch (p) {
|
|
1401
1401
|
console.log(p);
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
|
-
return (p,
|
|
1405
|
-
|
|
1406
|
-
onClick:
|
|
1404
|
+
return (p, r) => (o(), n("div", Rr, [
|
|
1405
|
+
t("button", {
|
|
1406
|
+
onClick: r[0] || (r[0] = (i) => u.value = !u.value),
|
|
1407
1407
|
class: "p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"
|
|
1408
1408
|
}, [
|
|
1409
|
-
|
|
1409
|
+
$(y(ct), { class: "h-4 w-4 text-gray-400" })
|
|
1410
1410
|
]),
|
|
1411
|
-
|
|
1412
|
-
onClick:
|
|
1411
|
+
t("button", {
|
|
1412
|
+
onClick: r[1] || (r[1] = (i) => b.value = b.value.filter((M) => M.id !== a.value.id)),
|
|
1413
1413
|
class: "p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"
|
|
1414
1414
|
}, [
|
|
1415
|
-
|
|
1415
|
+
$(y(ee), { class: "h-4 w-4 text-red-500" })
|
|
1416
1416
|
]),
|
|
1417
|
-
|
|
1417
|
+
$(y(Qe), {
|
|
1418
1418
|
visible: u.value,
|
|
1419
|
-
"onUpdate:visible":
|
|
1420
|
-
onClose:
|
|
1419
|
+
"onUpdate:visible": r[5] || (r[5] = (i) => u.value = i),
|
|
1420
|
+
onClose: r[6] || (r[6] = (i) => u.value = !1),
|
|
1421
1421
|
title: e.title,
|
|
1422
1422
|
width: "50vw"
|
|
1423
1423
|
}, {
|
|
1424
|
-
footer:
|
|
1425
|
-
|
|
1426
|
-
|
|
1424
|
+
footer: U(() => [
|
|
1425
|
+
t("div", Pr, [
|
|
1426
|
+
t("button", {
|
|
1427
1427
|
class: "inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",
|
|
1428
|
-
onClick:
|
|
1429
|
-
},
|
|
1430
|
-
|
|
1431
|
-
onClick:
|
|
1428
|
+
onClick: r[4] || (r[4] = (i) => u.value = !1)
|
|
1429
|
+
}, c(p.$t("cms.common.actions.cancel")), 1),
|
|
1430
|
+
t("button", {
|
|
1431
|
+
onClick: f,
|
|
1432
1432
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
1433
|
-
},
|
|
1433
|
+
}, c(p.$t("cms.common.actions.save")), 1)
|
|
1434
1434
|
])
|
|
1435
1435
|
]),
|
|
1436
|
-
default:
|
|
1437
|
-
|
|
1436
|
+
default: U(() => [
|
|
1437
|
+
m.value ? (o(), F(y(We), {
|
|
1438
1438
|
key: 0,
|
|
1439
|
-
form:
|
|
1440
|
-
"onUpdate:form":
|
|
1441
|
-
schema:
|
|
1442
|
-
modelValue:
|
|
1443
|
-
"onUpdate:modelValue":
|
|
1439
|
+
form: x.value,
|
|
1440
|
+
"onUpdate:form": r[2] || (r[2] = (i) => x.value = i),
|
|
1441
|
+
schema: m.value,
|
|
1442
|
+
modelValue: d.value,
|
|
1443
|
+
"onUpdate:modelValue": r[3] || (r[3] = (i) => d.value = i),
|
|
1444
1444
|
class: "-mr-[10px] ml-[10px] mt-[10px]"
|
|
1445
|
-
}, null, 8, ["form", "schema", "modelValue"])) :
|
|
1445
|
+
}, null, 8, ["form", "schema", "modelValue"])) : j("", !0)
|
|
1446
1446
|
]),
|
|
1447
1447
|
_: 1
|
|
1448
1448
|
}, 8, ["visible", "title"])
|
|
1449
1449
|
]));
|
|
1450
1450
|
}
|
|
1451
|
-
},
|
|
1451
|
+
}, Or = { class: "w-full" }, Yr = {
|
|
1452
1452
|
key: 0,
|
|
1453
1453
|
class: "relative"
|
|
1454
|
-
},
|
|
1454
|
+
}, Kr = { class: "group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab" }, Jr = ["src"], Xr = {
|
|
1455
1455
|
__name: "vs-form-reference-list",
|
|
1456
|
-
props: /* @__PURE__ */
|
|
1456
|
+
props: /* @__PURE__ */ W({
|
|
1457
1457
|
reference_type: {
|
|
1458
1458
|
type: String,
|
|
1459
1459
|
required: !0
|
|
@@ -1471,83 +1471,83 @@ const Lr = /* @__PURE__ */ ee(Dr, [["render", Tr]]), Nr = { class: "flex gap-4"
|
|
|
1471
1471
|
emits: ["update:modelValue"],
|
|
1472
1472
|
setup(e) {
|
|
1473
1473
|
const l = (u) => {
|
|
1474
|
-
var
|
|
1475
|
-
return (
|
|
1476
|
-
},
|
|
1474
|
+
var d;
|
|
1475
|
+
return (d = oe.find((x) => x.id === u)) == null ? void 0 : d.text;
|
|
1476
|
+
}, a = Z(e, "modelValue"), b = R({
|
|
1477
1477
|
get() {
|
|
1478
|
-
const u =
|
|
1478
|
+
const u = a.value;
|
|
1479
1479
|
return u == null ? [] : Array.isArray(u) ? u : [];
|
|
1480
1480
|
},
|
|
1481
1481
|
set(u) {
|
|
1482
|
-
|
|
1482
|
+
a.value = Array.isArray(u) ? u : [];
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
|
-
return
|
|
1486
|
-
u != null && !Array.isArray(u) && (
|
|
1487
|
-
}, { immediate: !0 }), (u,
|
|
1488
|
-
var
|
|
1489
|
-
return
|
|
1490
|
-
((
|
|
1485
|
+
return H(a, (u) => {
|
|
1486
|
+
u != null && !Array.isArray(u) && (a.value = []);
|
|
1487
|
+
}, { immediate: !0 }), (u, d) => {
|
|
1488
|
+
var x;
|
|
1489
|
+
return o(), n("div", Or, [
|
|
1490
|
+
((x = b.value) == null ? void 0 : x.length) > 0 ? (o(), F(y(Ge), {
|
|
1491
1491
|
key: 0,
|
|
1492
|
-
modelValue:
|
|
1493
|
-
"onUpdate:modelValue":
|
|
1492
|
+
modelValue: b.value,
|
|
1493
|
+
"onUpdate:modelValue": d[1] || (d[1] = (m) => b.value = m),
|
|
1494
1494
|
"item-key": "id",
|
|
1495
1495
|
handle: ".drag-handle",
|
|
1496
1496
|
class: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"
|
|
1497
1497
|
}, {
|
|
1498
|
-
item:
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
(
|
|
1502
|
-
key:
|
|
1498
|
+
item: U(({ element: m, index: f }) => [
|
|
1499
|
+
m != null && m.reference_type ? (o(), n("div", Yr, [
|
|
1500
|
+
t("div", Kr, [
|
|
1501
|
+
(o(), n("div", {
|
|
1502
|
+
key: m.id,
|
|
1503
1503
|
class: "absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"
|
|
1504
1504
|
}, [
|
|
1505
|
-
|
|
1505
|
+
$(y(xe), { class: "h-4 w-4 text-gray-400" })
|
|
1506
1506
|
])),
|
|
1507
|
-
|
|
1508
|
-
title: u.$t("cms.builder." + (
|
|
1509
|
-
modelValue:
|
|
1510
|
-
"onUpdate:modelValue": (p) =>
|
|
1511
|
-
parent:
|
|
1512
|
-
"onUpdate:parent":
|
|
1507
|
+
$(Hr, {
|
|
1508
|
+
title: u.$t("cms.builder." + (m == null ? void 0 : m.reference_type)),
|
|
1509
|
+
modelValue: b.value[f],
|
|
1510
|
+
"onUpdate:modelValue": (p) => b.value[f] = p,
|
|
1511
|
+
parent: b.value,
|
|
1512
|
+
"onUpdate:parent": d[0] || (d[0] = (p) => b.value = p)
|
|
1513
1513
|
}, null, 8, ["title", "modelValue", "onUpdate:modelValue", "parent"]),
|
|
1514
|
-
y(
|
|
1514
|
+
y(ne)[m == null ? void 0 : m.reference_type] ? (o(), F(Ie(y(ne)[m == null ? void 0 : m.reference_type]), {
|
|
1515
1515
|
key: 0,
|
|
1516
|
-
index:
|
|
1517
|
-
text: l(
|
|
1518
|
-
count: Array.isArray(
|
|
1519
|
-
}, null, 8, ["index", "text", "count"])) : (
|
|
1516
|
+
index: f,
|
|
1517
|
+
text: l(m == null ? void 0 : m.reference_type),
|
|
1518
|
+
count: Array.isArray(m == null ? void 0 : m.data) ? m.data.length : 0
|
|
1519
|
+
}, null, 8, ["index", "text", "count"])) : (o(), n("img", {
|
|
1520
1520
|
key: 1,
|
|
1521
|
-
src: y(
|
|
1521
|
+
src: y(Re),
|
|
1522
1522
|
alt: "Team collaboration",
|
|
1523
1523
|
class: "w-full h-full object-cover"
|
|
1524
|
-
}, null, 8,
|
|
1524
|
+
}, null, 8, Jr))
|
|
1525
1525
|
])
|
|
1526
|
-
])) :
|
|
1526
|
+
])) : j("", !0)
|
|
1527
1527
|
]),
|
|
1528
1528
|
_: 1
|
|
1529
|
-
}, 8, ["modelValue"])) :
|
|
1530
|
-
|
|
1529
|
+
}, 8, ["modelValue"])) : j("", !0),
|
|
1530
|
+
$(Wr, {
|
|
1531
1531
|
class: "mt-4",
|
|
1532
1532
|
title: e.title,
|
|
1533
|
-
modelValue:
|
|
1534
|
-
"onUpdate:modelValue":
|
|
1533
|
+
modelValue: b.value,
|
|
1534
|
+
"onUpdate:modelValue": d[2] || (d[2] = (m) => b.value = m)
|
|
1535
1535
|
}, null, 8, ["title", "modelValue"])
|
|
1536
1536
|
]);
|
|
1537
1537
|
};
|
|
1538
1538
|
}
|
|
1539
1539
|
};
|
|
1540
|
-
function
|
|
1540
|
+
function He(e) {
|
|
1541
1541
|
if (e === 0)
|
|
1542
1542
|
return "0 Bytes";
|
|
1543
|
-
const l = 1024,
|
|
1544
|
-
return Number.parseFloat((e / Math.pow(l,
|
|
1543
|
+
const l = 1024, a = ["Bytes", "KB", "MB", "GB", "TB"], b = Math.floor(Math.log(e) / Math.log(l));
|
|
1544
|
+
return Number.parseFloat((e / Math.pow(l, b)).toFixed(2)) + " " + a[b];
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function el(e) {
|
|
1547
1547
|
const l = new Date(e);
|
|
1548
1548
|
return isNaN(l.getTime()) ? "" : l.toISOString().slice(0, 10);
|
|
1549
1549
|
}
|
|
1550
|
-
const
|
|
1550
|
+
const tl = {
|
|
1551
1551
|
__name: "TypeTag",
|
|
1552
1552
|
props: {
|
|
1553
1553
|
type: {
|
|
@@ -1561,17 +1561,17 @@ const Xr = {
|
|
|
1561
1561
|
["image", "bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],
|
|
1562
1562
|
["video", "bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]
|
|
1563
1563
|
]);
|
|
1564
|
-
return (
|
|
1565
|
-
class:
|
|
1566
|
-
},
|
|
1564
|
+
return (a, b) => (o(), n("div", {
|
|
1565
|
+
class: Q(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm", y(l).get(e.type)])
|
|
1566
|
+
}, c(e.type), 3));
|
|
1567
1567
|
}
|
|
1568
|
-
},
|
|
1568
|
+
}, rl = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5" }, ll = {
|
|
1569
1569
|
key: 0,
|
|
1570
1570
|
class: "flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"
|
|
1571
|
-
},
|
|
1571
|
+
}, sl = ["onClick"], al = ["onClick"], ol = { class: "truncate font-medium text-slate-800 dark:text-slate-100 mb-2" }, nl = { class: "text-sm text-slate-500 dark:text-slate-400" }, dl = ["onClick"], il = { class: "p-0" }, ul = { class: "aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative" }, cl = { class: "w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800" }, vl = {
|
|
1572
1572
|
key: 0,
|
|
1573
1573
|
class: "relative w-full"
|
|
1574
|
-
},
|
|
1574
|
+
}, pl = ["src", "alt"], gl = { class: "p-4" }, hl = { class: "flex items-center justify-between mb-2" }, bl = { class: "font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2" }, yl = { class: "space-y-1 text-sm text-slate-500 dark:text-slate-400" }, ml = { class: "flex justify-between" }, xl = { class: "flex justify-between" }, fl = {
|
|
1575
1575
|
__name: "MediaGrid",
|
|
1576
1576
|
props: {
|
|
1577
1577
|
files: {
|
|
@@ -1593,92 +1593,91 @@ const Xr = {
|
|
|
1593
1593
|
},
|
|
1594
1594
|
emits: ["delete-file", "file-click", "delete-folder"],
|
|
1595
1595
|
setup(e, { emit: l }) {
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
if (!v)
|
|
1596
|
+
const { t: a } = Y(), b = e, u = A([]), d = A(null), x = (f) => {
|
|
1597
|
+
if (!f)
|
|
1599
1598
|
return "";
|
|
1600
|
-
const
|
|
1601
|
-
return isNaN(
|
|
1599
|
+
const p = new Date(f);
|
|
1600
|
+
return isNaN(p.getTime()) ? "" : p.toISOString().slice(0, 10);
|
|
1602
1601
|
}, m = () => {
|
|
1603
|
-
|
|
1602
|
+
u.value = b.files.sort((f, p) => f.type === "dir" && p.type !== "dir" ? -1 : f.type !== "dir" && p.type === "dir" ? 1 : 0);
|
|
1604
1603
|
};
|
|
1605
|
-
return
|
|
1606
|
-
var
|
|
1607
|
-
return
|
|
1608
|
-
((
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
])) :
|
|
1612
|
-
(
|
|
1613
|
-
var
|
|
1614
|
-
return
|
|
1615
|
-
key:
|
|
1604
|
+
return de(() => m()), at(() => m()), (f, p) => {
|
|
1605
|
+
var r;
|
|
1606
|
+
return o(), n("div", rl, [
|
|
1607
|
+
((r = e.files) == null ? void 0 : r.length) === 0 ? (o(), n("div", ll, [
|
|
1608
|
+
$(y(vt), { class: "w-12 h-12 mb-2" }),
|
|
1609
|
+
t("p", null, c(f.$t("cms.noFilesInFolder")), 1)
|
|
1610
|
+
])) : j("", !0),
|
|
1611
|
+
(o(!0), n(L, null, P(u.value, (i) => {
|
|
1612
|
+
var M;
|
|
1613
|
+
return o(), n(L, {
|
|
1614
|
+
key: i == null ? void 0 : i.url
|
|
1616
1615
|
}, [
|
|
1617
|
-
(
|
|
1616
|
+
(i == null ? void 0 : i.type) === "dir" ? (o(), n("div", {
|
|
1618
1617
|
key: 0,
|
|
1619
1618
|
class: "p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",
|
|
1620
|
-
onClick: (
|
|
1619
|
+
onClick: (k) => f.$emit("file-click", i)
|
|
1621
1620
|
}, [
|
|
1622
|
-
e.isDeleteButton ? (
|
|
1621
|
+
e.isDeleteButton ? (o(), n("div", {
|
|
1623
1622
|
key: 0,
|
|
1624
|
-
onClick:
|
|
1625
|
-
|
|
1623
|
+
onClick: J((k) => {
|
|
1624
|
+
d.value = i;
|
|
1626
1625
|
}, ["stop"]),
|
|
1627
1626
|
class: "absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"
|
|
1628
1627
|
}, [
|
|
1629
|
-
|
|
1630
|
-
], 8,
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
], 8,
|
|
1628
|
+
$(y(ee), { class: "w-4 h-4 text-gray-500 group-hover:text-red-500" })
|
|
1629
|
+
], 8, al)) : j("", !0),
|
|
1630
|
+
$(y(Ne), { class: "w-16 h-16 mx-auto mb-4 text-blue-600" }),
|
|
1631
|
+
t("h3", ol, c(i == null ? void 0 : i.name), 1),
|
|
1632
|
+
t("p", nl, c(i == null ? void 0 : i.count) + " " + c(f.$t("cms.media.files")), 1)
|
|
1633
|
+
], 8, sl)) : (i == null ? void 0 : i.type) === "file" ? (o(), n("div", {
|
|
1635
1634
|
key: 1,
|
|
1636
|
-
class:
|
|
1637
|
-
"bg-accent text-accent-foreground ring-2 ring-primary": ((
|
|
1635
|
+
class: Q(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer", {
|
|
1636
|
+
"bg-accent text-accent-foreground ring-2 ring-primary": ((M = e.selectedFile) == null ? void 0 : M.url) === (i == null ? void 0 : i.url) || e.selectedFiles && e.selectedFiles.some((k) => k.id === i.id)
|
|
1638
1637
|
}]),
|
|
1639
|
-
onClick: (
|
|
1638
|
+
onClick: (k) => f.$emit("file-click", i)
|
|
1640
1639
|
}, [
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
(
|
|
1645
|
-
|
|
1646
|
-
src:
|
|
1647
|
-
alt: (
|
|
1640
|
+
t("div", il, [
|
|
1641
|
+
t("div", ul, [
|
|
1642
|
+
t("div", cl, [
|
|
1643
|
+
(i == null ? void 0 : i.filetype) === "image" && (i != null && i.filepath || i != null && i.url) ? (o(), n("div", vl, [
|
|
1644
|
+
t("img", {
|
|
1645
|
+
src: i == null ? void 0 : i.preview,
|
|
1646
|
+
alt: (i == null ? void 0 : i.alt) || (i == null ? void 0 : i.filename),
|
|
1648
1647
|
class: "object-cover w-full h-full rounded text-xs"
|
|
1649
|
-
}, null, 8,
|
|
1650
|
-
])) : (
|
|
1648
|
+
}, null, 8, pl)
|
|
1649
|
+
])) : (o(), F(y(pt), {
|
|
1651
1650
|
key: 1,
|
|
1652
1651
|
class: "w-12 h-12 text-gray-500"
|
|
1653
1652
|
}))
|
|
1654
1653
|
])
|
|
1655
1654
|
]),
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
type:
|
|
1655
|
+
t("div", gl, [
|
|
1656
|
+
t("div", hl, [
|
|
1657
|
+
t("h3", bl, c(i.filename), 1),
|
|
1658
|
+
$(tl, {
|
|
1659
|
+
type: i == null ? void 0 : i.filetype
|
|
1661
1660
|
}, null, 8, ["type"])
|
|
1662
1661
|
]),
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1662
|
+
t("div", yl, [
|
|
1663
|
+
t("div", ml, [
|
|
1664
|
+
t("span", null, c(f.$t("cms.media.size")) + ":", 1),
|
|
1665
|
+
t("span", null, c(y(He)(i.filesize)), 1)
|
|
1667
1666
|
]),
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1667
|
+
t("div", xl, [
|
|
1668
|
+
t("span", null, c(f.$t("cms.media.uploaded")) + ":", 1),
|
|
1669
|
+
t("span", null, c(x(i.created_at)), 1)
|
|
1671
1670
|
])
|
|
1672
1671
|
])
|
|
1673
1672
|
])
|
|
1674
1673
|
])
|
|
1675
|
-
], 10,
|
|
1674
|
+
], 10, dl)) : j("", !0)
|
|
1676
1675
|
], 64);
|
|
1677
1676
|
}), 128))
|
|
1678
1677
|
]);
|
|
1679
1678
|
};
|
|
1680
1679
|
}
|
|
1681
|
-
},
|
|
1680
|
+
}, wl = {}, kl = {
|
|
1682
1681
|
"aria-hidden": "true",
|
|
1683
1682
|
focusable: "false",
|
|
1684
1683
|
role: "img",
|
|
@@ -1687,13 +1686,13 @@ const Xr = {
|
|
|
1687
1686
|
height: "16",
|
|
1688
1687
|
fill: "currentColor"
|
|
1689
1688
|
};
|
|
1690
|
-
function
|
|
1691
|
-
return
|
|
1692
|
-
|
|
1693
|
-
|
|
1689
|
+
function _l(e, l) {
|
|
1690
|
+
return o(), n("svg", kl, [...l[0] || (l[0] = [
|
|
1691
|
+
t("path", { d: "M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z" }, null, -1),
|
|
1692
|
+
t("path", { d: "M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z" }, null, -1)
|
|
1694
1693
|
])]);
|
|
1695
1694
|
}
|
|
1696
|
-
const
|
|
1695
|
+
const $l = /* @__PURE__ */ te(wl, [["render", _l]]), Cl = {}, Al = {
|
|
1697
1696
|
"aria-hidden": "true",
|
|
1698
1697
|
focusable: "false",
|
|
1699
1698
|
role: "img",
|
|
@@ -1702,22 +1701,22 @@ const kl = /* @__PURE__ */ ee(xl, [["render", wl]]), _l = {}, $l = {
|
|
|
1702
1701
|
height: "16",
|
|
1703
1702
|
fill: "currentColor"
|
|
1704
1703
|
};
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1708
|
-
|
|
1704
|
+
function Ml(e, l) {
|
|
1705
|
+
return o(), n("svg", Al, [...l[0] || (l[0] = [
|
|
1706
|
+
t("path", { d: "M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z" }, null, -1),
|
|
1707
|
+
t("path", { d: "M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z" }, null, -1)
|
|
1709
1708
|
])]);
|
|
1710
1709
|
}
|
|
1711
|
-
const
|
|
1710
|
+
const jl = /* @__PURE__ */ te(Cl, [["render", Ml]]), Vl = {
|
|
1712
1711
|
key: 0,
|
|
1713
1712
|
class: "flex flex-col items-center justify-center h-64 text-muted-foreground"
|
|
1714
|
-
},
|
|
1713
|
+
}, Fl = {
|
|
1715
1714
|
key: 1,
|
|
1716
1715
|
class: "w-full text-sm caption-bottom"
|
|
1717
|
-
},
|
|
1716
|
+
}, Bl = { class: "[&_tr]:border-b" }, Sl = { class: "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" }, ql = { class: "h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]" }, zl = { class: "h-12 px-4 font-medium text-left align-middle text-muted-foreground" }, El = { class: "h-12 px-4 font-medium text-left align-middle text-muted-foreground" }, Il = { class: "hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell" }, Dl = { class: "[&_tr:last-child]:border-0" }, Tl = ["onClick"], Ll = { class: "p-4 font-medium align-middle" }, Nl = { class: "flex items-center gap-2" }, Gl = {
|
|
1718
1717
|
key: 1,
|
|
1719
1718
|
class: "relative w-8 h-8"
|
|
1720
|
-
},
|
|
1719
|
+
}, Ql = ["src", "alt"], Zl = { class: "truncate max-w-[200px]" }, Ul = { class: "p-4 align-middle" }, Wl = { class: "p-4 align-middle" }, Rl = { class: "hidden p-4 align-middle md:table-cell" }, Pl = { key: 0 }, Hl = {
|
|
1721
1720
|
__name: "MediaList",
|
|
1722
1721
|
props: {
|
|
1723
1722
|
files: {
|
|
@@ -1735,82 +1734,82 @@ const Al = /* @__PURE__ */ ee(_l, [["render", Cl]]), Ml = {
|
|
|
1735
1734
|
},
|
|
1736
1735
|
emits: ["file-click", "delete-folder"],
|
|
1737
1736
|
setup(e, { emit: l }) {
|
|
1738
|
-
const { t:
|
|
1739
|
-
|
|
1740
|
-
title:
|
|
1741
|
-
message:
|
|
1737
|
+
const { t: a } = Y(), b = A(null), u = l, d = () => {
|
|
1738
|
+
Ze({
|
|
1739
|
+
title: a("cms.builder.deleteTitle"),
|
|
1740
|
+
message: a("cms.builder.deleteObject"),
|
|
1742
1741
|
type: "error",
|
|
1743
1742
|
onConfirm: () => {
|
|
1744
|
-
|
|
1743
|
+
x();
|
|
1745
1744
|
}
|
|
1746
1745
|
});
|
|
1747
|
-
},
|
|
1748
|
-
u("delete-folder",
|
|
1746
|
+
}, x = () => {
|
|
1747
|
+
u("delete-folder", b.value);
|
|
1749
1748
|
};
|
|
1750
|
-
return (
|
|
1751
|
-
const p =
|
|
1752
|
-
return
|
|
1753
|
-
e.files.length === 0 ? (
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
])) : (
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1749
|
+
return (m, f) => {
|
|
1750
|
+
const p = me("File");
|
|
1751
|
+
return o(), n("div", null, [
|
|
1752
|
+
e.files.length === 0 ? (o(), n("div", Vl, [
|
|
1753
|
+
$(p, { class: "w-12 h-12 mb-2" }),
|
|
1754
|
+
t("p", null, c(m.$t("cms.media.noFilesInFolder")), 1)
|
|
1755
|
+
])) : (o(), n("table", Fl, [
|
|
1756
|
+
t("thead", Bl, [
|
|
1757
|
+
t("tr", Sl, [
|
|
1758
|
+
t("th", ql, c(m.$t("cms.media.name")), 1),
|
|
1759
|
+
t("th", zl, c(m.$t("cms.media.type")), 1),
|
|
1760
|
+
t("th", El, c(m.$t("cms.media.size")), 1),
|
|
1761
|
+
t("th", Il, c(m.$t("cms.media.updatedAt")), 1),
|
|
1762
|
+
f[0] || (f[0] = t("th", null, null, -1))
|
|
1764
1763
|
])
|
|
1765
1764
|
]),
|
|
1766
|
-
|
|
1767
|
-
(
|
|
1768
|
-
var
|
|
1769
|
-
return
|
|
1770
|
-
key:
|
|
1771
|
-
class:
|
|
1772
|
-
"bg-blue-200": ((
|
|
1765
|
+
t("tbody", Dl, [
|
|
1766
|
+
(o(!0), n(L, null, P(e.files, (r) => {
|
|
1767
|
+
var i, M, k, _, w;
|
|
1768
|
+
return o(), n("tr", {
|
|
1769
|
+
key: r.id,
|
|
1770
|
+
class: Q(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer", {
|
|
1771
|
+
"bg-blue-200": ((i = b.value) == null ? void 0 : i.id) === r.id && ((M = b.value) == null ? void 0 : M.type) === r.type || e.selectedFiles && e.selectedFiles.some((q) => q.id === r.id && q.type === r.type)
|
|
1773
1772
|
}]),
|
|
1774
|
-
onClick: (
|
|
1773
|
+
onClick: (q) => m.$emit("file-click", r)
|
|
1775
1774
|
}, [
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1775
|
+
t("td", Ll, [
|
|
1776
|
+
t("div", Nl, [
|
|
1777
|
+
r.type === "dir" ? (o(), F($l, {
|
|
1779
1778
|
key: 0,
|
|
1780
1779
|
class: "w-5 h-5 text-blue-500"
|
|
1781
|
-
})) : (
|
|
1782
|
-
|
|
1783
|
-
src:
|
|
1784
|
-
alt: (
|
|
1780
|
+
})) : (r == null ? void 0 : r.filetype) === "image" && (r != null && r.filepath) ? (o(), n("div", Gl, [
|
|
1781
|
+
t("img", {
|
|
1782
|
+
src: r == null ? void 0 : r.preview,
|
|
1783
|
+
alt: (r == null ? void 0 : r.alt) || (r == null ? void 0 : r.filename),
|
|
1785
1784
|
class: "object-cover w-full h-full rounded"
|
|
1786
|
-
}, null, 8,
|
|
1787
|
-
])) : (
|
|
1785
|
+
}, null, 8, Ql)
|
|
1786
|
+
])) : (r == null ? void 0 : r.filetype) === "image" ? (o(), F(jl, {
|
|
1788
1787
|
key: 2,
|
|
1789
1788
|
class: "w-5 h-5 text-green-500"
|
|
1790
|
-
})) : (
|
|
1789
|
+
})) : (o(), F(p, {
|
|
1791
1790
|
key: 3,
|
|
1792
1791
|
class: "w-5 h-5 text-gray-500"
|
|
1793
1792
|
})),
|
|
1794
|
-
|
|
1793
|
+
t("span", Zl, c((r == null ? void 0 : r.filename) || (r == null ? void 0 : r.name)), 1)
|
|
1795
1794
|
])
|
|
1796
1795
|
]),
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1796
|
+
t("td", Ul, c((r == null ? void 0 : r.type) === "dir" ? m.$t("cms.media.folder") : ((_ = (k = r == null ? void 0 : r.filetype) == null ? void 0 : k.charAt(0)) == null ? void 0 : _.toUpperCase()) + ((w = r == null ? void 0 : r.filetype) == null ? void 0 : w.slice(1))), 1),
|
|
1797
|
+
t("td", Wl, c((r == null ? void 0 : r.type) === "dir" ? "--" : y(He)(r == null ? void 0 : r.filesize)), 1),
|
|
1798
|
+
t("td", Rl, c(r != null && r.updated_at ? y(el)(r == null ? void 0 : r.updated_at) : "--"), 1),
|
|
1799
|
+
r.type === "dir" ? (o(), n("td", Pl, [
|
|
1800
|
+
$(y(ee), {
|
|
1802
1801
|
class: "w-4 h-4 text-red-500 cursor-pointer",
|
|
1803
|
-
onClick:
|
|
1802
|
+
onClick: J(d, ["stop"])
|
|
1804
1803
|
}, null, 8, ["onClick"])
|
|
1805
|
-
])) :
|
|
1806
|
-
], 10,
|
|
1804
|
+
])) : j("", !0)
|
|
1805
|
+
], 10, Tl);
|
|
1807
1806
|
}), 128))
|
|
1808
1807
|
])
|
|
1809
1808
|
]))
|
|
1810
1809
|
]);
|
|
1811
1810
|
};
|
|
1812
1811
|
}
|
|
1813
|
-
},
|
|
1812
|
+
}, Ol = {}, Yl = {
|
|
1814
1813
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1815
1814
|
width: "20",
|
|
1816
1815
|
height: "20",
|
|
@@ -1821,13 +1820,13 @@ const Al = /* @__PURE__ */ ee(_l, [["render", Cl]]), Ml = {
|
|
|
1821
1820
|
"stroke-linecap": "round",
|
|
1822
1821
|
"stroke-linejoin": "round"
|
|
1823
1822
|
};
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1826
|
-
|
|
1827
|
-
|
|
1823
|
+
function Kl(e, l) {
|
|
1824
|
+
return o(), n("svg", Yl, [...l[0] || (l[0] = [
|
|
1825
|
+
t("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }, null, -1),
|
|
1826
|
+
t("polyline", { points: "9 22 9 12 15 12 15 22" }, null, -1)
|
|
1828
1827
|
])]);
|
|
1829
1828
|
}
|
|
1830
|
-
const
|
|
1829
|
+
const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-center space-x-1" }, es = ["onClick"], ts = {
|
|
1831
1830
|
__name: "MediaBreadcrumb",
|
|
1832
1831
|
props: {
|
|
1833
1832
|
currentPath: {
|
|
@@ -1837,47 +1836,50 @@ const Yl = /* @__PURE__ */ ee(Pl, [["render", Hl]]), Kl = { class: "flex items-c
|
|
|
1837
1836
|
},
|
|
1838
1837
|
emits: ["navigate"],
|
|
1839
1838
|
setup(e) {
|
|
1840
|
-
return (l,
|
|
1841
|
-
|
|
1839
|
+
return (l, a) => (o(), n("div", Xl, [
|
|
1840
|
+
t("button", {
|
|
1842
1841
|
class: "flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",
|
|
1843
|
-
onClick:
|
|
1842
|
+
onClick: a[0] || (a[0] = (b) => l.$emit("navigate", []))
|
|
1844
1843
|
}, [
|
|
1845
|
-
|
|
1846
|
-
|
|
1844
|
+
$(Jl, { class: "w-3 h-3" }),
|
|
1845
|
+
X(" " + c(l.$t("cms.media.mediaLibrary")), 1)
|
|
1847
1846
|
]),
|
|
1848
|
-
e.currentPath.length > 0 ? (
|
|
1847
|
+
e.currentPath.length > 0 ? (o(), F(y(je), {
|
|
1849
1848
|
key: 0,
|
|
1850
1849
|
class: "w-3 h-3 text-slate-400 dark:text-slate-500"
|
|
1851
|
-
})) :
|
|
1852
|
-
(
|
|
1850
|
+
})) : j("", !0),
|
|
1851
|
+
(o(!0), n(L, null, P(e.currentPath, (b, u) => (o(), n("button", {
|
|
1853
1852
|
key: u,
|
|
1854
1853
|
class: "flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",
|
|
1855
|
-
onClick: (
|
|
1854
|
+
onClick: (d) => l.$emit("navigate", e.currentPath.slice(0, u + 1))
|
|
1856
1855
|
}, [
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
u < e.currentPath.length - 1 ? (
|
|
1856
|
+
$(y(Ne), { class: "w-3 h-3" }),
|
|
1857
|
+
X(" " + c(b) + " ", 1),
|
|
1858
|
+
u < e.currentPath.length - 1 ? (o(), F(y(je), {
|
|
1860
1859
|
key: 0,
|
|
1861
1860
|
class: "w-3 h-3 text-slate-400 dark:text-slate-500"
|
|
1862
|
-
})) :
|
|
1863
|
-
], 8,
|
|
1861
|
+
})) : j("", !0)
|
|
1862
|
+
], 8, es))), 128))
|
|
1864
1863
|
]));
|
|
1865
1864
|
}
|
|
1866
|
-
},
|
|
1865
|
+
}, rs = { class: "relative group" }, ls = {
|
|
1866
|
+
class: "absolute top-1 left-1 z-20 p-1.5 rounded bg-white/90 dark:bg-slate-700/90 shadow cursor-grab active:cursor-grabbing opacity-0 group-hover:opacity-100 transition-opacity drag-handle",
|
|
1867
|
+
title: "Перетягніть для зміни порядку"
|
|
1868
|
+
}, ss = ["src"], as = { class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2" }, os = ["onClick"], ns = ["onClick"], ds = ["title"], is = {
|
|
1867
1869
|
key: 1,
|
|
1868
1870
|
class: "relative group"
|
|
1869
|
-
},
|
|
1871
|
+
}, us = ["src"], cs = { class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2" }, vs = ["title"], ps = {
|
|
1870
1872
|
key: 2,
|
|
1871
1873
|
class: "absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"
|
|
1872
|
-
},
|
|
1874
|
+
}, gs = { class: "flex flex-col items-center gap-2" }, hs = { class: "text-xs text-gray-600" }, bs = ["multiple", "disabled"], ys = { class: "whitespace-nowrap text-sm" }, ms = { class: "whitespace-nowrap text-sm" }, xs = { class: "flex items-center justify-between p-4 border-b" }, fs = { class: "text-lg font-semibold" }, ws = { class: "flex items-center justify-between gap-4 p-4 border-b" }, ks = { class: "relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4" }, _s = { class: "flex items-center justify-between gap-4" }, $s = { class: "flex items-center gap-4 flex-1" }, Cs = { class: "relative flex-1 max-w-md" }, As = ["placeholder"], Ms = { class: "flex items-center gap-2 relative" }, js = { class: "text-xs font-bold" }, Vs = { class: "text-xs font-bold" }, Fs = {
|
|
1873
1875
|
key: 0,
|
|
1874
1876
|
class: "w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"
|
|
1875
|
-
},
|
|
1877
|
+
}, Bs = { class: "flex items-center gap-2" }, Ss = { class: "flex flex-col gap-4 overflow-y-auto p-4 flex-1" }, qs = { class: "p-4 border-t flex items-center justify-between" }, zs = {
|
|
1876
1878
|
key: 0,
|
|
1877
1879
|
class: "text-sm text-gray-600 dark:text-gray-400"
|
|
1878
|
-
},
|
|
1880
|
+
}, Es = { key: 1 }, Is = ["disabled"], Ds = 112, be = 10, Ca = {
|
|
1879
1881
|
__name: "vs-form-media-select",
|
|
1880
|
-
props: /* @__PURE__ */
|
|
1882
|
+
props: /* @__PURE__ */ W({
|
|
1881
1883
|
multiple: {
|
|
1882
1884
|
type: Boolean,
|
|
1883
1885
|
default: !1
|
|
@@ -1890,137 +1892,150 @@ const Yl = /* @__PURE__ */ ee(Pl, [["render", Hl]]), Kl = { class: "flex items-c
|
|
|
1890
1892
|
modelValue: {},
|
|
1891
1893
|
modelModifiers: {}
|
|
1892
1894
|
}),
|
|
1893
|
-
emits: /* @__PURE__ */
|
|
1895
|
+
emits: /* @__PURE__ */ W(["change"], ["update:modelValue"]),
|
|
1894
1896
|
setup(e, { emit: l }) {
|
|
1895
|
-
const { t:
|
|
1896
|
-
if (!
|
|
1897
|
+
const { t: a } = Y(), b = wt(), u = kt(), d = Z(e, "modelValue"), x = l, m = e, f = R(() => m.multiple || m.multi), p = A(null), r = R(() => d.value || p.value), i = R(() => {
|
|
1898
|
+
if (!f.value)
|
|
1897
1899
|
return [];
|
|
1898
|
-
const
|
|
1899
|
-
return
|
|
1900
|
-
}),
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1900
|
+
const s = r.value;
|
|
1901
|
+
return s ? Array.isArray(s) ? s : [s] : [];
|
|
1902
|
+
}), M = R({
|
|
1903
|
+
get: () => i.value,
|
|
1904
|
+
set: (s) => {
|
|
1905
|
+
if (!s || !Array.isArray(s) || s.length === 0) {
|
|
1906
|
+
d && (d.value = null), p.value = null, x("cms.change", null);
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1909
|
+
const v = s.map((g) => typeof g == "string" ? g : (g == null ? void 0 : g.filepath) || (g == null ? void 0 : g.file_path) || g), h = s.map(
|
|
1910
|
+
(g) => typeof g == "object" ? g : p.value && Array.isArray(p.value) ? p.value.find((C) => re(C) === g) ?? g : g
|
|
1911
|
+
);
|
|
1912
|
+
d && (d.value = v), p.value = h, x("cms.change", v);
|
|
1913
|
+
}
|
|
1914
|
+
}), k = R(() => r.value ? typeof r.value == "object" ? r.value.filename || r.value.file_name || r.value.native_file_name || "File" : typeof r.value == "string" ? r.value.split("cms./").pop() || r.value : "File" : ""), _ = A(!1), w = A(!1), q = A("grid"), V = A([]), D = A([]), N = A([]), B = A(), E = A([]), ue = A(null), G = A(!1), le = A(null), ce = A(null), fe = A({}), O = A(""), K = A(!1), se = A("name"), Oe = /* @__PURE__ */ new Map([
|
|
1915
|
+
["name", a("cms.media.sortBy.name")],
|
|
1916
|
+
["filesize", a("cms.media.sortBy.filesize")]
|
|
1917
|
+
]), re = (s) => typeof s == "string" ? s : (s == null ? void 0 : s.filepath) || (s == null ? void 0 : s.file_path) || s, we = (s) => s ? typeof s == "string" ? s.split("cms./").pop() || s : s.filename || s.file_name || s.native_file_name || "File" : "", Ye = (s) => typeof s == "string" ? s : (s == null ? void 0 : s.preview) || `/file/resize?filepath=${re(s)}&h=137&quality=75`, Ke = () => {
|
|
1918
|
+
ue.value && ue.value.click();
|
|
1919
|
+
}, Je = () => {
|
|
1920
|
+
_.value = !_.value, _.value && Xe();
|
|
1921
|
+
}, Xe = () => {
|
|
1922
|
+
if (le.value) {
|
|
1923
|
+
const s = le.value.getBoundingClientRect(), v = window.innerHeight - s.bottom, h = s.top, g = v >= Ds + be || v >= h;
|
|
1924
|
+
fe.value = {
|
|
1925
|
+
top: g ? `${s.bottom + be}px` : "auto",
|
|
1926
|
+
bottom: g ? "auto" : `${window.innerHeight - s.top + be}px`,
|
|
1927
|
+
left: `${s.left + s.width / 2}px`,
|
|
1913
1928
|
transform: "translateX(-50%)",
|
|
1914
1929
|
width: "200px"
|
|
1915
1930
|
};
|
|
1916
1931
|
}
|
|
1917
|
-
},
|
|
1918
|
-
var
|
|
1919
|
-
if (
|
|
1920
|
-
|
|
1921
|
-
else if (
|
|
1922
|
-
const h =
|
|
1923
|
-
h >= 0 ?
|
|
1932
|
+
}, ke = (s) => {
|
|
1933
|
+
var v;
|
|
1934
|
+
if (s.type === "dir")
|
|
1935
|
+
_e([...V.value, s.name]);
|
|
1936
|
+
else if (f.value) {
|
|
1937
|
+
const h = E.value.findIndex((g) => g.id === s.id);
|
|
1938
|
+
h >= 0 ? E.value.splice(h, 1) : E.value.push(s);
|
|
1924
1939
|
} else
|
|
1925
|
-
B.value =
|
|
1926
|
-
},
|
|
1927
|
-
|
|
1928
|
-
var
|
|
1929
|
-
if ((
|
|
1940
|
+
B.value = s.id === ((v = B.value) == null ? void 0 : v.id) ? null : s;
|
|
1941
|
+
}, ae = (s) => {
|
|
1942
|
+
se.value = s, K.value = !1, D.value = D.value.sort((v, h) => {
|
|
1943
|
+
var g;
|
|
1944
|
+
if ((v == null ? void 0 : v.type) === "dir")
|
|
1930
1945
|
return -1;
|
|
1931
|
-
if (
|
|
1932
|
-
return (
|
|
1933
|
-
if (
|
|
1934
|
-
return (h == null ? void 0 : h.filesize) - (
|
|
1946
|
+
if (s === "name")
|
|
1947
|
+
return (g = v == null ? void 0 : v.name) == null ? void 0 : g.localeCompare(h == null ? void 0 : h.name);
|
|
1948
|
+
if (s === "filesize")
|
|
1949
|
+
return (h == null ? void 0 : h.filesize) - (v == null ? void 0 : v.filesize);
|
|
1935
1950
|
});
|
|
1936
|
-
},
|
|
1951
|
+
}, et = async () => {
|
|
1937
1952
|
try {
|
|
1938
|
-
const
|
|
1953
|
+
const s = V.value.join("/"), h = await (await fetch(`/api/cms-media?subdir=${s}${O.value ? "&search=" + O.value : ""}`, {
|
|
1939
1954
|
method: "GET"
|
|
1940
1955
|
})).json();
|
|
1941
|
-
h.data ? (
|
|
1942
|
-
...
|
|
1943
|
-
id:
|
|
1944
|
-
preview: `/file/resize?filepath=${
|
|
1945
|
-
})),
|
|
1946
|
-
} catch (
|
|
1947
|
-
console.error("Search error:",
|
|
1956
|
+
h.data ? (D.value = h.data.map((g) => ({
|
|
1957
|
+
...g,
|
|
1958
|
+
id: g.type === "dir" ? `dir-${g.name}` : g.id,
|
|
1959
|
+
preview: `/file/resize?filepath=${g.filepath}&h=137&quality=75`
|
|
1960
|
+
})), ae(se.value)) : D.value = [];
|
|
1961
|
+
} catch (s) {
|
|
1962
|
+
console.error("Search error:", s), D.value = [];
|
|
1948
1963
|
}
|
|
1949
|
-
},
|
|
1950
|
-
if (
|
|
1951
|
-
if (
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
}),
|
|
1964
|
+
}, tt = () => {
|
|
1965
|
+
if (f.value) {
|
|
1966
|
+
if (E.value.length > 0) {
|
|
1967
|
+
const s = Array.isArray(d.value) ? [...d.value] : d.value ? [d.value] : [], v = Array.isArray(p.value) ? [...p.value] : p.value ? [p.value] : [];
|
|
1968
|
+
E.value.forEach((h) => {
|
|
1969
|
+
const g = h.filepath || h.file_path;
|
|
1970
|
+
s.some((C) => (typeof C == "string" ? C : (C == null ? void 0 : C.filepath) || (C == null ? void 0 : C.file_path)) === g) || (s.push(g), v.push(h));
|
|
1971
|
+
}), d && (d.value = s), p.value = v, x("cms.change", s), E.value = [];
|
|
1957
1972
|
}
|
|
1958
1973
|
} else if (B.value) {
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1974
|
+
const s = B.value.filepath || B.value.file_path;
|
|
1975
|
+
d && (d.value = s), p.value = B.value, x("cms.change", s), B.value = null;
|
|
1961
1976
|
}
|
|
1962
|
-
|
|
1963
|
-
},
|
|
1964
|
-
|
|
1965
|
-
},
|
|
1966
|
-
|
|
1967
|
-
},
|
|
1968
|
-
|
|
1969
|
-
},
|
|
1977
|
+
ve();
|
|
1978
|
+
}, ve = () => {
|
|
1979
|
+
w.value = !1;
|
|
1980
|
+
}, _e = (s) => {
|
|
1981
|
+
V.value = s, N.value = [...N.value, s], B.value = null, f.value && (E.value = []), pe();
|
|
1982
|
+
}, rt = () => {
|
|
1983
|
+
N.value.length > 1 && (N.value.pop(), V.value = N.value[N.value.length - 1], B.value = null, f.value && (E.value = []), pe());
|
|
1984
|
+
}, pe = async () => {
|
|
1970
1985
|
try {
|
|
1971
|
-
const
|
|
1986
|
+
const s = V.value.join("/"), h = await (await fetch(`/api/cms-media?subdir=${s}${O.value ? "&search=" + O.value : ""}`, {
|
|
1972
1987
|
method: "GET"
|
|
1973
1988
|
})).json();
|
|
1974
|
-
h.data ? (
|
|
1975
|
-
...
|
|
1976
|
-
id:
|
|
1977
|
-
preview: `/file/resize?filepath=${
|
|
1978
|
-
})),
|
|
1979
|
-
} catch (
|
|
1980
|
-
console.error("Fetch error:",
|
|
1989
|
+
h.data ? (D.value = h.data.map((g) => ({
|
|
1990
|
+
...g,
|
|
1991
|
+
id: g.type === "dir" ? `dir-${g.name}` : g.id,
|
|
1992
|
+
preview: `/file/resize?filepath=${g.filepath}&h=137&quality=75`
|
|
1993
|
+
})), ae(se.value)) : D.value = [];
|
|
1994
|
+
} catch (s) {
|
|
1995
|
+
console.error("Fetch error:", s), D.value = [];
|
|
1981
1996
|
}
|
|
1982
|
-
},
|
|
1997
|
+
}, $e = async (s, v) => {
|
|
1983
1998
|
try {
|
|
1984
|
-
const h = typeof
|
|
1985
|
-
if (await fetch(`/file/delete${h}`),
|
|
1986
|
-
const
|
|
1987
|
-
if (
|
|
1988
|
-
|
|
1999
|
+
const h = typeof s == "string" ? s : re(s);
|
|
2000
|
+
if (await fetch(`/file/delete${h}`), f.value) {
|
|
2001
|
+
const g = Array.isArray(d.value) ? [...d.value] : [], C = Array.isArray(p.value) ? [...p.value] : [];
|
|
2002
|
+
if (v !== void 0 && v >= 0)
|
|
2003
|
+
g.splice(v, 1), C.splice(v, 1);
|
|
1989
2004
|
else {
|
|
1990
|
-
const
|
|
1991
|
-
|
|
2005
|
+
const S = g.findIndex((I) => (typeof I == "string" ? I : (I == null ? void 0 : I.filepath) || (I == null ? void 0 : I.file_path)) === h);
|
|
2006
|
+
S >= 0 && (g.splice(S, 1), C.splice(S, 1));
|
|
1992
2007
|
}
|
|
1993
|
-
|
|
2008
|
+
d && (d.value = g.length > 0 ? g : null), p.value = C.length > 0 ? C : null, x("cms.change", g.length > 0 ? g : null);
|
|
1994
2009
|
} else
|
|
1995
|
-
|
|
2010
|
+
d && (d.value = null), p.value = null, x("cms.change", null);
|
|
1996
2011
|
return !0;
|
|
1997
2012
|
} catch (h) {
|
|
1998
2013
|
return console.error(h), !1;
|
|
1999
2014
|
}
|
|
2000
|
-
},
|
|
2015
|
+
}, Ce = async (s) => {
|
|
2001
2016
|
try {
|
|
2002
|
-
const
|
|
2003
|
-
I.setAttribute("download",
|
|
2004
|
-
} catch (
|
|
2005
|
-
console.error(
|
|
2017
|
+
const v = await fetch(`/file/download/files/uploads${s}`), h = await v.arrayBuffer(), g = v.headers["content-type"], C = new TextDecoder("utf-8").decode(h), S = new Blob([C], { type: g }), I = document.createElement("cms.a");
|
|
2018
|
+
I.setAttribute("download", s), I.href = window.URL.createObjectURL(S), I.click();
|
|
2019
|
+
} catch (v) {
|
|
2020
|
+
console.error(v.message);
|
|
2006
2021
|
}
|
|
2007
|
-
},
|
|
2008
|
-
if (!
|
|
2022
|
+
}, lt = async (s) => {
|
|
2023
|
+
if (!s.target.files || s.target.files.length === 0)
|
|
2009
2024
|
return;
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2025
|
+
const v = Array.from(s.target.files);
|
|
2026
|
+
G.value = !0;
|
|
2012
2027
|
try {
|
|
2013
2028
|
const h = [];
|
|
2014
|
-
for (const
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
const
|
|
2029
|
+
for (const g of v) {
|
|
2030
|
+
const C = new FormData();
|
|
2031
|
+
C.append("file", g);
|
|
2032
|
+
const S = await fetch("/file/upload/uploads?id=1&form=form&table=table", {
|
|
2018
2033
|
method: "POST",
|
|
2019
|
-
body:
|
|
2034
|
+
body: C
|
|
2020
2035
|
});
|
|
2021
|
-
if (!
|
|
2022
|
-
throw new Error(`Upload failed: ${
|
|
2023
|
-
const T = (await
|
|
2036
|
+
if (!S.ok)
|
|
2037
|
+
throw new Error(`Upload failed: ${S.status}`);
|
|
2038
|
+
const T = (await S.json()).result, st = {
|
|
2024
2039
|
file_id: T.file_id,
|
|
2025
2040
|
file_name: T.file_name,
|
|
2026
2041
|
file_path: T.file_path,
|
|
@@ -2033,203 +2048,215 @@ const Yl = /* @__PURE__ */ ee(Pl, [["render", Hl]]), Kl = { class: "flex items-c
|
|
|
2033
2048
|
native_file_name: T.native_file_name,
|
|
2034
2049
|
preview: `/file/resize?filepath=${T.file_path}&h=137&quality=75`
|
|
2035
2050
|
};
|
|
2036
|
-
h.push(
|
|
2051
|
+
h.push(st);
|
|
2037
2052
|
}
|
|
2038
|
-
if (
|
|
2039
|
-
const
|
|
2040
|
-
h.forEach((
|
|
2041
|
-
|
|
2042
|
-
}),
|
|
2053
|
+
if (f.value) {
|
|
2054
|
+
const g = Array.isArray(d.value) ? [...d.value] : d.value ? [d.value] : [], C = Array.isArray(p.value) ? [...p.value] : p.value ? [p.value] : [];
|
|
2055
|
+
h.forEach((S) => {
|
|
2056
|
+
g.push(S.file_path), C.push(S);
|
|
2057
|
+
}), d && (d.value = g), p.value = C, x("cms.change", g);
|
|
2043
2058
|
} else {
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2059
|
+
const g = h[0];
|
|
2060
|
+
d && (d.value = g.file_path), p.value = g, x("cms.change", g.file_path);
|
|
2046
2061
|
}
|
|
2047
|
-
|
|
2062
|
+
_.value = !1;
|
|
2048
2063
|
} catch (h) {
|
|
2049
2064
|
console.error("Upload error:", h), alert("cms.Помилка завантаження файлу: " + h.message);
|
|
2050
2065
|
} finally {
|
|
2051
|
-
|
|
2066
|
+
G.value = !1;
|
|
2052
2067
|
}
|
|
2053
|
-
|
|
2068
|
+
s.target.value = "";
|
|
2054
2069
|
};
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
}),
|
|
2058
|
-
|
|
2070
|
+
H(w, (s) => {
|
|
2071
|
+
s && pe();
|
|
2072
|
+
}), H(V, (s) => {
|
|
2073
|
+
s.length > 0 ? u.push({ query: { path: s.join("/") } }) : u.push({ query: { path: void 0 } });
|
|
2059
2074
|
});
|
|
2060
|
-
let
|
|
2061
|
-
return
|
|
2062
|
-
clearTimeout(
|
|
2063
|
-
|
|
2075
|
+
let Ae;
|
|
2076
|
+
return H(O, (s) => {
|
|
2077
|
+
clearTimeout(Ae), Ae = setTimeout(() => {
|
|
2078
|
+
et();
|
|
2064
2079
|
}, 500);
|
|
2065
|
-
}),
|
|
2066
|
-
var
|
|
2067
|
-
if (
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
} else if (
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2080
|
+
}), H(d, (s) => {
|
|
2081
|
+
var v, h, g, C;
|
|
2082
|
+
if (s && typeof s == "object") {
|
|
2083
|
+
const S = ((v = B.value) == null ? void 0 : v.filepath) || ((h = B.value) == null ? void 0 : h.file_path);
|
|
2084
|
+
s.filepath !== S && s.file_path !== S && (B.value = null);
|
|
2085
|
+
} else if (s && typeof s == "string") {
|
|
2086
|
+
const S = ((g = B.value) == null ? void 0 : g.filepath) || ((C = B.value) == null ? void 0 : C.file_path);
|
|
2087
|
+
s !== S && (B.value = null);
|
|
2073
2088
|
}
|
|
2074
|
-
}),
|
|
2075
|
-
var
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2078
|
-
var
|
|
2079
|
-
|
|
2089
|
+
}), de(() => {
|
|
2090
|
+
var v, h;
|
|
2091
|
+
V.value = ((h = (v = b.query) == null ? void 0 : v.path) == null ? void 0 : h.split("cms./")) || [], N.value = [[]], d.value || (B.value = null);
|
|
2092
|
+
const s = (g) => {
|
|
2093
|
+
var C;
|
|
2094
|
+
_.value && !((C = le.value) != null && C.contains(g.target)) && (_.value = !1), K.value && ce.value && !ce.value.contains(g.target) && (K.value = !1);
|
|
2080
2095
|
};
|
|
2081
|
-
document.addEventListener("click",
|
|
2082
|
-
}), (
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
key:
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2096
|
+
document.addEventListener("click", s);
|
|
2097
|
+
}), (s, v) => (o(), n(L, null, [
|
|
2098
|
+
t("div", ot(s.$attrs, { class: "flex gap-4 flex-wrap" }), [
|
|
2099
|
+
f.value ? (o(), F(y(Ge), {
|
|
2100
|
+
key: 0,
|
|
2101
|
+
modelValue: M.value,
|
|
2102
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => M.value = h),
|
|
2103
|
+
"item-key": (h) => re(h),
|
|
2104
|
+
handle: ".drag-handle",
|
|
2105
|
+
class: Q(["flex gap-4 flex-wrap", s.$attrs.class])
|
|
2106
|
+
}, {
|
|
2107
|
+
item: U(({ element: h, index: g }) => [
|
|
2108
|
+
t("div", rs, [
|
|
2109
|
+
t("div", ls, [
|
|
2110
|
+
$(y(xe), { class: "w-4 h-4 text-gray-500 dark:text-slate-400" })
|
|
2111
|
+
]),
|
|
2112
|
+
t("img", {
|
|
2113
|
+
src: Ye(h),
|
|
2114
|
+
alt: "Selected File",
|
|
2115
|
+
class: "w-32 h-32 object-cover rounded-lg"
|
|
2116
|
+
}, null, 8, ss),
|
|
2117
|
+
t("div", as, [
|
|
2118
|
+
t("button", {
|
|
2119
|
+
type: "button",
|
|
2120
|
+
onClick: (C) => $e(h, g),
|
|
2121
|
+
class: "p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"
|
|
2122
|
+
}, [
|
|
2123
|
+
$(y(ee), { class: "w-4 h-4" })
|
|
2124
|
+
], 8, os),
|
|
2125
|
+
t("button", {
|
|
2126
|
+
type: "button",
|
|
2127
|
+
onClick: (C) => Ce(re(h)),
|
|
2128
|
+
class: "p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"
|
|
2129
|
+
}, [
|
|
2130
|
+
$(y(ge), { class: "w-4 h-4" })
|
|
2131
|
+
], 8, ns)
|
|
2132
|
+
]),
|
|
2133
|
+
t("div", {
|
|
2134
|
+
class: "absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",
|
|
2135
|
+
title: we(h)
|
|
2136
|
+
}, [
|
|
2137
|
+
X(c(we(h)) + " ", 1),
|
|
2138
|
+
v[13] || (v[13] = t("div", { class: "absolute top-full left-4 border-4 border-transparent border-t-gray-900" }, null, -1))
|
|
2139
|
+
], 8, ds)
|
|
2140
|
+
])
|
|
2108
2141
|
]),
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
J(i(me(h)) + " ", 1),
|
|
2114
|
-
c[12] || (c[12] = r("div", { class: "absolute top-full left-4 border-4 border-transparent border-t-gray-900" }, null, -1))
|
|
2115
|
-
], 8, ss)
|
|
2116
|
-
]))), 128)) : t.value ? (a(), d("div", as, [
|
|
2117
|
-
r("img", {
|
|
2118
|
-
src: t.value.preview || t.value,
|
|
2142
|
+
_: 1
|
|
2143
|
+
}, 8, ["modelValue", "item-key", "class"])) : r.value ? (o(), n("div", is, [
|
|
2144
|
+
t("img", {
|
|
2145
|
+
src: r.value.preview || r.value,
|
|
2119
2146
|
alt: "Selected File",
|
|
2120
2147
|
class: "w-32 h-32 object-cover rounded-lg"
|
|
2121
|
-
}, null, 8,
|
|
2122
|
-
|
|
2123
|
-
|
|
2148
|
+
}, null, 8, us),
|
|
2149
|
+
t("div", cs, [
|
|
2150
|
+
t("button", {
|
|
2124
2151
|
type: "button",
|
|
2125
|
-
onClick:
|
|
2126
|
-
var
|
|
2127
|
-
return
|
|
2152
|
+
onClick: v[1] || (v[1] = (h) => {
|
|
2153
|
+
var g, C;
|
|
2154
|
+
return $e(((g = r.value) == null ? void 0 : g.filepath) || ((C = r.value) == null ? void 0 : C.file_path) || r.value);
|
|
2128
2155
|
}),
|
|
2129
2156
|
class: "p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"
|
|
2130
2157
|
}, [
|
|
2131
|
-
|
|
2158
|
+
$(y(ee), { class: "w-4 h-4" })
|
|
2132
2159
|
]),
|
|
2133
|
-
|
|
2160
|
+
t("button", {
|
|
2134
2161
|
type: "button",
|
|
2135
|
-
onClick:
|
|
2136
|
-
var
|
|
2137
|
-
return
|
|
2162
|
+
onClick: v[2] || (v[2] = (h) => {
|
|
2163
|
+
var g, C;
|
|
2164
|
+
return Ce(((g = r.value) == null ? void 0 : g.filepath) || ((C = r.value) == null ? void 0 : C.file_path) || r.value);
|
|
2138
2165
|
}),
|
|
2139
2166
|
class: "p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"
|
|
2140
2167
|
}, [
|
|
2141
|
-
|
|
2168
|
+
$(y(ge), { class: "w-4 h-4" })
|
|
2142
2169
|
])
|
|
2143
2170
|
]),
|
|
2144
|
-
|
|
2171
|
+
t("div", {
|
|
2145
2172
|
class: "absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",
|
|
2146
|
-
title:
|
|
2173
|
+
title: k.value
|
|
2147
2174
|
}, [
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
], 8,
|
|
2151
|
-
])) :
|
|
2152
|
-
|
|
2175
|
+
X(c(k.value) + " ", 1),
|
|
2176
|
+
v[14] || (v[14] = t("div", { class: "absolute top-full left-4 border-4 border-transparent border-t-gray-900" }, null, -1))
|
|
2177
|
+
], 8, vs)
|
|
2178
|
+
])) : j("", !0),
|
|
2179
|
+
t("div", {
|
|
2153
2180
|
ref_key: "triggerButton",
|
|
2154
|
-
ref:
|
|
2155
|
-
class:
|
|
2156
|
-
onClick:
|
|
2181
|
+
ref: le,
|
|
2182
|
+
class: Q(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all", { "border-blue-500 bg-blue-500/10": _.value, "opacity-50 cursor-not-allowed": G.value }]),
|
|
2183
|
+
onClick: Je
|
|
2157
2184
|
}, [
|
|
2158
|
-
|
|
2185
|
+
G.value ? (o(), F(y(he), {
|
|
2159
2186
|
key: 0,
|
|
2160
2187
|
class: "w-4 h-4 animate-spin text-blue-500"
|
|
2161
|
-
})) : (
|
|
2188
|
+
})) : (o(), F(y(ye), {
|
|
2162
2189
|
key: 1,
|
|
2163
2190
|
class: "w-4 h-4"
|
|
2164
2191
|
})),
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2192
|
+
G.value ? (o(), n("div", ps, [
|
|
2193
|
+
t("div", gs, [
|
|
2194
|
+
$(y(he), { class: "w-6 h-6 animate-spin text-blue-500" }),
|
|
2195
|
+
t("span", hs, c(s.$t("cms.media.uploading")), 1)
|
|
2169
2196
|
])
|
|
2170
|
-
])) :
|
|
2171
|
-
(
|
|
2172
|
-
|
|
2197
|
+
])) : j("", !0),
|
|
2198
|
+
(o(), F(Me, { to: "body" }, [
|
|
2199
|
+
_.value ? (o(), n("div", {
|
|
2173
2200
|
key: 0,
|
|
2174
2201
|
class: "fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",
|
|
2175
|
-
style:
|
|
2202
|
+
style: nt(fe.value)
|
|
2176
2203
|
}, [
|
|
2177
|
-
|
|
2178
|
-
class:
|
|
2179
|
-
onClick:
|
|
2204
|
+
t("div", {
|
|
2205
|
+
class: Q(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer", { "opacity-50 cursor-not-allowed": G.value }]),
|
|
2206
|
+
onClick: v[4] || (v[4] = (h) => !G.value && Ke())
|
|
2180
2207
|
}, [
|
|
2181
|
-
|
|
2208
|
+
t("input", {
|
|
2182
2209
|
type: "file",
|
|
2183
2210
|
ref_key: "fileInput",
|
|
2184
|
-
ref:
|
|
2211
|
+
ref: ue,
|
|
2185
2212
|
class: "absolute justify-center bottom-0 left-0 w-full opacity-0",
|
|
2186
|
-
onChange:
|
|
2187
|
-
onClick:
|
|
2213
|
+
onChange: lt,
|
|
2214
|
+
onClick: v[3] || (v[3] = J(() => {
|
|
2188
2215
|
}, ["stop"])),
|
|
2189
|
-
multiple:
|
|
2190
|
-
disabled:
|
|
2191
|
-
}, null, 40,
|
|
2192
|
-
|
|
2216
|
+
multiple: f.value,
|
|
2217
|
+
disabled: G.value
|
|
2218
|
+
}, null, 40, bs),
|
|
2219
|
+
G.value ? (o(), F(y(he), {
|
|
2193
2220
|
key: 0,
|
|
2194
2221
|
class: "w-4 h-4 animate-spin"
|
|
2195
|
-
})) : (
|
|
2196
|
-
|
|
2222
|
+
})) : (o(), F(y(ge), { key: 1 })),
|
|
2223
|
+
t("span", ys, c(G.value ? s.$t("cms.media.uploading") : s.$t("cms.media.upload")), 1)
|
|
2197
2224
|
], 2),
|
|
2198
|
-
|
|
2199
|
-
onClick:
|
|
2225
|
+
t("div", {
|
|
2226
|
+
onClick: v[5] || (v[5] = (h) => w.value = !0),
|
|
2200
2227
|
class: "flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"
|
|
2201
2228
|
}, [
|
|
2202
|
-
|
|
2203
|
-
|
|
2229
|
+
$(y(gt)),
|
|
2230
|
+
t("span", ms, c(s.$t("cms.media.selectFromMedia")), 1)
|
|
2204
2231
|
])
|
|
2205
|
-
], 4)) :
|
|
2232
|
+
], 4)) : j("", !0)
|
|
2206
2233
|
]))
|
|
2207
2234
|
], 2)
|
|
2208
2235
|
], 16),
|
|
2209
|
-
(
|
|
2210
|
-
|
|
2236
|
+
(o(), F(Me, { to: "body" }, [
|
|
2237
|
+
w.value ? (o(), n("div", {
|
|
2211
2238
|
key: 0,
|
|
2212
2239
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",
|
|
2213
|
-
onClick:
|
|
2240
|
+
onClick: ve
|
|
2214
2241
|
}, [
|
|
2215
|
-
|
|
2242
|
+
t("div", {
|
|
2216
2243
|
class: "bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",
|
|
2217
|
-
onClick:
|
|
2244
|
+
onClick: v[12] || (v[12] = J(() => {
|
|
2218
2245
|
}, ["stop"]))
|
|
2219
2246
|
}, [
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
onClick:
|
|
2247
|
+
t("div", xs, [
|
|
2248
|
+
t("h3", fs, c(s.$t("cms.media.selectFiles")), 1),
|
|
2249
|
+
t("button", {
|
|
2250
|
+
onClick: ve,
|
|
2224
2251
|
class: "text-gray-400 hover:text-gray-600"
|
|
2225
|
-
}, [...
|
|
2226
|
-
|
|
2252
|
+
}, [...v[15] || (v[15] = [
|
|
2253
|
+
t("svg", {
|
|
2227
2254
|
class: "w-6 h-6",
|
|
2228
2255
|
fill: "none",
|
|
2229
2256
|
stroke: "currentColor",
|
|
2230
2257
|
viewBox: "0 0 24 24"
|
|
2231
2258
|
}, [
|
|
2232
|
-
|
|
2259
|
+
t("path", {
|
|
2233
2260
|
"stroke-linecap": "round",
|
|
2234
2261
|
"stroke-linejoin": "round",
|
|
2235
2262
|
"stroke-width": "2",
|
|
@@ -2238,109 +2265,109 @@ const Yl = /* @__PURE__ */ ee(Pl, [["render", Hl]]), Kl = { class: "flex items-c
|
|
|
2238
2265
|
], -1)
|
|
2239
2266
|
])])
|
|
2240
2267
|
]),
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
"current-path":
|
|
2244
|
-
onNavigate:
|
|
2245
|
-
onNavigateBack:
|
|
2268
|
+
t("div", ws, [
|
|
2269
|
+
$(ts, {
|
|
2270
|
+
"current-path": V.value,
|
|
2271
|
+
onNavigate: _e,
|
|
2272
|
+
onNavigateBack: rt
|
|
2246
2273
|
}, null, 8, ["current-path"])
|
|
2247
2274
|
]),
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2275
|
+
t("div", ks, [
|
|
2276
|
+
t("div", _s, [
|
|
2277
|
+
t("div", $s, [
|
|
2278
|
+
t("div", Cs, [
|
|
2279
|
+
$(y(ht), { class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500" }),
|
|
2280
|
+
De(t("input", {
|
|
2254
2281
|
type: "text",
|
|
2255
|
-
placeholder:
|
|
2282
|
+
placeholder: s.$t("cms.media.search"),
|
|
2256
2283
|
class: "w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500",
|
|
2257
|
-
"onUpdate:modelValue":
|
|
2258
|
-
}, null, 8,
|
|
2259
|
-
[
|
|
2284
|
+
"onUpdate:modelValue": v[6] || (v[6] = (h) => O.value = h)
|
|
2285
|
+
}, null, 8, As), [
|
|
2286
|
+
[Te, O.value]
|
|
2260
2287
|
])
|
|
2261
2288
|
]),
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2289
|
+
t("div", Ms, [
|
|
2290
|
+
t("span", js, c(s.$t("cms.media.sortBy.title") + ": "), 1),
|
|
2291
|
+
t("button", {
|
|
2265
2292
|
ref_key: "sortByButton",
|
|
2266
|
-
ref:
|
|
2293
|
+
ref: ce,
|
|
2267
2294
|
class: "relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",
|
|
2268
|
-
onClick:
|
|
2295
|
+
onClick: v[9] || (v[9] = (h) => K.value = !K.value)
|
|
2269
2296
|
}, [
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2297
|
+
$(y(bt), { class: "w-4 h-4" }),
|
|
2298
|
+
t("span", Vs, c(y(Oe).get(se.value)), 1),
|
|
2299
|
+
K.value ? (o(), n("div", Fs, [
|
|
2300
|
+
t("span", {
|
|
2274
2301
|
class: "text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",
|
|
2275
|
-
onClick:
|
|
2276
|
-
},
|
|
2277
|
-
|
|
2302
|
+
onClick: v[7] || (v[7] = J((h) => ae("name"), ["stop"]))
|
|
2303
|
+
}, c(s.$t("cms.media.sortBy.name")), 1),
|
|
2304
|
+
t("span", {
|
|
2278
2305
|
class: "text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",
|
|
2279
|
-
onClick:
|
|
2280
|
-
},
|
|
2281
|
-
])) :
|
|
2306
|
+
onClick: v[8] || (v[8] = J((h) => ae("filesize"), ["stop"]))
|
|
2307
|
+
}, c(s.$t("cms.media.sortBy.filesize")), 1)
|
|
2308
|
+
])) : j("", !0)
|
|
2282
2309
|
], 512)
|
|
2283
2310
|
])
|
|
2284
2311
|
]),
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
class:
|
|
2288
|
-
"shadow bg-blue-600 hover:bg-blue-700 text-white":
|
|
2289
|
-
"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":
|
|
2312
|
+
t("div", Bs, [
|
|
2313
|
+
t("button", {
|
|
2314
|
+
class: Q(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md", {
|
|
2315
|
+
"shadow bg-blue-600 hover:bg-blue-700 text-white": q.value === "grid",
|
|
2316
|
+
"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600": q.value === "list"
|
|
2290
2317
|
}]),
|
|
2291
|
-
onClick:
|
|
2318
|
+
onClick: v[10] || (v[10] = (h) => q.value = "grid")
|
|
2292
2319
|
}, [
|
|
2293
|
-
|
|
2320
|
+
$(y(yt), { class: "w-4 h-4" })
|
|
2294
2321
|
], 2),
|
|
2295
|
-
|
|
2296
|
-
class:
|
|
2297
|
-
"shadow bg-blue-600 hover:bg-blue-700 text-white":
|
|
2298
|
-
"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":
|
|
2322
|
+
t("button", {
|
|
2323
|
+
class: Q(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md", {
|
|
2324
|
+
"shadow bg-blue-600 hover:bg-blue-700 text-white": q.value === "list",
|
|
2325
|
+
"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600": q.value === "grid"
|
|
2299
2326
|
}]),
|
|
2300
|
-
onClick:
|
|
2327
|
+
onClick: v[11] || (v[11] = (h) => q.value = "list")
|
|
2301
2328
|
}, [
|
|
2302
|
-
|
|
2329
|
+
$(y(mt), { class: "w-4 h-4" })
|
|
2303
2330
|
], 2)
|
|
2304
2331
|
])
|
|
2305
2332
|
])
|
|
2306
2333
|
]),
|
|
2307
|
-
|
|
2308
|
-
|
|
2334
|
+
t("div", Ss, [
|
|
2335
|
+
q.value === "grid" ? (o(), F(fl, {
|
|
2309
2336
|
key: 0,
|
|
2310
|
-
files:
|
|
2311
|
-
"selected-file":
|
|
2312
|
-
"selected-files":
|
|
2313
|
-
onFileClick:
|
|
2314
|
-
}, null, 8, ["files", "selected-file", "selected-files"])) : (
|
|
2337
|
+
files: D.value,
|
|
2338
|
+
"selected-file": f.value ? null : B.value,
|
|
2339
|
+
"selected-files": f.value ? E.value : [],
|
|
2340
|
+
onFileClick: ke
|
|
2341
|
+
}, null, 8, ["files", "selected-file", "selected-files"])) : (o(), F(Hl, {
|
|
2315
2342
|
key: 1,
|
|
2316
|
-
files:
|
|
2317
|
-
"selected-file":
|
|
2318
|
-
"selected-files":
|
|
2319
|
-
onFileClick:
|
|
2343
|
+
files: D.value,
|
|
2344
|
+
"selected-file": f.value ? null : B.value,
|
|
2345
|
+
"selected-files": f.value ? E.value : [],
|
|
2346
|
+
onFileClick: ke
|
|
2320
2347
|
}, null, 8, ["files", "selected-file", "selected-files"]))
|
|
2321
2348
|
]),
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
onClick:
|
|
2326
|
-
disabled:
|
|
2349
|
+
t("div", qs, [
|
|
2350
|
+
f.value && E.value.length > 0 ? (o(), n("div", zs, c(s.$t("cms.media.selectedFiles", { count: E.value.length })), 1)) : (o(), n("div", Es)),
|
|
2351
|
+
t("button", {
|
|
2352
|
+
onClick: tt,
|
|
2353
|
+
disabled: f.value ? E.value.length === 0 : !B.value,
|
|
2327
2354
|
class: "flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"
|
|
2328
2355
|
}, [
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
], 8,
|
|
2356
|
+
$(y(ye), { class: "w-4 h-4 mr-2" }),
|
|
2357
|
+
X(" " + c(s.$t("cms.common.actions.add")), 1)
|
|
2358
|
+
], 8, Is)
|
|
2332
2359
|
])
|
|
2333
2360
|
])
|
|
2334
|
-
])) :
|
|
2361
|
+
])) : j("", !0)
|
|
2335
2362
|
]))
|
|
2336
2363
|
], 64));
|
|
2337
2364
|
}
|
|
2338
|
-
},
|
|
2339
|
-
function
|
|
2340
|
-
const
|
|
2341
|
-
return
|
|
2365
|
+
}, Ts = {};
|
|
2366
|
+
function Ls(e, l) {
|
|
2367
|
+
const a = me("vs-richtext-md", !0);
|
|
2368
|
+
return o(), F(a, { class: "w-full h-[300px]" });
|
|
2342
2369
|
}
|
|
2343
|
-
const
|
|
2370
|
+
const Aa = /* @__PURE__ */ te(Ts, [["render", Ls]]), Ns = {
|
|
2344
2371
|
props: {
|
|
2345
2372
|
min: { type: Number },
|
|
2346
2373
|
step: { type: Number, default: () => 1 },
|
|
@@ -2373,31 +2400,31 @@ const wa = /* @__PURE__ */ ee(qs, [["render", zs]]), Es = {
|
|
|
2373
2400
|
this.$emit("blur"), isNaN(e) ? e = this.min : e > this.max ? e = this.max : e < this.min && (e = this.min), this.inputValue = e, this.$emit("update:modelValue", this.inputValue);
|
|
2374
2401
|
}
|
|
2375
2402
|
}
|
|
2376
|
-
},
|
|
2377
|
-
function
|
|
2378
|
-
return
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2403
|
+
}, Gs = { class: "p-0" }, Qs = ["step", "min", "max", "id", "placeholder", "disabled"];
|
|
2404
|
+
function Zs(e, l, a, b, u, d) {
|
|
2405
|
+
return o(), n("div", Gs, [
|
|
2406
|
+
dt(e.$slots, "label", it(ut({ id: u.id }))),
|
|
2407
|
+
De(t("input", {
|
|
2408
|
+
"onUpdate:modelValue": l[0] || (l[0] = (x) => u.inputValue = x),
|
|
2382
2409
|
type: "number",
|
|
2383
|
-
onKeydown: l[1] || (l[1] = (...
|
|
2384
|
-
onBlur: l[2] || (l[2] = (...
|
|
2385
|
-
step:
|
|
2386
|
-
min:
|
|
2387
|
-
max:
|
|
2410
|
+
onKeydown: l[1] || (l[1] = (...x) => d.validateInput && d.validateInput(...x)),
|
|
2411
|
+
onBlur: l[2] || (l[2] = (...x) => d.handleBlur && d.handleBlur(...x)),
|
|
2412
|
+
step: a.step,
|
|
2413
|
+
min: a.min,
|
|
2414
|
+
max: a.max,
|
|
2388
2415
|
id: u.id,
|
|
2389
2416
|
"aria-describedby": "helper-text-explanation",
|
|
2390
|
-
class:
|
|
2391
|
-
placeholder:
|
|
2392
|
-
disabled:
|
|
2393
|
-
}, null, 42,
|
|
2394
|
-
[
|
|
2417
|
+
class: Q(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600", { "cursor-not-allowed": a.disabled }]),
|
|
2418
|
+
placeholder: a.placeholder,
|
|
2419
|
+
disabled: a.disabled
|
|
2420
|
+
}, null, 42, Qs), [
|
|
2421
|
+
[Te, u.inputValue]
|
|
2395
2422
|
])
|
|
2396
2423
|
]);
|
|
2397
2424
|
}
|
|
2398
|
-
const
|
|
2425
|
+
const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-center justify-end gap-2" }, Ws = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Rs = {
|
|
2399
2426
|
__name: "vs-form-custom-datatable-controls",
|
|
2400
|
-
props: /* @__PURE__ */
|
|
2427
|
+
props: /* @__PURE__ */ W({
|
|
2401
2428
|
item: {
|
|
2402
2429
|
type: Object,
|
|
2403
2430
|
required: !0
|
|
@@ -2415,8 +2442,8 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2415
2442
|
}),
|
|
2416
2443
|
emits: ["update:modelValue"],
|
|
2417
2444
|
setup(e) {
|
|
2418
|
-
const { t: l } =
|
|
2419
|
-
|
|
2445
|
+
const { t: l } = Y(), a = Le(() => import("@opengis/form")), b = e, u = Z(e, "modelValue"), d = A(!1), x = A({}), m = A({}), f = () => {
|
|
2446
|
+
Ze({
|
|
2420
2447
|
title: l("cms.builder.deleteTitle"),
|
|
2421
2448
|
message: l("cms.builder.deleteField"),
|
|
2422
2449
|
type: "error",
|
|
@@ -2425,10 +2452,10 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2425
2452
|
}
|
|
2426
2453
|
});
|
|
2427
2454
|
}, p = () => {
|
|
2428
|
-
u.value = u.value.filter((
|
|
2429
|
-
},
|
|
2430
|
-
if (await
|
|
2431
|
-
|
|
2455
|
+
u.value = u.value.filter((i) => i.id !== b.item.id);
|
|
2456
|
+
}, r = async () => {
|
|
2457
|
+
if (await m.value.validate()) {
|
|
2458
|
+
ie({
|
|
2432
2459
|
type: "warning",
|
|
2433
2460
|
title: l("cms.common.actions.warning"),
|
|
2434
2461
|
message: l("cms.builder.editFieldFailed")
|
|
@@ -2436,58 +2463,58 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2436
2463
|
return;
|
|
2437
2464
|
}
|
|
2438
2465
|
u.value = u.value.map(
|
|
2439
|
-
(
|
|
2440
|
-
),
|
|
2466
|
+
(M) => M.id === b.item.id ? x.value : M
|
|
2467
|
+
), d.value = !1;
|
|
2441
2468
|
};
|
|
2442
|
-
return
|
|
2443
|
-
|
|
2444
|
-
}), (
|
|
2445
|
-
|
|
2469
|
+
return H(d, (i) => {
|
|
2470
|
+
i && (x.value = b.item);
|
|
2471
|
+
}), (i, M) => (o(), n("div", Us, [
|
|
2472
|
+
t("button", {
|
|
2446
2473
|
class: "inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm",
|
|
2447
|
-
onClick:
|
|
2474
|
+
onClick: M[0] || (M[0] = (k) => d.value = !0)
|
|
2448
2475
|
}, [
|
|
2449
|
-
|
|
2476
|
+
$(y(xt), { class: "w-4 h-4" })
|
|
2450
2477
|
]),
|
|
2451
|
-
|
|
2452
|
-
onClick:
|
|
2478
|
+
t("button", {
|
|
2479
|
+
onClick: f,
|
|
2453
2480
|
class: "inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2454
2481
|
}, [
|
|
2455
|
-
|
|
2482
|
+
$(y(ee), { class: "w-4 h-4" })
|
|
2456
2483
|
]),
|
|
2457
|
-
|
|
2484
|
+
$(y(Ue), {
|
|
2458
2485
|
teleport: "#modal",
|
|
2459
|
-
title:
|
|
2460
|
-
visible:
|
|
2461
|
-
onClose:
|
|
2486
|
+
title: i.$t("cms.builder.editField"),
|
|
2487
|
+
visible: d.value,
|
|
2488
|
+
onClose: M[4] || (M[4] = (k) => d.value = !1)
|
|
2462
2489
|
}, {
|
|
2463
|
-
footer:
|
|
2464
|
-
|
|
2465
|
-
|
|
2490
|
+
footer: U(() => [
|
|
2491
|
+
t("div", Ws, [
|
|
2492
|
+
t("button", {
|
|
2466
2493
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",
|
|
2467
|
-
onClick:
|
|
2468
|
-
}, i
|
|
2469
|
-
|
|
2470
|
-
onClick:
|
|
2494
|
+
onClick: M[3] || (M[3] = (k) => d.value = !1)
|
|
2495
|
+
}, c(i.$t("cms.common.actions.cancel")), 1),
|
|
2496
|
+
t("button", {
|
|
2497
|
+
onClick: r,
|
|
2471
2498
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
2472
|
-
}, i
|
|
2499
|
+
}, c(i.$t("cms.common.actions.save")), 1)
|
|
2473
2500
|
])
|
|
2474
2501
|
]),
|
|
2475
|
-
default:
|
|
2476
|
-
|
|
2477
|
-
form:
|
|
2478
|
-
"onUpdate:form":
|
|
2502
|
+
default: U(() => [
|
|
2503
|
+
$(y(a), {
|
|
2504
|
+
form: m.value,
|
|
2505
|
+
"onUpdate:form": M[1] || (M[1] = (k) => m.value = k),
|
|
2479
2506
|
schema: e.colModel,
|
|
2480
|
-
modelValue:
|
|
2481
|
-
"onUpdate:modelValue":
|
|
2507
|
+
modelValue: x.value,
|
|
2508
|
+
"onUpdate:modelValue": M[2] || (M[2] = (k) => x.value = k)
|
|
2482
2509
|
}, null, 8, ["form", "schema", "modelValue"])
|
|
2483
2510
|
]),
|
|
2484
2511
|
_: 1
|
|
2485
2512
|
}, 8, ["title", "visible"])
|
|
2486
2513
|
]));
|
|
2487
2514
|
}
|
|
2488
|
-
},
|
|
2515
|
+
}, Ps = { class: "p-6 border-t border-slate-200 dark:border-slate-700 bg-slate-50/30 dark:bg-slate-700/30" }, Hs = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Os = {
|
|
2489
2516
|
__name: "vs-form-custom-datatable-add",
|
|
2490
|
-
props: /* @__PURE__ */
|
|
2517
|
+
props: /* @__PURE__ */ W({
|
|
2491
2518
|
colModel: {
|
|
2492
2519
|
type: Array,
|
|
2493
2520
|
required: !0
|
|
@@ -2501,81 +2528,81 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2501
2528
|
}),
|
|
2502
2529
|
emits: ["update:modelValue"],
|
|
2503
2530
|
setup(e) {
|
|
2504
|
-
const { t: l } =
|
|
2531
|
+
const { t: l } = Y(), a = Le(() => import("@opengis/form")), b = Z(e, "modelValue"), u = A(!1), d = A({}), x = A({}), m = async () => {
|
|
2505
2532
|
try {
|
|
2506
|
-
if (await
|
|
2507
|
-
|
|
2533
|
+
if (await x.value.validate()) {
|
|
2534
|
+
ie({
|
|
2508
2535
|
type: "warning",
|
|
2509
2536
|
title: l("cms.common.actions.warning"),
|
|
2510
2537
|
message: l("cms.builder.editFieldFailed")
|
|
2511
2538
|
});
|
|
2512
2539
|
return;
|
|
2513
2540
|
}
|
|
2514
|
-
|
|
2515
|
-
...
|
|
2516
|
-
{ ...
|
|
2517
|
-
], u.value = !1,
|
|
2518
|
-
} catch (
|
|
2519
|
-
console.log(
|
|
2541
|
+
b.value = [
|
|
2542
|
+
...b.value || [],
|
|
2543
|
+
{ ...d.value, id: Math.random().toString(36).substring(2, 15) }
|
|
2544
|
+
], u.value = !1, d.value = {};
|
|
2545
|
+
} catch (f) {
|
|
2546
|
+
console.log(f);
|
|
2520
2547
|
}
|
|
2521
2548
|
};
|
|
2522
|
-
return (
|
|
2523
|
-
|
|
2549
|
+
return (f, p) => (o(), n("div", Ps, [
|
|
2550
|
+
t("button", {
|
|
2524
2551
|
class: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow-sm h-9 px-4 w-full border-2 border-dashed border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600 hover:border-blue-400 dark:hover:border-blue-500 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 py-3 transition-all duration-200",
|
|
2525
|
-
onClick: p[0] || (p[0] = (
|
|
2552
|
+
onClick: p[0] || (p[0] = (r) => u.value = !0)
|
|
2526
2553
|
}, [
|
|
2527
|
-
|
|
2528
|
-
|
|
2554
|
+
$(y(ye), { class: "w-4 h-4 mr-2" }),
|
|
2555
|
+
X(" " + c(f.$t("cms.common.actions.add")), 1)
|
|
2529
2556
|
]),
|
|
2530
|
-
|
|
2557
|
+
$(y(Ue), {
|
|
2531
2558
|
teleport: "#modal",
|
|
2532
|
-
title:
|
|
2559
|
+
title: f.$t("cms.common.actions.add"),
|
|
2533
2560
|
visible: u.value,
|
|
2534
|
-
onClose: p[4] || (p[4] = (
|
|
2561
|
+
onClose: p[4] || (p[4] = (r) => u.value = !1)
|
|
2535
2562
|
}, {
|
|
2536
|
-
footer:
|
|
2537
|
-
|
|
2538
|
-
|
|
2563
|
+
footer: U(() => [
|
|
2564
|
+
t("div", Hs, [
|
|
2565
|
+
t("button", {
|
|
2539
2566
|
class: "inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",
|
|
2540
|
-
onClick: p[3] || (p[3] = (
|
|
2541
|
-
},
|
|
2542
|
-
|
|
2543
|
-
onClick:
|
|
2567
|
+
onClick: p[3] || (p[3] = (r) => u.value = !1)
|
|
2568
|
+
}, c(f.$t("cms.common.actions.cancel")), 1),
|
|
2569
|
+
t("button", {
|
|
2570
|
+
onClick: m,
|
|
2544
2571
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
2545
|
-
},
|
|
2572
|
+
}, c(f.$t("cms.common.actions.save")), 1)
|
|
2546
2573
|
])
|
|
2547
2574
|
]),
|
|
2548
|
-
default:
|
|
2549
|
-
|
|
2550
|
-
form:
|
|
2551
|
-
"onUpdate:form": p[1] || (p[1] = (
|
|
2575
|
+
default: U(() => [
|
|
2576
|
+
$(y(a), {
|
|
2577
|
+
form: x.value,
|
|
2578
|
+
"onUpdate:form": p[1] || (p[1] = (r) => x.value = r),
|
|
2552
2579
|
schema: e.colModel,
|
|
2553
|
-
modelValue:
|
|
2554
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2580
|
+
modelValue: d.value,
|
|
2581
|
+
"onUpdate:modelValue": p[2] || (p[2] = (r) => d.value = r)
|
|
2555
2582
|
}, null, 8, ["form", "schema", "modelValue"])
|
|
2556
2583
|
]),
|
|
2557
2584
|
_: 1
|
|
2558
2585
|
}, 8, ["title", "visible"])
|
|
2559
2586
|
]));
|
|
2560
2587
|
}
|
|
2561
|
-
},
|
|
2588
|
+
}, Ys = { class: "p-0 shadow w-full" }, Ks = { class: "overflow-x-auto" }, Js = { class: "relative w-full overflow-auto" }, Xs = { class: "w-full caption-bottom text-sm" }, ea = { class: "[&_tr]:border-b" }, ta = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ra = { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-end" }, la = { class: "[&_tr:last-child]:border-0" }, sa = ["onDragstart", "onDragover", "onDrop", "onDragenter"], aa = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, oa = { class: "flex items-center justify-center text-slate-400" }, na = ["innerHTML"], da = {
|
|
2562
2589
|
key: 1,
|
|
2563
2590
|
class: "flex items-center gap-2"
|
|
2564
|
-
},
|
|
2591
|
+
}, ia = {
|
|
2565
2592
|
key: 0,
|
|
2566
2593
|
class: "flex items-center gap-1"
|
|
2567
|
-
},
|
|
2594
|
+
}, ua = ["src", "alt"], ca = {
|
|
2568
2595
|
key: 0,
|
|
2569
2596
|
class: "text-xs text-gray-500 dark:text-gray-400 ml-1"
|
|
2570
|
-
},
|
|
2597
|
+
}, va = {
|
|
2571
2598
|
key: 1,
|
|
2572
2599
|
class: "w-8 h-8 rounded bg-gray-100 dark:bg-gray-700 flex items-center justify-center"
|
|
2573
|
-
},
|
|
2600
|
+
}, pa = { key: 2 }, ga = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, ha = {
|
|
2574
2601
|
key: 0,
|
|
2575
2602
|
class: "h-2 bg-blue-200 dark:bg-blue-800 transition-all duration-200"
|
|
2576
|
-
},
|
|
2603
|
+
}, Ee = 3, ja = {
|
|
2577
2604
|
__name: "vs-form-custom-datatable",
|
|
2578
|
-
props: /* @__PURE__ */
|
|
2605
|
+
props: /* @__PURE__ */ W({
|
|
2579
2606
|
colModel: {
|
|
2580
2607
|
type: Array,
|
|
2581
2608
|
required: !0
|
|
@@ -2589,124 +2616,124 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2589
2616
|
}),
|
|
2590
2617
|
emits: ["update:modelValue"],
|
|
2591
2618
|
setup(e) {
|
|
2592
|
-
const l =
|
|
2593
|
-
|
|
2594
|
-
},
|
|
2595
|
-
|
|
2596
|
-
},
|
|
2597
|
-
|
|
2598
|
-
},
|
|
2599
|
-
|
|
2600
|
-
}, p = (
|
|
2601
|
-
if (
|
|
2619
|
+
const l = Z(e, "modelValue"), a = A(null), b = A(-1), u = A(!1), d = (k, _, w) => {
|
|
2620
|
+
a.value = _, b.value = w, k.dataTransfer.effectAllowed = "move", k.dataTransfer.setData("text/html", "");
|
|
2621
|
+
}, x = (k, _) => {
|
|
2622
|
+
k.preventDefault(), k.dataTransfer.dropEffect = "move";
|
|
2623
|
+
}, m = (k, _) => {
|
|
2624
|
+
b.value !== _ && (u.value = !0);
|
|
2625
|
+
}, f = (k) => {
|
|
2626
|
+
k.currentTarget.contains(k.relatedTarget) || (u.value = !1);
|
|
2627
|
+
}, p = (k, _) => {
|
|
2628
|
+
if (k.preventDefault(), u.value = !1, b.value === -1 || b.value === _)
|
|
2602
2629
|
return;
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
},
|
|
2606
|
-
const
|
|
2607
|
-
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2630
|
+
const w = [...l.value], [q] = w.splice(b.value, 1);
|
|
2631
|
+
w.splice(_, 0, q), l.value = w, a.value = null, b.value = -1;
|
|
2632
|
+
}, r = (k) => Array.isArray(k) ? k.slice(0, Ee) : [], i = (k) => Array.isArray(k) ? Math.max(0, k.length - Ee) : 0, M = (k) => {
|
|
2633
|
+
const _ = k.target;
|
|
2634
|
+
_.style.display = "none";
|
|
2635
|
+
const w = document.createElement("cms.div");
|
|
2636
|
+
w.className = "w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600", w.innerHTML = `
|
|
2610
2637
|
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
2611
2638
|
<path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd" />
|
|
2612
2639
|
</svg>
|
|
2613
|
-
`,
|
|
2640
|
+
`, _.parentNode.appendChild(w);
|
|
2614
2641
|
};
|
|
2615
|
-
return
|
|
2616
|
-
var
|
|
2617
|
-
(
|
|
2618
|
-
(
|
|
2642
|
+
return de(() => {
|
|
2643
|
+
var k, _;
|
|
2644
|
+
(_ = (k = l.value) == null ? void 0 : k.filter((w) => typeof w == "object")) == null || _.forEach(
|
|
2645
|
+
(w) => w.id ? w.id : w.id = Math.random().toString(36).substring(2, 15)
|
|
2619
2646
|
);
|
|
2620
|
-
}), (
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
(
|
|
2628
|
-
key:
|
|
2647
|
+
}), (k, _) => (o(), n("div", Ys, [
|
|
2648
|
+
t("div", Ks, [
|
|
2649
|
+
t("div", Js, [
|
|
2650
|
+
t("table", Xs, [
|
|
2651
|
+
t("thead", ea, [
|
|
2652
|
+
t("tr", ta, [
|
|
2653
|
+
_[4] || (_[4] = t("th", { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, null, -1)),
|
|
2654
|
+
(o(!0), n(L, null, P(e.colModel, (w) => (o(), n("th", {
|
|
2655
|
+
key: w.name,
|
|
2629
2656
|
class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
|
|
2630
|
-
},
|
|
2631
|
-
|
|
2657
|
+
}, c(w.label || w.title || w.name), 1))), 128)),
|
|
2658
|
+
t("th", ra, c(k.$t("cms.table.actions")), 1)
|
|
2632
2659
|
])
|
|
2633
2660
|
]),
|
|
2634
|
-
|
|
2635
|
-
(
|
|
2636
|
-
key:
|
|
2637
|
-
class:
|
|
2661
|
+
t("tbody", la, [
|
|
2662
|
+
(o(!0), n(L, null, P(l.value, (w, q) => (o(), n("tr", {
|
|
2663
|
+
key: w == null ? void 0 : w.id,
|
|
2664
|
+
class: Q(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", { "opacity-50": a.value === w }]),
|
|
2638
2665
|
draggable: "true",
|
|
2639
|
-
onDragstart: (
|
|
2640
|
-
onDragover: (
|
|
2641
|
-
onDrop: (
|
|
2642
|
-
onDragenter: (
|
|
2643
|
-
onDragleave:
|
|
2666
|
+
onDragstart: (V) => d(V, w, q),
|
|
2667
|
+
onDragover: (V) => x(V),
|
|
2668
|
+
onDrop: (V) => p(V, q),
|
|
2669
|
+
onDragenter: (V) => m(V, q),
|
|
2670
|
+
onDragleave: _[2] || (_[2] = (V) => f(V))
|
|
2644
2671
|
}, [
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2672
|
+
t("td", aa, [
|
|
2673
|
+
t("div", oa, [
|
|
2674
|
+
$(y(xe))
|
|
2648
2675
|
])
|
|
2649
2676
|
]),
|
|
2650
|
-
(
|
|
2651
|
-
key:
|
|
2677
|
+
(o(!0), n(L, null, P(e.colModel, (V) => (o(), n("td", {
|
|
2678
|
+
key: V.name,
|
|
2652
2679
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"
|
|
2653
2680
|
}, [
|
|
2654
|
-
|
|
2681
|
+
V.type === "Texteditor" ? (o(), n("span", {
|
|
2655
2682
|
key: 0,
|
|
2656
|
-
innerHTML:
|
|
2657
|
-
}, null, 8,
|
|
2658
|
-
Array.isArray(
|
|
2659
|
-
(
|
|
2660
|
-
key:
|
|
2683
|
+
innerHTML: w[V.key] || "-"
|
|
2684
|
+
}, null, 8, na)) : V.type === "File" ? (o(), n("div", da, [
|
|
2685
|
+
Array.isArray(w[V.key]) && w[V.key].length > 0 ? (o(), n("div", ia, [
|
|
2686
|
+
(o(!0), n(L, null, P(r(w[V.key]), (D, N) => (o(), n("div", {
|
|
2687
|
+
key: N,
|
|
2661
2688
|
class: "relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"
|
|
2662
2689
|
}, [
|
|
2663
|
-
|
|
2664
|
-
src:
|
|
2665
|
-
alt: `Image ${
|
|
2690
|
+
t("img", {
|
|
2691
|
+
src: D,
|
|
2692
|
+
alt: `Image ${N + 1}`,
|
|
2666
2693
|
class: "w-full h-full object-cover",
|
|
2667
|
-
onError:
|
|
2668
|
-
}, null, 40,
|
|
2694
|
+
onError: _[0] || (_[0] = (B) => M(B))
|
|
2695
|
+
}, null, 40, ua)
|
|
2669
2696
|
]))), 128)),
|
|
2670
|
-
|
|
2671
|
-
])) : (
|
|
2672
|
-
|
|
2697
|
+
i(w[V.key]) > 0 ? (o(), n("span", ca, " +" + c(i(w[V.key])), 1)) : j("", !0)
|
|
2698
|
+
])) : (o(), n("div", va, [..._[5] || (_[5] = [
|
|
2699
|
+
t("svg", {
|
|
2673
2700
|
class: "w-4 h-4 text-gray-400",
|
|
2674
2701
|
fill: "currentColor",
|
|
2675
2702
|
viewBox: "0 0 20 20"
|
|
2676
2703
|
}, [
|
|
2677
|
-
|
|
2704
|
+
t("path", {
|
|
2678
2705
|
"fill-rule": "evenodd",
|
|
2679
2706
|
d: "M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z",
|
|
2680
2707
|
"clip-rule": "evenodd"
|
|
2681
2708
|
})
|
|
2682
2709
|
], -1)
|
|
2683
2710
|
])]))
|
|
2684
|
-
])) : (
|
|
2711
|
+
])) : (o(), n("span", pa, c(w[V.key] || "-"), 1))
|
|
2685
2712
|
]))), 128)),
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
item:
|
|
2713
|
+
t("td", ga, [
|
|
2714
|
+
$(Rs, {
|
|
2715
|
+
item: w,
|
|
2689
2716
|
colModel: e.colModel,
|
|
2690
2717
|
modelValue: l.value,
|
|
2691
|
-
"onUpdate:modelValue":
|
|
2718
|
+
"onUpdate:modelValue": _[1] || (_[1] = (V) => l.value = V)
|
|
2692
2719
|
}, null, 8, ["item", "colModel", "modelValue"])
|
|
2693
2720
|
])
|
|
2694
|
-
], 42,
|
|
2695
|
-
u.value ? (
|
|
2721
|
+
], 42, sa))), 128)),
|
|
2722
|
+
u.value ? (o(), n("tr", ha)) : j("", !0)
|
|
2696
2723
|
])
|
|
2697
2724
|
])
|
|
2698
2725
|
])
|
|
2699
2726
|
]),
|
|
2700
|
-
|
|
2727
|
+
$(Os, {
|
|
2701
2728
|
colModel: e.colModel,
|
|
2702
2729
|
modelValue: l.value,
|
|
2703
|
-
"onUpdate:modelValue":
|
|
2730
|
+
"onUpdate:modelValue": _[3] || (_[3] = (w) => l.value = w)
|
|
2704
2731
|
}, null, 8, ["colModel", "modelValue"])
|
|
2705
2732
|
]));
|
|
2706
2733
|
}
|
|
2707
|
-
},
|
|
2734
|
+
}, Va = {
|
|
2708
2735
|
__name: "vs-form-reletion-link",
|
|
2709
|
-
props: /* @__PURE__ */
|
|
2736
|
+
props: /* @__PURE__ */ W({
|
|
2710
2737
|
relation: {
|
|
2711
2738
|
type: String,
|
|
2712
2739
|
required: !0
|
|
@@ -2717,24 +2744,24 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2717
2744
|
}),
|
|
2718
2745
|
emits: ["update:modelValue"],
|
|
2719
2746
|
setup(e) {
|
|
2720
|
-
const l =
|
|
2721
|
-
return
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2724
|
-
}), (
|
|
2725
|
-
var
|
|
2726
|
-
return (
|
|
2747
|
+
const l = Z(e, "modelValue"), a = e, b = A([]);
|
|
2748
|
+
return de(async () => {
|
|
2749
|
+
const x = await (await fetch(`/api/cms-suggest/${a.relation}`)).json();
|
|
2750
|
+
b.value = x == null ? void 0 : x.data;
|
|
2751
|
+
}), (d, x) => {
|
|
2752
|
+
var m;
|
|
2753
|
+
return (m = b.value) != null && m.length ? (o(), F(y(ft), {
|
|
2727
2754
|
key: 0,
|
|
2728
2755
|
mode: "combo",
|
|
2729
2756
|
modelValue: l.value,
|
|
2730
|
-
"onUpdate:modelValue":
|
|
2731
|
-
options:
|
|
2732
|
-
}, null, 8, ["modelValue", "options"])) :
|
|
2757
|
+
"onUpdate:modelValue": x[0] || (x[0] = (f) => l.value = f),
|
|
2758
|
+
options: b.value
|
|
2759
|
+
}, null, 8, ["modelValue", "options"])) : j("", !0);
|
|
2733
2760
|
};
|
|
2734
2761
|
}
|
|
2735
|
-
},
|
|
2736
|
-
var
|
|
2737
|
-
const l = (
|
|
2762
|
+
}, ba = (e) => {
|
|
2763
|
+
var b, u;
|
|
2764
|
+
const l = (b = e == null ? void 0 : e.type) == null ? void 0 : b.toLowerCase(), a = e != null && e.required ? ["required"] : null;
|
|
2738
2765
|
return l === "array" ? {
|
|
2739
2766
|
key: e.name,
|
|
2740
2767
|
label: e.label || e.title,
|
|
@@ -2744,33 +2771,33 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2744
2771
|
type: (e == null ? void 0 : e.subtype) || "text",
|
|
2745
2772
|
placeholder: e == null ? void 0 : e.placeholder
|
|
2746
2773
|
},
|
|
2747
|
-
validators:
|
|
2774
|
+
validators: a
|
|
2748
2775
|
} : l === "boolean" ? {
|
|
2749
2776
|
key: e.name,
|
|
2750
2777
|
label: e.label || e.title,
|
|
2751
2778
|
type: "Switcher",
|
|
2752
2779
|
help: e == null ? void 0 : e.help,
|
|
2753
|
-
validators:
|
|
2780
|
+
validators: a
|
|
2754
2781
|
} : l === "tags" ? {
|
|
2755
2782
|
key: e.name,
|
|
2756
2783
|
label: e.label || e.title,
|
|
2757
2784
|
type: "tags",
|
|
2758
2785
|
help: e == null ? void 0 : e.help,
|
|
2759
|
-
validators:
|
|
2786
|
+
validators: a
|
|
2760
2787
|
} : l === "radio" ? {
|
|
2761
2788
|
key: e.name,
|
|
2762
2789
|
label: e.label || e.title,
|
|
2763
2790
|
type: "radio",
|
|
2764
2791
|
help: e == null ? void 0 : e.help,
|
|
2765
2792
|
options: e.options || [],
|
|
2766
|
-
validators:
|
|
2793
|
+
validators: a
|
|
2767
2794
|
} : l === "date" ? {
|
|
2768
2795
|
key: e.name,
|
|
2769
2796
|
label: e.label || e.title,
|
|
2770
2797
|
type: "Date",
|
|
2771
2798
|
time: !1,
|
|
2772
2799
|
help: e == null ? void 0 : e.help,
|
|
2773
|
-
validators:
|
|
2800
|
+
validators: a
|
|
2774
2801
|
} : l === "datetime" ? {
|
|
2775
2802
|
key: e.name,
|
|
2776
2803
|
label: e.label || e.title,
|
|
@@ -2778,32 +2805,32 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2778
2805
|
help: e == null ? void 0 : e.help,
|
|
2779
2806
|
mode: "datetime",
|
|
2780
2807
|
time: !0,
|
|
2781
|
-
validators:
|
|
2808
|
+
validators: a
|
|
2782
2809
|
} : l === "number" ? {
|
|
2783
2810
|
key: e.name,
|
|
2784
2811
|
label: e.label || e.title,
|
|
2785
2812
|
help: e == null ? void 0 : e.help,
|
|
2786
2813
|
type: "Number",
|
|
2787
|
-
validators:
|
|
2814
|
+
validators: a
|
|
2788
2815
|
} : l === "integer" ? {
|
|
2789
2816
|
key: e.name,
|
|
2790
2817
|
label: e.label || e.title,
|
|
2791
2818
|
type: "Integer",
|
|
2792
2819
|
help: e == null ? void 0 : e.help,
|
|
2793
|
-
validators:
|
|
2820
|
+
validators: a
|
|
2794
2821
|
} : l === "text" ? {
|
|
2795
2822
|
key: e.name,
|
|
2796
2823
|
label: e.label || e.title,
|
|
2797
2824
|
type: "Text",
|
|
2798
2825
|
help: e == null ? void 0 : e.help,
|
|
2799
|
-
validators:
|
|
2826
|
+
validators: a
|
|
2800
2827
|
} : l === "file" ? {
|
|
2801
2828
|
key: e.name,
|
|
2802
2829
|
label: e.label || e.title,
|
|
2803
2830
|
type: "File",
|
|
2804
2831
|
multiple: e.multi || e.multiple,
|
|
2805
2832
|
help: e == null ? void 0 : e.help,
|
|
2806
|
-
validators:
|
|
2833
|
+
validators: a,
|
|
2807
2834
|
api: "/api/cms-media/upload?subdir=",
|
|
2808
2835
|
dir: "uploads/" + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US").replace(/\//g, "-")
|
|
2809
2836
|
} : l === "filelist" ? {
|
|
@@ -2812,21 +2839,21 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2812
2839
|
type: "file",
|
|
2813
2840
|
multiple: !0,
|
|
2814
2841
|
help: e == null ? void 0 : e.help,
|
|
2815
|
-
validators:
|
|
2842
|
+
validators: a
|
|
2816
2843
|
} : l === "slug" ? {
|
|
2817
2844
|
key: e.name,
|
|
2818
2845
|
label: e.label || e.title,
|
|
2819
2846
|
type: "Slug",
|
|
2820
2847
|
parent: e.parent || "",
|
|
2821
2848
|
help: e == null ? void 0 : e.help,
|
|
2822
|
-
validators:
|
|
2849
|
+
validators: a
|
|
2823
2850
|
} : l === "image" ? {
|
|
2824
2851
|
key: e.name,
|
|
2825
2852
|
label: e.label || e.title,
|
|
2826
2853
|
type: "File",
|
|
2827
2854
|
multi: e.multiple,
|
|
2828
2855
|
help: e == null ? void 0 : e.help,
|
|
2829
|
-
validators:
|
|
2856
|
+
validators: a,
|
|
2830
2857
|
api: "/api/cms-media/upload?subdir=",
|
|
2831
2858
|
dir: "uploads/" + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US").replace(/\//g, "-")
|
|
2832
2859
|
} : l === "select" ? e.options ? {
|
|
@@ -2835,14 +2862,14 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2835
2862
|
type: "select",
|
|
2836
2863
|
options: e.options || [],
|
|
2837
2864
|
help: e == null ? void 0 : e.help,
|
|
2838
|
-
validators:
|
|
2865
|
+
validators: a
|
|
2839
2866
|
} : {
|
|
2840
2867
|
key: e.name,
|
|
2841
2868
|
label: e.label || e.title,
|
|
2842
2869
|
type: "select",
|
|
2843
2870
|
data: e.data || [],
|
|
2844
2871
|
help: e == null ? void 0 : e.help,
|
|
2845
|
-
validators:
|
|
2872
|
+
validators: a
|
|
2846
2873
|
} : l === "multiselect" ? {
|
|
2847
2874
|
key: e.name,
|
|
2848
2875
|
label: e.label || e.title,
|
|
@@ -2851,70 +2878,70 @@ const ka = /* @__PURE__ */ ee(Es, [["render", Ts]]), Ls = { class: "flex items-c
|
|
|
2851
2878
|
parent: e.parent || "",
|
|
2852
2879
|
options: e.options || [],
|
|
2853
2880
|
help: e == null ? void 0 : e.help,
|
|
2854
|
-
validators:
|
|
2881
|
+
validators: a,
|
|
2855
2882
|
multiple: !0
|
|
2856
2883
|
} : l === "richtext" ? {
|
|
2857
2884
|
key: e.name,
|
|
2858
2885
|
label: e.label || e.title,
|
|
2859
2886
|
type: "Texteditor",
|
|
2860
2887
|
help: e == null ? void 0 : e.help,
|
|
2861
|
-
validators:
|
|
2888
|
+
validators: a
|
|
2862
2889
|
} : l === "datalist" ? {
|
|
2863
2890
|
key: e.name,
|
|
2864
2891
|
label: e.label || e.title,
|
|
2865
2892
|
type: "Custom-Datatable",
|
|
2866
|
-
colModel: ((u = e.colModel) == null ? void 0 : u.map((
|
|
2893
|
+
colModel: ((u = e.colModel) == null ? void 0 : u.map((d) => ba(d))) || [],
|
|
2867
2894
|
help: e == null ? void 0 : e.help,
|
|
2868
|
-
validators:
|
|
2895
|
+
validators: a
|
|
2869
2896
|
} : l === "reference" ? {
|
|
2870
2897
|
key: e.name,
|
|
2871
2898
|
label: e.label || e.title,
|
|
2872
2899
|
type: "reference",
|
|
2873
2900
|
reference_type: e.reference_type,
|
|
2874
2901
|
help: e == null ? void 0 : e.help,
|
|
2875
|
-
validators:
|
|
2902
|
+
validators: a
|
|
2876
2903
|
} : l === "reference-list" ? {
|
|
2877
2904
|
key: e.name,
|
|
2878
2905
|
label: e.label || e.title,
|
|
2879
2906
|
type: "reference",
|
|
2880
2907
|
reference_type: e.reference_type,
|
|
2881
2908
|
help: e == null ? void 0 : e.help,
|
|
2882
|
-
validators:
|
|
2909
|
+
validators: a
|
|
2883
2910
|
} : l === "relation" ? {
|
|
2884
2911
|
key: e.name,
|
|
2885
2912
|
label: e.label || e.title,
|
|
2886
2913
|
type: "relation-link",
|
|
2887
2914
|
help: e == null ? void 0 : e.help,
|
|
2888
2915
|
relation: e.relation,
|
|
2889
|
-
validators:
|
|
2916
|
+
validators: a
|
|
2890
2917
|
} : l === "markdown" ? {
|
|
2891
2918
|
key: e.name,
|
|
2892
2919
|
label: e.label || e.title,
|
|
2893
2920
|
type: "richtext-md",
|
|
2894
2921
|
help: e == null ? void 0 : e.help,
|
|
2895
|
-
validators:
|
|
2922
|
+
validators: a
|
|
2896
2923
|
} : l === "mediaselect" ? {
|
|
2897
2924
|
key: e.name,
|
|
2898
2925
|
label: e.label || e.title,
|
|
2899
2926
|
type: "mediaselect",
|
|
2900
2927
|
help: e == null ? void 0 : e.help,
|
|
2901
|
-
validators:
|
|
2928
|
+
validators: a
|
|
2902
2929
|
} : {
|
|
2903
2930
|
key: e.name,
|
|
2904
2931
|
label: e.label || e.title,
|
|
2905
2932
|
placeholder: e.placeholder,
|
|
2906
2933
|
help: e == null ? void 0 : e.help,
|
|
2907
2934
|
type: "Text",
|
|
2908
|
-
validators:
|
|
2935
|
+
validators: a
|
|
2909
2936
|
};
|
|
2910
2937
|
};
|
|
2911
2938
|
export {
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2939
|
+
Gr as V,
|
|
2940
|
+
ja as _,
|
|
2941
|
+
Xr as a,
|
|
2942
|
+
Ca as b,
|
|
2943
|
+
Aa as c,
|
|
2944
|
+
Ma as d,
|
|
2945
|
+
Va as e,
|
|
2946
|
+
ba as g
|
|
2920
2947
|
};
|