@opengis/cms 0.0.65 → 0.0.67

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.
@@ -6,7 +6,7 @@ import { _ as X } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_l
6
6
  const Z = {
7
7
  monaco: k(() => import("./vs-builder-monaco-Cw-f19gc.js")),
8
8
  edit: k(() => import("./vs-builder-edit-D-q1o8tF.js")),
9
- preview: k(() => import("./vs-builder-preview-BLfKnxhd.js"))
9
+ preview: k(() => import("./vs-builder-preview-BBGZmJpu.js"))
10
10
  }, ee = { class: "mx-auto max-w-[90%]" }, te = { class: "flex items-center justify-between mb-6" }, oe = { class: "mb-2 text-2xl font-semibold text-gray-900" }, ne = { class: "lowercase" }, se = { class: "text-gray-600" }, ie = { class: "flex items-center gap-2" }, ae = { class: "w-full" }, re = { 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" }, le = ["onClick"], ce = {
11
11
  key: 0,
12
12
  class: "mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"
@@ -1,5 +1,5 @@
1
- import { defineComponent as Pe, defineAsyncComponent as k, inject as le, ref as v, getCurrentInstance as Be, toRef as Ee, computed as m, watch as Fe, onMounted as Ie, openBlock as h, createElementBlock as $, createElementVNode as u, createVNode as C, unref as p, toDisplayString as j, createCommentVNode as S, createTextVNode as ne, Fragment as Ne, renderList as De, normalizeClass as ae, createBlock as ie, withDirectives as q, vModelCheckbox as Me, vShow as re, nextTick as ce } from "vue";
2
- import { useRouter as Re, useRoute as Ue } from "vue-router";
1
+ import { defineComponent as Pe, defineAsyncComponent as k, inject as le, ref as p, getCurrentInstance as Be, toRef as Ee, computed as v, watch as Fe, onMounted as Ie, openBlock as h, createElementBlock as $, createElementVNode as u, createVNode as C, unref as f, toDisplayString as j, createCommentVNode as A, createTextVNode as ne, Fragment as Ne, renderList as Me, normalizeClass as ie, createBlock as ae, withDirectives as q, vModelCheckbox as Re, vShow as re, nextTick as ce } from "vue";
2
+ import { useRouter as De, useRoute as Ue } from "vue-router";
3
3
  import { ArrowLeft as Oe, HelpCircle as Je, Settings as He, Save as Ke, Loader2 as qe } from "lucide-vue-next";
4
4
  import { useI18n as Ge } from "vue-i18n";
5
5
  import { _ as Qe, g as We } from "./vs-form-custom-datatable-D880w8gx.js";
@@ -30,7 +30,7 @@ const Xe = [
30
30
  type: "key-value",
31
31
  ignore: ["title", "description", "keywords"]
32
32
  }
33
- ], Ye = { class: "space-y-6 mx-auto relativ max-w-[90%]" }, Ze = { class: "" }, et = { class: "flex items-center justify-between" }, tt = { class: "flex items-center gap-4" }, st = { class: "text-2xl font-semibold text-gray-900 dark:text-white line-clamp-1" }, ot = ["href", "title"], lt = { class: "flex items-center space-x-3" }, nt = ["title"], at = { class: "w-full mt-6 flex items-center justify-between" }, it = { 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" }, rt = ["onClick"], ct = { class: "flex items-center gap-4" }, ut = ["disabled"], dt = { class: "flex items-center gap-2" }, mt = {
33
+ ], Ye = { class: "space-y-6 mx-auto relativ max-w-[90%]" }, Ze = { class: "" }, et = { class: "flex items-center justify-between" }, tt = { class: "flex items-center gap-4" }, st = { class: "text-2xl font-semibold text-gray-900 dark:text-white line-clamp-1" }, ot = ["href", "title"], lt = { class: "flex items-center space-x-3" }, nt = ["title"], it = { class: "w-full mt-6 flex items-center justify-between" }, at = { 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" }, rt = ["onClick"], ct = { class: "flex items-center gap-4" }, ut = ["disabled"], dt = { class: "flex items-center gap-2" }, mt = {
34
34
  for: "is_pin",
35
35
  class: "text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"
36
36
  }, vt = { class: "relative" }, pt = {
@@ -38,7 +38,7 @@ const Xe = [
38
38
  class: "w-3 h-3 text-white",
39
39
  fill: "currentColor",
40
40
  viewBox: "0 0 20 20"
41
- }, ft = { class: "mx-auto bg-white rounded-md p-5" }, yt = { class: "mx-auto bg-white rounded-md p-5" }, gt = {
41
+ }, ft = { class: "mx-auto bg-white rounded-md p-5" }, gt = { class: "mx-auto bg-white rounded-md p-5" }, yt = {
42
42
  key: 0,
43
43
  class: "mx-auto bg-white rounded-md p-5"
44
44
  }, bt = {
@@ -48,10 +48,10 @@ const Xe = [
48
48
  __name: "contentForm",
49
49
  setup(ht) {
50
50
  const de = k(
51
- () => import("./vs-form-reference-list-DukrxeuH.js")
51
+ () => import("./vs-form-reference-list-Cf3B1AQM.js")
52
52
  ), me = k(
53
53
  () => import("./vs-form-tiptap-DDFQjRjY.js")
54
- ), F = k(
54
+ ), I = k(
55
55
  () => import("./vs-form-media-select-NY27EaG1.js")
56
56
  ), ve = k(
57
57
  () => import("./vs-richtext-md-C098v_6Q.js")
@@ -59,21 +59,21 @@ const Xe = [
59
59
  () => import("./vs-form-integer-BZ855R3g.js")
60
60
  ), fe = k(
61
61
  () => import("./vs-form-reletion-link-BhzNQszm.js")
62
- ), ye = k(
63
- () => import("./VsFormTags-CMjiu9sY.js")
64
62
  ), ge = k(
63
+ () => import("./VsFormTags-CMjiu9sY.js")
64
+ ), ye = k(
65
65
  () => import("./VsPreview-DwETkOpb.js")
66
66
  ), be = k(
67
67
  () => import("./CollectionsBreadcrumb-HePNJb-d.js")
68
68
  );
69
- x["vs-input-custom-datatable"] = Qe, x["vs-input-reference"] = de, x["vs-input-texteditor"] = me, x["vs-input-mediaselect"] = F, x["vs-input-file"] = F, x["vs-input-image"] = F, x["vs-input-richtext-md"] = ve, x["vs-input-integer"] = pe, x["vs-input-relation-link"] = fe;
70
- const { t: r, locale: G } = Ge(), A = Re(), d = Ue(), Q = le("cms.menu", null) || le("menu", v([])), _ = v([]), I = v({}), W = v({}), N = v({}), D = v(""), M = v(!0), R = Be(), U = R == null ? void 0 : R.appContext, he = (U == null ? void 0 : U.config.globalProperties) || {}, X = Ee(he, "$settings"), E = m(() => {
69
+ x["vs-input-custom-datatable"] = Qe, x["vs-input-reference"] = de, x["vs-input-texteditor"] = me, x["vs-input-mediaselect"] = I, x["vs-input-file"] = I, x["vs-input-image"] = I, x["vs-input-richtext-md"] = ve, x["vs-input-integer"] = pe, x["vs-input-relation-link"] = fe;
70
+ const { t: r, locale: G } = Ge(), T = De(), d = Ue(), Q = le("cms.menu", null) || le("menu", p([])), _ = p([]), N = p({}), W = p({}), M = p({}), R = p(""), D = p(!0), U = Be(), O = U == null ? void 0 : U.appContext, he = (O == null ? void 0 : O.config.globalProperties) || {}, X = Ee(he, "$settings"), E = v(() => {
71
71
  var e;
72
72
  return ((e = X.value) == null ? void 0 : e.cms) || {};
73
- }), we = m(() => Array.isArray(E.value.locales) ? E.value.locales : []), O = m(
73
+ }), we = v(() => Array.isArray(E.value.locales) ? E.value.locales : []), J = v(
74
74
  () => we.value.filter(Boolean)
75
- ), Y = m(
76
- () => E.value.locale || O.value[0] || "uk"
75
+ ), Y = v(
76
+ () => E.value.locale || J.value[0] || "uk"
77
77
  );
78
78
  Fe(
79
79
  X,
@@ -85,28 +85,28 @@ const Xe = [
85
85
  { deep: !0 }
86
86
  );
87
87
  const ke = (e) => {
88
- const t = [], o = O.value.filter(
88
+ const t = [], o = J.value.filter(
89
89
  (n) => n !== Y.value
90
90
  );
91
91
  return Array.isArray(e) && e.forEach((n) => {
92
- t.push(n), !(!n.localization || o.length === 0) && o.forEach((a) => {
92
+ t.push(n), !(!n.localization || o.length === 0) && o.forEach((i) => {
93
93
  t.push({
94
94
  ...n,
95
- name: `${n.name}:${a}`,
96
- label: `${n.label} (${a})`
95
+ name: `${n.name}:${i}`,
96
+ label: `${n.label} (${i})`
97
97
  });
98
98
  });
99
99
  }), t;
100
- }, Z = m(() => ke(_.value)), xe = m(
100
+ }, Z = v(() => ke(_.value)), xe = v(
101
101
  () => Array.isArray(_.value) && _.value.some(
102
102
  (e) => e.localization === !0 && e.name !== "title"
103
103
  )
104
- ), z = v(!1), _e = m(() => {
104
+ ), z = p(!1), _e = v(() => {
105
105
  var e;
106
106
  return (e = Z.value) == null ? void 0 : e.map(We);
107
- }), $e = m(() => {
107
+ }), $e = v(() => {
108
108
  G.value;
109
- const e = O.value.filter(
109
+ const e = J.value.filter(
110
110
  (t) => t !== Y.value
111
111
  );
112
112
  return Xe.flatMap((t) => {
@@ -116,143 +116,143 @@ const Xe = [
116
116
  };
117
117
  if (!t.localization || e.length === 0)
118
118
  return [o];
119
- const n = e.map((a) => ({
119
+ const n = e.map((i) => ({
120
120
  ...t,
121
- key: `${t.key}:${a}`,
122
- label: `${r(t.label)} (${a})`,
121
+ key: `${t.key}:${i}`,
122
+ label: `${r(t.label)} (${i})`,
123
123
  localization: !1
124
124
  }));
125
125
  return [o, ...n];
126
126
  });
127
- }), g = v({}), i = v({
127
+ }), b = p({}), a = p({
128
128
  title: "",
129
129
  status: "draft"
130
- }), J = v(null), L = v(""), P = m(
131
- () => J.value === "single"
132
- ), Ce = m(() => {
130
+ }), F = p(null), L = p(""), P = v(
131
+ () => F.value === "single"
132
+ ), Ce = v(() => {
133
133
  const e = [
134
134
  { id: "content", name: r("cms.builder.content") },
135
135
  { id: "seo", name: r("cms.builder.seo") },
136
136
  { id: "tags", name: r("cms.builder.tags") }
137
137
  ];
138
- return D.value && e.push({ id: "preview", name: r("cms.builder.preview") }), e;
139
- }), V = v("content"), ee = m(() => {
140
- var s, c, l, w, f, b, y, T, oe;
141
- const e = ((s = d.params) == null ? void 0 : s.collection) || ((c = d.params) == null ? void 0 : c.id), t = (l = i.value) == null ? void 0 : l.content_type_id, o = t ? (f = (w = Q.value) == null ? void 0 : w.find((K) => K.id === t)) == null ? void 0 : f.title : null;
138
+ return (R.value || F.value === "single") && e.push({ id: "preview", name: r("cms.builder.preview") }), e;
139
+ }), V = p("content"), ee = v(() => {
140
+ var s, c, l, w, g, y, m, S, oe;
141
+ const e = ((s = d.params) == null ? void 0 : s.collection) || ((c = d.params) == null ? void 0 : c.id), t = (l = a.value) == null ? void 0 : l.content_type_id, o = t ? (g = (w = Q.value) == null ? void 0 : w.find((K) => K.id === t)) == null ? void 0 : g.title : null;
142
142
  if (o)
143
143
  return o;
144
144
  if (L.value)
145
145
  return L.value;
146
- const n = (y = (b = Q.value) == null ? void 0 : b.find(
146
+ const n = (m = (y = Q.value) == null ? void 0 : y.find(
147
147
  (K) => K.id === e
148
- )) == null ? void 0 : y.title;
148
+ )) == null ? void 0 : m.title;
149
149
  if (n)
150
150
  return n;
151
- const a = (T = d.params) == null ? void 0 : T.id;
152
- return P.value && a && e === a && ((oe = i.value) != null && oe.title) ? i.value.title : e === "pages" ? r("cms.articles.title") : e;
153
- }), Te = m(() => {
151
+ const i = (S = d.params) == null ? void 0 : S.id;
152
+ return P.value && i && e === i && ((oe = a.value) != null && oe.title) ? a.value.title : e === "pages" ? r("cms.articles.title") : e;
153
+ }), Te = v(() => {
154
154
  var t, o;
155
155
  const e = P.value ? "cms.builder.editPage" : "cms.builder.editCollection";
156
- return ((t = i.value) == null ? void 0 : t.title) || ((o = d.params) != null && o.id ? r(e) : r("cms.articles.createArticle"));
157
- }), Se = m(() => {
156
+ return ((t = a.value) == null ? void 0 : t.title) || ((o = d.params) != null && o.id ? r(e) : r("cms.articles.createArticle"));
157
+ }), Se = v(() => {
158
158
  var s, c, l;
159
- const e = ((s = d.params) == null ? void 0 : s.collection) || ((c = d.params) == null ? void 0 : c.id), t = (l = d.params) == null ? void 0 : l.id, o = Te.value, n = o === ee.value, a = [
159
+ const e = ((s = d.params) == null ? void 0 : s.collection) || ((c = d.params) == null ? void 0 : c.id), t = (l = d.params) == null ? void 0 : l.id, o = Te.value, n = o === ee.value, i = [
160
160
  {
161
161
  label: P.value ? r("cms.navigation.singletons") : ee.value,
162
162
  route: `collections/${e}`
163
163
  }
164
164
  ];
165
- return t ? a.push({
165
+ return t ? i.push({
166
166
  label: n ? r("cms.collections.edit") : o,
167
167
  route: `collections/${e}/${t}`
168
- }) : a.push({
168
+ }) : i.push({
169
169
  label: r("cms.articles.createArticle"),
170
170
  route: `collections/${e}/create`
171
- }), a;
171
+ }), i;
172
172
  }), Ae = (e) => {
173
- e === "collections" ? A.push("/collections") : A.push(`/${e}`);
173
+ e === "collections" ? T.push("/collections") : T.push(`/${e}`);
174
174
  }, te = async (e, t) => {
175
175
  var o, n;
176
176
  try {
177
177
  if (!t || !e)
178
178
  return;
179
- const a = await fetch(`/api/cms/${e}/${t}`);
180
- if (!a.ok)
179
+ const i = await fetch(`/api/cms/${e}/${t}`);
180
+ if (!i.ok)
181
181
  throw new Error("Failed to fetch article");
182
- const s = await a.json();
183
- if (_.value = (s == null ? void 0 : s.columns) || [], s != null && s.preview_path && (D.value = s == null ? void 0 : s.preview_path), J.value = (s == null ? void 0 : s.type) || null, s.rows) {
182
+ const s = await i.json();
183
+ if (_.value = (s == null ? void 0 : s.columns) || [], s != null && s.preview_path && (s == null ? void 0 : s.type) !== "single" && (R.value = s == null ? void 0 : s.preview_path), F.value = (s == null ? void 0 : s.type) || null, s.rows) {
184
184
  let c = s.rows;
185
- Array.isArray(c) || (c = [c]), i.value = c[0];
185
+ Array.isArray(c) || (c = [c]), a.value = c[0];
186
186
  const l = ((o = c[0]) == null ? void 0 : o.content_type_id) || e;
187
187
  if (l) {
188
188
  const w = await fetch(`/api/cms-type/${l}`);
189
189
  if (w.ok) {
190
- const f = await w.json();
191
- L.value = (f == null ? void 0 : f.title) || (f == null ? void 0 : f.name) || L.value;
190
+ const g = await w.json();
191
+ L.value = (g == null ? void 0 : g.title) || (g == null ? void 0 : g.name) || L.value;
192
192
  }
193
193
  }
194
- await ce(), (n = c[0]) != null && n.meta ? g.value = { ...c[0].meta } : g.value = {
194
+ await ce(), (n = c[0]) != null && n.meta ? b.value = { ...c[0].meta } : b.value = {
195
195
  title: "",
196
196
  description: "",
197
197
  keywords: "",
198
198
  meta: {}
199
199
  };
200
200
  } else
201
- i.value = s, await ce(), s != null && s.meta ? (g.value = {
201
+ a.value = s, await ce(), s != null && s.meta ? (b.value = {
202
202
  title: s.meta.title || "",
203
203
  description: s.meta.description || "",
204
204
  keywords: s.meta.keywords || "",
205
205
  meta: { ...s.meta }
206
- }, delete g.value.meta.title, delete g.value.meta.description, delete g.value.meta.keywords) : g.value = {
206
+ }, delete b.value.meta.title, delete b.value.meta.description, delete b.value.meta.keywords) : b.value = {
207
207
  title: "",
208
208
  description: "",
209
209
  keywords: "",
210
210
  meta: {}
211
211
  };
212
- } catch (a) {
213
- console.error("Error fetching article:", a);
212
+ } catch (i) {
213
+ console.error("Error fetching article:", i);
214
214
  }
215
215
  };
216
216
  Ie(async () => {
217
- var a, s;
218
- M.value = !0, L.value = "";
219
- const e = (a = d.params) == null ? void 0 : a.collection, t = (s = d.params) == null ? void 0 : s.id, o = e || t, n = e && t ? t : void 0;
217
+ var i, s;
218
+ D.value = !0, L.value = "";
219
+ const e = (i = d.params) == null ? void 0 : i.collection, t = (s = d.params) == null ? void 0 : s.id, o = e || t, n = e && t ? t : void 0;
220
220
  try {
221
221
  if (!n) {
222
222
  if (!o)
223
223
  return;
224
224
  const l = await (await fetch(`/api/cms/${o}/`)).json();
225
- _.value = l.columns, J.value = (l == null ? void 0 : l.type) || null;
225
+ _.value = l.columns, F.value = (l == null ? void 0 : l.type) || null;
226
226
  }
227
227
  await te(o, n ?? "");
228
228
  } finally {
229
- M.value = !1;
229
+ D.value = !1;
230
230
  }
231
231
  });
232
- const se = m({
232
+ const se = v({
233
233
  get: () => {
234
234
  var e;
235
- return ((e = i.value) == null ? void 0 : e.is_pin) || !1;
235
+ return ((e = a.value) == null ? void 0 : e.is_pin) || !1;
236
236
  },
237
237
  set: (e) => {
238
- i.value && (i.value.is_pin = e);
238
+ a.value && (a.value.is_pin = e);
239
239
  }
240
240
  }), Ve = () => {
241
- i.value && (i.value.is_pin = !i.value.is_pin);
242
- }, H = m(() => {
241
+ a.value && (a.value.is_pin = !a.value.is_pin);
242
+ }, H = v(() => {
243
243
  var t;
244
- const e = (t = i.value) == null ? void 0 : t.content_type_id;
244
+ const e = (t = a.value) == null ? void 0 : t.content_type_id;
245
245
  return e ? `/collections/${e}/edit` : null;
246
246
  }), je = () => {
247
- var o, n, a, s;
247
+ var o, n, i, s;
248
248
  if (!H.value)
249
249
  return;
250
- const e = ((o = d.params) == null ? void 0 : o.collection) || ((n = d.params) == null ? void 0 : n.id), t = (a = d.params) == null ? void 0 : a.id;
250
+ const e = ((o = d.params) == null ? void 0 : o.collection) || ((n = d.params) == null ? void 0 : n.id), t = (i = d.params) == null ? void 0 : i.id;
251
251
  if (e && t) {
252
- A.push(`/collections/${(s = i.value) == null ? void 0 : s.content_type_id}/edit`);
252
+ T.push(`/collections/${(s = a.value) == null ? void 0 : s.content_type_id}/edit`);
253
253
  return;
254
254
  }
255
- A.push(H.value);
255
+ T.push(H.value);
256
256
  }, ze = async () => {
257
257
  var o, n;
258
258
  const e = (o = d.params) == null ? void 0 : o.collection, t = (n = d.params) == null ? void 0 : n.id;
@@ -273,8 +273,8 @@ const Xe = [
273
273
  z.value = !1;
274
274
  }
275
275
  }, Le = async (e) => {
276
- var c, l, w, f;
277
- const t = (c = d.params) == null ? void 0 : c.collection, o = (l = d.params) == null ? void 0 : l.id, n = await I.value.validate();
276
+ var c, l, w, g;
277
+ const t = (c = d.params) == null ? void 0 : c.collection, o = (l = d.params) == null ? void 0 : l.id, n = await N.value.validate();
278
278
  if (n) {
279
279
  B({
280
280
  title: r("cms.validation"),
@@ -283,47 +283,51 @@ const Xe = [
283
283
  });
284
284
  return;
285
285
  }
286
- (w = N.value) != null && w.restoreTagsBeforeSubmit && await N.value.restoreTagsBeforeSubmit();
287
- const a = g.value || {}, s = {
288
- ...i.value,
286
+ (w = M.value) != null && w.restoreTagsBeforeSubmit && await M.value.restoreTagsBeforeSubmit();
287
+ const i = b.value || {}, s = {
288
+ ...a.value,
289
289
  meta: {
290
- ...a,
291
- ...a.meta || {}
290
+ ...i,
291
+ ...i.meta || {}
292
292
  }
293
293
  };
294
294
  console.log("Payload before submit:", s);
295
295
  try {
296
- const b = await fetch(`/api/cms/${t}/${o || ""}`, {
296
+ const y = await fetch(`/api/cms/${t}/${o || ""}`, {
297
297
  method: o ? "PUT" : "POST",
298
298
  headers: {
299
299
  "Content-Type": "application/json"
300
300
  },
301
301
  body: JSON.stringify(s)
302
302
  });
303
- if (!b.ok) {
304
- let y;
303
+ if (!o && y.ok) {
304
+ const m = await y.json();
305
+ T.push(`/collections/${t}/${m == null ? void 0 : m.id}`);
306
+ }
307
+ if (!y.ok) {
308
+ let m;
305
309
  try {
306
- const T = await b.json();
307
- y = JSON.stringify(T, null, 2);
310
+ const S = await y.json();
311
+ m = JSON.stringify(S, null, 2);
308
312
  } catch {
309
- y = await b.text();
313
+ m = await y.text();
310
314
  }
311
- throw new Error(`HTTP ${b.status}: ${y}`);
315
+ throw new Error(`HTTP ${y.status}: ${m}`);
312
316
  }
313
317
  if (!o)
314
318
  try {
315
- const y = await b.json(), T = y.id || ((f = y.data) == null ? void 0 : f.id);
316
- T && d.name === "createArticle" && await A.push(`/collections/${t}/${T}`);
317
- } catch (y) {
318
- console.warn("Could not parse response to get ID:", y);
319
+ const m = await y.json(), S = m.id || ((g = m.data) == null ? void 0 : g.id);
320
+ S && d.name === "createArticle" && await T.push(`/collections/${t}/${S}`);
321
+ } catch (m) {
322
+ console.warn("Could not parse response to get ID:", m);
319
323
  }
320
324
  B({
321
325
  title: r("cms.common.success"),
322
326
  message: r("cms.common.successMessage"),
323
327
  type: "success"
324
328
  });
325
- } catch (b) {
326
- console.error("Submit error:", b), B({
329
+ } catch (y) {
330
+ console.error("Submit error:", y), B({
327
331
  title: r("cms.common.error"),
328
332
  message: "Помилка збереження",
329
333
  type: "error"
@@ -331,31 +335,31 @@ const Xe = [
331
335
  }
332
336
  };
333
337
  return (e, t) => {
334
- var o, n, a, s, c;
338
+ var o, n, i, s, c;
335
339
  return h(), $("div", Ye, [
336
340
  u("div", Ze, [
337
- C(p(be), {
341
+ C(f(be), {
338
342
  items: Se.value,
339
- loading: M.value,
343
+ loading: D.value,
340
344
  onNavigate: Ae
341
345
  }, null, 8, ["items", "loading"]),
342
346
  u("div", et, [
343
347
  u("div", tt, [
344
348
  u("button", {
345
- onClick: t[0] || (t[0] = (l) => p(A).back()),
349
+ onClick: t[0] || (t[0] = (l) => f(T).back()),
346
350
  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"
347
351
  }, [
348
- C(p(Oe), { class: "w-5 h-5" })
352
+ C(f(Oe), { class: "w-5 h-5" })
349
353
  ]),
350
354
  u("h1", st, j(e.$t(
351
355
  P.value ? "cms.builder.editPage" : "cms.builder.editCollection"
352
- )) + ' "' + j(i.value.title) + '" ', 1),
356
+ )) + ' "' + j(a.value.title) + '" ', 1),
353
357
  u("a", {
354
- href: `https://cms.opengis.info/${p(G)}/guides/content/`,
358
+ href: `https://cms.opengis.info/${f(G)}/guides/content/`,
355
359
  target: "_blank",
356
360
  title: e.$t("cms.guide.content")
357
361
  }, [
358
- C(p(Je), { class: "w-5 h-5" })
362
+ C(f(Je), { class: "w-5 h-5" })
359
363
  ], 8, ot)
360
364
  ]),
361
365
  u("div", lt, [
@@ -367,46 +371,46 @@ const Xe = [
367
371
  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",
368
372
  "aria-label": "$t('cms.builder.editContentType')"
369
373
  }, [
370
- C(p(He), { class: "w-4 h-4" })
371
- ], 8, nt)) : S("", !0),
374
+ C(f(He), { class: "w-4 h-4" })
375
+ ], 8, nt)) : A("", !0),
372
376
  u("button", {
373
377
  onClick: Le,
374
378
  type: "submit",
375
379
  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"
376
380
  }, [
377
- C(p(Ke), { class: "w-4 h-4 mr-2" }),
381
+ C(f(Ke), { class: "w-4 h-4 mr-2" }),
378
382
  ne(" " + j(e.$t("cms.builder.save")), 1)
379
383
  ])
380
384
  ])
381
385
  ]),
382
- u("div", at, [
383
- u("div", it, [
384
- (h(!0), $(Ne, null, De(Ce.value, (l) => (h(), $("button", {
386
+ u("div", it, [
387
+ u("div", at, [
388
+ (h(!0), $(Ne, null, Me(Ce.value, (l) => (h(), $("button", {
385
389
  key: l.id,
386
390
  onClick: (w) => {
387
391
  V.value = l.id, console.log("cmsSettings:", E.value.value);
388
392
  },
389
- class: ae([
393
+ class: ie([
390
394
  "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",
391
395
  l.id === V.value ? "bg-blue-50 text-blue-700 border-blue-200" : ""
392
396
  ])
393
397
  }, j(l.name), 11, rt))), 128))
394
398
  ]),
395
399
  u("div", ct, [
396
- (o = p(d).params) != null && o.id && xe.value ? (h(), $("button", {
400
+ (o = f(d).params) != null && o.id && xe.value ? (h(), $("button", {
397
401
  key: 0,
398
402
  type: "button",
399
403
  class: "inline-flex items-center justify-center gap-2 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 disabled:opacity-50 disabled:cursor-not-allowed",
400
404
  disabled: z.value,
401
405
  onClick: ze
402
406
  }, [
403
- z.value ? (h(), ie(p(qe), {
407
+ z.value ? (h(), ae(f(qe), {
404
408
  key: 0,
405
409
  class: "w-4 h-4 animate-spin shrink-0",
406
410
  "aria-hidden": "true"
407
- })) : S("", !0),
411
+ })) : A("", !0),
408
412
  ne(" " + j(z.value ? e.$t("cms.collections.translating") : e.$t("cms.collections.enLocalization")), 1)
409
- ], 8, ut)) : S("", !0),
413
+ ], 8, ut)) : A("", !0),
410
414
  u("div", dt, [
411
415
  u("label", mt, j(e.$t("cms.collections.pinPublication")), 1),
412
416
  u("div", vt, [
@@ -416,22 +420,22 @@ const Xe = [
416
420
  "onUpdate:modelValue": t[1] || (t[1] = (l) => se.value = l),
417
421
  class: "sr-only"
418
422
  }, null, 512), [
419
- [Me, se.value]
423
+ [Re, se.value]
420
424
  ]),
421
425
  u("div", {
422
- class: ae([
426
+ class: ie([
423
427
  "w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",
424
- (n = i.value) != null && n.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"
428
+ (n = a.value) != null && n.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"
425
429
  ]),
426
430
  onClick: Ve
427
431
  }, [
428
- (a = i.value) != null && a.is_pin ? (h(), $("svg", pt, [...t[7] || (t[7] = [
432
+ (i = a.value) != null && i.is_pin ? (h(), $("svg", pt, [...t[7] || (t[7] = [
429
433
  u("path", {
430
434
  "fill-rule": "evenodd",
431
435
  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",
432
436
  "clip-rule": "evenodd"
433
437
  }, null, -1)
434
- ])])) : S("", !0)
438
+ ])])) : A("", !0)
435
439
  ], 2)
436
440
  ])
437
441
  ])
@@ -439,42 +443,42 @@ const Xe = [
439
443
  ])
440
444
  ]),
441
445
  q(u("div", ft, [
442
- (s = Z.value) != null && s.length ? (h(), ie(p(ue), {
446
+ (s = Z.value) != null && s.length ? (h(), ae(f(ue), {
443
447
  key: 0,
444
- modelValue: i.value,
445
- "onUpdate:modelValue": t[2] || (t[2] = (l) => i.value = l),
448
+ modelValue: a.value,
449
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => a.value = l),
446
450
  schema: _e.value,
447
- form: I.value,
448
- "onUpdate:form": t[3] || (t[3] = (l) => I.value = l)
449
- }, null, 8, ["modelValue", "schema", "form"])) : S("", !0)
451
+ form: N.value,
452
+ "onUpdate:form": t[3] || (t[3] = (l) => N.value = l)
453
+ }, null, 8, ["modelValue", "schema", "form"])) : A("", !0)
450
454
  ], 512), [
451
455
  [re, V.value === "content"]
452
456
  ]),
453
- q(u("div", yt, [
454
- C(p(ue), {
457
+ q(u("div", gt, [
458
+ C(f(ue), {
455
459
  schema: $e.value,
456
- values: g.value,
457
- "onUpdate:values": t[4] || (t[4] = (l) => g.value = l),
460
+ values: b.value,
461
+ "onUpdate:values": t[4] || (t[4] = (l) => b.value = l),
458
462
  form: W.value,
459
463
  "onUpdate:form": t[5] || (t[5] = (l) => W.value = l)
460
464
  }, null, 8, ["schema", "values", "form"])
461
465
  ], 512), [
462
466
  [re, V.value === "seo"]
463
467
  ]),
464
- V.value === "tags" ? (h(), $("div", gt, [
465
- C(p(ye), {
468
+ V.value === "tags" ? (h(), $("div", yt, [
469
+ C(f(ge), {
466
470
  ref_key: "tagsForm",
467
- ref: N,
468
- modelValue: i.value,
469
- "onUpdate:modelValue": t[6] || (t[6] = (l) => i.value = l)
471
+ ref: M,
472
+ modelValue: a.value,
473
+ "onUpdate:modelValue": t[6] || (t[6] = (l) => a.value = l)
470
474
  }, null, 8, ["modelValue"])
471
- ])) : S("", !0),
475
+ ])) : A("", !0),
472
476
  V.value === "preview" ? (h(), $("div", bt, [
473
- C(p(ge), {
474
- slug: (c = i.value) == null ? void 0 : c.slug,
475
- preview_path: D.value
477
+ C(f(ye), {
478
+ slug: (c = a.value) == null ? void 0 : c.slug,
479
+ preview_path: R.value
476
480
  }, null, 8, ["slug", "preview_path"])
477
- ])) : S("", !0)
481
+ ])) : A("", !0)
478
482
  ]);
479
483
  };
480
484
  }
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { useRoute as $, routeLocationKey as K } from "vue-router";
3
3
  const O = "menu", B = (s, c, a) => {
4
4
  const o = s == null ? void 0 : s.trim(), l = a == null ? void 0 : a.trim();
5
5
  return o ? o === O ? c ? c === "create" ? { type: "createMenu", collection: o } : { type: "editMenu", collection: o, id: c } : { type: "menu", collection: o } : l === "edit" && c ? { type: "editCollection", collection: o, id: c } : c === "edit" ? { type: "editCollection", collection: o } : c ? c === "create" ? { type: "createArticle", collection: o } : { type: "editArticle", collection: o, id: c } : { type: "articles", collection: o } : { type: "collections" };
6
- }, R = u(() => import("./CollectionsPage-DHfPNql6.js")), L = u(() => import("./ArticlesPage-BjYzvTWM.js")), C = u(() => import("./contentForm-CELj2rGf.js")), N = u(() => import("./EditCollectionPage-CzFBw3wE.js")), W = u(
6
+ }, R = u(() => import("./CollectionsPage-DHfPNql6.js")), L = u(() => import("./ArticlesPage-BjYzvTWM.js")), C = u(() => import("./contentForm-B1dkU7ip.js")), N = u(() => import("./EditCollectionPage-D4lwoeG0.js")), W = u(
7
7
  () => import("./MenuPage-3W6jZ15H.js")
8
8
  ), j = u(
9
9
  () => import("./MenuItemPage-B7Y9KFyb.js")
@@ -1,7 +1,7 @@
1
1
  import { ref as c, useModel as n, computed as d, openBlock as u, createElementBlock as _, createBlock as v, unref as g, createCommentVNode as k } from "vue";
2
2
  import { _ as V, g as $ } from "./vs-form-custom-datatable-D880w8gx.js";
3
3
  import { inputs as e, VForm as h } from "@opengis/form";
4
- import x from "./vs-form-reference-list-DukrxeuH.js";
4
+ import x from "./vs-form-reference-list-Cf3B1AQM.js";
5
5
  import { _ as B } from "./vs-form-tiptap.vue_vue_type_script_setup_true_lang-DGgsqXwg.js";
6
6
  import r from "./vs-form-media-select-NY27EaG1.js";
7
7
  import { _ as M } from "./vs-richtext-md.vue_vue_type_script_setup_true_lang-Ct8uTV-J.js";