lf-pagebuilder-vue 0.0.8 → 0.0.9
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/index.cjs +1 -1
- package/dist/index.js +490 -465
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, ref as C, computed as Y, createElementBlock as d, openBlock as i, createCommentVNode as S, createElementVNode as t, withModifiers as le, withDirectives as O, vModelText as Q, normalizeClass as G, toDisplayString as v, Fragment as A, renderList as
|
|
1
|
+
import { defineComponent as W, ref as C, computed as Y, createElementBlock as d, openBlock as i, createCommentVNode as S, createElementVNode as t, withModifiers as le, withDirectives as O, vModelText as Q, normalizeClass as G, toDisplayString as v, Fragment as A, renderList as V, vModelSelect as J, vModelCheckbox as ne, createBlock as ue, createTextVNode as E, unref as q, onMounted as ae, createVNode as L, watch as oe, nextTick as ve, withCtx as ce, vShow as xe, reactive as he } from "vue";
|
|
2
2
|
import { listComponents as we } from "libreria-astro-lefebvre";
|
|
3
3
|
import { QuillEditor as ye } from "@vueup/vue-quill";
|
|
4
4
|
import me from "vuedraggable";
|
|
@@ -32,43 +32,43 @@ const Ce = W({
|
|
|
32
32
|
setup(e) {
|
|
33
33
|
const o = e.renderApiDomain || "http://localhost:8003", b = C(""), $ = C(!1), p = C(!1), u = C(null), s = Y({
|
|
34
34
|
get() {
|
|
35
|
-
var g,
|
|
36
|
-
const P = (g = e.globalPageConfiguration) == null ? void 0 : g.find((
|
|
37
|
-
return ((
|
|
35
|
+
var g, n;
|
|
36
|
+
const P = (g = e.globalPageConfiguration) == null ? void 0 : g.find((a) => a.section === e.sectionSelected);
|
|
37
|
+
return ((n = P == null ? void 0 : P.config) == null ? void 0 : n.width) || "";
|
|
38
38
|
},
|
|
39
39
|
set(P) {
|
|
40
|
-
var
|
|
41
|
-
const g = (
|
|
40
|
+
var n;
|
|
41
|
+
const g = (n = e.globalPageConfiguration) == null ? void 0 : n.find((a) => a.section === e.sectionSelected);
|
|
42
42
|
g && (g.config || (g.config = {}), g.config.width = P);
|
|
43
43
|
}
|
|
44
44
|
}), m = () => {
|
|
45
45
|
const P = {
|
|
46
46
|
pageConfig: e.globalPageConfiguration,
|
|
47
47
|
paramsConfig: e.parametersPageConfiguration
|
|
48
|
-
}, g = JSON.stringify(P),
|
|
48
|
+
}, g = JSON.stringify(P), n = new CustomEvent("lf-pagebuilder:export", {
|
|
49
49
|
detail: { ...P, inputId: e.inputId }
|
|
50
50
|
});
|
|
51
|
-
document.dispatchEvent(
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
document.dispatchEvent(n);
|
|
52
|
+
const a = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
53
|
+
a && (a.document.body.innerText = g, a.document.close());
|
|
54
54
|
}, w = () => {
|
|
55
55
|
const P = {
|
|
56
56
|
pageConfig: e.globalPageConfiguration,
|
|
57
57
|
paramsConfig: e.parametersPageConfiguration
|
|
58
58
|
}, g = JSON.stringify(P);
|
|
59
59
|
I(g);
|
|
60
|
-
const
|
|
60
|
+
const n = new CustomEvent("lf-pagebuilder:save", {
|
|
61
61
|
detail: { ...P, inputId: e.inputId }
|
|
62
62
|
});
|
|
63
|
-
if (document.dispatchEvent(
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
if (document.dispatchEvent(n), e.inputId) {
|
|
64
|
+
const a = document.getElementById(e.inputId);
|
|
65
|
+
a && (a.value = g);
|
|
66
66
|
}
|
|
67
67
|
if (p.value = !0, setTimeout(() => {
|
|
68
68
|
p.value = !1;
|
|
69
69
|
}, 3e3), e.submitForm && u.value) {
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
const a = u.value.closest("form");
|
|
71
|
+
a && a.submit();
|
|
72
72
|
}
|
|
73
73
|
}, I = (P) => {
|
|
74
74
|
const g = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig";
|
|
@@ -86,24 +86,24 @@ const Ce = W({
|
|
|
86
86
|
"Content-Type": "application/json"
|
|
87
87
|
},
|
|
88
88
|
body: g
|
|
89
|
-
}).then((
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
92
|
-
const j = new DOMParser().parseFromString(
|
|
93
|
-
function
|
|
94
|
-
if (!
|
|
95
|
-
const ee =
|
|
89
|
+
}).then((n) => n.text()).then((n) => {
|
|
90
|
+
const a = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
91
|
+
if (!a) return;
|
|
92
|
+
const j = new DOMParser().parseFromString(n, "text/html"), B = [];
|
|
93
|
+
function N(H, _ = 0) {
|
|
94
|
+
if (!H || H.nodeType !== 1) return;
|
|
95
|
+
const ee = H.tagName.toLowerCase();
|
|
96
96
|
["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(ee) && B.push({
|
|
97
97
|
tag: ee,
|
|
98
|
-
text: (
|
|
98
|
+
text: (H.textContent || "").trim().slice(0, 80),
|
|
99
99
|
depth: _
|
|
100
|
-
}), Array.from(
|
|
100
|
+
}), Array.from(H.children).forEach((te) => N(te, _ + 1));
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
N(j.body);
|
|
103
103
|
let X = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
|
|
104
|
-
B.forEach((
|
|
105
|
-
X += `<li style="margin-left:${
|
|
106
|
-
}), X += "</ul>",
|
|
104
|
+
B.forEach((H) => {
|
|
105
|
+
X += `<li style="margin-left:${H.depth * 20}px"><b>${H.tag}</b>: ${H.text}</li>`;
|
|
106
|
+
}), X += "</ul>", a.document.body.innerHTML = X, a.document.close();
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
109
|
importConfig: b,
|
|
@@ -119,13 +119,13 @@ const Ce = W({
|
|
|
119
119
|
"Content-Type": "application/json"
|
|
120
120
|
},
|
|
121
121
|
body: g
|
|
122
|
-
}).then((
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
const B =
|
|
127
|
-
j.src ? B.src = j.src : B.textContent = j.textContent, (
|
|
128
|
-
}),
|
|
122
|
+
}).then((n) => n.text()).then((n) => {
|
|
123
|
+
const a = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
124
|
+
a && (a.document.body.innerHTML = n, a.document.querySelectorAll("script").forEach((j) => {
|
|
125
|
+
var N;
|
|
126
|
+
const B = a.document.createElement("script");
|
|
127
|
+
j.src ? B.src = j.src : B.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(B, j);
|
|
128
|
+
}), a.document.close());
|
|
129
129
|
});
|
|
130
130
|
},
|
|
131
131
|
importFunction: () => {
|
|
@@ -136,8 +136,8 @@ const Ce = W({
|
|
|
136
136
|
loadFromLocalStorage: () => {
|
|
137
137
|
const P = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig", g = localStorage.getItem(P);
|
|
138
138
|
if (g && e.importConfigurationFunction) {
|
|
139
|
-
const
|
|
140
|
-
e.importConfigurationFunction(
|
|
139
|
+
const n = JSON.parse(g);
|
|
140
|
+
e.importConfigurationFunction(n);
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
toggleExpandScreen: () => {
|
|
@@ -157,10 +157,10 @@ const Ce = W({
|
|
|
157
157
|
}, ke = { ref: "componentRoot" }, Se = {
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "flex justify-end items-center w-full p-3 gap-3"
|
|
160
|
-
}, Fe = { class: "flex justify-end items-center p-2 gap-3 bg-gradient-to-l from-lime-50 to-green-100 border border-lime-400 rounded-lg w-auto" }, Pe = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, je = { class: "flex gap-2" }, Me = { class: "flex gap-2" }, Ie = ["value"], Ae = ["value"], Be = { value: "full" }, Ee = { value: "1/2" }, Te = { value: "1/3" }, De = { value: "2/3" }, Oe = { value: "1/4" }, Re = { value: "3/4" },
|
|
160
|
+
}, Fe = { class: "flex justify-end items-center p-2 gap-3 bg-gradient-to-l from-lime-50 to-green-100 border border-lime-400 rounded-lg w-auto" }, Pe = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, je = { class: "flex gap-2" }, Me = { class: "flex gap-2" }, Ie = ["value"], Ae = ["value"], Be = { value: "full" }, Ee = { value: "1/2" }, Te = { value: "1/3" }, De = { value: "2/3" }, Oe = { value: "1/4" }, Re = { value: "3/4" }, Ve = { value: "1/5" }, ze = { value: "2/5" }, Ne = { value: "3/5" }, Ue = { value: "4/5" }, qe = { key: 0 }, Le = { key: 1 }, Ge = { class: "flex items-center gap-2" }, He = {
|
|
161
161
|
key: 1,
|
|
162
162
|
class: "bg-white border border-slate-200 rounded-2xl p-5 mx-3 mb-6 shadow-lg"
|
|
163
|
-
},
|
|
163
|
+
}, Je = { class: "flex flex-row gap-4 w-full" }, We = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Ye = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Ke = { class: "mb-3" }, Qe = { class: "flex items-center gap-3 cursor-pointer group" }, Xe = { class: "mb-3" }, Ze = { class: "flex items-center gap-3 cursor-pointer group" }, _e = { class: "mb-3" }, et = { class: "mb-3" }, tt = { class: "mb-3" }, ot = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, nt = { class: "flex justify-between items-center mb-4" }, lt = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, at = { class: "mb-3" }, rt = { class: "mb-3" }, st = { class: "mb-3" };
|
|
164
164
|
function it(e, o, b, $, p, u) {
|
|
165
165
|
return i(), d("div", ke, [
|
|
166
166
|
e.debugMode ? (i(), d("div", Se, [
|
|
@@ -219,7 +219,7 @@ function it(e, o, b, $, p, u) {
|
|
|
219
219
|
onChange: o[6] || (o[6] = (s) => e.$emit("update:sectionSelected", s.target.value)),
|
|
220
220
|
class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 cursor-pointer text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
|
|
221
221
|
}, [
|
|
222
|
-
(i(!0), d(A, null,
|
|
222
|
+
(i(!0), d(A, null, V(e.availableSections, (s, m) => (i(), d("option", {
|
|
223
223
|
key: m,
|
|
224
224
|
value: s
|
|
225
225
|
}, v(s), 9, Ae))), 128))
|
|
@@ -238,12 +238,12 @@ function it(e, o, b, $, p, u) {
|
|
|
238
238
|
t("option", De, "Sección " + v(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
|
|
239
239
|
t("option", Oe, "Sección " + v(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
|
|
240
240
|
t("option", Re, "Sección " + v(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
|
|
241
|
-
t("option",
|
|
242
|
-
t("option",
|
|
243
|
-
t("option",
|
|
244
|
-
t("option",
|
|
241
|
+
t("option", Ve, "Sección " + v(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
|
|
242
|
+
t("option", ze, "Sección " + v(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
|
|
243
|
+
t("option", Ne, "Sección " + v(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
|
|
244
|
+
t("option", Ue, "Sección " + v(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
|
|
245
245
|
], 512), [
|
|
246
|
-
[
|
|
246
|
+
[J, e.sectionWidth]
|
|
247
247
|
]),
|
|
248
248
|
t("button", {
|
|
249
249
|
type: "button",
|
|
@@ -283,8 +283,8 @@ function it(e, o, b, $, p, u) {
|
|
|
283
283
|
}, "◳")
|
|
284
284
|
])
|
|
285
285
|
]),
|
|
286
|
-
e.showAdvancedConfig && e.parametersPageConfiguration ? (i(), d("div",
|
|
287
|
-
t("div",
|
|
286
|
+
e.showAdvancedConfig && e.parametersPageConfiguration ? (i(), d("div", He, [
|
|
287
|
+
t("div", Je, [
|
|
288
288
|
t("div", We, [
|
|
289
289
|
o[38] || (o[38] = t("h2", { class: "text-lg font-bold mb-4 text-slate-700" }, "Configuración Avanzada", -1)),
|
|
290
290
|
o[39] || (o[39] = t("h3", { class: "font-semibold mb-3 text-slate-600" }, "Configuración Global", -1)),
|
|
@@ -389,7 +389,7 @@ function it(e, o, b, $, p, u) {
|
|
|
389
389
|
t("option", { value: "index, follow" }, "Index Follow", -1),
|
|
390
390
|
t("option", { value: "noindex, nofollow" }, "Noindex Nofollow", -1)
|
|
391
391
|
])], 544), [
|
|
392
|
-
[
|
|
392
|
+
[J, e.parametersPageConfiguration.seo.robots]
|
|
393
393
|
])
|
|
394
394
|
]),
|
|
395
395
|
t("div", rt, [
|
|
@@ -470,7 +470,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
470
470
|
}, "❌")
|
|
471
471
|
]),
|
|
472
472
|
t("form", null, [
|
|
473
|
-
(i(!0), d(A, null,
|
|
473
|
+
(i(!0), d(A, null, V(e.object.fields, (u, s) => (i(), d("div", {
|
|
474
474
|
key: s,
|
|
475
475
|
class: "mb-4"
|
|
476
476
|
}, [
|
|
@@ -478,7 +478,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
478
478
|
for: `${e.object.id}-${u.name}-${s}`,
|
|
479
479
|
class: "block text-sm font-medium mb-1"
|
|
480
480
|
}, [
|
|
481
|
-
|
|
481
|
+
E(v(u.label) + " ", 1),
|
|
482
482
|
u.mandatory ? (i(), d("span", bt, "*")) : S("", !0)
|
|
483
483
|
], 8, mt),
|
|
484
484
|
u.type === "text" ? (i(), d("input", {
|
|
@@ -532,7 +532,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
532
532
|
disabled: "",
|
|
533
533
|
value: ""
|
|
534
534
|
}, "Seleccione una opción", -1)),
|
|
535
|
-
(i(!0), d(A, null,
|
|
535
|
+
(i(!0), d(A, null, V(u.options || [], (m, w) => (i(), d("option", {
|
|
536
536
|
key: w,
|
|
537
537
|
value: m
|
|
538
538
|
}, v(m), 9, vt))), 128))
|
|
@@ -625,97 +625,97 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
625
625
|
}), s = Y(() => {
|
|
626
626
|
if (!$.value)
|
|
627
627
|
return [];
|
|
628
|
-
const c = u.value.find((
|
|
628
|
+
const c = u.value.find((l) => l.id === $.value);
|
|
629
629
|
return c ? c.filters : [];
|
|
630
|
-
}), m = (c,
|
|
631
|
-
p.value[c] =
|
|
630
|
+
}), m = (c, l) => {
|
|
631
|
+
p.value[c] = l;
|
|
632
632
|
}, w = () => {
|
|
633
633
|
p.value = {};
|
|
634
634
|
}, I = async () => {
|
|
635
635
|
b.value = !0;
|
|
636
|
-
const c = u.value.find((
|
|
636
|
+
const c = u.value.find((r) => r.id === $.value);
|
|
637
637
|
if (!c) {
|
|
638
638
|
console.error("Origen no encontrado"), b.value = !1;
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
const
|
|
642
|
-
Object.keys(p.value).forEach((
|
|
643
|
-
p.value[
|
|
641
|
+
const l = new URL(c.apiUrl);
|
|
642
|
+
Object.keys(p.value).forEach((r) => {
|
|
643
|
+
p.value[r] && l.searchParams.append(r, p.value[r]);
|
|
644
644
|
});
|
|
645
645
|
try {
|
|
646
|
-
const f = await (await fetch(
|
|
646
|
+
const f = await (await fetch(l.toString(), {
|
|
647
647
|
method: "GET",
|
|
648
648
|
headers: {
|
|
649
649
|
Accept: "text/xml, application/xml"
|
|
650
650
|
}
|
|
651
|
-
})).text(), P = new DOMParser().parseFromString(f, "text/xml"), g = Array.from(P.querySelectorAll("item")).map((
|
|
652
|
-
const
|
|
653
|
-
return Array.from(
|
|
651
|
+
})).text(), P = new DOMParser().parseFromString(f, "text/xml"), g = Array.from(P.querySelectorAll("item")).map((n) => {
|
|
652
|
+
const a = {};
|
|
653
|
+
return Array.from(n.children).forEach((F) => {
|
|
654
654
|
F.children.length > 0 ? Array.from(F.children).forEach((j) => {
|
|
655
655
|
const B = `${F.nodeName}_${j.nodeName}`;
|
|
656
|
-
|
|
657
|
-
}) :
|
|
658
|
-
}),
|
|
656
|
+
a[B] = j.textContent || "";
|
|
657
|
+
}) : a[F.nodeName] = F.textContent || "";
|
|
658
|
+
}), a;
|
|
659
659
|
});
|
|
660
660
|
o.onSubmit(g);
|
|
661
|
-
} catch (
|
|
662
|
-
console.error("Error al aplicar filtros:",
|
|
661
|
+
} catch (r) {
|
|
662
|
+
console.error("Error al aplicar filtros:", r), o.onSubmit([]);
|
|
663
663
|
} finally {
|
|
664
|
-
const
|
|
664
|
+
const r = {
|
|
665
665
|
name: c.name,
|
|
666
|
-
url:
|
|
666
|
+
url: l.toString()
|
|
667
667
|
};
|
|
668
|
-
o.updateFeedCriteria(
|
|
668
|
+
o.updateFeedCriteria(r), b.value = !1;
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
|
-
return (c,
|
|
671
|
+
return (c, l) => (i(), d("div", ht, [
|
|
672
672
|
t("div", null, [
|
|
673
|
-
|
|
673
|
+
l[1] || (l[1] = t("label", { class: "block text-sm font-semibold text-slate-600 mb-2" }, "Seleccionar origen:", -1)),
|
|
674
674
|
O(t("select", {
|
|
675
|
-
"onUpdate:modelValue":
|
|
675
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => $.value = r),
|
|
676
676
|
class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
|
|
677
677
|
onChange: w,
|
|
678
678
|
disabled: b.value
|
|
679
679
|
}, [
|
|
680
|
-
(i(!0), d(A, null,
|
|
681
|
-
key:
|
|
682
|
-
value:
|
|
683
|
-
}, v(
|
|
680
|
+
(i(!0), d(A, null, V(u.value, (r) => (i(), d("option", {
|
|
681
|
+
key: r.id,
|
|
682
|
+
value: r.id
|
|
683
|
+
}, v(r.name), 9, yt))), 128))
|
|
684
684
|
], 40, wt), [
|
|
685
|
-
[
|
|
685
|
+
[J, $.value]
|
|
686
686
|
])
|
|
687
687
|
]),
|
|
688
688
|
t("div", Ct, [
|
|
689
689
|
s.value.length > 0 ? (i(), d("div", $t, [
|
|
690
|
-
(i(!0), d(A, null,
|
|
691
|
-
key:
|
|
690
|
+
(i(!0), d(A, null, V(s.value, (r) => (i(), d("div", {
|
|
691
|
+
key: r.id,
|
|
692
692
|
class: "bg-gradient-to-br from-slate-50 to-white p-4 rounded-xl border border-slate-200"
|
|
693
693
|
}, [
|
|
694
|
-
t("label", kt, v(
|
|
695
|
-
|
|
694
|
+
t("label", kt, v(r.label) + ":", 1),
|
|
695
|
+
r.type === "select" ? (i(), d("select", {
|
|
696
696
|
key: 0,
|
|
697
697
|
class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
|
|
698
|
-
onChange: (f) => m(
|
|
698
|
+
onChange: (f) => m(r.id, f.target.value),
|
|
699
699
|
disabled: b.value
|
|
700
700
|
}, [
|
|
701
|
-
|
|
702
|
-
(i(!0), d(A, null,
|
|
701
|
+
l[2] || (l[2] = t("option", { value: "" }, "Seleccionar...", -1)),
|
|
702
|
+
(i(!0), d(A, null, V(r.options, (f) => (i(), d("option", {
|
|
703
703
|
key: f,
|
|
704
704
|
value: f
|
|
705
705
|
}, v(f), 9, Ft))), 128))
|
|
706
|
-
], 40, St)) :
|
|
706
|
+
], 40, St)) : r.type === "date" ? (i(), d("input", {
|
|
707
707
|
key: 1,
|
|
708
708
|
type: "date",
|
|
709
709
|
class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
|
|
710
|
-
onChange: (f) => m(
|
|
710
|
+
onChange: (f) => m(r.id, f.target.value),
|
|
711
711
|
disabled: b.value
|
|
712
|
-
}, null, 40, Pt)) :
|
|
712
|
+
}, null, 40, Pt)) : r.type === "text" ? (i(), d("input", {
|
|
713
713
|
key: 2,
|
|
714
714
|
type: "text",
|
|
715
715
|
class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
|
|
716
|
-
onInput: (f) => m(
|
|
716
|
+
onInput: (f) => m(r.id, f.target.value),
|
|
717
717
|
disabled: b.value,
|
|
718
|
-
placeholder:
|
|
718
|
+
placeholder: r.label
|
|
719
719
|
}, null, 40, jt)) : S("", !0)
|
|
720
720
|
]))), 128))
|
|
721
721
|
])) : S("", !0),
|
|
@@ -726,15 +726,15 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
726
726
|
disabled: b.value
|
|
727
727
|
}, [
|
|
728
728
|
b.value ? (i(), d("span", It, "⏳")) : (i(), d("span", At, "🔍")),
|
|
729
|
-
|
|
729
|
+
E(" " + v(b.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
|
|
730
730
|
], 8, Mt)
|
|
731
731
|
])
|
|
732
732
|
]));
|
|
733
733
|
}
|
|
734
|
-
}), Et = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, Tt = { class: "w-full flex justify-between items-center mb-4" }, Dt = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, Ot = { class: "flex-1 flex flex-col gap-5" }, Rt = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" },
|
|
734
|
+
}), Et = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, Tt = { class: "w-full flex justify-between items-center mb-4" }, Dt = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, Ot = { class: "flex-1 flex flex-col gap-5" }, Rt = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Vt = {
|
|
735
735
|
key: 0,
|
|
736
736
|
class: "mb-4 p-4 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-xl border border-emerald-200 w-full flex-shrink-0 text-sm font-medium text-emerald-700"
|
|
737
|
-
},
|
|
737
|
+
}, zt = { class: "list-none mt-3 space-y-2 text-slate-600" }, Nt = { class: "flex items-start gap-2" }, Ut = { class: "font-semibold text-slate-700" }, qt = { class: "flex items-start gap-2" }, Lt = { class: "font-semibold text-slate-700" }, Gt = { class: "font-semibold text-slate-700" }, Ht = { class: "flex items-start gap-2" }, Jt = { class: "flex flex-wrap gap-2 mt-1" }, Wt = { class: "font-semibold text-slate-700" }, Yt = { class: "text-emerald-600" }, Kt = { class: "flex flex-col gap-4 w-full" }, Qt = { class: "flex items-center gap-3 cursor-pointer group" }, Xt = {
|
|
738
738
|
key: 0,
|
|
739
739
|
class: "flex flex-col gap-4 ml-8 p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
|
|
740
740
|
}, Zt = { class: "flex flex-col gap-2" }, _t = { class: "flex flex-col gap-2" }, eo = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, to = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, oo = {
|
|
@@ -777,13 +777,13 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
777
777
|
b.value = g;
|
|
778
778
|
}, c = (g) => {
|
|
779
779
|
$.value = g;
|
|
780
|
-
},
|
|
781
|
-
const g = o.object.fields.filter((
|
|
782
|
-
var
|
|
780
|
+
}, l = () => {
|
|
781
|
+
const g = o.object.fields.filter((n) => n.mappedTo).map((n) => {
|
|
782
|
+
var a;
|
|
783
783
|
return {
|
|
784
|
-
fieldName:
|
|
785
|
-
mappedTo:
|
|
786
|
-
value: ((
|
|
784
|
+
fieldName: n.name,
|
|
785
|
+
mappedTo: n.mappedTo,
|
|
786
|
+
value: ((a = $.value) == null ? void 0 : a[n.mappedTo]) ?? null
|
|
787
787
|
};
|
|
788
788
|
});
|
|
789
789
|
w.value = {
|
|
@@ -791,9 +791,9 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
791
791
|
dynamicUpdate: p.value,
|
|
792
792
|
elementCount: u.value,
|
|
793
793
|
orientation: s.value,
|
|
794
|
-
mapping: g.map(({ fieldName:
|
|
794
|
+
mapping: g.map(({ fieldName: n, mappedTo: a }) => ({ fieldName: n, mappedTo: a }))
|
|
795
795
|
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(g, w.value), o.toggleFeedSection();
|
|
796
|
-
},
|
|
796
|
+
}, r = (g) => {
|
|
797
797
|
m.value = g;
|
|
798
798
|
}, f = () => {
|
|
799
799
|
var g;
|
|
@@ -810,80 +810,80 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
810
810
|
dynamicUpdate: p.value,
|
|
811
811
|
elementCount: u.value,
|
|
812
812
|
orientation: s.value
|
|
813
|
-
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((g = w.value.mapping) == null ? void 0 : g.map((
|
|
814
|
-
fieldName:
|
|
815
|
-
mappedTo:
|
|
813
|
+
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((g = w.value.mapping) == null ? void 0 : g.map((n) => ({
|
|
814
|
+
fieldName: n.fieldName,
|
|
815
|
+
mappedTo: n.mappedTo,
|
|
816
816
|
value: null
|
|
817
817
|
}))) || [], w.value));
|
|
818
818
|
};
|
|
819
819
|
return ae(() => {
|
|
820
820
|
f();
|
|
821
|
-
}), (g,
|
|
821
|
+
}), (g, n) => (i(), d("div", Et, [
|
|
822
822
|
t("div", Tt, [
|
|
823
|
-
|
|
824
|
-
t("span", { class: "text-
|
|
825
|
-
|
|
823
|
+
n[5] || (n[5] = t("h2", { class: "text-xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
|
|
824
|
+
t("span", { class: "text-xl" }, "🍺"),
|
|
825
|
+
E(" Configuración de Feed ")
|
|
826
826
|
], -1)),
|
|
827
827
|
t("button", {
|
|
828
|
-
onClick:
|
|
829
|
-
(...
|
|
828
|
+
onClick: n[0] || (n[0] = //@ts-ignore
|
|
829
|
+
(...a) => e.toggleFeedSection && e.toggleFeedSection(...a)),
|
|
830
830
|
class: "cursor-pointer group w-10 h-10 flex items-center justify-center bg-white hover:bg-red-50 border border-red-200 hover:border-red-400 text-red-400 hover:text-red-600 rounded-full font-semibold shadow-sm hover:shadow-lg transition-all duration-200"
|
|
831
|
-
}, [...
|
|
831
|
+
}, [...n[4] || (n[4] = [
|
|
832
832
|
t("span", { class: "text-lg" }, "✕", -1)
|
|
833
833
|
])])
|
|
834
834
|
]),
|
|
835
835
|
t("div", Dt, [
|
|
836
836
|
t("div", Ot, [
|
|
837
837
|
t("div", Rt, [
|
|
838
|
-
w.value && w.value.dynamicUpdate ? (i(), d("div",
|
|
838
|
+
w.value && w.value.dynamicUpdate ? (i(), d("div", Vt, [
|
|
839
839
|
t("div", { class: "flex justify-between items-start" }, [
|
|
840
|
-
|
|
840
|
+
n[8] || (n[8] = t("p", { class: "flex items-center gap-2" }, [
|
|
841
841
|
t("span", { class: "text-emerald-500" }, "✓"),
|
|
842
|
-
|
|
842
|
+
E(" Hay un criterio de feed establecido: ")
|
|
843
843
|
], -1)),
|
|
844
844
|
t("div", { class: "flex items-center gap-2" }, [
|
|
845
845
|
t("button", {
|
|
846
846
|
onClick: P,
|
|
847
847
|
class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-emerald-50 text-emerald-500 hover:text-emerald-600 border border-emerald-200 hover:border-emerald-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
|
|
848
|
-
}, [...
|
|
848
|
+
}, [...n[6] || (n[6] = [
|
|
849
849
|
t("span", null, "💾", -1),
|
|
850
|
-
|
|
850
|
+
E(" Guardar ", -1)
|
|
851
851
|
])]),
|
|
852
852
|
t("button", {
|
|
853
853
|
onClick: R,
|
|
854
854
|
class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-red-50 text-red-500 hover:text-red-600 border border-red-200 hover:border-red-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
|
|
855
|
-
}, [...
|
|
855
|
+
}, [...n[7] || (n[7] = [
|
|
856
856
|
t("span", null, "✕", -1),
|
|
857
|
-
|
|
857
|
+
E(" Borrar ", -1)
|
|
858
858
|
])])
|
|
859
859
|
])
|
|
860
860
|
]),
|
|
861
|
-
t("ul",
|
|
862
|
-
t("li",
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
t("span",
|
|
861
|
+
t("ul", zt, [
|
|
862
|
+
t("li", Nt, [
|
|
863
|
+
n[9] || (n[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
864
|
+
n[10] || (n[10] = E(" Conectar con ", -1)),
|
|
865
|
+
t("span", Ut, v(w.value.name), 1)
|
|
866
866
|
]),
|
|
867
867
|
t("li", qt, [
|
|
868
|
-
|
|
869
|
-
|
|
868
|
+
n[11] || (n[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
869
|
+
n[12] || (n[12] = E(" Recuperar ", -1)),
|
|
870
870
|
t("span", Lt, v(w.value.elementCount), 1),
|
|
871
|
-
|
|
871
|
+
n[13] || (n[13] = E(" items (", -1)),
|
|
872
872
|
t("span", Gt, v(w.value.orientation), 1),
|
|
873
|
-
|
|
873
|
+
n[14] || (n[14] = E(")", -1))
|
|
874
874
|
]),
|
|
875
|
-
t("li",
|
|
876
|
-
|
|
875
|
+
t("li", Ht, [
|
|
876
|
+
n[17] || (n[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
877
877
|
t("div", null, [
|
|
878
|
-
|
|
879
|
-
t("div",
|
|
880
|
-
(i(!0), d(A, null,
|
|
878
|
+
n[16] || (n[16] = E(" Mapeo: ", -1)),
|
|
879
|
+
t("div", Jt, [
|
|
880
|
+
(i(!0), d(A, null, V(w.value.mapping, (a, F) => (i(), d("span", {
|
|
881
881
|
key: F,
|
|
882
882
|
class: "inline-flex items-center gap-1 px-2 py-0.5 bg-white rounded-full text-xs border border-slate-200"
|
|
883
883
|
}, [
|
|
884
|
-
t("span", Wt, v(
|
|
885
|
-
|
|
886
|
-
t("span", Yt, v(
|
|
884
|
+
t("span", Wt, v(a.fieldName), 1),
|
|
885
|
+
n[15] || (n[15] = t("span", { class: "text-slate-400" }, "←", -1)),
|
|
886
|
+
t("span", Yt, v(a.mappedTo), 1)
|
|
887
887
|
]))), 128))
|
|
888
888
|
])
|
|
889
889
|
])
|
|
@@ -894,19 +894,28 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
894
894
|
t("label", Qt, [
|
|
895
895
|
O(t("input", {
|
|
896
896
|
type: "checkbox",
|
|
897
|
-
"onUpdate:modelValue":
|
|
897
|
+
"onUpdate:modelValue": n[1] || (n[1] = (a) => p.value = a),
|
|
898
898
|
class: "w-5 h-5 text-emerald-500 border-2 border-slate-300 rounded focus:ring-emerald-500 cursor-pointer"
|
|
899
899
|
}, null, 512), [
|
|
900
900
|
[ne, p.value]
|
|
901
901
|
]),
|
|
902
|
-
|
|
902
|
+
n[18] || (n[18] = t("span", { class: "font-medium text-slate-700 group-hover:text-slate-900 transition-colors" }, "Actualizar dinámicamente según criterios del feed", -1))
|
|
903
903
|
]),
|
|
904
904
|
p.value ? (i(), d("div", Xt, [
|
|
905
|
+
n[22] || (n[22] = t("div", { class: "p-3 bg-gradient-to-r from-amber-50 to-yellow-50 rounded-lg border border-amber-200 text-sm text-amber-700" }, [
|
|
906
|
+
t("div", { class: "flex items-start gap-2" }, [
|
|
907
|
+
t("span", { class: "text-amber-500 mt-0.5" }, "ℹ️"),
|
|
908
|
+
t("p", null, [
|
|
909
|
+
t("strong", null, "Nota:"),
|
|
910
|
+
E(" Los valores que verás al relacionar campos son solo un ejemplo de referencia. En el momento de renderizar, se mostrarán los datos reales obtenidos del feed según los criterios configurados. ")
|
|
911
|
+
])
|
|
912
|
+
])
|
|
913
|
+
], -1)),
|
|
905
914
|
t("div", Zt, [
|
|
906
|
-
|
|
915
|
+
n[19] || (n[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
|
|
907
916
|
O(t("input", {
|
|
908
917
|
type: "number",
|
|
909
|
-
"onUpdate:modelValue":
|
|
918
|
+
"onUpdate:modelValue": n[2] || (n[2] = (a) => u.value = a),
|
|
910
919
|
min: "1",
|
|
911
920
|
class: "w-32 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
|
|
912
921
|
}, null, 512), [
|
|
@@ -919,99 +928,99 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
919
928
|
])
|
|
920
929
|
]),
|
|
921
930
|
t("div", _t, [
|
|
922
|
-
|
|
931
|
+
n[21] || (n[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
|
|
923
932
|
O(t("select", {
|
|
924
|
-
"onUpdate:modelValue":
|
|
933
|
+
"onUpdate:modelValue": n[3] || (n[3] = (a) => s.value = a),
|
|
925
934
|
class: "w-48 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white transition-colors cursor-pointer"
|
|
926
|
-
}, [...
|
|
935
|
+
}, [...n[20] || (n[20] = [
|
|
927
936
|
t("option", {
|
|
928
937
|
value: "horizontal",
|
|
929
938
|
selected: ""
|
|
930
939
|
}, "Horizontal", -1),
|
|
931
940
|
t("option", { value: "vertical" }, "Vertical", -1)
|
|
932
941
|
])], 512), [
|
|
933
|
-
[
|
|
942
|
+
[J, s.value]
|
|
934
943
|
])
|
|
935
944
|
])
|
|
936
945
|
])) : S("", !0)
|
|
937
946
|
])
|
|
938
947
|
]),
|
|
939
948
|
t("div", eo, [
|
|
940
|
-
|
|
949
|
+
n[23] || (n[23] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
941
950
|
t("span", { class: "text-xl" }, "🔍"),
|
|
942
|
-
|
|
951
|
+
E(" Orígenes y Filtros ")
|
|
943
952
|
], -1)),
|
|
944
953
|
L(Bt, {
|
|
945
954
|
onSubmit: I,
|
|
946
|
-
updateFeedCriteria:
|
|
955
|
+
updateFeedCriteria: r,
|
|
947
956
|
isProduction: e.isProduction
|
|
948
957
|
}, null, 8, ["isProduction"])
|
|
949
958
|
])
|
|
950
959
|
]),
|
|
951
960
|
t("div", to, [
|
|
952
|
-
|
|
961
|
+
n[25] || (n[25] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
953
962
|
t("span", { class: "text-xl" }, "📰"),
|
|
954
|
-
|
|
963
|
+
E(" Contenidos ")
|
|
955
964
|
], -1)),
|
|
956
|
-
!b.value || b.value.length === 0 ? (i(), d("div", oo, [...
|
|
965
|
+
!b.value || b.value.length === 0 ? (i(), d("div", oo, [...n[24] || (n[24] = [
|
|
957
966
|
t("span", { class: "text-5xl mb-3 opacity-50" }, "📭", -1),
|
|
958
|
-
t("p", { class: "text-sm font-medium" }, "No hay
|
|
959
|
-
t("p", { class: "text-xs mt-1 text-slate-300" }, "Selecciona un origen para cargar
|
|
967
|
+
t("p", { class: "text-sm font-medium" }, "No hay contenidos disponibles", -1),
|
|
968
|
+
t("p", { class: "text-xs mt-1 text-slate-300" }, "Selecciona un origen para cargar contenidos", -1)
|
|
960
969
|
])])) : (i(), d("ul", no, [
|
|
961
|
-
(i(!0), d(A, null,
|
|
970
|
+
(i(!0), d(A, null, V(b.value, (a, F) => (i(), d("li", {
|
|
962
971
|
key: F,
|
|
963
972
|
class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl shadow-sm hover:shadow-md cursor-pointer hover:scale-[1.01] transition-all duration-200 border border-slate-200 hover:border-emerald-300",
|
|
964
|
-
onClick: (j) => c(
|
|
973
|
+
onClick: (j) => c(a)
|
|
965
974
|
}, [
|
|
966
|
-
t("h4", ao, v(
|
|
967
|
-
t("p", ro, v(
|
|
975
|
+
t("h4", ao, v(a.title || a.titulo || "Sin título"), 1),
|
|
976
|
+
t("p", ro, v(a.description || a.descripcion || a.content || "Sin descripción"), 1)
|
|
968
977
|
], 8, lo))), 128))
|
|
969
978
|
]))
|
|
970
979
|
]),
|
|
971
980
|
t("div", so, [
|
|
972
|
-
|
|
981
|
+
n[31] || (n[31] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
973
982
|
t("span", { class: "text-xl" }, "🔗"),
|
|
974
|
-
|
|
983
|
+
E(" Relacionar Contenido ")
|
|
975
984
|
], -1)),
|
|
976
985
|
$.value ? (i(), d("div", uo, [
|
|
977
|
-
(i(!0), d(A, null,
|
|
986
|
+
(i(!0), d(A, null, V(e.object.fields, (a, F) => (i(), d("div", {
|
|
978
987
|
key: F,
|
|
979
988
|
class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
|
|
980
989
|
}, [
|
|
981
990
|
t("label", co, [
|
|
982
|
-
|
|
983
|
-
|
|
991
|
+
n[27] || (n[27] = t("span", { class: "text-base" }, "⚙️", -1)),
|
|
992
|
+
E(" " + v(a.name), 1)
|
|
984
993
|
]),
|
|
985
994
|
O(t("select", {
|
|
986
|
-
"onUpdate:modelValue": (j) =>
|
|
995
|
+
"onUpdate:modelValue": (j) => a.mappedTo = j,
|
|
987
996
|
class: "w-full px-3 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-all bg-white cursor-pointer"
|
|
988
997
|
}, [
|
|
989
|
-
|
|
990
|
-
(i(!0), d(A, null,
|
|
998
|
+
n[28] || (n[28] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
|
|
999
|
+
(i(!0), d(A, null, V($.value, (j, B) => (i(), d("option", {
|
|
991
1000
|
key: B,
|
|
992
1001
|
value: B
|
|
993
1002
|
}, v(B), 9, bo))), 128))
|
|
994
1003
|
], 8, mo), [
|
|
995
|
-
[
|
|
1004
|
+
[J, a.mappedTo]
|
|
996
1005
|
]),
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
t("p", fo, v($.value[
|
|
1006
|
+
a.mappedTo ? (i(), d("div", go, [
|
|
1007
|
+
n[29] || (n[29] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
|
|
1008
|
+
t("p", fo, v($.value[a.mappedTo]), 1)
|
|
1000
1009
|
])) : S("", !0)
|
|
1001
1010
|
]))), 128)),
|
|
1002
1011
|
t("button", {
|
|
1003
|
-
onClick:
|
|
1012
|
+
onClick: l,
|
|
1004
1013
|
class: "cursor-pointer w-full mt-4 px-5 py-3 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white font-semibold rounded-xl shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-[1.01] flex items-center justify-center gap-2"
|
|
1005
|
-
}, [...
|
|
1014
|
+
}, [...n[30] || (n[30] = [
|
|
1006
1015
|
t("span", { class: "text-lg" }, "✓", -1),
|
|
1007
1016
|
t("span", null, "Alimentar el componente", -1)
|
|
1008
1017
|
])])
|
|
1009
|
-
])) : (i(), d("div", io, [...
|
|
1018
|
+
])) : (i(), d("div", io, [...n[26] || (n[26] = [
|
|
1010
1019
|
t("span", { class: "text-5xl mb-3 opacity-50" }, "👆", -1),
|
|
1011
1020
|
t("p", { class: "text-sm font-medium text-center" }, [
|
|
1012
|
-
|
|
1021
|
+
E("Selecciona un contenido"),
|
|
1013
1022
|
t("br"),
|
|
1014
|
-
|
|
1023
|
+
E("para relacionar")
|
|
1015
1024
|
], -1)
|
|
1016
1025
|
])]))
|
|
1017
1026
|
])
|
|
@@ -1030,14 +1039,14 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1030
1039
|
}, Fo = { class: "mt-2 flex items-center" }, Po = { class: "font-medium text-slate-700" }, jo = { key: 0 }, Mo = { key: 1 }, Io = {
|
|
1031
1040
|
key: 0,
|
|
1032
1041
|
class: "mt-3 p-3 bg-gradient-to-r from-sky-50 to-blue-50 rounded-lg text-sm text-slate-600 border border-sky-100"
|
|
1033
|
-
}, Ao = { class: "mt-3 flex gap-1.5 flex-wrap" }, Bo = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, Eo = { class: "flex justify-center h-full items-center p-4 gap-3" },
|
|
1042
|
+
}, Ao = { class: "mt-3 flex gap-1.5 flex-wrap" }, Bo = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, Eo = { class: "absolute top-2 right-2 group/info z-10" }, To = { class: "absolute top-6 right-0 w-64 p-3 bg-white rounded-lg shadow-lg border border-slate-200 opacity-0 invisible group-hover/info:opacity-100 group-hover/info:visible transition-all duration-200 text-xs text-slate-600 leading-relaxed" }, Do = { class: "flex justify-center h-full items-center p-4 gap-3" }, Oo = {
|
|
1034
1043
|
key: 0,
|
|
1035
1044
|
title: "Mover componente",
|
|
1036
1045
|
class: "handle cursor-grab flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
|
|
1037
|
-
},
|
|
1046
|
+
}, Ro = {
|
|
1038
1047
|
key: 1,
|
|
1039
1048
|
class: "flex-1 flex justify-center items-center"
|
|
1040
|
-
},
|
|
1049
|
+
}, Vo = { class: "flex flex-col items-center" }, zo = {
|
|
1041
1050
|
key: 0,
|
|
1042
1051
|
class: "text-[10px] mt-0.5 opacity-70"
|
|
1043
1052
|
}, No = ["id"], be = /* @__PURE__ */ W({
|
|
@@ -1065,12 +1074,12 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1065
1074
|
},
|
|
1066
1075
|
setup(e) {
|
|
1067
1076
|
const o = e, b = Math.random().toString(36).substring(2, 15), $ = C(!1), p = C(!1), u = C(null), s = C(null), m = C(!1), w = C(!1);
|
|
1068
|
-
oe(() => o.isComponentMode, (
|
|
1069
|
-
|
|
1077
|
+
oe(() => o.isComponentMode, (n) => {
|
|
1078
|
+
n || I();
|
|
1070
1079
|
}), oe(() => o.object, () => {
|
|
1071
1080
|
I();
|
|
1072
|
-
}, { deep: !0 }), oe(m, async (
|
|
1073
|
-
|
|
1081
|
+
}, { deep: !0 }), oe(m, async (n) => {
|
|
1082
|
+
n && (await ve(), g());
|
|
1074
1083
|
});
|
|
1075
1084
|
const I = () => {
|
|
1076
1085
|
u.value && clearTimeout(u.value), u.value = setTimeout(() => {
|
|
@@ -1078,63 +1087,63 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1078
1087
|
}, 500);
|
|
1079
1088
|
}, c = () => {
|
|
1080
1089
|
if (o.isComponentMode) return;
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
F.isIntersecting && !m.value && (m.value = !0,
|
|
1090
|
+
const n = new IntersectionObserver((a) => {
|
|
1091
|
+
a.forEach((F) => {
|
|
1092
|
+
F.isIntersecting && !m.value && (m.value = !0, n.disconnect());
|
|
1084
1093
|
});
|
|
1085
1094
|
}, { threshold: 0.1 });
|
|
1086
|
-
s.value &&
|
|
1087
|
-
},
|
|
1088
|
-
const F = (o.object.fields || []).find((j) => j.name ===
|
|
1089
|
-
F && (F.example_value =
|
|
1090
|
-
},
|
|
1091
|
-
|
|
1092
|
-
F.value !== void 0 &&
|
|
1093
|
-
}), o.object.repeat_data =
|
|
1095
|
+
s.value && n.observe(s.value);
|
|
1096
|
+
}, l = (n, a) => {
|
|
1097
|
+
const F = (o.object.fields || []).find((j) => j.name === n);
|
|
1098
|
+
F && (F.example_value = a);
|
|
1099
|
+
}, r = (n, a) => {
|
|
1100
|
+
n.forEach((F) => {
|
|
1101
|
+
F.value !== void 0 && l(F.fieldName, F.value);
|
|
1102
|
+
}), o.object.repeat_data = a;
|
|
1094
1103
|
}, f = () => {
|
|
1095
1104
|
p.value = !p.value;
|
|
1096
1105
|
}, R = () => {
|
|
1097
1106
|
w.value = !w.value;
|
|
1098
1107
|
}, P = () => {
|
|
1099
|
-
g(!0).then((
|
|
1100
|
-
const
|
|
1101
|
-
if (!
|
|
1108
|
+
g(!0).then((n) => {
|
|
1109
|
+
const a = window.open("", "Preview", "width=1200,height=800");
|
|
1110
|
+
if (!a) {
|
|
1102
1111
|
alert("El navegador bloqueó la ventana emergente. Por favor, permite los popups para este sitio.");
|
|
1103
1112
|
return;
|
|
1104
1113
|
}
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1107
|
-
const B =
|
|
1108
|
-
j.src ? B.src = j.src : B.textContent = j.textContent, (
|
|
1109
|
-
}),
|
|
1114
|
+
a.document.body.innerHTML = n, a.document.querySelectorAll("script").forEach((j) => {
|
|
1115
|
+
var N;
|
|
1116
|
+
const B = a.document.createElement("script");
|
|
1117
|
+
j.src ? B.src = j.src : B.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(B, j);
|
|
1118
|
+
}), a.document.close();
|
|
1110
1119
|
});
|
|
1111
|
-
}, g = (
|
|
1120
|
+
}, g = (n = !1) => {
|
|
1112
1121
|
var j;
|
|
1113
1122
|
if (!((j = o.object) != null && j.category) || o.object.category === "Repetidor") {
|
|
1114
1123
|
const B = '<div style="color:white; padding: 1em 2em;background-color:#001978;border-radius:1em;border:4px solid #711978;">Componente que contiene elementos repetidos: TODO: GENERAR PREVIEW DE REPETIDORES</div>';
|
|
1115
|
-
if (
|
|
1124
|
+
if (n)
|
|
1116
1125
|
return Promise.resolve(B);
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1126
|
+
const N = document.getElementById(b);
|
|
1127
|
+
return N && (N.innerHTML = B), Promise.resolve("");
|
|
1119
1128
|
}
|
|
1120
|
-
const
|
|
1121
|
-
return fetch(
|
|
1129
|
+
const a = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", F = JSON.stringify({ obj: o.object }, null, 2);
|
|
1130
|
+
return fetch(a, {
|
|
1122
1131
|
method: "POST",
|
|
1123
1132
|
headers: { "Content-Type": "application/json" },
|
|
1124
1133
|
body: F
|
|
1125
1134
|
}).then((B) => B.text()).then((B) => {
|
|
1126
|
-
if (
|
|
1135
|
+
if (n)
|
|
1127
1136
|
return B;
|
|
1128
|
-
const
|
|
1129
|
-
return
|
|
1137
|
+
const N = document.getElementById(b);
|
|
1138
|
+
return N && (N.innerHTML = B), "";
|
|
1130
1139
|
});
|
|
1131
1140
|
};
|
|
1132
1141
|
return ae(() => {
|
|
1133
1142
|
c();
|
|
1134
|
-
}), (
|
|
1143
|
+
}), (n, a) => (i(), d("div", null, [
|
|
1135
1144
|
w.value ? (i(), ue(po, {
|
|
1136
1145
|
key: 0,
|
|
1137
|
-
updateObjectByFeedContent:
|
|
1146
|
+
updateObjectByFeedContent: r,
|
|
1138
1147
|
toggleFeedSection: R,
|
|
1139
1148
|
object: e.object,
|
|
1140
1149
|
isProduction: e.isProduction
|
|
@@ -1148,7 +1157,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1148
1157
|
t("span", vo, v(e.object.component_name), 1),
|
|
1149
1158
|
t("div", xo, [
|
|
1150
1159
|
t("div", ho, [
|
|
1151
|
-
|
|
1160
|
+
a[8] || (a[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
|
|
1152
1161
|
t("svg", {
|
|
1153
1162
|
class: "w-5 h-5",
|
|
1154
1163
|
fill: "currentColor",
|
|
@@ -1162,7 +1171,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1162
1171
|
e.fullwidthMode ? (i(), d("div", yo, [
|
|
1163
1172
|
t("div", {
|
|
1164
1173
|
class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-lg px-4 py-1.5 text-xs font-medium cursor-pointer shadow-sm hover:shadow transition-all duration-200",
|
|
1165
|
-
onClick:
|
|
1174
|
+
onClick: a[0] || (a[0] = (F) => {
|
|
1166
1175
|
var j;
|
|
1167
1176
|
return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
|
|
1168
1177
|
})
|
|
@@ -1173,12 +1182,12 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1173
1182
|
e.insideComponentBox ? S("", !0) : (i(), d("div", ko, [
|
|
1174
1183
|
t("div", {
|
|
1175
1184
|
title: "Previsualizar Dummy",
|
|
1176
|
-
onClick:
|
|
1185
|
+
onClick: a[1] || (a[1] = (F) => P()),
|
|
1177
1186
|
class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1178
1187
|
}, "🔍"),
|
|
1179
1188
|
t("div", {
|
|
1180
1189
|
title: "Editar configuración",
|
|
1181
|
-
onClick:
|
|
1190
|
+
onClick: a[2] || (a[2] = (F) => p.value = !p.value),
|
|
1182
1191
|
class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1183
1192
|
}, "⚙️"),
|
|
1184
1193
|
t("div", {
|
|
@@ -1186,13 +1195,13 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1186
1195
|
onClick: R,
|
|
1187
1196
|
class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base flex items-center gap-1"
|
|
1188
1197
|
}, [
|
|
1189
|
-
|
|
1198
|
+
a[9] || (a[9] = E("⚡ ", -1)),
|
|
1190
1199
|
e.object.repeat_data ? (i(), d("span", So, v(e.object.repeat_data.elementCount), 1)) : S("", !0)
|
|
1191
1200
|
]),
|
|
1192
1201
|
e.removeComponent ? (i(), d("div", {
|
|
1193
1202
|
key: 0,
|
|
1194
1203
|
title: "Eliminar componente",
|
|
1195
|
-
onClick:
|
|
1204
|
+
onClick: a[3] || (a[3] = (F) => e.removeComponent(e.object, e.section || "")),
|
|
1196
1205
|
class: "p-1.5 rounded-md hover:bg-red-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1197
1206
|
}, "🗑️")) : S("", !0)
|
|
1198
1207
|
]))
|
|
@@ -1207,7 +1216,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1207
1216
|
t("span", Po, v(e.object.name), 1),
|
|
1208
1217
|
t("button", {
|
|
1209
1218
|
type: "button",
|
|
1210
|
-
onClick:
|
|
1219
|
+
onClick: a[4] || (a[4] = (F) => $.value = !$.value),
|
|
1211
1220
|
class: "ms-2 cursor-pointer text-xs text-slate-400 hover:text-slate-600 transition-colors w-5 h-5 rounded-full hover:bg-slate-100 flex items-center justify-center"
|
|
1212
1221
|
}, [
|
|
1213
1222
|
$.value ? (i(), d("span", Mo, "▲")) : (i(), d("span", jo, "▼"))
|
|
@@ -1215,7 +1224,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1215
1224
|
]),
|
|
1216
1225
|
$.value ? (i(), d("div", Io, v(e.object.description), 1)) : S("", !0),
|
|
1217
1226
|
t("div", Ao, [
|
|
1218
|
-
(i(!0), d(A, null,
|
|
1227
|
+
(i(!0), d(A, null, V(e.object.tags, (F, j) => (i(), d("span", {
|
|
1219
1228
|
key: j,
|
|
1220
1229
|
class: "bg-slate-50 text-slate-500 px-2.5 py-1 rounded-full text-[11px] font-medium border border-slate-100 hover:border-slate-200 hover:bg-slate-100 transition-colors cursor-default"
|
|
1221
1230
|
}, v(F), 1))), 128))
|
|
@@ -1223,7 +1232,23 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1223
1232
|
], 64)) : m.value ? (i(), d(A, { key: 1 }, [
|
|
1224
1233
|
t("div", Bo, [
|
|
1225
1234
|
t("div", Eo, [
|
|
1226
|
-
|
|
1235
|
+
a[10] || (a[10] = t("div", { class: "w-5 h-5 rounded-full bg-slate-100 hover:bg-sky-100 border border-slate-200 hover:border-sky-300 flex items-center justify-center cursor-help transition-colors duration-200" }, [
|
|
1236
|
+
t("svg", {
|
|
1237
|
+
class: "w-3 h-3 text-slate-400 group-hover/info:text-sky-500",
|
|
1238
|
+
fill: "currentColor",
|
|
1239
|
+
viewBox: "0 0 20 20"
|
|
1240
|
+
}, [
|
|
1241
|
+
t("path", {
|
|
1242
|
+
"fill-rule": "evenodd",
|
|
1243
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
|
|
1244
|
+
"clip-rule": "evenodd"
|
|
1245
|
+
})
|
|
1246
|
+
])
|
|
1247
|
+
], -1)),
|
|
1248
|
+
t("div", To, v(e.object.description), 1)
|
|
1249
|
+
]),
|
|
1250
|
+
t("div", Do, [
|
|
1251
|
+
e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (i(), d("div", Oo, [...a[11] || (a[11] = [
|
|
1227
1252
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1228
1253
|
t("svg", {
|
|
1229
1254
|
class: "w-6 h-6 mb-1 text-slate-400 group-hover/btn:text-white",
|
|
@@ -1235,15 +1260,15 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1235
1260
|
t("span", { class: "text-xs font-medium" }, "Mover")
|
|
1236
1261
|
], -1)
|
|
1237
1262
|
])])) : S("", !0),
|
|
1238
|
-
e.insideComponentBox && e.fullwidthMode ? (i(), d("div",
|
|
1263
|
+
e.insideComponentBox && e.fullwidthMode ? (i(), d("div", Ro, [
|
|
1239
1264
|
t("div", {
|
|
1240
1265
|
title: "Agregar componente a la columna",
|
|
1241
|
-
onClick:
|
|
1266
|
+
onClick: a[5] || (a[5] = (F) => {
|
|
1242
1267
|
var j;
|
|
1243
1268
|
return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
|
|
1244
1269
|
}),
|
|
1245
1270
|
class: "cursor-pointer flex items-center bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-6 py-3 rounded-xl shadow-md hover:shadow-lg transition-all duration-200"
|
|
1246
|
-
}, [...
|
|
1271
|
+
}, [...a[12] || (a[12] = [
|
|
1247
1272
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1248
1273
|
t("span", { class: "text-2xl mb-1" }, "🚀"),
|
|
1249
1274
|
t("span", { class: "text-sm font-medium" }, "Seleccionar")
|
|
@@ -1253,9 +1278,9 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1253
1278
|
e.insideComponentBox ? S("", !0) : (i(), d(A, { key: 2 }, [
|
|
1254
1279
|
t("div", {
|
|
1255
1280
|
title: "Configurar componente",
|
|
1256
|
-
onClick:
|
|
1281
|
+
onClick: a[6] || (a[6] = (F) => p.value = !p.value),
|
|
1257
1282
|
class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
|
|
1258
|
-
}, [...
|
|
1283
|
+
}, [...a[13] || (a[13] = [
|
|
1259
1284
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1260
1285
|
t("span", { class: "text-xl mb-1" }, "⚙️"),
|
|
1261
1286
|
t("span", { class: "text-xs font-medium" }, "Configurar")
|
|
@@ -1266,18 +1291,18 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1266
1291
|
onClick: R,
|
|
1267
1292
|
class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-amber-500 hover:border-amber-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
|
|
1268
1293
|
}, [
|
|
1269
|
-
t("div",
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (i(), d("span",
|
|
1294
|
+
t("div", Vo, [
|
|
1295
|
+
a[14] || (a[14] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
|
|
1296
|
+
a[15] || (a[15] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
|
|
1297
|
+
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (i(), d("span", zo, "Carga " + v(e.object.repeat_data.elementCount) + " elementos", 1)) : S("", !0)
|
|
1273
1298
|
])
|
|
1274
1299
|
]),
|
|
1275
1300
|
e.removeComponent ? (i(), d("div", {
|
|
1276
1301
|
key: 0,
|
|
1277
1302
|
title: "Eliminar componente",
|
|
1278
|
-
onClick:
|
|
1303
|
+
onClick: a[7] || (a[7] = (F) => e.removeComponent(e.object, e.section || "")),
|
|
1279
1304
|
class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-red-500 hover:border-red-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
|
|
1280
|
-
}, [...
|
|
1305
|
+
}, [...a[16] || (a[16] = [
|
|
1281
1306
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1282
1307
|
t("span", { class: "text-xl mb-1" }, "🗑️"),
|
|
1283
1308
|
t("span", { class: "text-xs font-medium" }, "Eliminar")
|
|
@@ -1299,19 +1324,19 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1299
1324
|
], 2)
|
|
1300
1325
|
]));
|
|
1301
1326
|
}
|
|
1302
|
-
}),
|
|
1327
|
+
}), Uo = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, qo = {
|
|
1303
1328
|
key: 0,
|
|
1304
1329
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1305
|
-
},
|
|
1330
|
+
}, Lo = { class: "text-slate-600" }, Go = {
|
|
1306
1331
|
key: 1,
|
|
1307
1332
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1308
|
-
},
|
|
1333
|
+
}, Ho = { class: "text-slate-600" }, Jo = {
|
|
1309
1334
|
key: 2,
|
|
1310
1335
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1311
|
-
},
|
|
1336
|
+
}, Wo = { class: "text-slate-600" }, Yo = {
|
|
1312
1337
|
key: 0,
|
|
1313
1338
|
class: "my-4 w-full rounded-xl bg-white border border-slate-200 p-4 z-10 hidden group-hover:block shadow-lg"
|
|
1314
|
-
},
|
|
1339
|
+
}, Ko = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, Qo = { class: "flex flex-col" }, Xo = ["for"], Zo = ["id"], _o = ["value"], en = { class: "flex flex-col" }, tn = ["for"], on = ["id"], nn = ["value"], ln = { class: "flex flex-col" }, an = ["for"], rn = ["id"], sn = ["value"], dn = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, un = { class: "flex justify-between gap-2 bg-white/90 backdrop-blur-sm rounded-t-xl px-3 py-1.5 shadow-sm border border-b-0 border-slate-200" }, cn = { class: "flex gap-1" }, mn = /* @__PURE__ */ W({
|
|
1315
1340
|
__name: "ColConfig",
|
|
1316
1341
|
props: {
|
|
1317
1342
|
globalPageConfiguration: Array,
|
|
@@ -1357,106 +1382,106 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1357
1382
|
{ label: "Fila (componentes unos al lado de otros)", value: "flex-row" }
|
|
1358
1383
|
]
|
|
1359
1384
|
}, $ = C(""), p = C(""), u = C(""), s = C(!1), m = Y(() => {
|
|
1360
|
-
var
|
|
1361
|
-
const I = (
|
|
1385
|
+
var l, r, f, R;
|
|
1386
|
+
const I = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
|
|
1362
1387
|
(P) => P.section === o.section
|
|
1363
|
-
), c = (R = (f = (
|
|
1388
|
+
), c = (R = (f = (r = I == null ? void 0 : I.rows) == null ? void 0 : r[o.rowIndex]) == null ? void 0 : f.columns) == null ? void 0 : R[o.columnIndex];
|
|
1364
1389
|
return (c == null ? void 0 : c.config) || {};
|
|
1365
1390
|
}), w = (I, c) => {
|
|
1366
1391
|
var R;
|
|
1367
|
-
const
|
|
1368
|
-
(R = o.updateColConfig) == null || R.call(o, I, c, o.section || "",
|
|
1392
|
+
const l = $.value || b.width[0].value, r = p.value || b.gap[0].value, f = u.value || "";
|
|
1393
|
+
(R = o.updateColConfig) == null || R.call(o, I, c, o.section || "", l, r, f), s.value = !1;
|
|
1369
1394
|
};
|
|
1370
1395
|
return (I, c) => (i(), d(A, null, [
|
|
1371
|
-
t("div",
|
|
1372
|
-
m.value.width !== void 0 ? (i(), d("span",
|
|
1373
|
-
c[12] || (c[12] =
|
|
1374
|
-
t("span",
|
|
1396
|
+
t("div", Uo, [
|
|
1397
|
+
m.value.width !== void 0 ? (i(), d("span", qo, [
|
|
1398
|
+
c[12] || (c[12] = E(" Ancho: ", -1)),
|
|
1399
|
+
t("span", Lo, v(m.value.width), 1)
|
|
1375
1400
|
])) : S("", !0),
|
|
1376
|
-
m.value.gap !== void 0 ? (i(), d("span",
|
|
1377
|
-
c[13] || (c[13] =
|
|
1378
|
-
t("span",
|
|
1401
|
+
m.value.gap !== void 0 ? (i(), d("span", Go, [
|
|
1402
|
+
c[13] || (c[13] = E(" Gap: ", -1)),
|
|
1403
|
+
t("span", Ho, v(m.value.gap), 1)
|
|
1379
1404
|
])) : S("", !0),
|
|
1380
|
-
m.value.flexDirection !== void 0 ? (i(), d("span",
|
|
1381
|
-
c[14] || (c[14] =
|
|
1382
|
-
t("span",
|
|
1405
|
+
m.value.flexDirection !== void 0 ? (i(), d("span", Jo, [
|
|
1406
|
+
c[14] || (c[14] = E(" Flex: ", -1)),
|
|
1407
|
+
t("span", Wo, v(m.value.flexDirection), 1)
|
|
1383
1408
|
])) : S("", !0)
|
|
1384
1409
|
]),
|
|
1385
|
-
s.value ? (i(), d("div",
|
|
1386
|
-
t("div",
|
|
1410
|
+
s.value ? (i(), d("div", Yo, [
|
|
1411
|
+
t("div", Ko, [
|
|
1387
1412
|
t("form", {
|
|
1388
1413
|
onSubmit: c[4] || (c[4] = le(() => {
|
|
1389
1414
|
}, ["prevent"])),
|
|
1390
1415
|
class: "flex gap-5 w-full justify-center items-end flex-wrap"
|
|
1391
1416
|
}, [
|
|
1392
|
-
t("div",
|
|
1417
|
+
t("div", Qo, [
|
|
1393
1418
|
t("label", {
|
|
1394
1419
|
for: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1395
1420
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1396
|
-
}, "Ancho:", 8,
|
|
1421
|
+
}, "Ancho:", 8, Xo),
|
|
1397
1422
|
O(t("select", {
|
|
1398
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
1423
|
+
"onUpdate:modelValue": c[0] || (c[0] = (l) => $.value = l),
|
|
1399
1424
|
id: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1400
1425
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
|
|
1401
1426
|
}, [
|
|
1402
1427
|
c[15] || (c[15] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1403
|
-
(i(!0), d(A, null,
|
|
1404
|
-
key:
|
|
1405
|
-
value:
|
|
1406
|
-
}, v(
|
|
1407
|
-
], 8,
|
|
1408
|
-
[
|
|
1428
|
+
(i(!0), d(A, null, V(b.width, (l) => (i(), d("option", {
|
|
1429
|
+
key: l.value,
|
|
1430
|
+
value: l.value
|
|
1431
|
+
}, v(l.label), 9, _o))), 128))
|
|
1432
|
+
], 8, Zo), [
|
|
1433
|
+
[J, $.value]
|
|
1409
1434
|
])
|
|
1410
1435
|
]),
|
|
1411
|
-
t("div",
|
|
1436
|
+
t("div", en, [
|
|
1412
1437
|
t("label", {
|
|
1413
1438
|
for: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1414
1439
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1415
|
-
}, "Gap:", 8,
|
|
1440
|
+
}, "Gap:", 8, tn),
|
|
1416
1441
|
O(t("select", {
|
|
1417
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
1442
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => p.value = l),
|
|
1418
1443
|
id: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1419
1444
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
|
|
1420
1445
|
}, [
|
|
1421
1446
|
c[16] || (c[16] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1422
|
-
(i(!0), d(A, null,
|
|
1423
|
-
key:
|
|
1424
|
-
value:
|
|
1425
|
-
}, v(
|
|
1426
|
-
], 8,
|
|
1427
|
-
[
|
|
1447
|
+
(i(!0), d(A, null, V(b.gap, (l) => (i(), d("option", {
|
|
1448
|
+
key: l.value,
|
|
1449
|
+
value: l.value
|
|
1450
|
+
}, v(l.label), 9, nn))), 128))
|
|
1451
|
+
], 8, on), [
|
|
1452
|
+
[J, p.value]
|
|
1428
1453
|
])
|
|
1429
1454
|
]),
|
|
1430
|
-
t("div",
|
|
1455
|
+
t("div", ln, [
|
|
1431
1456
|
t("label", {
|
|
1432
1457
|
for: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1433
1458
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1434
|
-
}, "Dirección:", 8,
|
|
1459
|
+
}, "Dirección:", 8, an),
|
|
1435
1460
|
O(t("select", {
|
|
1436
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1461
|
+
"onUpdate:modelValue": c[2] || (c[2] = (l) => u.value = l),
|
|
1437
1462
|
id: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1438
1463
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
|
|
1439
1464
|
}, [
|
|
1440
1465
|
c[17] || (c[17] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1441
|
-
(i(!0), d(A, null,
|
|
1442
|
-
key:
|
|
1443
|
-
value:
|
|
1444
|
-
}, v(
|
|
1445
|
-
], 8,
|
|
1446
|
-
[
|
|
1466
|
+
(i(!0), d(A, null, V(b.flexDirection, (l) => (i(), d("option", {
|
|
1467
|
+
key: l.value,
|
|
1468
|
+
value: l.value
|
|
1469
|
+
}, v(l.label), 9, sn))), 128))
|
|
1470
|
+
], 8, rn), [
|
|
1471
|
+
[J, u.value]
|
|
1447
1472
|
])
|
|
1448
1473
|
]),
|
|
1449
1474
|
t("button", {
|
|
1450
1475
|
type: "button",
|
|
1451
1476
|
class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
|
|
1452
|
-
onClick: c[3] || (c[3] = (
|
|
1477
|
+
onClick: c[3] || (c[3] = (l) => {
|
|
1453
1478
|
w(e.rowIndex, e.columnIndex), s.value = !1;
|
|
1454
1479
|
})
|
|
1455
1480
|
}, " Guardar ")
|
|
1456
1481
|
], 32)
|
|
1457
1482
|
])
|
|
1458
1483
|
])) : S("", !0),
|
|
1459
|
-
t("div",
|
|
1484
|
+
t("div", dn, [
|
|
1460
1485
|
t("div", {
|
|
1461
1486
|
class: G(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
|
|
1462
1487
|
}, [
|
|
@@ -1464,44 +1489,44 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1464
1489
|
key: 0,
|
|
1465
1490
|
type: "button",
|
|
1466
1491
|
title: "Añadir columna a la izquierda",
|
|
1467
|
-
onClick: c[5] || (c[5] = (
|
|
1468
|
-
var
|
|
1469
|
-
return (
|
|
1492
|
+
onClick: c[5] || (c[5] = (l) => {
|
|
1493
|
+
var r;
|
|
1494
|
+
return (r = e.addCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1470
1495
|
}),
|
|
1471
1496
|
class: "ms-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
|
|
1472
1497
|
}, "+")) : S("", !0),
|
|
1473
|
-
t("div",
|
|
1498
|
+
t("div", un, [
|
|
1474
1499
|
t("button", {
|
|
1475
1500
|
type: "button",
|
|
1476
1501
|
title: "Configurar columna",
|
|
1477
|
-
onClick: c[6] || (c[6] = (
|
|
1502
|
+
onClick: c[6] || (c[6] = (l) => s.value = !s.value),
|
|
1478
1503
|
class: G(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", s.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
|
|
1479
1504
|
}, "⚙️", 2),
|
|
1480
|
-
t("div",
|
|
1505
|
+
t("div", cn, [
|
|
1481
1506
|
e.section && e.section !== "Sidebar" ? (i(), d("span", {
|
|
1482
1507
|
key: 0,
|
|
1483
1508
|
title: "Mover columna a la izquierda",
|
|
1484
|
-
onClick: c[7] || (c[7] = (
|
|
1485
|
-
var
|
|
1486
|
-
return (
|
|
1509
|
+
onClick: c[7] || (c[7] = (l) => {
|
|
1510
|
+
var r;
|
|
1511
|
+
return (r = e.moveCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1487
1512
|
}),
|
|
1488
1513
|
class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
|
|
1489
1514
|
}, "◁")) : S("", !0),
|
|
1490
1515
|
e.fullwidthMode ? (i(), d("span", {
|
|
1491
1516
|
key: 1,
|
|
1492
1517
|
title: "Añadir componente",
|
|
1493
|
-
onClick: c[8] || (c[8] = (
|
|
1494
|
-
var
|
|
1495
|
-
return (
|
|
1518
|
+
onClick: c[8] || (c[8] = (l) => {
|
|
1519
|
+
var r;
|
|
1520
|
+
return (r = e.addComponentFunction) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1496
1521
|
}),
|
|
1497
1522
|
class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-violet-500 hover:text-white"
|
|
1498
1523
|
}, " 📦 ")) : S("", !0),
|
|
1499
1524
|
e.section && e.section !== "Sidebar" ? (i(), d("span", {
|
|
1500
1525
|
key: 2,
|
|
1501
1526
|
title: "Mover columna a la derecha",
|
|
1502
|
-
onClick: c[9] || (c[9] = (
|
|
1503
|
-
var
|
|
1504
|
-
return (
|
|
1527
|
+
onClick: c[9] || (c[9] = (l) => {
|
|
1528
|
+
var r;
|
|
1529
|
+
return (r = e.moveCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1505
1530
|
}),
|
|
1506
1531
|
class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
|
|
1507
1532
|
}, "▷ ")) : S("", !0)
|
|
@@ -1509,9 +1534,9 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1509
1534
|
t("button", {
|
|
1510
1535
|
type: "button",
|
|
1511
1536
|
title: "Eliminar columna",
|
|
1512
|
-
onClick: c[10] || (c[10] = (
|
|
1513
|
-
var
|
|
1514
|
-
return (
|
|
1537
|
+
onClick: c[10] || (c[10] = (l) => {
|
|
1538
|
+
var r;
|
|
1539
|
+
return (r = e.removeCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1515
1540
|
}),
|
|
1516
1541
|
class: "bg-slate-100 px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200 text-slate-600 hover:bg-red-500 hover:text-white"
|
|
1517
1542
|
}, "🗑️")
|
|
@@ -1520,9 +1545,9 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1520
1545
|
key: 1,
|
|
1521
1546
|
type: "button",
|
|
1522
1547
|
title: "Añadir columna a la derecha",
|
|
1523
|
-
onClick: c[11] || (c[11] = (
|
|
1524
|
-
var
|
|
1525
|
-
return (
|
|
1548
|
+
onClick: c[11] || (c[11] = (l) => {
|
|
1549
|
+
var r;
|
|
1550
|
+
return (r = e.addCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1526
1551
|
}),
|
|
1527
1552
|
class: "me-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
|
|
1528
1553
|
}, "+")) : S("", !0)
|
|
@@ -1530,19 +1555,19 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1530
1555
|
])
|
|
1531
1556
|
], 64));
|
|
1532
1557
|
}
|
|
1533
|
-
}),
|
|
1558
|
+
}), bn = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden group-hover/row:flex css-pb-row-config" }, gn = { class: "flex gap-1.5" }, fn = { class: "flex gap-4 items-center" }, pn = { class: "inline-block" }, vn = {
|
|
1534
1559
|
key: 0,
|
|
1535
1560
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1536
|
-
},
|
|
1561
|
+
}, xn = { class: "text-slate-600" }, hn = {
|
|
1537
1562
|
key: 1,
|
|
1538
1563
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1539
|
-
},
|
|
1564
|
+
}, wn = { class: "text-slate-600" }, yn = {
|
|
1540
1565
|
key: 2,
|
|
1541
1566
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1542
|
-
},
|
|
1567
|
+
}, Cn = { class: "text-slate-600" }, $n = { class: "flex gap-1.5" }, kn = {
|
|
1543
1568
|
key: 0,
|
|
1544
1569
|
class: "z-1"
|
|
1545
|
-
},
|
|
1570
|
+
}, Sn = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, Fn = { class: "flex flex-col" }, Pn = ["for"], jn = ["id"], Mn = ["value"], In = { class: "flex flex-col" }, An = ["for"], Bn = ["id"], En = ["value"], Tn = { class: "flex flex-col" }, Dn = ["for"], On = ["id"], Rn = ["value"], Vn = /* @__PURE__ */ W({
|
|
1546
1571
|
__name: "RowConfig",
|
|
1547
1572
|
props: {
|
|
1548
1573
|
rowIndex: {
|
|
@@ -1584,24 +1609,24 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1584
1609
|
{ label: "4/5", value: "4/5" }
|
|
1585
1610
|
]
|
|
1586
1611
|
}, $ = C(""), p = C(""), u = C(""), s = C(!1), m = C(!1), w = Y(() => {
|
|
1587
|
-
var
|
|
1588
|
-
const c = (
|
|
1612
|
+
var l, r;
|
|
1613
|
+
const c = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
|
|
1589
1614
|
(f) => f.section === o.section
|
|
1590
1615
|
);
|
|
1591
|
-
return (
|
|
1616
|
+
return (r = c == null ? void 0 : c.rows) != null && r[o.rowIndex] ? c.rows[o.rowIndex].config || {} : {};
|
|
1592
1617
|
}), I = (c) => {
|
|
1593
1618
|
var R;
|
|
1594
|
-
const
|
|
1595
|
-
(R = o.updateRowConfig) == null || R.call(o, c, o.section || "",
|
|
1619
|
+
const l = $.value || b.padding[0].value, r = p.value || b.gap[0].value, f = u.value || b.width[0].value;
|
|
1620
|
+
(R = o.updateRowConfig) == null || R.call(o, c, o.section || "", l, r, f), s.value = !1;
|
|
1596
1621
|
};
|
|
1597
|
-
return (c,
|
|
1598
|
-
t("div",
|
|
1622
|
+
return (c, l) => (i(), d(A, null, [
|
|
1623
|
+
t("div", bn, [
|
|
1599
1624
|
t("div", null, [
|
|
1600
|
-
t("div",
|
|
1625
|
+
t("div", gn, [
|
|
1601
1626
|
t("button", {
|
|
1602
1627
|
type: "button",
|
|
1603
1628
|
title: "Agregar fila",
|
|
1604
|
-
onClick:
|
|
1629
|
+
onClick: l[0] || (l[0] = (r) => {
|
|
1605
1630
|
var f;
|
|
1606
1631
|
(f = e.addRow) == null || f.call(e, e.rowIndex, e.section || ""), m.value = !1;
|
|
1607
1632
|
}),
|
|
@@ -1610,7 +1635,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1610
1635
|
t("button", {
|
|
1611
1636
|
type: "button",
|
|
1612
1637
|
title: "Mover fila hacia arriba",
|
|
1613
|
-
onClick:
|
|
1638
|
+
onClick: l[1] || (l[1] = (r) => {
|
|
1614
1639
|
var f;
|
|
1615
1640
|
(f = e.moveRow) == null || f.call(e, e.rowIndex, e.section || "", "up"), m.value = !1;
|
|
1616
1641
|
}),
|
|
@@ -1619,7 +1644,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1619
1644
|
t("button", {
|
|
1620
1645
|
type: "button",
|
|
1621
1646
|
title: "Mover fila hacia abajo",
|
|
1622
|
-
onClick:
|
|
1647
|
+
onClick: l[2] || (l[2] = (r) => {
|
|
1623
1648
|
var f;
|
|
1624
1649
|
(f = e.moveRow) == null || f.call(e, e.rowIndex, e.section || "", "down"), m.value = !1;
|
|
1625
1650
|
}),
|
|
@@ -1627,34 +1652,34 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1627
1652
|
}, "▽")
|
|
1628
1653
|
])
|
|
1629
1654
|
]),
|
|
1630
|
-
t("div",
|
|
1631
|
-
t("div",
|
|
1655
|
+
t("div", fn, [
|
|
1656
|
+
t("div", pn, [
|
|
1632
1657
|
t("button", {
|
|
1633
1658
|
type: "button",
|
|
1634
1659
|
title: "Configurar la fila",
|
|
1635
|
-
onClick:
|
|
1660
|
+
onClick: l[3] || (l[3] = (r) => s.value = !s.value),
|
|
1636
1661
|
class: G(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", s.value ? "bg-amber-100 border-amber-300 text-amber-700" : "bg-white border-slate-200 text-slate-600 hover:bg-amber-500 hover:border-amber-500 hover:text-white"])
|
|
1637
1662
|
}, "⚙️", 2)
|
|
1638
1663
|
]),
|
|
1639
|
-
w.value.padding !== void 0 ? (i(), d("span",
|
|
1640
|
-
|
|
1641
|
-
t("span",
|
|
1664
|
+
w.value.padding !== void 0 ? (i(), d("span", vn, [
|
|
1665
|
+
l[10] || (l[10] = E(" Padding: ", -1)),
|
|
1666
|
+
t("span", xn, v(w.value.padding), 1)
|
|
1642
1667
|
])) : S("", !0),
|
|
1643
|
-
w.value.gap !== void 0 ? (i(), d("span",
|
|
1644
|
-
|
|
1645
|
-
t("span",
|
|
1668
|
+
w.value.gap !== void 0 ? (i(), d("span", hn, [
|
|
1669
|
+
l[11] || (l[11] = E(" Gap: ", -1)),
|
|
1670
|
+
t("span", wn, v(w.value.gap), 1)
|
|
1646
1671
|
])) : S("", !0),
|
|
1647
|
-
w.value.width !== void 0 ? (i(), d("span",
|
|
1648
|
-
|
|
1649
|
-
t("span",
|
|
1672
|
+
w.value.width !== void 0 ? (i(), d("span", yn, [
|
|
1673
|
+
l[12] || (l[12] = E(" Ancho: ", -1)),
|
|
1674
|
+
t("span", Cn, v(w.value.width), 1)
|
|
1650
1675
|
])) : S("", !0)
|
|
1651
1676
|
]),
|
|
1652
1677
|
t("div", null, [
|
|
1653
|
-
t("div",
|
|
1678
|
+
t("div", $n, [
|
|
1654
1679
|
t("button", {
|
|
1655
1680
|
type: "button",
|
|
1656
1681
|
title: "Eliminar fila",
|
|
1657
|
-
onClick:
|
|
1682
|
+
onClick: l[4] || (l[4] = (r) => {
|
|
1658
1683
|
var f;
|
|
1659
1684
|
(f = e.removeRow) == null || f.call(e, e.rowIndex, e.section || ""), m.value = !1;
|
|
1660
1685
|
}),
|
|
@@ -1663,74 +1688,74 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1663
1688
|
])
|
|
1664
1689
|
])
|
|
1665
1690
|
]),
|
|
1666
|
-
s.value ? (i(), d("div",
|
|
1667
|
-
t("div",
|
|
1691
|
+
s.value ? (i(), d("div", kn, [
|
|
1692
|
+
t("div", Sn, [
|
|
1668
1693
|
t("form", {
|
|
1669
|
-
onSubmit:
|
|
1694
|
+
onSubmit: l[9] || (l[9] = le(() => {
|
|
1670
1695
|
}, ["prevent"])),
|
|
1671
1696
|
class: "flex gap-6 w-full justify-center items-end flex-wrap"
|
|
1672
1697
|
}, [
|
|
1673
|
-
t("div",
|
|
1698
|
+
t("div", Fn, [
|
|
1674
1699
|
t("label", {
|
|
1675
1700
|
for: `padding-${e.rowIndex}`,
|
|
1676
1701
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1677
|
-
}, "Padding:", 8,
|
|
1702
|
+
}, "Padding:", 8, Pn),
|
|
1678
1703
|
O(t("select", {
|
|
1679
|
-
"onUpdate:modelValue":
|
|
1704
|
+
"onUpdate:modelValue": l[5] || (l[5] = (r) => $.value = r),
|
|
1680
1705
|
id: `padding-${e.rowIndex}`,
|
|
1681
1706
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
|
|
1682
1707
|
}, [
|
|
1683
|
-
|
|
1684
|
-
(i(!0), d(A, null,
|
|
1685
|
-
key:
|
|
1686
|
-
value:
|
|
1687
|
-
}, v(
|
|
1688
|
-
], 8,
|
|
1689
|
-
[
|
|
1708
|
+
l[13] || (l[13] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1709
|
+
(i(!0), d(A, null, V(b.padding, (r) => (i(), d("option", {
|
|
1710
|
+
key: r.value,
|
|
1711
|
+
value: r.value
|
|
1712
|
+
}, v(r.label), 9, Mn))), 128))
|
|
1713
|
+
], 8, jn), [
|
|
1714
|
+
[J, $.value]
|
|
1690
1715
|
])
|
|
1691
1716
|
]),
|
|
1692
|
-
t("div",
|
|
1717
|
+
t("div", In, [
|
|
1693
1718
|
t("label", {
|
|
1694
1719
|
for: `gap-${e.rowIndex}`,
|
|
1695
1720
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1696
|
-
}, "Gap:", 8,
|
|
1721
|
+
}, "Gap:", 8, An),
|
|
1697
1722
|
O(t("select", {
|
|
1698
|
-
"onUpdate:modelValue":
|
|
1723
|
+
"onUpdate:modelValue": l[6] || (l[6] = (r) => p.value = r),
|
|
1699
1724
|
id: `gap-${e.rowIndex}`,
|
|
1700
1725
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
|
|
1701
1726
|
}, [
|
|
1702
|
-
|
|
1703
|
-
(i(!0), d(A, null,
|
|
1704
|
-
key:
|
|
1705
|
-
value:
|
|
1706
|
-
}, v(
|
|
1707
|
-
], 8,
|
|
1708
|
-
[
|
|
1727
|
+
l[14] || (l[14] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1728
|
+
(i(!0), d(A, null, V(b.gap, (r) => (i(), d("option", {
|
|
1729
|
+
key: r.value,
|
|
1730
|
+
value: r.value
|
|
1731
|
+
}, v(r.label), 9, En))), 128))
|
|
1732
|
+
], 8, Bn), [
|
|
1733
|
+
[J, p.value]
|
|
1709
1734
|
])
|
|
1710
1735
|
]),
|
|
1711
|
-
t("div",
|
|
1736
|
+
t("div", Tn, [
|
|
1712
1737
|
t("label", {
|
|
1713
1738
|
for: `width-${e.rowIndex}`,
|
|
1714
1739
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1715
|
-
}, "Ancho:", 8,
|
|
1740
|
+
}, "Ancho:", 8, Dn),
|
|
1716
1741
|
O(t("select", {
|
|
1717
|
-
"onUpdate:modelValue":
|
|
1742
|
+
"onUpdate:modelValue": l[7] || (l[7] = (r) => u.value = r),
|
|
1718
1743
|
id: `width-${e.rowIndex}`,
|
|
1719
1744
|
class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
|
|
1720
1745
|
}, [
|
|
1721
|
-
|
|
1722
|
-
(i(!0), d(A, null,
|
|
1723
|
-
key:
|
|
1724
|
-
value:
|
|
1725
|
-
}, v(
|
|
1726
|
-
], 8,
|
|
1727
|
-
[
|
|
1746
|
+
l[15] || (l[15] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1747
|
+
(i(!0), d(A, null, V(b.width, (r) => (i(), d("option", {
|
|
1748
|
+
key: r.value,
|
|
1749
|
+
value: r.value
|
|
1750
|
+
}, v(r.label), 9, Rn))), 128))
|
|
1751
|
+
], 8, On), [
|
|
1752
|
+
[J, u.value]
|
|
1728
1753
|
])
|
|
1729
1754
|
]),
|
|
1730
1755
|
t("button", {
|
|
1731
1756
|
type: "button",
|
|
1732
1757
|
class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
|
|
1733
|
-
onClick:
|
|
1758
|
+
onClick: l[8] || (l[8] = (r) => {
|
|
1734
1759
|
I(e.rowIndex), m.value = !1;
|
|
1735
1760
|
})
|
|
1736
1761
|
}, " Guardar ")
|
|
@@ -1739,7 +1764,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1739
1764
|
])) : S("", !0)
|
|
1740
1765
|
], 64));
|
|
1741
1766
|
}
|
|
1742
|
-
}),
|
|
1767
|
+
}), zn = ["id"], Nn = { class: "flex flex-row w-full gap-3 mt-6" }, Un = ["id"], qn = /* @__PURE__ */ W({
|
|
1743
1768
|
__name: "BodySection",
|
|
1744
1769
|
props: {
|
|
1745
1770
|
isComponentMode: Boolean,
|
|
@@ -1770,12 +1795,12 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1770
1795
|
);
|
|
1771
1796
|
return (p == null ? void 0 : p.rows) || [];
|
|
1772
1797
|
});
|
|
1773
|
-
return (p, u) => (i(!0), d(A, null,
|
|
1798
|
+
return (p, u) => (i(!0), d(A, null, V($.value, (s, m) => (i(), d("div", {
|
|
1774
1799
|
key: "row-" + m,
|
|
1775
1800
|
id: "row-" + e.sectionSelected + "-" + m,
|
|
1776
1801
|
class: "flex flex-col gap-3 w-full p-5 bg-white border border-slate-200 rounded-2xl js-row relative items-center hover:border-slate-300 hover:shadow-lg transition-all duration-300 css-pb-row group/row"
|
|
1777
1802
|
}, [
|
|
1778
|
-
L(
|
|
1803
|
+
L(Vn, {
|
|
1779
1804
|
moveRow: e.moveRow,
|
|
1780
1805
|
addRow: e.addRow,
|
|
1781
1806
|
removeRow: e.removeRow,
|
|
@@ -1785,7 +1810,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1785
1810
|
section: e.sectionSelected
|
|
1786
1811
|
}, null, 8, ["moveRow", "addRow", "removeRow", "globalPageConfiguration", "updateRowConfig", "rowIndex", "section"]),
|
|
1787
1812
|
t("div", Nn, [
|
|
1788
|
-
(i(!0), d(A, null,
|
|
1813
|
+
(i(!0), d(A, null, V(s.columns, (w, I) => (i(), d("div", {
|
|
1789
1814
|
class: G([
|
|
1790
1815
|
"hover:shadow-md overflow-hidden dragging-zone border relative border-slate-200 shadow-sm w-full p-5 pt-10 min-h-[200px] rounded-xl flex flex-col gap-3 items-center before:content-['Columna'] before:absolute before:text-slate-300 before:text-7xl before:font-bold before:bottom-4 before:left-2 before:-rotate-12 before:opacity-30 before:duration-300 before:transition-opacity group hover:before:opacity-50 transition-all duration-300",
|
|
1791
1816
|
b.value ? "bg-gradient-to-b from-emerald-50 to-emerald-100 border-emerald-300 shadow-emerald-100" : "bg-gradient-to-b from-slate-50 to-slate-100"
|
|
@@ -1814,7 +1839,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1814
1839
|
]),
|
|
1815
1840
|
_: 1
|
|
1816
1841
|
}, 8, ["list"]),
|
|
1817
|
-
L(
|
|
1842
|
+
L(mn, {
|
|
1818
1843
|
section: e.sectionSelected,
|
|
1819
1844
|
globalPageConfiguration: e.globalPageConfiguration,
|
|
1820
1845
|
updateColConfig: e.updateColConfig,
|
|
@@ -1826,11 +1851,11 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1826
1851
|
rowIndex: m,
|
|
1827
1852
|
columnIndex: I
|
|
1828
1853
|
}, null, 8, ["section", "globalPageConfiguration", "updateColConfig", "addComponentFunction", "fullwidthMode", "addCol", "removeCol", "moveCol", "rowIndex", "columnIndex"])
|
|
1829
|
-
], 10,
|
|
1854
|
+
], 10, Un))), 128))
|
|
1830
1855
|
])
|
|
1831
|
-
], 8,
|
|
1856
|
+
], 8, zn))), 128));
|
|
1832
1857
|
}
|
|
1833
|
-
}),
|
|
1858
|
+
}), Ln = { class: "flex justify-between items-center mb-4" }, Gn = { class: "text-xs" }, Hn = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, Jn = ["value", "checked"], Wn = { class: "my-3" }, Yn = { class: "relative" }, Kn = { class: "component-library dragging-zone w-full p-5 min-h-[200px] border border-slate-200 bg-white rounded-xl flex flex-col gap-4 items-center shadow-sm" }, Qn = {
|
|
1834
1859
|
key: 0,
|
|
1835
1860
|
class: "text-center py-8 text-slate-400"
|
|
1836
1861
|
}, de = /* @__PURE__ */ W({
|
|
@@ -1860,25 +1885,25 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1860
1885
|
"Título",
|
|
1861
1886
|
"SEO"
|
|
1862
1887
|
], $ = Y(() => !o.excludedCategories || o.excludedCategories.length === 0 ? b : b.filter((c) => !o.excludedCategories.includes(c))), p = C(!0), u = C([]), s = C(""), m = Y(() => {
|
|
1863
|
-
const c = s.value.toLowerCase(),
|
|
1864
|
-
return u.value.length > 0 ?
|
|
1865
|
-
(f) => u.value.includes(f.category) &&
|
|
1866
|
-
) :
|
|
1888
|
+
const c = s.value.toLowerCase(), l = Object.values(o.components), r = (f) => (f.name.toLowerCase() + f.description.toLowerCase() + f.tags.join(" ").toLowerCase()).includes(c);
|
|
1889
|
+
return u.value.length > 0 ? l.filter(
|
|
1890
|
+
(f) => u.value.includes(f.category) && r(f)
|
|
1891
|
+
) : l.filter(r);
|
|
1867
1892
|
}), w = (c) => {
|
|
1868
1893
|
s.value = c.target.value;
|
|
1869
1894
|
}, I = (c) => {
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1895
|
+
const l = c.target, r = l.value;
|
|
1896
|
+
l.checked ? u.value.includes(r) || u.value.push(r) : u.value = u.value.filter((f) => f !== r);
|
|
1872
1897
|
};
|
|
1873
|
-
return (c,
|
|
1874
|
-
|
|
1875
|
-
t("div",
|
|
1898
|
+
return (c, l) => (i(), d(A, null, [
|
|
1899
|
+
l[6] || (l[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
|
|
1900
|
+
t("div", Ln, [
|
|
1876
1901
|
t("button", {
|
|
1877
1902
|
type: "button",
|
|
1878
|
-
onClick:
|
|
1903
|
+
onClick: l[0] || (l[0] = (r) => p.value = !p.value),
|
|
1879
1904
|
class: "mb-3 px-4 py-2 bg-white rounded-lg border border-slate-200 hover:border-slate-300 hover:shadow-sm transition-all duration-200 cursor-pointer text-slate-600 font-medium flex items-center gap-2"
|
|
1880
1905
|
}, [
|
|
1881
|
-
|
|
1906
|
+
l[2] || (l[2] = t("svg", {
|
|
1882
1907
|
class: "w-4 h-4",
|
|
1883
1908
|
fill: "none",
|
|
1884
1909
|
stroke: "currentColor",
|
|
@@ -1891,38 +1916,38 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1891
1916
|
d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
|
|
1892
1917
|
})
|
|
1893
1918
|
], -1)),
|
|
1894
|
-
|
|
1895
|
-
t("span",
|
|
1919
|
+
l[3] || (l[3] = t("span", null, "Filtros", -1)),
|
|
1920
|
+
t("span", Gn, v(p.value ? "▲" : "▼"), 1)
|
|
1896
1921
|
]),
|
|
1897
1922
|
t("button", {
|
|
1898
1923
|
type: "button",
|
|
1899
1924
|
class: G([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
|
|
1900
|
-
onClick:
|
|
1925
|
+
onClick: l[1] || (l[1] = (r) => {
|
|
1901
1926
|
var f;
|
|
1902
1927
|
return (f = e.toggleComponentModeFunction) == null ? void 0 : f.call(e);
|
|
1903
1928
|
})
|
|
1904
1929
|
}, v(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
|
|
1905
1930
|
]),
|
|
1906
|
-
O(t("div",
|
|
1907
|
-
(i(!0), d(A, null,
|
|
1908
|
-
key:
|
|
1909
|
-
class: G(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": u.value.includes(
|
|
1931
|
+
O(t("div", Hn, [
|
|
1932
|
+
(i(!0), d(A, null, V($.value, (r) => (i(), d("label", {
|
|
1933
|
+
key: r,
|
|
1934
|
+
class: G(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": u.value.includes(r) }])
|
|
1910
1935
|
}, [
|
|
1911
1936
|
t("input", {
|
|
1912
1937
|
type: "checkbox",
|
|
1913
|
-
value:
|
|
1914
|
-
checked: u.value.includes(
|
|
1938
|
+
value: r,
|
|
1939
|
+
checked: u.value.includes(r),
|
|
1915
1940
|
onInput: I,
|
|
1916
1941
|
class: "w-4 h-4 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500"
|
|
1917
|
-
}, null, 40,
|
|
1918
|
-
|
|
1942
|
+
}, null, 40, Jn),
|
|
1943
|
+
E(" " + v(r), 1)
|
|
1919
1944
|
], 2))), 128))
|
|
1920
1945
|
], 512), [
|
|
1921
1946
|
[xe, p.value]
|
|
1922
1947
|
]),
|
|
1923
|
-
t("div",
|
|
1924
|
-
t("div",
|
|
1925
|
-
|
|
1948
|
+
t("div", Wn, [
|
|
1949
|
+
t("div", Yn, [
|
|
1950
|
+
l[4] || (l[4] = t("svg", {
|
|
1926
1951
|
class: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400",
|
|
1927
1952
|
fill: "none",
|
|
1928
1953
|
stroke: "currentColor",
|
|
@@ -1943,18 +1968,18 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1943
1968
|
}, null, 32)
|
|
1944
1969
|
])
|
|
1945
1970
|
]),
|
|
1946
|
-
t("div",
|
|
1971
|
+
t("div", Kn, [
|
|
1947
1972
|
L(q(me), {
|
|
1948
1973
|
class: "w-full flex flex-col gap-4",
|
|
1949
1974
|
list: m.value,
|
|
1950
1975
|
group: { name: "draggingGroup", pull: "clone", put: !1 },
|
|
1951
1976
|
itemKey: "name",
|
|
1952
|
-
clone: (
|
|
1977
|
+
clone: (r) => JSON.parse(JSON.stringify(r))
|
|
1953
1978
|
}, {
|
|
1954
|
-
item: ce(({ element:
|
|
1979
|
+
item: ce(({ element: r }) => [
|
|
1955
1980
|
L(be, {
|
|
1956
1981
|
renderApiDomain: e.renderApiDomain,
|
|
1957
|
-
object:
|
|
1982
|
+
object: r,
|
|
1958
1983
|
"is-component-mode": e.isComponentMode,
|
|
1959
1984
|
fullwidthMode: e.fullwidthMode,
|
|
1960
1985
|
columnToInsert: e.columnToInsert,
|
|
@@ -1965,7 +1990,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1965
1990
|
]),
|
|
1966
1991
|
_: 1
|
|
1967
1992
|
}, 8, ["list", "clone"]),
|
|
1968
|
-
m.value.length === 0 ? (i(), d("div",
|
|
1993
|
+
m.value.length === 0 ? (i(), d("div", Qn, [...l[5] || (l[5] = [
|
|
1969
1994
|
t("svg", {
|
|
1970
1995
|
class: "w-12 h-12 mx-auto mb-3 opacity-50",
|
|
1971
1996
|
fill: "none",
|
|
@@ -1985,10 +2010,10 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1985
2010
|
])
|
|
1986
2011
|
], 64));
|
|
1987
2012
|
}
|
|
1988
|
-
}),
|
|
2013
|
+
}), Xn = { class: "flex flex-col w-full transition-all duration-300 lf-page-builder bg-gradient-to-br from-slate-50 to-slate-100 min-h-screen" }, Zn = { class: "relative flex flex-row flex-wrap" }, _n = { class: "w-full flex justify-end py-4 pe-4" }, el = { class: "w-3/4" }, tl = {
|
|
1989
2014
|
key: 1,
|
|
1990
2015
|
class: "w-1/4 px-3 overflow-y-auto h-screen sticky top-0"
|
|
1991
|
-
},
|
|
2016
|
+
}, rl = /* @__PURE__ */ W({
|
|
1992
2017
|
__name: "Pagebuilder",
|
|
1993
2018
|
props: {
|
|
1994
2019
|
isProduction: { type: Boolean },
|
|
@@ -2002,7 +2027,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2002
2027
|
"Repetidor",
|
|
2003
2028
|
// Siempre excluido
|
|
2004
2029
|
...o.excludeComponentTypes ?? []
|
|
2005
|
-
], m = b ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", w = C(!0), I = C(void 0), c = C([]),
|
|
2030
|
+
], m = b ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", w = C(!0), I = C(void 0), c = C([]), l = C({ rowIndex: null, columnIndex: null, section: null }), r = C(!1), f = C(!1), R = Y(() => {
|
|
2006
2031
|
const y = we();
|
|
2007
2032
|
if (s.length === 0)
|
|
2008
2033
|
return y;
|
|
@@ -2046,9 +2071,9 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2046
2071
|
}
|
|
2047
2072
|
]);
|
|
2048
2073
|
ae(() => {
|
|
2049
|
-
|
|
2074
|
+
n();
|
|
2050
2075
|
});
|
|
2051
|
-
const
|
|
2076
|
+
const n = () => {
|
|
2052
2077
|
if (c.value = ["Header", "Footer", "Body", "Sidebar"], I.value = "Body", u) {
|
|
2053
2078
|
const y = document.getElementById(u);
|
|
2054
2079
|
if (y) {
|
|
@@ -2062,27 +2087,27 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2062
2087
|
}
|
|
2063
2088
|
}
|
|
2064
2089
|
}
|
|
2065
|
-
},
|
|
2090
|
+
}, a = () => {
|
|
2066
2091
|
f.value = !f.value;
|
|
2067
2092
|
}, F = () => {
|
|
2068
2093
|
w.value = !w.value;
|
|
2069
2094
|
}, j = (y, h, x, k, M) => {
|
|
2070
2095
|
var D;
|
|
2071
|
-
const
|
|
2072
|
-
(D =
|
|
2096
|
+
const T = g.find((z) => z.section === h);
|
|
2097
|
+
(D = T == null ? void 0 : T.rows) != null && D[y] && (T.rows[y].config = {
|
|
2073
2098
|
padding: x,
|
|
2074
2099
|
gap: k,
|
|
2075
2100
|
width: M
|
|
2076
2101
|
});
|
|
2077
|
-
}, B = (y, h, x, k, M,
|
|
2078
|
-
var
|
|
2102
|
+
}, B = (y, h, x, k, M, T) => {
|
|
2103
|
+
var z, U, K;
|
|
2079
2104
|
const D = g.find((Z) => Z.section === x);
|
|
2080
|
-
(K = (
|
|
2105
|
+
(K = (U = (z = D == null ? void 0 : D.rows) == null ? void 0 : z[y]) == null ? void 0 : U.columns) != null && K[h] && (D.rows[y].columns[h].config = {
|
|
2081
2106
|
width: k,
|
|
2082
2107
|
gap: M,
|
|
2083
|
-
flexDirection:
|
|
2108
|
+
flexDirection: T
|
|
2084
2109
|
});
|
|
2085
|
-
},
|
|
2110
|
+
}, N = async (y, h) => {
|
|
2086
2111
|
const x = g.find((k) => k.section === h);
|
|
2087
2112
|
if (x) {
|
|
2088
2113
|
const k = {
|
|
@@ -2102,62 +2127,62 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2102
2127
|
}, X = (y, h) => {
|
|
2103
2128
|
const x = g.find((k) => k.section === h);
|
|
2104
2129
|
!(x != null && x.rows) || x.rows.length <= 1 || x.rows.splice(y, 1);
|
|
2105
|
-
},
|
|
2106
|
-
var
|
|
2107
|
-
const k = g.find((
|
|
2108
|
-
if (!((
|
|
2130
|
+
}, H = (y, h, x = "down") => {
|
|
2131
|
+
var z;
|
|
2132
|
+
const k = g.find((U) => U.section === h);
|
|
2133
|
+
if (!((z = k == null ? void 0 : k.rows) != null && z[y]) || x === "up" && y === 0 || x === "down" && y === k.rows.length - 1)
|
|
2109
2134
|
return;
|
|
2110
|
-
const M = k.rows,
|
|
2111
|
-
M.splice(D, 0,
|
|
2135
|
+
const M = k.rows, T = M.splice(y, 1)[0], D = x === "down" ? y + 1 : y - 1;
|
|
2136
|
+
M.splice(D, 0, T);
|
|
2112
2137
|
}, _ = async (y, h, x, k = "right") => {
|
|
2113
2138
|
var D;
|
|
2114
|
-
const M = k === "left" ? h : h + 1,
|
|
2115
|
-
(D =
|
|
2139
|
+
const M = k === "left" ? h : h + 1, T = g.find((z) => z.section === x);
|
|
2140
|
+
(D = T == null ? void 0 : T.rows) != null && D[y] && T.rows[y].columns.splice(M, 0, {
|
|
2116
2141
|
config: {},
|
|
2117
2142
|
components: []
|
|
2118
|
-
}), await new Promise((
|
|
2143
|
+
}), await new Promise((z) => {
|
|
2119
2144
|
setTimeout(() => {
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
}, 3e3)) :
|
|
2145
|
+
const U = document.getElementById(`col-${x}-${y}-${M}`);
|
|
2146
|
+
U ? (U.scrollIntoView({ behavior: "smooth", block: "center" }), U.classList.add("selected-delay"), setTimeout(() => {
|
|
2147
|
+
U.classList.remove("selected-delay"), z();
|
|
2148
|
+
}, 3e3)) : z();
|
|
2124
2149
|
}, 0);
|
|
2125
2150
|
});
|
|
2126
2151
|
}, ee = (y, h, x) => {
|
|
2127
|
-
var
|
|
2128
|
-
const k = g.find((
|
|
2152
|
+
var T, D;
|
|
2153
|
+
const k = g.find((z) => z.section === x), M = (D = (T = k == null ? void 0 : k.rows) == null ? void 0 : T[y]) == null ? void 0 : D.columns;
|
|
2129
2154
|
!M || M.length <= 1 || M.splice(h, 1);
|
|
2130
2155
|
}, te = (y, h, x, k = "right") => {
|
|
2131
|
-
var
|
|
2156
|
+
var U;
|
|
2132
2157
|
const M = g.find((K) => K.section === x);
|
|
2133
|
-
if (!((
|
|
2158
|
+
if (!((U = M == null ? void 0 : M.rows) != null && U[y]) || k === "left" && h === 0 || k === "right" && h === M.rows[y].columns.length - 1)
|
|
2134
2159
|
return;
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2160
|
+
const T = M.rows[y].columns, D = T.splice(h, 1)[0], z = k === "right" ? h + 1 : h - 1;
|
|
2161
|
+
T.splice(z, 0, D);
|
|
2137
2162
|
}, ge = (y, h) => {
|
|
2138
2163
|
var k;
|
|
2139
2164
|
const x = g.find((M) => M.section === h);
|
|
2140
2165
|
(k = x == null ? void 0 : x.rows) == null || k.forEach((M) => {
|
|
2141
|
-
M.columns.forEach((
|
|
2142
|
-
const D =
|
|
2143
|
-
D !== -1 &&
|
|
2166
|
+
M.columns.forEach((T) => {
|
|
2167
|
+
const D = T.components.indexOf(y);
|
|
2168
|
+
D !== -1 && T.components.splice(D, 1);
|
|
2144
2169
|
});
|
|
2145
2170
|
});
|
|
2146
2171
|
}, fe = (y, h, x) => {
|
|
2147
|
-
|
|
2172
|
+
r.value = !0, l.value = { rowIndex: y, columnIndex: h, section: x };
|
|
2148
2173
|
}, re = (y) => {
|
|
2149
|
-
var M,
|
|
2150
|
-
const { rowIndex: h, columnIndex: x, section: k } =
|
|
2174
|
+
var M, T, D, z;
|
|
2175
|
+
const { rowIndex: h, columnIndex: x, section: k } = l.value;
|
|
2151
2176
|
if (h !== null && x !== null) {
|
|
2152
|
-
const
|
|
2153
|
-
Z == null || Z.push(
|
|
2177
|
+
const U = JSON.parse(JSON.stringify(y)), K = g.find((pe) => pe.section === k), Z = (z = (D = (T = (M = K == null ? void 0 : K.rows) == null ? void 0 : M[h]) == null ? void 0 : T.columns) == null ? void 0 : D[x]) == null ? void 0 : z.components;
|
|
2178
|
+
Z == null || Z.push(U);
|
|
2154
2179
|
}
|
|
2155
|
-
|
|
2180
|
+
r.value = !1;
|
|
2156
2181
|
}, se = (y) => {
|
|
2157
2182
|
const h = typeof y == "string" ? JSON.parse(y) : y;
|
|
2158
2183
|
g.length = 0, g.push(...h.pageConfig || []), h.paramsConfig && (P.value = { ...P.value, ...h.paramsConfig });
|
|
2159
2184
|
};
|
|
2160
|
-
return (y, h) => (i(), d("div",
|
|
2185
|
+
return (y, h) => (i(), d("div", Xn, [
|
|
2161
2186
|
L(dt, {
|
|
2162
2187
|
sectionSelected: I.value,
|
|
2163
2188
|
"onUpdate:sectionSelected": h[0] || (h[0] = (x) => I.value = x),
|
|
@@ -2167,7 +2192,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2167
2192
|
availableSections: c.value,
|
|
2168
2193
|
importConfigurationFunction: se,
|
|
2169
2194
|
isComponentMode: f.value,
|
|
2170
|
-
toggleComponentModeFunction:
|
|
2195
|
+
toggleComponentModeFunction: a,
|
|
2171
2196
|
fullwidthMode: w.value,
|
|
2172
2197
|
toggleFullwidthMode: F,
|
|
2173
2198
|
renderApiDomain: q(m),
|
|
@@ -2175,38 +2200,38 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2175
2200
|
debugMode: q($),
|
|
2176
2201
|
submitForm: q(p)
|
|
2177
2202
|
}, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain", "inputId", "debugMode", "submitForm"]),
|
|
2178
|
-
t("div",
|
|
2203
|
+
t("div", Zn, [
|
|
2179
2204
|
w.value ? (i(), d("div", {
|
|
2180
2205
|
key: 0,
|
|
2181
|
-
class: G(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm",
|
|
2206
|
+
class: G(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm", r.value ? "" : "hidden"])
|
|
2182
2207
|
}, [
|
|
2183
|
-
t("div",
|
|
2208
|
+
t("div", _n, [
|
|
2184
2209
|
t("div", {
|
|
2185
2210
|
class: "cursor-pointer w-10 h-10 flex items-center justify-center rounded-full bg-white shadow-md hover:shadow-lg hover:bg-red-50 text-slate-400 hover:text-red-500 transition-all duration-200 text-xl font-light",
|
|
2186
|
-
onClick: h[2] || (h[2] = (x) =>
|
|
2211
|
+
onClick: h[2] || (h[2] = (x) => r.value = !1)
|
|
2187
2212
|
}, "✕")
|
|
2188
2213
|
]),
|
|
2189
|
-
t("div",
|
|
2214
|
+
t("div", el, [
|
|
2190
2215
|
L(de, {
|
|
2191
2216
|
renderApiDomain: q(m),
|
|
2192
2217
|
isComponentMode: f.value,
|
|
2193
2218
|
fullwidthMode: w.value,
|
|
2194
|
-
columnToInsert:
|
|
2219
|
+
columnToInsert: l.value,
|
|
2195
2220
|
addComponentToColumn: re,
|
|
2196
|
-
toggleComponentModeFunction:
|
|
2221
|
+
toggleComponentModeFunction: a,
|
|
2197
2222
|
isProduction: q(b),
|
|
2198
2223
|
components: R.value,
|
|
2199
2224
|
excludedCategories: s
|
|
2200
2225
|
}, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction", "components"])
|
|
2201
2226
|
])
|
|
2202
|
-
], 2)) : (i(), d("div",
|
|
2227
|
+
], 2)) : (i(), d("div", tl, [
|
|
2203
2228
|
L(de, {
|
|
2204
2229
|
renderApiDomain: q(m),
|
|
2205
2230
|
isComponentMode: f.value,
|
|
2206
2231
|
fullwidthMode: w.value,
|
|
2207
|
-
columnToInsert:
|
|
2232
|
+
columnToInsert: l.value,
|
|
2208
2233
|
addComponentToColumn: re,
|
|
2209
|
-
toggleComponentModeFunction:
|
|
2234
|
+
toggleComponentModeFunction: a,
|
|
2210
2235
|
isProduction: q(b),
|
|
2211
2236
|
components: R.value,
|
|
2212
2237
|
excludedCategories: s
|
|
@@ -2215,20 +2240,20 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2215
2240
|
t("div", {
|
|
2216
2241
|
class: G([w.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
|
|
2217
2242
|
}, [
|
|
2218
|
-
L(
|
|
2243
|
+
L(qn, {
|
|
2219
2244
|
globalPageConfiguration: g,
|
|
2220
2245
|
isComponentMode: f.value,
|
|
2221
2246
|
removeComponent: ge,
|
|
2222
2247
|
addComponentFunction: fe,
|
|
2223
2248
|
fullwidthMode: w.value,
|
|
2224
2249
|
addCol: _,
|
|
2225
|
-
addRow:
|
|
2250
|
+
addRow: N,
|
|
2226
2251
|
removeRow: X,
|
|
2227
2252
|
removeCol: ee,
|
|
2228
2253
|
moveCol: te,
|
|
2229
2254
|
updateRowConfig: j,
|
|
2230
2255
|
updateColConfig: B,
|
|
2231
|
-
moveRow:
|
|
2256
|
+
moveRow: H,
|
|
2232
2257
|
sectionSelected: I.value,
|
|
2233
2258
|
renderApiDomain: q(m),
|
|
2234
2259
|
isProduction: q(b)
|
|
@@ -2239,15 +2264,15 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2239
2264
|
}
|
|
2240
2265
|
});
|
|
2241
2266
|
export {
|
|
2242
|
-
|
|
2243
|
-
|
|
2267
|
+
qn as BodySection,
|
|
2268
|
+
mn as ColConfig,
|
|
2244
2269
|
de as ComponentsBox,
|
|
2245
2270
|
po as FeedComponent,
|
|
2246
2271
|
ie as FieldsForm,
|
|
2247
2272
|
dt as GlobalConfig,
|
|
2248
2273
|
be as InitialComponent,
|
|
2249
|
-
|
|
2250
|
-
|
|
2274
|
+
rl as Pagebuilder,
|
|
2275
|
+
Vn as RowConfig,
|
|
2251
2276
|
Bt as SourceFilter,
|
|
2252
|
-
|
|
2277
|
+
rl as default
|
|
2253
2278
|
};
|