@opengis/cms 0.0.48 → 0.0.50
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-Cuit_90w.js +286 -0
- package/dist/BuilderPage-B79YHrmr.js +386 -0
- package/dist/CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-B6irHMzL.js +45 -0
- package/dist/CollectionsPage-JfmrHNR_.js +110 -0
- package/dist/CreateForm-BMOBeP4G.js +125 -0
- package/dist/EditCollectionPage-B4p_iA6h.js +803 -0
- package/dist/EmptyData-DaZt_nAm.js +72 -0
- package/dist/MenuAddPage-CmU4kAUM.js +115 -0
- package/dist/MenuItemPage-UV8JlJvT.js +1365 -0
- package/dist/MenuPage-c4TPJgIN.js +106 -0
- package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-C8cip9Ci.js +84 -0
- package/dist/UniversalTable.vue_vue_type_script_setup_true_lang-DR4PQwqR.js +210 -0
- package/dist/UniversalTablePagination.vue_vue_type_script_setup_true_lang-C8P9DCeX.js +89 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/contentForm-S5mXr5B7.js +553 -0
- package/dist/getField-C7EZs-YQ.js +2920 -0
- package/dist/index.js +80 -12921
- package/dist/vuedraggable-CoAPPFYd.js +1742 -0
- package/locales/en.json +809 -0
- package/locales/uk.json +809 -0
- package/package.json +68 -67
- package/server/functions/getContent.js +1 -1
- package/server/functions/getSearchData.js +2 -2
- package/server/routes/cms/controllers/getPermissions.js +15 -15
- package/server/routes/cms/controllers/listMedia.js +18 -2
- package/server/routes/cms/controllers/searchContent.js +2 -0
- package/server/routes/cms/controllers/setPermissions.js +49 -49
- package/server/templates/select/core.user_mentioned.sql +1 -1
- package/utils.d.ts +3 -1
- package/dist/MenuAddPage-DJPQEn2D.js +0 -4
- package/dist/MenuItemPage-EH8svyv5.js +0 -4
- package/dist/MenuPage-BgE0yNpY.js +0 -4
- package/dist/en-CGMXhoFl.js +0 -813
- package/dist/index.umd.cjs +0 -52
- package/dist/uk-D2uNloeQ.js +0 -813
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { openBlock as n, createElementBlock as r, createElementVNode as t, toDisplayString as i, createTextVNode as a, createCommentVNode as l } from "vue";
|
|
2
|
+
const d = { class: "rounded-xl text-card-foreground shadow-lg bg-white dark:bg-slate-800 backdrop-blur-sm border-2 border-dashed border-slate-300 dark:border-slate-600" }, u = { class: "p-12 text-center" }, m = { class: "text-lg font-medium text-slate-600 dark:text-slate-300 mb-2" }, c = { class: "text-slate-500 dark:text-slate-400 mb-6" }, b = {
|
|
3
|
+
__name: "EmptyData",
|
|
4
|
+
props: {
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: () => "cms.emptyData.title"
|
|
8
|
+
},
|
|
9
|
+
description: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: () => "cms.emptyData.description"
|
|
12
|
+
},
|
|
13
|
+
buttonText: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: () => "cms.emptyData.buttonText"
|
|
16
|
+
},
|
|
17
|
+
showButton: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["action"],
|
|
23
|
+
setup(o) {
|
|
24
|
+
return (s, e) => (n(), r("div", d, [
|
|
25
|
+
t("div", u, [
|
|
26
|
+
e[2] || (e[2] = t("svg", {
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
width: "24",
|
|
29
|
+
height: "24",
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
stroke: "currentColor",
|
|
33
|
+
"stroke-width": "2",
|
|
34
|
+
"stroke-linecap": "round",
|
|
35
|
+
"stroke-linejoin": "round",
|
|
36
|
+
class: "lucide lucide-layers w-12 h-12 mx-auto mb-4 text-slate-400 dark:text-slate-500"
|
|
37
|
+
}, [
|
|
38
|
+
t("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
39
|
+
t("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
40
|
+
t("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
41
|
+
], -1)),
|
|
42
|
+
t("h3", m, i(s.$t(o.title)), 1),
|
|
43
|
+
t("p", c, i(s.$t(o.description)), 1),
|
|
44
|
+
o.showButton ? (n(), r("button", {
|
|
45
|
+
key: 0,
|
|
46
|
+
onClick: e[0] || (e[0] = (p) => s.$emit("action")),
|
|
47
|
+
class: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"
|
|
48
|
+
}, [
|
|
49
|
+
e[1] || (e[1] = t("svg", {
|
|
50
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
+
width: "24",
|
|
52
|
+
height: "24",
|
|
53
|
+
viewBox: "0 0 24 24",
|
|
54
|
+
fill: "none",
|
|
55
|
+
stroke: "currentColor",
|
|
56
|
+
"stroke-width": "2",
|
|
57
|
+
"stroke-linecap": "round",
|
|
58
|
+
"stroke-linejoin": "round",
|
|
59
|
+
class: "lucide lucide-plus w-4 h-4 mr-2"
|
|
60
|
+
}, [
|
|
61
|
+
t("path", { d: "M5 12h14" }),
|
|
62
|
+
t("path", { d: "M12 5v14" })
|
|
63
|
+
], -1)),
|
|
64
|
+
a(" " + i(s.$t(o.buttonText)), 1)
|
|
65
|
+
])) : l("", !0)
|
|
66
|
+
])
|
|
67
|
+
]));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
b as _
|
|
72
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineComponent as g, ref as m, openBlock as h, createElementBlock as v, createElementVNode as t, unref as a, createVNode as l, toDisplayString as d, createTextVNode as y } from "vue";
|
|
2
|
+
import { useRouter as x, useRoute as b } from "vue-router";
|
|
3
|
+
import { _ as w } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-C8cip9Ci.js";
|
|
4
|
+
import { ArrowLeft as k, Save as _ } from "lucide-vue-next";
|
|
5
|
+
import { useI18n as V } from "vue-i18n";
|
|
6
|
+
import { notify as c } from "@opengis/core";
|
|
7
|
+
import { inputs as q, VForm as S } from "@opengis/form";
|
|
8
|
+
const C = { class: "space-y-6 max-w-7xl mx-auto" }, M = { class: "flex items-center justify-between" }, N = { class: "flex items-center gap-4" }, $ = { class: "text-2xl font-semibold text-gray-900 dark:text-white" }, j = { class: "flex items-center space-x-3" }, A = { class: "max-w-[1000px]" }, D = /* @__PURE__ */ g({
|
|
9
|
+
__name: "MenuAddPage",
|
|
10
|
+
setup(E) {
|
|
11
|
+
q["vs-input-monaco-editor"] = w;
|
|
12
|
+
const { t: e } = V(), u = x();
|
|
13
|
+
b();
|
|
14
|
+
const p = m([
|
|
15
|
+
{
|
|
16
|
+
key: "name",
|
|
17
|
+
title: e("cms.menu.form.name"),
|
|
18
|
+
type: "text",
|
|
19
|
+
placeholder: e("cms.menu.form.name"),
|
|
20
|
+
required: !0,
|
|
21
|
+
validators: ["required"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "description",
|
|
25
|
+
title: e("cms.menu.form.description"),
|
|
26
|
+
type: "text",
|
|
27
|
+
placeholder: e("cms.menu.form.description"),
|
|
28
|
+
required: !0,
|
|
29
|
+
validators: ["required"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "locale",
|
|
33
|
+
title: e("cms.menu.form.language"),
|
|
34
|
+
type: "select",
|
|
35
|
+
placeholder: e("cms.menu.form.language"),
|
|
36
|
+
options: [
|
|
37
|
+
{ text: "Ukrainian", id: "uk" },
|
|
38
|
+
{ text: "English", id: "en" }
|
|
39
|
+
],
|
|
40
|
+
required: !0,
|
|
41
|
+
validators: ["required"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "content",
|
|
45
|
+
title: e("cms.menu.form.content"),
|
|
46
|
+
type: "monaco-editor",
|
|
47
|
+
height: "500px",
|
|
48
|
+
language: "yaml",
|
|
49
|
+
theme: "vs-light"
|
|
50
|
+
}
|
|
51
|
+
]), r = m({}), i = m({}), f = async () => {
|
|
52
|
+
try {
|
|
53
|
+
if (await i.value.validate()) {
|
|
54
|
+
c({
|
|
55
|
+
type: "warning",
|
|
56
|
+
title: e("cms.common.actions.warning"),
|
|
57
|
+
message: e("cms.menu.createMenuFailed")
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await fetch("/api/cms-menu", {
|
|
62
|
+
method: "POST",
|
|
63
|
+
headers: {
|
|
64
|
+
"Content-Type": "application/json"
|
|
65
|
+
},
|
|
66
|
+
body: JSON.stringify(r.value)
|
|
67
|
+
}), c({
|
|
68
|
+
title: e("cms.common.success"),
|
|
69
|
+
type: "success",
|
|
70
|
+
message: e("cms.common.successMessage")
|
|
71
|
+
}), r.value = {}, u.push("/menu");
|
|
72
|
+
} catch (s) {
|
|
73
|
+
console.log(s), c({
|
|
74
|
+
title: e("cms.common.error"),
|
|
75
|
+
type: "error",
|
|
76
|
+
message: e("cms.common.errorMessage")
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return (s, o) => (h(), v("div", C, [
|
|
81
|
+
t("div", M, [
|
|
82
|
+
t("div", N, [
|
|
83
|
+
t("button", {
|
|
84
|
+
onClick: o[0] || (o[0] = (n) => a(u).back()),
|
|
85
|
+
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"
|
|
86
|
+
}, [
|
|
87
|
+
l(a(k), { class: "w-5 h-5" })
|
|
88
|
+
]),
|
|
89
|
+
t("h1", $, d(s.$t("cms.menu.menuAdd")), 1)
|
|
90
|
+
]),
|
|
91
|
+
t("div", j, [
|
|
92
|
+
t("button", {
|
|
93
|
+
onClick: f,
|
|
94
|
+
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"
|
|
95
|
+
}, [
|
|
96
|
+
l(a(_), { class: "w-4 h-4 mr-2" }),
|
|
97
|
+
y(" " + d(s.$t("cms.common.actions.save")), 1)
|
|
98
|
+
])
|
|
99
|
+
])
|
|
100
|
+
]),
|
|
101
|
+
t("div", A, [
|
|
102
|
+
l(a(S), {
|
|
103
|
+
schema: p.value,
|
|
104
|
+
modelValue: r.value,
|
|
105
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => r.value = n),
|
|
106
|
+
form: i.value,
|
|
107
|
+
"onUpdate:form": o[2] || (o[2] = (n) => i.value = n)
|
|
108
|
+
}, null, 8, ["schema", "modelValue", "form"])
|
|
109
|
+
])
|
|
110
|
+
]));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
D as default
|
|
115
|
+
};
|