@opengis/cms 0.0.56 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -131
- package/dist/AddNewItemInTree-05PSSEFi.js +76 -0
- package/dist/ArticlesPage-CFjE_cw_.js +298 -0
- package/dist/CollectionsBreadcrumb-BCxeRikP.js +4 -0
- package/dist/CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-umRzB5mY.js +53 -0
- package/dist/CollectionsPage-DHfPNql6.js +124 -0
- package/dist/{CreateForm-BMOBeP4G.js → CreateForm-5FvT45vH.js} +1 -1
- package/dist/Dashboard-C1eGscNd.js +358 -0
- package/dist/EditCollectionPage-DIr1tdtn.js +187 -0
- package/dist/{EmptyData-DaZt_nAm.js → EmptyData-DxPrSXhV.js} +1 -1
- package/dist/{MenuAddPage-Bf48Z-ah.js → MenuAddPage-D-p3gFgm.js} +40 -35
- package/dist/MenuBody-rN5j4YBu.js +125 -0
- package/dist/MenuItemPage-BoJw885D.js +1027 -0
- package/dist/MenuList-DFEBS0NB.js +172 -0
- package/dist/MenuPage-BCZB_S8j.js +107 -0
- package/dist/MenuWrapper-AZ_8s-zd.js +12 -0
- package/dist/MonacoEditor-Db-3Jc3E.js +4 -0
- package/dist/{UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js → UniversalTable-CzqPG-tY.js} +12 -12
- package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js → UniversalTablePagination-4gL47A7I.js} +1 -1
- package/dist/VsFormTags-CMjiu9sY.js +114 -0
- package/dist/VsPreview-DwETkOpb.js +63 -0
- package/dist/contentForm-CtMhQTG0.js +489 -0
- package/dist/getField-CpwVE28P.js +179 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.html +29 -29
- package/dist/index.js +72 -71
- package/dist/style.css +1 -1
- package/dist/vs-builder-edit-D-q1o8tF.js +604 -0
- package/dist/vs-builder-monaco-B3Jj0V31.js +33 -0
- package/dist/vs-builder-preview-BH4VAM3a.js +44 -0
- package/dist/vs-form-custom-datatable-BDZo48w3.js +317 -0
- package/dist/vs-form-integer-BZ855R3g.js +61 -0
- package/dist/vs-form-media-select-NY27EaG1.js +837 -0
- package/dist/vs-form-reference-list-Dtv8fJJU.js +1536 -0
- package/dist/vs-form-reletion-link-BhzNQszm.js +34 -0
- package/dist/vs-form-tiptap-DDFQjRjY.js +4 -0
- package/dist/vs-form-tiptap.vue_vue_type_script_setup_true_lang-DGgsqXwg.js +11 -0
- package/dist/vs-richtext-md-C098v_6Q.js +4 -0
- package/dist/vs-richtext-md.vue_vue_type_script_setup_true_lang-Ct8uTV-J.js +14 -0
- package/input-types.json +9 -9
- package/locales/en.json +815 -814
- package/locales/uk.json +813 -812
- package/module/cms/cls/content.status.json +17 -17
- package/module/cms/cls/user_type.json +9 -9
- package/module/cms/form/admin.users.form.json +77 -77
- package/module/cms/select/cms.page_type.sql +1 -1
- package/module/cms/select/news_tag_id.sql +11 -11
- package/module/cms/table/admin.users.table.json +53 -53
- package/module/cms/table/collection.default.table.json +96 -96
- package/module/cms/table/single.default.table.json +116 -116
- package/package.json +68 -68
- package/plugin.js +43 -43
- package/server/app.js +35 -35
- package/server/config.js +4 -4
- package/server/functions/getContent.js +45 -45
- package/server/functions/getDraftKey.js +22 -22
- package/server/functions/getSearchData.js +31 -31
- package/server/functions/getTags.js +30 -30
- package/server/functions/getUser.js +27 -27
- package/server/functions/utils/mock.reply.js +55 -55
- package/server/index.js +22 -22
- package/server/migrations/fixes.sql +129 -129
- package/server/migrations/site.sql +595 -595
- package/server/plugins/adminHook.js +78 -78
- package/server/plugins/hook.js +59 -59
- package/server/plugins/vite.js +75 -75
- package/server/routes/category/controllers/cms.category.delete.js +21 -21
- package/server/routes/category/controllers/cms.category.get.js +17 -17
- package/server/routes/category/controllers/cms.category.list.js +16 -16
- package/server/routes/category/controllers/cms.category.post.js +21 -21
- package/server/routes/category/controllers/cms.category.put.js +23 -23
- package/server/routes/category/index.mjs +22 -22
- package/server/routes/cms/controllers/cmsStat.js +55 -55
- package/server/routes/cms/controllers/cmsSuggest.js +57 -57
- package/server/routes/cms/controllers/deleteContent.js +113 -113
- package/server/routes/cms/controllers/deleteMedia.js +76 -76
- package/server/routes/cms/controllers/downloadMedia.js +84 -84
- package/server/routes/cms/controllers/getContent.js +113 -113
- package/server/routes/cms/controllers/getContentBySlug.js +93 -93
- package/server/routes/cms/controllers/insertContent.js +217 -217
- package/server/routes/cms/controllers/listMedia.js +155 -155
- package/server/routes/cms/controllers/metadataMedia.js +39 -39
- package/server/routes/cms/controllers/properties.get.js +18 -18
- package/server/routes/cms/controllers/properties.post.js +99 -99
- package/server/routes/cms/controllers/searchContent.js +214 -214
- package/server/routes/cms/controllers/translate.js +89 -89
- package/server/routes/cms/controllers/updateContent.js +266 -264
- package/server/routes/cms/controllers/uploadMedia.js +79 -79
- package/server/routes/cms/functions/getSettings.js +48 -48
- package/server/routes/cms/index.mjs +112 -112
- package/server/routes/cms/utils/additionalData.js +35 -35
- package/server/routes/cms/utils/getCollection.js +89 -89
- package/server/routes/cms/utils/getSingle.js +188 -183
- package/server/routes/cms/utils/inputTypes.js +5 -5
- package/server/routes/cms/utils/insertContentLocalization.js +104 -104
- package/server/routes/cms/utils/requestTranslation.js +85 -85
- package/server/routes/cms/utils/updateLocalization.js +47 -47
- package/server/routes/cmsSpace/controllers/deleteSpace.js +25 -25
- package/server/routes/cmsSpace/controllers/getSpaces.js +27 -27
- package/server/routes/cmsSpace/controllers/insertSpace.js +21 -21
- package/server/routes/cmsSpace/controllers/updateSpace.js +23 -23
- package/server/routes/cmsSpace/index.mjs +20 -20
- package/server/routes/contentType/controllers/addContentType.js +160 -160
- package/server/routes/contentType/controllers/contentTypeList.js +54 -54
- package/server/routes/contentType/controllers/delContentType.js +75 -75
- package/server/routes/contentType/controllers/editContentType.js +88 -81
- package/server/routes/contentType/controllers/getContentType.js +65 -57
- package/server/routes/contentType/index.mjs +35 -35
- package/server/routes/contentType/utils/updateContents.js +44 -44
- package/server/routes/contentType/utils/updateCustomContentTable.js +53 -53
- package/server/routes/feedback/controllers/email.list.js +24 -24
- package/server/routes/feedback/controllers/feedback.js +48 -48
- package/server/routes/feedback/controllers/feedback.list.js +37 -37
- package/server/routes/feedback/controllers/news.subscriptions.js +44 -44
- package/server/routes/feedback/index.mjs +71 -71
- package/server/routes/logs/controllers/export.user.logs.js +77 -77
- package/server/routes/logs/controllers/user.logs.js +44 -44
- package/server/routes/logs/index.mjs +9 -9
- package/server/routes/menu/controllers/addMenu.js +37 -37
- package/server/routes/menu/controllers/delMenu.js +31 -31
- package/server/routes/menu/controllers/editMenu.js +41 -41
- package/server/routes/menu/controllers/getMenu.js +24 -24
- package/server/routes/menu/functions/getMenu.js +50 -50
- package/server/routes/menu/index.mjs +13 -13
- package/server/routes/migration/controllers/collectionToCustom.js +137 -137
- package/server/routes/migration/index.mjs +8 -8
- package/server/routes/root.mjs +8 -8
- package/server/routes/tags/controllers/add.tags.js +24 -24
- package/server/routes/tags/controllers/del.tags.js +19 -19
- package/server/routes/tags/controllers/edit.tags.js +25 -25
- package/server/routes/tags/controllers/get.tags.js +15 -15
- package/server/routes/tags/index.mjs +14 -14
- package/server/templates/cls/cms.category_type.json +9 -9
- package/server/templates/cls/cms.content_review_status.json +9 -9
- package/server/templates/cls/cms.content_status.json +9 -9
- package/server/templates/cls/cms.content_type.json +9 -9
- package/server/templates/cls/cms.lang.json +9 -9
- package/server/templates/page/login.html +126 -126
- package/utils.d.ts +52 -52
- package/utils.js +8 -8
- package/dist/ArticlesPage-BcR1hbds.js +0 -286
- package/dist/BuilderPage-CK_osM89.js +0 -386
- package/dist/CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js +0 -45
- package/dist/CollectionsPage-JfmrHNR_.js +0 -110
- package/dist/EditCollectionPage-Cw3GQYRe.js +0 -809
- package/dist/MenuItemPage-CXn5HC8j.js +0 -1366
- package/dist/MenuPage-tJZtK46W.js +0 -106
- package/dist/contentForm-B6gHgGkz.js +0 -586
- package/dist/getField-Y5WXnRR0.js +0 -2948
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as a, onMounted as S, resolveComponent as V, openBlock as f, createElementBlock as _, createElementVNode as r, toDisplayString as u, unref as l, createVNode as m, withCtx as j, createTextVNode as F, createCommentVNode as N } from "vue";
|
|
2
|
-
import { useRouter as L } from "vue-router";
|
|
3
|
-
import { HelpCircle as q, Plus as B } from "lucide-vue-next";
|
|
4
|
-
import { _ as M } from "./UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js";
|
|
5
|
-
import { useI18n as P } from "vue-i18n";
|
|
6
|
-
import T from "@opengis/filter";
|
|
7
|
-
import { notify as w } from "@opengis/core";
|
|
8
|
-
const A = { class: "space-y-6 max-w-7xl mx-auto" }, H = { class: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" }, I = { class: "flex items-center gap-2" }, O = { class: "text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2" }, Q = ["href", "title"], R = { class: "text-slate-600 dark:text-slate-300" }, z = { class: "overflow-hidden bg-white border border-gray-200 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700" }, G = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "p-4 border-b border-gray-200 sm:p-6 dark:border-gray-700"
|
|
11
|
-
}, ne = /* @__PURE__ */ D({
|
|
12
|
-
__name: "MenuPage",
|
|
13
|
-
setup(J) {
|
|
14
|
-
const { t: o, locale: g } = P(), v = L(), x = a(""), d = a([]), i = a([]), y = a(""), h = a([
|
|
15
|
-
{ name: "name", title: o("cms.menu.form.name"), type: "text" },
|
|
16
|
-
{ name: "description", title: o("cms.menu.form.description"), type: "text" },
|
|
17
|
-
{ name: "locale", title: o("cms.menu.form.language"), type: "select", data: [{ text: "uk", id: "uk" }, { text: "en", id: "en" }] }
|
|
18
|
-
]), p = async () => {
|
|
19
|
-
const t = await (await fetch("/api/cms-menu")).json(), s = t.rows;
|
|
20
|
-
d.value = s;
|
|
21
|
-
const n = (t.filters || []).map((c) => {
|
|
22
|
-
const { extra: K, title: U, ...E } = c;
|
|
23
|
-
return E;
|
|
24
|
-
});
|
|
25
|
-
i.value = n;
|
|
26
|
-
}, b = (e) => {
|
|
27
|
-
v.push(`/menu/edit/${e == null ? void 0 : e.menu_id}`);
|
|
28
|
-
}, k = async (e) => {
|
|
29
|
-
try {
|
|
30
|
-
await fetch(`/api/cms-menu/${e == null ? void 0 : e.menu_id}`, { method: "DELETE" }), await w({
|
|
31
|
-
title: o("cms.menu.menuDeleted"),
|
|
32
|
-
type: "success",
|
|
33
|
-
message: o("cms.menu.menuDeleted")
|
|
34
|
-
}), await p();
|
|
35
|
-
} catch {
|
|
36
|
-
w({
|
|
37
|
-
title: o("cms.menu.menuDeleteError"),
|
|
38
|
-
type: "error",
|
|
39
|
-
message: o("cms.menu.menuDeleteError")
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}, $ = (e, t) => {
|
|
43
|
-
if (!t)
|
|
44
|
-
return !0;
|
|
45
|
-
const s = t.toLowerCase();
|
|
46
|
-
return h.value.some((n) => {
|
|
47
|
-
const c = e[n.name];
|
|
48
|
-
return c && c.toString().toLowerCase().includes(s);
|
|
49
|
-
});
|
|
50
|
-
}, C = (e) => {
|
|
51
|
-
const t = Object.entries(e == null ? void 0 : e.data).filter(([, s]) => s != null).map(([s, n]) => `${s}=${n}`).join("|");
|
|
52
|
-
y.value = t;
|
|
53
|
-
};
|
|
54
|
-
return S(p), (e, t) => {
|
|
55
|
-
var n;
|
|
56
|
-
const s = V("router-link");
|
|
57
|
-
return f(), _("div", A, [
|
|
58
|
-
r("div", H, [
|
|
59
|
-
r("div", null, [
|
|
60
|
-
r("div", I, [
|
|
61
|
-
r("h1", O, u(e.$t("cms.menu.title")), 1),
|
|
62
|
-
r("a", {
|
|
63
|
-
href: `https://cms.opengis.info/${l(g)}/guides/menu/`,
|
|
64
|
-
target: "_blank",
|
|
65
|
-
title: e.$t("cms.guide.menu")
|
|
66
|
-
}, [
|
|
67
|
-
m(l(q), { class: "w-5 h-5" })
|
|
68
|
-
], 8, Q)
|
|
69
|
-
]),
|
|
70
|
-
r("p", R, u(e.$t("cms.menu.description")), 1)
|
|
71
|
-
]),
|
|
72
|
-
m(s, {
|
|
73
|
-
to: "/menu/create",
|
|
74
|
-
class: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105"
|
|
75
|
-
}, {
|
|
76
|
-
default: j(() => [
|
|
77
|
-
m(l(B), { class: "w-4 h-4 mr-2" }),
|
|
78
|
-
F(" " + u(e.$t("cms.menu.menuAdd")), 1)
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
})
|
|
82
|
-
]),
|
|
83
|
-
r("div", z, [
|
|
84
|
-
((n = i.value) == null ? void 0 : n.length) > 0 ? (f(), _("div", G, [
|
|
85
|
-
m(l(T), {
|
|
86
|
-
schema: i.value,
|
|
87
|
-
view: "inline",
|
|
88
|
-
onChange: C
|
|
89
|
-
}, null, 8, ["schema"])
|
|
90
|
-
])) : N("", !0),
|
|
91
|
-
m(M, {
|
|
92
|
-
rows: d.value,
|
|
93
|
-
columns: h.value,
|
|
94
|
-
query: x.value,
|
|
95
|
-
filterFn: $,
|
|
96
|
-
onEdit: b,
|
|
97
|
-
onDelete: k
|
|
98
|
-
}, null, 8, ["rows", "columns", "query"])
|
|
99
|
-
])
|
|
100
|
-
]);
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
export {
|
|
105
|
-
ne as default
|
|
106
|
-
};
|
|
@@ -1,586 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as xe, useModel as ke, ref as y, provide as $e, onMounted as Y, nextTick as D, watch as K, computed as p, openBlock as h, createBlock as re, unref as _, createCommentVNode as z, createElementBlock as b, createElementVNode as d, createTextVNode as ie, createVNode as A, defineComponent as Se, inject as Ae, getCurrentInstance as Ce, toRef as Te, toDisplayString as L, Fragment as Ve, renderList as je, normalizeClass as ae, withDirectives as W, vModelCheckbox as Fe, vShow as oe } from "vue";
|
|
2
|
-
import { useRouter as ze, useRoute as Ne } from "vue-router";
|
|
3
|
-
import { ExternalLink as Ee, ArrowLeft as Pe, HelpCircle as Le, Settings as Ue, Save as Be } from "lucide-vue-next";
|
|
4
|
-
import { _ as Oe, a as De, V as Je, b as X, c as Me, d as Re, e as He, g as Ke } from "./getField-Y5WXnRR0.js";
|
|
5
|
-
import { useI18n as ne } from "vue-i18n";
|
|
6
|
-
import { inputs as S, VForm as le } from "@opengis/form";
|
|
7
|
-
import { notify as U } from "@opengis/core";
|
|
8
|
-
import { _ as Ie } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js";
|
|
9
|
-
const qe = [
|
|
10
|
-
{
|
|
11
|
-
key: "title",
|
|
12
|
-
label: "cms.common.title",
|
|
13
|
-
localization: !0,
|
|
14
|
-
type: "text"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: "description",
|
|
18
|
-
label: "cms.common.description",
|
|
19
|
-
localization: !0,
|
|
20
|
-
type: "text"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
key: "keywords",
|
|
24
|
-
label: "cms.common.keywords",
|
|
25
|
-
localization: !0,
|
|
26
|
-
type: "text"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
key: "meta",
|
|
30
|
-
label: "cms.common.meta",
|
|
31
|
-
type: "key-value",
|
|
32
|
-
ignore: ["title", "description", "keywords"]
|
|
33
|
-
}
|
|
34
|
-
], Ge = {
|
|
35
|
-
__name: "VsFormTags",
|
|
36
|
-
props: {
|
|
37
|
-
modelValue: { default: () => [] },
|
|
38
|
-
modelModifiers: {}
|
|
39
|
-
},
|
|
40
|
-
emits: ["update:modelValue"],
|
|
41
|
-
setup($, { expose: i }) {
|
|
42
|
-
const C = xe(() => import("@opengis/form")), { t: w } = ne(), o = ke($, "modelValue"), g = y({}), u = y(!1);
|
|
43
|
-
$e("metaParentValue", o);
|
|
44
|
-
const f = (a) => Array.isArray(a) ? a.map((n) => typeof n == "object" && n !== null && n.id ? n.id : n) : [], T = async (a) => {
|
|
45
|
-
if (!Array.isArray(a) || a.length === 0)
|
|
46
|
-
return [];
|
|
47
|
-
try {
|
|
48
|
-
const x = await (await fetch("/api/tags")).json(), N = (x == null ? void 0 : x.rows) || [];
|
|
49
|
-
return a.map((M) => {
|
|
50
|
-
const V = N.find((R) => R.tag_id === M);
|
|
51
|
-
return V ? { id: V.tag_id, text: V.value, color: V.color } : { id: M, text: "", color: "#ababab" };
|
|
52
|
-
});
|
|
53
|
-
} catch (n) {
|
|
54
|
-
return console.error("Error fetching tags:", n), a.map((x) => ({ id: x, text: "", color: "#ababab" }));
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
Y(async () => {
|
|
58
|
-
await D(), await D(), setTimeout(() => {
|
|
59
|
-
var a;
|
|
60
|
-
if (Array.isArray((a = o.value) == null ? void 0 : a.tag_list)) {
|
|
61
|
-
const n = f(o.value.tag_list);
|
|
62
|
-
JSON.stringify(n) !== JSON.stringify(o.value.tag_list) && (o.value.tag_list = n);
|
|
63
|
-
}
|
|
64
|
-
}, 100);
|
|
65
|
-
}), K(
|
|
66
|
-
() => o.value.tag_list,
|
|
67
|
-
(a) => {
|
|
68
|
-
if (Array.isArray(a) && !u.value) {
|
|
69
|
-
const n = f(a);
|
|
70
|
-
JSON.stringify(n) !== JSON.stringify(a) && (o.value.tag_list = n);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{ deep: !0 }
|
|
74
|
-
), K(
|
|
75
|
-
() => o.value,
|
|
76
|
-
(a) => {
|
|
77
|
-
if (a && Array.isArray(a.tag_list) && !u.value) {
|
|
78
|
-
const n = f(a.tag_list);
|
|
79
|
-
JSON.stringify(n) !== JSON.stringify(a.tag_list) && (a.tag_list = n);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
{ deep: !0, immediate: !0 }
|
|
83
|
-
), K(
|
|
84
|
-
() => {
|
|
85
|
-
var a;
|
|
86
|
-
return (a = o.value) == null ? void 0 : a.tag_list;
|
|
87
|
-
},
|
|
88
|
-
(a) => {
|
|
89
|
-
Array.isArray(a) && g.value && D(() => {
|
|
90
|
-
g.value && g.value.setValue && g.value.setValue("tag_list", a);
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
{ deep: !0 }
|
|
94
|
-
);
|
|
95
|
-
const B = async (a) => {
|
|
96
|
-
if (a.tag_list && (a.tag_list = f(a.tag_list), o.value.tag_list = a.tag_list), await g.value.validate()) {
|
|
97
|
-
U({
|
|
98
|
-
type: "warning",
|
|
99
|
-
title: w("cms.common.actions.warning"),
|
|
100
|
-
message: w("cms.builder.editFieldFailed")
|
|
101
|
-
});
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
i({
|
|
106
|
-
restoreTagsBeforeSubmit: async () => {
|
|
107
|
-
var a;
|
|
108
|
-
if (u.value = !0, Array.isArray((a = o.value) == null ? void 0 : a.tag_list)) {
|
|
109
|
-
const n = await T(o.value.tag_list);
|
|
110
|
-
o.value.tag_list = n;
|
|
111
|
-
}
|
|
112
|
-
setTimeout(() => {
|
|
113
|
-
u.value = !1;
|
|
114
|
-
}, 2e3);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
const O = p(() => {
|
|
118
|
-
var a;
|
|
119
|
-
return [
|
|
120
|
-
{
|
|
121
|
-
key: "tag_list",
|
|
122
|
-
type: "select",
|
|
123
|
-
multiple: !0,
|
|
124
|
-
searchable: !1,
|
|
125
|
-
placeholder: w("cms.builder.tags"),
|
|
126
|
-
data: "tag_id",
|
|
127
|
-
value: ((a = o.value) == null ? void 0 : a.tag_list) || []
|
|
128
|
-
}
|
|
129
|
-
];
|
|
130
|
-
});
|
|
131
|
-
return (a, n) => o.value ? (h(), re(_(C), {
|
|
132
|
-
key: 0,
|
|
133
|
-
schema: O.value,
|
|
134
|
-
modelValue: o.value,
|
|
135
|
-
"onUpdate:modelValue": [
|
|
136
|
-
n[0] || (n[0] = (x) => o.value = x),
|
|
137
|
-
B
|
|
138
|
-
]
|
|
139
|
-
}, null, 8, ["schema", "modelValue"])) : z("", !0);
|
|
140
|
-
}
|
|
141
|
-
}, Qe = { class: "flex justify-end mb-4" }, We = ["href"], Xe = ["src"], Ye = ["src"], Ze = {
|
|
142
|
-
key: 2,
|
|
143
|
-
class: "w-full h-[80vh] flex items-center justify-center text-gray-500"
|
|
144
|
-
}, et = {
|
|
145
|
-
__name: "VsPreview",
|
|
146
|
-
props: {
|
|
147
|
-
preview_path: {
|
|
148
|
-
type: String,
|
|
149
|
-
default: ""
|
|
150
|
-
},
|
|
151
|
-
slug: {
|
|
152
|
-
type: String,
|
|
153
|
-
default: ""
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
setup($) {
|
|
157
|
-
const i = y(""), C = y(""), w = async () => {
|
|
158
|
-
var g, u;
|
|
159
|
-
try {
|
|
160
|
-
const T = await (await fetch("/api/settings")).json();
|
|
161
|
-
i.value = ((u = (g = T == null ? void 0 : T.settings) == null ? void 0 : g.site_info) == null ? void 0 : u.previewUrl) || "http://ip.local.softpro.ua";
|
|
162
|
-
} catch (f) {
|
|
163
|
-
console.error("Failed to fetch settings:", f), i.value = "http://ip.local.softpro.ua";
|
|
164
|
-
}
|
|
165
|
-
}, o = async () => {
|
|
166
|
-
var g;
|
|
167
|
-
try {
|
|
168
|
-
const f = await (await fetch("/user")).json();
|
|
169
|
-
C.value = (g = f == null ? void 0 : f.user) == null ? void 0 : g.draftKey;
|
|
170
|
-
} catch (u) {
|
|
171
|
-
console.error("Failed to fetch user:", u);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
return Y(() => {
|
|
175
|
-
w(), o();
|
|
176
|
-
}), (g, u) => (h(), b("div", null, [
|
|
177
|
-
d("div", Qe, [
|
|
178
|
-
d("a", {
|
|
179
|
-
href: `${i.value}/uk/${$.preview_path}${$.slug}${C.value ? `?draftKey=${C.value}` : ""}`,
|
|
180
|
-
target: "_blank",
|
|
181
|
-
class: "inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"
|
|
182
|
-
}, [
|
|
183
|
-
u[0] || (u[0] = ie(" Переглянути на сайті ", -1)),
|
|
184
|
-
A(_(Ee), { class: "w-4 h-4" })
|
|
185
|
-
], 8, We)
|
|
186
|
-
]),
|
|
187
|
-
i.value && $.preview_path ? (h(), b("iframe", {
|
|
188
|
-
key: 0,
|
|
189
|
-
src: `${i.value}/uk/${$.preview_path}${$.slug}?hideHeader=true&hideFooter=true`,
|
|
190
|
-
class: "w-full h-[80vh]"
|
|
191
|
-
}, null, 8, Xe)) : i.value ? (h(), b("iframe", {
|
|
192
|
-
key: 1,
|
|
193
|
-
src: `${i.value}/uk/${$.slug}?hideHeader=true&hideFooter=true`,
|
|
194
|
-
class: "w-full h-[80vh]"
|
|
195
|
-
}, null, 8, Ye)) : (h(), b("div", Ze, " Loading preview... "))
|
|
196
|
-
]));
|
|
197
|
-
}
|
|
198
|
-
}, tt = { class: "space-y-6 mx-auto relativ max-w-[90%]" }, st = { class: "" }, at = { class: "flex items-center justify-between" }, ot = { class: "flex items-center gap-4" }, lt = { class: "text-2xl font-semibold text-gray-900 dark:text-white line-clamp-1" }, rt = ["href", "title"], it = { class: "flex items-center space-x-3" }, nt = ["title"], ct = { class: "w-full mt-6 flex items-center justify-between" }, ut = { class: "flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground" }, dt = ["onClick"], mt = { class: "flex items-center gap-4" }, vt = { class: "flex items-center gap-2" }, pt = {
|
|
199
|
-
for: "is_pin",
|
|
200
|
-
class: "text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"
|
|
201
|
-
}, ft = { class: "relative" }, gt = {
|
|
202
|
-
key: 0,
|
|
203
|
-
class: "w-3 h-3 text-white",
|
|
204
|
-
fill: "currentColor",
|
|
205
|
-
viewBox: "0 0 20 20"
|
|
206
|
-
}, yt = { class: "mx-auto bg-white rounded-md p-5" }, ht = { class: "mx-auto bg-white rounded-md p-5" }, bt = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "mx-auto bg-white rounded-md p-5"
|
|
209
|
-
}, wt = {
|
|
210
|
-
key: 1,
|
|
211
|
-
class: "mx-auto bg-white rounded-md p-5"
|
|
212
|
-
}, Vt = /* @__PURE__ */ Se({
|
|
213
|
-
__name: "contentForm",
|
|
214
|
-
setup($) {
|
|
215
|
-
S["vs-input-custom-datatable"] = Oe, S["vs-input-reference"] = De, S["vs-input-texteditor"] = Je, S["vs-input-mediaselect"] = X, S["vs-input-file"] = X, S["vs-input-image"] = X, S["vs-input-richtext-md"] = Me, S["vs-input-integer"] = Re, S["vs-input-relation-link"] = He;
|
|
216
|
-
const { t: i, locale: C } = ne(), w = ze(), o = Ne(), g = Ae("menu", y([])), u = y([]), f = y({}), T = y({}), B = y({}), J = y(""), O = Ce(), a = O == null ? void 0 : O.appContext, n = (a == null ? void 0 : a.config.globalProperties) || {}, x = Te(n, "$settings"), N = p(() => {
|
|
217
|
-
var e;
|
|
218
|
-
return ((e = x.value) == null ? void 0 : e.cms) || {};
|
|
219
|
-
}), M = p(() => Array.isArray(N.value.locales) ? N.value.locales : []), V = p(
|
|
220
|
-
() => M.value.filter(Boolean)
|
|
221
|
-
), R = p(
|
|
222
|
-
() => N.value.locale || V.value[0] || "uk"
|
|
223
|
-
);
|
|
224
|
-
K(
|
|
225
|
-
x,
|
|
226
|
-
() => {
|
|
227
|
-
u.value.length && (u.value = u.value.map((e) => ({
|
|
228
|
-
...e
|
|
229
|
-
})));
|
|
230
|
-
},
|
|
231
|
-
{ deep: !0 }
|
|
232
|
-
);
|
|
233
|
-
const ce = (e) => {
|
|
234
|
-
const t = [], r = V.value.filter(
|
|
235
|
-
(l) => l !== R.value
|
|
236
|
-
);
|
|
237
|
-
return Array.isArray(e) && e.forEach((l) => {
|
|
238
|
-
t.push(l), !(!l.localization || r.length === 0) && r.forEach((s) => {
|
|
239
|
-
t.push({
|
|
240
|
-
...l,
|
|
241
|
-
name: `${l.name}:${s}`,
|
|
242
|
-
label: `${l.label} (${s})`
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
}), t;
|
|
246
|
-
}, Z = p(() => ce(u.value)), ue = p(
|
|
247
|
-
() => Array.isArray(u.value) && u.value.some(
|
|
248
|
-
(e) => e.localization === !0 && e.name !== "title"
|
|
249
|
-
)
|
|
250
|
-
), de = p(() => {
|
|
251
|
-
var e;
|
|
252
|
-
return (e = Z.value) == null ? void 0 : e.map(Ke);
|
|
253
|
-
}), me = p(() => {
|
|
254
|
-
C.value;
|
|
255
|
-
const e = V.value.filter(
|
|
256
|
-
(t) => t !== R.value
|
|
257
|
-
);
|
|
258
|
-
return qe.flatMap((t) => {
|
|
259
|
-
const r = {
|
|
260
|
-
...t,
|
|
261
|
-
label: i(t.label)
|
|
262
|
-
};
|
|
263
|
-
if (!t.localization || e.length === 0)
|
|
264
|
-
return [r];
|
|
265
|
-
const l = e.map((s) => ({
|
|
266
|
-
...t,
|
|
267
|
-
key: `${t.key}:${s}`,
|
|
268
|
-
label: `${i(t.label)} (${s})`,
|
|
269
|
-
localization: !1
|
|
270
|
-
}));
|
|
271
|
-
return [r, ...l];
|
|
272
|
-
});
|
|
273
|
-
}), k = y({}), m = y({
|
|
274
|
-
title: "",
|
|
275
|
-
status: "draft"
|
|
276
|
-
}), I = y(null), q = p(
|
|
277
|
-
() => {
|
|
278
|
-
var e;
|
|
279
|
-
return (((e = m.value) == null ? void 0 : e.type) || I.value) === "single";
|
|
280
|
-
}
|
|
281
|
-
), ve = p(() => {
|
|
282
|
-
const e = [
|
|
283
|
-
{ id: "content", name: i("cms.builder.content") },
|
|
284
|
-
{ id: "seo", name: i("cms.builder.seo") },
|
|
285
|
-
{ id: "tags", name: i("cms.builder.tags") }
|
|
286
|
-
];
|
|
287
|
-
return J.value && e.push({ id: "preview", name: i("cms.builder.preview") }), e;
|
|
288
|
-
}), E = y("content"), pe = p(() => {
|
|
289
|
-
var t, r, l, s;
|
|
290
|
-
const e = ((t = o.params) == null ? void 0 : t.collection) || ((r = o.params) == null ? void 0 : r.id);
|
|
291
|
-
return ((s = (l = g.value) == null ? void 0 : l.find((v) => v.id === e)) == null ? void 0 : s.title) || e;
|
|
292
|
-
}), fe = p(() => {
|
|
293
|
-
var t, r;
|
|
294
|
-
const e = q.value ? "cms.builder.editPage" : "cms.builder.editCollection";
|
|
295
|
-
return ((t = m.value) == null ? void 0 : t.title) || ((r = o.params) != null && r.id ? i(e) : i("cms.articles.createArticle"));
|
|
296
|
-
}), ge = p(() => {
|
|
297
|
-
var l, s, v;
|
|
298
|
-
const e = ((l = o.params) == null ? void 0 : l.collection) || ((s = o.params) == null ? void 0 : s.id), t = (v = o.params) == null ? void 0 : v.id, r = [
|
|
299
|
-
{
|
|
300
|
-
label: pe.value,
|
|
301
|
-
route: `collections/${e}`
|
|
302
|
-
}
|
|
303
|
-
];
|
|
304
|
-
return t ? r.push({
|
|
305
|
-
label: fe.value,
|
|
306
|
-
route: `collections/${e}/${t}`
|
|
307
|
-
}) : r.push({
|
|
308
|
-
label: i("cms.articles.createArticle"),
|
|
309
|
-
route: `collections/${e}/create`
|
|
310
|
-
}), r;
|
|
311
|
-
}), ye = (e) => {
|
|
312
|
-
e === "collections" ? w.push("/collections") : w.push(`/${e}`);
|
|
313
|
-
}, ee = async (e, t) => {
|
|
314
|
-
var r;
|
|
315
|
-
try {
|
|
316
|
-
if (!t || !e)
|
|
317
|
-
return;
|
|
318
|
-
const l = await fetch(`/api/cms/${e}/${t}`);
|
|
319
|
-
if (!l.ok)
|
|
320
|
-
throw new Error("Failed to fetch article");
|
|
321
|
-
const s = await l.json();
|
|
322
|
-
if (u.value = (s == null ? void 0 : s.columns) || [], s != null && s.preview_path && (J.value = s == null ? void 0 : s.preview_path), I.value = (s == null ? void 0 : s.type) || null, s.rows) {
|
|
323
|
-
let v = s.rows;
|
|
324
|
-
Array.isArray(v) || (v = [v]), m.value = v[0], await D(), (r = v[0]) != null && r.meta ? k.value = { ...v[0].meta } : k.value = {
|
|
325
|
-
title: "",
|
|
326
|
-
description: "",
|
|
327
|
-
keywords: "",
|
|
328
|
-
meta: {}
|
|
329
|
-
};
|
|
330
|
-
} else
|
|
331
|
-
m.value = s, await D(), s != null && s.meta ? (k.value = {
|
|
332
|
-
title: s.meta.title || "",
|
|
333
|
-
description: s.meta.description || "",
|
|
334
|
-
keywords: s.meta.keywords || "",
|
|
335
|
-
meta: { ...s.meta }
|
|
336
|
-
}, delete k.value.meta.title, delete k.value.meta.description, delete k.value.meta.keywords) : k.value = {
|
|
337
|
-
title: "",
|
|
338
|
-
description: "",
|
|
339
|
-
keywords: "",
|
|
340
|
-
meta: {}
|
|
341
|
-
};
|
|
342
|
-
} catch (l) {
|
|
343
|
-
console.error("Error fetching article:", l);
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
Y(async () => {
|
|
347
|
-
var s, v;
|
|
348
|
-
const e = (s = o.params) == null ? void 0 : s.collection, t = (v = o.params) == null ? void 0 : v.id, r = e || t, l = e && t ? t : void 0;
|
|
349
|
-
if (!l) {
|
|
350
|
-
if (!r)
|
|
351
|
-
return;
|
|
352
|
-
const c = await (await fetch(`/api/cms/${r}/`)).json();
|
|
353
|
-
u.value = c.columns, I.value = (c == null ? void 0 : c.type) || null;
|
|
354
|
-
}
|
|
355
|
-
await ee(r, l ?? "");
|
|
356
|
-
});
|
|
357
|
-
const te = p({
|
|
358
|
-
get: () => {
|
|
359
|
-
var e;
|
|
360
|
-
return ((e = m.value) == null ? void 0 : e.is_pin) || !1;
|
|
361
|
-
},
|
|
362
|
-
set: (e) => {
|
|
363
|
-
m.value && (m.value.is_pin = e);
|
|
364
|
-
}
|
|
365
|
-
}), he = () => {
|
|
366
|
-
m.value && (m.value.is_pin = !m.value.is_pin);
|
|
367
|
-
}, G = p(() => {
|
|
368
|
-
var t;
|
|
369
|
-
const e = (t = m.value) == null ? void 0 : t.content_type_id;
|
|
370
|
-
return e ? `/collections/${e}/edit` : null;
|
|
371
|
-
}), be = () => {
|
|
372
|
-
G.value && w.push(G.value);
|
|
373
|
-
}, we = async () => {
|
|
374
|
-
var l, s;
|
|
375
|
-
const e = (l = o.params) == null ? void 0 : l.collection, t = (s = o.params) == null ? void 0 : s.id;
|
|
376
|
-
(await fetch(
|
|
377
|
-
`/api/cms-translate?id=${t}&collection=${e}&to=en&nocache=1`
|
|
378
|
-
)).ok ? (U({
|
|
379
|
-
title: i("cms.collections.translateContentSuccess"),
|
|
380
|
-
message: i("cms.collections.translateContentSuccess"),
|
|
381
|
-
type: "success"
|
|
382
|
-
}), await ee(e, t)) : U({
|
|
383
|
-
title: i("cms.collections.translateContentError"),
|
|
384
|
-
message: i("cms.collections.translateContentError"),
|
|
385
|
-
type: "error"
|
|
386
|
-
});
|
|
387
|
-
}, _e = async (e) => {
|
|
388
|
-
var P, c, Q, se;
|
|
389
|
-
const t = (P = o.params) == null ? void 0 : P.collection, r = (c = o.params) == null ? void 0 : c.id, l = await f.value.validate();
|
|
390
|
-
if (l) {
|
|
391
|
-
U({
|
|
392
|
-
title: i("cms.validation"),
|
|
393
|
-
message: JSON.stringify(l),
|
|
394
|
-
type: "warning"
|
|
395
|
-
});
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
(Q = B.value) != null && Q.restoreTagsBeforeSubmit && await B.value.restoreTagsBeforeSubmit();
|
|
399
|
-
const s = k.value || {}, v = {
|
|
400
|
-
...m.value,
|
|
401
|
-
meta: {
|
|
402
|
-
...s,
|
|
403
|
-
...s.meta || {}
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
console.log("Payload before submit:", v);
|
|
407
|
-
try {
|
|
408
|
-
const F = await fetch(`/api/cms/${t}/${r || ""}`, {
|
|
409
|
-
method: r ? "PUT" : "POST",
|
|
410
|
-
headers: {
|
|
411
|
-
"Content-Type": "application/json"
|
|
412
|
-
},
|
|
413
|
-
body: JSON.stringify(v)
|
|
414
|
-
});
|
|
415
|
-
if (!F.ok) {
|
|
416
|
-
let j;
|
|
417
|
-
try {
|
|
418
|
-
const H = await F.json();
|
|
419
|
-
j = JSON.stringify(H, null, 2);
|
|
420
|
-
} catch {
|
|
421
|
-
j = await F.text();
|
|
422
|
-
}
|
|
423
|
-
throw new Error(`HTTP ${F.status}: ${j}`);
|
|
424
|
-
}
|
|
425
|
-
if (!r)
|
|
426
|
-
try {
|
|
427
|
-
const j = await F.json(), H = j.id || ((se = j.data) == null ? void 0 : se.id);
|
|
428
|
-
H && o.name === "createArticle" && await w.push(`/collections/${t}/${H}`);
|
|
429
|
-
} catch (j) {
|
|
430
|
-
console.warn("Could not parse response to get ID:", j);
|
|
431
|
-
}
|
|
432
|
-
U({
|
|
433
|
-
title: i("cms.common.success"),
|
|
434
|
-
message: i("cms.common.successMessage"),
|
|
435
|
-
type: "success"
|
|
436
|
-
});
|
|
437
|
-
} catch (F) {
|
|
438
|
-
console.error("Submit error:", F), U({
|
|
439
|
-
title: i("cms.common.error"),
|
|
440
|
-
message: "Помилка збереження",
|
|
441
|
-
type: "error"
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
return (e, t) => {
|
|
446
|
-
var r, l, s, v, P;
|
|
447
|
-
return h(), b("div", tt, [
|
|
448
|
-
d("div", st, [
|
|
449
|
-
A(Ie, {
|
|
450
|
-
items: ge.value,
|
|
451
|
-
onNavigate: ye
|
|
452
|
-
}, null, 8, ["items"]),
|
|
453
|
-
d("div", at, [
|
|
454
|
-
d("div", ot, [
|
|
455
|
-
d("button", {
|
|
456
|
-
onClick: t[0] || (t[0] = (c) => _(w).back()),
|
|
457
|
-
class: "p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
458
|
-
}, [
|
|
459
|
-
A(_(Pe), { class: "w-5 h-5" })
|
|
460
|
-
]),
|
|
461
|
-
d("h1", lt, L(e.$t(
|
|
462
|
-
q.value ? "cms.builder.editPage" : "cms.builder.editCollection"
|
|
463
|
-
)) + ' "' + L(m.value.title) + '" ', 1),
|
|
464
|
-
d("a", {
|
|
465
|
-
href: `https://cms.opengis.info/${_(C)}/guides/content/`,
|
|
466
|
-
target: "_blank",
|
|
467
|
-
title: e.$t("cms.guide.content")
|
|
468
|
-
}, [
|
|
469
|
-
A(_(Le), { class: "w-5 h-5" })
|
|
470
|
-
], 8, rt)
|
|
471
|
-
]),
|
|
472
|
-
d("div", it, [
|
|
473
|
-
G.value && q.value ? (h(), b("button", {
|
|
474
|
-
key: 0,
|
|
475
|
-
onClick: be,
|
|
476
|
-
type: "button",
|
|
477
|
-
title: e.$t("cms.builder.editContentType"),
|
|
478
|
-
class: "inline-flex items-center justify-center rounded-md h-9 w-9 border border-gray-200 bg-white text-gray-700 shadow-sm transition-all duration-200 transform hover:text-gray-900 hover:shadow-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
479
|
-
"aria-label": "$t('cms.builder.editContentType')"
|
|
480
|
-
}, [
|
|
481
|
-
A(_(Ue), { class: "w-4 h-4" })
|
|
482
|
-
], 8, nt)) : z("", !0),
|
|
483
|
-
d("button", {
|
|
484
|
-
onClick: _e,
|
|
485
|
-
type: "submit",
|
|
486
|
-
class: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
|
487
|
-
}, [
|
|
488
|
-
A(_(Be), { class: "w-4 h-4 mr-2" }),
|
|
489
|
-
ie(" " + L(e.$t("cms.builder.save")), 1)
|
|
490
|
-
])
|
|
491
|
-
])
|
|
492
|
-
]),
|
|
493
|
-
d("div", ct, [
|
|
494
|
-
d("div", ut, [
|
|
495
|
-
(h(!0), b(Ve, null, je(ve.value, (c) => (h(), b("button", {
|
|
496
|
-
key: c.id,
|
|
497
|
-
onClick: (Q) => {
|
|
498
|
-
E.value = c.id, console.log("cmsSettings:", N.value.value);
|
|
499
|
-
},
|
|
500
|
-
class: ae([
|
|
501
|
-
"inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",
|
|
502
|
-
c.id === E.value ? "bg-blue-50 text-blue-700 border-blue-200" : ""
|
|
503
|
-
])
|
|
504
|
-
}, L(c.name), 11, dt))), 128))
|
|
505
|
-
]),
|
|
506
|
-
d("div", mt, [
|
|
507
|
-
(r = _(o).params) != null && r.id && ue.value ? (h(), b("button", {
|
|
508
|
-
key: 0,
|
|
509
|
-
class: "text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer bg-white border border-gray-200 rounded-md text-muted-foreground px-4 py-2",
|
|
510
|
-
onClick: we
|
|
511
|
-
}, L(e.$t("cms.collections.enLocalization")), 1)) : z("", !0),
|
|
512
|
-
d("div", vt, [
|
|
513
|
-
d("label", pt, L(e.$t("cms.collections.pinPublication")), 1),
|
|
514
|
-
d("div", ft, [
|
|
515
|
-
W(d("input", {
|
|
516
|
-
type: "checkbox",
|
|
517
|
-
id: "is_pin",
|
|
518
|
-
"onUpdate:modelValue": t[1] || (t[1] = (c) => te.value = c),
|
|
519
|
-
class: "sr-only"
|
|
520
|
-
}, null, 512), [
|
|
521
|
-
[Fe, te.value]
|
|
522
|
-
]),
|
|
523
|
-
d("div", {
|
|
524
|
-
class: ae([
|
|
525
|
-
"w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",
|
|
526
|
-
(l = m.value) != null && l.is_pin ? "bg-sky-600 border-sky-600" : "bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"
|
|
527
|
-
]),
|
|
528
|
-
onClick: he
|
|
529
|
-
}, [
|
|
530
|
-
(s = m.value) != null && s.is_pin ? (h(), b("svg", gt, [...t[7] || (t[7] = [
|
|
531
|
-
d("path", {
|
|
532
|
-
"fill-rule": "evenodd",
|
|
533
|
-
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
534
|
-
"clip-rule": "evenodd"
|
|
535
|
-
}, null, -1)
|
|
536
|
-
])])) : z("", !0)
|
|
537
|
-
], 2)
|
|
538
|
-
])
|
|
539
|
-
])
|
|
540
|
-
])
|
|
541
|
-
])
|
|
542
|
-
]),
|
|
543
|
-
W(d("div", yt, [
|
|
544
|
-
(v = Z.value) != null && v.length ? (h(), re(_(le), {
|
|
545
|
-
key: 0,
|
|
546
|
-
modelValue: m.value,
|
|
547
|
-
"onUpdate:modelValue": t[2] || (t[2] = (c) => m.value = c),
|
|
548
|
-
schema: de.value,
|
|
549
|
-
form: f.value,
|
|
550
|
-
"onUpdate:form": t[3] || (t[3] = (c) => f.value = c)
|
|
551
|
-
}, null, 8, ["modelValue", "schema", "form"])) : z("", !0)
|
|
552
|
-
], 512), [
|
|
553
|
-
[oe, E.value === "content"]
|
|
554
|
-
]),
|
|
555
|
-
W(d("div", ht, [
|
|
556
|
-
A(_(le), {
|
|
557
|
-
schema: me.value,
|
|
558
|
-
values: k.value,
|
|
559
|
-
"onUpdate:values": t[4] || (t[4] = (c) => k.value = c),
|
|
560
|
-
form: T.value,
|
|
561
|
-
"onUpdate:form": t[5] || (t[5] = (c) => T.value = c)
|
|
562
|
-
}, null, 8, ["schema", "values", "form"])
|
|
563
|
-
], 512), [
|
|
564
|
-
[oe, E.value === "seo"]
|
|
565
|
-
]),
|
|
566
|
-
E.value === "tags" ? (h(), b("div", bt, [
|
|
567
|
-
A(Ge, {
|
|
568
|
-
ref_key: "tagsForm",
|
|
569
|
-
ref: B,
|
|
570
|
-
modelValue: m.value,
|
|
571
|
-
"onUpdate:modelValue": t[6] || (t[6] = (c) => m.value = c)
|
|
572
|
-
}, null, 8, ["modelValue"])
|
|
573
|
-
])) : z("", !0),
|
|
574
|
-
E.value === "preview" ? (h(), b("div", wt, [
|
|
575
|
-
A(et, {
|
|
576
|
-
slug: (P = m.value) == null ? void 0 : P.slug,
|
|
577
|
-
preview_path: J.value
|
|
578
|
-
}, null, 8, ["slug", "preview_path"])
|
|
579
|
-
])) : z("", !0)
|
|
580
|
-
]);
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
export {
|
|
585
|
-
Vt as default
|
|
586
|
-
};
|