@opengis/cms 0.0.54 → 0.0.56

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.
Files changed (31) hide show
  1. package/README.md +57 -24
  2. package/dist/{ArticlesPage-Cuit_90w.js → ArticlesPage-BcR1hbds.js} +3 -3
  3. package/dist/{BuilderPage-B79YHrmr.js → BuilderPage-CK_osM89.js} +51 -51
  4. package/dist/{CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-B6irHMzL.js → CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js} +19 -19
  5. package/dist/{EditCollectionPage-CAVLcvLg.js → EditCollectionPage-Cw3GQYRe.js} +2 -2
  6. package/dist/{MenuAddPage-CmU4kAUM.js → MenuAddPage-Bf48Z-ah.js} +1 -1
  7. package/dist/{MenuItemPage-UV8JlJvT.js → MenuItemPage-CXn5HC8j.js} +113 -112
  8. package/dist/{MenuPage-c4TPJgIN.js → MenuPage-tJZtK46W.js} +1 -1
  9. package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.js +84 -0
  10. package/dist/{UniversalTable.vue_vue_type_script_setup_true_lang-DR4PQwqR.js → UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js} +80 -80
  11. package/dist/{UniversalTablePagination.vue_vue_type_script_setup_true_lang-C8P9DCeX.js → UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js} +46 -46
  12. package/dist/{contentForm-BQdeYVFh.js → contentForm-B6gHgGkz.js} +1 -1
  13. package/dist/index.js +5 -5
  14. package/dist/style.css +1 -1
  15. package/package.json +68 -68
  16. package/server/functions/getContent.js +3 -3
  17. package/server/functions/getSearchData.js +1 -1
  18. package/server/migrations/site.sql +2 -2
  19. package/server/routes/cms/controllers/getContent.js +6 -4
  20. package/server/routes/cms/controllers/getPermissions.js +15 -15
  21. package/server/routes/cms/controllers/setPermissions.js +49 -49
  22. package/server/routes/cms/controllers/updateContent.js +27 -1
  23. package/server/routes/cms/functions/getSettings.js +1 -1
  24. package/server/routes/cms/utils/getSingle.js +6 -10
  25. package/server/routes/contentType/controllers/editContentType.js +29 -9
  26. package/server/routes/contentType/controllers/getContentType.js +13 -0
  27. package/server/routes/contentType/utils/updateContents.js +16 -0
  28. package/server/routes/menu/controllers/getMenu.js +2 -2
  29. package/server/routes/menu/functions/getMenu.js +3 -3
  30. package/server/templates/select/core.user_mentioned.sql +1 -1
  31. package/dist/MonacoEditor.vue_vue_type_script_setup_true_lang-C8cip9Ci.js +0 -84
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  This package standardizes static website content management process. Built using the **Fastify** and **Vite** frameworks for reactive, component-driven development.
10
10
 
11
- ### Features
11
+ ## Features
12
12
 
13
13
  - **Real-time Editing** - Update content without stopping or reloading the website.
14
14
  - **Page Templates** - Use pre-created templates to quickly start your website.
@@ -16,43 +16,76 @@ This package standardizes static website content management process. Built using
16
16
  - **Multi-user mode** - Work together with a team on content in real time.
17
17
  - **User Settings** - Includes functionality for managing user settings, creating user groups, and defining roles with interface permissions.
18
18
 
19
- ---
20
-
21
- ### Install
19
+ ## Install
22
20
 
23
21
  ```bash
24
22
  npm i @opengis/cms
25
23
  ```
26
24
 
27
- ### Configuration
25
+ ## Usage Astro
28
26
 
29
- Configure **pg**, **redis** and **s3** connections in `.env` file
27
+ ```js
28
+ ---
29
+ import Layout from "@/layouts/Layout.astro";
30
30
 
31
- ```bash
32
- node --env-file=.env.ip server
33
- bun --env-file=.env.ip server
34
- pm2 start server --name api -- --env-file=.env.ip
35
- pm2
31
+ // get posts
32
+ import { getContents } from "@/utils/cms";
33
+ const postsData = await getContents({ collection: "posts"});
34
+ const { lang } = Astro.params;
35
+ ---
36
+
37
+ <Layout
38
+ title={lang === "uk" ? "Про нас" : "About us"}
39
+ >
40
+ { postsData }
41
+ </Layout>
36
42
  ```
37
43
 
38
- ### Usage
44
+ ## Usage CMS
39
45
 
40
46
  ```js
