@opengis/cms 0.0.53 → 0.0.54
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-dx7Se1Xo.js → ArticlesPage-Cuit_90w.js} +3 -3
- package/dist/{BuilderPage-ChkWE8rE.js → BuilderPage-B79YHrmr.js} +139 -139
- package/dist/{CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js → CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-B6irHMzL.js} +19 -19
- package/dist/{EditCollectionPage-H1J9pZNo.js → EditCollectionPage-CAVLcvLg.js} +5 -5
- package/dist/{MenuAddPage-B6Qs6qV8.js → MenuAddPage-CmU4kAUM.js} +1 -1
- package/dist/{MenuItemPage-XN9lx5Vv.js → MenuItemPage-UV8JlJvT.js} +60 -60
- package/dist/{MenuPage-tJZtK46W.js → MenuPage-c4TPJgIN.js} +1 -1
- package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-C8cip9Ci.js +84 -0
- package/dist/{UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js → UniversalTable.vue_vue_type_script_setup_true_lang-DR4PQwqR.js} +80 -80
- package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-Cp1WWIf0.js → UniversalTablePagination.vue_vue_type_script_setup_true_lang-C8P9DCeX.js} +47 -47
- package/dist/{contentForm-BgEoJcWF.js → contentForm-BQdeYVFh.js} +2 -2
- package/dist/{getField-DoisYj34.js → getField-Y5WXnRR0.js} +632 -631
- package/dist/index.js +10 -10
- package/dist/style.css +1 -1
- package/dist/{vuedraggable-DTHNuRWs.js → vuedraggable-CoAPPFYd.js} +108 -108
- package/package.json +67 -67
- package/server/routes/cms/controllers/listMedia.js +5 -1
- package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-DQjDxfF8.js +0 -84
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as n, createStaticVNode as z, createElementVNode as
|
|
1
|
+
import { openBlock as o, createElementBlock as n, createStaticVNode as z, createElementVNode as r, toDisplayString as i, createCommentVNode as j, 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 M, computed as R, watch as H, createVNode as k, 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
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-
|
|
3
|
+
import { d as Ge } from "./vuedraggable-CoAPPFYd.js";
|
|
4
4
|
import { VsDrawer as Qe, notify as ie, confirm as Ze, VsModal as Ue } from "@opengis/core";
|
|
5
5
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import { inputs as Ve, VForm as We, VsInputSelect as ft } from "@opengis/form";
|
|
@@ -875,11 +875,11 @@ const Re = "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 ? (o(), n("div", At,
|
|
878
|
+
return (l, s) => (o(), n("div", _t, [
|
|
879
|
+
s[0] || (s[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
|
+
r("div", $t, [
|
|
881
|
+
r("div", Ct, i(l.$t(e.text)), 1),
|
|
882
|
+
e.count && e.count > 0 ? (o(), n("div", At, i(e.count), 1)) : j("", !0)
|
|
883
883
|
])
|
|
884
884
|
]));
|
|
885
885
|
}
|
|
@@ -899,11 +899,11 @@ const Re = "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 ? (o(), n("div", Ft,
|
|
902
|
+
return (l, s) => (o(), n("div", Mt, [
|
|
903
|
+
s[0] || (s[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
|
+
r("div", jt, [
|
|
905
|
+
r("div", Vt, i(l.$t(e.text)), 1),
|
|
906
|
+
e.count && e.count > 0 ? (o(), n("div", Ft, i(e.count), 1)) : j("", !0)
|
|
907
907
|
])
|
|
908
908
|
]));
|
|
909
909
|
}
|
|
@@ -923,11 +923,11 @@ const Re = "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 ? (o(), n("div", Et,
|
|
926
|
+
return (l, s) => (o(), n("div", St, [
|
|
927
|
+
s[0] || (s[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
|
+
r("div", qt, [
|
|
929
|
+
r("div", zt, i(l.$t(e.text)), 1),
|
|
930
|
+
e.count && e.count > 0 ? (o(), n("div", Et, i(e.count), 1)) : j("", !0)
|
|
931
931
|
])
|
|
932
932
|
]));
|
|
933
933
|
}
|
|
@@ -947,11 +947,11 @@ const Re = "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 ? (o(), n("div", Lt,
|
|
950
|
+
return (l, s) => (o(), n("div", It, [
|
|
951
|
+
s[0] || (s[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
|
+
r("div", Dt, [
|
|
953
|
+
r("div", Tt, i(l.$t(e.text)), 1),
|
|
954
|
+
e.count && e.count > 0 ? (o(), n("div", Lt, i(e.count), 1)) : j("", !0)
|
|
955
955
|
])
|
|
956
956
|
]));
|
|
957
957
|
}
|
|
@@ -971,11 +971,11 @@ const Re = "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 ? (o(), n("div", Ut,
|
|
974
|
+
return (l, s) => (o(), n("div", Gt, [
|
|
975
|
+
s[0] || (s[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
|
+
r("div", Qt, [
|
|
977
|
+
r("div", Zt, i(l.$t(e.text)), 1),
|
|
978
|
+
e.count && e.count > 0 ? (o(), n("div", Ut, i(e.count), 1)) : j("", !0)
|
|
979
979
|
])
|
|
980
980
|
]));
|
|
981
981
|
}
|
|
@@ -995,11 +995,11 @@ const Re = "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 ? (o(), n("div", Ht,
|
|
998
|
+
return (l, s) => (o(), n("div", Wt, [
|
|
999
|
+
s[0] || (s[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
|
+
r("div", Rt, [
|
|
1001
|
+
r("div", Pt, i(l.$t(e.text)), 1),
|
|
1002
|
+
e.count && e.count > 0 ? (o(), n("div", Ht, i(e.count), 1)) : j("", !0)
|
|
1003
1003
|
])
|
|
1004
1004
|
]));
|
|
1005
1005
|
}
|
|
@@ -1019,11 +1019,11 @@ const Re = "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 ? (o(), n("div", Xt,
|
|
1022
|
+
return (l, s) => (o(), n("div", Yt, [
|
|
1023
|
+
s[0] || (s[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
|
+
r("div", Kt, [
|
|
1025
|
+
r("div", Jt, i(l.$t(e.text)), 1),
|
|
1026
|
+
e.count && e.count > 0 ? (o(), n("div", Xt, i(e.count), 1)) : j("", !0)
|
|
1027
1027
|
])
|
|
1028
1028
|
]));
|
|
1029
1029
|
}
|
|
@@ -1043,11 +1043,11 @@ const Re = "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 ? (o(), n("div", lr,
|
|
1046
|
+
return (l, s) => (o(), n("div", er, [
|
|
1047
|
+
s[0] || (s[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
|
+
r("div", tr, [
|
|
1049
|
+
r("div", rr, i(l.$t(e.text)), 1),
|
|
1050
|
+
e.count && e.count > 0 ? (o(), n("div", lr, i(e.count), 1)) : j("", !0)
|
|
1051
1051
|
])
|
|
1052
1052
|
]));
|
|
1053
1053
|
}
|
|
@@ -1067,11 +1067,11 @@ const Re = "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 ? (o(), n("div", dr,
|
|
1070
|
+
return (l, s) => (o(), n("div", ar, [
|
|
1071
|
+
s[0] || (s[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
|
+
r("div", or, [
|
|
1073
|
+
r("div", nr, i(l.$t(e.text)), 1),
|
|
1074
|
+
e.count && e.count > 0 ? (o(), n("div", dr, i(e.count), 1)) : j("", !0)
|
|
1075
1075
|
])
|
|
1076
1076
|
]));
|
|
1077
1077
|
}
|
|
@@ -1091,11 +1091,11 @@ const Re = "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 ? (o(), n("div", pr,
|
|
1094
|
+
return (l, s) => (o(), n("div", ur, [
|
|
1095
|
+
s[0] || (s[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
|
+
r("div", cr, [
|
|
1097
|
+
r("div", vr, i(l.$t(e.text)), 1),
|
|
1098
|
+
e.count && e.count > 0 ? (o(), n("div", pr, i(e.count), 1)) : j("", !0)
|
|
1099
1099
|
])
|
|
1100
1100
|
]));
|
|
1101
1101
|
}
|
|
@@ -1115,11 +1115,11 @@ const Re = "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 ? (o(), n("div", mr,
|
|
1118
|
+
return (l, s) => (o(), n("div", hr, [
|
|
1119
|
+
s[0] || (s[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
|
+
r("div", br, [
|
|
1121
|
+
r("div", yr, i(l.$t(e.text)), 1),
|
|
1122
|
+
e.count && e.count > 0 ? (o(), n("div", mr, i(e.count), 1)) : j("", !0)
|
|
1123
1123
|
])
|
|
1124
1124
|
]));
|
|
1125
1125
|
}
|
|
@@ -1139,11 +1139,11 @@ const Re = "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 ? (o(), n("div", _r,
|
|
1142
|
+
return (l, s) => (o(), n("div", fr, [
|
|
1143
|
+
s[0] || (s[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
|
+
r("div", wr, [
|
|
1145
|
+
r("div", kr, i(l.$t(e.text)), 1),
|
|
1146
|
+
e.count && e.count > 0 ? (o(), n("div", _r, i(e.count), 1)) : j("", !0)
|
|
1147
1147
|
])
|
|
1148
1148
|
]));
|
|
1149
1149
|
}
|
|
@@ -1163,11 +1163,11 @@ const Re = "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 ? (o(), n("div", jr,
|
|
1166
|
+
return (l, s) => (o(), n("div", Cr, [
|
|
1167
|
+
s[0] || (s[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
|
+
r("div", Ar, [
|
|
1169
|
+
r("div", Mr, i(l.$t(e.text)), 1),
|
|
1170
|
+
e.count && e.count > 0 ? (o(), n("div", jr, i(e.count), 1)) : j("", !0)
|
|
1171
1171
|
])
|
|
1172
1172
|
]));
|
|
1173
1173
|
}
|
|
@@ -1187,11 +1187,11 @@ const Re = "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 ? (o(), n("div", Sr,
|
|
1190
|
+
return (l, s) => (o(), n("div", Vr, [
|
|
1191
|
+
s[0] || (s[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
|
+
r("div", Fr, [
|
|
1193
|
+
r("div", Br, i(l.$t(e.text)), 1),
|
|
1194
|
+
e.count && e.count > 0 ? (o(), n("div", Sr, i(e.count), 1)) : j("", !0)
|
|
1195
1195
|
])
|
|
1196
1196
|
]));
|
|
1197
1197
|
}
|
|
@@ -1227,13 +1227,13 @@ const Re = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1227
1227
|
emits: ["update:modelValue"],
|
|
1228
1228
|
setup(e) {
|
|
1229
1229
|
const l = Z(e, "modelValue");
|
|
1230
|
-
return (
|
|
1230
|
+
return (s, b) => (o(), n("div", zr, [
|
|
1231
1231
|
(o(!0), n(L, null, P(y(oe), (u) => (o(), n("div", {
|
|
1232
1232
|
key: u.id,
|
|
1233
1233
|
onClick: (d) => l.value = u.id,
|
|
1234
1234
|
class: "relative"
|
|
1235
1235
|
}, [
|
|
1236
|
-
|
|
1236
|
+
r("div", Ir, [
|
|
1237
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,
|
|
@@ -1249,9 +1249,9 @@ const Re = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAA
|
|
|
1249
1249
|
]));
|
|
1250
1250
|
}
|
|
1251
1251
|
}, Lr = {};
|
|
1252
|
-
function Nr(e, l,
|
|
1253
|
-
const
|
|
1254
|
-
return o(), F(
|
|
1252
|
+
function Nr(e, l, s, b, u, d) {
|
|
1253
|
+
const m = me("vs-richtext");
|
|
1254
|
+
return o(), F(m, { class: "w-full" });
|
|
1255
1255
|
}
|
|
1256
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",
|
|
@@ -1271,10 +1271,10 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1271
1271
|
setup(e) {
|
|
1272
1272
|
const { t: l } = Y();
|
|
1273
1273
|
Ve["vs-input-reference"] = Xr, Ve["vs-input-tiptap-editor"] = Gr;
|
|
1274
|
-
const
|
|
1274
|
+
const s = Z(e, "modelValue"), b = M(!1), u = M({}), d = M(null), m = M({}), g = R(() => {
|
|
1275
1275
|
var p;
|
|
1276
1276
|
return ((p = Pe[d.value]) == null ? void 0 : p.schema) || null;
|
|
1277
|
-
}),
|
|
1277
|
+
}), x = async () => {
|
|
1278
1278
|
if (await u.value.validate()) {
|
|
1279
1279
|
ie({
|
|
1280
1280
|
type: "warning",
|
|
@@ -1284,72 +1284,72 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
1286
|
try {
|
|
1287
|
-
Object.keys(
|
|
1288
|
-
...
|
|
1287
|
+
Object.keys(m.value).length !== 0 && (s.value = [
|
|
1288
|
+
...s.value || [],
|
|
1289
1289
|
{
|
|
1290
|
-
...
|
|
1290
|
+
...m.value,
|
|
1291
1291
|
id: Math.random().toString(36).substring(2, 15),
|
|
1292
1292
|
reference_type: d.value
|
|
1293
1293
|
}
|
|
1294
|
-
]), b.value = !1, d.value = null,
|
|
1295
|
-
} catch (
|
|
1296
|
-
console.log(
|
|
1294
|
+
]), b.value = !1, d.value = null, m.value = {};
|
|
1295
|
+
} catch (t) {
|
|
1296
|
+
console.log(t);
|
|
1297
1297
|
}
|
|
1298
1298
|
};
|
|
1299
1299
|
return H(b, () => {
|
|
1300
|
-
b.value || (d.value = null,
|
|
1301
|
-
}), (p,
|
|
1302
|
-
|
|
1300
|
+
b.value || (d.value = null, m.value = {});
|
|
1301
|
+
}), (p, t) => (o(), n("div", null, [
|
|
1302
|
+
r("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
|
-
|
|
1305
|
+
onClick: t[0] || (t[0] = (_) => b.value = !b.value)
|
|
1306
|
+
}, i(p.$t("cms.builder.create")), 1),
|
|
1307
|
+
k(y(Qe), {
|
|
1308
1308
|
visible: b.value,
|
|
1309
|
-
"onUpdate:visible":
|
|
1309
|
+
"onUpdate:visible": t[6] || (t[6] = (_) => b.value = _),
|
|
1310
1310
|
position: "right",
|
|
1311
1311
|
closeClickBackdrop: !1,
|
|
1312
|
-
onClose:
|
|
1312
|
+
onClose: t[7] || (t[7] = (_) => b.value = !1),
|
|
1313
1313
|
title: d.value ? p.$t("cms.builder." + d.value) : p.$t("cms.builder.selectType"),
|
|
1314
1314
|
size: "50vw"
|
|
1315
1315
|
}, {
|
|
1316
1316
|
footer: U(() => [
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
onClick:
|
|
1317
|
+
r("div", Ur, [
|
|
1318
|
+
r("button", {
|
|
1319
|
+
onClick: t[5] || (t[5] = (_) => 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
|
+
}, i(p.$t("cms.builder.cancel")), 1),
|
|
1322
|
+
r("button", {
|
|
1323
|
+
onClick: x,
|
|
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
|
+
}, i(p.$t("cms.builder.create")), 1)
|
|
1326
1326
|
])
|
|
1327
1327
|
]),
|
|
1328
1328
|
default: U(() => {
|
|
1329
|
-
var
|
|
1329
|
+
var _;
|
|
1330
1330
|
return [
|
|
1331
1331
|
d.value ? (o(), n(L, { key: 1 }, [
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1332
|
+
r("div", Qr, [
|
|
1333
|
+
r("div", Zr, [
|
|
1334
|
+
r("span", null, i((_ = y(oe).find(($) => $.id === d.value)) == null ? void 0 : _.text), 1)
|
|
1335
1335
|
]),
|
|
1336
|
-
|
|
1336
|
+
r("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: t[2] || (t[2] = ($) => d.value = null)
|
|
1339
|
+
}, i(p.$t("cms.builder.changeType")), 1)
|
|
1340
1340
|
]),
|
|
1341
|
-
|
|
1341
|
+
g.value ? (o(), F(y(We), {
|
|
1342
1342
|
key: d.value,
|
|
1343
|
-
schema:
|
|
1344
|
-
modelValue:
|
|
1345
|
-
"onUpdate:modelValue":
|
|
1343
|
+
schema: g.value,
|
|
1344
|
+
modelValue: m.value,
|
|
1345
|
+
"onUpdate:modelValue": t[3] || (t[3] = ($) => m.value = $),
|
|
1346
1346
|
form: u.value,
|
|
1347
|
-
"onUpdate:form":
|
|
1347
|
+
"onUpdate:form": t[4] || (t[4] = ($) => u.value = $)
|
|
1348
1348
|
}, null, 8, ["schema", "modelValue", "form"])) : j("", !0)
|
|
1349
1349
|
], 64)) : (o(), F(Tr, {
|
|
1350
1350
|
key: 0,
|
|
1351
1351
|
modelValue: d.value,
|
|
1352
|
-
"onUpdate:modelValue":
|
|
1352
|
+
"onUpdate:modelValue": t[1] || (t[1] = ($) => d.value = $),
|
|
1353
1353
|
options: y(oe)
|
|
1354
1354
|
}, null, 8, ["modelValue", "options"]))
|
|
1355
1355
|
];
|
|
@@ -1379,16 +1379,16 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1379
1379
|
}),
|
|
1380
1380
|
emits: ["update:modelValue", "update:parent"],
|
|
1381
1381
|
setup(e) {
|
|
1382
|
-
const { t: l } = Y(),
|
|
1382
|
+
const { t: l } = Y(), s = Z(e, "modelValue"), b = Z(e, "parent"), u = M(!1), d = M({}), m = M({}), g = R(() => {
|
|
1383
1383
|
var p;
|
|
1384
|
-
return ((p = Pe[
|
|
1384
|
+
return ((p = Pe[s.value.reference_type]) == null ? void 0 : p.schema) || null;
|
|
1385
1385
|
});
|
|
1386
1386
|
H(u, (p) => {
|
|
1387
|
-
p && (d.value = { ...
|
|
1387
|
+
p && (d.value = { ...s.value });
|
|
1388
1388
|
});
|
|
1389
|
-
const
|
|
1389
|
+
const x = async () => {
|
|
1390
1390
|
try {
|
|
1391
|
-
if (await
|
|
1391
|
+
if (await m.value.validate()) {
|
|
1392
1392
|
ie({
|
|
1393
1393
|
type: "warning",
|
|
1394
1394
|
title: l("cms.common.actions.warning"),
|
|
@@ -1396,51 +1396,51 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1396
1396
|
});
|
|
1397
1397
|
return;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
s.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, t) => (o(), n("div", Rr, [
|
|
1405
|
+
r("button", {
|
|
1406
|
+
onClick: t[0] || (t[0] = (_) => 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
|
+
k(y(ct), { class: "h-4 w-4 text-gray-400" })
|
|
1410
1410
|
]),
|
|
1411
|
-
|
|
1412
|
-
onClick:
|
|
1411
|
+
r("button", {
|
|
1412
|
+
onClick: t[1] || (t[1] = (_) => b.value = b.value.filter(($) => $.id !== s.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
|
+
k(y(ee), { class: "h-4 w-4 text-red-500" })
|
|
1416
1416
|
]),
|
|
1417
|
-
|
|
1417
|
+
k(y(Qe), {
|
|
1418
1418
|
visible: u.value,
|
|
1419
|
-
"onUpdate:visible":
|
|
1420
|
-
onClose:
|
|
1419
|
+
"onUpdate:visible": t[5] || (t[5] = (_) => u.value = _),
|
|
1420
|
+
onClose: t[6] || (t[6] = (_) => u.value = !1),
|
|
1421
1421
|
title: e.title,
|
|
1422
1422
|
width: "50vw"
|
|
1423
1423
|
}, {
|
|
1424
1424
|
footer: U(() => [
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
r("div", Pr, [
|
|
1426
|
+
r("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: t[4] || (t[4] = (_) => u.value = !1)
|
|
1429
|
+
}, i(p.$t("cms.common.actions.cancel")), 1),
|
|
1430
|
+
r("button", {
|
|
1431
|
+
onClick: x,
|
|
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
|
+
}, i(p.$t("cms.common.actions.save")), 1)
|
|
1434
1434
|
])
|
|
1435
1435
|
]),
|
|
1436
1436
|
default: U(() => [
|
|
1437
|
-
|
|
1437
|
+
g.value ? (o(), F(y(We), {
|
|
1438
1438
|
key: 0,
|
|
1439
|
-
form:
|
|
1440
|
-
"onUpdate:form":
|
|
1441
|
-
schema:
|
|
1439
|
+
form: m.value,
|
|
1440
|
+
"onUpdate:form": t[2] || (t[2] = (_) => m.value = _),
|
|
1441
|
+
schema: g.value,
|
|
1442
1442
|
modelValue: d.value,
|
|
1443
|
-
"onUpdate:modelValue":
|
|
1443
|
+
"onUpdate:modelValue": t[3] || (t[3] = (_) => d.value = _),
|
|
1444
1444
|
class: "-mr-[10px] ml-[10px] mt-[10px]"
|
|
1445
1445
|
}, null, 8, ["form", "schema", "modelValue"])) : j("", !0)
|
|
1446
1446
|
]),
|
|
@@ -1472,50 +1472,50 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1472
1472
|
setup(e) {
|
|
1473
1473
|
const l = (u) => {
|
|
1474
1474
|
var d;
|
|
1475
|
-
return (d = oe.find((
|
|
1476
|
-
},
|
|
1475
|
+
return (d = oe.find((m) => m.id === u)) == null ? void 0 : d.text;
|
|
1476
|
+
}, s = Z(e, "modelValue"), b = R({
|
|
1477
1477
|
get() {
|
|
1478
|
-
const u =
|
|
1478
|
+
const u = s.value;
|
|
1479
1479
|
return u == null ? [] : Array.isArray(u) ? u : [];
|
|
1480
1480
|
},
|
|
1481
1481
|
set(u) {
|
|
1482
|
-
|
|
1482
|
+
s.value = Array.isArray(u) ? u : [];
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
|
-
return H(
|
|
1486
|
-
u != null && !Array.isArray(u) && (
|
|
1485
|
+
return H(s, (u) => {
|
|
1486
|
+
u != null && !Array.isArray(u) && (s.value = []);
|
|
1487
1487
|
}, { immediate: !0 }), (u, d) => {
|
|
1488
|
-
var
|
|
1488
|
+
var m;
|
|
1489
1489
|
return o(), n("div", Or, [
|
|
1490
|
-
((
|
|
1490
|
+
((m = b.value) == null ? void 0 : m.length) > 0 ? (o(), F(y(Ge), {
|
|
1491
1491
|
key: 0,
|
|
1492
1492
|
modelValue: b.value,
|
|
1493
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
1493
|
+
"onUpdate:modelValue": d[1] || (d[1] = (g) => b.value = g),
|
|
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: U(({ element:
|
|
1499
|
-
|
|
1500
|
-
|
|
1498
|
+
item: U(({ element: g, index: x }) => [
|
|
1499
|
+
g != null && g.reference_type ? (o(), n("div", Yr, [
|
|
1500
|
+
r("div", Kr, [
|
|
1501
1501
|
(o(), n("div", {
|
|
1502
|
-
key:
|
|
1502
|
+
key: g.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
|
+
k(y(xe), { class: "h-4 w-4 text-gray-400" })
|
|
1506
1506
|
])),
|
|
1507
|
-
|
|
1508
|
-
title: u.$t("cms.builder." + (
|
|
1509
|
-
modelValue: b.value[
|
|
1510
|
-
"onUpdate:modelValue": (p) => b.value[
|
|
1507
|
+
k(Hr, {
|
|
1508
|
+
title: u.$t("cms.builder." + (g == null ? void 0 : g.reference_type)),
|
|
1509
|
+
modelValue: b.value[x],
|
|
1510
|
+
"onUpdate:modelValue": (p) => b.value[x] = p,
|
|
1511
1511
|
parent: b.value,
|
|
1512
1512
|
"onUpdate:parent": d[0] || (d[0] = (p) => b.value = p)
|
|
1513
1513
|
}, null, 8, ["title", "modelValue", "onUpdate:modelValue", "parent"]),
|
|
1514
|
-
y(ne)[
|
|
1514
|
+
y(ne)[g == null ? void 0 : g.reference_type] ? (o(), F(Ie(y(ne)[g == null ? void 0 : g.reference_type]), {
|
|
1515
1515
|
key: 0,
|
|
1516
|
-
index:
|
|
1517
|
-
text: l(
|
|
1518
|
-
count: Array.isArray(
|
|
1516
|
+
index: x,
|
|
1517
|
+
text: l(g == null ? void 0 : g.reference_type),
|
|
1518
|
+
count: Array.isArray(g == null ? void 0 : g.data) ? g.data.length : 0
|
|
1519
1519
|
}, null, 8, ["index", "text", "count"])) : (o(), n("img", {
|
|
1520
1520
|
key: 1,
|
|
1521
1521
|
src: y(Re),
|
|
@@ -1527,11 +1527,11 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1527
1527
|
]),
|
|
1528
1528
|
_: 1
|
|
1529
1529
|
}, 8, ["modelValue"])) : j("", !0),
|
|
1530
|
-
|
|
1530
|
+
k(Wr, {
|
|
1531
1531
|
class: "mt-4",
|
|
1532
1532
|
title: e.title,
|
|
1533
1533
|
modelValue: b.value,
|
|
1534
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
1534
|
+
"onUpdate:modelValue": d[2] || (d[2] = (g) => b.value = g)
|
|
1535
1535
|
}, null, 8, ["title", "modelValue"])
|
|
1536
1536
|
]);
|
|
1537
1537
|
};
|
|
@@ -1540,8 +1540,8 @@ const Gr = /* @__PURE__ */ te(Lr, [["render", Nr]]), Qr = { class: "flex gap-4"
|
|
|
1540
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, b)).toFixed(2)) + " " +
|
|
1543
|
+
const l = 1024, s = ["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)) + " " + s[b];
|
|
1545
1545
|
}
|
|
1546
1546
|
function el(e) {
|
|
1547
1547
|
const l = new Date(e);
|
|
@@ -1561,9 +1561,9 @@ const tl = {
|
|
|
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 (
|
|
1564
|
+
return (s, b) => (o(), n("div", {
|
|
1565
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
|
-
},
|
|
1566
|
+
}, i(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,
|
|
@@ -1593,57 +1593,58 @@ const tl = {
|
|
|
1593
1593
|
},
|
|
1594
1594
|
emits: ["delete-file", "file-click", "delete-folder"],
|
|
1595
1595
|
setup(e, { emit: l }) {
|
|
1596
|
-
|
|
1597
|
-
|
|
1596
|
+
Y();
|
|
1597
|
+
const s = e, b = M([]), u = M(null), d = (g) => {
|
|
1598
|
+
if (!g)
|
|
1598
1599
|
return "";
|
|
1599
|
-
const
|
|
1600
|
-
return isNaN(
|
|
1600
|
+
const x = new Date(g);
|
|
1601
|
+
return isNaN(x.getTime()) ? "" : x.toISOString().slice(0, 10);
|
|
1601
1602
|
}, m = () => {
|
|
1602
|
-
|
|
1603
|
+
b.value = s.files.sort((g, x) => g.type === "dir" && x.type !== "dir" ? -1 : g.type !== "dir" && x.type === "dir" ? 1 : 0);
|
|
1603
1604
|
};
|
|
1604
|
-
return de(() => m()), at(() => m()), (
|
|
1605
|
-
var
|
|
1605
|
+
return de(() => m()), at(() => m()), (g, x) => {
|
|
1606
|
+
var p;
|
|
1606
1607
|
return o(), n("div", rl, [
|
|
1607
|
-
((
|
|
1608
|
-
|
|
1609
|
-
|
|
1608
|
+
((p = e.files) == null ? void 0 : p.length) === 0 ? (o(), n("div", ll, [
|
|
1609
|
+
k(y(vt), { class: "w-12 h-12 mb-2" }),
|
|
1610
|
+
r("p", null, i(g.$t("cms.noFilesInFolder")), 1)
|
|
1610
1611
|
])) : j("", !0),
|
|
1611
|
-
(o(!0), n(L, null, P(
|
|
1612
|
-
var
|
|
1612
|
+
(o(!0), n(L, null, P(b.value, (t) => {
|
|
1613
|
+
var _;
|
|
1613
1614
|
return o(), n(L, {
|
|
1614
|
-
key:
|
|
1615
|
+
key: t == null ? void 0 : t.url
|
|
1615
1616
|
}, [
|
|
1616
|
-
(
|
|
1617
|
+
(t == null ? void 0 : t.type) === "dir" ? (o(), n("div", {
|
|
1617
1618
|
key: 0,
|
|
1618
1619
|
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",
|
|
1619
|
-
onClick: (
|
|
1620
|
+
onClick: ($) => g.$emit("file-click", t)
|
|
1620
1621
|
}, [
|
|
1621
1622
|
e.isDeleteButton ? (o(), n("div", {
|
|
1622
1623
|
key: 0,
|
|
1623
|
-
onClick: J((
|
|
1624
|
-
|
|
1624
|
+
onClick: J(($) => {
|
|
1625
|
+
u.value = t;
|
|
1625
1626
|
}, ["stop"]),
|
|
1626
1627
|
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"
|
|
1627
1628
|
}, [
|
|
1628
|
-
|
|
1629
|
+
k(y(ee), { class: "w-4 h-4 text-gray-500 group-hover:text-red-500" })
|
|
1629
1630
|
], 8, al)) : j("", !0),
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
], 8, sl)) : (
|
|
1631
|
+
k(y(Ne), { class: "w-16 h-16 mx-auto mb-4 text-blue-600" }),
|
|
1632
|
+
r("h3", ol, i(t == null ? void 0 : t.name), 1),
|
|
1633
|
+
r("p", nl, i(t == null ? void 0 : t.count) + " " + i(g.$t("cms.media.files")), 1)
|
|
1634
|
+
], 8, sl)) : (t == null ? void 0 : t.type) === "file" ? (o(), n("div", {
|
|
1634
1635
|
key: 1,
|
|
1635
1636
|
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": ((
|
|
1637
|
+
"bg-accent text-accent-foreground ring-2 ring-primary": ((_ = e.selectedFile) == null ? void 0 : _.url) === (t == null ? void 0 : t.url) || e.selectedFiles && e.selectedFiles.some(($) => $.id === t.id)
|
|
1637
1638
|
}]),
|
|
1638
|
-
onClick: (
|
|
1639
|
+
onClick: ($) => g.$emit("file-click", t)
|
|
1639
1640
|
}, [
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
(
|
|
1644
|
-
|
|
1645
|
-
src:
|
|
1646
|
-
alt: (
|
|
1641
|
+
r("div", il, [
|
|
1642
|
+
r("div", ul, [
|
|
1643
|
+
r("div", cl, [
|
|
1644
|
+
(t == null ? void 0 : t.filetype) === "image" && (t != null && t.filepath || t != null && t.url) ? (o(), n("div", vl, [
|
|
1645
|
+
r("img", {
|
|
1646
|
+
src: t == null ? void 0 : t.preview,
|
|
1647
|
+
alt: (t == null ? void 0 : t.alt) || (t == null ? void 0 : t.filename),
|
|
1647
1648
|
class: "object-cover w-full h-full rounded text-xs"
|
|
1648
1649
|
}, null, 8, pl)
|
|
1649
1650
|
])) : (o(), F(y(pt), {
|
|
@@ -1652,21 +1653,21 @@ const tl = {
|
|
|
1652
1653
|
}))
|
|
1653
1654
|
])
|
|
1654
1655
|
]),
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
type:
|
|
1656
|
+
r("div", gl, [
|
|
1657
|
+
r("div", hl, [
|
|
1658
|
+
r("h3", bl, i(t.filename), 1),
|
|
1659
|
+
k(tl, {
|
|
1660
|
+
type: t == null ? void 0 : t.filetype
|
|
1660
1661
|
}, null, 8, ["type"])
|
|
1661
1662
|
]),
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1663
|
+
r("div", yl, [
|
|
1664
|
+
r("div", ml, [
|
|
1665
|
+
r("span", null, i(g.$t("cms.media.size")) + ":", 1),
|
|
1666
|
+
r("span", null, i(y(He)(t.filesize)), 1)
|
|
1666
1667
|
]),
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1668
|
+
r("div", xl, [
|
|
1669
|
+
r("span", null, i(g.$t("cms.media.uploaded")) + ":", 1),
|
|
1670
|
+
r("span", null, i(d(t.created_at)), 1)
|
|
1670
1671
|
])
|
|
1671
1672
|
])
|
|
1672
1673
|
])
|
|
@@ -1688,8 +1689,8 @@ const tl = {
|
|
|
1688
1689
|
};
|
|
1689
1690
|
function _l(e, l) {
|
|
1690
1691
|
return o(), n("svg", kl, [...l[0] || (l[0] = [
|
|
1691
|
-
|
|
1692
|
-
|
|
1692
|
+
r("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),
|
|
1693
|
+
r("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)
|
|
1693
1694
|
])]);
|
|
1694
1695
|
}
|
|
1695
1696
|
const $l = /* @__PURE__ */ te(wl, [["render", _l]]), Cl = {}, Al = {
|
|
@@ -1703,8 +1704,8 @@ const $l = /* @__PURE__ */ te(wl, [["render", _l]]), Cl = {}, Al = {
|
|
|
1703
1704
|
};
|
|
1704
1705
|
function Ml(e, l) {
|
|
1705
1706
|
return o(), n("svg", Al, [...l[0] || (l[0] = [
|
|
1706
|
-
|
|
1707
|
-
|
|
1707
|
+
r("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),
|
|
1708
|
+
r("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)
|
|
1708
1709
|
])]);
|
|
1709
1710
|
}
|
|
1710
1711
|
const jl = /* @__PURE__ */ te(Cl, [["render", Ml]]), Vl = {
|
|
@@ -1734,70 +1735,70 @@ const jl = /* @__PURE__ */ te(Cl, [["render", Ml]]), Vl = {
|
|
|
1734
1735
|
},
|
|
1735
1736
|
emits: ["file-click", "delete-folder"],
|
|
1736
1737
|
setup(e, { emit: l }) {
|
|
1737
|
-
const { t:
|
|
1738
|
+
const { t: s } = Y(), b = M(null), u = l, d = () => {
|
|
1738
1739
|
Ze({
|
|
1739
|
-
title:
|
|
1740
|
-
message:
|
|
1740
|
+
title: s("cms.builder.deleteTitle"),
|
|
1741
|
+
message: s("cms.builder.deleteObject"),
|
|
1741
1742
|
type: "error",
|
|
1742
1743
|
onConfirm: () => {
|
|
1743
|
-
|
|
1744
|
+
m();
|
|
1744
1745
|
}
|
|
1745
1746
|
});
|
|
1746
|
-
},
|
|
1747
|
+
}, m = () => {
|
|
1747
1748
|
u("delete-folder", b.value);
|
|
1748
1749
|
};
|
|
1749
|
-
return (
|
|
1750
|
+
return (g, x) => {
|
|
1750
1751
|
const p = me("File");
|
|
1751
1752
|
return o(), n("div", null, [
|
|
1752
1753
|
e.files.length === 0 ? (o(), n("div", Vl, [
|
|
1753
|
-
|
|
1754
|
-
|
|
1754
|
+
k(p, { class: "w-12 h-12 mb-2" }),
|
|
1755
|
+
r("p", null, i(g.$t("cms.media.noFilesInFolder")), 1)
|
|
1755
1756
|
])) : (o(), n("table", Fl, [
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1757
|
+
r("thead", Bl, [
|
|
1758
|
+
r("tr", Sl, [
|
|
1759
|
+
r("th", ql, i(g.$t("cms.media.name")), 1),
|
|
1760
|
+
r("th", zl, i(g.$t("cms.media.type")), 1),
|
|
1761
|
+
r("th", El, i(g.$t("cms.media.size")), 1),
|
|
1762
|
+
r("th", Il, i(g.$t("cms.media.updatedAt")), 1),
|
|
1763
|
+
x[0] || (x[0] = r("th", null, null, -1))
|
|
1763
1764
|
])
|
|
1764
1765
|
]),
|
|
1765
|
-
|
|
1766
|
-
(o(!0), n(L, null, P(e.files, (
|
|
1767
|
-
var
|
|
1766
|
+
r("tbody", Dl, [
|
|
1767
|
+
(o(!0), n(L, null, P(e.files, (t) => {
|
|
1768
|
+
var _, $, C, w, f;
|
|
1768
1769
|
return o(), n("tr", {
|
|
1769
|
-
key:
|
|
1770
|
+
key: t.id,
|
|
1770
1771
|
class: Q(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer", {
|
|
1771
|
-
"bg-blue-200": ((
|
|
1772
|
+
"bg-blue-200": ((_ = b.value) == null ? void 0 : _.id) === t.id && (($ = b.value) == null ? void 0 : $.type) === t.type || e.selectedFiles && e.selectedFiles.some((q) => q.id === t.id && q.type === t.type)
|
|
1772
1773
|
}]),
|
|
1773
|
-
onClick: (q) =>
|
|
1774
|
+
onClick: (q) => g.$emit("file-click", t)
|
|
1774
1775
|
}, [
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1776
|
+
r("td", Ll, [
|
|
1777
|
+
r("div", Nl, [
|
|
1778
|
+
t.type === "dir" ? (o(), F($l, {
|
|
1778
1779
|
key: 0,
|
|
1779
1780
|
class: "w-5 h-5 text-blue-500"
|
|
1780
|
-
})) : (
|
|
1781
|
-
|
|
1782
|
-
src:
|
|
1783
|
-
alt: (
|
|
1781
|
+
})) : (t == null ? void 0 : t.filetype) === "image" && (t != null && t.filepath) ? (o(), n("div", Gl, [
|
|
1782
|
+
r("img", {
|
|
1783
|
+
src: t == null ? void 0 : t.preview,
|
|
1784
|
+
alt: (t == null ? void 0 : t.alt) || (t == null ? void 0 : t.filename),
|
|
1784
1785
|
class: "object-cover w-full h-full rounded"
|
|
1785
1786
|
}, null, 8, Ql)
|
|
1786
|
-
])) : (
|
|
1787
|
+
])) : (t == null ? void 0 : t.filetype) === "image" ? (o(), F(jl, {
|
|
1787
1788
|
key: 2,
|
|
1788
1789
|
class: "w-5 h-5 text-green-500"
|
|
1789
1790
|
})) : (o(), F(p, {
|
|
1790
1791
|
key: 3,
|
|
1791
1792
|
class: "w-5 h-5 text-gray-500"
|
|
1792
1793
|
})),
|
|
1793
|
-
|
|
1794
|
+
r("span", Zl, i((t == null ? void 0 : t.filename) || (t == null ? void 0 : t.name)), 1)
|
|
1794
1795
|
])
|
|
1795
1796
|
]),
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1797
|
+
r("td", Ul, i((t == null ? void 0 : t.type) === "dir" ? g.$t("cms.media.folder") : ((w = (C = t == null ? void 0 : t.filetype) == null ? void 0 : C.charAt(0)) == null ? void 0 : w.toUpperCase()) + ((f = t == null ? void 0 : t.filetype) == null ? void 0 : f.slice(1))), 1),
|
|
1798
|
+
r("td", Wl, i((t == null ? void 0 : t.type) === "dir" ? "--" : y(He)(t == null ? void 0 : t.filesize)), 1),
|
|
1799
|
+
r("td", Rl, i(t != null && t.updated_at ? y(el)(t == null ? void 0 : t.updated_at) : "--"), 1),
|
|
1800
|
+
t.type === "dir" ? (o(), n("td", Pl, [
|
|
1801
|
+
k(y(ee), {
|
|
1801
1802
|
class: "w-4 h-4 text-red-500 cursor-pointer",
|
|
1802
1803
|
onClick: J(d, ["stop"])
|
|
1803
1804
|
}, null, 8, ["onClick"])
|
|
@@ -1822,8 +1823,8 @@ const jl = /* @__PURE__ */ te(Cl, [["render", Ml]]), Vl = {
|
|
|
1822
1823
|
};
|
|
1823
1824
|
function Kl(e, l) {
|
|
1824
1825
|
return o(), n("svg", Yl, [...l[0] || (l[0] = [
|
|
1825
|
-
|
|
1826
|
-
|
|
1826
|
+
r("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }, null, -1),
|
|
1827
|
+
r("polyline", { points: "9 22 9 12 15 12 15 22" }, null, -1)
|
|
1827
1828
|
])]);
|
|
1828
1829
|
}
|
|
1829
1830
|
const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-center space-x-1" }, es = ["onClick"], ts = {
|
|
@@ -1836,13 +1837,13 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
1836
1837
|
},
|
|
1837
1838
|
emits: ["navigate"],
|
|
1838
1839
|
setup(e) {
|
|
1839
|
-
return (l,
|
|
1840
|
-
|
|
1840
|
+
return (l, s) => (o(), n("div", Xl, [
|
|
1841
|
+
r("button", {
|
|
1841
1842
|
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",
|
|
1842
|
-
onClick:
|
|
1843
|
+
onClick: s[0] || (s[0] = (b) => l.$emit("navigate", []))
|
|
1843
1844
|
}, [
|
|
1844
|
-
|
|
1845
|
-
X(" " +
|
|
1845
|
+
k(Jl, { class: "w-3 h-3" }),
|
|
1846
|
+
X(" " + i(l.$t("cms.media.mediaLibrary")), 1)
|
|
1846
1847
|
]),
|
|
1847
1848
|
e.currentPath.length > 0 ? (o(), F(y(je), {
|
|
1848
1849
|
key: 0,
|
|
@@ -1853,8 +1854,8 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
1853
1854
|
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",
|
|
1854
1855
|
onClick: (d) => l.$emit("navigate", e.currentPath.slice(0, u + 1))
|
|
1855
1856
|
}, [
|
|
1856
|
-
|
|
1857
|
-
X(" " +
|
|
1857
|
+
k(y(Ne), { class: "w-3 h-3" }),
|
|
1858
|
+
X(" " + i(b) + " ", 1),
|
|
1858
1859
|
u < e.currentPath.length - 1 ? (o(), F(y(je), {
|
|
1859
1860
|
key: 0,
|
|
1860
1861
|
class: "w-3 h-3 text-slate-400 dark:text-slate-500"
|
|
@@ -1894,144 +1895,144 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
1894
1895
|
}),
|
|
1895
1896
|
emits: /* @__PURE__ */ W(["change"], ["update:modelValue"]),
|
|
1896
1897
|
setup(e, { emit: l }) {
|
|
1897
|
-
const { t:
|
|
1898
|
-
if (!
|
|
1898
|
+
const { t: s } = Y(), b = wt(), u = kt(), d = Z(e, "modelValue"), m = l, g = e, x = R(() => g.multiple || g.multi), p = M(null), t = R(() => d.value || p.value), _ = R(() => {
|
|
1899
|
+
if (!x.value)
|
|
1899
1900
|
return [];
|
|
1900
|
-
const
|
|
1901
|
-
return
|
|
1902
|
-
}),
|
|
1903
|
-
get: () =>
|
|
1904
|
-
set: (
|
|
1905
|
-
if (!
|
|
1906
|
-
d && (d.value = null), p.value = null,
|
|
1901
|
+
const a = t.value;
|
|
1902
|
+
return a ? Array.isArray(a) ? a : [a] : [];
|
|
1903
|
+
}), $ = R({
|
|
1904
|
+
get: () => _.value,
|
|
1905
|
+
set: (a) => {
|
|
1906
|
+
if (!a || !Array.isArray(a) || a.length === 0) {
|
|
1907
|
+
d && (d.value = null), p.value = null, m("cms.change", null);
|
|
1907
1908
|
return;
|
|
1908
1909
|
}
|
|
1909
|
-
const
|
|
1910
|
-
(
|
|
1910
|
+
const c = a.map((v) => typeof v == "string" ? v : (v == null ? void 0 : v.filepath) || (v == null ? void 0 : v.file_path) || v), h = a.map(
|
|
1911
|
+
(v) => typeof v == "object" ? v : p.value && Array.isArray(p.value) ? p.value.find((A) => re(A) === v) ?? v : v
|
|
1911
1912
|
);
|
|
1912
|
-
d && (d.value =
|
|
1913
|
+
d && (d.value = c), p.value = h, m("cms.change", c);
|
|
1913
1914
|
}
|
|
1914
|
-
}),
|
|
1915
|
-
["name",
|
|
1916
|
-
["filesize",
|
|
1917
|
-
]), re = (
|
|
1915
|
+
}), C = R(() => t.value ? typeof t.value == "object" ? t.value.filename || t.value.file_name || t.value.native_file_name || "File" : typeof t.value == "string" ? t.value.split("cms./").pop() || t.value : "File" : ""), w = M(!1), f = M(!1), q = M("grid"), V = M([]), D = M([]), N = M([]), B = M(), E = M([]), ue = M(null), G = M(!1), le = M(null), ce = M(null), fe = M({}), O = M(""), K = M(!1), se = M("name"), Oe = /* @__PURE__ */ new Map([
|
|
1916
|
+
["name", s("cms.media.sortBy.name")],
|
|
1917
|
+
["filesize", s("cms.media.sortBy.filesize")]
|
|
1918
|
+
]), re = (a) => typeof a == "string" ? a : (a == null ? void 0 : a.filepath) || (a == null ? void 0 : a.file_path) || a, we = (a) => a ? typeof a == "string" ? a.split("cms./").pop() || a : a.filename || a.file_name || a.native_file_name || "File" : "", Ye = (a) => typeof a == "string" ? a : (a == null ? void 0 : a.preview) || `/file/resize?filepath=${re(a)}&h=137&quality=75`, Ke = () => {
|
|
1918
1919
|
ue.value && ue.value.click();
|
|
1919
1920
|
}, Je = () => {
|
|
1920
|
-
|
|
1921
|
+
w.value = !w.value, w.value && Xe();
|
|
1921
1922
|
}, Xe = () => {
|
|
1922
1923
|
if (le.value) {
|
|
1923
|
-
const
|
|
1924
|
+
const a = le.value.getBoundingClientRect(), c = window.innerHeight - a.bottom, h = a.top, v = c >= Ds + be || c >= h;
|
|
1924
1925
|
fe.value = {
|
|
1925
|
-
top:
|
|
1926
|
-
bottom:
|
|
1927
|
-
left: `${
|
|
1926
|
+
top: v ? `${a.bottom + be}px` : "auto",
|
|
1927
|
+
bottom: v ? "auto" : `${window.innerHeight - a.top + be}px`,
|
|
1928
|
+
left: `${a.left + a.width / 2}px`,
|
|
1928
1929
|
transform: "translateX(-50%)",
|
|
1929
1930
|
width: "200px"
|
|
1930
1931
|
};
|
|
1931
1932
|
}
|
|
1932
|
-
}, ke = (
|
|
1933
|
-
var
|
|
1934
|
-
if (
|
|
1935
|
-
_e([...V.value,
|
|
1936
|
-
else if (
|
|
1937
|
-
const h = E.value.findIndex((
|
|
1938
|
-
h >= 0 ? E.value.splice(h, 1) : E.value.push(
|
|
1933
|
+
}, ke = (a) => {
|
|
1934
|
+
var c;
|
|
1935
|
+
if (a.type === "dir")
|
|
1936
|
+
_e([...V.value, a.name]);
|
|
1937
|
+
else if (x.value) {
|
|
1938
|
+
const h = E.value.findIndex((v) => v.id === a.id);
|
|
1939
|
+
h >= 0 ? E.value.splice(h, 1) : E.value.push(a);
|
|
1939
1940
|
} else
|
|
1940
|
-
B.value =
|
|
1941
|
-
}, ae = (
|
|
1942
|
-
se.value =
|
|
1943
|
-
var
|
|
1944
|
-
if ((
|
|
1941
|
+
B.value = a.id === ((c = B.value) == null ? void 0 : c.id) ? null : a;
|
|
1942
|
+
}, ae = (a) => {
|
|
1943
|
+
se.value = a, K.value = !1, D.value = D.value.sort((c, h) => {
|
|
1944
|
+
var v;
|
|
1945
|
+
if ((c == null ? void 0 : c.type) === "dir")
|
|
1945
1946
|
return -1;
|
|
1946
|
-
if (
|
|
1947
|
-
return (
|
|
1948
|
-
if (
|
|
1949
|
-
return (h == null ? void 0 : h.filesize) - (
|
|
1947
|
+
if (a === "name")
|
|
1948
|
+
return (v = c == null ? void 0 : c.name) == null ? void 0 : v.localeCompare(h == null ? void 0 : h.name);
|
|
1949
|
+
if (a === "filesize")
|
|
1950
|
+
return (h == null ? void 0 : h.filesize) - (c == null ? void 0 : c.filesize);
|
|
1950
1951
|
});
|
|
1951
1952
|
}, et = async () => {
|
|
1952
1953
|
try {
|
|
1953
|
-
const
|
|
1954
|
+
const a = V.value.join("/"), h = await (await fetch(`/api/cms-media?subdir=${a}${O.value ? "&search=" + O.value : ""}`, {
|
|
1954
1955
|
method: "GET"
|
|
1955
1956
|
})).json();
|
|
1956
|
-
h.data ? (D.value = h.data.map((
|
|
1957
|
-
...
|
|
1958
|
-
id:
|
|
1959
|
-
preview: `/file/resize?filepath=${
|
|
1957
|
+
h.data ? (D.value = h.data.map((v) => ({
|
|
1958
|
+
...v,
|
|
1959
|
+
id: v.type === "dir" ? `dir-${v.name}` : v.id,
|
|
1960
|
+
preview: `/file/resize?filepath=${v.filepath}&h=137&quality=75`
|
|
1960
1961
|
})), ae(se.value)) : D.value = [];
|
|
1961
|
-
} catch (
|
|
1962
|
-
console.error("Search error:",
|
|
1962
|
+
} catch (a) {
|
|
1963
|
+
console.error("Search error:", a), D.value = [];
|
|
1963
1964
|
}
|
|
1964
1965
|
}, tt = () => {
|
|
1965
|
-
if (
|
|
1966
|
+
if (x.value) {
|
|
1966
1967
|
if (E.value.length > 0) {
|
|
1967
|
-
const
|
|
1968
|
+
const a = Array.isArray(d.value) ? [...d.value] : d.value ? [d.value] : [], c = Array.isArray(p.value) ? [...p.value] : p.value ? [p.value] : [];
|
|
1968
1969
|
E.value.forEach((h) => {
|
|
1969
|
-
const
|
|
1970
|
-
|
|
1971
|
-
}), d && (d.value =
|
|
1970
|
+
const v = h.filepath || h.file_path;
|
|
1971
|
+
a.some((A) => (typeof A == "string" ? A : (A == null ? void 0 : A.filepath) || (A == null ? void 0 : A.file_path)) === v) || (a.push(v), c.push(h));
|
|
1972
|
+
}), d && (d.value = a), p.value = c, m("cms.change", a), E.value = [];
|
|
1972
1973
|
}
|
|
1973
1974
|
} else if (B.value) {
|
|
1974
|
-
const
|
|
1975
|
-
d && (d.value =
|
|
1975
|
+
const a = B.value.filepath || B.value.file_path;
|
|
1976
|
+
d && (d.value = a), p.value = B.value, m("cms.change", a), B.value = null;
|
|
1976
1977
|
}
|
|
1977
1978
|
ve();
|
|
1978
1979
|
}, ve = () => {
|
|
1979
|
-
|
|
1980
|
-
}, _e = (
|
|
1981
|
-
V.value =
|
|
1980
|
+
f.value = !1;
|
|
1981
|
+
}, _e = (a) => {
|
|
1982
|
+
V.value = a, N.value = [...N.value, a], B.value = null, x.value && (E.value = []), pe();
|
|
1982
1983
|
}, rt = () => {
|
|
1983
|
-
N.value.length > 1 && (N.value.pop(), V.value = N.value[N.value.length - 1], B.value = null,
|
|
1984
|
+
N.value.length > 1 && (N.value.pop(), V.value = N.value[N.value.length - 1], B.value = null, x.value && (E.value = []), pe());
|
|
1984
1985
|
}, pe = async () => {
|
|
1985
1986
|
try {
|
|
1986
|
-
const
|
|
1987
|
+
const a = V.value.join("/"), h = await (await fetch(`/api/cms-media?subdir=${a}${O.value ? "&search=" + O.value : ""}`, {
|
|
1987
1988
|
method: "GET"
|
|
1988
1989
|
})).json();
|
|
1989
|
-
h.data ? (D.value = h.data.map((
|
|
1990
|
-
...
|
|
1991
|
-
id:
|
|
1992
|
-
preview: `/file/resize?filepath=${
|
|
1990
|
+
h.data ? (D.value = h.data.map((v) => ({
|
|
1991
|
+
...v,
|
|
1992
|
+
id: v.type === "dir" ? `dir-${v.name}` : v.id,
|
|
1993
|
+
preview: `/file/resize?filepath=${v.filepath}&h=137&quality=75`
|
|
1993
1994
|
})), ae(se.value)) : D.value = [];
|
|
1994
|
-
} catch (
|
|
1995
|
-
console.error("Fetch error:",
|
|
1995
|
+
} catch (a) {
|
|
1996
|
+
console.error("Fetch error:", a), D.value = [];
|
|
1996
1997
|
}
|
|
1997
|
-
}, $e = async (
|
|
1998
|
+
}, $e = async (a, c) => {
|
|
1998
1999
|
try {
|
|
1999
|
-
const h = typeof
|
|
2000
|
-
if (await fetch(`/file/delete${h}`),
|
|
2001
|
-
const
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
2000
|
+
const h = typeof a == "string" ? a : re(a);
|
|
2001
|
+
if (await fetch(`/file/delete${h}`), x.value) {
|
|
2002
|
+
const v = Array.isArray(d.value) ? [...d.value] : [], A = Array.isArray(p.value) ? [...p.value] : [];
|
|
2003
|
+
if (c !== void 0 && c >= 0)
|
|
2004
|
+
v.splice(c, 1), A.splice(c, 1);
|
|
2004
2005
|
else {
|
|
2005
|
-
const S =
|
|
2006
|
-
S >= 0 && (
|
|
2006
|
+
const S = v.findIndex((I) => (typeof I == "string" ? I : (I == null ? void 0 : I.filepath) || (I == null ? void 0 : I.file_path)) === h);
|
|
2007
|
+
S >= 0 && (v.splice(S, 1), A.splice(S, 1));
|
|
2007
2008
|
}
|
|
2008
|
-
d && (d.value =
|
|
2009
|
+
d && (d.value = v.length > 0 ? v : null), p.value = A.length > 0 ? A : null, m("cms.change", v.length > 0 ? v : null);
|
|
2009
2010
|
} else
|
|
2010
|
-
d && (d.value = null), p.value = null,
|
|
2011
|
+
d && (d.value = null), p.value = null, m("cms.change", null);
|
|
2011
2012
|
return !0;
|
|
2012
2013
|
} catch (h) {
|
|
2013
2014
|
return console.error(h), !1;
|
|
2014
2015
|
}
|
|
2015
|
-
}, Ce = async (
|
|
2016
|
+
}, Ce = async (a) => {
|
|
2016
2017
|
try {
|
|
2017
|
-
const
|
|
2018
|
-
I.setAttribute("download",
|
|
2019
|
-
} catch (
|
|
2020
|
-
console.error(
|
|
2018
|
+
const c = await fetch(`/file/download/files/uploads${a}`), h = await c.arrayBuffer(), v = c.headers["content-type"], A = new TextDecoder("utf-8").decode(h), S = new Blob([A], { type: v }), I = document.createElement("cms.a");
|
|
2019
|
+
I.setAttribute("download", a), I.href = window.URL.createObjectURL(S), I.click();
|
|
2020
|
+
} catch (c) {
|
|
2021
|
+
console.error(c.message);
|
|
2021
2022
|
}
|
|
2022
|
-
}, lt = async (
|
|
2023
|
-
if (!
|
|
2023
|
+
}, lt = async (a) => {
|
|
2024
|
+
if (!a.target.files || a.target.files.length === 0)
|
|
2024
2025
|
return;
|
|
2025
|
-
const
|
|
2026
|
+
const c = Array.from(a.target.files);
|
|
2026
2027
|
G.value = !0;
|
|
2027
2028
|
try {
|
|
2028
2029
|
const h = [];
|
|
2029
|
-
for (const
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2030
|
+
for (const v of c) {
|
|
2031
|
+
const A = new FormData();
|
|
2032
|
+
A.append("file", v);
|
|
2032
2033
|
const S = await fetch("/file/upload/uploads?id=1&form=form&table=table", {
|
|
2033
2034
|
method: "POST",
|
|
2034
|
-
body:
|
|
2035
|
+
body: A
|
|
2035
2036
|
});
|
|
2036
2037
|
if (!S.ok)
|
|
2037
2038
|
throw new Error(`Upload failed: ${S.status}`);
|
|
@@ -2050,136 +2051,136 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
2050
2051
|
};
|
|
2051
2052
|
h.push(st);
|
|
2052
2053
|
}
|
|
2053
|
-
if (
|
|
2054
|
-
const
|
|
2054
|
+
if (x.value) {
|
|
2055
|
+
const v = Array.isArray(d.value) ? [...d.value] : d.value ? [d.value] : [], A = Array.isArray(p.value) ? [...p.value] : p.value ? [p.value] : [];
|
|
2055
2056
|
h.forEach((S) => {
|
|
2056
|
-
|
|
2057
|
-
}), d && (d.value =
|
|
2057
|
+
v.push(S.file_path), A.push(S);
|
|
2058
|
+
}), d && (d.value = v), p.value = A, m("cms.change", v);
|
|
2058
2059
|
} else {
|
|
2059
|
-
const
|
|
2060
|
-
d && (d.value =
|
|
2060
|
+
const v = h[0];
|
|
2061
|
+
d && (d.value = v.file_path), p.value = v, m("cms.change", v.file_path);
|
|
2061
2062
|
}
|
|
2062
|
-
|
|
2063
|
+
w.value = !1;
|
|
2063
2064
|
} catch (h) {
|
|
2064
2065
|
console.error("Upload error:", h), alert("cms.Помилка завантаження файлу: " + h.message);
|
|
2065
2066
|
} finally {
|
|
2066
2067
|
G.value = !1;
|
|
2067
2068
|
}
|
|
2068
|
-
|
|
2069
|
+
a.target.value = "";
|
|
2069
2070
|
};
|
|
2070
|
-
H(
|
|
2071
|
-
|
|
2072
|
-
}), H(V, (
|
|
2073
|
-
|
|
2071
|
+
H(f, (a) => {
|
|
2072
|
+
a && pe();
|
|
2073
|
+
}), H(V, (a) => {
|
|
2074
|
+
a.length > 0 ? u.push({ query: { path: a.join("/") } }) : u.push({ query: { path: void 0 } });
|
|
2074
2075
|
});
|
|
2075
2076
|
let Ae;
|
|
2076
|
-
return H(O, (
|
|
2077
|
+
return H(O, (a) => {
|
|
2077
2078
|
clearTimeout(Ae), Ae = setTimeout(() => {
|
|
2078
2079
|
et();
|
|
2079
2080
|
}, 500);
|
|
2080
|
-
}), H(d, (
|
|
2081
|
-
var
|
|
2082
|
-
if (
|
|
2083
|
-
const S = ((
|
|
2084
|
-
|
|
2085
|
-
} else if (
|
|
2086
|
-
const S = ((
|
|
2087
|
-
|
|
2081
|
+
}), H(d, (a) => {
|
|
2082
|
+
var c, h, v, A;
|
|
2083
|
+
if (a && typeof a == "object") {
|
|
2084
|
+
const S = ((c = B.value) == null ? void 0 : c.filepath) || ((h = B.value) == null ? void 0 : h.file_path);
|
|
2085
|
+
a.filepath !== S && a.file_path !== S && (B.value = null);
|
|
2086
|
+
} else if (a && typeof a == "string") {
|
|
2087
|
+
const S = ((v = B.value) == null ? void 0 : v.filepath) || ((A = B.value) == null ? void 0 : A.file_path);
|
|
2088
|
+
a !== S && (B.value = null);
|
|
2088
2089
|
}
|
|
2089
2090
|
}), de(() => {
|
|
2090
|
-
var
|
|
2091
|
-
V.value = ((h = (
|
|
2092
|
-
const
|
|
2093
|
-
var
|
|
2094
|
-
|
|
2091
|
+
var c, h;
|
|
2092
|
+
V.value = ((h = (c = b.query) == null ? void 0 : c.path) == null ? void 0 : h.split("cms./")) || [], N.value = [[]], d.value || (B.value = null);
|
|
2093
|
+
const a = (v) => {
|
|
2094
|
+
var A;
|
|
2095
|
+
w.value && !((A = le.value) != null && A.contains(v.target)) && (w.value = !1), K.value && ce.value && !ce.value.contains(v.target) && (K.value = !1);
|
|
2095
2096
|
};
|
|
2096
|
-
document.addEventListener("click",
|
|
2097
|
-
}), (
|
|
2098
|
-
|
|
2099
|
-
|
|
2097
|
+
document.addEventListener("click", a);
|
|
2098
|
+
}), (a, c) => (o(), n(L, null, [
|
|
2099
|
+
r("div", ot(a.$attrs, { class: "flex gap-4 flex-wrap" }), [
|
|
2100
|
+
x.value ? (o(), F(y(Ge), {
|
|
2100
2101
|
key: 0,
|
|
2101
|
-
modelValue:
|
|
2102
|
-
"onUpdate:modelValue":
|
|
2102
|
+
modelValue: $.value,
|
|
2103
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => $.value = h),
|
|
2103
2104
|
"item-key": (h) => re(h),
|
|
2104
2105
|
handle: ".drag-handle",
|
|
2105
|
-
class: Q(["flex gap-4 flex-wrap",
|
|
2106
|
+
class: Q(["flex gap-4 flex-wrap", a.$attrs.class])
|
|
2106
2107
|
}, {
|
|
2107
|
-
item: U(({ element: h, index:
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2108
|
+
item: U(({ element: h, index: v }) => [
|
|
2109
|
+
r("div", rs, [
|
|
2110
|
+
r("div", ls, [
|
|
2111
|
+
k(y(xe), { class: "w-4 h-4 text-gray-500 dark:text-slate-400" })
|
|
2111
2112
|
]),
|
|
2112
|
-
|
|
2113
|
+
r("img", {
|
|
2113
2114
|
src: Ye(h),
|
|
2114
2115
|
alt: "Selected File",
|
|
2115
2116
|
class: "w-32 h-32 object-cover rounded-lg"
|
|
2116
2117
|
}, null, 8, ss),
|
|
2117
|
-
|
|
2118
|
-
|
|
2118
|
+
r("div", as, [
|
|
2119
|
+
r("button", {
|
|
2119
2120
|
type: "button",
|
|
2120
|
-
onClick: (
|
|
2121
|
+
onClick: (A) => $e(h, v),
|
|
2121
2122
|
class: "p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"
|
|
2122
2123
|
}, [
|
|
2123
|
-
|
|
2124
|
+
k(y(ee), { class: "w-4 h-4" })
|
|
2124
2125
|
], 8, os),
|
|
2125
|
-
|
|
2126
|
+
r("button", {
|
|
2126
2127
|
type: "button",
|
|
2127
|
-
onClick: (
|
|
2128
|
+
onClick: (A) => Ce(re(h)),
|
|
2128
2129
|
class: "p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"
|
|
2129
2130
|
}, [
|
|
2130
|
-
|
|
2131
|
+
k(y(ge), { class: "w-4 h-4" })
|
|
2131
2132
|
], 8, ns)
|
|
2132
2133
|
]),
|
|
2133
|
-
|
|
2134
|
+
r("div", {
|
|
2134
2135
|
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
2136
|
title: we(h)
|
|
2136
2137
|
}, [
|
|
2137
|
-
X(
|
|
2138
|
-
|
|
2138
|
+
X(i(we(h)) + " ", 1),
|
|
2139
|
+
c[13] || (c[13] = r("div", { class: "absolute top-full left-4 border-4 border-transparent border-t-gray-900" }, null, -1))
|
|
2139
2140
|
], 8, ds)
|
|
2140
2141
|
])
|
|
2141
2142
|
]),
|
|
2142
2143
|
_: 1
|
|
2143
|
-
}, 8, ["modelValue", "item-key", "class"])) :
|
|
2144
|
-
|
|
2145
|
-
src:
|
|
2144
|
+
}, 8, ["modelValue", "item-key", "class"])) : t.value ? (o(), n("div", is, [
|
|
2145
|
+
r("img", {
|
|
2146
|
+
src: t.value.preview || t.value,
|
|
2146
2147
|
alt: "Selected File",
|
|
2147
2148
|
class: "w-32 h-32 object-cover rounded-lg"
|
|
2148
2149
|
}, null, 8, us),
|
|
2149
|
-
|
|
2150
|
-
|
|
2150
|
+
r("div", cs, [
|
|
2151
|
+
r("button", {
|
|
2151
2152
|
type: "button",
|
|
2152
|
-
onClick:
|
|
2153
|
-
var
|
|
2154
|
-
return $e(((
|
|
2153
|
+
onClick: c[1] || (c[1] = (h) => {
|
|
2154
|
+
var v, A;
|
|
2155
|
+
return $e(((v = t.value) == null ? void 0 : v.filepath) || ((A = t.value) == null ? void 0 : A.file_path) || t.value);
|
|
2155
2156
|
}),
|
|
2156
2157
|
class: "p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"
|
|
2157
2158
|
}, [
|
|
2158
|
-
|
|
2159
|
+
k(y(ee), { class: "w-4 h-4" })
|
|
2159
2160
|
]),
|
|
2160
|
-
|
|
2161
|
+
r("button", {
|
|
2161
2162
|
type: "button",
|
|
2162
|
-
onClick:
|
|
2163
|
-
var
|
|
2164
|
-
return Ce(((
|
|
2163
|
+
onClick: c[2] || (c[2] = (h) => {
|
|
2164
|
+
var v, A;
|
|
2165
|
+
return Ce(((v = t.value) == null ? void 0 : v.filepath) || ((A = t.value) == null ? void 0 : A.file_path) || t.value);
|
|
2165
2166
|
}),
|
|
2166
2167
|
class: "p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"
|
|
2167
2168
|
}, [
|
|
2168
|
-
|
|
2169
|
+
k(y(ge), { class: "w-4 h-4" })
|
|
2169
2170
|
])
|
|
2170
2171
|
]),
|
|
2171
|
-
|
|
2172
|
+
r("div", {
|
|
2172
2173
|
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",
|
|
2173
|
-
title:
|
|
2174
|
+
title: C.value
|
|
2174
2175
|
}, [
|
|
2175
|
-
X(
|
|
2176
|
-
|
|
2176
|
+
X(i(C.value) + " ", 1),
|
|
2177
|
+
c[14] || (c[14] = r("div", { class: "absolute top-full left-4 border-4 border-transparent border-t-gray-900" }, null, -1))
|
|
2177
2178
|
], 8, vs)
|
|
2178
2179
|
])) : j("", !0),
|
|
2179
|
-
|
|
2180
|
+
r("div", {
|
|
2180
2181
|
ref_key: "triggerButton",
|
|
2181
2182
|
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":
|
|
2183
|
+
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": w.value, "opacity-50 cursor-not-allowed": G.value }]),
|
|
2183
2184
|
onClick: Je
|
|
2184
2185
|
}, [
|
|
2185
2186
|
G.value ? (o(), F(y(he), {
|
|
@@ -2190,73 +2191,73 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
2190
2191
|
class: "w-4 h-4"
|
|
2191
2192
|
})),
|
|
2192
2193
|
G.value ? (o(), n("div", ps, [
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2194
|
+
r("div", gs, [
|
|
2195
|
+
k(y(he), { class: "w-6 h-6 animate-spin text-blue-500" }),
|
|
2196
|
+
r("span", hs, i(a.$t("cms.media.uploading")), 1)
|
|
2196
2197
|
])
|
|
2197
2198
|
])) : j("", !0),
|
|
2198
2199
|
(o(), F(Me, { to: "body" }, [
|
|
2199
|
-
|
|
2200
|
+
w.value ? (o(), n("div", {
|
|
2200
2201
|
key: 0,
|
|
2201
2202
|
class: "fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",
|
|
2202
2203
|
style: nt(fe.value)
|
|
2203
2204
|
}, [
|
|
2204
|
-
|
|
2205
|
+
r("div", {
|
|
2205
2206
|
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:
|
|
2207
|
+
onClick: c[4] || (c[4] = (h) => !G.value && Ke())
|
|
2207
2208
|
}, [
|
|
2208
|
-
|
|
2209
|
+
r("input", {
|
|
2209
2210
|
type: "file",
|
|
2210
2211
|
ref_key: "fileInput",
|
|
2211
2212
|
ref: ue,
|
|
2212
2213
|
class: "absolute justify-center bottom-0 left-0 w-full opacity-0",
|
|
2213
2214
|
onChange: lt,
|
|
2214
|
-
onClick:
|
|
2215
|
+
onClick: c[3] || (c[3] = J(() => {
|
|
2215
2216
|
}, ["stop"])),
|
|
2216
|
-
multiple:
|
|
2217
|
+
multiple: x.value,
|
|
2217
2218
|
disabled: G.value
|
|
2218
2219
|
}, null, 40, bs),
|
|
2219
2220
|
G.value ? (o(), F(y(he), {
|
|
2220
2221
|
key: 0,
|
|
2221
2222
|
class: "w-4 h-4 animate-spin"
|
|
2222
2223
|
})) : (o(), F(y(ge), { key: 1 })),
|
|
2223
|
-
|
|
2224
|
+
r("span", ys, i(G.value ? a.$t("cms.media.uploading") : a.$t("cms.media.upload")), 1)
|
|
2224
2225
|
], 2),
|
|
2225
|
-
|
|
2226
|
-
onClick:
|
|
2226
|
+
r("div", {
|
|
2227
|
+
onClick: c[5] || (c[5] = (h) => f.value = !0),
|
|
2227
2228
|
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"
|
|
2228
2229
|
}, [
|
|
2229
|
-
|
|
2230
|
-
|
|
2230
|
+
k(y(gt)),
|
|
2231
|
+
r("span", ms, i(a.$t("cms.media.selectFromMedia")), 1)
|
|
2231
2232
|
])
|
|
2232
2233
|
], 4)) : j("", !0)
|
|
2233
2234
|
]))
|
|
2234
2235
|
], 2)
|
|
2235
2236
|
], 16),
|
|
2236
2237
|
(o(), F(Me, { to: "body" }, [
|
|
2237
|
-
|
|
2238
|
+
f.value ? (o(), n("div", {
|
|
2238
2239
|
key: 0,
|
|
2239
2240
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",
|
|
2240
2241
|
onClick: ve
|
|
2241
2242
|
}, [
|
|
2242
|
-
|
|
2243
|
+
r("div", {
|
|
2243
2244
|
class: "bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",
|
|
2244
|
-
onClick:
|
|
2245
|
+
onClick: c[12] || (c[12] = J(() => {
|
|
2245
2246
|
}, ["stop"]))
|
|
2246
2247
|
}, [
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2248
|
+
r("div", xs, [
|
|
2249
|
+
r("h3", fs, i(a.$t("cms.media.selectFiles")), 1),
|
|
2250
|
+
r("button", {
|
|
2250
2251
|
onClick: ve,
|
|
2251
2252
|
class: "text-gray-400 hover:text-gray-600"
|
|
2252
|
-
}, [...
|
|
2253
|
-
|
|
2253
|
+
}, [...c[15] || (c[15] = [
|
|
2254
|
+
r("svg", {
|
|
2254
2255
|
class: "w-6 h-6",
|
|
2255
2256
|
fill: "none",
|
|
2256
2257
|
stroke: "currentColor",
|
|
2257
2258
|
viewBox: "0 0 24 24"
|
|
2258
2259
|
}, [
|
|
2259
|
-
|
|
2260
|
+
r("path", {
|
|
2260
2261
|
"stroke-linecap": "round",
|
|
2261
2262
|
"stroke-linejoin": "round",
|
|
2262
2263
|
"stroke-width": "2",
|
|
@@ -2265,96 +2266,96 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
2265
2266
|
], -1)
|
|
2266
2267
|
])])
|
|
2267
2268
|
]),
|
|
2268
|
-
|
|
2269
|
-
|
|
2269
|
+
r("div", ws, [
|
|
2270
|
+
k(ts, {
|
|
2270
2271
|
"current-path": V.value,
|
|
2271
2272
|
onNavigate: _e,
|
|
2272
2273
|
onNavigateBack: rt
|
|
2273
2274
|
}, null, 8, ["current-path"])
|
|
2274
2275
|
]),
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
De(
|
|
2276
|
+
r("div", ks, [
|
|
2277
|
+
r("div", _s, [
|
|
2278
|
+
r("div", $s, [
|
|
2279
|
+
r("div", Cs, [
|
|
2280
|
+
k(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" }),
|
|
2281
|
+
De(r("input", {
|
|
2281
2282
|
type: "text",
|
|
2282
|
-
placeholder:
|
|
2283
|
+
placeholder: a.$t("cms.media.search"),
|
|
2283
2284
|
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",
|
|
2284
|
-
"onUpdate:modelValue":
|
|
2285
|
+
"onUpdate:modelValue": c[6] || (c[6] = (h) => O.value = h)
|
|
2285
2286
|
}, null, 8, As), [
|
|
2286
2287
|
[Te, O.value]
|
|
2287
2288
|
])
|
|
2288
2289
|
]),
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2290
|
+
r("div", Ms, [
|
|
2291
|
+
r("span", js, i(a.$t("cms.media.sortBy.title") + ": "), 1),
|
|
2292
|
+
r("button", {
|
|
2292
2293
|
ref_key: "sortByButton",
|
|
2293
2294
|
ref: ce,
|
|
2294
2295
|
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",
|
|
2295
|
-
onClick:
|
|
2296
|
+
onClick: c[9] || (c[9] = (h) => K.value = !K.value)
|
|
2296
2297
|
}, [
|
|
2297
|
-
|
|
2298
|
-
|
|
2298
|
+
k(y(bt), { class: "w-4 h-4" }),
|
|
2299
|
+
r("span", Vs, i(y(Oe).get(se.value)), 1),
|
|
2299
2300
|
K.value ? (o(), n("div", Fs, [
|
|
2300
|
-
|
|
2301
|
+
r("span", {
|
|
2301
2302
|
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",
|
|
2302
|
-
onClick:
|
|
2303
|
-
},
|
|
2304
|
-
|
|
2303
|
+
onClick: c[7] || (c[7] = J((h) => ae("name"), ["stop"]))
|
|
2304
|
+
}, i(a.$t("cms.media.sortBy.name")), 1),
|
|
2305
|
+
r("span", {
|
|
2305
2306
|
class: "text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",
|
|
2306
|
-
onClick:
|
|
2307
|
-
},
|
|
2307
|
+
onClick: c[8] || (c[8] = J((h) => ae("filesize"), ["stop"]))
|
|
2308
|
+
}, i(a.$t("cms.media.sortBy.filesize")), 1)
|
|
2308
2309
|
])) : j("", !0)
|
|
2309
2310
|
], 512)
|
|
2310
2311
|
])
|
|
2311
2312
|
]),
|
|
2312
|
-
|
|
2313
|
-
|
|
2313
|
+
r("div", Bs, [
|
|
2314
|
+
r("button", {
|
|
2314
2315
|
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
2316
|
"shadow bg-blue-600 hover:bg-blue-700 text-white": q.value === "grid",
|
|
2316
2317
|
"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"
|
|
2317
2318
|
}]),
|
|
2318
|
-
onClick:
|
|
2319
|
+
onClick: c[10] || (c[10] = (h) => q.value = "grid")
|
|
2319
2320
|
}, [
|
|
2320
|
-
|
|
2321
|
+
k(y(yt), { class: "w-4 h-4" })
|
|
2321
2322
|
], 2),
|
|
2322
|
-
|
|
2323
|
+
r("button", {
|
|
2323
2324
|
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
2325
|
"shadow bg-blue-600 hover:bg-blue-700 text-white": q.value === "list",
|
|
2325
2326
|
"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"
|
|
2326
2327
|
}]),
|
|
2327
|
-
onClick:
|
|
2328
|
+
onClick: c[11] || (c[11] = (h) => q.value = "list")
|
|
2328
2329
|
}, [
|
|
2329
|
-
|
|
2330
|
+
k(y(mt), { class: "w-4 h-4" })
|
|
2330
2331
|
], 2)
|
|
2331
2332
|
])
|
|
2332
2333
|
])
|
|
2333
2334
|
]),
|
|
2334
|
-
|
|
2335
|
+
r("div", Ss, [
|
|
2335
2336
|
q.value === "grid" ? (o(), F(fl, {
|
|
2336
2337
|
key: 0,
|
|
2337
2338
|
files: D.value,
|
|
2338
|
-
"selected-file":
|
|
2339
|
-
"selected-files":
|
|
2339
|
+
"selected-file": x.value ? null : B.value,
|
|
2340
|
+
"selected-files": x.value ? E.value : [],
|
|
2340
2341
|
onFileClick: ke
|
|
2341
2342
|
}, null, 8, ["files", "selected-file", "selected-files"])) : (o(), F(Hl, {
|
|
2342
2343
|
key: 1,
|
|
2343
2344
|
files: D.value,
|
|
2344
|
-
"selected-file":
|
|
2345
|
-
"selected-files":
|
|
2345
|
+
"selected-file": x.value ? null : B.value,
|
|
2346
|
+
"selected-files": x.value ? E.value : [],
|
|
2346
2347
|
onFileClick: ke
|
|
2347
2348
|
}, null, 8, ["files", "selected-file", "selected-files"]))
|
|
2348
2349
|
]),
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2350
|
+
r("div", qs, [
|
|
2351
|
+
x.value && E.value.length > 0 ? (o(), n("div", zs, i(a.$t("cms.media.selectedFiles", { count: E.value.length })), 1)) : (o(), n("div", Es)),
|
|
2352
|
+
r("button", {
|
|
2352
2353
|
onClick: tt,
|
|
2353
|
-
disabled:
|
|
2354
|
+
disabled: x.value ? E.value.length === 0 : !B.value,
|
|
2354
2355
|
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"
|
|
2355
2356
|
}, [
|
|
2356
|
-
|
|
2357
|
-
X(" " +
|
|
2357
|
+
k(y(ye), { class: "w-4 h-4 mr-2" }),
|
|
2358
|
+
X(" " + i(a.$t("cms.common.actions.add")), 1)
|
|
2358
2359
|
], 8, Is)
|
|
2359
2360
|
])
|
|
2360
2361
|
])
|
|
@@ -2364,8 +2365,8 @@ const Jl = /* @__PURE__ */ te(Ol, [["render", Kl]]), Xl = { class: "flex items-c
|
|
|
2364
2365
|
}
|
|
2365
2366
|
}, Ts = {};
|
|
2366
2367
|
function Ls(e, l) {
|
|
2367
|
-
const
|
|
2368
|
-
return o(), F(
|
|
2368
|
+
const s = me("vs-richtext-md", !0);
|
|
2369
|
+
return o(), F(s, { class: "w-full h-[300px]" });
|
|
2369
2370
|
}
|
|
2370
2371
|
const Aa = /* @__PURE__ */ te(Ts, [["render", Ls]]), Ns = {
|
|
2371
2372
|
props: {
|
|
@@ -2401,22 +2402,22 @@ const Aa = /* @__PURE__ */ te(Ts, [["render", Ls]]), Ns = {
|
|
|
2401
2402
|
}
|
|
2402
2403
|
}
|
|
2403
2404
|
}, Gs = { class: "p-0" }, Qs = ["step", "min", "max", "id", "placeholder", "disabled"];
|
|
2404
|
-
function Zs(e, l,
|
|
2405
|
+
function Zs(e, l, s, b, u, d) {
|
|
2405
2406
|
return o(), n("div", Gs, [
|
|
2406
2407
|
dt(e.$slots, "label", it(ut({ id: u.id }))),
|
|
2407
|
-
De(
|
|
2408
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2408
|
+
De(r("input", {
|
|
2409
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => u.inputValue = m),
|
|
2409
2410
|
type: "number",
|
|
2410
|
-
onKeydown: l[1] || (l[1] = (...
|
|
2411
|
-
onBlur: l[2] || (l[2] = (...
|
|
2412
|
-
step:
|
|
2413
|
-
min:
|
|
2414
|
-
max:
|
|
2411
|
+
onKeydown: l[1] || (l[1] = (...m) => d.validateInput && d.validateInput(...m)),
|
|
2412
|
+
onBlur: l[2] || (l[2] = (...m) => d.handleBlur && d.handleBlur(...m)),
|
|
2413
|
+
step: s.step,
|
|
2414
|
+
min: s.min,
|
|
2415
|
+
max: s.max,
|
|
2415
2416
|
id: u.id,
|
|
2416
2417
|
"aria-describedby": "helper-text-explanation",
|
|
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":
|
|
2418
|
-
placeholder:
|
|
2419
|
-
disabled:
|
|
2418
|
+
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": s.disabled }]),
|
|
2419
|
+
placeholder: s.placeholder,
|
|
2420
|
+
disabled: s.disabled
|
|
2420
2421
|
}, null, 42, Qs), [
|
|
2421
2422
|
[Te, u.inputValue]
|
|
2422
2423
|
])
|
|
@@ -2442,7 +2443,7 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2442
2443
|
}),
|
|
2443
2444
|
emits: ["update:modelValue"],
|
|
2444
2445
|
setup(e) {
|
|
2445
|
-
const { t: l } = Y(),
|
|
2446
|
+
const { t: l } = Y(), s = Le(() => import("@opengis/form")), b = e, u = Z(e, "modelValue"), d = M(!1), m = M({}), g = M({}), x = () => {
|
|
2446
2447
|
Ze({
|
|
2447
2448
|
title: l("cms.builder.deleteTitle"),
|
|
2448
2449
|
message: l("cms.builder.deleteField"),
|
|
@@ -2452,9 +2453,9 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2452
2453
|
}
|
|
2453
2454
|
});
|
|
2454
2455
|
}, p = () => {
|
|
2455
|
-
u.value = u.value.filter((
|
|
2456
|
-
},
|
|
2457
|
-
if (await
|
|
2456
|
+
u.value = u.value.filter((_) => _.id !== b.item.id);
|
|
2457
|
+
}, t = async () => {
|
|
2458
|
+
if (await g.value.validate()) {
|
|
2458
2459
|
ie({
|
|
2459
2460
|
type: "warning",
|
|
2460
2461
|
title: l("cms.common.actions.warning"),
|
|
@@ -2463,49 +2464,49 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2463
2464
|
return;
|
|
2464
2465
|
}
|
|
2465
2466
|
u.value = u.value.map(
|
|
2466
|
-
(
|
|
2467
|
+
($) => $.id === b.item.id ? m.value : $
|
|
2467
2468
|
), d.value = !1;
|
|
2468
2469
|
};
|
|
2469
|
-
return H(d, (
|
|
2470
|
-
|
|
2471
|
-
}), (
|
|
2472
|
-
|
|
2470
|
+
return H(d, (_) => {
|
|
2471
|
+
_ && (m.value = b.item);
|
|
2472
|
+
}), (_, $) => (o(), n("div", Us, [
|
|
2473
|
+
r("button", {
|
|
2473
2474
|
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",
|
|
2474
|
-
onClick:
|
|
2475
|
+
onClick: $[0] || ($[0] = (C) => d.value = !0)
|
|
2475
2476
|
}, [
|
|
2476
|
-
|
|
2477
|
+
k(y(xt), { class: "w-4 h-4" })
|
|
2477
2478
|
]),
|
|
2478
|
-
|
|
2479
|
-
onClick:
|
|
2479
|
+
r("button", {
|
|
2480
|
+
onClick: x,
|
|
2480
2481
|
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"
|
|
2481
2482
|
}, [
|
|
2482
|
-
|
|
2483
|
+
k(y(ee), { class: "w-4 h-4" })
|
|
2483
2484
|
]),
|
|
2484
|
-
|
|
2485
|
+
k(y(Ue), {
|
|
2485
2486
|
teleport: "#modal",
|
|
2486
|
-
title:
|
|
2487
|
+
title: _.$t("cms.builder.editField"),
|
|
2487
2488
|
visible: d.value,
|
|
2488
|
-
onClose:
|
|
2489
|
+
onClose: $[4] || ($[4] = (C) => d.value = !1)
|
|
2489
2490
|
}, {
|
|
2490
2491
|
footer: U(() => [
|
|
2491
|
-
|
|
2492
|
-
|
|
2492
|
+
r("div", Ws, [
|
|
2493
|
+
r("button", {
|
|
2493
2494
|
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",
|
|
2494
|
-
onClick:
|
|
2495
|
-
},
|
|
2496
|
-
|
|
2497
|
-
onClick:
|
|
2495
|
+
onClick: $[3] || ($[3] = (C) => d.value = !1)
|
|
2496
|
+
}, i(_.$t("cms.common.actions.cancel")), 1),
|
|
2497
|
+
r("button", {
|
|
2498
|
+
onClick: t,
|
|
2498
2499
|
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"
|
|
2499
|
-
},
|
|
2500
|
+
}, i(_.$t("cms.common.actions.save")), 1)
|
|
2500
2501
|
])
|
|
2501
2502
|
]),
|
|
2502
2503
|
default: U(() => [
|
|
2503
|
-
|
|
2504
|
-
form:
|
|
2505
|
-
"onUpdate:form":
|
|
2504
|
+
k(y(s), {
|
|
2505
|
+
form: g.value,
|
|
2506
|
+
"onUpdate:form": $[1] || ($[1] = (C) => g.value = C),
|
|
2506
2507
|
schema: e.colModel,
|
|
2507
|
-
modelValue:
|
|
2508
|
-
"onUpdate:modelValue":
|
|
2508
|
+
modelValue: m.value,
|
|
2509
|
+
"onUpdate:modelValue": $[2] || ($[2] = (C) => m.value = C)
|
|
2509
2510
|
}, null, 8, ["form", "schema", "modelValue"])
|
|
2510
2511
|
]),
|
|
2511
2512
|
_: 1
|
|
@@ -2528,9 +2529,9 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2528
2529
|
}),
|
|
2529
2530
|
emits: ["update:modelValue"],
|
|
2530
2531
|
setup(e) {
|
|
2531
|
-
const { t: l } = Y(),
|
|
2532
|
+
const { t: l } = Y(), s = Le(() => import("@opengis/form")), b = Z(e, "modelValue"), u = M(!1), d = M({}), m = M({}), g = async () => {
|
|
2532
2533
|
try {
|
|
2533
|
-
if (await
|
|
2534
|
+
if (await m.value.validate()) {
|
|
2534
2535
|
ie({
|
|
2535
2536
|
type: "warning",
|
|
2536
2537
|
title: l("cms.common.actions.warning"),
|
|
@@ -2542,43 +2543,43 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2542
2543
|
...b.value || [],
|
|
2543
2544
|
{ ...d.value, id: Math.random().toString(36).substring(2, 15) }
|
|
2544
2545
|
], u.value = !1, d.value = {};
|
|
2545
|
-
} catch (
|
|
2546
|
-
console.log(
|
|
2546
|
+
} catch (x) {
|
|
2547
|
+
console.log(x);
|
|
2547
2548
|
}
|
|
2548
2549
|
};
|
|
2549
|
-
return (
|
|
2550
|
-
|
|
2550
|
+
return (x, p) => (o(), n("div", Ps, [
|
|
2551
|
+
r("button", {
|
|
2551
2552
|
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",
|
|
2552
|
-
onClick: p[0] || (p[0] = (
|
|
2553
|
+
onClick: p[0] || (p[0] = (t) => u.value = !0)
|
|
2553
2554
|
}, [
|
|
2554
|
-
|
|
2555
|
-
X(" " +
|
|
2555
|
+
k(y(ye), { class: "w-4 h-4 mr-2" }),
|
|
2556
|
+
X(" " + i(x.$t("cms.common.actions.add")), 1)
|
|
2556
2557
|
]),
|
|
2557
|
-
|
|
2558
|
+
k(y(Ue), {
|
|
2558
2559
|
teleport: "#modal",
|
|
2559
|
-
title:
|
|
2560
|
+
title: x.$t("cms.common.actions.add"),
|
|
2560
2561
|
visible: u.value,
|
|
2561
|
-
onClose: p[4] || (p[4] = (
|
|
2562
|
+
onClose: p[4] || (p[4] = (t) => u.value = !1)
|
|
2562
2563
|
}, {
|
|
2563
2564
|
footer: U(() => [
|
|
2564
|
-
|
|
2565
|
-
|
|
2565
|
+
r("div", Hs, [
|
|
2566
|
+
r("button", {
|
|
2566
2567
|
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",
|
|
2567
|
-
onClick: p[3] || (p[3] = (
|
|
2568
|
-
},
|
|
2569
|
-
|
|
2570
|
-
onClick:
|
|
2568
|
+
onClick: p[3] || (p[3] = (t) => u.value = !1)
|
|
2569
|
+
}, i(x.$t("cms.common.actions.cancel")), 1),
|
|
2570
|
+
r("button", {
|
|
2571
|
+
onClick: g,
|
|
2571
2572
|
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"
|
|
2572
|
-
},
|
|
2573
|
+
}, i(x.$t("cms.common.actions.save")), 1)
|
|
2573
2574
|
])
|
|
2574
2575
|
]),
|
|
2575
2576
|
default: U(() => [
|
|
2576
|
-
|
|
2577
|
-
form:
|
|
2578
|
-
"onUpdate:form": p[1] || (p[1] = (
|
|
2577
|
+
k(y(s), {
|
|
2578
|
+
form: m.value,
|
|
2579
|
+
"onUpdate:form": p[1] || (p[1] = (t) => m.value = t),
|
|
2579
2580
|
schema: e.colModel,
|
|
2580
2581
|
modelValue: d.value,
|
|
2581
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2582
|
+
"onUpdate:modelValue": p[2] || (p[2] = (t) => d.value = t)
|
|
2582
2583
|
}, null, 8, ["form", "schema", "modelValue"])
|
|
2583
2584
|
]),
|
|
2584
2585
|
_: 1
|
|
@@ -2616,62 +2617,62 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2616
2617
|
}),
|
|
2617
2618
|
emits: ["update:modelValue"],
|
|
2618
2619
|
setup(e) {
|
|
2619
|
-
const l = Z(e, "modelValue"),
|
|
2620
|
-
|
|
2621
|
-
},
|
|
2622
|
-
|
|
2623
|
-
},
|
|
2624
|
-
b.value !==
|
|
2625
|
-
},
|
|
2626
|
-
|
|
2627
|
-
}, p = (
|
|
2628
|
-
if (
|
|
2620
|
+
const l = Z(e, "modelValue"), s = M(null), b = M(-1), u = M(!1), d = (C, w, f) => {
|
|
2621
|
+
s.value = w, b.value = f, C.dataTransfer.effectAllowed = "move", C.dataTransfer.setData("text/html", "");
|
|
2622
|
+
}, m = (C, w) => {
|
|
2623
|
+
C.preventDefault(), C.dataTransfer.dropEffect = "move";
|
|
2624
|
+
}, g = (C, w) => {
|
|
2625
|
+
b.value !== w && (u.value = !0);
|
|
2626
|
+
}, x = (C) => {
|
|
2627
|
+
C.currentTarget.contains(C.relatedTarget) || (u.value = !1);
|
|
2628
|
+
}, p = (C, w) => {
|
|
2629
|
+
if (C.preventDefault(), u.value = !1, b.value === -1 || b.value === w)
|
|
2629
2630
|
return;
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2632
|
-
},
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2631
|
+
const f = [...l.value], [q] = f.splice(b.value, 1);
|
|
2632
|
+
f.splice(w, 0, q), l.value = f, s.value = null, b.value = -1;
|
|
2633
|
+
}, t = (C) => Array.isArray(C) ? C.slice(0, Ee) : [], _ = (C) => Array.isArray(C) ? Math.max(0, C.length - Ee) : 0, $ = (C) => {
|
|
2634
|
+
const w = C.target;
|
|
2635
|
+
w.style.display = "none";
|
|
2636
|
+
const f = document.createElement("cms.div");
|
|
2637
|
+
f.className = "w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600", f.innerHTML = `
|
|
2637
2638
|
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
2638
2639
|
<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" />
|
|
2639
2640
|
</svg>
|
|
2640
|
-
`,
|
|
2641
|
+
`, w.parentNode.appendChild(f);
|
|
2641
2642
|
};
|
|
2642
2643
|
return de(() => {
|
|
2643
|
-
var
|
|
2644
|
-
(
|
|
2645
|
-
(
|
|
2644
|
+
var C, w;
|
|
2645
|
+
(w = (C = l.value) == null ? void 0 : C.filter((f) => typeof f == "object")) == null || w.forEach(
|
|
2646
|
+
(f) => f.id ? f.id : f.id = Math.random().toString(36).substring(2, 15)
|
|
2646
2647
|
);
|
|
2647
|
-
}), (
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
(o(!0), n(L, null, P(e.colModel, (
|
|
2655
|
-
key:
|
|
2648
|
+
}), (C, w) => (o(), n("div", Ys, [
|
|
2649
|
+
r("div", Ks, [
|
|
2650
|
+
r("div", Js, [
|
|
2651
|
+
r("table", Xs, [
|
|
2652
|
+
r("thead", ea, [
|
|
2653
|
+
r("tr", ta, [
|
|
2654
|
+
w[4] || (w[4] = r("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)),
|
|
2655
|
+
(o(!0), n(L, null, P(e.colModel, (f) => (o(), n("th", {
|
|
2656
|
+
key: f.name,
|
|
2656
2657
|
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]"
|
|
2657
|
-
},
|
|
2658
|
-
|
|
2658
|
+
}, i(f.label || f.title || f.name), 1))), 128)),
|
|
2659
|
+
r("th", ra, i(C.$t("cms.table.actions")), 1)
|
|
2659
2660
|
])
|
|
2660
2661
|
]),
|
|
2661
|
-
|
|
2662
|
-
(o(!0), n(L, null, P(l.value, (
|
|
2663
|
-
key:
|
|
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":
|
|
2662
|
+
r("tbody", la, [
|
|
2663
|
+
(o(!0), n(L, null, P(l.value, (f, q) => (o(), n("tr", {
|
|
2664
|
+
key: f == null ? void 0 : f.id,
|
|
2665
|
+
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": s.value === f }]),
|
|
2665
2666
|
draggable: "true",
|
|
2666
|
-
onDragstart: (V) => d(V,
|
|
2667
|
-
onDragover: (V) =>
|
|
2667
|
+
onDragstart: (V) => d(V, f, q),
|
|
2668
|
+
onDragover: (V) => m(V),
|
|
2668
2669
|
onDrop: (V) => p(V, q),
|
|
2669
|
-
onDragenter: (V) =>
|
|
2670
|
-
onDragleave:
|
|
2670
|
+
onDragenter: (V) => g(V, q),
|
|
2671
|
+
onDragleave: w[2] || (w[2] = (V) => x(V))
|
|
2671
2672
|
}, [
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2673
|
+
r("td", aa, [
|
|
2674
|
+
r("div", oa, [
|
|
2675
|
+
k(y(xe))
|
|
2675
2676
|
])
|
|
2676
2677
|
]),
|
|
2677
2678
|
(o(!0), n(L, null, P(e.colModel, (V) => (o(), n("td", {
|
|
@@ -2680,42 +2681,42 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2680
2681
|
}, [
|
|
2681
2682
|
V.type === "Texteditor" ? (o(), n("span", {
|
|
2682
2683
|
key: 0,
|
|
2683
|
-
innerHTML:
|
|
2684
|
+
innerHTML: f[V.key] || "-"
|
|
2684
2685
|
}, null, 8, na)) : V.type === "File" ? (o(), n("div", da, [
|
|
2685
|
-
Array.isArray(
|
|
2686
|
-
(o(!0), n(L, null, P(
|
|
2686
|
+
Array.isArray(f[V.key]) && f[V.key].length > 0 ? (o(), n("div", ia, [
|
|
2687
|
+
(o(!0), n(L, null, P(t(f[V.key]), (D, N) => (o(), n("div", {
|
|
2687
2688
|
key: N,
|
|
2688
2689
|
class: "relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"
|
|
2689
2690
|
}, [
|
|
2690
|
-
|
|
2691
|
+
r("img", {
|
|
2691
2692
|
src: D,
|
|
2692
2693
|
alt: `Image ${N + 1}`,
|
|
2693
2694
|
class: "w-full h-full object-cover",
|
|
2694
|
-
onError:
|
|
2695
|
+
onError: w[0] || (w[0] = (B) => $(B))
|
|
2695
2696
|
}, null, 40, ua)
|
|
2696
2697
|
]))), 128)),
|
|
2697
|
-
|
|
2698
|
-
])) : (o(), n("div", va, [...
|
|
2699
|
-
|
|
2698
|
+
_(f[V.key]) > 0 ? (o(), n("span", ca, " +" + i(_(f[V.key])), 1)) : j("", !0)
|
|
2699
|
+
])) : (o(), n("div", va, [...w[5] || (w[5] = [
|
|
2700
|
+
r("svg", {
|
|
2700
2701
|
class: "w-4 h-4 text-gray-400",
|
|
2701
2702
|
fill: "currentColor",
|
|
2702
2703
|
viewBox: "0 0 20 20"
|
|
2703
2704
|
}, [
|
|
2704
|
-
|
|
2705
|
+
r("path", {
|
|
2705
2706
|
"fill-rule": "evenodd",
|
|
2706
2707
|
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",
|
|
2707
2708
|
"clip-rule": "evenodd"
|
|
2708
2709
|
})
|
|
2709
2710
|
], -1)
|
|
2710
2711
|
])]))
|
|
2711
|
-
])) : (o(), n("span", pa,
|
|
2712
|
+
])) : (o(), n("span", pa, i(f[V.key] || "-"), 1))
|
|
2712
2713
|
]))), 128)),
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
item:
|
|
2714
|
+
r("td", ga, [
|
|
2715
|
+
k(Rs, {
|
|
2716
|
+
item: f,
|
|
2716
2717
|
colModel: e.colModel,
|
|
2717
2718
|
modelValue: l.value,
|
|
2718
|
-
"onUpdate:modelValue":
|
|
2719
|
+
"onUpdate:modelValue": w[1] || (w[1] = (V) => l.value = V)
|
|
2719
2720
|
}, null, 8, ["item", "colModel", "modelValue"])
|
|
2720
2721
|
])
|
|
2721
2722
|
], 42, sa))), 128)),
|
|
@@ -2724,10 +2725,10 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2724
2725
|
])
|
|
2725
2726
|
])
|
|
2726
2727
|
]),
|
|
2727
|
-
|
|
2728
|
+
k(Os, {
|
|
2728
2729
|
colModel: e.colModel,
|
|
2729
2730
|
modelValue: l.value,
|
|
2730
|
-
"onUpdate:modelValue":
|
|
2731
|
+
"onUpdate:modelValue": w[3] || (w[3] = (f) => l.value = f)
|
|
2731
2732
|
}, null, 8, ["colModel", "modelValue"])
|
|
2732
2733
|
]));
|
|
2733
2734
|
}
|
|
@@ -2744,24 +2745,24 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2744
2745
|
}),
|
|
2745
2746
|
emits: ["update:modelValue"],
|
|
2746
2747
|
setup(e) {
|
|
2747
|
-
const l = Z(e, "modelValue"),
|
|
2748
|
+
const l = Z(e, "modelValue"), s = e, b = M([]);
|
|
2748
2749
|
return de(async () => {
|
|
2749
|
-
const
|
|
2750
|
-
b.value =
|
|
2751
|
-
}), (d,
|
|
2752
|
-
var
|
|
2753
|
-
return (
|
|
2750
|
+
const m = await (await fetch(`/api/cms-suggest/${s.relation}`)).json();
|
|
2751
|
+
b.value = m == null ? void 0 : m.data;
|
|
2752
|
+
}), (d, m) => {
|
|
2753
|
+
var g;
|
|
2754
|
+
return (g = b.value) != null && g.length ? (o(), F(y(ft), {
|
|
2754
2755
|
key: 0,
|
|
2755
2756
|
mode: "combo",
|
|
2756
2757
|
modelValue: l.value,
|
|
2757
|
-
"onUpdate:modelValue":
|
|
2758
|
+
"onUpdate:modelValue": m[0] || (m[0] = (x) => l.value = x),
|
|
2758
2759
|
options: b.value
|
|
2759
2760
|
}, null, 8, ["modelValue", "options"])) : j("", !0);
|
|
2760
2761
|
};
|
|
2761
2762
|
}
|
|
2762
2763
|
}, ba = (e) => {
|
|
2763
2764
|
var b, u;
|
|
2764
|
-
const l = (b = e == null ? void 0 : e.type) == null ? void 0 : b.toLowerCase(),
|
|
2765
|
+
const l = (b = e == null ? void 0 : e.type) == null ? void 0 : b.toLowerCase(), s = e != null && e.required ? ["required"] : null;
|
|
2765
2766
|
return l === "array" ? {
|
|
2766
2767
|
key: e.name,
|
|
2767
2768
|
label: e.label || e.title,
|
|
@@ -2771,33 +2772,33 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2771
2772
|
type: (e == null ? void 0 : e.subtype) || "text",
|
|
2772
2773
|
placeholder: e == null ? void 0 : e.placeholder
|
|
2773
2774
|
},
|
|
2774
|
-
validators:
|
|
2775
|
+
validators: s
|
|
2775
2776
|
} : l === "boolean" ? {
|
|
2776
2777
|
key: e.name,
|
|
2777
2778
|
label: e.label || e.title,
|
|
2778
2779
|
type: "Switcher",
|
|
2779
2780
|
help: e == null ? void 0 : e.help,
|
|
2780
|
-
validators:
|
|
2781
|
+
validators: s
|
|
2781
2782
|
} : l === "tags" ? {
|
|
2782
2783
|
key: e.name,
|
|
2783
2784
|
label: e.label || e.title,
|
|
2784
2785
|
type: "tags",
|
|
2785
2786
|
help: e == null ? void 0 : e.help,
|
|
2786
|
-
validators:
|
|
2787
|
+
validators: s
|
|
2787
2788
|
} : l === "radio" ? {
|
|
2788
2789
|
key: e.name,
|
|
2789
2790
|
label: e.label || e.title,
|
|
2790
2791
|
type: "radio",
|
|
2791
2792
|
help: e == null ? void 0 : e.help,
|
|
2792
2793
|
options: e.options || [],
|
|
2793
|
-
validators:
|
|
2794
|
+
validators: s
|
|
2794
2795
|
} : l === "date" ? {
|
|
2795
2796
|
key: e.name,
|
|
2796
2797
|
label: e.label || e.title,
|
|
2797
2798
|
type: "Date",
|
|
2798
2799
|
time: !1,
|
|
2799
2800
|
help: e == null ? void 0 : e.help,
|
|
2800
|
-
validators:
|
|
2801
|
+
validators: s
|
|
2801
2802
|
} : l === "datetime" ? {
|
|
2802
2803
|
key: e.name,
|
|
2803
2804
|
label: e.label || e.title,
|
|
@@ -2805,32 +2806,32 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2805
2806
|
help: e == null ? void 0 : e.help,
|
|
2806
2807
|
mode: "datetime",
|
|
2807
2808
|
time: !0,
|
|
2808
|
-
validators:
|
|
2809
|
+
validators: s
|
|
2809
2810
|
} : l === "number" ? {
|
|
2810
2811
|
key: e.name,
|
|
2811
2812
|
label: e.label || e.title,
|
|
2812
2813
|
help: e == null ? void 0 : e.help,
|
|
2813
2814
|
type: "Number",
|
|
2814
|
-
validators:
|
|
2815
|
+
validators: s
|
|
2815
2816
|
} : l === "integer" ? {
|
|
2816
2817
|
key: e.name,
|
|
2817
2818
|
label: e.label || e.title,
|
|
2818
2819
|
type: "Integer",
|
|
2819
2820
|
help: e == null ? void 0 : e.help,
|
|
2820
|
-
validators:
|
|
2821
|
+
validators: s
|
|
2821
2822
|
} : l === "text" ? {
|
|
2822
2823
|
key: e.name,
|
|
2823
2824
|
label: e.label || e.title,
|
|
2824
2825
|
type: "Text",
|
|
2825
2826
|
help: e == null ? void 0 : e.help,
|
|
2826
|
-
validators:
|
|
2827
|
+
validators: s
|
|
2827
2828
|
} : l === "file" ? {
|
|
2828
2829
|
key: e.name,
|
|
2829
2830
|
label: e.label || e.title,
|
|
2830
2831
|
type: "File",
|
|
2831
2832
|
multiple: e.multi || e.multiple,
|
|
2832
2833
|
help: e == null ? void 0 : e.help,
|
|
2833
|
-
validators:
|
|
2834
|
+
validators: s,
|
|
2834
2835
|
api: "/api/cms-media/upload?subdir=",
|
|
2835
2836
|
dir: "uploads/" + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US").replace(/\//g, "-")
|
|
2836
2837
|
} : l === "filelist" ? {
|
|
@@ -2839,21 +2840,21 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2839
2840
|
type: "file",
|
|
2840
2841
|
multiple: !0,
|
|
2841
2842
|
help: e == null ? void 0 : e.help,
|
|
2842
|
-
validators:
|
|
2843
|
+
validators: s
|
|
2843
2844
|
} : l === "slug" ? {
|
|
2844
2845
|
key: e.name,
|
|
2845
2846
|
label: e.label || e.title,
|
|
2846
2847
|
type: "Slug",
|
|
2847
2848
|
parent: e.parent || "",
|
|
2848
2849
|
help: e == null ? void 0 : e.help,
|
|
2849
|
-
validators:
|
|
2850
|
+
validators: s
|
|
2850
2851
|
} : l === "image" ? {
|
|
2851
2852
|
key: e.name,
|
|
2852
2853
|
label: e.label || e.title,
|
|
2853
2854
|
type: "File",
|
|
2854
2855
|
multi: e.multiple,
|
|
2855
2856
|
help: e == null ? void 0 : e.help,
|
|
2856
|
-
validators:
|
|
2857
|
+
validators: s,
|
|
2857
2858
|
api: "/api/cms-media/upload?subdir=",
|
|
2858
2859
|
dir: "uploads/" + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US").replace(/\//g, "-")
|
|
2859
2860
|
} : l === "select" ? e.options ? {
|
|
@@ -2862,14 +2863,14 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2862
2863
|
type: "select",
|
|
2863
2864
|
options: e.options || [],
|
|
2864
2865
|
help: e == null ? void 0 : e.help,
|
|
2865
|
-
validators:
|
|
2866
|
+
validators: s
|
|
2866
2867
|
} : {
|
|
2867
2868
|
key: e.name,
|
|
2868
2869
|
label: e.label || e.title,
|
|
2869
2870
|
type: "select",
|
|
2870
2871
|
data: e.data || [],
|
|
2871
2872
|
help: e == null ? void 0 : e.help,
|
|
2872
|
-
validators:
|
|
2873
|
+
validators: s
|
|
2873
2874
|
} : l === "multiselect" ? {
|
|
2874
2875
|
key: e.name,
|
|
2875
2876
|
label: e.label || e.title,
|
|
@@ -2878,61 +2879,61 @@ const Ma = /* @__PURE__ */ te(Ns, [["render", Zs]]), Us = { class: "flex items-c
|
|
|
2878
2879
|
parent: e.parent || "",
|
|
2879
2880
|
options: e.options || [],
|
|
2880
2881
|
help: e == null ? void 0 : e.help,
|
|
2881
|
-
validators:
|
|
2882
|
+
validators: s,
|
|
2882
2883
|
multiple: !0
|
|
2883
2884
|
} : l === "richtext" ? {
|
|
2884
2885
|
key: e.name,
|
|
2885
2886
|
label: e.label || e.title,
|
|
2886
2887
|
type: "Texteditor",
|
|
2887
2888
|
help: e == null ? void 0 : e.help,
|
|
2888
|
-
validators:
|
|
2889
|
+
validators: s
|
|
2889
2890
|
} : l === "datalist" ? {
|
|
2890
2891
|
key: e.name,
|
|
2891
2892
|
label: e.label || e.title,
|
|
2892
2893
|
type: "Custom-Datatable",
|
|
2893
2894
|
colModel: ((u = e.colModel) == null ? void 0 : u.map((d) => ba(d))) || [],
|
|
2894
2895
|
help: e == null ? void 0 : e.help,
|
|
2895
|
-
validators:
|
|
2896
|
+
validators: s
|
|
2896
2897
|
} : l === "reference" ? {
|
|
2897
2898
|
key: e.name,
|
|
2898
2899
|
label: e.label || e.title,
|
|
2899
2900
|
type: "reference",
|
|
2900
2901
|
reference_type: e.reference_type,
|
|
2901
2902
|
help: e == null ? void 0 : e.help,
|
|
2902
|
-
validators:
|
|
2903
|
+
validators: s
|
|
2903
2904
|
} : l === "reference-list" ? {
|
|
2904
2905
|
key: e.name,
|
|
2905
2906
|
label: e.label || e.title,
|
|
2906
2907
|
type: "reference",
|
|
2907
2908
|
reference_type: e.reference_type,
|
|
2908
2909
|
help: e == null ? void 0 : e.help,
|
|
2909
|
-
validators:
|
|
2910
|
+
validators: s
|
|
2910
2911
|
} : l === "relation" ? {
|
|
2911
2912
|
key: e.name,
|
|
2912
2913
|
label: e.label || e.title,
|
|
2913
2914
|
type: "relation-link",
|
|
2914
2915
|
help: e == null ? void 0 : e.help,
|
|
2915
2916
|
relation: e.relation,
|
|
2916
|
-
validators:
|
|
2917
|
+
validators: s
|
|
2917
2918
|
} : l === "markdown" ? {
|
|
2918
2919
|
key: e.name,
|
|
2919
2920
|
label: e.label || e.title,
|
|
2920
2921
|
type: "richtext-md",
|
|
2921
2922
|
help: e == null ? void 0 : e.help,
|
|
2922
|
-
validators:
|
|
2923
|
+
validators: s
|
|
2923
2924
|
} : l === "mediaselect" ? {
|
|
2924
2925
|
key: e.name,
|
|
2925
2926
|
label: e.label || e.title,
|
|
2926
2927
|
type: "mediaselect",
|
|
2927
2928
|
help: e == null ? void 0 : e.help,
|
|
2928
|
-
validators:
|
|
2929
|
+
validators: s
|
|
2929
2930
|
} : {
|
|
2930
2931
|
key: e.name,
|
|
2931
2932
|
label: e.label || e.title,
|
|
2932
2933
|
placeholder: e.placeholder,
|
|
2933
2934
|
help: e == null ? void 0 : e.help,
|
|
2934
2935
|
type: "Text",
|
|
2935
|
-
validators:
|
|
2936
|
+
validators: s
|
|
2936
2937
|
};
|
|
2937
2938
|
};
|
|
2938
2939
|
export {
|