lf-pagebuilder-vue 0.0.8 → 0.0.10
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.d.ts +4 -0
- package/dist/index.js +918 -858
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
2
|
-
import { listComponents as
|
|
3
|
-
import { QuillEditor as
|
|
1
|
+
import { defineComponent as W, ref as k, computed as Y, createElementBlock as d, openBlock as s, createCommentVNode as $, createElementVNode as t, withModifiers as le, withDirectives as R, vModelText as Q, normalizeClass as G, toDisplayString as x, Fragment as B, renderList as z, vModelSelect as H, vModelCheckbox as ne, createBlock as ue, createTextVNode as D, unref as q, onMounted as ae, createVNode as L, watch as oe, nextTick as xe, withCtx as ce, vShow as he, reactive as we } from "vue";
|
|
2
|
+
import { listComponents as ye } from "libreria-astro-lefebvre";
|
|
3
|
+
import { QuillEditor as Ce } from "@vueup/vue-quill";
|
|
4
4
|
import me from "vuedraggable";
|
|
5
|
-
const
|
|
5
|
+
const $e = W({
|
|
6
6
|
props: {
|
|
7
7
|
isComponentMode: Boolean,
|
|
8
8
|
fullwidthMode: Boolean,
|
|
@@ -30,149 +30,149 @@ const Ce = W({
|
|
|
30
30
|
"update:parametersPageConfiguration.seo.description"
|
|
31
31
|
],
|
|
32
32
|
setup(e) {
|
|
33
|
-
const o = e.renderApiDomain || "http://localhost:8003",
|
|
33
|
+
const o = e.renderApiDomain || "http://localhost:8003", g = k(""), F = k(!1), p = k(!1), u = k(null), i = Y({
|
|
34
34
|
get() {
|
|
35
|
-
var
|
|
36
|
-
const P = (
|
|
37
|
-
return ((
|
|
35
|
+
var b, n;
|
|
36
|
+
const P = (b = e.globalPageConfiguration) == null ? void 0 : b.find((l) => l.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
|
|
42
|
-
|
|
40
|
+
var n;
|
|
41
|
+
const b = (n = e.globalPageConfiguration) == null ? void 0 : n.find((l) => l.section === e.sectionSelected);
|
|
42
|
+
b && (b.config || (b.config = {}), b.config.width = P);
|
|
43
43
|
}
|
|
44
44
|
}), m = () => {
|
|
45
45
|
const P = {
|
|
46
46
|
pageConfig: e.globalPageConfiguration,
|
|
47
47
|
paramsConfig: e.parametersPageConfiguration
|
|
48
|
-
},
|
|
48
|
+
}, b = JSON.stringify(P), n = new CustomEvent("lf-pagebuilder:export", {
|
|
49
49
|
detail: { ...P, inputId: e.inputId }
|
|
50
50
|
});
|
|
51
|
-
document.dispatchEvent(
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
},
|
|
51
|
+
document.dispatchEvent(n);
|
|
52
|
+
const l = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
53
|
+
l && (l.document.body.innerText = b, l.document.close());
|
|
54
|
+
}, y = () => {
|
|
55
55
|
const P = {
|
|
56
56
|
pageConfig: e.globalPageConfiguration,
|
|
57
57
|
paramsConfig: e.parametersPageConfiguration
|
|
58
|
-
},
|
|
59
|
-
I(
|
|
60
|
-
const
|
|
58
|
+
}, b = JSON.stringify(P);
|
|
59
|
+
I(b);
|
|
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 l = document.getElementById(e.inputId);
|
|
65
|
+
l && (l.value = b);
|
|
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 l = u.value.closest("form");
|
|
71
|
+
l && l.submit();
|
|
72
72
|
}
|
|
73
73
|
}, I = (P) => {
|
|
74
|
-
const
|
|
75
|
-
localStorage.setItem(
|
|
74
|
+
const b = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig";
|
|
75
|
+
localStorage.setItem(b, P);
|
|
76
76
|
};
|
|
77
77
|
return {
|
|
78
78
|
validateSeo: () => {
|
|
79
79
|
const P = {
|
|
80
80
|
pageConfig: e.globalPageConfiguration,
|
|
81
81
|
paramsConfig: e.parametersPageConfiguration
|
|
82
|
-
},
|
|
82
|
+
}, b = JSON.stringify(P, null, 2);
|
|
83
83
|
fetch(o + "/api/render-html/", {
|
|
84
84
|
method: "POST",
|
|
85
85
|
headers: {
|
|
86
86
|
"Content-Type": "application/json"
|
|
87
87
|
},
|
|
88
|
-
body:
|
|
89
|
-
}).then((
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
92
|
-
const j = new DOMParser().parseFromString(
|
|
93
|
-
function
|
|
88
|
+
body: b
|
|
89
|
+
}).then((n) => n.text()).then((n) => {
|
|
90
|
+
const l = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
91
|
+
if (!l) return;
|
|
92
|
+
const j = new DOMParser().parseFromString(n, "text/html"), E = [];
|
|
93
|
+
function N(J, _ = 0) {
|
|
94
94
|
if (!J || J.nodeType !== 1) return;
|
|
95
95
|
const ee = J.tagName.toLowerCase();
|
|
96
|
-
["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(ee) &&
|
|
96
|
+
["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(ee) && E.push({
|
|
97
97
|
tag: ee,
|
|
98
98
|
text: (J.textContent || "").trim().slice(0, 80),
|
|
99
99
|
depth: _
|
|
100
|
-
}), Array.from(J.children).forEach((te) =>
|
|
100
|
+
}), Array.from(J.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
|
-
|
|
104
|
+
E.forEach((J) => {
|
|
105
105
|
X += `<li style="margin-left:${J.depth * 20}px"><b>${J.tag}</b>: ${J.text}</li>`;
|
|
106
|
-
}), X += "</ul>",
|
|
106
|
+
}), X += "</ul>", l.document.body.innerHTML = X, l.document.close();
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
|
-
importConfig:
|
|
110
|
-
showAdvancedConfig:
|
|
109
|
+
importConfig: g,
|
|
110
|
+
showAdvancedConfig: F,
|
|
111
111
|
previewFunction: () => {
|
|
112
112
|
const P = {
|
|
113
113
|
pageConfig: e.globalPageConfiguration,
|
|
114
114
|
paramsConfig: e.parametersPageConfiguration
|
|
115
|
-
},
|
|
115
|
+
}, b = JSON.stringify(P, null, 2);
|
|
116
116
|
fetch(o + "/api/render-html/", {
|
|
117
117
|
method: "POST",
|
|
118
118
|
headers: {
|
|
119
119
|
"Content-Type": "application/json"
|
|
120
120
|
},
|
|
121
|
-
body:
|
|
122
|
-
}).then((
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
const
|
|
127
|
-
j.src ?
|
|
128
|
-
}),
|
|
121
|
+
body: b
|
|
122
|
+
}).then((n) => n.text()).then((n) => {
|
|
123
|
+
const l = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
124
|
+
l && (l.document.body.innerHTML = n, l.document.querySelectorAll("script").forEach((j) => {
|
|
125
|
+
var N;
|
|
126
|
+
const E = l.document.createElement("script");
|
|
127
|
+
j.src ? E.src = j.src : E.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(E, j);
|
|
128
|
+
}), l.document.close());
|
|
129
129
|
});
|
|
130
130
|
},
|
|
131
131
|
importFunction: () => {
|
|
132
|
-
e.importConfigurationFunction && e.importConfigurationFunction(
|
|
132
|
+
e.importConfigurationFunction && e.importConfigurationFunction(g.value), g.value = "";
|
|
133
133
|
},
|
|
134
134
|
exportFunction: m,
|
|
135
|
-
saveButtonAction:
|
|
135
|
+
saveButtonAction: y,
|
|
136
136
|
loadFromLocalStorage: () => {
|
|
137
|
-
const P = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig",
|
|
138
|
-
if (
|
|
139
|
-
const
|
|
140
|
-
e.importConfigurationFunction(
|
|
137
|
+
const P = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig", b = localStorage.getItem(P);
|
|
138
|
+
if (b && e.importConfigurationFunction) {
|
|
139
|
+
const n = JSON.parse(b);
|
|
140
|
+
e.importConfigurationFunction(n);
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
toggleExpandScreen: () => {
|
|
144
144
|
const P = document.querySelector(".lf-page-builder");
|
|
145
145
|
P && P.classList.toggle("expanded-page-builder");
|
|
146
146
|
},
|
|
147
|
-
sectionWidth:
|
|
147
|
+
sectionWidth: i,
|
|
148
148
|
isSaved: p,
|
|
149
149
|
componentRoot: u
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
153
|
-
const
|
|
154
|
-
for (const [
|
|
155
|
-
|
|
156
|
-
return
|
|
157
|
-
},
|
|
152
|
+
}), ke = (e, o) => {
|
|
153
|
+
const g = e.__vccOpts || e;
|
|
154
|
+
for (const [F, p] of o)
|
|
155
|
+
g[F] = p;
|
|
156
|
+
return g;
|
|
157
|
+
}, Se = { ref: "componentRoot" }, Fe = {
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "flex justify-end items-center w-full p-3 gap-3"
|
|
160
|
-
},
|
|
160
|
+
}, Pe = { 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" }, je = { 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" }, Me = { class: "flex gap-2" }, Ie = { class: "flex gap-2" }, Ae = ["value"], Be = ["value"], Ee = { value: "full" }, Te = { value: "1/2" }, De = { value: "1/3" }, Oe = { value: "2/3" }, Re = { value: "1/4" }, Ve = { value: "3/4" }, ze = { value: "1/5" }, Ne = { value: "2/5" }, Ue = { value: "3/5" }, qe = { value: "4/5" }, Le = { key: 0 }, Ge = { key: 1 }, Je = { 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
|
-
},
|
|
164
|
-
function
|
|
165
|
-
return
|
|
166
|
-
e.debugMode ? (
|
|
167
|
-
t("div",
|
|
163
|
+
}, We = { class: "flex flex-row gap-4 w-full" }, Ye = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Ke = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Qe = { class: "mb-3" }, Xe = { class: "flex items-center gap-3 cursor-pointer group" }, Ze = { class: "mb-3" }, _e = { class: "flex items-center gap-3 cursor-pointer group" }, et = { class: "mb-3" }, tt = { class: "mb-3" }, ot = { class: "mb-3" }, nt = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, lt = { class: "flex justify-between items-center mb-4" }, at = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, rt = { class: "mb-3" }, st = { class: "mb-3" }, it = { class: "mb-3" };
|
|
164
|
+
function dt(e, o, g, F, p, u) {
|
|
165
|
+
return s(), d("div", Se, [
|
|
166
|
+
e.debugMode ? (s(), d("div", Fe, [
|
|
167
|
+
t("div", Pe, [
|
|
168
168
|
o[30] || (o[30] = t("span", { class: "bg-gradient-to-r from-lime-200 to-green-300 px-3 py-1 rounded-full border border-lime-600 text-lime-800 text-xs font-medium me-4 italic" }, "MODO DEBUG 🐞", -1)),
|
|
169
169
|
t("form", {
|
|
170
170
|
onSubmit: o[2] || (o[2] = le(() => {
|
|
171
171
|
}, ["prevent"])),
|
|
172
172
|
class: "flex gap-2"
|
|
173
173
|
}, [
|
|
174
|
-
|
|
175
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
174
|
+
R(t("input", {
|
|
175
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => e.importConfig = i),
|
|
176
176
|
type: "text",
|
|
177
177
|
class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400",
|
|
178
178
|
name: "",
|
|
@@ -183,65 +183,65 @@ function it(e, o, b, $, p, u) {
|
|
|
183
183
|
]),
|
|
184
184
|
t("button", {
|
|
185
185
|
type: "button",
|
|
186
|
-
onClick: o[1] || (o[1] = (
|
|
186
|
+
onClick: o[1] || (o[1] = (i) => e.importFunction()),
|
|
187
187
|
class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
188
188
|
}, "🏯 Importar")
|
|
189
189
|
], 32),
|
|
190
190
|
t("button", {
|
|
191
191
|
type: "button",
|
|
192
|
-
onClick: o[3] || (o[3] = (
|
|
192
|
+
onClick: o[3] || (o[3] = (i) => e.exportFunction()),
|
|
193
193
|
class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
194
194
|
}, "🚀 Exportar")
|
|
195
195
|
])
|
|
196
|
-
])) :
|
|
197
|
-
t("div",
|
|
198
|
-
t("div",
|
|
196
|
+
])) : $("", !0),
|
|
197
|
+
t("div", je, [
|
|
198
|
+
t("div", Me, [
|
|
199
199
|
t("button", {
|
|
200
200
|
type: "button",
|
|
201
201
|
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"]),
|
|
202
|
-
onClick: o[4] || (o[4] = (
|
|
202
|
+
onClick: o[4] || (o[4] = (i) => {
|
|
203
203
|
var m;
|
|
204
204
|
return (m = e.toggleComponentModeFunction) == null ? void 0 : m.call(e);
|
|
205
205
|
})
|
|
206
|
-
},
|
|
206
|
+
}, x(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3),
|
|
207
207
|
t("button", {
|
|
208
208
|
type: "button",
|
|
209
209
|
class: G([[e.fullwidthMode ? "bg-white hover:bg-slate-100" : "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
|
|
210
|
-
onClick: o[5] || (o[5] = (
|
|
210
|
+
onClick: o[5] || (o[5] = (i) => {
|
|
211
211
|
var m;
|
|
212
212
|
return (m = e.toggleFullwidthMode) == null ? void 0 : m.call(e);
|
|
213
213
|
})
|
|
214
|
-
},
|
|
214
|
+
}, x(e.fullwidthMode ? "⚒️ Comps. Plegados" : "👁️ Comps. Desplegados"), 3)
|
|
215
215
|
]),
|
|
216
|
-
t("div",
|
|
216
|
+
t("div", Ie, [
|
|
217
217
|
t("select", {
|
|
218
218
|
value: e.sectionSelected,
|
|
219
|
-
onChange: o[6] || (o[6] = (
|
|
219
|
+
onChange: o[6] || (o[6] = (i) => e.$emit("update:sectionSelected", i.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
|
-
(
|
|
222
|
+
(s(!0), d(B, null, z(e.availableSections, (i, m) => (s(), d("option", {
|
|
223
223
|
key: m,
|
|
224
|
-
value:
|
|
225
|
-
},
|
|
226
|
-
], 40,
|
|
227
|
-
|
|
224
|
+
value: i
|
|
225
|
+
}, x(i), 9, Be))), 128))
|
|
226
|
+
], 40, Ae),
|
|
227
|
+
R(t("select", {
|
|
228
228
|
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",
|
|
229
|
-
"onUpdate:modelValue": o[7] || (o[7] = (
|
|
229
|
+
"onUpdate:modelValue": o[7] || (o[7] = (i) => e.sectionWidth = i)
|
|
230
230
|
}, [
|
|
231
231
|
o[31] || (o[31] = t("option", {
|
|
232
232
|
disabled: "",
|
|
233
233
|
value: ""
|
|
234
234
|
}, "Selecciona el ancho de la sección", -1)),
|
|
235
|
-
t("option",
|
|
236
|
-
t("option",
|
|
237
|
-
t("option",
|
|
238
|
-
t("option",
|
|
239
|
-
t("option",
|
|
240
|
-
t("option",
|
|
241
|
-
t("option",
|
|
242
|
-
t("option",
|
|
243
|
-
t("option", Ue, "Sección " +
|
|
244
|
-
t("option",
|
|
235
|
+
t("option", Ee, "Sección " + x(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
|
|
236
|
+
t("option", Te, "Sección " + x(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
|
|
237
|
+
t("option", De, "Sección " + x(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
|
|
238
|
+
t("option", Oe, "Sección " + x(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
|
|
239
|
+
t("option", Re, "Sección " + x(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
|
|
240
|
+
t("option", Ve, "Sección " + x(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
|
|
241
|
+
t("option", ze, "Sección " + x(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
|
|
242
|
+
t("option", Ne, "Sección " + x(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
|
|
243
|
+
t("option", Ue, "Sección " + x(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
|
|
244
|
+
t("option", qe, "Sección " + x(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
|
|
245
245
|
], 512), [
|
|
246
246
|
[H, e.sectionWidth]
|
|
247
247
|
]),
|
|
@@ -251,50 +251,50 @@ function it(e, o, b, $, p, u) {
|
|
|
251
251
|
"cursor-pointer border rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200 flex items-center gap-2",
|
|
252
252
|
e.showAdvancedConfig ? "bg-gradient-to-r from-amber-500 to-orange-500 border-amber-500 text-white shadow-md" : "bg-white border-slate-200 hover:bg-slate-100"
|
|
253
253
|
]),
|
|
254
|
-
onClick: o[8] || (o[8] = (
|
|
254
|
+
onClick: o[8] || (o[8] = (i) => e.showAdvancedConfig = !e.showAdvancedConfig)
|
|
255
255
|
}, [
|
|
256
256
|
o[32] || (o[32] = t("span", null, "⚙️ Página", -1)),
|
|
257
|
-
e.showAdvancedConfig ? (
|
|
257
|
+
e.showAdvancedConfig ? (s(), d("span", Le, "▲")) : (s(), d("span", Ge, "▼"))
|
|
258
258
|
], 2)
|
|
259
259
|
]),
|
|
260
|
-
t("div",
|
|
260
|
+
t("div", Je, [
|
|
261
261
|
t("button", {
|
|
262
262
|
type: "button",
|
|
263
|
-
onClick: o[9] || (o[9] = (
|
|
263
|
+
onClick: o[9] || (o[9] = (i) => e.previewFunction()),
|
|
264
264
|
class: "cursor-pointer bg-white hover:bg-violet-500 hover:text-white hover:border-violet-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
265
265
|
}, "🔎 Preview"),
|
|
266
266
|
t("button", {
|
|
267
267
|
type: "button",
|
|
268
|
-
onClick: o[10] || (o[10] = (
|
|
268
|
+
onClick: o[10] || (o[10] = (i) => e.saveButtonAction()),
|
|
269
269
|
title: "Guardar configuración en localStorage y disparar evento global",
|
|
270
270
|
class: "cursor-pointer bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white border border-emerald-500 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
271
|
-
},
|
|
272
|
-
e.debugMode ? (
|
|
271
|
+
}, x(e.isSaved ? e.submitForm ? "⏳ Submiteando formulario" : "✅ Se ha guardado correctamente" : "💾 Guardar"), 1),
|
|
272
|
+
e.debugMode ? (s(), d("button", {
|
|
273
273
|
key: 0,
|
|
274
274
|
type: "button",
|
|
275
|
-
onClick: o[11] || (o[11] = (
|
|
275
|
+
onClick: o[11] || (o[11] = (i) => e.loadFromLocalStorage()),
|
|
276
276
|
class: "cursor-pointer bg-white hover:bg-blue-500 hover:text-white hover:border-blue-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
277
|
-
}, "⤵️ Cargar")) :
|
|
277
|
+
}, "⤵️ Cargar")) : $("", !0),
|
|
278
278
|
t("button", {
|
|
279
279
|
type: "button",
|
|
280
|
-
onClick: o[12] || (o[12] = (
|
|
280
|
+
onClick: o[12] || (o[12] = (i) => e.toggleExpandScreen()),
|
|
281
281
|
title: "Expandir / Contraer Pagebuilder",
|
|
282
282
|
class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white hover:border-slate-700 border border-slate-200 rounded-lg px-3 py-1.5 text-xl transition-all duration-200 shadow-sm hover:shadow-md ms-2"
|
|
283
283
|
}, "◳")
|
|
284
284
|
])
|
|
285
285
|
]),
|
|
286
|
-
e.showAdvancedConfig && e.parametersPageConfiguration ? (
|
|
287
|
-
t("div",
|
|
288
|
-
t("div",
|
|
286
|
+
e.showAdvancedConfig && e.parametersPageConfiguration ? (s(), d("div", He, [
|
|
287
|
+
t("div", We, [
|
|
288
|
+
t("div", Ye, [
|
|
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)),
|
|
291
|
-
t("div",
|
|
292
|
-
t("div",
|
|
293
|
-
t("label",
|
|
294
|
-
|
|
291
|
+
t("div", Ke, [
|
|
292
|
+
t("div", Qe, [
|
|
293
|
+
t("label", Xe, [
|
|
294
|
+
R(t("input", {
|
|
295
295
|
type: "checkbox",
|
|
296
|
-
"onUpdate:modelValue": o[13] || (o[13] = (
|
|
297
|
-
onChange: o[14] || (o[14] = (
|
|
296
|
+
"onUpdate:modelValue": o[13] || (o[13] = (i) => e.parametersPageConfiguration.global.sidebarEnabled = i),
|
|
297
|
+
onChange: o[14] || (o[14] = (i) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", i.target.value)),
|
|
298
298
|
class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
|
|
299
299
|
}, null, 544), [
|
|
300
300
|
[ne, e.parametersPageConfiguration.global.sidebarEnabled]
|
|
@@ -302,12 +302,12 @@ function it(e, o, b, $, p, u) {
|
|
|
302
302
|
o[33] || (o[33] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Sidebar Habilitado", -1))
|
|
303
303
|
])
|
|
304
304
|
]),
|
|
305
|
-
t("div",
|
|
306
|
-
t("label",
|
|
307
|
-
|
|
305
|
+
t("div", Ze, [
|
|
306
|
+
t("label", _e, [
|
|
307
|
+
R(t("input", {
|
|
308
308
|
type: "checkbox",
|
|
309
|
-
"onUpdate:modelValue": o[15] || (o[15] = (
|
|
310
|
-
onChange: o[16] || (o[16] = (
|
|
309
|
+
"onUpdate:modelValue": o[15] || (o[15] = (i) => e.parametersPageConfiguration.global.renderAsBodyPart = i),
|
|
310
|
+
onChange: o[16] || (o[16] = (i) => e.$emit("update:parametersPageConfiguration.global.renderAsBodyPart", i.target.value)),
|
|
311
311
|
class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
|
|
312
312
|
}, null, 544), [
|
|
313
313
|
[ne, e.parametersPageConfiguration.global.renderAsBodyPart]
|
|
@@ -315,15 +315,15 @@ function it(e, o, b, $, p, u) {
|
|
|
315
315
|
o[34] || (o[34] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Renderizar como parte del BODY (Sin etiquetas HTML, HEAD, BODY)", -1))
|
|
316
316
|
])
|
|
317
317
|
]),
|
|
318
|
-
t("div",
|
|
318
|
+
t("div", et, [
|
|
319
319
|
o[35] || (o[35] = t("label", {
|
|
320
320
|
for: "headSlot",
|
|
321
321
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
322
322
|
}, " Código al final de la sección <head> ", -1)),
|
|
323
|
-
|
|
323
|
+
R(t("textarea", {
|
|
324
324
|
id: "headSlot",
|
|
325
|
-
"onUpdate:modelValue": o[17] || (o[17] = (
|
|
326
|
-
onInput: o[18] || (o[18] = (
|
|
325
|
+
"onUpdate:modelValue": o[17] || (o[17] = (i) => e.parametersPageConfiguration.global.headSlot = i),
|
|
326
|
+
onInput: o[18] || (o[18] = (i) => e.$emit("update:parametersPageConfiguration.global.headSlot", i.target.value)),
|
|
327
327
|
class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
|
|
328
328
|
placeholder: "Contenido para el head",
|
|
329
329
|
rows: "3"
|
|
@@ -331,15 +331,15 @@ function it(e, o, b, $, p, u) {
|
|
|
331
331
|
[Q, e.parametersPageConfiguration.global.headSlot]
|
|
332
332
|
])
|
|
333
333
|
]),
|
|
334
|
-
t("div",
|
|
334
|
+
t("div", tt, [
|
|
335
335
|
o[36] || (o[36] = t("label", {
|
|
336
336
|
for: "bodyBeginSlot",
|
|
337
337
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
338
338
|
}, " Código al principio de la sección <body> ", -1)),
|
|
339
|
-
|
|
339
|
+
R(t("textarea", {
|
|
340
340
|
id: "bodyBeginSlot",
|
|
341
|
-
"onUpdate:modelValue": o[19] || (o[19] = (
|
|
342
|
-
onInput: o[20] || (o[20] = (
|
|
341
|
+
"onUpdate:modelValue": o[19] || (o[19] = (i) => e.parametersPageConfiguration.global.bodyBeginSlot = i),
|
|
342
|
+
onInput: o[20] || (o[20] = (i) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", i.target.value)),
|
|
343
343
|
class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
|
|
344
344
|
placeholder: "Contenido para el inicio del body",
|
|
345
345
|
rows: "3"
|
|
@@ -347,15 +347,15 @@ function it(e, o, b, $, p, u) {
|
|
|
347
347
|
[Q, e.parametersPageConfiguration.global.bodyBeginSlot]
|
|
348
348
|
])
|
|
349
349
|
]),
|
|
350
|
-
t("div",
|
|
350
|
+
t("div", ot, [
|
|
351
351
|
o[37] || (o[37] = t("label", {
|
|
352
352
|
for: "footerSlot",
|
|
353
353
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
354
354
|
}, " Código al final de la sección <body>, dentro de la etiqueta <footer> ", -1)),
|
|
355
|
-
|
|
355
|
+
R(t("textarea", {
|
|
356
356
|
id: "footerSlot",
|
|
357
|
-
"onUpdate:modelValue": o[21] || (o[21] = (
|
|
358
|
-
onInput: o[22] || (o[22] = (
|
|
357
|
+
"onUpdate:modelValue": o[21] || (o[21] = (i) => e.parametersPageConfiguration.global.footerSlot = i),
|
|
358
|
+
onInput: o[22] || (o[22] = (i) => e.$emit("update:parametersPageConfiguration.global.footerSlot", i.target.value)),
|
|
359
359
|
class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
|
|
360
360
|
placeholder: "Contenido para el footer",
|
|
361
361
|
rows: "3"
|
|
@@ -365,25 +365,25 @@ function it(e, o, b, $, p, u) {
|
|
|
365
365
|
])
|
|
366
366
|
])
|
|
367
367
|
]),
|
|
368
|
-
t("div",
|
|
369
|
-
t("div",
|
|
368
|
+
t("div", nt, [
|
|
369
|
+
t("div", lt, [
|
|
370
370
|
o[40] || (o[40] = t("h2", { class: "text-lg font-bold text-slate-700" }, "Configuración SEO", -1)),
|
|
371
371
|
t("button", {
|
|
372
372
|
type: "button",
|
|
373
|
-
onClick: o[23] || (o[23] = (
|
|
373
|
+
onClick: o[23] || (o[23] = (i) => e.validateSeo()),
|
|
374
374
|
class: "cursor-pointer bg-gradient-to-r from-violet-500 to-purple-500 hover:from-violet-600 hover:to-purple-600 text-white border border-violet-500 rounded-lg px-4 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
|
|
375
375
|
}, "🦄 Validar SEO")
|
|
376
376
|
]),
|
|
377
|
-
t("div",
|
|
378
|
-
t("div",
|
|
377
|
+
t("div", at, [
|
|
378
|
+
t("div", rt, [
|
|
379
379
|
o[42] || (o[42] = t("label", {
|
|
380
380
|
for: "robotsIndex",
|
|
381
381
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
382
382
|
}, " Indexación de robots ", -1)),
|
|
383
|
-
|
|
383
|
+
R(t("select", {
|
|
384
384
|
id: "robotsIndex",
|
|
385
|
-
"onUpdate:modelValue": o[24] || (o[24] = (
|
|
386
|
-
onChange: o[25] || (o[25] = (
|
|
385
|
+
"onUpdate:modelValue": o[24] || (o[24] = (i) => e.parametersPageConfiguration.seo.robots = i),
|
|
386
|
+
onChange: o[25] || (o[25] = (i) => e.$emit("update:parametersPageConfiguration.seo.robots", i.target.value)),
|
|
387
387
|
class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors cursor-pointer"
|
|
388
388
|
}, [...o[41] || (o[41] = [
|
|
389
389
|
t("option", { value: "index, follow" }, "Index Follow", -1),
|
|
@@ -392,31 +392,31 @@ function it(e, o, b, $, p, u) {
|
|
|
392
392
|
[H, e.parametersPageConfiguration.seo.robots]
|
|
393
393
|
])
|
|
394
394
|
]),
|
|
395
|
-
t("div",
|
|
395
|
+
t("div", st, [
|
|
396
396
|
o[43] || (o[43] = t("label", {
|
|
397
397
|
for: "pageTitle",
|
|
398
398
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
399
399
|
}, " Título de la página ", -1)),
|
|
400
|
-
|
|
400
|
+
R(t("input", {
|
|
401
401
|
id: "pageTitle",
|
|
402
402
|
type: "text",
|
|
403
|
-
"onUpdate:modelValue": o[26] || (o[26] = (
|
|
404
|
-
onInput: o[27] || (o[27] = (
|
|
403
|
+
"onUpdate:modelValue": o[26] || (o[26] = (i) => e.parametersPageConfiguration.seo.title = i),
|
|
404
|
+
onInput: o[27] || (o[27] = (i) => e.$emit("update:parametersPageConfiguration.seo.title", i.target.value)),
|
|
405
405
|
class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
|
|
406
406
|
placeholder: "Ingresa el título de la página"
|
|
407
407
|
}, null, 544), [
|
|
408
408
|
[Q, e.parametersPageConfiguration.seo.title]
|
|
409
409
|
])
|
|
410
410
|
]),
|
|
411
|
-
t("div",
|
|
411
|
+
t("div", it, [
|
|
412
412
|
o[44] || (o[44] = t("label", {
|
|
413
413
|
for: "pageDescription",
|
|
414
414
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
415
415
|
}, " Descripción de la página ", -1)),
|
|
416
|
-
|
|
416
|
+
R(t("textarea", {
|
|
417
417
|
id: "pageDescription",
|
|
418
|
-
"onUpdate:modelValue": o[28] || (o[28] = (
|
|
419
|
-
onInput: o[29] || (o[29] = (
|
|
418
|
+
"onUpdate:modelValue": o[28] || (o[28] = (i) => e.parametersPageConfiguration.seo.description = i),
|
|
419
|
+
onInput: o[29] || (o[29] = (i) => e.$emit("update:parametersPageConfiguration.seo.description", i.target.value)),
|
|
420
420
|
class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
|
|
421
421
|
placeholder: "Ingresa la descripción de la página",
|
|
422
422
|
rows: "3"
|
|
@@ -427,16 +427,16 @@ function it(e, o, b, $, p, u) {
|
|
|
427
427
|
])
|
|
428
428
|
])
|
|
429
429
|
])
|
|
430
|
-
])) :
|
|
430
|
+
])) : $("", !0)
|
|
431
431
|
], 512);
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const ut = /* @__PURE__ */ ke($e, [["render", dt]]), ct = {
|
|
434
434
|
key: 0,
|
|
435
435
|
class: "absolute top-0 left-0 bg-white/90 w-full h-full z-100"
|
|
436
|
-
},
|
|
436
|
+
}, mt = { class: "w-full flex justify-end p-4" }, bt = ["for"], gt = {
|
|
437
437
|
key: 0,
|
|
438
438
|
class: "text-red-500"
|
|
439
|
-
},
|
|
439
|
+
}, ft = ["id", "name", "placeholder", "required", "value", "onInput"], pt = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], vt = ["id", "name", "required", "value", "onInput"], xt = ["value"], ht = ["id", "name", "required", "checked", "onChange"], ie = /* @__PURE__ */ W({
|
|
440
440
|
__name: "FieldsForm",
|
|
441
441
|
props: {
|
|
442
442
|
object: {
|
|
@@ -453,16 +453,16 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
453
453
|
}
|
|
454
454
|
},
|
|
455
455
|
setup(e) {
|
|
456
|
-
const o = e,
|
|
457
|
-
const u = (o.object.fields || []).find((
|
|
456
|
+
const o = e, g = (F, p) => {
|
|
457
|
+
const u = (o.object.fields || []).find((i) => i.name === F);
|
|
458
458
|
u && (u.example_value = p);
|
|
459
459
|
};
|
|
460
|
-
return (
|
|
461
|
-
e.showForm ? (
|
|
460
|
+
return (F, p) => (s(), d(B, null, [
|
|
461
|
+
e.showForm ? (s(), d("div", ct)) : $("", !0),
|
|
462
462
|
t("div", {
|
|
463
463
|
class: G(e.showForm ? "relative top-0 w-full text-slate-600 border-1 my-2 px-4 pt-2 pb-3 w-full border-slate-200 bg-slate-50 inline-block rounded-lg flex flex-col z-101" : "hidden")
|
|
464
464
|
}, [
|
|
465
|
-
t("div",
|
|
465
|
+
t("div", mt, [
|
|
466
466
|
t("span", {
|
|
467
467
|
onClick: p[0] || (p[0] = //@ts-ignore
|
|
468
468
|
(...u) => e.toggleShowForm && e.toggleShowForm(...u)),
|
|
@@ -470,94 +470,94 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
470
470
|
}, "❌")
|
|
471
471
|
]),
|
|
472
472
|
t("form", null, [
|
|
473
|
-
(
|
|
474
|
-
key:
|
|
473
|
+
(s(!0), d(B, null, z(e.object.fields, (u, i) => (s(), d("div", {
|
|
474
|
+
key: i,
|
|
475
475
|
class: "mb-4"
|
|
476
476
|
}, [
|
|
477
477
|
t("label", {
|
|
478
|
-
for: `${e.object.id}-${u.name}-${
|
|
478
|
+
for: `${e.object.id}-${u.name}-${i}`,
|
|
479
479
|
class: "block text-sm font-medium mb-1"
|
|
480
480
|
}, [
|
|
481
|
-
|
|
482
|
-
u.mandatory ? (
|
|
483
|
-
], 8,
|
|
484
|
-
u.type === "text" ? (
|
|
481
|
+
D(x(u.label) + " ", 1),
|
|
482
|
+
u.mandatory ? (s(), d("span", gt, "*")) : $("", !0)
|
|
483
|
+
], 8, bt),
|
|
484
|
+
u.type === "text" ? (s(), d("input", {
|
|
485
485
|
key: 0,
|
|
486
|
-
id: `${e.object.id}-${u.name}-${
|
|
487
|
-
name: `${e.object.id}-${u.name}-${
|
|
486
|
+
id: `${e.object.id}-${u.name}-${i}`,
|
|
487
|
+
name: `${e.object.id}-${u.name}-${i}`,
|
|
488
488
|
type: "text",
|
|
489
489
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
490
490
|
placeholder: u.label,
|
|
491
491
|
required: u.mandatory,
|
|
492
492
|
value: u.example_value,
|
|
493
|
-
onInput: (m) =>
|
|
494
|
-
}, null, 40,
|
|
495
|
-
u.type === "image" ? (
|
|
493
|
+
onInput: (m) => g(u.name, m.target.value)
|
|
494
|
+
}, null, 40, ft)) : $("", !0),
|
|
495
|
+
u.type === "image" ? (s(), d("input", {
|
|
496
496
|
key: 1,
|
|
497
|
-
id: `${e.object.id}-${u.name}-${
|
|
498
|
-
name: `${e.object.id}-${u.name}-${
|
|
497
|
+
id: `${e.object.id}-${u.name}-${i}`,
|
|
498
|
+
name: `${e.object.id}-${u.name}-${i}`,
|
|
499
499
|
"data-mandatoryCrops": u.image_cuts ? JSON.stringify(u.image_cuts) : null,
|
|
500
500
|
type: "text",
|
|
501
501
|
class: "js-limbo w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
502
502
|
placeholder: u.label,
|
|
503
503
|
required: u.mandatory,
|
|
504
504
|
value: u.example_value,
|
|
505
|
-
onInput: (m) =>
|
|
506
|
-
}, null, 40,
|
|
505
|
+
onInput: (m) => g(u.name, m.target.value)
|
|
506
|
+
}, null, 40, pt)) : u.type === "textArea" ? (s(), ue(q(Ce), {
|
|
507
507
|
key: 2,
|
|
508
508
|
theme: "snow",
|
|
509
|
-
id: `${e.object.id}-${u.name}-${
|
|
510
|
-
name: `${e.object.id}-${u.name}-${
|
|
509
|
+
id: `${e.object.id}-${u.name}-${i}`,
|
|
510
|
+
name: `${e.object.id}-${u.name}-${i}`,
|
|
511
511
|
rows: "3",
|
|
512
512
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400 z-9999",
|
|
513
513
|
placeholder: u.label,
|
|
514
514
|
required: u.mandatory,
|
|
515
515
|
"onUpdate:content": (m) => {
|
|
516
|
-
|
|
516
|
+
g(u.name, m);
|
|
517
517
|
},
|
|
518
518
|
content: u.example_value,
|
|
519
519
|
modelValue: u.example_value,
|
|
520
520
|
"onUpdate:modelValue": (m) => u.example_value = m,
|
|
521
521
|
contentType: "html"
|
|
522
|
-
}, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : u.type === "select" ? (
|
|
522
|
+
}, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : u.type === "select" ? (s(), d("select", {
|
|
523
523
|
key: 3,
|
|
524
|
-
id: `${e.object.id}-${u.name}-${
|
|
525
|
-
name: `${e.object.id}-${u.name}-${
|
|
524
|
+
id: `${e.object.id}-${u.name}-${i}`,
|
|
525
|
+
name: `${e.object.id}-${u.name}-${i}`,
|
|
526
526
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
527
527
|
required: u.mandatory,
|
|
528
528
|
value: u.example_value,
|
|
529
|
-
onInput: (m) =>
|
|
529
|
+
onInput: (m) => g(u.name, m.target.value)
|
|
530
530
|
}, [
|
|
531
531
|
p[1] || (p[1] = t("option", {
|
|
532
532
|
disabled: "",
|
|
533
533
|
value: ""
|
|
534
534
|
}, "Seleccione una opción", -1)),
|
|
535
|
-
(
|
|
536
|
-
key:
|
|
535
|
+
(s(!0), d(B, null, z(u.options || [], (m, y) => (s(), d("option", {
|
|
536
|
+
key: y,
|
|
537
537
|
value: m
|
|
538
|
-
},
|
|
539
|
-
], 40,
|
|
538
|
+
}, x(m), 9, xt))), 128))
|
|
539
|
+
], 40, vt)) : u.type === "boolean" ? (s(), d("input", {
|
|
540
540
|
key: 4,
|
|
541
|
-
id: `${e.object.id}-${u.name}-${
|
|
542
|
-
name: `${e.object.id}-${u.name}-${
|
|
541
|
+
id: `${e.object.id}-${u.name}-${i}`,
|
|
542
|
+
name: `${e.object.id}-${u.name}-${i}`,
|
|
543
543
|
type: "checkbox",
|
|
544
544
|
class: "h-4 w-4 text-blue-600 focus:ring-blue-500 border-slate-300 rounded inline-block",
|
|
545
545
|
required: u.mandatory,
|
|
546
546
|
checked: u.example_value,
|
|
547
|
-
onChange: (m) =>
|
|
548
|
-
}, null, 40,
|
|
547
|
+
onChange: (m) => g(u.name, m.target.checked)
|
|
548
|
+
}, null, 40, ht)) : $("", !0)
|
|
549
549
|
]))), 128))
|
|
550
550
|
])
|
|
551
551
|
], 2)
|
|
552
552
|
], 64));
|
|
553
553
|
}
|
|
554
|
-
}),
|
|
554
|
+
}), wt = { class: "space-y-4" }, yt = ["disabled"], Ct = ["value"], $t = { class: "space-y-3" }, kt = {
|
|
555
555
|
key: 0,
|
|
556
556
|
class: "overflow-y-auto space-y-3"
|
|
557
|
-
},
|
|
557
|
+
}, St = { class: "block text-sm font-semibold text-slate-600 mb-2" }, Ft = ["onChange", "disabled"], Pt = ["value"], jt = ["onChange", "disabled"], Mt = ["onInput", "disabled", "placeholder"], It = ["disabled"], At = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "animate-spin"
|
|
560
|
-
},
|
|
560
|
+
}, Bt = { key: 1 }, Et = /* @__PURE__ */ W({
|
|
561
561
|
__name: "SourceFilter",
|
|
562
562
|
props: {
|
|
563
563
|
onSubmit: {
|
|
@@ -574,7 +574,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
574
574
|
}
|
|
575
575
|
},
|
|
576
576
|
setup(e) {
|
|
577
|
-
const o = e,
|
|
577
|
+
const o = e, g = k(!1), F = k(null), p = k({}), u = Y(() => {
|
|
578
578
|
const c = o.isProduction;
|
|
579
579
|
return [
|
|
580
580
|
{
|
|
@@ -622,137 +622,137 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
622
622
|
filters: []
|
|
623
623
|
}
|
|
624
624
|
];
|
|
625
|
-
}),
|
|
626
|
-
if (
|
|
625
|
+
}), i = Y(() => {
|
|
626
|
+
if (!F.value)
|
|
627
627
|
return [];
|
|
628
|
-
const c = u.value.find((
|
|
628
|
+
const c = u.value.find((a) => a.id === F.value);
|
|
629
629
|
return c ? c.filters : [];
|
|
630
|
-
}), m = (c,
|
|
631
|
-
p.value[c] =
|
|
632
|
-
},
|
|
630
|
+
}), m = (c, a) => {
|
|
631
|
+
p.value[c] = a;
|
|
632
|
+
}, y = () => {
|
|
633
633
|
p.value = {};
|
|
634
634
|
}, I = async () => {
|
|
635
|
-
|
|
636
|
-
const c = u.value.find((
|
|
635
|
+
g.value = !0;
|
|
636
|
+
const c = u.value.find((r) => r.id === F.value);
|
|
637
637
|
if (!c) {
|
|
638
|
-
console.error("Origen no encontrado"),
|
|
638
|
+
console.error("Origen no encontrado"), g.value = !1;
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
const
|
|
642
|
-
Object.keys(p.value).forEach((
|
|
643
|
-
p.value[
|
|
641
|
+
const a = new URL(c.apiUrl);
|
|
642
|
+
Object.keys(p.value).forEach((r) => {
|
|
643
|
+
p.value[r] && a.searchParams.append(r, p.value[r]);
|
|
644
644
|
});
|
|
645
645
|
try {
|
|
646
|
-
const f = await (await fetch(
|
|
646
|
+
const f = await (await fetch(a.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"),
|
|
652
|
-
const
|
|
653
|
-
return Array.from(
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
}) :
|
|
658
|
-
}),
|
|
651
|
+
})).text(), P = new DOMParser().parseFromString(f, "text/xml"), b = Array.from(P.querySelectorAll("item")).map((n) => {
|
|
652
|
+
const l = {};
|
|
653
|
+
return Array.from(n.children).forEach((S) => {
|
|
654
|
+
S.children.length > 0 ? Array.from(S.children).forEach((j) => {
|
|
655
|
+
const E = `${S.nodeName}_${j.nodeName}`;
|
|
656
|
+
l[E] = j.textContent || "";
|
|
657
|
+
}) : l[S.nodeName] = S.textContent || "";
|
|
658
|
+
}), l;
|
|
659
659
|
});
|
|
660
|
-
o.onSubmit(
|
|
661
|
-
} catch (
|
|
662
|
-
console.error("Error al aplicar filtros:",
|
|
660
|
+
o.onSubmit(b);
|
|
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: a.toString()
|
|
667
667
|
};
|
|
668
|
-
o.updateFeedCriteria(
|
|
668
|
+
o.updateFeedCriteria(r), g.value = !1;
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
|
-
return (c,
|
|
671
|
+
return (c, a) => (s(), d("div", wt, [
|
|
672
672
|
t("div", null, [
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
"onUpdate:modelValue":
|
|
673
|
+
a[1] || (a[1] = t("label", { class: "block text-sm font-semibold text-slate-600 mb-2" }, "Seleccionar origen:", -1)),
|
|
674
|
+
R(t("select", {
|
|
675
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => F.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
|
-
onChange:
|
|
678
|
-
disabled:
|
|
677
|
+
onChange: y,
|
|
678
|
+
disabled: g.value
|
|
679
679
|
}, [
|
|
680
|
-
(
|
|
681
|
-
key:
|
|
682
|
-
value:
|
|
683
|
-
},
|
|
684
|
-
], 40,
|
|
685
|
-
[H,
|
|
680
|
+
(s(!0), d(B, null, z(u.value, (r) => (s(), d("option", {
|
|
681
|
+
key: r.id,
|
|
682
|
+
value: r.id
|
|
683
|
+
}, x(r.name), 9, Ct))), 128))
|
|
684
|
+
], 40, yt), [
|
|
685
|
+
[H, F.value]
|
|
686
686
|
])
|
|
687
687
|
]),
|
|
688
|
-
t("div",
|
|
689
|
-
|
|
690
|
-
(
|
|
691
|
-
key:
|
|
688
|
+
t("div", $t, [
|
|
689
|
+
i.value.length > 0 ? (s(), d("div", kt, [
|
|
690
|
+
(s(!0), d(B, null, z(i.value, (r) => (s(), 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",
|
|
695
|
-
|
|
694
|
+
t("label", St, x(r.label) + ":", 1),
|
|
695
|
+
r.type === "select" ? (s(), 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(
|
|
699
|
-
disabled:
|
|
698
|
+
onChange: (f) => m(r.id, f.target.value),
|
|
699
|
+
disabled: g.value
|
|
700
700
|
}, [
|
|
701
|
-
|
|
702
|
-
(
|
|
701
|
+
a[2] || (a[2] = t("option", { value: "" }, "Seleccionar...", -1)),
|
|
702
|
+
(s(!0), d(B, null, z(r.options, (f) => (s(), d("option", {
|
|
703
703
|
key: f,
|
|
704
704
|
value: f
|
|
705
|
-
},
|
|
706
|
-
], 40,
|
|
705
|
+
}, x(f), 9, Pt))), 128))
|
|
706
|
+
], 40, Ft)) : r.type === "date" ? (s(), 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(
|
|
711
|
-
disabled:
|
|
712
|
-
}, null, 40,
|
|
710
|
+
onChange: (f) => m(r.id, f.target.value),
|
|
711
|
+
disabled: g.value
|
|
712
|
+
}, null, 40, jt)) : r.type === "text" ? (s(), 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(
|
|
717
|
-
disabled:
|
|
718
|
-
placeholder:
|
|
719
|
-
}, null, 40,
|
|
716
|
+
onInput: (f) => m(r.id, f.target.value),
|
|
717
|
+
disabled: g.value,
|
|
718
|
+
placeholder: r.label
|
|
719
|
+
}, null, 40, Mt)) : $("", !0)
|
|
720
720
|
]))), 128))
|
|
721
|
-
])) :
|
|
721
|
+
])) : $("", !0),
|
|
722
722
|
t("button", {
|
|
723
723
|
type: "button",
|
|
724
724
|
onClick: I,
|
|
725
725
|
class: "cursor-pointer w-full bg-gradient-to-r from-emerald-500 to-teal-500 text-white font-semibold px-4 py-3 rounded-xl shadow-md hover:from-emerald-600 hover:to-teal-600 hover:shadow-lg transform hover:-translate-y-0.5 transition-all duration-200 disabled:from-slate-300 disabled:to-slate-400 disabled:cursor-not-allowed disabled:transform-none disabled:shadow-none flex items-center justify-center gap-2",
|
|
726
|
-
disabled:
|
|
726
|
+
disabled: g.value
|
|
727
727
|
}, [
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
], 8,
|
|
728
|
+
g.value ? (s(), d("span", At, "⏳")) : (s(), d("span", Bt, "🔍")),
|
|
729
|
+
D(" " + x(g.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
|
|
730
|
+
], 8, It)
|
|
731
731
|
])
|
|
732
732
|
]));
|
|
733
733
|
}
|
|
734
|
-
}),
|
|
734
|
+
}), Tt = { 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" }, Dt = { class: "w-full flex justify-between items-center mb-4" }, Ot = { 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" }, Rt = { class: "flex-1 flex flex-col gap-5" }, Vt = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, zt = {
|
|
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
|
+
}, Nt = { class: "list-none mt-3 space-y-2 text-slate-600" }, Ut = { class: "flex items-start gap-2" }, qt = { class: "font-semibold text-slate-700" }, Lt = { class: "flex items-start gap-2" }, Gt = { class: "font-semibold text-slate-700" }, Jt = { class: "font-semibold text-slate-700" }, Ht = { class: "flex items-start gap-2" }, Wt = { class: "flex flex-wrap gap-2 mt-1" }, Yt = { class: "font-semibold text-slate-700" }, Kt = { class: "text-emerald-600" }, Qt = { class: "flex flex-col gap-4 w-full" }, Xt = { class: "flex items-center gap-3 cursor-pointer group" }, Zt = {
|
|
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
|
+
}, _t = { class: "flex flex-col gap-2" }, eo = { class: "flex flex-col gap-2" }, to = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, oo = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, no = {
|
|
741
741
|
key: 0,
|
|
742
742
|
class: "flex-1 flex flex-col items-center justify-center text-slate-400"
|
|
743
|
-
},
|
|
743
|
+
}, lo = {
|
|
744
744
|
key: 1,
|
|
745
745
|
class: "space-y-3"
|
|
746
|
-
},
|
|
746
|
+
}, ao = ["onClick"], ro = { class: "font-bold text-slate-800 mb-2" }, so = { class: "text-sm text-slate-600 line-clamp-2" }, io = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, uo = {
|
|
747
747
|
key: 0,
|
|
748
748
|
class: "flex-1 flex flex-col items-center justify-center text-slate-400"
|
|
749
|
-
},
|
|
749
|
+
}, co = {
|
|
750
750
|
key: 1,
|
|
751
751
|
class: "space-y-3"
|
|
752
|
-
},
|
|
752
|
+
}, mo = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, bo = ["onUpdate:modelValue"], go = ["value"], fo = {
|
|
753
753
|
key: 0,
|
|
754
754
|
class: "mt-3 p-3 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-lg border border-emerald-200"
|
|
755
|
-
},
|
|
755
|
+
}, po = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, vo = /* @__PURE__ */ W({
|
|
756
756
|
__name: "FeedComponent",
|
|
757
757
|
props: {
|
|
758
758
|
object: {
|
|
@@ -773,140 +773,149 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
773
773
|
}
|
|
774
774
|
},
|
|
775
775
|
setup(e) {
|
|
776
|
-
const o = e,
|
|
777
|
-
|
|
778
|
-
}, c = (
|
|
779
|
-
|
|
780
|
-
},
|
|
781
|
-
const
|
|
782
|
-
var
|
|
776
|
+
const o = e, g = k(null), F = k(null), p = k(!1), u = k(1), i = k("horizontal"), m = k({}), y = k(null), I = (b) => {
|
|
777
|
+
g.value = b;
|
|
778
|
+
}, c = (b) => {
|
|
779
|
+
F.value = b;
|
|
780
|
+
}, a = () => {
|
|
781
|
+
const b = o.object.fields.filter((n) => n.mappedTo).map((n) => {
|
|
782
|
+
var l;
|
|
783
783
|
return {
|
|
784
|
-
fieldName:
|
|
785
|
-
mappedTo:
|
|
786
|
-
value: ((
|
|
784
|
+
fieldName: n.name,
|
|
785
|
+
mappedTo: n.mappedTo,
|
|
786
|
+
value: ((l = F.value) == null ? void 0 : l[n.mappedTo]) ?? null
|
|
787
787
|
};
|
|
788
788
|
});
|
|
789
|
-
|
|
789
|
+
y.value = {
|
|
790
790
|
...m.value,
|
|
791
791
|
dynamicUpdate: p.value,
|
|
792
792
|
elementCount: u.value,
|
|
793
|
-
orientation:
|
|
794
|
-
mapping:
|
|
795
|
-
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(
|
|
796
|
-
},
|
|
797
|
-
m.value =
|
|
793
|
+
orientation: i.value,
|
|
794
|
+
mapping: b.map(({ fieldName: n, mappedTo: l }) => ({ fieldName: n, mappedTo: l }))
|
|
795
|
+
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(b, y.value), o.toggleFeedSection();
|
|
796
|
+
}, r = (b) => {
|
|
797
|
+
m.value = b;
|
|
798
798
|
}, f = () => {
|
|
799
|
-
var
|
|
800
|
-
(
|
|
799
|
+
var b;
|
|
800
|
+
(b = o.object) != null && b.repeat_data && (y.value = o.object.repeat_data, p.value = o.object.repeat_data.dynamicUpdate || !1, u.value = o.object.repeat_data.elementCount || 1, i.value = o.object.repeat_data.orientation || "horizontal", m.value = {
|
|
801
801
|
name: o.object.repeat_data.name,
|
|
802
802
|
url: o.object.repeat_data.url
|
|
803
803
|
});
|
|
804
|
-
},
|
|
805
|
-
|
|
804
|
+
}, V = () => {
|
|
805
|
+
y.value = null, p.value = !1, u.value = 1, i.value = "horizontal", m.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
|
|
806
806
|
}, P = () => {
|
|
807
|
-
var
|
|
808
|
-
|
|
809
|
-
...
|
|
807
|
+
var b;
|
|
808
|
+
y.value && (y.value = {
|
|
809
|
+
...y.value,
|
|
810
810
|
dynamicUpdate: p.value,
|
|
811
811
|
elementCount: u.value,
|
|
812
|
-
orientation:
|
|
813
|
-
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((
|
|
814
|
-
fieldName:
|
|
815
|
-
mappedTo:
|
|
812
|
+
orientation: i.value
|
|
813
|
+
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((b = y.value.mapping) == null ? void 0 : b.map((n) => ({
|
|
814
|
+
fieldName: n.fieldName,
|
|
815
|
+
mappedTo: n.mappedTo,
|
|
816
816
|
value: null
|
|
817
|
-
}))) || [],
|
|
817
|
+
}))) || [], y.value));
|
|
818
818
|
};
|
|
819
819
|
return ae(() => {
|
|
820
820
|
f();
|
|
821
|
-
}), (
|
|
822
|
-
t("div",
|
|
823
|
-
|
|
824
|
-
t("span", { class: "text-
|
|
825
|
-
|
|
821
|
+
}), (b, n) => (s(), d("div", Tt, [
|
|
822
|
+
t("div", Dt, [
|
|
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
|
+
D(" Configuración de Feed ")
|
|
826
826
|
], -1)),
|
|
827
827
|
t("button", {
|
|
828
|
-
onClick:
|
|
829
|
-
(...
|
|
828
|
+
onClick: n[0] || (n[0] = //@ts-ignore
|
|
829
|
+
(...l) => e.toggleFeedSection && e.toggleFeedSection(...l)),
|
|
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
|
-
t("div",
|
|
836
|
-
t("div",
|
|
837
|
-
t("div",
|
|
838
|
-
|
|
835
|
+
t("div", Ot, [
|
|
836
|
+
t("div", Rt, [
|
|
837
|
+
t("div", Vt, [
|
|
838
|
+
y.value && y.value.dynamicUpdate ? (s(), d("div", zt, [
|
|
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
|
+
D(" 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
|
+
D(" Guardar ", -1)
|
|
851
851
|
])]),
|
|
852
852
|
t("button", {
|
|
853
|
-
onClick:
|
|
853
|
+
onClick: V,
|
|
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
|
+
D(" Borrar ", -1)
|
|
858
858
|
])])
|
|
859
859
|
])
|
|
860
860
|
]),
|
|
861
|
-
t("ul",
|
|
861
|
+
t("ul", Nt, [
|
|
862
862
|
t("li", Ut, [
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
t("span",
|
|
863
|
+
n[9] || (n[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
864
|
+
n[10] || (n[10] = D(" Conectar con ", -1)),
|
|
865
|
+
t("span", qt, x(y.value.name), 1)
|
|
866
866
|
]),
|
|
867
|
-
t("li",
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
t("span",
|
|
871
|
-
|
|
872
|
-
t("span",
|
|
873
|
-
|
|
867
|
+
t("li", Lt, [
|
|
868
|
+
n[11] || (n[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
869
|
+
n[12] || (n[12] = D(" Recuperar ", -1)),
|
|
870
|
+
t("span", Gt, x(y.value.elementCount), 1),
|
|
871
|
+
n[13] || (n[13] = D(" items (", -1)),
|
|
872
|
+
t("span", Jt, x(y.value.orientation), 1),
|
|
873
|
+
n[14] || (n[14] = D(")", -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
|
-
(
|
|
881
|
-
key:
|
|
878
|
+
n[16] || (n[16] = D(" Mapeo: ", -1)),
|
|
879
|
+
t("div", Wt, [
|
|
880
|
+
(s(!0), d(B, null, z(y.value.mapping, (l, S) => (s(), d("span", {
|
|
881
|
+
key: S,
|
|
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",
|
|
885
|
-
|
|
886
|
-
t("span",
|
|
884
|
+
t("span", Yt, x(l.fieldName), 1),
|
|
885
|
+
n[15] || (n[15] = t("span", { class: "text-slate-400" }, "←", -1)),
|
|
886
|
+
t("span", Kt, x(l.mappedTo), 1)
|
|
887
887
|
]))), 128))
|
|
888
888
|
])
|
|
889
889
|
])
|
|
890
890
|
])
|
|
891
891
|
])
|
|
892
|
-
])) :
|
|
893
|
-
t("div",
|
|
894
|
-
t("label",
|
|
895
|
-
|
|
892
|
+
])) : $("", !0),
|
|
893
|
+
t("div", Qt, [
|
|
894
|
+
t("label", Xt, [
|
|
895
|
+
R(t("input", {
|
|
896
896
|
type: "checkbox",
|
|
897
|
-
"onUpdate:modelValue":
|
|
897
|
+
"onUpdate:modelValue": n[1] || (n[1] = (l) => p.value = l),
|
|
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
|
-
p.value ? (
|
|
905
|
-
t("div",
|
|
906
|
-
|
|
907
|
-
|
|
904
|
+
p.value ? (s(), d("div", Zt, [
|
|
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
|
+
D(" 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)),
|
|
914
|
+
t("div", _t, [
|
|
915
|
+
n[19] || (n[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
|
|
916
|
+
R(t("input", {
|
|
908
917
|
type: "number",
|
|
909
|
-
"onUpdate:modelValue":
|
|
918
|
+
"onUpdate:modelValue": n[2] || (n[2] = (l) => u.value = l),
|
|
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), [
|
|
@@ -918,129 +927,129 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
918
927
|
]
|
|
919
928
|
])
|
|
920
929
|
]),
|
|
921
|
-
t("div",
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
"onUpdate:modelValue":
|
|
930
|
+
t("div", eo, [
|
|
931
|
+
n[21] || (n[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
|
|
932
|
+
R(t("select", {
|
|
933
|
+
"onUpdate:modelValue": n[3] || (n[3] = (l) => i.value = l),
|
|
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
|
-
[H,
|
|
942
|
+
[H, i.value]
|
|
934
943
|
])
|
|
935
944
|
])
|
|
936
|
-
])) :
|
|
945
|
+
])) : $("", !0)
|
|
937
946
|
])
|
|
938
947
|
]),
|
|
939
|
-
t("div",
|
|
940
|
-
|
|
948
|
+
t("div", to, [
|
|
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
|
+
D(" Orígenes y Filtros ")
|
|
943
952
|
], -1)),
|
|
944
|
-
L(
|
|
953
|
+
L(Et, {
|
|
945
954
|
onSubmit: I,
|
|
946
|
-
updateFeedCriteria:
|
|
955
|
+
updateFeedCriteria: r,
|
|
947
956
|
isProduction: e.isProduction
|
|
948
957
|
}, null, 8, ["isProduction"])
|
|
949
958
|
])
|
|
950
959
|
]),
|
|
951
|
-
t("div",
|
|
952
|
-
|
|
960
|
+
t("div", oo, [
|
|
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
|
+
D(" Contenidos ")
|
|
955
964
|
], -1)),
|
|
956
|
-
!
|
|
965
|
+
!g.value || g.value.length === 0 ? (s(), d("div", no, [...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
|
|
960
|
-
])])) : (
|
|
961
|
-
(
|
|
962
|
-
key:
|
|
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)
|
|
969
|
+
])])) : (s(), d("ul", lo, [
|
|
970
|
+
(s(!0), d(B, null, z(g.value, (l, S) => (s(), d("li", {
|
|
971
|
+
key: S,
|
|
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(l)
|
|
965
974
|
}, [
|
|
966
|
-
t("h4",
|
|
967
|
-
t("p",
|
|
968
|
-
], 8,
|
|
975
|
+
t("h4", ro, x(l.title || l.titulo || "Sin título"), 1),
|
|
976
|
+
t("p", so, x(l.description || l.descripcion || l.content || "Sin descripción"), 1)
|
|
977
|
+
], 8, ao))), 128))
|
|
969
978
|
]))
|
|
970
979
|
]),
|
|
971
|
-
t("div",
|
|
972
|
-
|
|
980
|
+
t("div", io, [
|
|
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
|
+
D(" Relacionar Contenido ")
|
|
975
984
|
], -1)),
|
|
976
|
-
|
|
977
|
-
(
|
|
978
|
-
key:
|
|
985
|
+
F.value ? (s(), d("div", co, [
|
|
986
|
+
(s(!0), d(B, null, z(e.object.fields, (l, S) => (s(), d("div", {
|
|
987
|
+
key: S,
|
|
979
988
|
class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
|
|
980
989
|
}, [
|
|
981
|
-
t("label",
|
|
982
|
-
|
|
983
|
-
|
|
990
|
+
t("label", mo, [
|
|
991
|
+
n[27] || (n[27] = t("span", { class: "text-base" }, "⚙️", -1)),
|
|
992
|
+
D(" " + x(l.name), 1)
|
|
984
993
|
]),
|
|
985
|
-
|
|
986
|
-
"onUpdate:modelValue": (j) =>
|
|
994
|
+
R(t("select", {
|
|
995
|
+
"onUpdate:modelValue": (j) => l.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
|
-
(
|
|
991
|
-
key:
|
|
992
|
-
value:
|
|
993
|
-
},
|
|
994
|
-
], 8,
|
|
995
|
-
[H,
|
|
998
|
+
n[28] || (n[28] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
|
|
999
|
+
(s(!0), d(B, null, z(F.value, (j, E) => (s(), d("option", {
|
|
1000
|
+
key: E,
|
|
1001
|
+
value: E
|
|
1002
|
+
}, x(E), 9, go))), 128))
|
|
1003
|
+
], 8, bo), [
|
|
1004
|
+
[H, l.mappedTo]
|
|
996
1005
|
]),
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
t("p",
|
|
1000
|
-
])) :
|
|
1006
|
+
l.mappedTo ? (s(), d("div", fo, [
|
|
1007
|
+
n[29] || (n[29] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
|
|
1008
|
+
t("p", po, x(F.value[l.mappedTo]), 1)
|
|
1009
|
+
])) : $("", !0)
|
|
1001
1010
|
]))), 128)),
|
|
1002
1011
|
t("button", {
|
|
1003
|
-
onClick:
|
|
1012
|
+
onClick: a,
|
|
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
|
-
])) : (
|
|
1018
|
+
])) : (s(), d("div", uo, [...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
|
+
D("Selecciona un contenido"),
|
|
1013
1022
|
t("br"),
|
|
1014
|
-
|
|
1023
|
+
D("para relacionar")
|
|
1015
1024
|
], -1)
|
|
1016
1025
|
])]))
|
|
1017
1026
|
])
|
|
1018
1027
|
])
|
|
1019
1028
|
]));
|
|
1020
1029
|
}
|
|
1021
|
-
}),
|
|
1030
|
+
}), xo = { class: "absolute -top-2.5 left-3 text-[11px] font-medium tracking-wide bg-gradient-to-r from-slate-700 to-slate-600 text-white px-3 py-0.5 rounded-full shadow-sm" }, ho = { class: "w-full text-right flex justify-between items-center mt-1" }, wo = { class: "flex gap-3 items-center" }, yo = { class: "bg-rose-50 border border-rose-200 text-rose-500 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider rounded-md" }, Co = {
|
|
1022
1031
|
key: 0,
|
|
1023
1032
|
class: "flex-1 flex justify-center"
|
|
1024
|
-
},
|
|
1033
|
+
}, $o = { class: "flex justify-end items-center gap-3" }, ko = { class: "bg-violet-50 border border-violet-200 text-violet-600 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider" }, So = {
|
|
1025
1034
|
key: 0,
|
|
1026
1035
|
class: "flex gap-1 bg-slate-50 rounded-lg p-1"
|
|
1027
|
-
},
|
|
1036
|
+
}, Fo = {
|
|
1028
1037
|
key: 0,
|
|
1029
1038
|
class: "text-[10px] bg-amber-100 text-amber-700 px-1.5 rounded-full font-medium"
|
|
1030
|
-
},
|
|
1039
|
+
}, Po = { class: "mt-2 flex items-center" }, jo = { class: "font-medium text-slate-700" }, Mo = { key: 0 }, Io = { key: 1 }, Ao = {
|
|
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
|
-
},
|
|
1042
|
+
}, Bo = { class: "mt-3 flex gap-1.5 flex-wrap" }, Eo = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover/component: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" }, To = { class: "absolute top-2 right-2 group/info z-10" }, Do = { 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" }, Oo = { class: "flex justify-center h-full items-center p-4 gap-3" }, Ro = {
|
|
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
|
+
}, Vo = {
|
|
1038
1047
|
key: 1,
|
|
1039
1048
|
class: "flex-1 flex justify-center items-center"
|
|
1040
|
-
},
|
|
1049
|
+
}, zo = { class: "flex flex-col items-center" }, No = {
|
|
1041
1050
|
key: 0,
|
|
1042
1051
|
class: "text-[10px] mt-0.5 opacity-70"
|
|
1043
|
-
},
|
|
1052
|
+
}, Uo = ["id"], be = /* @__PURE__ */ W({
|
|
1044
1053
|
__name: "InitialComponent",
|
|
1045
1054
|
props: {
|
|
1046
1055
|
object: {
|
|
@@ -1052,6 +1061,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1052
1061
|
fullwidthMode: Boolean,
|
|
1053
1062
|
addComponentToColumn: Function,
|
|
1054
1063
|
removeComponent: Function,
|
|
1064
|
+
cloneComponent: Function,
|
|
1055
1065
|
section: String,
|
|
1056
1066
|
renderApiDomain: String,
|
|
1057
1067
|
insideComponentBox: {
|
|
@@ -1064,91 +1074,91 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1064
1074
|
}
|
|
1065
1075
|
},
|
|
1066
1076
|
setup(e) {
|
|
1067
|
-
const o = e,
|
|
1068
|
-
oe(() => o.isComponentMode, (
|
|
1069
|
-
|
|
1077
|
+
const o = e, g = Math.random().toString(36).substring(2, 15), F = k(!1), p = k(!1), u = k(null), i = k(null), m = k(!1), y = k(!1);
|
|
1078
|
+
oe(() => o.isComponentMode, (n) => {
|
|
1079
|
+
n || I();
|
|
1070
1080
|
}), oe(() => o.object, () => {
|
|
1071
1081
|
I();
|
|
1072
|
-
}, { deep: !0 }), oe(m, async (
|
|
1073
|
-
|
|
1082
|
+
}, { deep: !0 }), oe(m, async (n) => {
|
|
1083
|
+
n && (await xe(), b());
|
|
1074
1084
|
});
|
|
1075
1085
|
const I = () => {
|
|
1076
1086
|
u.value && clearTimeout(u.value), u.value = setTimeout(() => {
|
|
1077
|
-
|
|
1087
|
+
b();
|
|
1078
1088
|
}, 500);
|
|
1079
1089
|
}, c = () => {
|
|
1080
1090
|
if (o.isComponentMode) return;
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
|
|
1091
|
+
const n = new IntersectionObserver((l) => {
|
|
1092
|
+
l.forEach((S) => {
|
|
1093
|
+
S.isIntersecting && !m.value && (m.value = !0, n.disconnect());
|
|
1084
1094
|
});
|
|
1085
1095
|
}, { threshold: 0.1 });
|
|
1086
|
-
|
|
1087
|
-
},
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
},
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
}), o.object.repeat_data =
|
|
1096
|
+
i.value && n.observe(i.value);
|
|
1097
|
+
}, a = (n, l) => {
|
|
1098
|
+
const S = (o.object.fields || []).find((j) => j.name === n);
|
|
1099
|
+
S && (S.example_value = l);
|
|
1100
|
+
}, r = (n, l) => {
|
|
1101
|
+
n.forEach((S) => {
|
|
1102
|
+
S.value !== void 0 && a(S.fieldName, S.value);
|
|
1103
|
+
}), o.object.repeat_data = l;
|
|
1094
1104
|
}, f = () => {
|
|
1095
1105
|
p.value = !p.value;
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1106
|
+
}, V = () => {
|
|
1107
|
+
y.value = !y.value;
|
|
1098
1108
|
}, P = () => {
|
|
1099
|
-
|
|
1100
|
-
const
|
|
1101
|
-
if (!
|
|
1109
|
+
b(!0).then((n) => {
|
|
1110
|
+
const l = window.open("", "Preview", "width=1200,height=800");
|
|
1111
|
+
if (!l) {
|
|
1102
1112
|
alert("El navegador bloqueó la ventana emergente. Por favor, permite los popups para este sitio.");
|
|
1103
1113
|
return;
|
|
1104
1114
|
}
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1107
|
-
const
|
|
1108
|
-
j.src ?
|
|
1109
|
-
}),
|
|
1115
|
+
l.document.body.innerHTML = n, l.document.querySelectorAll("script").forEach((j) => {
|
|
1116
|
+
var N;
|
|
1117
|
+
const E = l.document.createElement("script");
|
|
1118
|
+
j.src ? E.src = j.src : E.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(E, j);
|
|
1119
|
+
}), l.document.close();
|
|
1110
1120
|
});
|
|
1111
|
-
},
|
|
1121
|
+
}, b = (n = !1) => {
|
|
1112
1122
|
var j;
|
|
1113
1123
|
if (!((j = o.object) != null && j.category) || o.object.category === "Repetidor") {
|
|
1114
|
-
const
|
|
1115
|
-
if (
|
|
1116
|
-
return Promise.resolve(
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1124
|
+
const E = '<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>';
|
|
1125
|
+
if (n)
|
|
1126
|
+
return Promise.resolve(E);
|
|
1127
|
+
const N = document.getElementById(g);
|
|
1128
|
+
return N && (N.innerHTML = E), Promise.resolve("");
|
|
1119
1129
|
}
|
|
1120
|
-
const
|
|
1121
|
-
return fetch(
|
|
1130
|
+
const l = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", S = JSON.stringify({ obj: o.object }, null, 2);
|
|
1131
|
+
return fetch(l, {
|
|
1122
1132
|
method: "POST",
|
|
1123
1133
|
headers: { "Content-Type": "application/json" },
|
|
1124
|
-
body:
|
|
1125
|
-
}).then((
|
|
1126
|
-
if (
|
|
1127
|
-
return
|
|
1128
|
-
const
|
|
1129
|
-
return
|
|
1134
|
+
body: S
|
|
1135
|
+
}).then((E) => E.text()).then((E) => {
|
|
1136
|
+
if (n)
|
|
1137
|
+
return E;
|
|
1138
|
+
const N = document.getElementById(g);
|
|
1139
|
+
return N && (N.innerHTML = E), "";
|
|
1130
1140
|
});
|
|
1131
1141
|
};
|
|
1132
1142
|
return ae(() => {
|
|
1133
1143
|
c();
|
|
1134
|
-
}), (
|
|
1135
|
-
|
|
1144
|
+
}), (n, l) => (s(), d("div", null, [
|
|
1145
|
+
y.value ? (s(), ue(vo, {
|
|
1136
1146
|
key: 0,
|
|
1137
|
-
updateObjectByFeedContent:
|
|
1138
|
-
toggleFeedSection:
|
|
1147
|
+
updateObjectByFeedContent: r,
|
|
1148
|
+
toggleFeedSection: V,
|
|
1139
1149
|
object: e.object,
|
|
1140
1150
|
isProduction: e.isProduction
|
|
1141
|
-
}, null, 8, ["object", "isProduction"])) :
|
|
1151
|
+
}, null, 8, ["object", "isProduction"])) : $("", !0),
|
|
1142
1152
|
t("div", {
|
|
1143
1153
|
ref_key: "rootElement",
|
|
1144
|
-
ref:
|
|
1145
|
-
class: G(["min-h-[100px] relative group hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
|
|
1154
|
+
ref: i,
|
|
1155
|
+
class: G(["min-h-[100px] relative group/component hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
|
|
1146
1156
|
}, [
|
|
1147
|
-
e.isComponentMode ? (
|
|
1148
|
-
t("span",
|
|
1149
|
-
t("div",
|
|
1150
|
-
t("div",
|
|
1151
|
-
|
|
1157
|
+
e.isComponentMode ? (s(), d(B, { key: 0 }, [
|
|
1158
|
+
t("span", xo, x(e.object.component_name), 1),
|
|
1159
|
+
t("div", ho, [
|
|
1160
|
+
t("div", wo, [
|
|
1161
|
+
l[10] || (l[10] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
|
|
1152
1162
|
t("svg", {
|
|
1153
1163
|
class: "w-5 h-5",
|
|
1154
1164
|
fill: "currentColor",
|
|
@@ -1157,44 +1167,50 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1157
1167
|
t("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" })
|
|
1158
1168
|
])
|
|
1159
1169
|
], -1)),
|
|
1160
|
-
t("span",
|
|
1170
|
+
t("span", yo, x(e.object.category), 1)
|
|
1161
1171
|
]),
|
|
1162
|
-
e.fullwidthMode ? (
|
|
1172
|
+
e.fullwidthMode ? (s(), d("div", Co, [
|
|
1163
1173
|
t("div", {
|
|
1164
1174
|
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:
|
|
1175
|
+
onClick: l[0] || (l[0] = (S) => {
|
|
1166
1176
|
var j;
|
|
1167
1177
|
return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
|
|
1168
1178
|
})
|
|
1169
1179
|
}, "Seleccionar")
|
|
1170
|
-
])) :
|
|
1171
|
-
t("div",
|
|
1172
|
-
t("span",
|
|
1173
|
-
e.insideComponentBox ?
|
|
1180
|
+
])) : $("", !0),
|
|
1181
|
+
t("div", $o, [
|
|
1182
|
+
t("span", ko, x(e.object.framework), 1),
|
|
1183
|
+
e.insideComponentBox ? $("", !0) : (s(), d("div", So, [
|
|
1174
1184
|
t("div", {
|
|
1175
1185
|
title: "Previsualizar Dummy",
|
|
1176
|
-
onClick:
|
|
1186
|
+
onClick: l[1] || (l[1] = (S) => P()),
|
|
1177
1187
|
class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1178
1188
|
}, "🔍"),
|
|
1179
1189
|
t("div", {
|
|
1180
1190
|
title: "Editar configuración",
|
|
1181
|
-
onClick:
|
|
1191
|
+
onClick: l[2] || (l[2] = (S) => p.value = !p.value),
|
|
1182
1192
|
class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1183
1193
|
}, "⚙️"),
|
|
1184
1194
|
t("div", {
|
|
1185
1195
|
title: "Beber de contenido",
|
|
1186
|
-
onClick:
|
|
1196
|
+
onClick: V,
|
|
1187
1197
|
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
1198
|
}, [
|
|
1189
|
-
|
|
1190
|
-
e.object.repeat_data ? (
|
|
1199
|
+
l[11] || (l[11] = D("⚡ ", -1)),
|
|
1200
|
+
e.object.repeat_data ? (s(), d("span", Fo, x(e.object.repeat_data.elementCount), 1)) : $("", !0)
|
|
1191
1201
|
]),
|
|
1192
|
-
e.
|
|
1202
|
+
e.cloneComponent ? (s(), d("div", {
|
|
1193
1203
|
key: 0,
|
|
1204
|
+
title: "Clonar componente",
|
|
1205
|
+
onClick: l[3] || (l[3] = (S) => e.cloneComponent(e.object, e.section || "")),
|
|
1206
|
+
class: "p-1.5 rounded-md hover:bg-sky-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1207
|
+
}, "📋")) : $("", !0),
|
|
1208
|
+
e.removeComponent ? (s(), d("div", {
|
|
1209
|
+
key: 1,
|
|
1194
1210
|
title: "Eliminar componente",
|
|
1195
|
-
onClick:
|
|
1211
|
+
onClick: l[4] || (l[4] = (S) => e.removeComponent(e.object, e.section || "")),
|
|
1196
1212
|
class: "p-1.5 rounded-md hover:bg-red-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1197
|
-
}, "🗑️")) :
|
|
1213
|
+
}, "🗑️")) : $("", !0)
|
|
1198
1214
|
]))
|
|
1199
1215
|
])
|
|
1200
1216
|
]),
|
|
@@ -1203,27 +1219,43 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1203
1219
|
object: e.object,
|
|
1204
1220
|
showForm: p.value
|
|
1205
1221
|
}, null, 8, ["object", "showForm"]),
|
|
1206
|
-
t("div",
|
|
1207
|
-
t("span",
|
|
1222
|
+
t("div", Po, [
|
|
1223
|
+
t("span", jo, x(e.object.name), 1),
|
|
1208
1224
|
t("button", {
|
|
1209
1225
|
type: "button",
|
|
1210
|
-
onClick:
|
|
1226
|
+
onClick: l[5] || (l[5] = (S) => F.value = !F.value),
|
|
1211
1227
|
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
1228
|
}, [
|
|
1213
|
-
|
|
1229
|
+
F.value ? (s(), d("span", Io, "▲")) : (s(), d("span", Mo, "▼"))
|
|
1214
1230
|
])
|
|
1215
1231
|
]),
|
|
1216
|
-
|
|
1217
|
-
t("div",
|
|
1218
|
-
(
|
|
1232
|
+
F.value ? (s(), d("div", Ao, x(e.object.description), 1)) : $("", !0),
|
|
1233
|
+
t("div", Bo, [
|
|
1234
|
+
(s(!0), d(B, null, z(e.object.tags, (S, j) => (s(), d("span", {
|
|
1219
1235
|
key: j,
|
|
1220
1236
|
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
|
-
},
|
|
1237
|
+
}, x(S), 1))), 128))
|
|
1222
1238
|
])
|
|
1223
|
-
], 64)) : m.value ? (
|
|
1224
|
-
t("div",
|
|
1225
|
-
t("div",
|
|
1226
|
-
|
|
1239
|
+
], 64)) : m.value ? (s(), d(B, { key: 1 }, [
|
|
1240
|
+
t("div", Eo, [
|
|
1241
|
+
t("div", To, [
|
|
1242
|
+
l[12] || (l[12] = 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" }, [
|
|
1243
|
+
t("svg", {
|
|
1244
|
+
class: "w-3 h-3 text-slate-400 group-hover/info:text-sky-500",
|
|
1245
|
+
fill: "currentColor",
|
|
1246
|
+
viewBox: "0 0 20 20"
|
|
1247
|
+
}, [
|
|
1248
|
+
t("path", {
|
|
1249
|
+
"fill-rule": "evenodd",
|
|
1250
|
+
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",
|
|
1251
|
+
"clip-rule": "evenodd"
|
|
1252
|
+
})
|
|
1253
|
+
])
|
|
1254
|
+
], -1)),
|
|
1255
|
+
t("div", Do, x(e.object.description), 1)
|
|
1256
|
+
]),
|
|
1257
|
+
t("div", Oo, [
|
|
1258
|
+
e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (s(), d("div", Ro, [...l[13] || (l[13] = [
|
|
1227
1259
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1228
1260
|
t("svg", {
|
|
1229
1261
|
class: "w-6 h-6 mb-1 text-slate-400 group-hover/btn:text-white",
|
|
@@ -1234,28 +1266,28 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1234
1266
|
]),
|
|
1235
1267
|
t("span", { class: "text-xs font-medium" }, "Mover")
|
|
1236
1268
|
], -1)
|
|
1237
|
-
])])) :
|
|
1238
|
-
e.insideComponentBox && e.fullwidthMode ? (
|
|
1269
|
+
])])) : $("", !0),
|
|
1270
|
+
e.insideComponentBox && e.fullwidthMode ? (s(), d("div", Vo, [
|
|
1239
1271
|
t("div", {
|
|
1240
1272
|
title: "Agregar componente a la columna",
|
|
1241
|
-
onClick:
|
|
1273
|
+
onClick: l[6] || (l[6] = (S) => {
|
|
1242
1274
|
var j;
|
|
1243
1275
|
return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
|
|
1244
1276
|
}),
|
|
1245
1277
|
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
|
-
}, [...
|
|
1278
|
+
}, [...l[14] || (l[14] = [
|
|
1247
1279
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1248
1280
|
t("span", { class: "text-2xl mb-1" }, "🚀"),
|
|
1249
1281
|
t("span", { class: "text-sm font-medium" }, "Seleccionar")
|
|
1250
1282
|
], -1)
|
|
1251
1283
|
])])
|
|
1252
|
-
])) :
|
|
1253
|
-
e.insideComponentBox ?
|
|
1284
|
+
])) : $("", !0),
|
|
1285
|
+
e.insideComponentBox ? $("", !0) : (s(), d(B, { key: 2 }, [
|
|
1254
1286
|
t("div", {
|
|
1255
1287
|
title: "Configurar componente",
|
|
1256
|
-
onClick:
|
|
1288
|
+
onClick: l[7] || (l[7] = (S) => p.value = !p.value),
|
|
1257
1289
|
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
|
-
}, [...
|
|
1290
|
+
}, [...l[15] || (l[15] = [
|
|
1259
1291
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1260
1292
|
t("span", { class: "text-xl mb-1" }, "⚙️"),
|
|
1261
1293
|
t("span", { class: "text-xs font-medium" }, "Configurar")
|
|
@@ -1263,26 +1295,37 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1263
1295
|
])]),
|
|
1264
1296
|
t("div", {
|
|
1265
1297
|
title: "Configurar componente",
|
|
1266
|
-
onClick:
|
|
1298
|
+
onClick: V,
|
|
1267
1299
|
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
1300
|
}, [
|
|
1269
|
-
t("div",
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (
|
|
1301
|
+
t("div", zo, [
|
|
1302
|
+
l[16] || (l[16] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
|
|
1303
|
+
l[17] || (l[17] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
|
|
1304
|
+
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (s(), d("span", No, "Carga " + x(e.object.repeat_data.elementCount) + " elementos", 1)) : $("", !0)
|
|
1273
1305
|
])
|
|
1274
1306
|
]),
|
|
1275
|
-
e.
|
|
1307
|
+
e.cloneComponent ? (s(), d("div", {
|
|
1276
1308
|
key: 0,
|
|
1309
|
+
title: "Clonar componente",
|
|
1310
|
+
onClick: l[8] || (l[8] = (S) => e.cloneComponent(e.object, e.section || "")),
|
|
1311
|
+
class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-sky-500 hover:border-sky-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
|
|
1312
|
+
}, [...l[18] || (l[18] = [
|
|
1313
|
+
t("div", { class: "flex flex-col items-center" }, [
|
|
1314
|
+
t("span", { class: "text-xl mb-1" }, "📋"),
|
|
1315
|
+
t("span", { class: "text-xs font-medium" }, "Clonar")
|
|
1316
|
+
], -1)
|
|
1317
|
+
])])) : $("", !0),
|
|
1318
|
+
e.removeComponent ? (s(), d("div", {
|
|
1319
|
+
key: 1,
|
|
1277
1320
|
title: "Eliminar componente",
|
|
1278
|
-
onClick:
|
|
1321
|
+
onClick: l[9] || (l[9] = (S) => e.removeComponent(e.object, e.section || "")),
|
|
1279
1322
|
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
|
-
}, [...
|
|
1323
|
+
}, [...l[19] || (l[19] = [
|
|
1281
1324
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1282
1325
|
t("span", { class: "text-xl mb-1" }, "🗑️"),
|
|
1283
1326
|
t("span", { class: "text-xs font-medium" }, "Eliminar")
|
|
1284
1327
|
], -1)
|
|
1285
|
-
])])) :
|
|
1328
|
+
])])) : $("", !0)
|
|
1286
1329
|
], 64))
|
|
1287
1330
|
])
|
|
1288
1331
|
]),
|
|
@@ -1292,26 +1335,26 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1292
1335
|
showForm: p.value
|
|
1293
1336
|
}, null, 8, ["object", "showForm"]),
|
|
1294
1337
|
t("div", {
|
|
1295
|
-
id: q(
|
|
1338
|
+
id: q(g),
|
|
1296
1339
|
class: "w-full h-full flex items-center justify-center"
|
|
1297
|
-
}, null, 8,
|
|
1298
|
-
], 64)) :
|
|
1340
|
+
}, null, 8, Uo)
|
|
1341
|
+
], 64)) : $("", !0)
|
|
1299
1342
|
], 2)
|
|
1300
1343
|
]));
|
|
1301
1344
|
}
|
|
1302
|
-
}),
|
|
1345
|
+
}), qo = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, Lo = {
|
|
1303
1346
|
key: 0,
|
|
1304
1347
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1305
|
-
},
|
|
1348
|
+
}, Go = { class: "text-slate-600" }, Jo = {
|
|
1306
1349
|
key: 1,
|
|
1307
1350
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1308
|
-
},
|
|
1351
|
+
}, Ho = { class: "text-slate-600" }, Wo = {
|
|
1309
1352
|
key: 2,
|
|
1310
1353
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1311
|
-
},
|
|
1354
|
+
}, Yo = { class: "text-slate-600" }, Ko = {
|
|
1312
1355
|
key: 0,
|
|
1313
1356
|
class: "my-4 w-full rounded-xl bg-white border border-slate-200 p-4 z-10 hidden group-hover:block shadow-lg"
|
|
1314
|
-
},
|
|
1357
|
+
}, Qo = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, Xo = { class: "flex flex-col" }, Zo = ["for"], _o = ["id"], en = ["value"], tn = { class: "flex flex-col" }, on = ["for"], nn = ["id"], ln = ["value"], an = { class: "flex flex-col" }, rn = ["for"], sn = ["id"], dn = ["value"], un = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, cn = { 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" }, mn = { class: "flex gap-1" }, bn = /* @__PURE__ */ W({
|
|
1315
1358
|
__name: "ColConfig",
|
|
1316
1359
|
props: {
|
|
1317
1360
|
globalPageConfiguration: Array,
|
|
@@ -1332,7 +1375,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1332
1375
|
section: String
|
|
1333
1376
|
},
|
|
1334
1377
|
setup(e) {
|
|
1335
|
-
const o = e,
|
|
1378
|
+
const o = e, g = {
|
|
1336
1379
|
width: [
|
|
1337
1380
|
{ label: "Ancho completo", value: "full" },
|
|
1338
1381
|
{ label: "1/2", value: "1/2" },
|
|
@@ -1356,193 +1399,193 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1356
1399
|
{ label: "Columna (componentes unos encima de otros)", value: "flex-col" },
|
|
1357
1400
|
{ label: "Fila (componentes unos al lado de otros)", value: "flex-row" }
|
|
1358
1401
|
]
|
|
1359
|
-
},
|
|
1360
|
-
var
|
|
1361
|
-
const I = (
|
|
1402
|
+
}, F = k(""), p = k(""), u = k(""), i = k(!1), m = Y(() => {
|
|
1403
|
+
var a, r, f, V;
|
|
1404
|
+
const I = (a = o.globalPageConfiguration) == null ? void 0 : a.find(
|
|
1362
1405
|
(P) => P.section === o.section
|
|
1363
|
-
), c = (
|
|
1406
|
+
), c = (V = (f = (r = I == null ? void 0 : I.rows) == null ? void 0 : r[o.rowIndex]) == null ? void 0 : f.columns) == null ? void 0 : V[o.columnIndex];
|
|
1364
1407
|
return (c == null ? void 0 : c.config) || {};
|
|
1365
|
-
}),
|
|
1366
|
-
var
|
|
1367
|
-
const
|
|
1368
|
-
(
|
|
1408
|
+
}), y = (I, c) => {
|
|
1409
|
+
var V;
|
|
1410
|
+
const a = F.value || g.width[0].value, r = p.value || g.gap[0].value, f = u.value || "";
|
|
1411
|
+
(V = o.updateColConfig) == null || V.call(o, I, c, o.section || "", a, r, f), i.value = !1;
|
|
1369
1412
|
};
|
|
1370
|
-
return (I, c) => (
|
|
1371
|
-
t("div",
|
|
1372
|
-
m.value.width !== void 0 ? (
|
|
1373
|
-
c[12] || (c[12] =
|
|
1374
|
-
t("span",
|
|
1375
|
-
])) :
|
|
1376
|
-
m.value.gap !== void 0 ? (
|
|
1377
|
-
c[13] || (c[13] =
|
|
1378
|
-
t("span",
|
|
1379
|
-
])) :
|
|
1380
|
-
m.value.flexDirection !== void 0 ? (
|
|
1381
|
-
c[14] || (c[14] =
|
|
1382
|
-
t("span",
|
|
1383
|
-
])) :
|
|
1413
|
+
return (I, c) => (s(), d(B, null, [
|
|
1414
|
+
t("div", qo, [
|
|
1415
|
+
m.value.width !== void 0 ? (s(), d("span", Lo, [
|
|
1416
|
+
c[12] || (c[12] = D(" Ancho: ", -1)),
|
|
1417
|
+
t("span", Go, x(m.value.width), 1)
|
|
1418
|
+
])) : $("", !0),
|
|
1419
|
+
m.value.gap !== void 0 ? (s(), d("span", Jo, [
|
|
1420
|
+
c[13] || (c[13] = D(" Gap: ", -1)),
|
|
1421
|
+
t("span", Ho, x(m.value.gap), 1)
|
|
1422
|
+
])) : $("", !0),
|
|
1423
|
+
m.value.flexDirection !== void 0 ? (s(), d("span", Wo, [
|
|
1424
|
+
c[14] || (c[14] = D(" Flex: ", -1)),
|
|
1425
|
+
t("span", Yo, x(m.value.flexDirection), 1)
|
|
1426
|
+
])) : $("", !0)
|
|
1384
1427
|
]),
|
|
1385
|
-
|
|
1386
|
-
t("div",
|
|
1428
|
+
i.value ? (s(), d("div", Ko, [
|
|
1429
|
+
t("div", Qo, [
|
|
1387
1430
|
t("form", {
|
|
1388
1431
|
onSubmit: c[4] || (c[4] = le(() => {
|
|
1389
1432
|
}, ["prevent"])),
|
|
1390
1433
|
class: "flex gap-5 w-full justify-center items-end flex-wrap"
|
|
1391
1434
|
}, [
|
|
1392
|
-
t("div",
|
|
1435
|
+
t("div", Xo, [
|
|
1393
1436
|
t("label", {
|
|
1394
1437
|
for: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1395
1438
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1396
|
-
}, "Ancho:", 8,
|
|
1397
|
-
|
|
1398
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
1439
|
+
}, "Ancho:", 8, Zo),
|
|
1440
|
+
R(t("select", {
|
|
1441
|
+
"onUpdate:modelValue": c[0] || (c[0] = (a) => F.value = a),
|
|
1399
1442
|
id: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1400
1443
|
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
1444
|
}, [
|
|
1402
1445
|
c[15] || (c[15] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1403
|
-
(
|
|
1404
|
-
key:
|
|
1405
|
-
value:
|
|
1406
|
-
},
|
|
1407
|
-
], 8,
|
|
1408
|
-
[H,
|
|
1446
|
+
(s(!0), d(B, null, z(g.width, (a) => (s(), d("option", {
|
|
1447
|
+
key: a.value,
|
|
1448
|
+
value: a.value
|
|
1449
|
+
}, x(a.label), 9, en))), 128))
|
|
1450
|
+
], 8, _o), [
|
|
1451
|
+
[H, F.value]
|
|
1409
1452
|
])
|
|
1410
1453
|
]),
|
|
1411
|
-
t("div",
|
|
1454
|
+
t("div", tn, [
|
|
1412
1455
|
t("label", {
|
|
1413
1456
|
for: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1414
1457
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1415
|
-
}, "Gap:", 8,
|
|
1416
|
-
|
|
1417
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
1458
|
+
}, "Gap:", 8, on),
|
|
1459
|
+
R(t("select", {
|
|
1460
|
+
"onUpdate:modelValue": c[1] || (c[1] = (a) => p.value = a),
|
|
1418
1461
|
id: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1419
1462
|
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
1463
|
}, [
|
|
1421
1464
|
c[16] || (c[16] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1422
|
-
(
|
|
1423
|
-
key:
|
|
1424
|
-
value:
|
|
1425
|
-
},
|
|
1426
|
-
], 8,
|
|
1465
|
+
(s(!0), d(B, null, z(g.gap, (a) => (s(), d("option", {
|
|
1466
|
+
key: a.value,
|
|
1467
|
+
value: a.value
|
|
1468
|
+
}, x(a.label), 9, ln))), 128))
|
|
1469
|
+
], 8, nn), [
|
|
1427
1470
|
[H, p.value]
|
|
1428
1471
|
])
|
|
1429
1472
|
]),
|
|
1430
|
-
t("div",
|
|
1473
|
+
t("div", an, [
|
|
1431
1474
|
t("label", {
|
|
1432
1475
|
for: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1433
1476
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1434
|
-
}, "Dirección:", 8,
|
|
1435
|
-
|
|
1436
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1477
|
+
}, "Dirección:", 8, rn),
|
|
1478
|
+
R(t("select", {
|
|
1479
|
+
"onUpdate:modelValue": c[2] || (c[2] = (a) => u.value = a),
|
|
1437
1480
|
id: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1438
1481
|
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
1482
|
}, [
|
|
1440
1483
|
c[17] || (c[17] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1441
|
-
(
|
|
1442
|
-
key:
|
|
1443
|
-
value:
|
|
1444
|
-
},
|
|
1445
|
-
], 8,
|
|
1484
|
+
(s(!0), d(B, null, z(g.flexDirection, (a) => (s(), d("option", {
|
|
1485
|
+
key: a.value,
|
|
1486
|
+
value: a.value
|
|
1487
|
+
}, x(a.label), 9, dn))), 128))
|
|
1488
|
+
], 8, sn), [
|
|
1446
1489
|
[H, u.value]
|
|
1447
1490
|
])
|
|
1448
1491
|
]),
|
|
1449
1492
|
t("button", {
|
|
1450
1493
|
type: "button",
|
|
1451
1494
|
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] = (
|
|
1453
|
-
|
|
1495
|
+
onClick: c[3] || (c[3] = (a) => {
|
|
1496
|
+
y(e.rowIndex, e.columnIndex), i.value = !1;
|
|
1454
1497
|
})
|
|
1455
1498
|
}, " Guardar ")
|
|
1456
1499
|
], 32)
|
|
1457
1500
|
])
|
|
1458
|
-
])) :
|
|
1459
|
-
t("div",
|
|
1501
|
+
])) : $("", !0),
|
|
1502
|
+
t("div", un, [
|
|
1460
1503
|
t("div", {
|
|
1461
1504
|
class: G(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
|
|
1462
1505
|
}, [
|
|
1463
|
-
e.section && e.section !== "Sidebar" ? (
|
|
1506
|
+
e.section && e.section !== "Sidebar" ? (s(), d("button", {
|
|
1464
1507
|
key: 0,
|
|
1465
1508
|
type: "button",
|
|
1466
1509
|
title: "Añadir columna a la izquierda",
|
|
1467
|
-
onClick: c[5] || (c[5] = (
|
|
1468
|
-
var
|
|
1469
|
-
return (
|
|
1510
|
+
onClick: c[5] || (c[5] = (a) => {
|
|
1511
|
+
var r;
|
|
1512
|
+
return (r = e.addCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1470
1513
|
}),
|
|
1471
1514
|
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
|
-
}, "+")) :
|
|
1473
|
-
t("div",
|
|
1515
|
+
}, "+")) : $("", !0),
|
|
1516
|
+
t("div", cn, [
|
|
1474
1517
|
t("button", {
|
|
1475
1518
|
type: "button",
|
|
1476
1519
|
title: "Configurar columna",
|
|
1477
|
-
onClick: c[6] || (c[6] = (
|
|
1478
|
-
class: G(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200",
|
|
1520
|
+
onClick: c[6] || (c[6] = (a) => i.value = !i.value),
|
|
1521
|
+
class: G(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", i.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
|
|
1479
1522
|
}, "⚙️", 2),
|
|
1480
|
-
t("div",
|
|
1481
|
-
e.section && e.section !== "Sidebar" ? (
|
|
1523
|
+
t("div", mn, [
|
|
1524
|
+
e.section && e.section !== "Sidebar" ? (s(), d("span", {
|
|
1482
1525
|
key: 0,
|
|
1483
1526
|
title: "Mover columna a la izquierda",
|
|
1484
|
-
onClick: c[7] || (c[7] = (
|
|
1485
|
-
var
|
|
1486
|
-
return (
|
|
1527
|
+
onClick: c[7] || (c[7] = (a) => {
|
|
1528
|
+
var r;
|
|
1529
|
+
return (r = e.moveCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1487
1530
|
}),
|
|
1488
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"
|
|
1489
|
-
}, "◁")) :
|
|
1490
|
-
e.fullwidthMode ? (
|
|
1532
|
+
}, "◁")) : $("", !0),
|
|
1533
|
+
e.fullwidthMode ? (s(), d("span", {
|
|
1491
1534
|
key: 1,
|
|
1492
1535
|
title: "Añadir componente",
|
|
1493
|
-
onClick: c[8] || (c[8] = (
|
|
1494
|
-
var
|
|
1495
|
-
return (
|
|
1536
|
+
onClick: c[8] || (c[8] = (a) => {
|
|
1537
|
+
var r;
|
|
1538
|
+
return (r = e.addComponentFunction) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1496
1539
|
}),
|
|
1497
1540
|
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
|
-
}, " 📦 ")) :
|
|
1499
|
-
e.section && e.section !== "Sidebar" ? (
|
|
1541
|
+
}, " 📦 ")) : $("", !0),
|
|
1542
|
+
e.section && e.section !== "Sidebar" ? (s(), d("span", {
|
|
1500
1543
|
key: 2,
|
|
1501
1544
|
title: "Mover columna a la derecha",
|
|
1502
|
-
onClick: c[9] || (c[9] = (
|
|
1503
|
-
var
|
|
1504
|
-
return (
|
|
1545
|
+
onClick: c[9] || (c[9] = (a) => {
|
|
1546
|
+
var r;
|
|
1547
|
+
return (r = e.moveCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1505
1548
|
}),
|
|
1506
1549
|
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
|
-
}, "▷ ")) :
|
|
1550
|
+
}, "▷ ")) : $("", !0)
|
|
1508
1551
|
]),
|
|
1509
1552
|
t("button", {
|
|
1510
1553
|
type: "button",
|
|
1511
1554
|
title: "Eliminar columna",
|
|
1512
|
-
onClick: c[10] || (c[10] = (
|
|
1513
|
-
var
|
|
1514
|
-
return (
|
|
1555
|
+
onClick: c[10] || (c[10] = (a) => {
|
|
1556
|
+
var r;
|
|
1557
|
+
return (r = e.removeCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1515
1558
|
}),
|
|
1516
1559
|
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
1560
|
}, "🗑️")
|
|
1518
1561
|
]),
|
|
1519
|
-
e.section && e.section !== "Sidebar" ? (
|
|
1562
|
+
e.section && e.section !== "Sidebar" ? (s(), d("button", {
|
|
1520
1563
|
key: 1,
|
|
1521
1564
|
type: "button",
|
|
1522
1565
|
title: "Añadir columna a la derecha",
|
|
1523
|
-
onClick: c[11] || (c[11] = (
|
|
1524
|
-
var
|
|
1525
|
-
return (
|
|
1566
|
+
onClick: c[11] || (c[11] = (a) => {
|
|
1567
|
+
var r;
|
|
1568
|
+
return (r = e.addCol) == null ? void 0 : r.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1526
1569
|
}),
|
|
1527
1570
|
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
|
-
}, "+")) :
|
|
1571
|
+
}, "+")) : $("", !0)
|
|
1529
1572
|
], 2)
|
|
1530
1573
|
])
|
|
1531
1574
|
], 64));
|
|
1532
1575
|
}
|
|
1533
|
-
}),
|
|
1576
|
+
}), gn = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden group-hover/row:flex css-pb-row-config" }, fn = { class: "flex gap-1.5" }, pn = { class: "flex gap-4 items-center" }, vn = { class: "inline-block" }, xn = {
|
|
1534
1577
|
key: 0,
|
|
1535
1578
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1536
|
-
},
|
|
1579
|
+
}, hn = { class: "text-slate-600" }, wn = {
|
|
1537
1580
|
key: 1,
|
|
1538
1581
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1539
|
-
},
|
|
1582
|
+
}, yn = { class: "text-slate-600" }, Cn = {
|
|
1540
1583
|
key: 2,
|
|
1541
1584
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1542
|
-
},
|
|
1585
|
+
}, $n = { class: "text-slate-600" }, kn = { class: "flex gap-1.5" }, Sn = {
|
|
1543
1586
|
key: 0,
|
|
1544
1587
|
class: "z-1"
|
|
1545
|
-
},
|
|
1588
|
+
}, Fn = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, Pn = { class: "flex flex-col" }, jn = ["for"], Mn = ["id"], In = ["value"], An = { class: "flex flex-col" }, Bn = ["for"], En = ["id"], Tn = ["value"], Dn = { class: "flex flex-col" }, On = ["for"], Rn = ["id"], Vn = ["value"], zn = /* @__PURE__ */ W({
|
|
1546
1589
|
__name: "RowConfig",
|
|
1547
1590
|
props: {
|
|
1548
1591
|
rowIndex: {
|
|
@@ -1557,7 +1600,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1557
1600
|
moveRow: Function
|
|
1558
1601
|
},
|
|
1559
1602
|
setup(e) {
|
|
1560
|
-
const o = e,
|
|
1603
|
+
const o = e, g = {
|
|
1561
1604
|
padding: [
|
|
1562
1605
|
{ label: "Ninguno", value: "0" },
|
|
1563
1606
|
{ label: "Leve", value: "4" },
|
|
@@ -1583,25 +1626,25 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1583
1626
|
{ label: "3/5", value: "3/5" },
|
|
1584
1627
|
{ label: "4/5", value: "4/5" }
|
|
1585
1628
|
]
|
|
1586
|
-
},
|
|
1587
|
-
var
|
|
1588
|
-
const c = (
|
|
1629
|
+
}, F = k(""), p = k(""), u = k(""), i = k(!1), m = k(!1), y = Y(() => {
|
|
1630
|
+
var a, r;
|
|
1631
|
+
const c = (a = o.globalPageConfiguration) == null ? void 0 : a.find(
|
|
1589
1632
|
(f) => f.section === o.section
|
|
1590
1633
|
);
|
|
1591
|
-
return (
|
|
1634
|
+
return (r = c == null ? void 0 : c.rows) != null && r[o.rowIndex] ? c.rows[o.rowIndex].config || {} : {};
|
|
1592
1635
|
}), I = (c) => {
|
|
1593
|
-
var
|
|
1594
|
-
const
|
|
1595
|
-
(
|
|
1636
|
+
var V;
|
|
1637
|
+
const a = F.value || g.padding[0].value, r = p.value || g.gap[0].value, f = u.value || g.width[0].value;
|
|
1638
|
+
(V = o.updateRowConfig) == null || V.call(o, c, o.section || "", a, r, f), i.value = !1;
|
|
1596
1639
|
};
|
|
1597
|
-
return (c,
|
|
1598
|
-
t("div",
|
|
1640
|
+
return (c, a) => (s(), d(B, null, [
|
|
1641
|
+
t("div", gn, [
|
|
1599
1642
|
t("div", null, [
|
|
1600
|
-
t("div",
|
|
1643
|
+
t("div", fn, [
|
|
1601
1644
|
t("button", {
|
|
1602
1645
|
type: "button",
|
|
1603
1646
|
title: "Agregar fila",
|
|
1604
|
-
onClick:
|
|
1647
|
+
onClick: a[0] || (a[0] = (r) => {
|
|
1605
1648
|
var f;
|
|
1606
1649
|
(f = e.addRow) == null || f.call(e, e.rowIndex, e.section || ""), m.value = !1;
|
|
1607
1650
|
}),
|
|
@@ -1610,7 +1653,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1610
1653
|
t("button", {
|
|
1611
1654
|
type: "button",
|
|
1612
1655
|
title: "Mover fila hacia arriba",
|
|
1613
|
-
onClick:
|
|
1656
|
+
onClick: a[1] || (a[1] = (r) => {
|
|
1614
1657
|
var f;
|
|
1615
1658
|
(f = e.moveRow) == null || f.call(e, e.rowIndex, e.section || "", "up"), m.value = !1;
|
|
1616
1659
|
}),
|
|
@@ -1619,7 +1662,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1619
1662
|
t("button", {
|
|
1620
1663
|
type: "button",
|
|
1621
1664
|
title: "Mover fila hacia abajo",
|
|
1622
|
-
onClick:
|
|
1665
|
+
onClick: a[2] || (a[2] = (r) => {
|
|
1623
1666
|
var f;
|
|
1624
1667
|
(f = e.moveRow) == null || f.call(e, e.rowIndex, e.section || "", "down"), m.value = !1;
|
|
1625
1668
|
}),
|
|
@@ -1627,34 +1670,34 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1627
1670
|
}, "▽")
|
|
1628
1671
|
])
|
|
1629
1672
|
]),
|
|
1630
|
-
t("div",
|
|
1631
|
-
t("div",
|
|
1673
|
+
t("div", pn, [
|
|
1674
|
+
t("div", vn, [
|
|
1632
1675
|
t("button", {
|
|
1633
1676
|
type: "button",
|
|
1634
1677
|
title: "Configurar la fila",
|
|
1635
|
-
onClick:
|
|
1636
|
-
class: G(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md",
|
|
1678
|
+
onClick: a[3] || (a[3] = (r) => i.value = !i.value),
|
|
1679
|
+
class: G(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", i.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
1680
|
}, "⚙️", 2)
|
|
1638
1681
|
]),
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
t("span",
|
|
1642
|
-
])) :
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
t("span",
|
|
1646
|
-
])) :
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
t("span",
|
|
1650
|
-
])) :
|
|
1682
|
+
y.value.padding !== void 0 ? (s(), d("span", xn, [
|
|
1683
|
+
a[10] || (a[10] = D(" Padding: ", -1)),
|
|
1684
|
+
t("span", hn, x(y.value.padding), 1)
|
|
1685
|
+
])) : $("", !0),
|
|
1686
|
+
y.value.gap !== void 0 ? (s(), d("span", wn, [
|
|
1687
|
+
a[11] || (a[11] = D(" Gap: ", -1)),
|
|
1688
|
+
t("span", yn, x(y.value.gap), 1)
|
|
1689
|
+
])) : $("", !0),
|
|
1690
|
+
y.value.width !== void 0 ? (s(), d("span", Cn, [
|
|
1691
|
+
a[12] || (a[12] = D(" Ancho: ", -1)),
|
|
1692
|
+
t("span", $n, x(y.value.width), 1)
|
|
1693
|
+
])) : $("", !0)
|
|
1651
1694
|
]),
|
|
1652
1695
|
t("div", null, [
|
|
1653
|
-
t("div",
|
|
1696
|
+
t("div", kn, [
|
|
1654
1697
|
t("button", {
|
|
1655
1698
|
type: "button",
|
|
1656
1699
|
title: "Eliminar fila",
|
|
1657
|
-
onClick:
|
|
1700
|
+
onClick: a[4] || (a[4] = (r) => {
|
|
1658
1701
|
var f;
|
|
1659
1702
|
(f = e.removeRow) == null || f.call(e, e.rowIndex, e.section || ""), m.value = !1;
|
|
1660
1703
|
}),
|
|
@@ -1663,83 +1706,83 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1663
1706
|
])
|
|
1664
1707
|
])
|
|
1665
1708
|
]),
|
|
1666
|
-
|
|
1667
|
-
t("div",
|
|
1709
|
+
i.value ? (s(), d("div", Sn, [
|
|
1710
|
+
t("div", Fn, [
|
|
1668
1711
|
t("form", {
|
|
1669
|
-
onSubmit:
|
|
1712
|
+
onSubmit: a[9] || (a[9] = le(() => {
|
|
1670
1713
|
}, ["prevent"])),
|
|
1671
1714
|
class: "flex gap-6 w-full justify-center items-end flex-wrap"
|
|
1672
1715
|
}, [
|
|
1673
|
-
t("div",
|
|
1716
|
+
t("div", Pn, [
|
|
1674
1717
|
t("label", {
|
|
1675
1718
|
for: `padding-${e.rowIndex}`,
|
|
1676
1719
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1677
|
-
}, "Padding:", 8,
|
|
1678
|
-
|
|
1679
|
-
"onUpdate:modelValue":
|
|
1720
|
+
}, "Padding:", 8, jn),
|
|
1721
|
+
R(t("select", {
|
|
1722
|
+
"onUpdate:modelValue": a[5] || (a[5] = (r) => F.value = r),
|
|
1680
1723
|
id: `padding-${e.rowIndex}`,
|
|
1681
1724
|
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
1725
|
}, [
|
|
1683
|
-
|
|
1684
|
-
(
|
|
1685
|
-
key:
|
|
1686
|
-
value:
|
|
1687
|
-
},
|
|
1688
|
-
], 8,
|
|
1689
|
-
[H,
|
|
1726
|
+
a[13] || (a[13] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1727
|
+
(s(!0), d(B, null, z(g.padding, (r) => (s(), d("option", {
|
|
1728
|
+
key: r.value,
|
|
1729
|
+
value: r.value
|
|
1730
|
+
}, x(r.label), 9, In))), 128))
|
|
1731
|
+
], 8, Mn), [
|
|
1732
|
+
[H, F.value]
|
|
1690
1733
|
])
|
|
1691
1734
|
]),
|
|
1692
|
-
t("div",
|
|
1735
|
+
t("div", An, [
|
|
1693
1736
|
t("label", {
|
|
1694
1737
|
for: `gap-${e.rowIndex}`,
|
|
1695
1738
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1696
|
-
}, "Gap:", 8,
|
|
1697
|
-
|
|
1698
|
-
"onUpdate:modelValue":
|
|
1739
|
+
}, "Gap:", 8, Bn),
|
|
1740
|
+
R(t("select", {
|
|
1741
|
+
"onUpdate:modelValue": a[6] || (a[6] = (r) => p.value = r),
|
|
1699
1742
|
id: `gap-${e.rowIndex}`,
|
|
1700
1743
|
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
1744
|
}, [
|
|
1702
|
-
|
|
1703
|
-
(
|
|
1704
|
-
key:
|
|
1705
|
-
value:
|
|
1706
|
-
},
|
|
1707
|
-
], 8,
|
|
1745
|
+
a[14] || (a[14] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1746
|
+
(s(!0), d(B, null, z(g.gap, (r) => (s(), d("option", {
|
|
1747
|
+
key: r.value,
|
|
1748
|
+
value: r.value
|
|
1749
|
+
}, x(r.label), 9, Tn))), 128))
|
|
1750
|
+
], 8, En), [
|
|
1708
1751
|
[H, p.value]
|
|
1709
1752
|
])
|
|
1710
1753
|
]),
|
|
1711
|
-
t("div",
|
|
1754
|
+
t("div", Dn, [
|
|
1712
1755
|
t("label", {
|
|
1713
1756
|
for: `width-${e.rowIndex}`,
|
|
1714
1757
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1715
|
-
}, "Ancho:", 8,
|
|
1716
|
-
|
|
1717
|
-
"onUpdate:modelValue":
|
|
1758
|
+
}, "Ancho:", 8, On),
|
|
1759
|
+
R(t("select", {
|
|
1760
|
+
"onUpdate:modelValue": a[7] || (a[7] = (r) => u.value = r),
|
|
1718
1761
|
id: `width-${e.rowIndex}`,
|
|
1719
1762
|
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
1763
|
}, [
|
|
1721
|
-
|
|
1722
|
-
(
|
|
1723
|
-
key:
|
|
1724
|
-
value:
|
|
1725
|
-
},
|
|
1726
|
-
], 8,
|
|
1764
|
+
a[15] || (a[15] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1765
|
+
(s(!0), d(B, null, z(g.width, (r) => (s(), d("option", {
|
|
1766
|
+
key: r.value,
|
|
1767
|
+
value: r.value
|
|
1768
|
+
}, x(r.label), 9, Vn))), 128))
|
|
1769
|
+
], 8, Rn), [
|
|
1727
1770
|
[H, u.value]
|
|
1728
1771
|
])
|
|
1729
1772
|
]),
|
|
1730
1773
|
t("button", {
|
|
1731
1774
|
type: "button",
|
|
1732
1775
|
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:
|
|
1776
|
+
onClick: a[8] || (a[8] = (r) => {
|
|
1734
1777
|
I(e.rowIndex), m.value = !1;
|
|
1735
1778
|
})
|
|
1736
1779
|
}, " Guardar ")
|
|
1737
1780
|
], 32)
|
|
1738
1781
|
])
|
|
1739
|
-
])) :
|
|
1782
|
+
])) : $("", !0)
|
|
1740
1783
|
], 64));
|
|
1741
1784
|
}
|
|
1742
|
-
}),
|
|
1785
|
+
}), Nn = ["id"], Un = { class: "flex flex-row w-full gap-3 mt-6" }, qn = ["id"], Ln = /* @__PURE__ */ W({
|
|
1743
1786
|
__name: "BodySection",
|
|
1744
1787
|
props: {
|
|
1745
1788
|
isComponentMode: Boolean,
|
|
@@ -1747,6 +1790,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1747
1790
|
globalPageConfiguration: Array,
|
|
1748
1791
|
sectionSelected: String,
|
|
1749
1792
|
removeComponent: Function,
|
|
1793
|
+
cloneComponent: Function,
|
|
1750
1794
|
addComponentFunction: Function,
|
|
1751
1795
|
addCol: Function,
|
|
1752
1796
|
addRow: Function,
|
|
@@ -1763,19 +1807,19 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1763
1807
|
}
|
|
1764
1808
|
},
|
|
1765
1809
|
setup(e) {
|
|
1766
|
-
const o = e,
|
|
1810
|
+
const o = e, g = k(!1), F = Y(() => {
|
|
1767
1811
|
var u;
|
|
1768
1812
|
const p = (u = o.globalPageConfiguration) == null ? void 0 : u.find(
|
|
1769
|
-
(
|
|
1813
|
+
(i) => i.section === o.sectionSelected
|
|
1770
1814
|
);
|
|
1771
1815
|
return (p == null ? void 0 : p.rows) || [];
|
|
1772
1816
|
});
|
|
1773
|
-
return (p, u) => (
|
|
1817
|
+
return (p, u) => (s(!0), d(B, null, z(F.value, (i, m) => (s(), d("div", {
|
|
1774
1818
|
key: "row-" + m,
|
|
1775
1819
|
id: "row-" + e.sectionSelected + "-" + m,
|
|
1776
1820
|
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
1821
|
}, [
|
|
1778
|
-
L(
|
|
1822
|
+
L(zn, {
|
|
1779
1823
|
moveRow: e.moveRow,
|
|
1780
1824
|
addRow: e.addRow,
|
|
1781
1825
|
removeRow: e.removeRow,
|
|
@@ -1784,23 +1828,23 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1784
1828
|
rowIndex: m,
|
|
1785
1829
|
section: e.sectionSelected
|
|
1786
1830
|
}, null, 8, ["moveRow", "addRow", "removeRow", "globalPageConfiguration", "updateRowConfig", "rowIndex", "section"]),
|
|
1787
|
-
t("div",
|
|
1788
|
-
(
|
|
1831
|
+
t("div", Un, [
|
|
1832
|
+
(s(!0), d(B, null, z(i.columns, (y, I) => (s(), d("div", {
|
|
1789
1833
|
class: G([
|
|
1790
1834
|
"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
|
-
|
|
1835
|
+
g.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"
|
|
1792
1836
|
]),
|
|
1793
1837
|
key: "column-" + I,
|
|
1794
1838
|
id: "col-" + e.sectionSelected + "-" + m + "-" + I
|
|
1795
1839
|
}, [
|
|
1796
1840
|
L(q(me), {
|
|
1797
1841
|
class: "h-full w-full mb-4",
|
|
1798
|
-
list:
|
|
1842
|
+
list: y.components,
|
|
1799
1843
|
group: { name: "draggingGroup", pull: !0, put: !0 },
|
|
1800
|
-
"item-key": "
|
|
1844
|
+
"item-key": "id",
|
|
1801
1845
|
handle: ".handle",
|
|
1802
|
-
onStart: u[0] || (u[0] = (c) =>
|
|
1803
|
-
onEnd: u[1] || (u[1] = (c) =>
|
|
1846
|
+
onStart: u[0] || (u[0] = (c) => g.value = !0),
|
|
1847
|
+
onEnd: u[1] || (u[1] = (c) => g.value = !1)
|
|
1804
1848
|
}, {
|
|
1805
1849
|
item: ce(({ element: c }) => [
|
|
1806
1850
|
L(be, {
|
|
@@ -1808,13 +1852,14 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1808
1852
|
object: c,
|
|
1809
1853
|
"is-component-mode": e.isComponentMode,
|
|
1810
1854
|
removeComponent: e.removeComponent,
|
|
1855
|
+
cloneComponent: e.cloneComponent,
|
|
1811
1856
|
section: e.sectionSelected,
|
|
1812
1857
|
isProduction: e.isProduction
|
|
1813
|
-
}, null, 8, ["renderApiDomain", "object", "is-component-mode", "removeComponent", "section", "isProduction"])
|
|
1858
|
+
}, null, 8, ["renderApiDomain", "object", "is-component-mode", "removeComponent", "cloneComponent", "section", "isProduction"])
|
|
1814
1859
|
]),
|
|
1815
1860
|
_: 1
|
|
1816
1861
|
}, 8, ["list"]),
|
|
1817
|
-
L(
|
|
1862
|
+
L(bn, {
|
|
1818
1863
|
section: e.sectionSelected,
|
|
1819
1864
|
globalPageConfiguration: e.globalPageConfiguration,
|
|
1820
1865
|
updateColConfig: e.updateColConfig,
|
|
@@ -1826,11 +1871,11 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1826
1871
|
rowIndex: m,
|
|
1827
1872
|
columnIndex: I
|
|
1828
1873
|
}, null, 8, ["section", "globalPageConfiguration", "updateColConfig", "addComponentFunction", "fullwidthMode", "addCol", "removeCol", "moveCol", "rowIndex", "columnIndex"])
|
|
1829
|
-
], 10,
|
|
1874
|
+
], 10, qn))), 128))
|
|
1830
1875
|
])
|
|
1831
|
-
], 8,
|
|
1876
|
+
], 8, Nn))), 128));
|
|
1832
1877
|
}
|
|
1833
|
-
}),
|
|
1878
|
+
}), Gn = { class: "flex justify-between items-center mb-4" }, Jn = { class: "text-xs" }, Hn = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, Wn = ["value", "checked"], Yn = { class: "my-3" }, Kn = { class: "relative" }, Qn = { 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" }, Xn = {
|
|
1834
1879
|
key: 0,
|
|
1835
1880
|
class: "text-center py-8 text-slate-400"
|
|
1836
1881
|
}, de = /* @__PURE__ */ W({
|
|
@@ -1847,7 +1892,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1847
1892
|
excludedCategories: {}
|
|
1848
1893
|
},
|
|
1849
1894
|
setup(e) {
|
|
1850
|
-
const o = e,
|
|
1895
|
+
const o = e, g = [
|
|
1851
1896
|
"Call to Action",
|
|
1852
1897
|
"Contenido",
|
|
1853
1898
|
"Separador",
|
|
@@ -1859,26 +1904,26 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1859
1904
|
"Formulario",
|
|
1860
1905
|
"Título",
|
|
1861
1906
|
"SEO"
|
|
1862
|
-
],
|
|
1863
|
-
const c =
|
|
1864
|
-
return u.value.length > 0 ?
|
|
1865
|
-
(f) => u.value.includes(f.category) &&
|
|
1866
|
-
) :
|
|
1867
|
-
}),
|
|
1868
|
-
|
|
1907
|
+
], F = Y(() => !o.excludedCategories || o.excludedCategories.length === 0 ? g : g.filter((c) => !o.excludedCategories.includes(c))), p = k(!0), u = k([]), i = k(""), m = Y(() => {
|
|
1908
|
+
const c = i.value.toLowerCase(), a = Object.values(o.components), r = (f) => (f.name.toLowerCase() + f.description.toLowerCase() + f.tags.join(" ").toLowerCase()).includes(c);
|
|
1909
|
+
return u.value.length > 0 ? a.filter(
|
|
1910
|
+
(f) => u.value.includes(f.category) && r(f)
|
|
1911
|
+
) : a.filter(r);
|
|
1912
|
+
}), y = (c) => {
|
|
1913
|
+
i.value = c.target.value;
|
|
1869
1914
|
}, I = (c) => {
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1915
|
+
const a = c.target, r = a.value;
|
|
1916
|
+
a.checked ? u.value.includes(r) || u.value.push(r) : u.value = u.value.filter((f) => f !== r);
|
|
1872
1917
|
};
|
|
1873
|
-
return (c,
|
|
1874
|
-
|
|
1875
|
-
t("div",
|
|
1918
|
+
return (c, a) => (s(), d(B, null, [
|
|
1919
|
+
a[6] || (a[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
|
|
1920
|
+
t("div", Gn, [
|
|
1876
1921
|
t("button", {
|
|
1877
1922
|
type: "button",
|
|
1878
|
-
onClick:
|
|
1923
|
+
onClick: a[0] || (a[0] = (r) => p.value = !p.value),
|
|
1879
1924
|
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
1925
|
}, [
|
|
1881
|
-
|
|
1926
|
+
a[2] || (a[2] = t("svg", {
|
|
1882
1927
|
class: "w-4 h-4",
|
|
1883
1928
|
fill: "none",
|
|
1884
1929
|
stroke: "currentColor",
|
|
@@ -1891,38 +1936,38 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1891
1936
|
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
1937
|
})
|
|
1893
1938
|
], -1)),
|
|
1894
|
-
|
|
1895
|
-
t("span",
|
|
1939
|
+
a[3] || (a[3] = t("span", null, "Filtros", -1)),
|
|
1940
|
+
t("span", Jn, x(p.value ? "▲" : "▼"), 1)
|
|
1896
1941
|
]),
|
|
1897
1942
|
t("button", {
|
|
1898
1943
|
type: "button",
|
|
1899
1944
|
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:
|
|
1945
|
+
onClick: a[1] || (a[1] = (r) => {
|
|
1901
1946
|
var f;
|
|
1902
1947
|
return (f = e.toggleComponentModeFunction) == null ? void 0 : f.call(e);
|
|
1903
1948
|
})
|
|
1904
|
-
},
|
|
1949
|
+
}, x(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
|
|
1905
1950
|
]),
|
|
1906
|
-
|
|
1907
|
-
(
|
|
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(
|
|
1951
|
+
R(t("div", Hn, [
|
|
1952
|
+
(s(!0), d(B, null, z(F.value, (r) => (s(), d("label", {
|
|
1953
|
+
key: r,
|
|
1954
|
+
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
1955
|
}, [
|
|
1911
1956
|
t("input", {
|
|
1912
1957
|
type: "checkbox",
|
|
1913
|
-
value:
|
|
1914
|
-
checked: u.value.includes(
|
|
1958
|
+
value: r,
|
|
1959
|
+
checked: u.value.includes(r),
|
|
1915
1960
|
onInput: I,
|
|
1916
1961
|
class: "w-4 h-4 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500"
|
|
1917
|
-
}, null, 40,
|
|
1918
|
-
|
|
1962
|
+
}, null, 40, Wn),
|
|
1963
|
+
D(" " + x(r), 1)
|
|
1919
1964
|
], 2))), 128))
|
|
1920
1965
|
], 512), [
|
|
1921
|
-
[
|
|
1966
|
+
[he, p.value]
|
|
1922
1967
|
]),
|
|
1923
|
-
t("div",
|
|
1924
|
-
t("div",
|
|
1925
|
-
|
|
1968
|
+
t("div", Yn, [
|
|
1969
|
+
t("div", Kn, [
|
|
1970
|
+
a[4] || (a[4] = t("svg", {
|
|
1926
1971
|
class: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400",
|
|
1927
1972
|
fill: "none",
|
|
1928
1973
|
stroke: "currentColor",
|
|
@@ -1936,25 +1981,25 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1936
1981
|
})
|
|
1937
1982
|
], -1)),
|
|
1938
1983
|
t("input", {
|
|
1939
|
-
onInput:
|
|
1984
|
+
onInput: y,
|
|
1940
1985
|
type: "text",
|
|
1941
1986
|
placeholder: "Buscar componente...",
|
|
1942
1987
|
class: "duration-300 border border-slate-200 bg-white rounded-xl py-3 px-4 pl-11 w-full focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 hover:border-slate-300 shadow-sm"
|
|
1943
1988
|
}, null, 32)
|
|
1944
1989
|
])
|
|
1945
1990
|
]),
|
|
1946
|
-
t("div",
|
|
1991
|
+
t("div", Qn, [
|
|
1947
1992
|
L(q(me), {
|
|
1948
1993
|
class: "w-full flex flex-col gap-4",
|
|
1949
1994
|
list: m.value,
|
|
1950
1995
|
group: { name: "draggingGroup", pull: "clone", put: !1 },
|
|
1951
1996
|
itemKey: "name",
|
|
1952
|
-
clone: (
|
|
1997
|
+
clone: (r) => JSON.parse(JSON.stringify(r))
|
|
1953
1998
|
}, {
|
|
1954
|
-
item: ce(({ element:
|
|
1999
|
+
item: ce(({ element: r }) => [
|
|
1955
2000
|
L(be, {
|
|
1956
2001
|
renderApiDomain: e.renderApiDomain,
|
|
1957
|
-
object:
|
|
2002
|
+
object: r,
|
|
1958
2003
|
"is-component-mode": e.isComponentMode,
|
|
1959
2004
|
fullwidthMode: e.fullwidthMode,
|
|
1960
2005
|
columnToInsert: e.columnToInsert,
|
|
@@ -1965,7 +2010,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1965
2010
|
]),
|
|
1966
2011
|
_: 1
|
|
1967
2012
|
}, 8, ["list", "clone"]),
|
|
1968
|
-
m.value.length === 0 ? (
|
|
2013
|
+
m.value.length === 0 ? (s(), d("div", Xn, [...a[5] || (a[5] = [
|
|
1969
2014
|
t("svg", {
|
|
1970
2015
|
class: "w-12 h-12 mx-auto mb-3 opacity-50",
|
|
1971
2016
|
fill: "none",
|
|
@@ -1981,14 +2026,14 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1981
2026
|
], -1),
|
|
1982
2027
|
t("p", { class: "text-sm font-medium" }, "No se encontraron componentes", -1),
|
|
1983
2028
|
t("p", { class: "text-xs mt-1" }, "Intenta con otros filtros o términos de búsqueda", -1)
|
|
1984
|
-
])])) :
|
|
2029
|
+
])])) : $("", !0)
|
|
1985
2030
|
])
|
|
1986
2031
|
], 64));
|
|
1987
2032
|
}
|
|
1988
|
-
}),
|
|
2033
|
+
}), Zn = { 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" }, _n = { class: "relative flex flex-row flex-wrap" }, el = { class: "w-full flex justify-end py-4 pe-4" }, tl = { class: "w-3/4" }, ol = {
|
|
1989
2034
|
key: 1,
|
|
1990
2035
|
class: "w-1/4 px-3 overflow-y-auto h-screen sticky top-0"
|
|
1991
|
-
},
|
|
2036
|
+
}, sl = /* @__PURE__ */ W({
|
|
1992
2037
|
__name: "Pagebuilder",
|
|
1993
2038
|
props: {
|
|
1994
2039
|
isProduction: { type: Boolean },
|
|
@@ -1998,19 +2043,19 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
1998
2043
|
excludeComponentTypes: {}
|
|
1999
2044
|
},
|
|
2000
2045
|
setup(e) {
|
|
2001
|
-
const o = e,
|
|
2046
|
+
const o = e, g = o.isProduction ?? !1, F = o.debugMode ?? !1, p = o.submitForm ?? !1, u = o.inputId ?? null, i = [
|
|
2002
2047
|
"Repetidor",
|
|
2003
2048
|
// Siempre excluido
|
|
2004
2049
|
...o.excludeComponentTypes ?? []
|
|
2005
|
-
], m =
|
|
2006
|
-
const
|
|
2007
|
-
if (
|
|
2008
|
-
return
|
|
2050
|
+
], m = g ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", y = k(!0), I = k(void 0), c = k([]), a = k({ rowIndex: null, columnIndex: null, section: null }), r = k(!1), f = k(!1), V = Y(() => {
|
|
2051
|
+
const w = ye();
|
|
2052
|
+
if (i.length === 0)
|
|
2053
|
+
return w;
|
|
2009
2054
|
const h = {};
|
|
2010
|
-
for (const [
|
|
2011
|
-
|
|
2055
|
+
for (const [v, C] of Object.entries(w))
|
|
2056
|
+
i.includes(C.category) || (h[v] = C);
|
|
2012
2057
|
return h;
|
|
2013
|
-
}), P =
|
|
2058
|
+
}), P = k({
|
|
2014
2059
|
global: {
|
|
2015
2060
|
sidebarEnabled: !1,
|
|
2016
2061
|
renderAsBodyPart: !1,
|
|
@@ -2023,7 +2068,7 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2023
2068
|
description: "",
|
|
2024
2069
|
robots: "index, follow"
|
|
2025
2070
|
}
|
|
2026
|
-
}),
|
|
2071
|
+
}), b = we([
|
|
2027
2072
|
{
|
|
2028
2073
|
section: "Header",
|
|
2029
2074
|
config: { width: "full" },
|
|
@@ -2046,192 +2091,207 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2046
2091
|
}
|
|
2047
2092
|
]);
|
|
2048
2093
|
ae(() => {
|
|
2049
|
-
|
|
2094
|
+
n();
|
|
2050
2095
|
});
|
|
2051
|
-
const
|
|
2096
|
+
const n = () => {
|
|
2052
2097
|
if (c.value = ["Header", "Footer", "Body", "Sidebar"], I.value = "Body", u) {
|
|
2053
|
-
const
|
|
2054
|
-
if (
|
|
2055
|
-
const h =
|
|
2098
|
+
const w = document.getElementById(u);
|
|
2099
|
+
if (w) {
|
|
2100
|
+
const h = w.value;
|
|
2056
2101
|
if (h)
|
|
2057
2102
|
try {
|
|
2058
|
-
const
|
|
2059
|
-
(
|
|
2060
|
-
} catch (
|
|
2061
|
-
console.error("Error parsing input value:",
|
|
2103
|
+
const v = typeof h == "string" ? JSON.parse(h) : h;
|
|
2104
|
+
(v && typeof v == "object" && !Array.isArray(v) ? Object.keys(v).length > 0 : Array.isArray(v) ? v.length > 0 : !1) && se(h);
|
|
2105
|
+
} catch (v) {
|
|
2106
|
+
console.error("Error parsing input value:", v);
|
|
2062
2107
|
}
|
|
2063
2108
|
}
|
|
2064
2109
|
}
|
|
2065
|
-
},
|
|
2110
|
+
}, l = () => {
|
|
2066
2111
|
f.value = !f.value;
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
}, j = (
|
|
2070
|
-
var
|
|
2071
|
-
const
|
|
2072
|
-
(
|
|
2073
|
-
padding:
|
|
2074
|
-
gap:
|
|
2112
|
+
}, S = () => {
|
|
2113
|
+
y.value = !y.value;
|
|
2114
|
+
}, j = (w, h, v, C, M) => {
|
|
2115
|
+
var T;
|
|
2116
|
+
const A = b.find((O) => O.section === h);
|
|
2117
|
+
(T = A == null ? void 0 : A.rows) != null && T[w] && (A.rows[w].config = {
|
|
2118
|
+
padding: v,
|
|
2119
|
+
gap: C,
|
|
2075
2120
|
width: M
|
|
2076
2121
|
});
|
|
2077
|
-
},
|
|
2078
|
-
var
|
|
2079
|
-
const
|
|
2080
|
-
(K = (
|
|
2081
|
-
width:
|
|
2122
|
+
}, E = (w, h, v, C, M, A) => {
|
|
2123
|
+
var O, U, K;
|
|
2124
|
+
const T = b.find((Z) => Z.section === v);
|
|
2125
|
+
(K = (U = (O = T == null ? void 0 : T.rows) == null ? void 0 : O[w]) == null ? void 0 : U.columns) != null && K[h] && (T.rows[w].columns[h].config = {
|
|
2126
|
+
width: C,
|
|
2082
2127
|
gap: M,
|
|
2083
|
-
flexDirection:
|
|
2128
|
+
flexDirection: A
|
|
2084
2129
|
});
|
|
2085
|
-
},
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
const
|
|
2130
|
+
}, N = async (w, h) => {
|
|
2131
|
+
const v = b.find((C) => C.section === h);
|
|
2132
|
+
if (v) {
|
|
2133
|
+
const C = {
|
|
2089
2134
|
config: {},
|
|
2090
2135
|
columns: [{ config: {}, components: [] }]
|
|
2091
2136
|
};
|
|
2092
|
-
|
|
2137
|
+
w !== null && w >= 0 && w < v.rows.length ? v.rows.splice(w + 1, 0, C) : v.rows.push(C);
|
|
2093
2138
|
}
|
|
2094
|
-
await new Promise((
|
|
2139
|
+
await new Promise((C) => {
|
|
2095
2140
|
setTimeout(() => {
|
|
2096
|
-
const M = document.getElementById(`row-${h}-${(
|
|
2141
|
+
const M = document.getElementById(`row-${h}-${(w ?? 0) + 1}`);
|
|
2097
2142
|
M ? (M.scrollIntoView({ behavior: "smooth", block: "center" }), M.classList.add("selected-delay"), setTimeout(() => {
|
|
2098
|
-
M.classList.remove("selected-delay"),
|
|
2099
|
-
}, 3e3)) :
|
|
2143
|
+
M.classList.remove("selected-delay"), C();
|
|
2144
|
+
}, 3e3)) : C();
|
|
2100
2145
|
}, 0);
|
|
2101
2146
|
});
|
|
2102
|
-
}, X = (
|
|
2103
|
-
const
|
|
2104
|
-
!(
|
|
2105
|
-
}, J = (
|
|
2106
|
-
var
|
|
2107
|
-
const
|
|
2108
|
-
if (!((
|
|
2147
|
+
}, X = (w, h) => {
|
|
2148
|
+
const v = b.find((C) => C.section === h);
|
|
2149
|
+
!(v != null && v.rows) || v.rows.length <= 1 || v.rows.splice(w, 1);
|
|
2150
|
+
}, J = (w, h, v = "down") => {
|
|
2151
|
+
var O;
|
|
2152
|
+
const C = b.find((U) => U.section === h);
|
|
2153
|
+
if (!((O = C == null ? void 0 : C.rows) != null && O[w]) || v === "up" && w === 0 || v === "down" && w === C.rows.length - 1)
|
|
2109
2154
|
return;
|
|
2110
|
-
const M =
|
|
2111
|
-
M.splice(
|
|
2112
|
-
}, _ = async (
|
|
2113
|
-
var
|
|
2114
|
-
const M =
|
|
2115
|
-
(
|
|
2155
|
+
const M = C.rows, A = M.splice(w, 1)[0], T = v === "down" ? w + 1 : w - 1;
|
|
2156
|
+
M.splice(T, 0, A);
|
|
2157
|
+
}, _ = async (w, h, v, C = "right") => {
|
|
2158
|
+
var T;
|
|
2159
|
+
const M = C === "left" ? h : h + 1, A = b.find((O) => O.section === v);
|
|
2160
|
+
(T = A == null ? void 0 : A.rows) != null && T[w] && A.rows[w].columns.splice(M, 0, {
|
|
2116
2161
|
config: {},
|
|
2117
2162
|
components: []
|
|
2118
|
-
}), await new Promise((
|
|
2163
|
+
}), await new Promise((O) => {
|
|
2119
2164
|
setTimeout(() => {
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
}, 3e3)) :
|
|
2165
|
+
const U = document.getElementById(`col-${v}-${w}-${M}`);
|
|
2166
|
+
U ? (U.scrollIntoView({ behavior: "smooth", block: "center" }), U.classList.add("selected-delay"), setTimeout(() => {
|
|
2167
|
+
U.classList.remove("selected-delay"), O();
|
|
2168
|
+
}, 3e3)) : O();
|
|
2124
2169
|
}, 0);
|
|
2125
2170
|
});
|
|
2126
|
-
}, ee = (
|
|
2127
|
-
var
|
|
2128
|
-
const
|
|
2171
|
+
}, ee = (w, h, v) => {
|
|
2172
|
+
var A, T;
|
|
2173
|
+
const C = b.find((O) => O.section === v), M = (T = (A = C == null ? void 0 : C.rows) == null ? void 0 : A[w]) == null ? void 0 : T.columns;
|
|
2129
2174
|
!M || M.length <= 1 || M.splice(h, 1);
|
|
2130
|
-
}, te = (
|
|
2131
|
-
var
|
|
2132
|
-
const M =
|
|
2133
|
-
if (!((
|
|
2175
|
+
}, te = (w, h, v, C = "right") => {
|
|
2176
|
+
var U;
|
|
2177
|
+
const M = b.find((K) => K.section === v);
|
|
2178
|
+
if (!((U = M == null ? void 0 : M.rows) != null && U[w]) || C === "left" && h === 0 || C === "right" && h === M.rows[w].columns.length - 1)
|
|
2134
2179
|
return;
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
}, ge = (
|
|
2138
|
-
var
|
|
2139
|
-
const
|
|
2140
|
-
(
|
|
2141
|
-
M.columns.forEach((
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2180
|
+
const A = M.rows[w].columns, T = A.splice(h, 1)[0], O = C === "right" ? h + 1 : h - 1;
|
|
2181
|
+
A.splice(O, 0, T);
|
|
2182
|
+
}, ge = (w, h) => {
|
|
2183
|
+
var C;
|
|
2184
|
+
const v = b.find((M) => M.section === h);
|
|
2185
|
+
(C = v == null ? void 0 : v.rows) == null || C.forEach((M) => {
|
|
2186
|
+
M.columns.forEach((A) => {
|
|
2187
|
+
const T = A.components.indexOf(w);
|
|
2188
|
+
T !== -1 && A.components.splice(T, 1);
|
|
2189
|
+
});
|
|
2190
|
+
});
|
|
2191
|
+
}, fe = (w, h) => {
|
|
2192
|
+
var C;
|
|
2193
|
+
const v = b.find((M) => M.section === h);
|
|
2194
|
+
(C = v == null ? void 0 : v.rows) == null || C.forEach((M) => {
|
|
2195
|
+
M.columns.forEach((A) => {
|
|
2196
|
+
const T = A.components.indexOf(w);
|
|
2197
|
+
if (T !== -1) {
|
|
2198
|
+
const O = JSON.parse(JSON.stringify(w));
|
|
2199
|
+
O.id = Math.random().toString(36).substring(2, 15) + Date.now().toString(36), A.components.splice(T + 1, 0, O);
|
|
2200
|
+
}
|
|
2144
2201
|
});
|
|
2145
2202
|
});
|
|
2146
|
-
},
|
|
2147
|
-
|
|
2148
|
-
}, re = (
|
|
2149
|
-
var M,
|
|
2150
|
-
const { rowIndex: h, columnIndex:
|
|
2151
|
-
if (h !== null &&
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2203
|
+
}, pe = (w, h, v) => {
|
|
2204
|
+
r.value = !0, a.value = { rowIndex: w, columnIndex: h, section: v };
|
|
2205
|
+
}, re = (w) => {
|
|
2206
|
+
var M, A, T, O;
|
|
2207
|
+
const { rowIndex: h, columnIndex: v, section: C } = a.value;
|
|
2208
|
+
if (h !== null && v !== null) {
|
|
2209
|
+
const U = JSON.parse(JSON.stringify(w));
|
|
2210
|
+
U.id = Math.random().toString(36).substring(2, 15) + Date.now().toString(36);
|
|
2211
|
+
const K = b.find((ve) => ve.section === C), Z = (O = (T = (A = (M = K == null ? void 0 : K.rows) == null ? void 0 : M[h]) == null ? void 0 : A.columns) == null ? void 0 : T[v]) == null ? void 0 : O.components;
|
|
2212
|
+
Z == null || Z.push(U);
|
|
2154
2213
|
}
|
|
2155
|
-
|
|
2156
|
-
}, se = (
|
|
2157
|
-
const h = typeof
|
|
2158
|
-
|
|
2214
|
+
r.value = !1;
|
|
2215
|
+
}, se = (w) => {
|
|
2216
|
+
const h = typeof w == "string" ? JSON.parse(w) : w;
|
|
2217
|
+
b.length = 0, b.push(...h.pageConfig || []), h.paramsConfig && (P.value = { ...P.value, ...h.paramsConfig });
|
|
2159
2218
|
};
|
|
2160
|
-
return (
|
|
2161
|
-
L(
|
|
2219
|
+
return (w, h) => (s(), d("div", Zn, [
|
|
2220
|
+
L(ut, {
|
|
2162
2221
|
sectionSelected: I.value,
|
|
2163
|
-
"onUpdate:sectionSelected": h[0] || (h[0] = (
|
|
2222
|
+
"onUpdate:sectionSelected": h[0] || (h[0] = (v) => I.value = v),
|
|
2164
2223
|
parametersPageConfiguration: P.value,
|
|
2165
|
-
"onUpdate:parametersPageConfiguration": h[1] || (h[1] = (
|
|
2166
|
-
globalPageConfiguration:
|
|
2224
|
+
"onUpdate:parametersPageConfiguration": h[1] || (h[1] = (v) => P.value = v),
|
|
2225
|
+
globalPageConfiguration: b,
|
|
2167
2226
|
availableSections: c.value,
|
|
2168
2227
|
importConfigurationFunction: se,
|
|
2169
2228
|
isComponentMode: f.value,
|
|
2170
|
-
toggleComponentModeFunction:
|
|
2171
|
-
fullwidthMode:
|
|
2172
|
-
toggleFullwidthMode:
|
|
2229
|
+
toggleComponentModeFunction: l,
|
|
2230
|
+
fullwidthMode: y.value,
|
|
2231
|
+
toggleFullwidthMode: S,
|
|
2173
2232
|
renderApiDomain: q(m),
|
|
2174
2233
|
inputId: q(u),
|
|
2175
|
-
debugMode: q(
|
|
2234
|
+
debugMode: q(F),
|
|
2176
2235
|
submitForm: q(p)
|
|
2177
2236
|
}, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain", "inputId", "debugMode", "submitForm"]),
|
|
2178
|
-
t("div",
|
|
2179
|
-
|
|
2237
|
+
t("div", _n, [
|
|
2238
|
+
y.value ? (s(), d("div", {
|
|
2180
2239
|
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",
|
|
2240
|
+
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
2241
|
}, [
|
|
2183
|
-
t("div",
|
|
2242
|
+
t("div", el, [
|
|
2184
2243
|
t("div", {
|
|
2185
2244
|
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] = (
|
|
2245
|
+
onClick: h[2] || (h[2] = (v) => r.value = !1)
|
|
2187
2246
|
}, "✕")
|
|
2188
2247
|
]),
|
|
2189
|
-
t("div",
|
|
2248
|
+
t("div", tl, [
|
|
2190
2249
|
L(de, {
|
|
2191
2250
|
renderApiDomain: q(m),
|
|
2192
2251
|
isComponentMode: f.value,
|
|
2193
|
-
fullwidthMode:
|
|
2194
|
-
columnToInsert:
|
|
2252
|
+
fullwidthMode: y.value,
|
|
2253
|
+
columnToInsert: a.value,
|
|
2195
2254
|
addComponentToColumn: re,
|
|
2196
|
-
toggleComponentModeFunction:
|
|
2197
|
-
isProduction: q(
|
|
2198
|
-
components:
|
|
2199
|
-
excludedCategories:
|
|
2255
|
+
toggleComponentModeFunction: l,
|
|
2256
|
+
isProduction: q(g),
|
|
2257
|
+
components: V.value,
|
|
2258
|
+
excludedCategories: i
|
|
2200
2259
|
}, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction", "components"])
|
|
2201
2260
|
])
|
|
2202
|
-
], 2)) : (
|
|
2261
|
+
], 2)) : (s(), d("div", ol, [
|
|
2203
2262
|
L(de, {
|
|
2204
2263
|
renderApiDomain: q(m),
|
|
2205
2264
|
isComponentMode: f.value,
|
|
2206
|
-
fullwidthMode:
|
|
2207
|
-
columnToInsert:
|
|
2265
|
+
fullwidthMode: y.value,
|
|
2266
|
+
columnToInsert: a.value,
|
|
2208
2267
|
addComponentToColumn: re,
|
|
2209
|
-
toggleComponentModeFunction:
|
|
2210
|
-
isProduction: q(
|
|
2211
|
-
components:
|
|
2212
|
-
excludedCategories:
|
|
2268
|
+
toggleComponentModeFunction: l,
|
|
2269
|
+
isProduction: q(g),
|
|
2270
|
+
components: V.value,
|
|
2271
|
+
excludedCategories: i
|
|
2213
2272
|
}, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction", "components"])
|
|
2214
2273
|
])),
|
|
2215
2274
|
t("div", {
|
|
2216
|
-
class: G([
|
|
2275
|
+
class: G([y.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
|
|
2217
2276
|
}, [
|
|
2218
|
-
L(
|
|
2219
|
-
globalPageConfiguration:
|
|
2277
|
+
L(Ln, {
|
|
2278
|
+
globalPageConfiguration: b,
|
|
2220
2279
|
isComponentMode: f.value,
|
|
2221
2280
|
removeComponent: ge,
|
|
2222
|
-
|
|
2223
|
-
|
|
2281
|
+
cloneComponent: fe,
|
|
2282
|
+
addComponentFunction: pe,
|
|
2283
|
+
fullwidthMode: y.value,
|
|
2224
2284
|
addCol: _,
|
|
2225
|
-
addRow:
|
|
2285
|
+
addRow: N,
|
|
2226
2286
|
removeRow: X,
|
|
2227
2287
|
removeCol: ee,
|
|
2228
2288
|
moveCol: te,
|
|
2229
2289
|
updateRowConfig: j,
|
|
2230
|
-
updateColConfig:
|
|
2290
|
+
updateColConfig: E,
|
|
2231
2291
|
moveRow: J,
|
|
2232
2292
|
sectionSelected: I.value,
|
|
2233
2293
|
renderApiDomain: q(m),
|
|
2234
|
-
isProduction: q(
|
|
2294
|
+
isProduction: q(g)
|
|
2235
2295
|
}, null, 8, ["globalPageConfiguration", "isComponentMode", "fullwidthMode", "sectionSelected", "renderApiDomain", "isProduction"])
|
|
2236
2296
|
], 2)
|
|
2237
2297
|
])
|
|
@@ -2239,15 +2299,15 @@ const dt = /* @__PURE__ */ $e(Ce, [["render", it]]), ut = {
|
|
|
2239
2299
|
}
|
|
2240
2300
|
});
|
|
2241
2301
|
export {
|
|
2242
|
-
|
|
2243
|
-
|
|
2302
|
+
Ln as BodySection,
|
|
2303
|
+
bn as ColConfig,
|
|
2244
2304
|
de as ComponentsBox,
|
|
2245
|
-
|
|
2305
|
+
vo as FeedComponent,
|
|
2246
2306
|
ie as FieldsForm,
|
|
2247
|
-
|
|
2307
|
+
ut as GlobalConfig,
|
|
2248
2308
|
be as InitialComponent,
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2309
|
+
sl as Pagebuilder,
|
|
2310
|
+
zn as RowConfig,
|
|
2311
|
+
Et as SourceFilter,
|
|
2312
|
+
sl as default
|
|
2253
2313
|
};
|