41
- import { getContents } from "@/utils/cms";
47
+ // main.ts
48
+ app.config.globalProperties.$settings = {
49
+ cms: {
50
+ locale: 'uk', // мова сайту по замовчуванню
51
+ locales: ['uk', 'en'], // доступні варіанти перекладу
52
+ previewUrl: 'http://site.ua' // адреса перегляду контенту з редактора
53
+ }
54
+ };
55
+ ```
42
56
 
43
- // Get posts from API
44
- let postsData = await getContents("posts");
57
+ ```js
58
+ // router.config
59
+ export default [
60
+ {
61
+ path: '/cms.dashboard',
62
+ component: () => import('@opengis/cms').then(el => el.Dashboard),
63
+ },
64
+ {
65
+ path: '/cms.content/:type?/:id?',
66
+ component: () => import('@opengis/cms').then(el => el.Contnet),
67
+ },
68
+ {
69
+ path: '/cms.menu/:id?',
70
+ component: () => import('@opengis/cms').then(el => el.Menu),
71
+ },
72
+ ]
45
73
  ```
74
+ ## Start
46
75
 
47
- ---
76
+ Configure **pg**, **redis** and **s3** connections in `.env` file
48
77
 
49
- ### Documentation
78
+ ```bash
79
+ node --env-file=.env.ip server
80
+ bun --env-file=.env.ip server
81
+ pm2 start server --name api -- --env-file=.env.ip
82
+ ```
50
83
 
51
- For a detailed understanding of `cms`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/cms/).
84
+ ## Documentation
52
85
 
53
- ---
86
+ For a detailed understanding of `cms`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/cms/).
54
87
 
55
- ### Technology stack
88
+ ## Technology stack
56
89
 
57
90
  <a href="https://fastify.dev/" target="_blank">
58
91
  <img src="https://img.shields.io/badge/Fastify-323330?style=for-the-badge&logo=fastify" /></a>
@@ -72,9 +105,9 @@ For a detailed understanding of `cms`, its features, and how to use them, refer
72
105
  <a href="https://nodejs.org/" target="_blank">
73
106
  <img src="https://img.shields.io/badge/Node.js-323330?style=for-the-badge&logo=node.js&logoColor=white" /></a>
74
107
 
75
- ---
76
108
 
77
- ### Contribute
109
+
110
+ ## Contribute
78
111
 
79
112
  Feel free to contact us through our website [SOFTPRO.UA](https://softpro.ua) or email <info@softpro.ua>
80
113
 
@@ -82,7 +115,7 @@ Feel free to contact us through our website [SOFTPRO.UA](https://softpro.ua) or
82
115
  - Share your ideas
83
116
  - Ask questions
84
117
 
85
- ### Follow Us
118
+ ## Follow Us
86
119
 
87
120
  [Official site](https://softpro.ua)
88
121
 
@@ -93,6 +126,6 @@ Feel free to contact us through our website [SOFTPRO.UA](https://softpro.ua) or
93
126
  <a href="https://www.linkedin.com/in/softpro-ukraine-a8876b282/recent-activity/all/" target="_blank"><img src="https://cdn.softpro.ua/data/npm/social/linkedin.png" alt="Softpro Linkedin" title="Softpro LinkedIn"></a>&nbsp;&nbsp;
94
127
  </p>
95
128
 
96
- ### License
129
+ ## License
97
130
 
98
131
  Copyright © SOFTPRO. All rights reserved.
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as te, ref as n, inject as ae, computed as I, onMounted as se, watch as D, nextTick as M, openBlock as i, createElementBlock as d, createVNode as _, createElementVNode as r, toDisplayString as h, unref as b, createTextVNode as le, createCommentVNode as f, createBlock as q } from "vue";
2
2
  import { useRoute as ne, useRouter as oe } from "vue-router";
3
3
  import { HelpCircle as ie, Plus as re, ChevronDown as ce, Calendar as R, User as ue, Globe as me, FileText as de } from "lucide-vue-next";
4
- import { _ as pe } from "./UniversalTable.vue_vue_type_script_setup_true_lang-DR4PQwqR.js";
5
- import { _ as fe } from "./UniversalTablePagination.vue_vue_type_script_setup_true_lang-C8P9DCeX.js";
4
+ import { _ as pe } from "./UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js";
5
+ import { _ as fe } from "./UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js";
6
6
  import { VsInputCheckbox as ve } from "@opengis/form";
7
7
  import he from "@opengis/filter";
8
8
  import { confirm as S } from "@opengis/core";
9
9
  import { useI18n as be } from "vue-i18n";
10
10
  import { _ as ge } from "./EmptyData-DaZt_nAm.js";
11
- import { _ as ye } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-B6irHMzL.js";
11
+ import { _ as ye } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-CnOe9ORD.js";
12
12
  const we = { class: "space-y-6 mx-auto max-w-[90%]" }, xe = { class: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" }, _e = { class: "flex items-center gap-2" }, ke = { class: "text-3xl font-bold text-slate-800 dark:text-white mb-2" }, Ce = ["href", "title"], $e = { class: "flex items-center gap-2" }, Ae = {
13
13
  key: 0,
14
14
  class: "text-card-foreground shadow-lg border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"
@@ -3,22 +3,22 @@ import { _ as pe } from "./CreateForm-BMOBeP4G.js";
3
3
  import { useRouter as ge } from "vue-router";
4
4
  import { File as fe, Layers as H, Edit as G, Trash2 as me, List as K, HelpCircle as W, XCircle as be, CheckCircle as xe, Search as ve } from "lucide-vue-next";
5
5
  import { useI18n as we } from "vue-i18n";
6
- import { _ as ke } from "./UniversalTable.vue_vue_type_script_setup_true_lang-DR4PQwqR.js";
7
- import { _ as ye } from "./UniversalTablePagination.vue_vue_type_script_setup_true_lang-C8P9DCeX.js";
6
+ import { _ as ke } from "./UniversalTable.vue_vue_type_script_setup_true_lang-CJGTsd1V.js";
7
+ import { _ as ye } from "./UniversalTablePagination.vue_vue_type_script_setup_true_lang-GYZd_gkA.js";
8
8
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  let _e;
10
10
  function $e() {
11
11
  return _e;
12
12
  }
13
13
  J[0];
14
- function Ce(s) {
15
- return typeof s == "function" ? s() : i(s);
14
+ function Ce(o) {
15
+ return typeof o == "function" ? o() : i(o);
16
16
  }
17
- function U(s) {
18
- if (s instanceof Promise || s instanceof Date || s instanceof RegExp)
19
- return s;
20
- const e = Ce(s);
21
- if (!s || !e)
17
+ function U(o) {
18
+ if (o instanceof Promise || o instanceof Date || o instanceof RegExp)
19
+ return o;
20
+ const e = Ce(o);
21
+ if (!o || !e)
22
22
  return e;
23
23
  if (Array.isArray(e))
24
24
  return e.map((r) => U(r));
@@ -40,20 +40,20 @@ const Ve = "usehead", O = typeof globalThis < "u" ? globalThis : typeof window <
40
40
  function je() {
41
41
  if (R in O)
42
42
  return O[R]();
43
- const s = Q(Ve);
44
- return !s && process.env.NODE_ENV !== "production" && console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."), s || $e();
43
+ const o = Q(Ve);
44
+ return !o && process.env.NODE_ENV !== "production" && console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."), o || $e();
45
45
  }
46
- function De(s, e = {}) {
46
+ function De(o, e = {}) {
47
47
  const r = e.head || je();
48
48
  if (r)
49
- return r.ssr ? r.push(s, e) : Ee(r, s, e);
49
+ return r.ssr ? r.push(o, e) : Ee(r, o, e);
50
50
  }
51
- function Ee(s, e, r = {}) {
51
+ function Ee(o, e, r = {}) {
52
52
  const n = f(!1), h = f({});
53
53
  Y(() => {
54
54
  h.value = n.value ? {} : U(e);
55
55
  });
56
- const b = s.push(h.value, r);
56
+ const b = o.push(h.value, r);
57
57
  return M(h, (a) => {
58
58
  b.patch(a);
59
59
  }), Z() && (ee(() => {
@@ -64,11 +64,11 @@ function Ee(s, e, r = {}) {
64
64
  n.value = !1;
65
65
  })), b;
66
66
  }
67
- function Me(s, e = 300) {
68
- const r = f(s.value);
67
+ function Me(o, e = 300) {
68
+ const r = f(o.value);
69
69
  let n;
70
70
  return M(
71
- s,
71
+ o,
72
72
  (h) => {
73
73
  clearTimeout(n), n = setTimeout(() => {
74
74
  r.value = h;
@@ -88,7 +88,7 @@ const Te = {}, Se = {
88
88
  "stroke-linecap": "round",
89
89
  "stroke-linejoin": "round"
90
90
  };
91
- function Ie(s, e) {
91
+ function Ie(o, e) {
92
92
  return u(), C("svg", Se, [...e[0] || (e[0] = [
93
93
  q('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>', 6)
94
94
  ])]);
@@ -102,7 +102,7 @@ const Ne = /* @__PURE__ */ X(Te, [["render", Ie]]), Be = {}, He = {
102
102
  "stroke-linecap": "round",
103
103
  "stroke-linejoin": "round"
104
104
  };
105
- function Ue(s, e) {
105
+ function Ue(o, e) {
106
106
  return u(), C("svg", He, [...e[0] || (e[0] = [
107
107
  q('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>', 5)
108
108
  ])]);
@@ -116,9 +116,9 @@ const Ae = /* @__PURE__ */ X(Be, [["render", Ue]]), Fe = { class: "grid grid-col
116
116
  onDelete: { type: Function }
117
117
  },
118
118
  emits: ["edit", "view", "delete"],
119
- setup(s, { emit: e }) {
119
+ setup(o, { emit: e }) {
120
120
  f(!1), f(null);
121
- const r = s, n = e, h = (a, g) => {
121
+ const r = o, n = e, h = (a, g) => {
122
122
  switch (a) {
123
123
  case "edit":
124
124
  n("edit", g), r.onEdit && r.onEdit(g);
@@ -131,7 +131,7 @@ const Ae = /* @__PURE__ */ X(Be, [["render", Ue]]), Fe = { class: "grid grid-col
131
131
  break;
132
132
  }
133
133
  }, b = (a) => {
134
- const g = /* @__PURE__ */ new Date(), o = new Date(a), y = g.getTime() - o.getTime(), m = Math.floor(y / 1e3), d = Math.floor(m / 60), k = Math.floor(d / 60), v = Math.floor(k / 24), V = Math.floor(v / 7);
134
+ const g = /* @__PURE__ */ new Date(), s = new Date(a), y = g.getTime() - s.getTime(), m = Math.floor(y / 1e3), d = Math.floor(m / 60), k = Math.floor(d / 60), v = Math.floor(k / 24), V = Math.floor(v / 7);
135
135
  return V >= 2 ? `${V} weeks ago` : V === 1 ? "1 week ago" : v >= 2 ? `${v} days ago` : v === 1 ? "1 day ago" : k >= 2 ? `${k} hours ago` : k === 1 ? "1 hour ago" : d >= 2 ? `${d} minutes ago` : d === 1 ? "1 minute ago" : "just now";
136
136
  }, x = (a) => {
137
137
  switch (a) {
@@ -162,67 +162,67 @@ const Ae = /* @__PURE__ */ X(Be, [["render", Ue]]), Fe = { class: "grid grid-col
162
162
  }
163
163
  };
164
164
  return (a, g) => (u(), C("div", Fe, [
165
- (u(!0), C(se, null, re(a.collections, (o) => {
165
+ (u(!0), C(se, null, re(o.collections, (s) => {
166
166
  var y, m, d;
167
167
  return u(), C("div", {
168
- key: o.id,
168
+ key: s.id,
169
169
  class: "rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:bg-slate-50"
170
170
  }, [
171
171
  t("div", Le, [
172
- o.type === "single" ? (u(), j(i(fe), {
172
+ s.type === "single" ? (u(), j(i(fe), {
173
173
  key: 0,
174
174
  class: "shrink-0 lucide lucide-page w-5 h-5 text-blue-600"
175
175
  })) : (u(), j(i(H), {
176
176
  key: 1,
177
177
  class: "shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"
178
178
  })),
179
- t("p", Pe, p(o.title), 1),
180
- x(o.status) ? (u(), C("div", {
179
+ t("p", Pe, p(s.title), 1),
180
+ x(s.status) ? (u(), C("div", {
181
181
  key: 2,
182
- class: E(["whitespace-nowrap rounded-md border ml-auto 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", (y = x(o.status)) == null ? void 0 : y.classes])
182
+ class: E(["whitespace-nowrap rounded-md border ml-auto 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", (y = x(s.status)) == null ? void 0 : y.classes])
183
183
  }, [
184
- (u(), j(ne((m = x(o.status)) == null ? void 0 : m.icon), { class: "w-3 h-3 mr-1" })),
185
- le(" " + p((d = x(o.status)) == null ? void 0 : d.text), 1)
184
+ (u(), j(ne((m = x(s.status)) == null ? void 0 : m.icon), { class: "w-3 h-3 mr-1" })),
185
+ le(" " + p((d = x(s.status)) == null ? void 0 : d.text), 1)
186
186
  ], 2)) : T("", !0)
187
187
  ]),
188
188
  t("div", Ge, [
189
189
  t("p", {
190
190
  class: "text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",
191
- title: o.description
192
- }, p(o.description !== null ? o.description : "No description"), 9, Oe),
191
+ title: s.description
192
+ }, p(s.description !== null ? s.description : "No description"), 9, Oe),
193
193
  t("div", Re, [
194
194
  t("p", Qe, p(a.$t("cms.collections.entries")) + ":", 1),
195
- t("p", qe, p(o.entries), 1)
195
+ t("p", qe, p(s.entries), 1)
196
196
  ]),
197
197
  t("div", ze, [
198
198
  t("p", Ke, p(a.$t("cms.collections.fields")) + ":", 1),
199
- t("p", We, p(o.fields), 1)
199
+ t("p", We, p(s.fields), 1)
200
200
  ]),
201
201
  t("div", Xe, [
202
202
  t("p", Je, p(a.$t("cms.collections.lastModified")) + ":", 1),
203
- t("p", Ye, p(b(o.last_edit)), 1)
203
+ t("p", Ye, p(b(s.last_edit)), 1)
204
204
  ]),
205
205
  t("div", Ze, [
206
206
  ae(a.$slots, "actions", {
207
- collection: o,
207
+ collection: s,
208
208
  handleAction: h
209
209
  }, () => [
210
210
  t("button", {
211
211
  class: "inline-flex gap-1 items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-4/5 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-green-50 hover:border-green-300",
212
- onClick: N((k) => h("edit", o), ["stop"])
212
+ onClick: N((k) => h("edit", s), ["stop"])
213
213
  }, [
214
214
  w(i(G), { class: "text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50" }),
215
215
  t("span", tt, p(a.$t("cms.common.actions.edit")), 1)
216
216
  ], 8, et),
217
217
  t("button", {
218
- class: E([o.id === "pages" ? "disabled" : "", "inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),
219
- onClick: N((k) => o.id === "pages" ? null : h("delete", o), ["stop"])
218
+ class: E([s.id === "pages" ? "disabled" : "", "inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),
219
+ onClick: N((k) => s.id === "pages" ? null : h("delete", s), ["stop"])
220
220
  }, [
221
221
  w(i(me), { class: "text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-red-600 dark:group-hover:text-blue-50" })
222
222
  ], 10, ot),
223
223
  t("button", {
224
- class: E([o.type === "single" ? "disabled cursor-not-allowed" : "", "inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),
225
- onClick: N((k) => o.type === "single" ? null : h("view", o), ["stop"])
224
+ class: E([s.type === "single" ? "disabled cursor-not-allowed" : "", "inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),
225
+ onClick: N((k) => s.type === "single" ? null : h("view", s), ["stop"])
226
226
  }, [
227
227
  w(i(K), { class: "text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50" })
228
228
  ], 10, st)
@@ -234,8 +234,8 @@ const Ae = /* @__PURE__ */ X(Be, [["render", Ue]]), Fe = { class: "grid grid-col
234
234
  ]));
235
235
  }
236
236
  }), B = localStorage.getItem("collectionView"), S = f(B === "list" || B === "grid" ? B : "list");
237
- M(S, (s) => {
238
- localStorage.setItem("collectionView", s);
237
+ M(S, (o) => {
238
+ localStorage.setItem("collectionView", o);
239
239
  });
240
240
  function nt() {
241
241
  S.value = S.value === "grid" ? "list" : "grid";
@@ -248,7 +248,7 @@ function lt() {
248
248
  }
249
249
  const at = { class: "space-y-6 max-w-7xl mx-auto" }, it = { class: "flex items-center justify-between mb-8" }, dt = { class: "flex gap-4" }, ct = { class: "text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2" }, ut = { class: "text-slate-600 dark:text-slate-300" }, ht = ["href", "title"], pt = { class: "flex items-center gap-3" }, gt = { class: "relative" }, ft = { class: "absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none" }, mt = ["placeholder"], bt = { class: "flex items-center bg-white dark:bg-slate-700 border border-slate-200 dark:border-slate-600 rounded-lg p-1 max-w-[fit-content]" }, xt = ["onClick"], Dt = /* @__PURE__ */ z({
250
250
  __name: "BuilderPage",
251
- setup(s) {
251
+ setup(o) {
252
252
  const { t: e, locale: r } = we(), n = ge(), h = [
253
253
  { name: "name", title: e("cms.builder.collectionName"), type: "text", icon: H },
254
254
  { name: "title", title: e("cms.builder.title"), type: "text", icon: H },
@@ -261,10 +261,10 @@ const at = { class: "space-y-6 max-w-7xl mx-auto" }, it = { class: "flex items-c
261
261
  De({
262
262
  title: () => e("cms.collections.title") + " | CMS"
263
263
  });
264
- const a = f([]), g = Q("fetchContentTypes"), o = f(1), y = f(16), m = f(null), { collectionView: d, toggleCollectionView: k } = lt();
264
+ const a = f([]), g = Q("fetchContentTypes"), s = f(1), y = f(16), m = f(null), { collectionView: d, toggleCollectionView: k } = lt();
265
265
  async function v() {
266
266
  try {
267
- const l = x.value ? `&search=${encodeURIComponent(String(x.value))}` : "", c = `/api/cms-type?page=${o.value}&limit=${y.value}${l}`, _ = await fetch(c);
267
+ const l = x.value ? `&search=${encodeURIComponent(String(x.value))}` : "", c = `/api/cms-type?page=${s.value}&limit=${y.value}${l}`, _ = await fetch(c);
268
268
  if (!_.ok)
269
269
  throw new Error("Failed to fetch collections");
270
270
  const D = await _.json();
@@ -287,10 +287,10 @@ const at = { class: "space-y-6 max-w-7xl mx-auto" }, it = { class: "flex items-c
287
287
  }, I = (l) => {
288
288
  l.type === "single" ? n.push(`/collections/single/${l.name}`) : n.push(`/collections/${l.name}`);
289
289
  };
290
- return M(o, () => {
290
+ return M(s, () => {
291
291
  v();
292
292
  }), M(x, (l) => {
293
- console.log("Search query changed:", l), o.value = 1, v();
293
+ console.log("Search query changed:", l), s.value = 1, v();
294
294
  }), (l, c) => {
295
295
  var _, D, L, P;
296
296
  return u(), C("div", at, [
@@ -372,8 +372,8 @@ const at = { class: "space-y-6 max-w-7xl mx-auto" }, it = { class: "flex items-c
372
372
  key: 2,
373
373
  total: (D = m.value) == null ? void 0 : D.filtered,
374
374
  count: ((L = m.value) == null ? void 0 : L.count) || ((P = m.value) == null ? void 0 : P.total),
375
- page: o.value,
376
- "onUpdate:page": c[3] || (c[3] = ($) => o.value = $),
375
+ page: s.value,
376
+ "onUpdate:page": c[3] || (c[3] = ($) => s.value = $),
377
377
  limit: y.value
378
378
  }, null, 8, ["total", "count", "page", "limit"])) : T("", !0)
379
379
  ])
@@ -1,41 +1,41 @@
1
- import { defineComponent as p, openBlock as t, createElementBlock as s, createElementVNode as l, createVNode as b, unref as a, toDisplayString as r, createBlock as m, createCommentVNode as c, Fragment as d, renderList as h } from "vue";
2
- import { Layers as k, ChevronRight as u } from "lucide-vue-next";
3
- const x = { class: "flex items-center space-x-1 mb-4 overflow-hidden" }, g = { class: "truncate block max-w-[12rem]" }, f = ["onClick"], w = { class: "truncate block max-w-[20rem]" }, v = {
1
+ import { defineComponent as b, openBlock as e, createElementBlock as t, createElementVNode as l, createVNode as h, unref as r, toDisplayString as i, createBlock as m, createCommentVNode as d, Fragment as u, renderList as k } from "vue";
2
+ import { Layers as p, ChevronRight as x } from "lucide-vue-next";
3
+ const g = { class: "flex items-center space-x-1 mb-4 overflow-hidden" }, f = { class: "truncate block max-w-[12rem]" }, w = ["onClick"], v = { class: "truncate block max-w-[20rem]" }, y = {
4
4
  key: 1,
5
5
  class: "flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium text-slate-700 dark:text-slate-300 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis"
6
- }, _ = { class: "truncate block max-w-[20rem]" }, N = /* @__PURE__ */ p({
6
+ }, _ = { class: "truncate block max-w-[20rem]" }, N = /* @__PURE__ */ b({
7
7
  __name: "CollectionsBreadcrumb",
8
8
  props: {
9
9
  items: {}
10
10
  },
11
11
  emits: ["navigate"],
12
- setup(y) {
13
- return (e, i) => (t(), s("div", x, [
12
+ setup(s) {
13
+ return (a, c) => (e(), t("div", g, [
14
14
  l("button", {
15
15
  class: "flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis",
16
- onClick: i[0] || (i[0] = (n) => e.$emit("navigate", "collections"))
16
+ onClick: c[0] || (c[0] = (n) => a.$emit("navigate", "collections"))
17
17
  }, [
18
- b(a(k), { class: "w-3 h-3 flex-shrink-0" }),
19
- l("span", g, r(e.$t("cms.navigation.collections")), 1)
18
+ h(r(p), { class: "w-3 h-3 flex-shrink-0" }),
19
+ l("span", f, i(a.$t("cms.navigation.collections")), 1)
20
20
  ]),
21
- e.items.length > 0 ? (t(), m(a(u), {
21
+ s.items.length > 0 ? (e(), m(r(x), {
22
22
  key: 0,
23
23
  class: "w-3 h-3 text-slate-400 dark:text-slate-500 flex-shrink-0"
24
- })) : c("", !0),
25
- (t(!0), s(d, null, h(e.items, (n, o) => (t(), s(d, { key: o }, [
26
- o < e.items.length - 1 ? (t(), s("button", {
24
+ })) : d("", !0),
25
+ (e(!0), t(u, null, k(s.items, (n, o) => (e(), t(u, { key: o }, [
26
+ o < s.items.length - 1 ? (e(), t("button", {
27
27
  key: 0,
28
28
  class: "flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis",
29
- onClick: (C) => e.$emit("navigate", n.route)
29
+ onClick: (C) => a.$emit("navigate", n.route)
30
30
  }, [
31
- l("span", w, r(n.label), 1)
32
- ], 8, f)) : (t(), s("span", v, [
33
- l("span", _, r(n.label), 1)
31
+ l("span", v, i(n.label), 1)
32
+ ], 8, w)) : (e(), t("span", y, [
33
+ l("span", _, i(n.label), 1)
34
34
  ])),
35
- o < e.items.length - 1 ? (t(), m(a(u), {
35
+ o < s.items.length - 1 ? (e(), m(r(x), {
36
36
  key: 2,
37
37
  class: "w-3 h-3 text-slate-400 dark:text-slate-500 flex-shrink-0"
38
- })) : c("", !0)
38
+ })) : d("", !0)
39
39
  ], 64))), 128))
40
40
  ]));
41
41
  }
@@ -1,13 +1,13 @@
1
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, 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-C8cip9Ci.js";
3
+ import { _ as ae } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.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
8
  import { d as ve } from "./vuedraggable-CoAPPFYd.js";
9
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-Y5WXnRR0.js";
10
- import { _ as $e } from "./CollectionsBreadcrumb.vue_vue_type_script_setup_true_lang-B6irHMzL.js";
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",
13
13
  props: {
@@ -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-C8cip9Ci.js";
3
+ import { _ as w } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-B1DrxmQX.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";