@opengis/cms 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArticlesPage-BcR1hbds.js → ArticlesPage-Cddv2qte.js} +5 -5
- package/dist/{BuilderPage-CK_osM89.js → BuilderPage-BgcBJcw7.js} +158 -158
- package/dist/{CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js → CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-C-k8QGA-.js} +1 -1
- package/dist/{CollectionsPage-JfmrHNR_.js → CollectionsPage-d5MLIIAG.js} +3 -3
- package/dist/{CreateForm-BMOBeP4G.js → CreateForm-B0srHu5e.js} +2 -2
- package/dist/{EditCollectionPage-DtgvKGm-.js → EditCollectionPage-NUVatLkY.js} +65 -59
- package/dist/{EmptyData-DaZt_nAm.js → EmptyData-BSW20VKP.js} +5 -5
- package/dist/{MenuAddPage-Bf48Z-ah.js → MenuAddPage-Cn3JN04F.js} +3 -3
- package/dist/{MenuItemPage-BSwUW8tv.js → MenuItemPage-B0Th9EOe.js} +3 -3
- package/dist/{MenuPage-tJZtK46W.js → MenuPage-DQpD3IXx.js} +4 -4
- package/dist/{MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.js → MonacoEditor.vue_vue_type_script_setup_true_lang-CTKNG0qR.js} +2 -2
- package/dist/{UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js → UniversalTable.vue_vue_type_script_setup_true_lang-DW6O-xoY.js} +6 -6
- package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js → UniversalTablePagination.vue_vue_type_script_setup_true_lang-DBIPBmpm.js} +4 -4
- package/dist/contentForm-C4Jp-FbQ.js +586 -0
- package/dist/{getField-C7EZs-YQ.js → getField-CKcz_b0t.js} +960 -933
- package/dist/index.js +10 -10
- package/dist/style.css +1 -1
- package/dist/{vuedraggable-CoAPPFYd.js → vuedraggable-mqqAYsch.js} +107 -107
- package/locales/en.json +6 -1
- package/locales/uk.json +4 -1
- package/package.json +4 -4
- package/server/functions/getContent.js +6 -15
- package/server/functions/getSearchData.js +2 -12
- package/server/functions/utils/mock.reply.js +56 -0
- package/server/routes/cms/controllers/getPermissions.js +15 -15
- package/server/routes/cms/controllers/listMedia.js +30 -3
- package/server/routes/cms/controllers/searchContent.js +2 -2
- package/server/routes/cms/controllers/setPermissions.js +49 -49
- package/server/templates/select/core.user_mentioned.sql +1 -1
- package/dist/contentForm-NcG15_5z.js +0 -553
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as v, useModel as V, onMounted as P,
|
|
1
|
+
import { ref as v, useModel as V, onMounted as P, createElementBlock as g, createCommentVNode as O, openBlock as m, createVNode as x, computed as F, createElementVNode as l, createTextVNode as H, unref as w, toDisplayString as a, withCtx as j, mergeModels as ee, defineAsyncComponent as G, Fragment as J, createBlock as U, normalizeClass as Y, resolveDynamicComponent as K, onBeforeUnmount as te, defineComponent as le, inject as ie, renderList as se } from "vue";
|
|
2
2
|
import { useRoute as oe, useRouter as re } from "vue-router";
|
|
3
|
-
import { _ as ae } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as ae } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-CTKNG0qR.js";
|
|
4
4
|
import { Plus as ne, Edit as de, Trash as ce, Type as M, File as S, Link as B, LayoutTemplate as ue, Image as A, ListTree as D, CheckSquare as E, List as me, Clock as pe, Calendar as be, Hash as R } from "lucide-vue-next";
|
|
5
5
|
import { VForm as Q, inputs as $ } from "@opengis/form";
|
|
6
6
|
import { VsModal as W, notify as T, confirm as fe } from "@opengis/core";
|
|
7
7
|
import { useI18n as I } from "vue-i18n";
|
|
8
|
-
import { d as ve } from "./vuedraggable-
|
|
9
|
-
import { _ as ge, a as ye, V as he, b as z, c as xe, d as we, e as _e, g as ke } from "./getField-
|
|
10
|
-
import { _ as $e } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { d as ve } from "./vuedraggable-mqqAYsch.js";
|
|
9
|
+
import { _ as ge, a as ye, V as he, b as z, c as xe, d as we, e as _e, g as ke } from "./getField-CKcz_b0t.js";
|
|
10
|
+
import { _ as $e } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-C-k8QGA-.js";
|
|
11
11
|
const Ce = {
|
|
12
12
|
__name: "vs-builder-monaco",
|
|
13
13
|
props: {
|
|
@@ -21,10 +21,10 @@ const Ce = {
|
|
|
21
21
|
const d = v(null);
|
|
22
22
|
return P(() => {
|
|
23
23
|
d.value = Math.random().toString(36).substring(2, 15);
|
|
24
|
-
}), (
|
|
24
|
+
}), (i, t) => d.value ? (m(), g("div", { key: d.value }, [
|
|
25
25
|
x(ae, {
|
|
26
26
|
modelValue: e.value,
|
|
27
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
27
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => e.value = s),
|
|
28
28
|
language: "yaml",
|
|
29
29
|
theme: "vs-light",
|
|
30
30
|
height: "calc(100vh - 200px)",
|
|
@@ -135,6 +135,12 @@ const Ce = {
|
|
|
135
135
|
type: "text",
|
|
136
136
|
validators: ["required"],
|
|
137
137
|
col: 6
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: "icon",
|
|
141
|
+
ua: "Icon",
|
|
142
|
+
type: "text",
|
|
143
|
+
col: 6
|
|
138
144
|
}
|
|
139
145
|
]
|
|
140
146
|
},
|
|
@@ -142,10 +148,10 @@ const Ce = {
|
|
|
142
148
|
type: "datatable",
|
|
143
149
|
label: e("cms.builder.fieldLabels.colModel"),
|
|
144
150
|
conditions: ["type", "==", "datalist"],
|
|
145
|
-
colModel: Object.entries(q(n + 1, e)).map(([d,
|
|
151
|
+
colModel: Object.entries(q(n + 1, e)).map(([d, i]) => ({
|
|
146
152
|
key: d,
|
|
147
|
-
...
|
|
148
|
-
ua: (
|
|
153
|
+
...i,
|
|
154
|
+
ua: (i == null ? void 0 : i.label) || (i == null ? void 0 : i.ua)
|
|
149
155
|
}))
|
|
150
156
|
} : {
|
|
151
157
|
type: "switcher",
|
|
@@ -186,7 +192,7 @@ const Ce = {
|
|
|
186
192
|
},
|
|
187
193
|
emits: ["update:modelValue"],
|
|
188
194
|
setup(n) {
|
|
189
|
-
const { t: e } = I(), d = V(n, "modelValue"),
|
|
195
|
+
const { t: e } = I(), d = V(n, "modelValue"), i = v(!1), t = v({}), s = v({}), p = F(() => (s.value, q(0, e))), c = async () => {
|
|
190
196
|
if (await t.value.validate()) {
|
|
191
197
|
T({
|
|
192
198
|
type: "warning",
|
|
@@ -196,14 +202,14 @@ const Ce = {
|
|
|
196
202
|
return;
|
|
197
203
|
}
|
|
198
204
|
try {
|
|
199
|
-
d.value = [...d.value,
|
|
205
|
+
d.value = [...d.value, s.value], s.value = {}, i.value = !1;
|
|
200
206
|
} catch (r) {
|
|
201
207
|
console.log(r);
|
|
202
208
|
}
|
|
203
209
|
};
|
|
204
210
|
return (o, r) => (m(), g("div", null, [
|
|
205
211
|
l("button", {
|
|
206
|
-
onClick: r[0] || (r[0] = (y) =>
|
|
212
|
+
onClick: r[0] || (r[0] = (y) => i.value = !0),
|
|
207
213
|
class: "inline-flex items-center justify-center h-10 gap-2 px-4 py-2 text-sm font-medium transition-colors border rounded-md hover hover:bg-gray-200 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 0"
|
|
208
214
|
}, [
|
|
209
215
|
x(w(ne), { class: "w-4 h-4 mr-2" }),
|
|
@@ -213,15 +219,15 @@ const Ce = {
|
|
|
213
219
|
teleport: "#modal",
|
|
214
220
|
title: o.$t("cms.builder.createField"),
|
|
215
221
|
size: "small",
|
|
216
|
-
visible:
|
|
217
|
-
"onUpdate:visible": r[4] || (r[4] = (y) =>
|
|
218
|
-
onClose: r[5] || (r[5] = (y) =>
|
|
222
|
+
visible: i.value,
|
|
223
|
+
"onUpdate:visible": r[4] || (r[4] = (y) => i.value = y),
|
|
224
|
+
onClose: r[5] || (r[5] = (y) => i.value = !1)
|
|
219
225
|
}, {
|
|
220
226
|
footer: j(() => [
|
|
221
227
|
l("div", Ve, [
|
|
222
228
|
l("button", {
|
|
223
229
|
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",
|
|
224
|
-
onClick: r[3] || (r[3] = (y) =>
|
|
230
|
+
onClick: r[3] || (r[3] = (y) => i.value = !1)
|
|
225
231
|
}, a(o.$t("cms.common.actions.cancel")), 1),
|
|
226
232
|
l("button", {
|
|
227
233
|
onClick: c,
|
|
@@ -231,8 +237,8 @@ const Ce = {
|
|
|
231
237
|
]),
|
|
232
238
|
default: j(() => [
|
|
233
239
|
x(w(Q), {
|
|
234
|
-
modelValue:
|
|
235
|
-
"onUpdate:modelValue": r[1] || (r[1] = (y) =>
|
|
240
|
+
modelValue: s.value,
|
|
241
|
+
"onUpdate:modelValue": r[1] || (r[1] = (y) => s.value = y),
|
|
236
242
|
schema: p.value,
|
|
237
243
|
form: t.value,
|
|
238
244
|
"onUpdate:form": r[2] || (r[2] = (y) => t.value = y)
|
|
@@ -265,9 +271,9 @@ const Ce = {
|
|
|
265
271
|
}),
|
|
266
272
|
emits: ["update:columns"],
|
|
267
273
|
setup(n) {
|
|
268
|
-
const { t: e } = I(), d = G(() => import("@opengis/form")),
|
|
274
|
+
const { t: e } = I(), d = G(() => import("@opengis/form")), i = n, t = V(n, "columns"), s = v(!1), p = v({}), c = v({ ...i.data || {} }), o = v({});
|
|
269
275
|
P(() => {
|
|
270
|
-
|
|
276
|
+
i.data.required ? o.value = {
|
|
271
277
|
...q(0, e),
|
|
272
278
|
name: {
|
|
273
279
|
...q(0, e).name,
|
|
@@ -293,7 +299,7 @@ const Ce = {
|
|
|
293
299
|
}
|
|
294
300
|
});
|
|
295
301
|
}, y = () => {
|
|
296
|
-
t.value = t.value.filter((k, b) => b !==
|
|
302
|
+
t.value = t.value.filter((k, b) => b !== i.index);
|
|
297
303
|
}, _ = async () => {
|
|
298
304
|
if (await p.value.validate()) {
|
|
299
305
|
T({
|
|
@@ -304,7 +310,7 @@ const Ce = {
|
|
|
304
310
|
return;
|
|
305
311
|
}
|
|
306
312
|
try {
|
|
307
|
-
t.value[
|
|
313
|
+
t.value[i.index] = c.value, s.value = !1;
|
|
308
314
|
} catch (b) {
|
|
309
315
|
console.log(b);
|
|
310
316
|
}
|
|
@@ -312,7 +318,7 @@ const Ce = {
|
|
|
312
318
|
return (k, b) => (m(), g("div", qe, [
|
|
313
319
|
["status"].includes(n.data.name) ? O("", !0) : (m(), g("button", {
|
|
314
320
|
key: 0,
|
|
315
|
-
onClick: b[0] || (b[0] = (C) =>
|
|
321
|
+
onClick: b[0] || (b[0] = (C) => s.value = !0),
|
|
316
322
|
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"
|
|
317
323
|
}, [
|
|
318
324
|
x(w(de), { class: "w-4 h-4" })
|
|
@@ -326,15 +332,15 @@ const Ce = {
|
|
|
326
332
|
])),
|
|
327
333
|
x(w(W), {
|
|
328
334
|
teleport: "#modal",
|
|
329
|
-
visible:
|
|
335
|
+
visible: s.value,
|
|
330
336
|
title: k.$t("cms.builder.editField"),
|
|
331
|
-
onClose: b[4] || (b[4] = (C) =>
|
|
337
|
+
onClose: b[4] || (b[4] = (C) => s.value = !1)
|
|
332
338
|
}, {
|
|
333
339
|
footer: j(() => [
|
|
334
340
|
l("div", Oe, [
|
|
335
341
|
l("button", {
|
|
336
342
|
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",
|
|
337
|
-
onClick: b[3] || (b[3] = (C) =>
|
|
343
|
+
onClick: b[3] || (b[3] = (C) => s.value = !1)
|
|
338
344
|
}, a(k.$t("cms.common.actions.cancel")), 1),
|
|
339
345
|
l("button", {
|
|
340
346
|
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",
|
|
@@ -381,7 +387,7 @@ const Ce = {
|
|
|
381
387
|
},
|
|
382
388
|
emits: ["update:modelValue"],
|
|
383
389
|
setup(n) {
|
|
384
|
-
const e = V(n, "modelValue"), d = (t) => t === "array" ? "purple" : t === "boolean" || t === "date" ? "red" : t === "datetime" ? "purple" : t === "number" ? "green" : t === "text" ? "blue" : t === "file" || t === "select" ? "yellow" : t === "slug" ? "green" : t === "image" ? "blue" : "gray",
|
|
390
|
+
const e = V(n, "modelValue"), d = (t) => t === "array" ? "purple" : t === "boolean" || t === "date" ? "red" : t === "datetime" ? "purple" : t === "number" ? "green" : t === "text" ? "blue" : t === "file" || t === "select" ? "yellow" : t === "slug" ? "green" : t === "image" ? "blue" : "gray", i = (t) => {
|
|
385
391
|
switch (t) {
|
|
386
392
|
case "text":
|
|
387
393
|
return M;
|
|
@@ -425,7 +431,7 @@ const Ce = {
|
|
|
425
431
|
return M;
|
|
426
432
|
}
|
|
427
433
|
};
|
|
428
|
-
return (t,
|
|
434
|
+
return (t, s) => {
|
|
429
435
|
var p, c;
|
|
430
436
|
return m(), g(J, null, [
|
|
431
437
|
l("div", je, [
|
|
@@ -436,7 +442,7 @@ const Ce = {
|
|
|
436
442
|
l("div", Ie, [
|
|
437
443
|
x(Le, {
|
|
438
444
|
modelValue: e.value.columns,
|
|
439
|
-
"onUpdate:modelValue":
|
|
445
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => e.value.columns = o)
|
|
440
446
|
}, null, 8, ["modelValue"])
|
|
441
447
|
])
|
|
442
448
|
]),
|
|
@@ -451,7 +457,7 @@ const Ce = {
|
|
|
451
457
|
(c = (p = e.value) == null ? void 0 : p.columns) != null && c.length ? (m(), U(w(ve), {
|
|
452
458
|
key: 0,
|
|
453
459
|
modelValue: e.value.columns,
|
|
454
|
-
"onUpdate:modelValue":
|
|
460
|
+
"onUpdate:modelValue": s[2] || (s[2] = (o) => e.value.columns = o),
|
|
455
461
|
"item-key": "name",
|
|
456
462
|
handle: ".drag-handle",
|
|
457
463
|
animation: 200
|
|
@@ -461,11 +467,11 @@ const Ce = {
|
|
|
461
467
|
return [
|
|
462
468
|
l("div", Ee, [
|
|
463
469
|
l("div", Re, [
|
|
464
|
-
|
|
470
|
+
s[3] || (s[3] = l("span", { class: "drag-handle cursor-move mr-2 text-gray-400" }, "☰", -1)),
|
|
465
471
|
l("div", {
|
|
466
472
|
class: Y(["flex items-center justify-center p-1 rounded", `bg-${d((y = o.type) == null ? void 0 : y.toLowerCase())}-100`])
|
|
467
473
|
}, [
|
|
468
|
-
(m(), U(K(
|
|
474
|
+
(m(), U(K(i((_ = o.type) == null ? void 0 : _.toLowerCase())), { class: "w-4 h-4" }))
|
|
469
475
|
], 2),
|
|
470
476
|
l("div", null, [
|
|
471
477
|
l("p", He, a(o.label), 1),
|
|
@@ -477,7 +483,7 @@ const Ce = {
|
|
|
477
483
|
l("span", Ke, a(o.type), 1)
|
|
478
484
|
]),
|
|
479
485
|
l("div", Qe, [
|
|
480
|
-
o.localization ? (m(), g("svg", We, [...
|
|
486
|
+
o.localization ? (m(), g("svg", We, [...s[4] || (s[4] = [
|
|
481
487
|
l("circle", {
|
|
482
488
|
cx: "12",
|
|
483
489
|
cy: "12",
|
|
@@ -488,7 +494,7 @@ const Ce = {
|
|
|
488
494
|
]),
|
|
489
495
|
x(Te, {
|
|
490
496
|
columns: e.value.columns,
|
|
491
|
-
"onUpdate:columns":
|
|
497
|
+
"onUpdate:columns": s[1] || (s[1] = (k) => e.value.columns = k),
|
|
492
498
|
data: e.value.columns[r],
|
|
493
499
|
index: r
|
|
494
500
|
}, null, 8, ["columns", "data", "index"])
|
|
@@ -516,9 +522,9 @@ const Ce = {
|
|
|
516
522
|
},
|
|
517
523
|
emits: ["update:data", "update:form"],
|
|
518
524
|
setup(n) {
|
|
519
|
-
const { t: e } = I(), d = G(() => import("@opengis/form")),
|
|
525
|
+
const { t: e } = I(), d = G(() => import("@opengis/form")), i = V(n, "data"), t = V(n, "form");
|
|
520
526
|
v({});
|
|
521
|
-
const
|
|
527
|
+
const s = F(() => ({
|
|
522
528
|
name: {
|
|
523
529
|
type: "text",
|
|
524
530
|
disabled: !0,
|
|
@@ -611,19 +617,19 @@ const Ce = {
|
|
|
611
617
|
t.value = null;
|
|
612
618
|
}), (p, c) => (m(), g("div", null, [
|
|
613
619
|
x(w(d), {
|
|
614
|
-
modelValue:
|
|
615
|
-
"onUpdate:modelValue": c[0] || (c[0] = (o) =>
|
|
616
|
-
schema:
|
|
620
|
+
modelValue: i.value,
|
|
621
|
+
"onUpdate:modelValue": c[0] || (c[0] = (o) => i.value = o),
|
|
622
|
+
schema: s.value,
|
|
617
623
|
form: t.value,
|
|
618
624
|
"onUpdate:form": c[1] || (c[1] = (o) => t.value = o)
|
|
619
625
|
}, null, 8, ["modelValue", "schema", "form"]),
|
|
620
626
|
x(tt, {
|
|
621
|
-
modelValue:
|
|
622
|
-
"onUpdate:modelValue": c[2] || (c[2] = (o) =>
|
|
627
|
+
modelValue: i.value,
|
|
628
|
+
"onUpdate:modelValue": c[2] || (c[2] = (o) => i.value = o)
|
|
623
629
|
}, null, 8, ["modelValue"])
|
|
624
630
|
]));
|
|
625
631
|
}
|
|
626
|
-
},
|
|
632
|
+
}, it = {
|
|
627
633
|
__name: "vs-builder-preview",
|
|
628
634
|
props: {
|
|
629
635
|
data: {},
|
|
@@ -634,15 +640,15 @@ const Ce = {
|
|
|
634
640
|
emits: ["update:data", "update:form"],
|
|
635
641
|
setup(n) {
|
|
636
642
|
$["vs-input-custom-datatable"] = ge, $["vs-input-reference"] = ye, $["vs-input-texteditor"] = he, $["vs-input-mediaselect"] = z, $["vs-input-file"] = z, $["vs-input-image"] = z, $["vs-input-richtext-md"] = xe, $["vs-input-integer"] = we, $["vs-input-relation-link"] = _e;
|
|
637
|
-
const e = v({}), d = V(n, "data"),
|
|
638
|
-
var
|
|
639
|
-
return ((p = (
|
|
643
|
+
const e = v({}), d = V(n, "data"), i = V(n, "form"), t = F(() => {
|
|
644
|
+
var s, p;
|
|
645
|
+
return ((p = (s = d.value) == null ? void 0 : s.columns) == null ? void 0 : p.map(ke)) || [];
|
|
640
646
|
});
|
|
641
|
-
return (
|
|
647
|
+
return (s, p) => {
|
|
642
648
|
var c;
|
|
643
649
|
return m(), g("div", {
|
|
644
650
|
ref_key: "form",
|
|
645
|
-
ref:
|
|
651
|
+
ref: i
|
|
646
652
|
}, [
|
|
647
653
|
((c = t.value) == null ? void 0 : c.length) > 0 ? (m(), U(w(Q), {
|
|
648
654
|
key: 0,
|
|
@@ -653,17 +659,17 @@ const Ce = {
|
|
|
653
659
|
], 512);
|
|
654
660
|
};
|
|
655
661
|
}
|
|
656
|
-
},
|
|
662
|
+
}, st = {
|
|
657
663
|
monaco: Ce,
|
|
658
664
|
edit: lt,
|
|
659
|
-
preview:
|
|
665
|
+
preview: it
|
|
660
666
|
}, ot = { class: "mx-auto max-w-[90%]" }, rt = { class: "flex items-center justify-between mb-6" }, at = { class: "mb-2 text-2xl font-semibold text-gray-900" }, nt = { class: "lowercase" }, dt = { class: "text-gray-600" }, ct = { class: "flex items-center gap-2" }, ut = { class: "w-full" }, mt = { class: "flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground" }, pt = ["onClick"], bt = {
|
|
661
667
|
key: 0,
|
|
662
668
|
class: "mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"
|
|
663
669
|
}, Ct = /* @__PURE__ */ le({
|
|
664
670
|
__name: "EditCollectionPage",
|
|
665
671
|
setup(n) {
|
|
666
|
-
const { t: e } = I(), d =
|
|
672
|
+
const { t: e } = I(), d = ie("cms.fetchContentTypes"), i = v("edit"), t = v({ yaml: "", data: { columns: [], type: "collection" } }), s = v({}), p = v(""), c = oe(), o = re(), r = v(!1), y = F(() => [
|
|
667
673
|
// {
|
|
668
674
|
// name: "YAML",
|
|
669
675
|
// id: "monaco",
|
|
@@ -713,7 +719,7 @@ const Ce = {
|
|
|
713
719
|
}, X = async () => {
|
|
714
720
|
var f, h;
|
|
715
721
|
try {
|
|
716
|
-
if (await
|
|
722
|
+
if (await s.value.validate()) {
|
|
717
723
|
T({
|
|
718
724
|
type: "warning",
|
|
719
725
|
title: e("cms.common.actions.warning"),
|
|
@@ -731,7 +737,7 @@ const Ce = {
|
|
|
731
737
|
headers: {
|
|
732
738
|
"Content-Type": "application/json"
|
|
733
739
|
},
|
|
734
|
-
body: JSON.stringify(
|
|
740
|
+
body: JSON.stringify(i.value === "monaco" ? (f = t.value) == null ? void 0 : f.yaml : (h = t.value) == null ? void 0 : h.data)
|
|
735
741
|
}
|
|
736
742
|
);
|
|
737
743
|
o.back(), d && d(), T({
|
|
@@ -775,24 +781,24 @@ const Ce = {
|
|
|
775
781
|
]),
|
|
776
782
|
l("div", ut, [
|
|
777
783
|
l("div", mt, [
|
|
778
|
-
(m(!0), g(J, null,
|
|
784
|
+
(m(!0), g(J, null, se(y.value, (u) => (m(), g("button", {
|
|
779
785
|
key: u.id,
|
|
780
|
-
onClick: (L) =>
|
|
786
|
+
onClick: (L) => i.value = u.id,
|
|
781
787
|
class: Y([
|
|
782
788
|
"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",
|
|
783
|
-
u.id ===
|
|
789
|
+
u.id === i.value ? "bg-blue-50 text-blue-700 border-blue-200" : ""
|
|
784
790
|
])
|
|
785
791
|
}, a(u.name), 11, pt))), 128))
|
|
786
792
|
])
|
|
787
793
|
]),
|
|
788
794
|
r.value ? (m(), g("div", bt, [
|
|
789
|
-
(m(), U(K(w(
|
|
795
|
+
(m(), U(K(w(st)[i.value]), {
|
|
790
796
|
yaml: t.value.yaml,
|
|
791
797
|
"onUpdate:yaml": h[1] || (h[1] = (u) => t.value.yaml = u),
|
|
792
798
|
data: t.value.data,
|
|
793
799
|
"onUpdate:data": h[2] || (h[2] = (u) => t.value.data = u),
|
|
794
|
-
form:
|
|
795
|
-
"onUpdate:form": h[3] || (h[3] = (u) =>
|
|
800
|
+
form: s.value,
|
|
801
|
+
"onUpdate:form": h[3] || (h[3] = (u) => s.value = u)
|
|
796
802
|
}, null, 40, ["yaml", "data", "form"]))
|
|
797
803
|
])) : O("", !0)
|
|
798
804
|
]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock as n, openBlock as r, createElementVNode as t, createCommentVNode as a, toDisplayString as i, createTextVNode as l } from "vue";
|
|
2
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
3
|
__name: "EmptyData",
|
|
4
4
|
props: {
|
|
@@ -21,7 +21,7 @@ const d = { class: "rounded-xl text-card-foreground shadow-lg bg-white dark:bg-s
|
|
|
21
21
|
},
|
|
22
22
|
emits: ["action"],
|
|
23
23
|
setup(o) {
|
|
24
|
-
return (s, e) => (
|
|
24
|
+
return (s, e) => (r(), n("div", d, [
|
|
25
25
|
t("div", u, [
|
|
26
26
|
e[2] || (e[2] = t("svg", {
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -41,7 +41,7 @@ const d = { class: "rounded-xl text-card-foreground shadow-lg bg-white dark:bg-s
|
|
|
41
41
|
], -1)),
|
|
42
42
|
t("h3", m, i(s.$t(o.title)), 1),
|
|
43
43
|
t("p", c, i(s.$t(o.description)), 1),
|
|
44
|
-
o.showButton ? (
|
|
44
|
+
o.showButton ? (r(), n("button", {
|
|
45
45
|
key: 0,
|
|
46
46
|
onClick: e[0] || (e[0] = (p) => s.$emit("action")),
|
|
47
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"
|
|
@@ -61,8 +61,8 @@ const d = { class: "rounded-xl text-card-foreground shadow-lg bg-white dark:bg-s
|
|
|
61
61
|
t("path", { d: "M5 12h14" }),
|
|
62
62
|
t("path", { d: "M12 5v14" })
|
|
63
63
|
], -1)),
|
|
64
|
-
|
|
65
|
-
])) :
|
|
64
|
+
l(" " + i(s.$t(o.buttonText)), 1)
|
|
65
|
+
])) : a("", !0)
|
|
66
66
|
])
|
|
67
67
|
]));
|
|
68
68
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as g, ref as m,
|
|
1
|
+
import { defineComponent as g, ref as m, createElementBlock as h, openBlock as v, createElementVNode as t, unref as a, createVNode as l, toDisplayString as d, createTextVNode as y } from "vue";
|
|
2
2
|
import { useRouter as x, useRoute as b } from "vue-router";
|
|
3
|
-
import { _ as w } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as w } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-CTKNG0qR.js";
|
|
4
4
|
import { ArrowLeft as k, Save as _ } from "lucide-vue-next";
|
|
5
5
|
import { useI18n as V } from "vue-i18n";
|
|
6
6
|
import { notify as c } from "@opengis/core";
|
|
@@ -77,7 +77,7 @@ const C = { class: "space-y-6 max-w-7xl mx-auto" }, M = { class: "flex items-cen
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
return (s, o) => (
|
|
80
|
+
return (s, o) => (v(), h("div", C, [
|
|
81
81
|
t("div", M, [
|
|
82
82
|
t("div", N, [
|
|
83
83
|
t("button", {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as He } from "./vuedraggable-
|
|
1
|
+
import { createElementBlock as F, openBlock as w, createStaticVNode as Re, defineComponent as D, ref as k, normalizeClass as B, createTextVNode as Z, createCommentVNode as $, createBlock as O, createVNode as A, toDisplayString as _, unref as y, withModifiers as Y, createElementVNode as v, withDirectives as Le, withKeys as re, vModelText as Me, watch as Ue, resolveComponent as De, withCtx as j, nextTick as te, mergeModels as Ye, useModel as de, onBeforeMount as Be, Fragment as $e, computed as Pe, onMounted as Ve } from "vue";
|
|
2
|
+
import { d as He } from "./vuedraggable-mqqAYsch.js";
|
|
3
3
|
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { Pencil as je, Trash2 as Ke, Check as Ge, X as Qe, Plus as We, ArrowLeft as ze, HelpCircle as Ze, Save as Xe } from "lucide-vue-next";
|
|
5
5
|
import { confirm as Je, VsModal as er, notify as I } from "@opengis/core";
|
|
6
6
|
import { useI18n as H } from "vue-i18n";
|
|
7
7
|
import rr, { inputs as pe, VForm as ve } from "@opengis/form";
|
|
8
|
-
import { _ as he } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as he } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-CTKNG0qR.js";
|
|
9
9
|
import { useRouter as tr, useRoute as nr } from "vue-router";
|
|
10
10
|
const ir = {}, lr = {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as D, ref as a, onMounted as S, resolveComponent as V,
|
|
1
|
+
import { defineComponent as D, ref as a, onMounted as S, resolveComponent as V, createElementBlock as f, openBlock as _, createElementVNode as r, createVNode as m, toDisplayString as u, unref as l, withCtx as j, createTextVNode as F, createCommentVNode as N } from "vue";
|
|
2
2
|
import { useRouter as L } from "vue-router";
|
|
3
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-
|
|
4
|
+
import { _ as M } from "./UniversalTable.vue_vue_type_script_setup_true_lang-DW6O-xoY.js";
|
|
5
5
|
import { useI18n as P } from "vue-i18n";
|
|
6
6
|
import T from "@opengis/filter";
|
|
7
7
|
import { notify as w } from "@opengis/core";
|
|
@@ -54,7 +54,7 @@ const A = { class: "space-y-6 max-w-7xl mx-auto" }, H = { class: "flex flex-col
|
|
|
54
54
|
return S(p), (e, t) => {
|
|
55
55
|
var n;
|
|
56
56
|
const s = V("router-link");
|
|
57
|
-
return
|
|
57
|
+
return _(), f("div", A, [
|
|
58
58
|
r("div", H, [
|
|
59
59
|
r("div", null, [
|
|
60
60
|
r("div", I, [
|
|
@@ -81,7 +81,7 @@ const A = { class: "space-y-6 max-w-7xl mx-auto" }, H = { class: "flex flex-col
|
|
|
81
81
|
})
|
|
82
82
|
]),
|
|
83
83
|
r("div", z, [
|
|
84
|
-
((n = i.value) == null ? void 0 : n.length) > 0 ? (
|
|
84
|
+
((n = i.value) == null ? void 0 : n.length) > 0 ? (_(), f("div", G, [
|
|
85
85
|
m(l(T), {
|
|
86
86
|
schema: i.value,
|
|
87
87
|
view: "inline",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, mergeModels as c, useModel as m, ref as f, onMounted as h, watch as d, onBeforeUnmount as g,
|
|
1
|
+
import { defineComponent as s, mergeModels as c, useModel as m, ref as f, onMounted as h, watch as d, onBeforeUnmount as g, createElementBlock as p, openBlock as v, normalizeStyle as w } from "vue";
|
|
2
2
|
async function M() {
|
|
3
3
|
if (window.monaco)
|
|
4
4
|
return window.monaco;
|
|
@@ -72,7 +72,7 @@ const C = /* @__PURE__ */ s({
|
|
|
72
72
|
}
|
|
73
73
|
), g(() => {
|
|
74
74
|
e && (e.dispose(), e = null);
|
|
75
|
-
}), (t, r) => (
|
|
75
|
+
}), (t, r) => (v(), p("div", {
|
|
76
76
|
ref_key: "editorContainer",
|
|
77
77
|
ref: n,
|
|
78
78
|
style: w({ width: a.width, height: a.height })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, ref as L, computed as $,
|
|
1
|
+
import { defineComponent as j, ref as L, computed as $, createElementBlock as n, openBlock as s, createElementVNode as r, Fragment as v, renderList as C, normalizeClass as g, createBlock as f, createCommentVNode as A, createTextVNode as _, resolveDynamicComponent as M, toDisplayString as l, createVNode as F, unref as p, renderSlot as B, withModifiers as N } from "vue";
|
|
2
2
|
import { useI18n as q } from "vue-i18n";
|
|
3
3
|
import { Eye as U, File as P, Layers as z, Pencil as H, Trash2 as W, XCircle as X, Edit as G, CheckCircle as J } from "lucide-vue-next";
|
|
4
4
|
const K = { class: "text-card-foreground border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm" }, O = { class: "p-0" }, Q = { class: "table-scroll overflow-x-auto" }, Y = { class: "relative w-full overflow-auto max-h-[calc(100vh-270px)]" }, Z = { class: "w-full caption-bottom text-sm" }, I = { class: "border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ee = { class: "flex items-center gap-2" }, te = { class: "h-10 text-center px-4 font-semibold text-slate-700 dark:text-slate-300 max-w-32" }, se = ["onClick"], ne = {
|
|
@@ -107,10 +107,10 @@ const K = { class: "text-card-foreground border-0 bg-white/80 dark:bg-slate-800/
|
|
|
107
107
|
}])
|
|
108
108
|
}, [
|
|
109
109
|
r("div", ee, [
|
|
110
|
-
e.icon ? (s(), f(
|
|
110
|
+
e.icon ? (s(), f(M(e.icon), {
|
|
111
111
|
key: 0,
|
|
112
112
|
class: "w-5 h-5"
|
|
113
|
-
})) :
|
|
113
|
+
})) : A("", !0),
|
|
114
114
|
_(" " + l(e.label || e.title || e.ua || e.name), 1)
|
|
115
115
|
])
|
|
116
116
|
], 2))), 128)),
|
|
@@ -132,7 +132,7 @@ const K = { class: "text-card-foreground border-0 bg-white/80 dark:bg-slate-800/
|
|
|
132
132
|
}]),
|
|
133
133
|
onClick: (xe) => x === 0 ? R(e) : void 0
|
|
134
134
|
}, [
|
|
135
|
-
b.customRender && b.customRender[t.name] ? (s(), f(
|
|
135
|
+
b.customRender && b.customRender[t.name] ? (s(), f(M(b.customRender[t.name](e[t.name], e)), { key: 0 })) : A("", !0),
|
|
136
136
|
[
|
|
137
137
|
"published_at",
|
|
138
138
|
"publish_at",
|
|
@@ -163,9 +163,9 @@ const K = { class: "text-card-foreground border-0 bg-white/80 dark:bg-slate-800/
|
|
|
163
163
|
key: 0,
|
|
164
164
|
class: g(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700", (u = y(e[t.name])) == null ? void 0 : u.classes])
|
|
165
165
|
}, [
|
|
166
|
-
(s(), f(
|
|
166
|
+
(s(), f(M((h = y(e[t.name])) == null ? void 0 : h.icon), { class: "w-3 h-3 mr-1" })),
|
|
167
167
|
_(" " + l((D = y(e[t.name])) == null ? void 0 : D.text), 1)
|
|
168
|
-
], 2)) :
|
|
168
|
+
], 2)) : A("", !0)
|
|
169
169
|
], 64)) : t.name === "slug" ? (s(), n("div", le, l(e[t.name] ? "/" + e[t.name] : "-"), 1)) : t.name === "color" ? (s(), n("span", {
|
|
170
170
|
key: 9,
|
|
171
171
|
class: g(["w-4 h-4 rounded-full block ml-2", "bg-[" + e[t.name] + "]"])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, mergeModels as p, useModel as w, computed as h,
|
|
1
|
+
import { defineComponent as f, mergeModels as p, useModel as w, computed as h, createElementBlock as d, openBlock as c, createElementVNode as e, toDisplayString as n, createTextVNode as u, createVNode as b, unref as g, Fragment as v, renderList as k, normalizeClass as y } from "vue";
|
|
2
2
|
import { ChevronLeft as $, ChevronRight as M } from "lucide-vue-next";
|
|
3
3
|
const C = { class: "flex items-center justify-between px-6 py-4 border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800" }, _ = { class: "flex justify-between flex-1 sm:hidden" }, j = { class: "relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50" }, P = { class: "relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50" }, N = { class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" }, T = { class: "text-sm text-slate-600 dark:text-slate-400" }, V = { class: "font-medium text-slate-800 dark:text-slate-100" }, z = { class: "font-medium text-slate-800 dark:text-slate-100" }, B = {
|
|
4
4
|
class: "relative z-0 inline-flex space-x-2 rounded-md shadow-sm",
|
|
@@ -31,7 +31,7 @@ const C = { class: "flex items-center justify-between px-6 py-4 border-t border-
|
|
|
31
31
|
s.push(i);
|
|
32
32
|
return m < r.value - 1 && s.push("ellipsis"), s.push(r.value), s;
|
|
33
33
|
});
|
|
34
|
-
return (l, s) => (
|
|
34
|
+
return (l, s) => (c(), d("div", C, [
|
|
35
35
|
e("div", _, [
|
|
36
36
|
e("button", j, n(l.$t("cms.common.pagination.previous")), 1),
|
|
37
37
|
e("button", P, n(l.$t("cms.common.pagination.next")), 1)
|
|
@@ -57,10 +57,10 @@ const C = { class: "flex items-center justify-between px-6 py-4 border-t border-
|
|
|
57
57
|
b(g($), { class: "w-5 h-5" })
|
|
58
58
|
], 8, E),
|
|
59
59
|
e("div", S, [
|
|
60
|
-
(
|
|
60
|
+
(c(!0), d(v, null, k(x.value, (o, m) => (c(), d(v, {
|
|
61
61
|
key: o + "-" + m
|
|
62
62
|
}, [
|
|
63
|
-
o === "ellipsis" ? (
|
|
63
|
+
o === "ellipsis" ? (c(), d("span", D, "...")) : (c(), d("button", {
|
|
64
64
|
key: 1,
|
|
65
65
|
onClick: (i) => t.value = o,
|
|
66
66
|
class: y(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md", {
|