@opengis/cms 0.0.51 → 0.0.53
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-dx7Se1Xo.js} +1 -1
- package/dist/{BuilderPage-CK_osM89.js → BuilderPage-ChkWE8rE.js} +158 -158
- package/dist/{EditCollectionPage-DtgvKGm-.js → EditCollectionPage-H1J9pZNo.js} +64 -58
- package/dist/{MenuAddPage-Bf48Z-ah.js → MenuAddPage-B6Qs6qV8.js} +1 -1
- package/dist/{MenuItemPage-BSwUW8tv.js → MenuItemPage-XN9lx5Vv.js} +3 -3
- package/dist/{MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.js → MonacoEditor.vue_vue_type_script_setup_true_lang-DQjDxfF8.js} +7 -7
- package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js → UniversalTablePagination.vue_vue_type_script_setup_true_lang-Cp1WWIf0.js} +5 -5
- package/dist/contentForm-BgEoJcWF.js +586 -0
- package/dist/{getField-C7EZs-YQ.js → getField-DoisYj34.js} +960 -933
- package/dist/index.js +9 -9
- package/dist/style.css +1 -1
- package/dist/{vuedraggable-CoAPPFYd.js → vuedraggable-DTHNuRWs.js} +108 -108
- 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/getTags.js +30 -0
- 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/routes/cms/controllers/translate.js +3 -3
- package/server/routes/cms/utils/insertContentLocalization.js +22 -4
- package/server/routes/contentType/controllers/getContentType.js +9 -2
- package/server/routes/tags/controllers/get.tags.js +1 -1
- package/server/templates/select/core.user_mentioned.sql +1 -1
- package/utils.js +1 -0
- package/dist/contentForm-NcG15_5z.js +0 -553
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as v, useModel as V, onMounted as P, openBlock as m, createElementBlock as g, createVNode as x, createCommentVNode as O, computed as F, createElementVNode as l, unref as w, createTextVNode as H, toDisplayString as a, withCtx as j,
|
|
1
|
+
import { ref as v, useModel as V, onMounted as P, openBlock as m, createElementBlock as g, createVNode as x, createCommentVNode as O, computed as F, createElementVNode as l, unref as w, createTextVNode as H, toDisplayString as a, withCtx as j, defineAsyncComponent as G, mergeModels as ee, 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-DQjDxfF8.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-
|
|
8
|
+
import { d as ve } from "./vuedraggable-DTHNuRWs.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-DoisYj34.js";
|
|
10
10
|
import { _ as $e } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js";
|
|
11
11
|
const Ce = {
|
|
12
12
|
__name: "vs-builder-monaco",
|
|
@@ -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,6 +1,6 @@
|
|
|
1
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
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-DQjDxfF8.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";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { openBlock as w, createElementBlock as F, createStaticVNode as Re, defineComponent as D, ref as k, normalizeClass as B, createTextVNode as Z, toDisplayString as _, createCommentVNode as $, createBlock as O, unref as y, withModifiers as Y, createVNode as A, createElementVNode as v, withDirectives as Le, withKeys as re, vModelText as Me, watch as Ue, resolveComponent as De, withCtx as j, nextTick as te,
|
|
2
|
-
import { d as He } from "./vuedraggable-
|
|
1
|
+
import { openBlock as w, createElementBlock as F, createStaticVNode as Re, defineComponent as D, ref as k, normalizeClass as B, createTextVNode as Z, toDisplayString as _, createCommentVNode as $, createBlock as O, unref as y, withModifiers as Y, createVNode as A, createElementVNode as v, withDirectives as Le, withKeys as re, vModelText as Me, watch as Ue, resolveComponent as De, withCtx as j, nextTick as te, useModel as de, mergeModels as Ye, onBeforeMount as Be, Fragment as $e, computed as Pe, onMounted as Ve } from "vue";
|
|
2
|
+
import { d as He } from "./vuedraggable-DTHNuRWs.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-DQjDxfF8.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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s,
|
|
1
|
+
import { defineComponent as s, useModel as c, ref as m, onMounted as f, watch as d, onBeforeUnmount as h, openBlock as g, createElementBlock as p, normalizeStyle as v, mergeModels as w } from "vue";
|
|
2
2
|
async function M() {
|
|
3
3
|
if (window.monaco)
|
|
4
4
|
return window.monaco;
|
|
@@ -12,7 +12,7 @@ async function M() {
|
|
|
12
12
|
}
|
|
13
13
|
const C = /* @__PURE__ */ s({
|
|
14
14
|
__name: "MonacoEditor",
|
|
15
|
-
props: /* @__PURE__ */
|
|
15
|
+
props: /* @__PURE__ */ w({
|
|
16
16
|
language: { default: "javascript" },
|
|
17
17
|
theme: { default: "vs-dark" },
|
|
18
18
|
width: { default: "100%" },
|
|
@@ -28,9 +28,9 @@ const C = /* @__PURE__ */ s({
|
|
|
28
28
|
}),
|
|
29
29
|
emits: ["update:modelValue"],
|
|
30
30
|
setup(a) {
|
|
31
|
-
const o = a, l =
|
|
31
|
+
const o = a, l = c(a, "modelValue"), n = m(null);
|
|
32
32
|
let e = null, i = null;
|
|
33
|
-
return
|
|
33
|
+
return f(async () => {
|
|
34
34
|
var t;
|
|
35
35
|
if (n.value)
|
|
36
36
|
try {
|
|
@@ -70,12 +70,12 @@ const C = /* @__PURE__ */ s({
|
|
|
70
70
|
(t) => {
|
|
71
71
|
e && t && i && i.editor.setTheme(t);
|
|
72
72
|
}
|
|
73
|
-
),
|
|
73
|
+
), h(() => {
|
|
74
74
|
e && (e.dispose(), e = null);
|
|
75
|
-
}), (t, r) => (
|
|
75
|
+
}), (t, r) => (g(), p("div", {
|
|
76
76
|
ref_key: "editorContainer",
|
|
77
77
|
ref: n,
|
|
78
|
-
style:
|
|
78
|
+
style: v({ width: a.width, height: a.height })
|
|
79
79
|
}, null, 4));
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f,
|
|
1
|
+
import { defineComponent as f, useModel as p, computed as h, openBlock as d, createElementBlock as c, createElementVNode as e, toDisplayString as n, createTextVNode as u, createVNode as b, unref as g, Fragment as v, renderList as w, normalizeClass as k, mergeModels 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",
|
|
@@ -8,7 +8,7 @@ const C = { class: "flex items-center justify-between px-6 py-4 border-t border-
|
|
|
8
8
|
class: "px-2 py-2 text-gray-400"
|
|
9
9
|
}, F = ["onClick"], R = ["disabled"], U = { class: "sr-only" }, G = /* @__PURE__ */ f({
|
|
10
10
|
__name: "UniversalTablePagination",
|
|
11
|
-
props: /* @__PURE__ */
|
|
11
|
+
props: /* @__PURE__ */ y({
|
|
12
12
|
total: {},
|
|
13
13
|
count: {},
|
|
14
14
|
limit: {}
|
|
@@ -18,7 +18,7 @@ const C = { class: "flex items-center justify-between px-6 py-4 border-t border-
|
|
|
18
18
|
}),
|
|
19
19
|
emits: ["update:page"],
|
|
20
20
|
setup(a) {
|
|
21
|
-
const t =
|
|
21
|
+
const t = p(a, "page"), r = h(() => Math.ceil(a.total / a.limit)), x = h(() => {
|
|
22
22
|
const s = [];
|
|
23
23
|
if (r.value <= 4) {
|
|
24
24
|
for (let i = 1; i <= r.value; i++)
|
|
@@ -57,13 +57,13 @@ 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
|
-
(d(!0), c(v, null,
|
|
60
|
+
(d(!0), c(v, null, w(x.value, (o, m) => (d(), c(v, {
|
|
61
61
|
key: o + "-" + m
|
|
62
62
|
}, [
|
|
63
63
|
o === "ellipsis" ? (d(), c("span", D, "...")) : (d(), c("button", {
|
|
64
64
|
key: 1,
|
|
65
65
|
onClick: (i) => t.value = o,
|
|
66
|
-
class:
|
|
66
|
+
class: k(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md", {
|
|
67
67
|
"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300 hover:border-blue-600 hover:bg-slate-50 dark:hover:bg-slate-600": o !== t.value,
|
|
68
68
|
"shadow bg-blue-600 hover:bg-blue-700 text-white border-blue-600": o === t.value
|
|
69
69
|
}])
|