lf-pagebuilder-vue 0.0.4 → 0.0.5
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 +3 -1
- package/dist/index.js +532 -517
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as H, ref as S, computed as
|
|
2
|
-
import { listComponents as
|
|
3
|
-
import { QuillEditor as
|
|
1
|
+
import { defineComponent as H, ref as S, computed as K, createElementBlock as i, openBlock as s, Fragment as B, createElementVNode as t, createCommentVNode as P, withModifiers as oe, withDirectives as R, vModelText as Y, normalizeClass as L, toDisplayString as p, renderList as V, vModelSelect as J, vModelCheckbox as te, createBlock as ie, createTextVNode as T, unref as G, onMounted as le, createVNode as q, watch as ee, nextTick as be, withCtx as de, vShow as ge, reactive as fe } from "vue";
|
|
2
|
+
import { listComponents as pe } from "libreria-astro-lefebvre";
|
|
3
|
+
import { QuillEditor as ve } from "@vueup/vue-quill";
|
|
4
4
|
import ue from "vuedraggable";
|
|
5
5
|
const xe = H({
|
|
6
6
|
props: {
|
|
@@ -19,6 +19,7 @@ const xe = H({
|
|
|
19
19
|
emits: [
|
|
20
20
|
"update:sectionSelected",
|
|
21
21
|
"update:parametersPageConfiguration.global.sidebarEnabled",
|
|
22
|
+
"update:parametersPageConfiguration.global.renderAsBodyPart",
|
|
22
23
|
"update:parametersPageConfiguration.global.headSlot",
|
|
23
24
|
"update:parametersPageConfiguration.global.bodyBeginSlot",
|
|
24
25
|
"update:parametersPageConfiguration.global.footerSlot",
|
|
@@ -27,7 +28,7 @@ const xe = H({
|
|
|
27
28
|
"update:parametersPageConfiguration.seo.description"
|
|
28
29
|
],
|
|
29
30
|
setup(e) {
|
|
30
|
-
const o = e.renderApiDomain || "http://localhost:8003", g = S(""), x = S(!1), f =
|
|
31
|
+
const o = e.renderApiDomain || "http://localhost:8003", g = S(""), x = S(!1), f = K({
|
|
31
32
|
get() {
|
|
32
33
|
var k, A;
|
|
33
34
|
const m = (k = e.globalPageConfiguration) == null ? void 0 : k.find((w) => w.section === e.sectionSelected);
|
|
@@ -48,7 +49,7 @@ const xe = H({
|
|
|
48
49
|
document.dispatchEvent(A);
|
|
49
50
|
const w = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
50
51
|
w && (w.document.body.innerText = k, w.document.close());
|
|
51
|
-
},
|
|
52
|
+
}, a = () => {
|
|
52
53
|
const m = {
|
|
53
54
|
pageConfig: e.globalPageConfiguration,
|
|
54
55
|
paramsConfig: e.parametersPageConfiguration
|
|
@@ -81,19 +82,19 @@ const xe = H({
|
|
|
81
82
|
const w = window.open("", "Preview", "width='100vw',height='100vh'");
|
|
82
83
|
if (!w) return;
|
|
83
84
|
const c = new DOMParser().parseFromString(A, "text/html"), $ = [];
|
|
84
|
-
function j(
|
|
85
|
-
if (!
|
|
86
|
-
const Z =
|
|
85
|
+
function j(N, X = 0) {
|
|
86
|
+
if (!N || N.nodeType !== 1) return;
|
|
87
|
+
const Z = N.tagName.toLowerCase();
|
|
87
88
|
["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(Z) && $.push({
|
|
88
89
|
tag: Z,
|
|
89
|
-
text: (
|
|
90
|
-
depth:
|
|
91
|
-
}), Array.from(
|
|
90
|
+
text: (N.textContent || "").trim().slice(0, 80),
|
|
91
|
+
depth: X
|
|
92
|
+
}), Array.from(N.children).forEach((_) => j(_, X + 1));
|
|
92
93
|
}
|
|
93
94
|
j(c.body);
|
|
94
95
|
let D = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
|
|
95
|
-
$.forEach((
|
|
96
|
-
D += `<li style="margin-left:${
|
|
96
|
+
$.forEach((N) => {
|
|
97
|
+
D += `<li style="margin-left:${N.depth * 20}px"><b>${N.tag}</b>: ${N.text}</li>`;
|
|
97
98
|
}), D += "</ul>", w.document.body.innerHTML = D, w.document.close();
|
|
98
99
|
});
|
|
99
100
|
},
|
|
@@ -123,7 +124,7 @@ const xe = H({
|
|
|
123
124
|
e.importConfigurationFunction && e.importConfigurationFunction(g.value), g.value = "";
|
|
124
125
|
},
|
|
125
126
|
exportFunction: u,
|
|
126
|
-
saveButtonAction:
|
|
127
|
+
saveButtonAction: a,
|
|
127
128
|
loadFromLocalStorage: () => {
|
|
128
129
|
const m = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig", k = localStorage.getItem(m);
|
|
129
130
|
if (k && e.importConfigurationFunction) {
|
|
@@ -143,36 +144,36 @@ const xe = H({
|
|
|
143
144
|
for (const [x, f] of o)
|
|
144
145
|
g[x] = f;
|
|
145
146
|
return g;
|
|
146
|
-
}, we = { class: "flex justify-end items-center w-full p-3 gap-3" }, ye = { 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" }, Ce = { class: "flex gap-2" }, $e = { class: "flex gap-2" }, ke = ["value"], Se = ["value"],
|
|
147
|
+
}, we = { class: "flex justify-end items-center w-full p-3 gap-3" }, ye = { 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" }, Ce = { class: "flex gap-2" }, $e = { class: "flex gap-2" }, ke = ["value"], Se = ["value"], Pe = { value: "full" }, Fe = { value: "1/2" }, je = { value: "1/3" }, Ie = { value: "2/3" }, Me = { value: "1/4" }, Ae = { value: "3/4" }, Be = { value: "1/5" }, Ee = { value: "2/5" }, Te = { value: "3/5" }, De = { value: "4/5" }, Oe = { key: 0 }, Re = { key: 1 }, Ne = { class: "flex items-center gap-2" }, Ve = {
|
|
147
148
|
key: 0,
|
|
148
149
|
class: "bg-white border border-slate-200 rounded-2xl p-5 mx-3 mb-6 shadow-lg"
|
|
149
|
-
}, Ue = { class: "flex flex-row gap-4 w-full" }, ze = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, qe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, Ge = { class: "flex items-center gap-3 cursor-pointer group" }, Je = { class: "mb-3" }, He = { class: "
|
|
150
|
-
function
|
|
150
|
+
}, Ue = { class: "flex flex-row gap-4 w-full" }, ze = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, qe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, Ge = { class: "flex items-center gap-3 cursor-pointer group" }, Je = { class: "mb-3" }, He = { class: "flex items-center gap-3 cursor-pointer group" }, We = { class: "mb-3" }, Ye = { class: "mb-3" }, Ke = { class: "mb-3" }, Qe = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Xe = { class: "flex justify-between items-center mb-4" }, Ze = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, _e = { class: "mb-3" }, et = { class: "mb-3" }, tt = { class: "mb-3" };
|
|
151
|
+
function ot(e, o, g, x, f, u) {
|
|
151
152
|
return s(), i(B, null, [
|
|
152
153
|
t("div", we, [
|
|
153
|
-
o[
|
|
154
|
+
o[30] || (o[30] = t("span", { class: "bg-rose-50 px-3 py-1 rounded-full border border-rose-200 text-rose-400 text-xs font-medium me-4" }, "Todo lo de esta barra desaparecerá →", -1)),
|
|
154
155
|
t("form", {
|
|
155
|
-
onSubmit: o[2] || (o[2] =
|
|
156
|
+
onSubmit: o[2] || (o[2] = oe(() => {
|
|
156
157
|
}, ["prevent"])),
|
|
157
158
|
class: "flex gap-2"
|
|
158
159
|
}, [
|
|
159
|
-
|
|
160
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
160
|
+
R(t("input", {
|
|
161
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => e.importConfig = a),
|
|
161
162
|
type: "text",
|
|
162
163
|
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",
|
|
163
164
|
name: "",
|
|
164
165
|
id: "",
|
|
165
166
|
placeholder: "Pegar configuración..."
|
|
166
167
|
}, null, 512), [
|
|
167
|
-
[
|
|
168
|
+
[Y, e.importConfig]
|
|
168
169
|
]),
|
|
169
170
|
t("button", {
|
|
170
|
-
onClick: o[1] || (o[1] = (
|
|
171
|
+
onClick: o[1] || (o[1] = (a) => e.importFunction()),
|
|
171
172
|
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"
|
|
172
173
|
}, "🏯 Importar")
|
|
173
174
|
], 32),
|
|
174
175
|
t("button", {
|
|
175
|
-
onClick: o[3] || (o[3] = (
|
|
176
|
+
onClick: o[3] || (o[3] = (a) => e.exportFunction()),
|
|
176
177
|
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"
|
|
177
178
|
}, "🚀 Exportar")
|
|
178
179
|
]),
|
|
@@ -180,48 +181,48 @@ function et(e, o, g, x, f, u) {
|
|
|
180
181
|
t("div", Ce, [
|
|
181
182
|
t("button", {
|
|
182
183
|
class: L([[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"]),
|
|
183
|
-
onClick: o[4] || (o[4] = (
|
|
184
|
+
onClick: o[4] || (o[4] = (a) => {
|
|
184
185
|
var b;
|
|
185
186
|
return (b = e.toggleComponentModeFunction) == null ? void 0 : b.call(e);
|
|
186
187
|
})
|
|
187
|
-
},
|
|
188
|
+
}, p(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3),
|
|
188
189
|
t("button", {
|
|
189
190
|
class: L([[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"]),
|
|
190
|
-
onClick: o[5] || (o[5] = (
|
|
191
|
+
onClick: o[5] || (o[5] = (a) => {
|
|
191
192
|
var b;
|
|
192
193
|
return (b = e.toggleFullwidthMode) == null ? void 0 : b.call(e);
|
|
193
194
|
})
|
|
194
|
-
},
|
|
195
|
+
}, p(e.fullwidthMode ? "⚒️ Comps. Plegados" : "👁️ Comps. Desplegados"), 3)
|
|
195
196
|
]),
|
|
196
197
|
t("div", $e, [
|
|
197
198
|
t("select", {
|
|
198
199
|
value: e.sectionSelected,
|
|
199
|
-
onChange: o[6] || (o[6] = (
|
|
200
|
+
onChange: o[6] || (o[6] = (a) => e.$emit("update:sectionSelected", a.target.value)),
|
|
200
201
|
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"
|
|
201
202
|
}, [
|
|
202
|
-
(s(!0), i(B, null, V(e.availableSections, (
|
|
203
|
+
(s(!0), i(B, null, V(e.availableSections, (a, b) => (s(), i("option", {
|
|
203
204
|
key: b,
|
|
204
|
-
value:
|
|
205
|
-
},
|
|
205
|
+
value: a
|
|
206
|
+
}, p(a), 9, Se))), 128))
|
|
206
207
|
], 40, ke),
|
|
207
|
-
|
|
208
|
+
R(t("select", {
|
|
208
209
|
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",
|
|
209
|
-
"onUpdate:modelValue": o[7] || (o[7] = (
|
|
210
|
+
"onUpdate:modelValue": o[7] || (o[7] = (a) => e.sectionWidth = a)
|
|
210
211
|
}, [
|
|
211
|
-
o[
|
|
212
|
+
o[31] || (o[31] = t("option", {
|
|
212
213
|
disabled: "",
|
|
213
214
|
value: ""
|
|
214
215
|
}, "Selecciona el ancho de la sección", -1)),
|
|
215
|
-
t("option",
|
|
216
|
-
t("option",
|
|
217
|
-
t("option", je, "Sección " +
|
|
218
|
-
t("option", Ie, "Sección " +
|
|
219
|
-
t("option", Me, "Sección " +
|
|
220
|
-
t("option", Ae, "Sección " +
|
|
221
|
-
t("option", Be, "Sección " +
|
|
222
|
-
t("option", Ee, "Sección " +
|
|
223
|
-
t("option", Te, "Sección " +
|
|
224
|
-
t("option", De, "Sección " +
|
|
216
|
+
t("option", Pe, "Sección " + p(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
|
|
217
|
+
t("option", Fe, "Sección " + p(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
|
|
218
|
+
t("option", je, "Sección " + p(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
|
|
219
|
+
t("option", Ie, "Sección " + p(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
|
|
220
|
+
t("option", Me, "Sección " + p(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
|
|
221
|
+
t("option", Ae, "Sección " + p(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
|
|
222
|
+
t("option", Be, "Sección " + p(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
|
|
223
|
+
t("option", Ee, "Sección " + p(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
|
|
224
|
+
t("option", Te, "Sección " + p(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
|
|
225
|
+
t("option", De, "Sección " + p(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
|
|
225
226
|
], 512), [
|
|
226
227
|
[J, e.sectionWidth]
|
|
227
228
|
]),
|
|
@@ -230,28 +231,28 @@ function et(e, o, g, x, f, u) {
|
|
|
230
231
|
"cursor-pointer border rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200 flex items-center gap-2",
|
|
231
232
|
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"
|
|
232
233
|
]),
|
|
233
|
-
onClick: o[8] || (o[8] = (
|
|
234
|
+
onClick: o[8] || (o[8] = (a) => e.showAdvancedConfig = !e.showAdvancedConfig)
|
|
234
235
|
}, [
|
|
235
|
-
o[
|
|
236
|
-
e.showAdvancedConfig ? (s(), i("span", Oe, "▲")) : (s(), i("span",
|
|
236
|
+
o[32] || (o[32] = t("span", null, "⚙️ Página", -1)),
|
|
237
|
+
e.showAdvancedConfig ? (s(), i("span", Oe, "▲")) : (s(), i("span", Re, "▼"))
|
|
237
238
|
], 2)
|
|
238
239
|
]),
|
|
239
|
-
t("div",
|
|
240
|
+
t("div", Ne, [
|
|
240
241
|
t("button", {
|
|
241
|
-
onClick: o[9] || (o[9] = (
|
|
242
|
+
onClick: o[9] || (o[9] = (a) => e.previewFunction()),
|
|
242
243
|
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"
|
|
243
244
|
}, "🔎 Preview"),
|
|
244
245
|
t("button", {
|
|
245
|
-
onClick: o[10] || (o[10] = (
|
|
246
|
+
onClick: o[10] || (o[10] = (a) => e.saveButtonAction()),
|
|
246
247
|
title: "No es un guardado real, simplemente almacena la configuración en el navegador para recuperarla luego",
|
|
247
248
|
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"
|
|
248
249
|
}, "💾 Guardar"),
|
|
249
250
|
t("button", {
|
|
250
|
-
onClick: o[11] || (o[11] = (
|
|
251
|
+
onClick: o[11] || (o[11] = (a) => e.loadFromLocalStorage()),
|
|
251
252
|
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"
|
|
252
253
|
}, "⤵️ Cargar"),
|
|
253
254
|
t("button", {
|
|
254
|
-
onClick: o[12] || (o[12] = (
|
|
255
|
+
onClick: o[12] || (o[12] = (a) => e.toggleExpandScreen()),
|
|
255
256
|
title: "Expandir / Contraer Pagebuilder",
|
|
256
257
|
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"
|
|
257
258
|
}, "◳")
|
|
@@ -260,143 +261,156 @@ function et(e, o, g, x, f, u) {
|
|
|
260
261
|
e.showAdvancedConfig && e.parametersPageConfiguration ? (s(), i("div", Ve, [
|
|
261
262
|
t("div", Ue, [
|
|
262
263
|
t("div", ze, [
|
|
263
|
-
o[
|
|
264
|
-
o[
|
|
264
|
+
o[38] || (o[38] = t("h2", { class: "text-lg font-bold mb-4 text-slate-700" }, "Configuración Avanzada", -1)),
|
|
265
|
+
o[39] || (o[39] = t("h3", { class: "font-semibold mb-3 text-slate-600" }, "Configuración Global", -1)),
|
|
265
266
|
t("div", qe, [
|
|
266
267
|
t("div", Le, [
|
|
267
268
|
t("label", Ge, [
|
|
268
|
-
|
|
269
|
+
R(t("input", {
|
|
269
270
|
type: "checkbox",
|
|
270
|
-
"onUpdate:modelValue": o[13] || (o[13] = (
|
|
271
|
-
onChange: o[14] || (o[14] = (
|
|
271
|
+
"onUpdate:modelValue": o[13] || (o[13] = (a) => e.parametersPageConfiguration.global.sidebarEnabled = a),
|
|
272
|
+
onChange: o[14] || (o[14] = (a) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", a.target.value)),
|
|
272
273
|
class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
|
|
273
274
|
}, null, 544), [
|
|
274
|
-
[
|
|
275
|
+
[te, e.parametersPageConfiguration.global.sidebarEnabled]
|
|
275
276
|
]),
|
|
276
|
-
o[
|
|
277
|
+
o[33] || (o[33] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Sidebar Habilitado", -1))
|
|
277
278
|
])
|
|
278
279
|
]),
|
|
279
280
|
t("div", Je, [
|
|
280
|
-
|
|
281
|
+
t("label", He, [
|
|
282
|
+
R(t("input", {
|
|
283
|
+
type: "checkbox",
|
|
284
|
+
"onUpdate:modelValue": o[15] || (o[15] = (a) => e.parametersPageConfiguration.global.renderAsBodyPart = a),
|
|
285
|
+
onChange: o[16] || (o[16] = (a) => e.$emit("update:parametersPageConfiguration.global.renderAsBodyPart", a.target.value)),
|
|
286
|
+
class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
|
|
287
|
+
}, null, 544), [
|
|
288
|
+
[te, e.parametersPageConfiguration.global.renderAsBodyPart]
|
|
289
|
+
]),
|
|
290
|
+
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))
|
|
291
|
+
])
|
|
292
|
+
]),
|
|
293
|
+
t("div", We, [
|
|
294
|
+
o[35] || (o[35] = t("label", {
|
|
281
295
|
for: "headSlot",
|
|
282
296
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
283
297
|
}, " Código al final de la sección <head> ", -1)),
|
|
284
|
-
|
|
298
|
+
R(t("textarea", {
|
|
285
299
|
id: "headSlot",
|
|
286
|
-
"onUpdate:modelValue": o[
|
|
287
|
-
onInput: o[
|
|
300
|
+
"onUpdate:modelValue": o[17] || (o[17] = (a) => e.parametersPageConfiguration.global.headSlot = a),
|
|
301
|
+
onInput: o[18] || (o[18] = (a) => e.$emit("update:parametersPageConfiguration.global.headSlot", a.target.value)),
|
|
288
302
|
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",
|
|
289
303
|
placeholder: "Contenido para el head",
|
|
290
304
|
rows: "3"
|
|
291
305
|
}, null, 544), [
|
|
292
|
-
[
|
|
306
|
+
[Y, e.parametersPageConfiguration.global.headSlot]
|
|
293
307
|
])
|
|
294
308
|
]),
|
|
295
|
-
t("div",
|
|
296
|
-
o[
|
|
309
|
+
t("div", Ye, [
|
|
310
|
+
o[36] || (o[36] = t("label", {
|
|
297
311
|
for: "bodyBeginSlot",
|
|
298
312
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
299
313
|
}, " Código al principio de la sección <body> ", -1)),
|
|
300
|
-
|
|
314
|
+
R(t("textarea", {
|
|
301
315
|
id: "bodyBeginSlot",
|
|
302
|
-
"onUpdate:modelValue": o[
|
|
303
|
-
onInput: o[
|
|
316
|
+
"onUpdate:modelValue": o[19] || (o[19] = (a) => e.parametersPageConfiguration.global.bodyBeginSlot = a),
|
|
317
|
+
onInput: o[20] || (o[20] = (a) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", a.target.value)),
|
|
304
318
|
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",
|
|
305
319
|
placeholder: "Contenido para el inicio del body",
|
|
306
320
|
rows: "3"
|
|
307
321
|
}, null, 544), [
|
|
308
|
-
[
|
|
322
|
+
[Y, e.parametersPageConfiguration.global.bodyBeginSlot]
|
|
309
323
|
])
|
|
310
324
|
]),
|
|
311
|
-
t("div",
|
|
312
|
-
o[
|
|
325
|
+
t("div", Ke, [
|
|
326
|
+
o[37] || (o[37] = t("label", {
|
|
313
327
|
for: "footerSlot",
|
|
314
328
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
315
329
|
}, " Código al final de la sección <body>, dentro de la etiqueta <footer> ", -1)),
|
|
316
|
-
|
|
330
|
+
R(t("textarea", {
|
|
317
331
|
id: "footerSlot",
|
|
318
|
-
"onUpdate:modelValue": o[
|
|
319
|
-
onInput: o[
|
|
332
|
+
"onUpdate:modelValue": o[21] || (o[21] = (a) => e.parametersPageConfiguration.global.footerSlot = a),
|
|
333
|
+
onInput: o[22] || (o[22] = (a) => e.$emit("update:parametersPageConfiguration.global.footerSlot", a.target.value)),
|
|
320
334
|
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",
|
|
321
335
|
placeholder: "Contenido para el footer",
|
|
322
336
|
rows: "3"
|
|
323
337
|
}, null, 544), [
|
|
324
|
-
[
|
|
338
|
+
[Y, e.parametersPageConfiguration.global.footerSlot]
|
|
325
339
|
])
|
|
326
340
|
])
|
|
327
341
|
])
|
|
328
342
|
]),
|
|
329
|
-
t("div",
|
|
330
|
-
t("div",
|
|
331
|
-
o[
|
|
343
|
+
t("div", Qe, [
|
|
344
|
+
t("div", Xe, [
|
|
345
|
+
o[40] || (o[40] = t("h2", { class: "text-lg font-bold text-slate-700" }, "Configuración SEO", -1)),
|
|
332
346
|
t("button", {
|
|
333
|
-
onClick: o[
|
|
347
|
+
onClick: o[23] || (o[23] = (a) => e.validateSeo()),
|
|
334
348
|
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"
|
|
335
349
|
}, "🦄 Validar SEO")
|
|
336
350
|
]),
|
|
337
|
-
t("div",
|
|
338
|
-
t("div",
|
|
339
|
-
o[
|
|
351
|
+
t("div", Ze, [
|
|
352
|
+
t("div", _e, [
|
|
353
|
+
o[42] || (o[42] = t("label", {
|
|
340
354
|
for: "robotsIndex",
|
|
341
355
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
342
356
|
}, " Indexación de robots ", -1)),
|
|
343
|
-
|
|
357
|
+
R(t("select", {
|
|
344
358
|
id: "robotsIndex",
|
|
345
|
-
"onUpdate:modelValue": o[
|
|
346
|
-
onChange: o[
|
|
359
|
+
"onUpdate:modelValue": o[24] || (o[24] = (a) => e.parametersPageConfiguration.seo.robots = a),
|
|
360
|
+
onChange: o[25] || (o[25] = (a) => e.$emit("update:parametersPageConfiguration.seo.robots", a.target.value)),
|
|
347
361
|
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"
|
|
348
|
-
}, [...o[
|
|
362
|
+
}, [...o[41] || (o[41] = [
|
|
349
363
|
t("option", { value: "index, follow" }, "Index Follow", -1),
|
|
350
364
|
t("option", { value: "noindex, nofollow" }, "Noindex Nofollow", -1)
|
|
351
365
|
])], 544), [
|
|
352
366
|
[J, e.parametersPageConfiguration.seo.robots]
|
|
353
367
|
])
|
|
354
368
|
]),
|
|
355
|
-
t("div",
|
|
356
|
-
o[
|
|
369
|
+
t("div", et, [
|
|
370
|
+
o[43] || (o[43] = t("label", {
|
|
357
371
|
for: "pageTitle",
|
|
358
372
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
359
373
|
}, " Título de la página ", -1)),
|
|
360
|
-
|
|
374
|
+
R(t("input", {
|
|
361
375
|
id: "pageTitle",
|
|
362
376
|
type: "text",
|
|
363
|
-
"onUpdate:modelValue": o[
|
|
364
|
-
onInput: o[
|
|
377
|
+
"onUpdate:modelValue": o[26] || (o[26] = (a) => e.parametersPageConfiguration.seo.title = a),
|
|
378
|
+
onInput: o[27] || (o[27] = (a) => e.$emit("update:parametersPageConfiguration.seo.title", a.target.value)),
|
|
365
379
|
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",
|
|
366
380
|
placeholder: "Ingresa el título de la página"
|
|
367
381
|
}, null, 544), [
|
|
368
|
-
[
|
|
382
|
+
[Y, e.parametersPageConfiguration.seo.title]
|
|
369
383
|
])
|
|
370
384
|
]),
|
|
371
|
-
t("div",
|
|
372
|
-
o[
|
|
385
|
+
t("div", tt, [
|
|
386
|
+
o[44] || (o[44] = t("label", {
|
|
373
387
|
for: "pageDescription",
|
|
374
388
|
class: "block text-sm font-medium text-slate-600 mb-2"
|
|
375
389
|
}, " Descripción de la página ", -1)),
|
|
376
|
-
|
|
390
|
+
R(t("textarea", {
|
|
377
391
|
id: "pageDescription",
|
|
378
|
-
"onUpdate:modelValue": o[
|
|
379
|
-
onInput: o[
|
|
392
|
+
"onUpdate:modelValue": o[28] || (o[28] = (a) => e.parametersPageConfiguration.seo.description = a),
|
|
393
|
+
onInput: o[29] || (o[29] = (a) => e.$emit("update:parametersPageConfiguration.seo.description", a.target.value)),
|
|
380
394
|
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",
|
|
381
395
|
placeholder: "Ingresa la descripción de la página",
|
|
382
396
|
rows: "3"
|
|
383
397
|
}, null, 544), [
|
|
384
|
-
[
|
|
398
|
+
[Y, e.parametersPageConfiguration.seo.description]
|
|
385
399
|
])
|
|
386
400
|
])
|
|
387
401
|
])
|
|
388
402
|
])
|
|
389
403
|
])
|
|
390
|
-
])) :
|
|
404
|
+
])) : P("", !0)
|
|
391
405
|
], 64);
|
|
392
406
|
}
|
|
393
|
-
const
|
|
407
|
+
const lt = /* @__PURE__ */ he(xe, [["render", ot]]), nt = {
|
|
394
408
|
key: 0,
|
|
395
409
|
class: "absolute top-0 left-0 bg-white/90 w-full h-full z-100"
|
|
396
|
-
},
|
|
410
|
+
}, at = { class: "w-full flex justify-end p-4" }, rt = ["for"], st = {
|
|
397
411
|
key: 0,
|
|
398
412
|
class: "text-red-500"
|
|
399
|
-
},
|
|
413
|
+
}, it = ["id", "name", "placeholder", "required", "value", "onInput"], dt = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], ut = ["id", "name", "required", "value", "onInput"], ct = ["value"], mt = ["id", "name", "required", "checked", "onChange"], re = /* @__PURE__ */ H({
|
|
400
414
|
__name: "FieldsForm",
|
|
401
415
|
props: {
|
|
402
416
|
object: {
|
|
@@ -414,15 +428,15 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
414
428
|
},
|
|
415
429
|
setup(e) {
|
|
416
430
|
const o = e, g = (x, f) => {
|
|
417
|
-
const u = (o.object.fields || []).find((
|
|
431
|
+
const u = (o.object.fields || []).find((a) => a.name === x);
|
|
418
432
|
u && (u.example_value = f);
|
|
419
433
|
};
|
|
420
434
|
return (x, f) => (s(), i(B, null, [
|
|
421
|
-
e.showForm ? (s(), i("div",
|
|
435
|
+
e.showForm ? (s(), i("div", nt)) : P("", !0),
|
|
422
436
|
t("div", {
|
|
423
437
|
class: L(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")
|
|
424
438
|
}, [
|
|
425
|
-
t("div",
|
|
439
|
+
t("div", at, [
|
|
426
440
|
t("span", {
|
|
427
441
|
onClick: f[0] || (f[0] = //@ts-ignore
|
|
428
442
|
(...u) => e.toggleShowForm && e.toggleShowForm(...u)),
|
|
@@ -430,32 +444,32 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
430
444
|
}, "❌")
|
|
431
445
|
]),
|
|
432
446
|
t("form", null, [
|
|
433
|
-
(s(!0), i(B, null, V(e.object.fields, (u,
|
|
434
|
-
key:
|
|
447
|
+
(s(!0), i(B, null, V(e.object.fields, (u, a) => (s(), i("div", {
|
|
448
|
+
key: a,
|
|
435
449
|
class: "mb-4"
|
|
436
450
|
}, [
|
|
437
451
|
t("label", {
|
|
438
|
-
for: `${e.object.id}-${u.name}-${
|
|
452
|
+
for: `${e.object.id}-${u.name}-${a}`,
|
|
439
453
|
class: "block text-sm font-medium mb-1"
|
|
440
454
|
}, [
|
|
441
|
-
T(
|
|
442
|
-
u.mandatory ? (s(), i("span",
|
|
443
|
-
], 8,
|
|
455
|
+
T(p(u.label) + " ", 1),
|
|
456
|
+
u.mandatory ? (s(), i("span", st, "*")) : P("", !0)
|
|
457
|
+
], 8, rt),
|
|
444
458
|
u.type === "text" ? (s(), i("input", {
|
|
445
459
|
key: 0,
|
|
446
|
-
id: `${e.object.id}-${u.name}-${
|
|
447
|
-
name: `${e.object.id}-${u.name}-${
|
|
460
|
+
id: `${e.object.id}-${u.name}-${a}`,
|
|
461
|
+
name: `${e.object.id}-${u.name}-${a}`,
|
|
448
462
|
type: "text",
|
|
449
463
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
450
464
|
placeholder: u.label,
|
|
451
465
|
required: u.mandatory,
|
|
452
466
|
value: u.example_value,
|
|
453
467
|
onInput: (b) => g(u.name, b.target.value)
|
|
454
|
-
}, null, 40,
|
|
468
|
+
}, null, 40, it)) : P("", !0),
|
|
455
469
|
u.type === "image" ? (s(), i("input", {
|
|
456
470
|
key: 1,
|
|
457
|
-
id: `${e.object.id}-${u.name}-${
|
|
458
|
-
name: `${e.object.id}-${u.name}-${
|
|
471
|
+
id: `${e.object.id}-${u.name}-${a}`,
|
|
472
|
+
name: `${e.object.id}-${u.name}-${a}`,
|
|
459
473
|
"data-mandatoryCrops": u.image_cuts ? JSON.stringify(u.image_cuts) : null,
|
|
460
474
|
type: "text",
|
|
461
475
|
class: "js-limbo w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
@@ -463,11 +477,11 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
463
477
|
required: u.mandatory,
|
|
464
478
|
value: u.example_value,
|
|
465
479
|
onInput: (b) => g(u.name, b.target.value)
|
|
466
|
-
}, null, 40,
|
|
480
|
+
}, null, 40, dt)) : u.type === "textArea" ? (s(), ie(G(ve), {
|
|
467
481
|
key: 2,
|
|
468
482
|
theme: "snow",
|
|
469
|
-
id: `${e.object.id}-${u.name}-${
|
|
470
|
-
name: `${e.object.id}-${u.name}-${
|
|
483
|
+
id: `${e.object.id}-${u.name}-${a}`,
|
|
484
|
+
name: `${e.object.id}-${u.name}-${a}`,
|
|
471
485
|
rows: "3",
|
|
472
486
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400 z-9999",
|
|
473
487
|
placeholder: u.label,
|
|
@@ -481,8 +495,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
481
495
|
contentType: "html"
|
|
482
496
|
}, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : u.type === "select" ? (s(), i("select", {
|
|
483
497
|
key: 3,
|
|
484
|
-
id: `${e.object.id}-${u.name}-${
|
|
485
|
-
name: `${e.object.id}-${u.name}-${
|
|
498
|
+
id: `${e.object.id}-${u.name}-${a}`,
|
|
499
|
+
name: `${e.object.id}-${u.name}-${a}`,
|
|
486
500
|
class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
|
|
487
501
|
required: u.mandatory,
|
|
488
502
|
value: u.example_value,
|
|
@@ -495,29 +509,29 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
495
509
|
(s(!0), i(B, null, V(u.options || [], (b, C) => (s(), i("option", {
|
|
496
510
|
key: C,
|
|
497
511
|
value: b
|
|
498
|
-
},
|
|
499
|
-
], 40,
|
|
512
|
+
}, p(b), 9, ct))), 128))
|
|
513
|
+
], 40, ut)) : u.type === "boolean" ? (s(), i("input", {
|
|
500
514
|
key: 4,
|
|
501
|
-
id: `${e.object.id}-${u.name}-${
|
|
502
|
-
name: `${e.object.id}-${u.name}-${
|
|
515
|
+
id: `${e.object.id}-${u.name}-${a}`,
|
|
516
|
+
name: `${e.object.id}-${u.name}-${a}`,
|
|
503
517
|
type: "checkbox",
|
|
504
518
|
class: "h-4 w-4 text-blue-600 focus:ring-blue-500 border-slate-300 rounded inline-block",
|
|
505
519
|
required: u.mandatory,
|
|
506
520
|
checked: u.example_value,
|
|
507
521
|
onChange: (b) => g(u.name, b.target.checked)
|
|
508
|
-
}, null, 40,
|
|
522
|
+
}, null, 40, mt)) : P("", !0)
|
|
509
523
|
]))), 128))
|
|
510
524
|
])
|
|
511
525
|
], 2)
|
|
512
526
|
], 64));
|
|
513
527
|
}
|
|
514
|
-
}),
|
|
528
|
+
}), bt = { class: "space-y-4" }, gt = ["disabled"], ft = ["value"], pt = { class: "space-y-3" }, vt = {
|
|
515
529
|
key: 0,
|
|
516
530
|
class: "overflow-y-auto space-y-3"
|
|
517
|
-
},
|
|
531
|
+
}, xt = { class: "block text-sm font-semibold text-slate-600 mb-2" }, ht = ["onChange", "disabled"], wt = ["value"], yt = ["onChange", "disabled"], Ct = ["onInput", "disabled", "placeholder"], $t = ["disabled"], kt = {
|
|
518
532
|
key: 0,
|
|
519
533
|
class: "animate-spin"
|
|
520
|
-
},
|
|
534
|
+
}, St = { key: 1 }, Pt = /* @__PURE__ */ H({
|
|
521
535
|
__name: "SourceFilter",
|
|
522
536
|
props: {
|
|
523
537
|
onSubmit: {
|
|
@@ -534,13 +548,13 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
534
548
|
}
|
|
535
549
|
},
|
|
536
550
|
setup(e) {
|
|
537
|
-
const o = e, g = S(!1), x = S(null), f = S({}), u =
|
|
538
|
-
const
|
|
551
|
+
const o = e, g = S(!1), x = S(null), f = S({}), u = K(() => {
|
|
552
|
+
const r = o.isProduction;
|
|
539
553
|
return [
|
|
540
554
|
{
|
|
541
555
|
id: "origen1",
|
|
542
556
|
name: "El Derecho",
|
|
543
|
-
apiUrl:
|
|
557
|
+
apiUrl: r ? "https://elderecho.com/feed" : "https://led-dev-elderecho-dev.eu.els.local/feed",
|
|
544
558
|
filters: [
|
|
545
559
|
{ id: "title", label: "Título del Post", type: "text" },
|
|
546
560
|
{ id: "category", label: "Slug de la Categoría", type: "text" },
|
|
@@ -554,7 +568,7 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
554
568
|
{
|
|
555
569
|
id: "origen2",
|
|
556
570
|
name: "Formación",
|
|
557
|
-
apiUrl:
|
|
571
|
+
apiUrl: r ? "https://lefebvre.es/formacion/feed" : "http://led-dev-lefebvre-dev.eu.els.local/formacion/feed",
|
|
558
572
|
filters: [
|
|
559
573
|
{ id: "id", label: "ID del curso", type: "text" },
|
|
560
574
|
{ id: "title", label: "Título del Post", type: "text" },
|
|
@@ -566,39 +580,39 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
566
580
|
{
|
|
567
581
|
id: "origen3",
|
|
568
582
|
name: "Derecholocal",
|
|
569
|
-
apiUrl:
|
|
583
|
+
apiUrl: r ? "https://derecholocal.es/feed" : "https://led-dev-derecholocal-dev.eu.els.local/feed",
|
|
570
584
|
filters: []
|
|
571
585
|
},
|
|
572
586
|
{
|
|
573
587
|
id: "origen4",
|
|
574
588
|
name: "EspacioAsesoría",
|
|
575
|
-
apiUrl:
|
|
589
|
+
apiUrl: r ? "https://espacioasesoria.com/feed" : "https://led-dev-espacioasesoria-dev.eu.els.local/feed",
|
|
576
590
|
filters: []
|
|
577
591
|
},
|
|
578
592
|
{
|
|
579
593
|
id: "origen5",
|
|
580
594
|
name: "EspacioPymes",
|
|
581
|
-
apiUrl:
|
|
595
|
+
apiUrl: r ? "https://espaciopymes.com/feed" : "https://led-dev-espaciopymes-dev.eu.els.local/feed",
|
|
582
596
|
filters: []
|
|
583
597
|
}
|
|
584
598
|
];
|
|
585
|
-
}),
|
|
599
|
+
}), a = K(() => {
|
|
586
600
|
if (!x.value)
|
|
587
601
|
return [];
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
}), b = (
|
|
591
|
-
f.value[
|
|
602
|
+
const r = u.value.find((l) => l.id === x.value);
|
|
603
|
+
return r ? r.filters : [];
|
|
604
|
+
}), b = (r, l) => {
|
|
605
|
+
f.value[r] = l;
|
|
592
606
|
}, C = () => {
|
|
593
607
|
f.value = {};
|
|
594
608
|
}, I = async () => {
|
|
595
609
|
g.value = !0;
|
|
596
|
-
const
|
|
597
|
-
if (!
|
|
610
|
+
const r = u.value.find((n) => n.id === x.value);
|
|
611
|
+
if (!r) {
|
|
598
612
|
console.error("Origen no encontrado"), g.value = !1;
|
|
599
613
|
return;
|
|
600
614
|
}
|
|
601
|
-
const l = new URL(
|
|
615
|
+
const l = new URL(r.apiUrl);
|
|
602
616
|
Object.keys(f.value).forEach((n) => {
|
|
603
617
|
f.value[n] && l.searchParams.append(n, f.value[n]);
|
|
604
618
|
});
|
|
@@ -622,16 +636,16 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
622
636
|
console.error("Error al aplicar filtros:", n), o.onSubmit([]);
|
|
623
637
|
} finally {
|
|
624
638
|
const n = {
|
|
625
|
-
name:
|
|
639
|
+
name: r.name,
|
|
626
640
|
url: l.toString()
|
|
627
641
|
};
|
|
628
642
|
o.updateFeedCriteria(n), g.value = !1;
|
|
629
643
|
}
|
|
630
644
|
};
|
|
631
|
-
return (
|
|
645
|
+
return (r, l) => (s(), i("div", bt, [
|
|
632
646
|
t("div", null, [
|
|
633
647
|
l[1] || (l[1] = t("label", { class: "block text-sm font-semibold text-slate-600 mb-2" }, "Seleccionar origen:", -1)),
|
|
634
|
-
|
|
648
|
+
R(t("select", {
|
|
635
649
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => x.value = n),
|
|
636
650
|
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",
|
|
637
651
|
onChange: C,
|
|
@@ -640,18 +654,18 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
640
654
|
(s(!0), i(B, null, V(u.value, (n) => (s(), i("option", {
|
|
641
655
|
key: n.id,
|
|
642
656
|
value: n.id
|
|
643
|
-
},
|
|
644
|
-
], 40,
|
|
657
|
+
}, p(n.name), 9, ft))), 128))
|
|
658
|
+
], 40, gt), [
|
|
645
659
|
[J, x.value]
|
|
646
660
|
])
|
|
647
661
|
]),
|
|
648
|
-
t("div",
|
|
649
|
-
|
|
650
|
-
(s(!0), i(B, null, V(
|
|
662
|
+
t("div", pt, [
|
|
663
|
+
a.value.length > 0 ? (s(), i("div", vt, [
|
|
664
|
+
(s(!0), i(B, null, V(a.value, (n) => (s(), i("div", {
|
|
651
665
|
key: n.id,
|
|
652
666
|
class: "bg-gradient-to-br from-slate-50 to-white p-4 rounded-xl border border-slate-200"
|
|
653
667
|
}, [
|
|
654
|
-
t("label",
|
|
668
|
+
t("label", xt, p(n.label) + ":", 1),
|
|
655
669
|
n.type === "select" ? (s(), i("select", {
|
|
656
670
|
key: 0,
|
|
657
671
|
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",
|
|
@@ -662,56 +676,56 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
662
676
|
(s(!0), i(B, null, V(n.options, (m) => (s(), i("option", {
|
|
663
677
|
key: m,
|
|
664
678
|
value: m
|
|
665
|
-
},
|
|
666
|
-
], 40,
|
|
679
|
+
}, p(m), 9, wt))), 128))
|
|
680
|
+
], 40, ht)) : n.type === "date" ? (s(), i("input", {
|
|
667
681
|
key: 1,
|
|
668
682
|
type: "date",
|
|
669
683
|
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",
|
|
670
684
|
onChange: (m) => b(n.id, m.target.value),
|
|
671
685
|
disabled: g.value
|
|
672
|
-
}, null, 40,
|
|
686
|
+
}, null, 40, yt)) : n.type === "text" ? (s(), i("input", {
|
|
673
687
|
key: 2,
|
|
674
688
|
type: "text",
|
|
675
689
|
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",
|
|
676
690
|
onInput: (m) => b(n.id, m.target.value),
|
|
677
691
|
disabled: g.value,
|
|
678
692
|
placeholder: n.label
|
|
679
|
-
}, null, 40,
|
|
693
|
+
}, null, 40, Ct)) : P("", !0)
|
|
680
694
|
]))), 128))
|
|
681
|
-
])) :
|
|
695
|
+
])) : P("", !0),
|
|
682
696
|
t("button", {
|
|
683
697
|
onClick: I,
|
|
684
698
|
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",
|
|
685
699
|
disabled: g.value
|
|
686
700
|
}, [
|
|
687
|
-
g.value ? (s(), i("span",
|
|
688
|
-
T(" " +
|
|
689
|
-
], 8,
|
|
701
|
+
g.value ? (s(), i("span", kt, "⏳")) : (s(), i("span", St, "🔍")),
|
|
702
|
+
T(" " + p(g.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
|
|
703
|
+
], 8, $t)
|
|
690
704
|
])
|
|
691
705
|
]));
|
|
692
706
|
}
|
|
693
|
-
}),
|
|
707
|
+
}), Ft = { 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" }, jt = { class: "w-full flex justify-between items-center mb-4" }, It = { 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" }, Mt = { class: "flex-1 flex flex-col gap-5" }, At = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Bt = {
|
|
694
708
|
key: 0,
|
|
695
709
|
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"
|
|
696
|
-
},
|
|
710
|
+
}, Et = { class: "list-none mt-3 space-y-2 text-slate-600" }, Tt = { class: "flex items-start gap-2" }, Dt = { class: "font-semibold text-slate-700" }, Ot = { class: "flex items-start gap-2" }, Rt = { class: "font-semibold text-slate-700" }, Nt = { class: "font-semibold text-slate-700" }, Vt = { class: "flex items-start gap-2" }, Ut = { class: "flex flex-wrap gap-2 mt-1" }, zt = { class: "font-semibold text-slate-700" }, qt = { class: "text-emerald-600" }, Lt = { class: "flex flex-col gap-4 w-full" }, Gt = { class: "flex items-center gap-3 cursor-pointer group" }, Jt = {
|
|
697
711
|
key: 0,
|
|
698
712
|
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"
|
|
699
|
-
},
|
|
713
|
+
}, Ht = { class: "flex flex-col gap-2" }, Wt = { class: "flex flex-col gap-2" }, Yt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Kt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Qt = {
|
|
700
714
|
key: 0,
|
|
701
715
|
class: "flex-1 flex flex-col items-center justify-center text-slate-400"
|
|
702
|
-
},
|
|
716
|
+
}, Xt = {
|
|
703
717
|
key: 1,
|
|
704
718
|
class: "space-y-3"
|
|
705
|
-
},
|
|
719
|
+
}, Zt = ["onClick"], _t = { class: "font-bold text-slate-800 mb-2" }, eo = { class: "text-sm text-slate-600 line-clamp-2" }, to = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, oo = {
|
|
706
720
|
key: 0,
|
|
707
721
|
class: "flex-1 flex flex-col items-center justify-center text-slate-400"
|
|
708
|
-
},
|
|
722
|
+
}, lo = {
|
|
709
723
|
key: 1,
|
|
710
724
|
class: "space-y-3"
|
|
711
|
-
},
|
|
725
|
+
}, no = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, ao = ["onUpdate:modelValue"], ro = ["value"], so = {
|
|
712
726
|
key: 0,
|
|
713
727
|
class: "mt-3 p-3 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-lg border border-emerald-200"
|
|
714
|
-
},
|
|
728
|
+
}, io = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, uo = /* @__PURE__ */ H({
|
|
715
729
|
__name: "FeedComponent",
|
|
716
730
|
props: {
|
|
717
731
|
object: {
|
|
@@ -732,9 +746,9 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
732
746
|
}
|
|
733
747
|
},
|
|
734
748
|
setup(e) {
|
|
735
|
-
const o = e, g = S(null), x = S(null), f = S(!1), u = S(1),
|
|
749
|
+
const o = e, g = S(null), x = S(null), f = S(!1), u = S(1), a = S("horizontal"), b = S({}), C = S(null), I = (w) => {
|
|
736
750
|
g.value = w;
|
|
737
|
-
},
|
|
751
|
+
}, r = (w) => {
|
|
738
752
|
x.value = w;
|
|
739
753
|
}, l = () => {
|
|
740
754
|
const w = o.object.fields.filter((d) => d.mappedTo).map((d) => {
|
|
@@ -749,36 +763,36 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
749
763
|
...b.value,
|
|
750
764
|
dynamicUpdate: f.value,
|
|
751
765
|
elementCount: u.value,
|
|
752
|
-
orientation:
|
|
766
|
+
orientation: a.value,
|
|
753
767
|
mapping: w.map(({ fieldName: d, mappedTo: c }) => ({ fieldName: d, mappedTo: c }))
|
|
754
768
|
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(w, C.value), o.toggleFeedSection();
|
|
755
769
|
}, n = (w) => {
|
|
756
770
|
b.value = w;
|
|
757
771
|
}, m = () => {
|
|
758
772
|
var w;
|
|
759
|
-
(w = o.object) != null && w.repeat_data && (C.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, u.value = o.object.repeat_data.elementCount || 1,
|
|
773
|
+
(w = o.object) != null && w.repeat_data && (C.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, u.value = o.object.repeat_data.elementCount || 1, a.value = o.object.repeat_data.orientation || "horizontal", b.value = {
|
|
760
774
|
name: o.object.repeat_data.name,
|
|
761
775
|
url: o.object.repeat_data.url
|
|
762
776
|
});
|
|
763
777
|
}, k = () => {
|
|
764
|
-
C.value = null, f.value = !1, u.value = 1,
|
|
778
|
+
C.value = null, f.value = !1, u.value = 1, a.value = "horizontal", b.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
|
|
765
779
|
}, A = () => {
|
|
766
780
|
var w;
|
|
767
781
|
C.value && (C.value = {
|
|
768
782
|
...C.value,
|
|
769
783
|
dynamicUpdate: f.value,
|
|
770
784
|
elementCount: u.value,
|
|
771
|
-
orientation:
|
|
785
|
+
orientation: a.value
|
|
772
786
|
}, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((w = C.value.mapping) == null ? void 0 : w.map((d) => ({
|
|
773
787
|
fieldName: d.fieldName,
|
|
774
788
|
mappedTo: d.mappedTo,
|
|
775
789
|
value: null
|
|
776
790
|
}))) || [], C.value));
|
|
777
791
|
};
|
|
778
|
-
return
|
|
792
|
+
return le(() => {
|
|
779
793
|
m();
|
|
780
|
-
}), (w, d) => (s(), i("div",
|
|
781
|
-
t("div",
|
|
794
|
+
}), (w, d) => (s(), i("div", Ft, [
|
|
795
|
+
t("div", jt, [
|
|
782
796
|
d[5] || (d[5] = t("h2", { class: "text-2xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
|
|
783
797
|
t("span", { class: "text-3xl" }, "🍺"),
|
|
784
798
|
T(" Configuración de Feed ")
|
|
@@ -791,10 +805,10 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
791
805
|
t("span", { class: "text-lg" }, "✕", -1)
|
|
792
806
|
])])
|
|
793
807
|
]),
|
|
794
|
-
t("div",
|
|
795
|
-
t("div",
|
|
796
|
-
t("div",
|
|
797
|
-
C.value && C.value.dynamicUpdate ? (s(), i("div",
|
|
808
|
+
t("div", It, [
|
|
809
|
+
t("div", Mt, [
|
|
810
|
+
t("div", At, [
|
|
811
|
+
C.value && C.value.dynamicUpdate ? (s(), i("div", Bt, [
|
|
798
812
|
t("div", { class: "flex justify-between items-start" }, [
|
|
799
813
|
d[8] || (d[8] = t("p", { class: "flex items-center gap-2" }, [
|
|
800
814
|
t("span", { class: "text-emerald-500" }, "✓"),
|
|
@@ -817,70 +831,70 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
817
831
|
])])
|
|
818
832
|
])
|
|
819
833
|
]),
|
|
820
|
-
t("ul",
|
|
821
|
-
t("li",
|
|
834
|
+
t("ul", Et, [
|
|
835
|
+
t("li", Tt, [
|
|
822
836
|
d[9] || (d[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
823
837
|
d[10] || (d[10] = T(" Conectar con ", -1)),
|
|
824
|
-
t("span",
|
|
838
|
+
t("span", Dt, p(C.value.name), 1)
|
|
825
839
|
]),
|
|
826
|
-
t("li",
|
|
840
|
+
t("li", Ot, [
|
|
827
841
|
d[11] || (d[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
828
842
|
d[12] || (d[12] = T(" Recuperar ", -1)),
|
|
829
|
-
t("span",
|
|
843
|
+
t("span", Rt, p(C.value.elementCount), 1),
|
|
830
844
|
d[13] || (d[13] = T(" items (", -1)),
|
|
831
|
-
t("span",
|
|
845
|
+
t("span", Nt, p(C.value.orientation), 1),
|
|
832
846
|
d[14] || (d[14] = T(")", -1))
|
|
833
847
|
]),
|
|
834
|
-
t("li",
|
|
848
|
+
t("li", Vt, [
|
|
835
849
|
d[17] || (d[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
|
|
836
850
|
t("div", null, [
|
|
837
851
|
d[16] || (d[16] = T(" Mapeo: ", -1)),
|
|
838
|
-
t("div",
|
|
852
|
+
t("div", Ut, [
|
|
839
853
|
(s(!0), i(B, null, V(C.value.mapping, (c, $) => (s(), i("span", {
|
|
840
854
|
key: $,
|
|
841
855
|
class: "inline-flex items-center gap-1 px-2 py-0.5 bg-white rounded-full text-xs border border-slate-200"
|
|
842
856
|
}, [
|
|
843
|
-
t("span",
|
|
857
|
+
t("span", zt, p(c.fieldName), 1),
|
|
844
858
|
d[15] || (d[15] = t("span", { class: "text-slate-400" }, "←", -1)),
|
|
845
|
-
t("span",
|
|
859
|
+
t("span", qt, p(c.mappedTo), 1)
|
|
846
860
|
]))), 128))
|
|
847
861
|
])
|
|
848
862
|
])
|
|
849
863
|
])
|
|
850
864
|
])
|
|
851
|
-
])) :
|
|
852
|
-
t("div",
|
|
853
|
-
t("label",
|
|
854
|
-
|
|
865
|
+
])) : P("", !0),
|
|
866
|
+
t("div", Lt, [
|
|
867
|
+
t("label", Gt, [
|
|
868
|
+
R(t("input", {
|
|
855
869
|
type: "checkbox",
|
|
856
870
|
"onUpdate:modelValue": d[1] || (d[1] = (c) => f.value = c),
|
|
857
871
|
class: "w-5 h-5 text-emerald-500 border-2 border-slate-300 rounded focus:ring-emerald-500 cursor-pointer"
|
|
858
872
|
}, null, 512), [
|
|
859
|
-
[
|
|
873
|
+
[te, f.value]
|
|
860
874
|
]),
|
|
861
875
|
d[18] || (d[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))
|
|
862
876
|
]),
|
|
863
|
-
f.value ? (s(), i("div",
|
|
864
|
-
t("div",
|
|
877
|
+
f.value ? (s(), i("div", Jt, [
|
|
878
|
+
t("div", Ht, [
|
|
865
879
|
d[19] || (d[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
|
|
866
|
-
|
|
880
|
+
R(t("input", {
|
|
867
881
|
type: "number",
|
|
868
882
|
"onUpdate:modelValue": d[2] || (d[2] = (c) => u.value = c),
|
|
869
883
|
min: "1",
|
|
870
884
|
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"
|
|
871
885
|
}, null, 512), [
|
|
872
886
|
[
|
|
873
|
-
|
|
887
|
+
Y,
|
|
874
888
|
u.value,
|
|
875
889
|
void 0,
|
|
876
890
|
{ number: !0 }
|
|
877
891
|
]
|
|
878
892
|
])
|
|
879
893
|
]),
|
|
880
|
-
t("div",
|
|
894
|
+
t("div", Wt, [
|
|
881
895
|
d[21] || (d[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
|
|
882
|
-
|
|
883
|
-
"onUpdate:modelValue": d[3] || (d[3] = (c) =>
|
|
896
|
+
R(t("select", {
|
|
897
|
+
"onUpdate:modelValue": d[3] || (d[3] = (c) => a.value = c),
|
|
884
898
|
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"
|
|
885
899
|
}, [...d[20] || (d[20] = [
|
|
886
900
|
t("option", {
|
|
@@ -889,59 +903,59 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
889
903
|
}, "Horizontal", -1),
|
|
890
904
|
t("option", { value: "vertical" }, "Vertical", -1)
|
|
891
905
|
])], 512), [
|
|
892
|
-
[J,
|
|
906
|
+
[J, a.value]
|
|
893
907
|
])
|
|
894
908
|
])
|
|
895
|
-
])) :
|
|
909
|
+
])) : P("", !0)
|
|
896
910
|
])
|
|
897
911
|
]),
|
|
898
|
-
t("div",
|
|
912
|
+
t("div", Yt, [
|
|
899
913
|
d[22] || (d[22] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
900
914
|
t("span", { class: "text-xl" }, "🔍"),
|
|
901
915
|
T(" Orígenes y Filtros ")
|
|
902
916
|
], -1)),
|
|
903
|
-
q(
|
|
917
|
+
q(Pt, {
|
|
904
918
|
onSubmit: I,
|
|
905
919
|
updateFeedCriteria: n,
|
|
906
920
|
isProduction: e.isProduction
|
|
907
921
|
}, null, 8, ["isProduction"])
|
|
908
922
|
])
|
|
909
923
|
]),
|
|
910
|
-
t("div",
|
|
924
|
+
t("div", Kt, [
|
|
911
925
|
d[24] || (d[24] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
912
926
|
t("span", { class: "text-xl" }, "📰"),
|
|
913
927
|
T(" Noticias ")
|
|
914
928
|
], -1)),
|
|
915
|
-
!g.value || g.value.length === 0 ? (s(), i("div",
|
|
929
|
+
!g.value || g.value.length === 0 ? (s(), i("div", Qt, [...d[23] || (d[23] = [
|
|
916
930
|
t("span", { class: "text-5xl mb-3 opacity-50" }, "📭", -1),
|
|
917
931
|
t("p", { class: "text-sm font-medium" }, "No hay noticias disponibles", -1),
|
|
918
932
|
t("p", { class: "text-xs mt-1 text-slate-300" }, "Selecciona un origen para cargar noticias", -1)
|
|
919
|
-
])])) : (s(), i("ul",
|
|
933
|
+
])])) : (s(), i("ul", Xt, [
|
|
920
934
|
(s(!0), i(B, null, V(g.value, (c, $) => (s(), i("li", {
|
|
921
935
|
key: $,
|
|
922
936
|
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",
|
|
923
|
-
onClick: (j) =>
|
|
937
|
+
onClick: (j) => r(c)
|
|
924
938
|
}, [
|
|
925
|
-
t("h4",
|
|
926
|
-
t("p",
|
|
927
|
-
], 8,
|
|
939
|
+
t("h4", _t, p(c.title || c.titulo || "Sin título"), 1),
|
|
940
|
+
t("p", eo, p(c.description || c.descripcion || c.content || "Sin descripción"), 1)
|
|
941
|
+
], 8, Zt))), 128))
|
|
928
942
|
]))
|
|
929
943
|
]),
|
|
930
|
-
t("div",
|
|
944
|
+
t("div", to, [
|
|
931
945
|
d[30] || (d[30] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
|
|
932
946
|
t("span", { class: "text-xl" }, "🔗"),
|
|
933
947
|
T(" Relacionar Noticia ")
|
|
934
948
|
], -1)),
|
|
935
|
-
x.value ? (s(), i("div",
|
|
949
|
+
x.value ? (s(), i("div", lo, [
|
|
936
950
|
(s(!0), i(B, null, V(e.object.fields, (c, $) => (s(), i("div", {
|
|
937
951
|
key: $,
|
|
938
952
|
class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
|
|
939
953
|
}, [
|
|
940
|
-
t("label",
|
|
954
|
+
t("label", no, [
|
|
941
955
|
d[26] || (d[26] = t("span", { class: "text-base" }, "⚙️", -1)),
|
|
942
|
-
T(" " +
|
|
956
|
+
T(" " + p(c.name), 1)
|
|
943
957
|
]),
|
|
944
|
-
|
|
958
|
+
R(t("select", {
|
|
945
959
|
"onUpdate:modelValue": (j) => c.mappedTo = j,
|
|
946
960
|
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"
|
|
947
961
|
}, [
|
|
@@ -949,14 +963,14 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
949
963
|
(s(!0), i(B, null, V(x.value, (j, D) => (s(), i("option", {
|
|
950
964
|
key: D,
|
|
951
965
|
value: D
|
|
952
|
-
},
|
|
953
|
-
], 8,
|
|
966
|
+
}, p(D), 9, ro))), 128))
|
|
967
|
+
], 8, ao), [
|
|
954
968
|
[J, c.mappedTo]
|
|
955
969
|
]),
|
|
956
|
-
c.mappedTo ? (s(), i("div",
|
|
970
|
+
c.mappedTo ? (s(), i("div", so, [
|
|
957
971
|
d[28] || (d[28] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
|
|
958
|
-
t("p",
|
|
959
|
-
])) :
|
|
972
|
+
t("p", io, p(x.value[c.mappedTo]), 1)
|
|
973
|
+
])) : P("", !0)
|
|
960
974
|
]))), 128)),
|
|
961
975
|
t("button", {
|
|
962
976
|
onClick: l,
|
|
@@ -965,7 +979,7 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
965
979
|
t("span", { class: "text-lg" }, "✓", -1),
|
|
966
980
|
t("span", null, "Alimentar el componente", -1)
|
|
967
981
|
])])
|
|
968
|
-
])) : (s(), i("div",
|
|
982
|
+
])) : (s(), i("div", oo, [...d[25] || (d[25] = [
|
|
969
983
|
t("span", { class: "text-5xl mb-3 opacity-50" }, "👆", -1),
|
|
970
984
|
t("p", { class: "text-sm font-medium text-center" }, [
|
|
971
985
|
T("Selecciona una noticia"),
|
|
@@ -977,29 +991,29 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
977
991
|
])
|
|
978
992
|
]));
|
|
979
993
|
}
|
|
980
|
-
}),
|
|
994
|
+
}), co = { 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" }, mo = { class: "w-full text-right flex justify-between items-center mt-1" }, bo = { class: "flex gap-3 items-center" }, go = { 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" }, fo = {
|
|
981
995
|
key: 0,
|
|
982
996
|
class: "flex-1 flex justify-center"
|
|
983
|
-
},
|
|
997
|
+
}, po = { class: "flex justify-end items-center gap-3" }, vo = { 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" }, xo = {
|
|
984
998
|
key: 0,
|
|
985
999
|
class: "flex gap-1 bg-slate-50 rounded-lg p-1"
|
|
986
|
-
},
|
|
1000
|
+
}, ho = {
|
|
987
1001
|
key: 0,
|
|
988
1002
|
class: "text-[10px] bg-amber-100 text-amber-700 px-1.5 rounded-full font-medium"
|
|
989
|
-
},
|
|
1003
|
+
}, wo = { class: "mt-2 flex items-center" }, yo = { class: "font-medium text-slate-700" }, Co = { key: 0 }, $o = { key: 1 }, ko = {
|
|
990
1004
|
key: 0,
|
|
991
1005
|
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"
|
|
992
|
-
},
|
|
1006
|
+
}, So = { class: "mt-3 flex gap-1.5 flex-wrap" }, Po = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, Fo = { class: "flex justify-center h-full items-center p-4 gap-3" }, jo = {
|
|
993
1007
|
key: 0,
|
|
994
1008
|
title: "Mover componente",
|
|
995
1009
|
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"
|
|
996
|
-
},
|
|
1010
|
+
}, Io = {
|
|
997
1011
|
key: 1,
|
|
998
1012
|
class: "flex-1 flex justify-center items-center"
|
|
999
|
-
},
|
|
1013
|
+
}, Mo = { class: "flex flex-col items-center" }, Ao = {
|
|
1000
1014
|
key: 0,
|
|
1001
1015
|
class: "text-[10px] mt-0.5 opacity-70"
|
|
1002
|
-
},
|
|
1016
|
+
}, Bo = ["id"], ce = /* @__PURE__ */ H({
|
|
1003
1017
|
__name: "InitialComponent",
|
|
1004
1018
|
props: {
|
|
1005
1019
|
object: {
|
|
@@ -1023,7 +1037,7 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1023
1037
|
}
|
|
1024
1038
|
},
|
|
1025
1039
|
setup(e) {
|
|
1026
|
-
const o = e, g = Math.random().toString(36).substring(2, 15), x = S(!1), f = S(!1), u = S(null),
|
|
1040
|
+
const o = e, g = Math.random().toString(36).substring(2, 15), x = S(!1), f = S(!1), u = S(null), a = S(null), b = S(!1), C = S(!1);
|
|
1027
1041
|
ee(() => o.isComponentMode, (d) => {
|
|
1028
1042
|
d || I();
|
|
1029
1043
|
}), ee(() => o.object, () => {
|
|
@@ -1035,14 +1049,14 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1035
1049
|
u.value && clearTimeout(u.value), u.value = setTimeout(() => {
|
|
1036
1050
|
w();
|
|
1037
1051
|
}, 500);
|
|
1038
|
-
},
|
|
1052
|
+
}, r = () => {
|
|
1039
1053
|
if (o.isComponentMode) return;
|
|
1040
1054
|
const d = new IntersectionObserver((c) => {
|
|
1041
1055
|
c.forEach(($) => {
|
|
1042
1056
|
$.isIntersecting && !b.value && (b.value = !0, d.disconnect());
|
|
1043
1057
|
});
|
|
1044
1058
|
}, { threshold: 0.1 });
|
|
1045
|
-
|
|
1059
|
+
a.value && d.observe(a.value);
|
|
1046
1060
|
}, l = (d, c) => {
|
|
1047
1061
|
const $ = (o.object.fields || []).find((j) => j.name === d);
|
|
1048
1062
|
$ && ($.example_value = c);
|
|
@@ -1062,9 +1076,9 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1062
1076
|
return;
|
|
1063
1077
|
}
|
|
1064
1078
|
c.document.body.innerHTML = d, c.document.querySelectorAll("script").forEach((j) => {
|
|
1065
|
-
var
|
|
1079
|
+
var N;
|
|
1066
1080
|
const D = c.document.createElement("script");
|
|
1067
|
-
j.src ? D.src = j.src : D.textContent = j.textContent, (
|
|
1081
|
+
j.src ? D.src = j.src : D.textContent = j.textContent, (N = j.parentNode) == null || N.replaceChild(D, j);
|
|
1068
1082
|
}), c.document.close();
|
|
1069
1083
|
});
|
|
1070
1084
|
}, w = (d = !1) => {
|
|
@@ -1073,8 +1087,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1073
1087
|
const D = '<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>';
|
|
1074
1088
|
if (d)
|
|
1075
1089
|
return Promise.resolve(D);
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
1090
|
+
const N = document.getElementById(g);
|
|
1091
|
+
return N && (N.innerHTML = D), Promise.resolve("");
|
|
1078
1092
|
}
|
|
1079
1093
|
const c = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", $ = JSON.stringify({ obj: o.object }, null, 2);
|
|
1080
1094
|
return fetch(c, {
|
|
@@ -1084,29 +1098,29 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1084
1098
|
}).then((D) => D.text()).then((D) => {
|
|
1085
1099
|
if (d)
|
|
1086
1100
|
return D;
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1101
|
+
const N = document.getElementById(g);
|
|
1102
|
+
return N && (N.innerHTML = D), "";
|
|
1089
1103
|
});
|
|
1090
1104
|
};
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1105
|
+
return le(() => {
|
|
1106
|
+
r();
|
|
1093
1107
|
}), (d, c) => (s(), i("div", null, [
|
|
1094
|
-
C.value ? (s(), ie(
|
|
1108
|
+
C.value ? (s(), ie(uo, {
|
|
1095
1109
|
key: 0,
|
|
1096
1110
|
updateObjectByFeedContent: n,
|
|
1097
1111
|
toggleFeedSection: k,
|
|
1098
1112
|
object: e.object,
|
|
1099
1113
|
isProduction: e.isProduction
|
|
1100
|
-
}, null, 8, ["object", "isProduction"])) :
|
|
1114
|
+
}, null, 8, ["object", "isProduction"])) : P("", !0),
|
|
1101
1115
|
t("div", {
|
|
1102
1116
|
ref_key: "rootElement",
|
|
1103
|
-
ref:
|
|
1117
|
+
ref: a,
|
|
1104
1118
|
class: L(["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 }])
|
|
1105
1119
|
}, [
|
|
1106
1120
|
e.isComponentMode ? (s(), i(B, { key: 0 }, [
|
|
1107
|
-
t("span",
|
|
1108
|
-
t("div",
|
|
1109
|
-
t("div",
|
|
1121
|
+
t("span", co, p(e.object.component_name), 1),
|
|
1122
|
+
t("div", mo, [
|
|
1123
|
+
t("div", bo, [
|
|
1110
1124
|
c[8] || (c[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
|
|
1111
1125
|
t("svg", {
|
|
1112
1126
|
class: "w-5 h-5",
|
|
@@ -1116,9 +1130,9 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1116
1130
|
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" })
|
|
1117
1131
|
])
|
|
1118
1132
|
], -1)),
|
|
1119
|
-
t("span",
|
|
1133
|
+
t("span", go, p(e.object.category), 1)
|
|
1120
1134
|
]),
|
|
1121
|
-
e.fullwidthMode ? (s(), i("div",
|
|
1135
|
+
e.fullwidthMode ? (s(), i("div", fo, [
|
|
1122
1136
|
t("div", {
|
|
1123
1137
|
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",
|
|
1124
1138
|
onClick: c[0] || (c[0] = ($) => {
|
|
@@ -1126,10 +1140,10 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1126
1140
|
return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
|
|
1127
1141
|
})
|
|
1128
1142
|
}, "Seleccionar")
|
|
1129
|
-
])) :
|
|
1130
|
-
t("div",
|
|
1131
|
-
t("span",
|
|
1132
|
-
e.insideComponentBox ?
|
|
1143
|
+
])) : P("", !0),
|
|
1144
|
+
t("div", po, [
|
|
1145
|
+
t("span", vo, p(e.object.framework), 1),
|
|
1146
|
+
e.insideComponentBox ? P("", !0) : (s(), i("div", xo, [
|
|
1133
1147
|
t("div", {
|
|
1134
1148
|
title: "Previsualizar Dummy",
|
|
1135
1149
|
onClick: c[1] || (c[1] = ($) => A()),
|
|
@@ -1146,42 +1160,42 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1146
1160
|
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"
|
|
1147
1161
|
}, [
|
|
1148
1162
|
c[9] || (c[9] = T("⚡ ", -1)),
|
|
1149
|
-
e.object.repeat_data ? (s(), i("span",
|
|
1163
|
+
e.object.repeat_data ? (s(), i("span", ho, p(e.object.repeat_data.elementCount), 1)) : P("", !0)
|
|
1150
1164
|
]),
|
|
1151
1165
|
e.removeComponent ? (s(), i("div", {
|
|
1152
1166
|
key: 0,
|
|
1153
1167
|
title: "Eliminar componente",
|
|
1154
1168
|
onClick: c[3] || (c[3] = ($) => e.removeComponent(e.object, e.section || "")),
|
|
1155
1169
|
class: "p-1.5 rounded-md hover:bg-red-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
|
|
1156
|
-
}, "🗑️")) :
|
|
1170
|
+
}, "🗑️")) : P("", !0)
|
|
1157
1171
|
]))
|
|
1158
1172
|
])
|
|
1159
1173
|
]),
|
|
1160
|
-
q(
|
|
1174
|
+
q(re, {
|
|
1161
1175
|
toggleShowForm: m,
|
|
1162
1176
|
object: e.object,
|
|
1163
1177
|
showForm: f.value
|
|
1164
1178
|
}, null, 8, ["object", "showForm"]),
|
|
1165
|
-
t("div",
|
|
1166
|
-
t("span",
|
|
1179
|
+
t("div", wo, [
|
|
1180
|
+
t("span", yo, p(e.object.name), 1),
|
|
1167
1181
|
t("button", {
|
|
1168
1182
|
onClick: c[4] || (c[4] = ($) => x.value = !x.value),
|
|
1169
1183
|
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"
|
|
1170
1184
|
}, [
|
|
1171
|
-
x.value ? (s(), i("span",
|
|
1185
|
+
x.value ? (s(), i("span", $o, "▲")) : (s(), i("span", Co, "▼"))
|
|
1172
1186
|
])
|
|
1173
1187
|
]),
|
|
1174
|
-
x.value ? (s(), i("div",
|
|
1175
|
-
t("div",
|
|
1188
|
+
x.value ? (s(), i("div", ko, p(e.object.description), 1)) : P("", !0),
|
|
1189
|
+
t("div", So, [
|
|
1176
1190
|
(s(!0), i(B, null, V(e.object.tags, ($, j) => (s(), i("span", {
|
|
1177
1191
|
key: j,
|
|
1178
1192
|
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"
|
|
1179
|
-
},
|
|
1193
|
+
}, p($), 1))), 128))
|
|
1180
1194
|
])
|
|
1181
1195
|
], 64)) : b.value ? (s(), i(B, { key: 1 }, [
|
|
1182
|
-
t("div",
|
|
1183
|
-
t("div",
|
|
1184
|
-
e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (s(), i("div",
|
|
1196
|
+
t("div", Po, [
|
|
1197
|
+
t("div", Fo, [
|
|
1198
|
+
e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (s(), i("div", jo, [...c[10] || (c[10] = [
|
|
1185
1199
|
t("div", { class: "flex flex-col items-center" }, [
|
|
1186
1200
|
t("svg", {
|
|
1187
1201
|
class: "w-6 h-6 mb-1 text-slate-400 group-hover/btn:text-white",
|
|
@@ -1192,8 +1206,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1192
1206
|
]),
|
|
1193
1207
|
t("span", { class: "text-xs font-medium" }, "Mover")
|
|
1194
1208
|
], -1)
|
|
1195
|
-
])])) :
|
|
1196
|
-
e.insideComponentBox && e.fullwidthMode ? (s(), i("div",
|
|
1209
|
+
])])) : P("", !0),
|
|
1210
|
+
e.insideComponentBox && e.fullwidthMode ? (s(), i("div", Io, [
|
|
1197
1211
|
t("div", {
|
|
1198
1212
|
title: "Agregar componente a la columna",
|
|
1199
1213
|
onClick: c[5] || (c[5] = ($) => {
|
|
@@ -1207,8 +1221,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1207
1221
|
t("span", { class: "text-sm font-medium" }, "Seleccionar")
|
|
1208
1222
|
], -1)
|
|
1209
1223
|
])])
|
|
1210
|
-
])) :
|
|
1211
|
-
e.insideComponentBox ?
|
|
1224
|
+
])) : P("", !0),
|
|
1225
|
+
e.insideComponentBox ? P("", !0) : (s(), i(B, { key: 2 }, [
|
|
1212
1226
|
t("div", {
|
|
1213
1227
|
title: "Configurar componente",
|
|
1214
1228
|
onClick: c[6] || (c[6] = ($) => f.value = !f.value),
|
|
@@ -1224,10 +1238,10 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1224
1238
|
onClick: k,
|
|
1225
1239
|
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"
|
|
1226
1240
|
}, [
|
|
1227
|
-
t("div",
|
|
1241
|
+
t("div", Mo, [
|
|
1228
1242
|
c[13] || (c[13] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
|
|
1229
1243
|
c[14] || (c[14] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
|
|
1230
|
-
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (s(), i("span",
|
|
1244
|
+
e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (s(), i("span", Ao, "Carga " + p(e.object.repeat_data.elementCount) + " elementos", 1)) : P("", !0)
|
|
1231
1245
|
])
|
|
1232
1246
|
]),
|
|
1233
1247
|
e.removeComponent ? (s(), i("div", {
|
|
@@ -1240,11 +1254,11 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1240
1254
|
t("span", { class: "text-xl mb-1" }, "🗑️"),
|
|
1241
1255
|
t("span", { class: "text-xs font-medium" }, "Eliminar")
|
|
1242
1256
|
], -1)
|
|
1243
|
-
])])) :
|
|
1257
|
+
])])) : P("", !0)
|
|
1244
1258
|
], 64))
|
|
1245
1259
|
])
|
|
1246
1260
|
]),
|
|
1247
|
-
q(
|
|
1261
|
+
q(re, {
|
|
1248
1262
|
toggleShowForm: m,
|
|
1249
1263
|
object: e.object,
|
|
1250
1264
|
showForm: f.value
|
|
@@ -1252,24 +1266,24 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1252
1266
|
t("div", {
|
|
1253
1267
|
id: G(g),
|
|
1254
1268
|
class: "w-full h-full flex items-center justify-center"
|
|
1255
|
-
}, null, 8,
|
|
1256
|
-
], 64)) :
|
|
1269
|
+
}, null, 8, Bo)
|
|
1270
|
+
], 64)) : P("", !0)
|
|
1257
1271
|
], 2)
|
|
1258
1272
|
]));
|
|
1259
1273
|
}
|
|
1260
|
-
}),
|
|
1274
|
+
}), Eo = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, To = {
|
|
1261
1275
|
key: 0,
|
|
1262
1276
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1263
|
-
},
|
|
1277
|
+
}, Do = { class: "text-slate-600" }, Oo = {
|
|
1264
1278
|
key: 1,
|
|
1265
1279
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1266
|
-
},
|
|
1280
|
+
}, Ro = { class: "text-slate-600" }, No = {
|
|
1267
1281
|
key: 2,
|
|
1268
1282
|
class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
|
|
1269
|
-
},
|
|
1283
|
+
}, Vo = { class: "text-slate-600" }, Uo = {
|
|
1270
1284
|
key: 0,
|
|
1271
1285
|
class: "my-4 w-full rounded-xl bg-white border border-slate-200 p-4 z-10 hidden group-hover:block shadow-lg"
|
|
1272
|
-
},
|
|
1286
|
+
}, zo = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, qo = { class: "flex flex-col" }, Lo = ["for"], Go = ["id"], Jo = ["value"], Ho = { class: "flex flex-col" }, Wo = ["for"], Yo = ["id"], Ko = ["value"], Qo = { class: "flex flex-col" }, Xo = ["for"], Zo = ["id"], _o = ["value"], el = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, tl = { 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" }, ol = { class: "flex gap-1" }, ll = /* @__PURE__ */ H({
|
|
1273
1287
|
__name: "ColConfig",
|
|
1274
1288
|
props: {
|
|
1275
1289
|
globalPageConfiguration: Array,
|
|
@@ -1314,157 +1328,157 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1314
1328
|
{ label: "Columna (componentes unos encima de otros)", value: "flex-col" },
|
|
1315
1329
|
{ label: "Fila (componentes unos al lado de otros)", value: "flex-row" }
|
|
1316
1330
|
]
|
|
1317
|
-
}, x = S(""), f = S(""), u = S(""),
|
|
1331
|
+
}, x = S(""), f = S(""), u = S(""), a = S(!1), b = K(() => {
|
|
1318
1332
|
var l, n, m, k;
|
|
1319
1333
|
const I = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
|
|
1320
1334
|
(A) => A.section === o.section
|
|
1321
|
-
),
|
|
1322
|
-
return (
|
|
1323
|
-
}), C = (I,
|
|
1335
|
+
), r = (k = (m = (n = I == null ? void 0 : I.rows) == null ? void 0 : n[o.rowIndex]) == null ? void 0 : m.columns) == null ? void 0 : k[o.columnIndex];
|
|
1336
|
+
return (r == null ? void 0 : r.config) || {};
|
|
1337
|
+
}), C = (I, r) => {
|
|
1324
1338
|
var k;
|
|
1325
1339
|
const l = x.value || g.width[0].value, n = f.value || g.gap[0].value, m = u.value || "";
|
|
1326
|
-
(k = o.updateColConfig) == null || k.call(o, I,
|
|
1340
|
+
(k = o.updateColConfig) == null || k.call(o, I, r, o.section || "", l, n, m), a.value = !1;
|
|
1327
1341
|
};
|
|
1328
|
-
return (I,
|
|
1329
|
-
t("div",
|
|
1330
|
-
b.value.width !== void 0 ? (s(), i("span",
|
|
1331
|
-
|
|
1332
|
-
t("span",
|
|
1333
|
-
])) :
|
|
1334
|
-
b.value.gap !== void 0 ? (s(), i("span",
|
|
1335
|
-
|
|
1336
|
-
t("span",
|
|
1337
|
-
])) :
|
|
1338
|
-
b.value.flexDirection !== void 0 ? (s(), i("span",
|
|
1339
|
-
|
|
1340
|
-
t("span",
|
|
1341
|
-
])) :
|
|
1342
|
+
return (I, r) => (s(), i(B, null, [
|
|
1343
|
+
t("div", Eo, [
|
|
1344
|
+
b.value.width !== void 0 ? (s(), i("span", To, [
|
|
1345
|
+
r[12] || (r[12] = T(" Ancho: ", -1)),
|
|
1346
|
+
t("span", Do, p(b.value.width), 1)
|
|
1347
|
+
])) : P("", !0),
|
|
1348
|
+
b.value.gap !== void 0 ? (s(), i("span", Oo, [
|
|
1349
|
+
r[13] || (r[13] = T(" Gap: ", -1)),
|
|
1350
|
+
t("span", Ro, p(b.value.gap), 1)
|
|
1351
|
+
])) : P("", !0),
|
|
1352
|
+
b.value.flexDirection !== void 0 ? (s(), i("span", No, [
|
|
1353
|
+
r[14] || (r[14] = T(" Flex: ", -1)),
|
|
1354
|
+
t("span", Vo, p(b.value.flexDirection), 1)
|
|
1355
|
+
])) : P("", !0)
|
|
1342
1356
|
]),
|
|
1343
|
-
|
|
1344
|
-
t("div",
|
|
1357
|
+
a.value ? (s(), i("div", Uo, [
|
|
1358
|
+
t("div", zo, [
|
|
1345
1359
|
t("form", {
|
|
1346
|
-
onSubmit:
|
|
1360
|
+
onSubmit: r[4] || (r[4] = oe(() => {
|
|
1347
1361
|
}, ["prevent"])),
|
|
1348
1362
|
class: "flex gap-5 w-full justify-center items-end flex-wrap"
|
|
1349
1363
|
}, [
|
|
1350
|
-
t("div",
|
|
1364
|
+
t("div", qo, [
|
|
1351
1365
|
t("label", {
|
|
1352
1366
|
for: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1353
1367
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1354
|
-
}, "Ancho:", 8,
|
|
1355
|
-
|
|
1356
|
-
"onUpdate:modelValue":
|
|
1368
|
+
}, "Ancho:", 8, Lo),
|
|
1369
|
+
R(t("select", {
|
|
1370
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => x.value = l),
|
|
1357
1371
|
id: `colwidth-${e.rowIndex}-${e.columnIndex}`,
|
|
1358
1372
|
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"
|
|
1359
1373
|
}, [
|
|
1360
|
-
|
|
1374
|
+
r[15] || (r[15] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1361
1375
|
(s(!0), i(B, null, V(g.width, (l) => (s(), i("option", {
|
|
1362
1376
|
key: l.value,
|
|
1363
1377
|
value: l.value
|
|
1364
|
-
},
|
|
1365
|
-
], 8,
|
|
1378
|
+
}, p(l.label), 9, Jo))), 128))
|
|
1379
|
+
], 8, Go), [
|
|
1366
1380
|
[J, x.value]
|
|
1367
1381
|
])
|
|
1368
1382
|
]),
|
|
1369
|
-
t("div",
|
|
1383
|
+
t("div", Ho, [
|
|
1370
1384
|
t("label", {
|
|
1371
1385
|
for: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1372
1386
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1373
|
-
}, "Gap:", 8,
|
|
1374
|
-
|
|
1375
|
-
"onUpdate:modelValue":
|
|
1387
|
+
}, "Gap:", 8, Wo),
|
|
1388
|
+
R(t("select", {
|
|
1389
|
+
"onUpdate:modelValue": r[1] || (r[1] = (l) => f.value = l),
|
|
1376
1390
|
id: `colgap-${e.rowIndex}-${e.columnIndex}`,
|
|
1377
1391
|
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"
|
|
1378
1392
|
}, [
|
|
1379
|
-
|
|
1393
|
+
r[16] || (r[16] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1380
1394
|
(s(!0), i(B, null, V(g.gap, (l) => (s(), i("option", {
|
|
1381
1395
|
key: l.value,
|
|
1382
1396
|
value: l.value
|
|
1383
|
-
},
|
|
1384
|
-
], 8,
|
|
1397
|
+
}, p(l.label), 9, Ko))), 128))
|
|
1398
|
+
], 8, Yo), [
|
|
1385
1399
|
[J, f.value]
|
|
1386
1400
|
])
|
|
1387
1401
|
]),
|
|
1388
|
-
t("div",
|
|
1402
|
+
t("div", Qo, [
|
|
1389
1403
|
t("label", {
|
|
1390
1404
|
for: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1391
1405
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1392
|
-
}, "Dirección:", 8,
|
|
1393
|
-
|
|
1394
|
-
"onUpdate:modelValue":
|
|
1406
|
+
}, "Dirección:", 8, Xo),
|
|
1407
|
+
R(t("select", {
|
|
1408
|
+
"onUpdate:modelValue": r[2] || (r[2] = (l) => u.value = l),
|
|
1395
1409
|
id: `flexdir-${e.rowIndex}-${e.columnIndex}`,
|
|
1396
1410
|
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"
|
|
1397
1411
|
}, [
|
|
1398
|
-
|
|
1412
|
+
r[17] || (r[17] = t("option", { value: "" }, "Selecciona...", -1)),
|
|
1399
1413
|
(s(!0), i(B, null, V(g.flexDirection, (l) => (s(), i("option", {
|
|
1400
1414
|
key: l.value,
|
|
1401
1415
|
value: l.value
|
|
1402
|
-
},
|
|
1403
|
-
], 8,
|
|
1416
|
+
}, p(l.label), 9, _o))), 128))
|
|
1417
|
+
], 8, Zo), [
|
|
1404
1418
|
[J, u.value]
|
|
1405
1419
|
])
|
|
1406
1420
|
]),
|
|
1407
1421
|
t("button", {
|
|
1408
1422
|
type: "submit",
|
|
1409
1423
|
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",
|
|
1410
|
-
onClick:
|
|
1411
|
-
C(e.rowIndex, e.columnIndex),
|
|
1424
|
+
onClick: r[3] || (r[3] = (l) => {
|
|
1425
|
+
C(e.rowIndex, e.columnIndex), a.value = !1;
|
|
1412
1426
|
})
|
|
1413
1427
|
}, " Guardar ")
|
|
1414
1428
|
], 32)
|
|
1415
1429
|
])
|
|
1416
|
-
])) :
|
|
1417
|
-
t("div",
|
|
1430
|
+
])) : P("", !0),
|
|
1431
|
+
t("div", el, [
|
|
1418
1432
|
t("div", {
|
|
1419
1433
|
class: L(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
|
|
1420
1434
|
}, [
|
|
1421
1435
|
e.section && e.section !== "Sidebar" ? (s(), i("button", {
|
|
1422
1436
|
key: 0,
|
|
1423
1437
|
title: "Añadir columna a la izquierda",
|
|
1424
|
-
onClick:
|
|
1438
|
+
onClick: r[5] || (r[5] = (l) => {
|
|
1425
1439
|
var n;
|
|
1426
1440
|
return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1427
1441
|
}),
|
|
1428
1442
|
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"
|
|
1429
|
-
}, "+")) :
|
|
1430
|
-
t("div",
|
|
1443
|
+
}, "+")) : P("", !0),
|
|
1444
|
+
t("div", tl, [
|
|
1431
1445
|
t("button", {
|
|
1432
1446
|
title: "Configurar columna",
|
|
1433
|
-
onClick:
|
|
1434
|
-
class: L(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200",
|
|
1447
|
+
onClick: r[6] || (r[6] = (l) => a.value = !a.value),
|
|
1448
|
+
class: L(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", a.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
|
|
1435
1449
|
}, "⚙️", 2),
|
|
1436
|
-
t("div",
|
|
1450
|
+
t("div", ol, [
|
|
1437
1451
|
e.section && e.section !== "Sidebar" ? (s(), i("span", {
|
|
1438
1452
|
key: 0,
|
|
1439
1453
|
title: "Mover columna a la izquierda",
|
|
1440
|
-
onClick:
|
|
1454
|
+
onClick: r[7] || (r[7] = (l) => {
|
|
1441
1455
|
var n;
|
|
1442
1456
|
return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
|
|
1443
1457
|
}),
|
|
1444
1458
|
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"
|
|
1445
|
-
}, "◁")) :
|
|
1459
|
+
}, "◁")) : P("", !0),
|
|
1446
1460
|
e.fullwidthMode ? (s(), i("span", {
|
|
1447
1461
|
key: 1,
|
|
1448
1462
|
title: "Añadir componente",
|
|
1449
|
-
onClick:
|
|
1463
|
+
onClick: r[8] || (r[8] = (l) => {
|
|
1450
1464
|
var n;
|
|
1451
1465
|
return (n = e.addComponentFunction) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1452
1466
|
}),
|
|
1453
1467
|
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"
|
|
1454
|
-
}, " 📦 ")) :
|
|
1468
|
+
}, " 📦 ")) : P("", !0),
|
|
1455
1469
|
e.section && e.section !== "Sidebar" ? (s(), i("span", {
|
|
1456
1470
|
key: 2,
|
|
1457
1471
|
title: "Mover columna a la derecha",
|
|
1458
|
-
onClick:
|
|
1472
|
+
onClick: r[9] || (r[9] = (l) => {
|
|
1459
1473
|
var n;
|
|
1460
1474
|
return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1461
1475
|
}),
|
|
1462
1476
|
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"
|
|
1463
|
-
}, "▷ ")) :
|
|
1477
|
+
}, "▷ ")) : P("", !0)
|
|
1464
1478
|
]),
|
|
1465
1479
|
t("button", {
|
|
1466
1480
|
title: "Eliminar columna",
|
|
1467
|
-
onClick:
|
|
1481
|
+
onClick: r[10] || (r[10] = (l) => {
|
|
1468
1482
|
var n;
|
|
1469
1483
|
return (n = e.removeCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
|
|
1470
1484
|
}),
|
|
@@ -1474,29 +1488,29 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1474
1488
|
e.section && e.section !== "Sidebar" ? (s(), i("button", {
|
|
1475
1489
|
key: 1,
|
|
1476
1490
|
title: "Añadir columna a la derecha",
|
|
1477
|
-
onClick:
|
|
1491
|
+
onClick: r[11] || (r[11] = (l) => {
|
|
1478
1492
|
var n;
|
|
1479
1493
|
return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
|
|
1480
1494
|
}),
|
|
1481
1495
|
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"
|
|
1482
|
-
}, "+")) :
|
|
1496
|
+
}, "+")) : P("", !0)
|
|
1483
1497
|
], 2)
|
|
1484
1498
|
])
|
|
1485
1499
|
], 64));
|
|
1486
1500
|
}
|
|
1487
|
-
}),
|
|
1501
|
+
}), nl = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden css-pb-row-config" }, al = { class: "flex gap-1.5" }, rl = { class: "flex gap-4 items-center" }, sl = { class: "inline-block" }, il = {
|
|
1488
1502
|
key: 0,
|
|
1489
1503
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1490
|
-
},
|
|
1504
|
+
}, dl = { class: "text-slate-600" }, ul = {
|
|
1491
1505
|
key: 1,
|
|
1492
1506
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1493
|
-
},
|
|
1507
|
+
}, cl = { class: "text-slate-600" }, ml = {
|
|
1494
1508
|
key: 2,
|
|
1495
1509
|
class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
|
|
1496
|
-
},
|
|
1510
|
+
}, bl = { class: "text-slate-600" }, gl = { class: "flex gap-1.5" }, fl = {
|
|
1497
1511
|
key: 0,
|
|
1498
1512
|
class: "z-1"
|
|
1499
|
-
},
|
|
1513
|
+
}, pl = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, vl = { class: "flex flex-col" }, xl = ["for"], hl = ["id"], wl = ["value"], yl = { class: "flex flex-col" }, Cl = ["for"], $l = ["id"], kl = ["value"], Sl = { class: "flex flex-col" }, Pl = ["for"], Fl = ["id"], jl = ["value"], Il = /* @__PURE__ */ H({
|
|
1500
1514
|
__name: "RowConfig",
|
|
1501
1515
|
props: {
|
|
1502
1516
|
rowIndex: {
|
|
@@ -1537,21 +1551,21 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1537
1551
|
{ label: "3/5", value: "3/5" },
|
|
1538
1552
|
{ label: "4/5", value: "4/5" }
|
|
1539
1553
|
]
|
|
1540
|
-
}, x = S(""), f = S(""), u = S(""),
|
|
1554
|
+
}, x = S(""), f = S(""), u = S(""), a = S(!1), b = S(!1), C = K(() => {
|
|
1541
1555
|
var l, n;
|
|
1542
|
-
const
|
|
1556
|
+
const r = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
|
|
1543
1557
|
(m) => m.section === o.section
|
|
1544
1558
|
);
|
|
1545
|
-
return (n =
|
|
1546
|
-
}), I = (
|
|
1559
|
+
return (n = r == null ? void 0 : r.rows) != null && n[o.rowIndex] ? r.rows[o.rowIndex].config || {} : {};
|
|
1560
|
+
}), I = (r) => {
|
|
1547
1561
|
var k;
|
|
1548
1562
|
const l = x.value || g.padding[0].value, n = f.value || g.gap[0].value, m = u.value || g.width[0].value;
|
|
1549
|
-
(k = o.updateRowConfig) == null || k.call(o,
|
|
1563
|
+
(k = o.updateRowConfig) == null || k.call(o, r, o.section || "", l, n, m), a.value = !1;
|
|
1550
1564
|
};
|
|
1551
|
-
return (
|
|
1552
|
-
t("div",
|
|
1565
|
+
return (r, l) => (s(), i(B, null, [
|
|
1566
|
+
t("div", nl, [
|
|
1553
1567
|
t("div", null, [
|
|
1554
|
-
t("div",
|
|
1568
|
+
t("div", al, [
|
|
1555
1569
|
t("button", {
|
|
1556
1570
|
title: "Agregar fila",
|
|
1557
1571
|
onClick: l[0] || (l[0] = (n) => {
|
|
@@ -1578,29 +1592,29 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1578
1592
|
}, "▽")
|
|
1579
1593
|
])
|
|
1580
1594
|
]),
|
|
1581
|
-
t("div",
|
|
1582
|
-
t("div",
|
|
1595
|
+
t("div", rl, [
|
|
1596
|
+
t("div", sl, [
|
|
1583
1597
|
t("button", {
|
|
1584
1598
|
title: "Configurar la fila",
|
|
1585
|
-
onClick: l[3] || (l[3] = (n) =>
|
|
1586
|
-
class: L(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md",
|
|
1599
|
+
onClick: l[3] || (l[3] = (n) => a.value = !a.value),
|
|
1600
|
+
class: L(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", a.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"])
|
|
1587
1601
|
}, "⚙️", 2)
|
|
1588
1602
|
]),
|
|
1589
|
-
C.value.padding !== void 0 ? (s(), i("span",
|
|
1603
|
+
C.value.padding !== void 0 ? (s(), i("span", il, [
|
|
1590
1604
|
l[10] || (l[10] = T(" Padding: ", -1)),
|
|
1591
|
-
t("span",
|
|
1592
|
-
])) :
|
|
1593
|
-
C.value.gap !== void 0 ? (s(), i("span",
|
|
1605
|
+
t("span", dl, p(C.value.padding), 1)
|
|
1606
|
+
])) : P("", !0),
|
|
1607
|
+
C.value.gap !== void 0 ? (s(), i("span", ul, [
|
|
1594
1608
|
l[11] || (l[11] = T(" Gap: ", -1)),
|
|
1595
|
-
t("span",
|
|
1596
|
-
])) :
|
|
1597
|
-
C.value.width !== void 0 ? (s(), i("span",
|
|
1609
|
+
t("span", cl, p(C.value.gap), 1)
|
|
1610
|
+
])) : P("", !0),
|
|
1611
|
+
C.value.width !== void 0 ? (s(), i("span", ml, [
|
|
1598
1612
|
l[12] || (l[12] = T(" Ancho: ", -1)),
|
|
1599
|
-
t("span",
|
|
1600
|
-
])) :
|
|
1613
|
+
t("span", bl, p(C.value.width), 1)
|
|
1614
|
+
])) : P("", !0)
|
|
1601
1615
|
]),
|
|
1602
1616
|
t("div", null, [
|
|
1603
|
-
t("div",
|
|
1617
|
+
t("div", gl, [
|
|
1604
1618
|
t("button", {
|
|
1605
1619
|
title: "Eliminar fila",
|
|
1606
1620
|
onClick: l[4] || (l[4] = (n) => {
|
|
@@ -1612,19 +1626,19 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1612
1626
|
])
|
|
1613
1627
|
])
|
|
1614
1628
|
]),
|
|
1615
|
-
|
|
1616
|
-
t("div",
|
|
1629
|
+
a.value ? (s(), i("div", fl, [
|
|
1630
|
+
t("div", pl, [
|
|
1617
1631
|
t("form", {
|
|
1618
|
-
onSubmit: l[9] || (l[9] =
|
|
1632
|
+
onSubmit: l[9] || (l[9] = oe(() => {
|
|
1619
1633
|
}, ["prevent"])),
|
|
1620
1634
|
class: "flex gap-6 w-full justify-center items-end flex-wrap"
|
|
1621
1635
|
}, [
|
|
1622
|
-
t("div",
|
|
1636
|
+
t("div", vl, [
|
|
1623
1637
|
t("label", {
|
|
1624
1638
|
for: `padding-${e.rowIndex}`,
|
|
1625
1639
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1626
|
-
}, "Padding:", 8,
|
|
1627
|
-
|
|
1640
|
+
}, "Padding:", 8, xl),
|
|
1641
|
+
R(t("select", {
|
|
1628
1642
|
"onUpdate:modelValue": l[5] || (l[5] = (n) => x.value = n),
|
|
1629
1643
|
id: `padding-${e.rowIndex}`,
|
|
1630
1644
|
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"
|
|
@@ -1633,17 +1647,17 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1633
1647
|
(s(!0), i(B, null, V(g.padding, (n) => (s(), i("option", {
|
|
1634
1648
|
key: n.value,
|
|
1635
1649
|
value: n.value
|
|
1636
|
-
},
|
|
1637
|
-
], 8,
|
|
1650
|
+
}, p(n.label), 9, wl))), 128))
|
|
1651
|
+
], 8, hl), [
|
|
1638
1652
|
[J, x.value]
|
|
1639
1653
|
])
|
|
1640
1654
|
]),
|
|
1641
|
-
t("div",
|
|
1655
|
+
t("div", yl, [
|
|
1642
1656
|
t("label", {
|
|
1643
1657
|
for: `gap-${e.rowIndex}`,
|
|
1644
1658
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1645
|
-
}, "Gap:", 8,
|
|
1646
|
-
|
|
1659
|
+
}, "Gap:", 8, Cl),
|
|
1660
|
+
R(t("select", {
|
|
1647
1661
|
"onUpdate:modelValue": l[6] || (l[6] = (n) => f.value = n),
|
|
1648
1662
|
id: `gap-${e.rowIndex}`,
|
|
1649
1663
|
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"
|
|
@@ -1652,17 +1666,17 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1652
1666
|
(s(!0), i(B, null, V(g.gap, (n) => (s(), i("option", {
|
|
1653
1667
|
key: n.value,
|
|
1654
1668
|
value: n.value
|
|
1655
|
-
},
|
|
1656
|
-
], 8,
|
|
1669
|
+
}, p(n.label), 9, kl))), 128))
|
|
1670
|
+
], 8, $l), [
|
|
1657
1671
|
[J, f.value]
|
|
1658
1672
|
])
|
|
1659
1673
|
]),
|
|
1660
|
-
t("div",
|
|
1674
|
+
t("div", Sl, [
|
|
1661
1675
|
t("label", {
|
|
1662
1676
|
for: `width-${e.rowIndex}`,
|
|
1663
1677
|
class: "block text-sm font-medium text-slate-600 mb-1.5"
|
|
1664
|
-
}, "Ancho:", 8,
|
|
1665
|
-
|
|
1678
|
+
}, "Ancho:", 8, Pl),
|
|
1679
|
+
R(t("select", {
|
|
1666
1680
|
"onUpdate:modelValue": l[7] || (l[7] = (n) => u.value = n),
|
|
1667
1681
|
id: `width-${e.rowIndex}`,
|
|
1668
1682
|
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"
|
|
@@ -1671,8 +1685,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1671
1685
|
(s(!0), i(B, null, V(g.width, (n) => (s(), i("option", {
|
|
1672
1686
|
key: n.value,
|
|
1673
1687
|
value: n.value
|
|
1674
|
-
},
|
|
1675
|
-
], 8,
|
|
1688
|
+
}, p(n.label), 9, jl))), 128))
|
|
1689
|
+
], 8, Fl), [
|
|
1676
1690
|
[J, u.value]
|
|
1677
1691
|
])
|
|
1678
1692
|
]),
|
|
@@ -1685,10 +1699,10 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1685
1699
|
}, " Guardar ")
|
|
1686
1700
|
], 32)
|
|
1687
1701
|
])
|
|
1688
|
-
])) :
|
|
1702
|
+
])) : P("", !0)
|
|
1689
1703
|
], 64));
|
|
1690
1704
|
}
|
|
1691
|
-
}),
|
|
1705
|
+
}), Ml = ["id"], Al = { class: "flex flex-row w-full gap-3 mt-6" }, Bl = ["id"], El = /* @__PURE__ */ H({
|
|
1692
1706
|
__name: "BodySection",
|
|
1693
1707
|
props: {
|
|
1694
1708
|
isComponentMode: Boolean,
|
|
@@ -1712,19 +1726,19 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1712
1726
|
}
|
|
1713
1727
|
},
|
|
1714
1728
|
setup(e) {
|
|
1715
|
-
const o = e, g = S(!1), x =
|
|
1729
|
+
const o = e, g = S(!1), x = K(() => {
|
|
1716
1730
|
var u;
|
|
1717
1731
|
const f = (u = o.globalPageConfiguration) == null ? void 0 : u.find(
|
|
1718
|
-
(
|
|
1732
|
+
(a) => a.section === o.sectionSelected
|
|
1719
1733
|
);
|
|
1720
1734
|
return (f == null ? void 0 : f.rows) || [];
|
|
1721
1735
|
});
|
|
1722
|
-
return (f, u) => (s(!0), i(B, null, V(x.value, (
|
|
1736
|
+
return (f, u) => (s(!0), i(B, null, V(x.value, (a, b) => (s(), i("div", {
|
|
1723
1737
|
key: "row-" + b,
|
|
1724
1738
|
id: "row-" + e.sectionSelected + "-" + b,
|
|
1725
1739
|
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"
|
|
1726
1740
|
}, [
|
|
1727
|
-
q(
|
|
1741
|
+
q(Il, {
|
|
1728
1742
|
moveRow: e.moveRow,
|
|
1729
1743
|
addRow: e.addRow,
|
|
1730
1744
|
removeRow: e.removeRow,
|
|
@@ -1733,8 +1747,8 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1733
1747
|
rowIndex: b,
|
|
1734
1748
|
section: e.sectionSelected
|
|
1735
1749
|
}, null, 8, ["moveRow", "addRow", "removeRow", "globalPageConfiguration", "updateRowConfig", "rowIndex", "section"]),
|
|
1736
|
-
t("div",
|
|
1737
|
-
(s(!0), i(B, null, V(
|
|
1750
|
+
t("div", Al, [
|
|
1751
|
+
(s(!0), i(B, null, V(a.columns, (C, I) => (s(), i("div", {
|
|
1738
1752
|
class: L([
|
|
1739
1753
|
"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",
|
|
1740
1754
|
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"
|
|
@@ -1748,13 +1762,13 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1748
1762
|
group: { name: "draggingGroup", pull: !0, put: !0 },
|
|
1749
1763
|
"item-key": "name",
|
|
1750
1764
|
handle: ".handle",
|
|
1751
|
-
onStart: u[0] || (u[0] = (
|
|
1752
|
-
onEnd: u[1] || (u[1] = (
|
|
1765
|
+
onStart: u[0] || (u[0] = (r) => g.value = !0),
|
|
1766
|
+
onEnd: u[1] || (u[1] = (r) => g.value = !1)
|
|
1753
1767
|
}, {
|
|
1754
|
-
item: de(({ element:
|
|
1768
|
+
item: de(({ element: r }) => [
|
|
1755
1769
|
q(ce, {
|
|
1756
1770
|
renderApiDomain: e.renderApiDomain,
|
|
1757
|
-
object:
|
|
1771
|
+
object: r,
|
|
1758
1772
|
"is-component-mode": e.isComponentMode,
|
|
1759
1773
|
removeComponent: e.removeComponent,
|
|
1760
1774
|
section: e.sectionSelected,
|
|
@@ -1763,7 +1777,7 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1763
1777
|
]),
|
|
1764
1778
|
_: 1
|
|
1765
1779
|
}, 8, ["list"]),
|
|
1766
|
-
q(
|
|
1780
|
+
q(ll, {
|
|
1767
1781
|
section: e.sectionSelected,
|
|
1768
1782
|
globalPageConfiguration: e.globalPageConfiguration,
|
|
1769
1783
|
updateColConfig: e.updateColConfig,
|
|
@@ -1775,14 +1789,14 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1775
1789
|
rowIndex: b,
|
|
1776
1790
|
columnIndex: I
|
|
1777
1791
|
}, null, 8, ["section", "globalPageConfiguration", "updateColConfig", "addComponentFunction", "fullwidthMode", "addCol", "removeCol", "moveCol", "rowIndex", "columnIndex"])
|
|
1778
|
-
], 10,
|
|
1792
|
+
], 10, Bl))), 128))
|
|
1779
1793
|
])
|
|
1780
|
-
], 8,
|
|
1794
|
+
], 8, Ml))), 128));
|
|
1781
1795
|
}
|
|
1782
|
-
}),
|
|
1796
|
+
}), Tl = { class: "flex justify-between items-center mb-4" }, Dl = { class: "text-xs" }, Ol = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, Rl = ["value", "checked"], Nl = { class: "my-3" }, Vl = { class: "relative" }, Ul = { 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" }, zl = {
|
|
1783
1797
|
key: 0,
|
|
1784
1798
|
class: "text-center py-8 text-slate-400"
|
|
1785
|
-
},
|
|
1799
|
+
}, se = /* @__PURE__ */ H({
|
|
1786
1800
|
__name: "ComponentsBox",
|
|
1787
1801
|
props: {
|
|
1788
1802
|
isComponentMode: Boolean,
|
|
@@ -1809,25 +1823,25 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1809
1823
|
"Formulario",
|
|
1810
1824
|
"Título",
|
|
1811
1825
|
"SEO"
|
|
1812
|
-
], g = S(!0), x = S([]), f = S(""), u = S(
|
|
1813
|
-
const I = f.value.toLowerCase(),
|
|
1814
|
-
return x.value.length > 0 ?
|
|
1826
|
+
], g = S(!0), x = S([]), f = S(""), u = S(pe()), a = K(() => {
|
|
1827
|
+
const I = f.value.toLowerCase(), r = Object.values(u.value), l = (n) => (n.name.toLowerCase() + n.description.toLowerCase() + n.tags.join(" ").toLowerCase()).includes(I);
|
|
1828
|
+
return x.value.length > 0 ? r.filter(
|
|
1815
1829
|
(n) => x.value.includes(n.category) && l(n)
|
|
1816
|
-
) :
|
|
1830
|
+
) : r.filter(l);
|
|
1817
1831
|
}), b = (I) => {
|
|
1818
1832
|
f.value = I.target.value;
|
|
1819
1833
|
}, C = (I) => {
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1834
|
+
const r = I.target, l = r.value;
|
|
1835
|
+
r.checked ? x.value.includes(l) || x.value.push(l) : x.value = x.value.filter((n) => n !== l);
|
|
1822
1836
|
};
|
|
1823
|
-
return (I,
|
|
1824
|
-
|
|
1825
|
-
t("div",
|
|
1837
|
+
return (I, r) => (s(), i(B, null, [
|
|
1838
|
+
r[6] || (r[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
|
|
1839
|
+
t("div", Tl, [
|
|
1826
1840
|
t("button", {
|
|
1827
|
-
onClick:
|
|
1841
|
+
onClick: r[0] || (r[0] = (l) => g.value = !g.value),
|
|
1828
1842
|
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"
|
|
1829
1843
|
}, [
|
|
1830
|
-
|
|
1844
|
+
r[2] || (r[2] = t("svg", {
|
|
1831
1845
|
class: "w-4 h-4",
|
|
1832
1846
|
fill: "none",
|
|
1833
1847
|
stroke: "currentColor",
|
|
@@ -1840,18 +1854,18 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1840
1854
|
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"
|
|
1841
1855
|
})
|
|
1842
1856
|
], -1)),
|
|
1843
|
-
|
|
1844
|
-
t("span",
|
|
1857
|
+
r[3] || (r[3] = t("span", null, "Filtros", -1)),
|
|
1858
|
+
t("span", Dl, p(g.value ? "▲" : "▼"), 1)
|
|
1845
1859
|
]),
|
|
1846
1860
|
t("button", {
|
|
1847
1861
|
class: L([[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"]),
|
|
1848
|
-
onClick:
|
|
1862
|
+
onClick: r[1] || (r[1] = (l) => {
|
|
1849
1863
|
var n;
|
|
1850
1864
|
return (n = e.toggleComponentModeFunction) == null ? void 0 : n.call(e);
|
|
1851
1865
|
})
|
|
1852
|
-
},
|
|
1866
|
+
}, p(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
|
|
1853
1867
|
]),
|
|
1854
|
-
|
|
1868
|
+
R(t("div", Ol, [
|
|
1855
1869
|
(s(), i(B, null, V(o, (l) => t("label", {
|
|
1856
1870
|
key: l,
|
|
1857
1871
|
class: L(["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": x.value.includes(l) }])
|
|
@@ -1862,15 +1876,15 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1862
1876
|
checked: x.value.includes(l),
|
|
1863
1877
|
onInput: C,
|
|
1864
1878
|
class: "w-4 h-4 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500"
|
|
1865
|
-
}, null, 40,
|
|
1866
|
-
T(" " +
|
|
1879
|
+
}, null, 40, Rl),
|
|
1880
|
+
T(" " + p(l), 1)
|
|
1867
1881
|
], 2)), 64))
|
|
1868
1882
|
], 512), [
|
|
1869
1883
|
[ge, g.value]
|
|
1870
1884
|
]),
|
|
1871
|
-
t("div",
|
|
1872
|
-
t("div",
|
|
1873
|
-
|
|
1885
|
+
t("div", Nl, [
|
|
1886
|
+
t("div", Vl, [
|
|
1887
|
+
r[4] || (r[4] = t("svg", {
|
|
1874
1888
|
class: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400",
|
|
1875
1889
|
fill: "none",
|
|
1876
1890
|
stroke: "currentColor",
|
|
@@ -1891,10 +1905,10 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1891
1905
|
}, null, 32)
|
|
1892
1906
|
])
|
|
1893
1907
|
]),
|
|
1894
|
-
t("div",
|
|
1908
|
+
t("div", Ul, [
|
|
1895
1909
|
q(G(ue), {
|
|
1896
1910
|
class: "w-full flex flex-col gap-4",
|
|
1897
|
-
list:
|
|
1911
|
+
list: a.value,
|
|
1898
1912
|
group: { name: "draggingGroup", pull: "clone", put: !1 },
|
|
1899
1913
|
itemKey: "name",
|
|
1900
1914
|
clone: (l) => JSON.parse(JSON.stringify(l))
|
|
@@ -1913,7 +1927,7 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1913
1927
|
]),
|
|
1914
1928
|
_: 1
|
|
1915
1929
|
}, 8, ["list", "clone"]),
|
|
1916
|
-
|
|
1930
|
+
a.value.length === 0 ? (s(), i("div", zl, [...r[5] || (r[5] = [
|
|
1917
1931
|
t("svg", {
|
|
1918
1932
|
class: "w-12 h-12 mx-auto mb-3 opacity-50",
|
|
1919
1933
|
fill: "none",
|
|
@@ -1929,23 +1943,24 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1929
1943
|
], -1),
|
|
1930
1944
|
t("p", { class: "text-sm font-medium" }, "No se encontraron componentes", -1),
|
|
1931
1945
|
t("p", { class: "text-xs mt-1" }, "Intenta con otros filtros o términos de búsqueda", -1)
|
|
1932
|
-
])])) :
|
|
1946
|
+
])])) : P("", !0)
|
|
1933
1947
|
])
|
|
1934
1948
|
], 64));
|
|
1935
1949
|
}
|
|
1936
|
-
}),
|
|
1950
|
+
}), ql = { 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" }, Ll = { class: "relative flex flex-row flex-wrap" }, Gl = { class: "w-full flex justify-end py-4 pe-4" }, Jl = { class: "w-3/4" }, Hl = {
|
|
1937
1951
|
key: 1,
|
|
1938
1952
|
class: "w-1/4 px-3 overflow-y-auto h-screen sticky top-0"
|
|
1939
|
-
},
|
|
1953
|
+
}, Xl = /* @__PURE__ */ H({
|
|
1940
1954
|
__name: "Pagebuilder",
|
|
1941
1955
|
props: {
|
|
1942
1956
|
isProduction: { type: Boolean },
|
|
1943
1957
|
inputId: {}
|
|
1944
1958
|
},
|
|
1945
1959
|
setup(e) {
|
|
1946
|
-
const o = e, g = o.isProduction ?? !1, x = o.inputId ?? null, f = g ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", u = S(!0),
|
|
1960
|
+
const o = e, g = o.isProduction ?? !1, x = o.inputId ?? null, f = g ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", u = S(!0), a = S(void 0), b = S([]), C = S({ rowIndex: null, columnIndex: null, section: null }), I = S(!1), r = S(!1), l = S({
|
|
1947
1961
|
global: {
|
|
1948
1962
|
sidebarEnabled: !1,
|
|
1963
|
+
renderAsBodyPart: !1,
|
|
1949
1964
|
headSlot: "",
|
|
1950
1965
|
bodyBeginSlot: "",
|
|
1951
1966
|
footerSlot: ""
|
|
@@ -1977,163 +1992,163 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
1977
1992
|
rows: [{ config: {}, columns: [{ config: {}, components: [] }] }]
|
|
1978
1993
|
}
|
|
1979
1994
|
]);
|
|
1980
|
-
|
|
1995
|
+
le(() => {
|
|
1981
1996
|
m();
|
|
1982
1997
|
});
|
|
1983
1998
|
const m = () => {
|
|
1984
|
-
if (b.value = ["Header", "Footer", "Body", "Sidebar"],
|
|
1999
|
+
if (b.value = ["Header", "Footer", "Body", "Sidebar"], a.value = "Body", x) {
|
|
1985
2000
|
const y = document.getElementById(x);
|
|
1986
2001
|
if (y) {
|
|
1987
2002
|
const h = y.value;
|
|
1988
2003
|
if (h)
|
|
1989
2004
|
try {
|
|
1990
|
-
const
|
|
1991
|
-
(
|
|
1992
|
-
} catch (
|
|
1993
|
-
console.error("Error parsing input value:",
|
|
2005
|
+
const v = typeof h == "string" ? JSON.parse(h) : h;
|
|
2006
|
+
(v && typeof v == "object" && !Array.isArray(v) ? Object.keys(v).length > 0 : Array.isArray(v) ? v.length > 0 : !1) && ae(h);
|
|
2007
|
+
} catch (v) {
|
|
2008
|
+
console.error("Error parsing input value:", v);
|
|
1994
2009
|
}
|
|
1995
2010
|
}
|
|
1996
2011
|
}
|
|
1997
2012
|
}, k = () => {
|
|
1998
|
-
|
|
2013
|
+
r.value = !r.value;
|
|
1999
2014
|
}, A = () => {
|
|
2000
2015
|
u.value = !u.value;
|
|
2001
|
-
}, w = (y, h,
|
|
2016
|
+
}, w = (y, h, v, F, M) => {
|
|
2002
2017
|
var O;
|
|
2003
2018
|
const E = n.find((U) => U.section === h);
|
|
2004
2019
|
(O = E == null ? void 0 : E.rows) != null && O[y] && (E.rows[y].config = {
|
|
2005
|
-
padding:
|
|
2006
|
-
gap:
|
|
2020
|
+
padding: v,
|
|
2021
|
+
gap: F,
|
|
2007
2022
|
width: M
|
|
2008
2023
|
});
|
|
2009
|
-
}, d = (y, h,
|
|
2024
|
+
}, d = (y, h, v, F, M, E) => {
|
|
2010
2025
|
var U, z, W;
|
|
2011
|
-
const O = n.find((
|
|
2026
|
+
const O = n.find((Q) => Q.section === v);
|
|
2012
2027
|
(W = (z = (U = O == null ? void 0 : O.rows) == null ? void 0 : U[y]) == null ? void 0 : z.columns) != null && W[h] && (O.rows[y].columns[h].config = {
|
|
2013
|
-
width:
|
|
2028
|
+
width: F,
|
|
2014
2029
|
gap: M,
|
|
2015
2030
|
flexDirection: E
|
|
2016
2031
|
});
|
|
2017
2032
|
}, c = async (y, h) => {
|
|
2018
|
-
const
|
|
2019
|
-
if (
|
|
2020
|
-
const
|
|
2033
|
+
const v = n.find((F) => F.section === h);
|
|
2034
|
+
if (v) {
|
|
2035
|
+
const F = {
|
|
2021
2036
|
config: {},
|
|
2022
2037
|
columns: [{ config: {}, components: [] }]
|
|
2023
2038
|
};
|
|
2024
|
-
y !== null && y >= 0 && y <
|
|
2039
|
+
y !== null && y >= 0 && y < v.rows.length ? v.rows.splice(y + 1, 0, F) : v.rows.push(F);
|
|
2025
2040
|
}
|
|
2026
|
-
await new Promise((
|
|
2041
|
+
await new Promise((F) => {
|
|
2027
2042
|
setTimeout(() => {
|
|
2028
2043
|
const M = document.getElementById(`row-${h}-${(y ?? 0) + 1}`);
|
|
2029
2044
|
M ? (M.scrollIntoView({ behavior: "smooth", block: "center" }), M.classList.add("selected-delay"), setTimeout(() => {
|
|
2030
|
-
M.classList.remove("selected-delay"),
|
|
2031
|
-
}, 3e3)) :
|
|
2045
|
+
M.classList.remove("selected-delay"), F();
|
|
2046
|
+
}, 3e3)) : F();
|
|
2032
2047
|
}, 0);
|
|
2033
2048
|
});
|
|
2034
2049
|
}, $ = (y, h) => {
|
|
2035
|
-
const
|
|
2036
|
-
!(
|
|
2037
|
-
}, j = (y, h,
|
|
2050
|
+
const v = n.find((F) => F.section === h);
|
|
2051
|
+
!(v != null && v.rows) || v.rows.length <= 1 || v.rows.splice(y, 1);
|
|
2052
|
+
}, j = (y, h, v = "down") => {
|
|
2038
2053
|
var U;
|
|
2039
|
-
const
|
|
2040
|
-
if (!((U =
|
|
2054
|
+
const F = n.find((z) => z.section === h);
|
|
2055
|
+
if (!((U = F == null ? void 0 : F.rows) != null && U[y]) || v === "up" && y === 0 || v === "down" && y === F.rows.length - 1)
|
|
2041
2056
|
return;
|
|
2042
|
-
const M =
|
|
2057
|
+
const M = F.rows, E = M.splice(y, 1)[0], O = v === "down" ? y + 1 : y - 1;
|
|
2043
2058
|
M.splice(O, 0, E);
|
|
2044
|
-
}, D = async (y, h,
|
|
2059
|
+
}, D = async (y, h, v, F = "right") => {
|
|
2045
2060
|
var O;
|
|
2046
|
-
const M =
|
|
2061
|
+
const M = F === "left" ? h : h + 1, E = n.find((U) => U.section === v);
|
|
2047
2062
|
(O = E == null ? void 0 : E.rows) != null && O[y] && E.rows[y].columns.splice(M, 0, {
|
|
2048
2063
|
config: {},
|
|
2049
2064
|
components: []
|
|
2050
2065
|
}), await new Promise((U) => {
|
|
2051
2066
|
setTimeout(() => {
|
|
2052
|
-
const z = document.getElementById(`col-${
|
|
2067
|
+
const z = document.getElementById(`col-${v}-${y}-${M}`);
|
|
2053
2068
|
z ? (z.scrollIntoView({ behavior: "smooth", block: "center" }), z.classList.add("selected-delay"), setTimeout(() => {
|
|
2054
2069
|
z.classList.remove("selected-delay"), U();
|
|
2055
2070
|
}, 3e3)) : U();
|
|
2056
2071
|
}, 0);
|
|
2057
2072
|
});
|
|
2058
|
-
},
|
|
2073
|
+
}, N = (y, h, v) => {
|
|
2059
2074
|
var E, O;
|
|
2060
|
-
const
|
|
2075
|
+
const F = n.find((U) => U.section === v), M = (O = (E = F == null ? void 0 : F.rows) == null ? void 0 : E[y]) == null ? void 0 : O.columns;
|
|
2061
2076
|
!M || M.length <= 1 || M.splice(h, 1);
|
|
2062
|
-
},
|
|
2077
|
+
}, X = (y, h, v, F = "right") => {
|
|
2063
2078
|
var z;
|
|
2064
|
-
const M = n.find((W) => W.section ===
|
|
2065
|
-
if (!((z = M == null ? void 0 : M.rows) != null && z[y]) ||
|
|
2079
|
+
const M = n.find((W) => W.section === v);
|
|
2080
|
+
if (!((z = M == null ? void 0 : M.rows) != null && z[y]) || F === "left" && h === 0 || F === "right" && h === M.rows[y].columns.length - 1)
|
|
2066
2081
|
return;
|
|
2067
|
-
const E = M.rows[y].columns, O = E.splice(h, 1)[0], U =
|
|
2082
|
+
const E = M.rows[y].columns, O = E.splice(h, 1)[0], U = F === "right" ? h + 1 : h - 1;
|
|
2068
2083
|
E.splice(U, 0, O);
|
|
2069
2084
|
}, Z = (y, h) => {
|
|
2070
|
-
var
|
|
2071
|
-
const
|
|
2072
|
-
(
|
|
2085
|
+
var F;
|
|
2086
|
+
const v = n.find((M) => M.section === h);
|
|
2087
|
+
(F = v == null ? void 0 : v.rows) == null || F.forEach((M) => {
|
|
2073
2088
|
M.columns.forEach((E) => {
|
|
2074
2089
|
const O = E.components.indexOf(y);
|
|
2075
2090
|
O !== -1 && E.components.splice(O, 1);
|
|
2076
2091
|
});
|
|
2077
2092
|
});
|
|
2078
|
-
}, _ = (y, h,
|
|
2079
|
-
I.value = !0, C.value = { rowIndex: y, columnIndex: h, section:
|
|
2080
|
-
},
|
|
2093
|
+
}, _ = (y, h, v) => {
|
|
2094
|
+
I.value = !0, C.value = { rowIndex: y, columnIndex: h, section: v };
|
|
2095
|
+
}, ne = (y) => {
|
|
2081
2096
|
var M, E, O, U;
|
|
2082
|
-
const { rowIndex: h, columnIndex:
|
|
2083
|
-
if (h !== null &&
|
|
2084
|
-
const z = JSON.parse(JSON.stringify(y)), W = n.find((me) => me.section ===
|
|
2085
|
-
|
|
2097
|
+
const { rowIndex: h, columnIndex: v, section: F } = C.value;
|
|
2098
|
+
if (h !== null && v !== null) {
|
|
2099
|
+
const z = JSON.parse(JSON.stringify(y)), W = n.find((me) => me.section === F), Q = (U = (O = (E = (M = W == null ? void 0 : W.rows) == null ? void 0 : M[h]) == null ? void 0 : E.columns) == null ? void 0 : O[v]) == null ? void 0 : U.components;
|
|
2100
|
+
Q == null || Q.push(z);
|
|
2086
2101
|
}
|
|
2087
2102
|
I.value = !1;
|
|
2088
|
-
},
|
|
2103
|
+
}, ae = (y) => {
|
|
2089
2104
|
const h = typeof y == "string" ? JSON.parse(y) : y;
|
|
2090
2105
|
n.length = 0, n.push(...h.pageConfig || []), h.paramsConfig && (l.value = { ...l.value, ...h.paramsConfig });
|
|
2091
2106
|
};
|
|
2092
|
-
return (y, h) => (s(), i("div",
|
|
2093
|
-
q(
|
|
2094
|
-
sectionSelected:
|
|
2095
|
-
"onUpdate:sectionSelected": h[0] || (h[0] = (
|
|
2107
|
+
return (y, h) => (s(), i("div", ql, [
|
|
2108
|
+
q(lt, {
|
|
2109
|
+
sectionSelected: a.value,
|
|
2110
|
+
"onUpdate:sectionSelected": h[0] || (h[0] = (v) => a.value = v),
|
|
2096
2111
|
parametersPageConfiguration: l.value,
|
|
2097
|
-
"onUpdate:parametersPageConfiguration": h[1] || (h[1] = (
|
|
2112
|
+
"onUpdate:parametersPageConfiguration": h[1] || (h[1] = (v) => l.value = v),
|
|
2098
2113
|
globalPageConfiguration: n,
|
|
2099
2114
|
availableSections: b.value,
|
|
2100
|
-
importConfigurationFunction:
|
|
2101
|
-
isComponentMode:
|
|
2115
|
+
importConfigurationFunction: ae,
|
|
2116
|
+
isComponentMode: r.value,
|
|
2102
2117
|
toggleComponentModeFunction: k,
|
|
2103
2118
|
fullwidthMode: u.value,
|
|
2104
2119
|
toggleFullwidthMode: A,
|
|
2105
2120
|
renderApiDomain: G(f),
|
|
2106
2121
|
inputId: G(x)
|
|
2107
2122
|
}, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain", "inputId"]),
|
|
2108
|
-
t("div",
|
|
2123
|
+
t("div", Ll, [
|
|
2109
2124
|
u.value ? (s(), i("div", {
|
|
2110
2125
|
key: 0,
|
|
2111
2126
|
class: L(["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", I.value ? "" : "hidden"])
|
|
2112
2127
|
}, [
|
|
2113
|
-
t("div",
|
|
2128
|
+
t("div", Gl, [
|
|
2114
2129
|
t("div", {
|
|
2115
2130
|
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",
|
|
2116
|
-
onClick: h[2] || (h[2] = (
|
|
2131
|
+
onClick: h[2] || (h[2] = (v) => I.value = !1)
|
|
2117
2132
|
}, "✕")
|
|
2118
2133
|
]),
|
|
2119
|
-
t("div",
|
|
2120
|
-
q(
|
|
2134
|
+
t("div", Jl, [
|
|
2135
|
+
q(se, {
|
|
2121
2136
|
renderApiDomain: G(f),
|
|
2122
|
-
isComponentMode:
|
|
2137
|
+
isComponentMode: r.value,
|
|
2123
2138
|
fullwidthMode: u.value,
|
|
2124
2139
|
columnToInsert: C.value,
|
|
2125
|
-
addComponentToColumn:
|
|
2140
|
+
addComponentToColumn: ne,
|
|
2126
2141
|
toggleComponentModeFunction: k,
|
|
2127
2142
|
isProduction: G(g)
|
|
2128
2143
|
}, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
|
|
2129
2144
|
])
|
|
2130
|
-
], 2)) : (s(), i("div",
|
|
2131
|
-
q(
|
|
2145
|
+
], 2)) : (s(), i("div", Hl, [
|
|
2146
|
+
q(se, {
|
|
2132
2147
|
renderApiDomain: G(f),
|
|
2133
|
-
isComponentMode:
|
|
2148
|
+
isComponentMode: r.value,
|
|
2134
2149
|
fullwidthMode: u.value,
|
|
2135
2150
|
columnToInsert: C.value,
|
|
2136
|
-
addComponentToColumn:
|
|
2151
|
+
addComponentToColumn: ne,
|
|
2137
2152
|
toggleComponentModeFunction: k,
|
|
2138
2153
|
isProduction: G(g)
|
|
2139
2154
|
}, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
|
|
@@ -2141,21 +2156,21 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
2141
2156
|
t("div", {
|
|
2142
2157
|
class: L([u.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
|
|
2143
2158
|
}, [
|
|
2144
|
-
q(
|
|
2159
|
+
q(El, {
|
|
2145
2160
|
globalPageConfiguration: n,
|
|
2146
|
-
isComponentMode:
|
|
2161
|
+
isComponentMode: r.value,
|
|
2147
2162
|
removeComponent: Z,
|
|
2148
2163
|
addComponentFunction: _,
|
|
2149
2164
|
fullwidthMode: u.value,
|
|
2150
2165
|
addCol: D,
|
|
2151
2166
|
addRow: c,
|
|
2152
2167
|
removeRow: $,
|
|
2153
|
-
removeCol:
|
|
2154
|
-
moveCol:
|
|
2168
|
+
removeCol: N,
|
|
2169
|
+
moveCol: X,
|
|
2155
2170
|
updateRowConfig: w,
|
|
2156
2171
|
updateColConfig: d,
|
|
2157
2172
|
moveRow: j,
|
|
2158
|
-
sectionSelected:
|
|
2173
|
+
sectionSelected: a.value,
|
|
2159
2174
|
renderApiDomain: G(f),
|
|
2160
2175
|
isProduction: G(g)
|
|
2161
2176
|
}, null, 8, ["globalPageConfiguration", "isComponentMode", "fullwidthMode", "sectionSelected", "renderApiDomain", "isProduction"])
|
|
@@ -2165,15 +2180,15 @@ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
|
|
|
2165
2180
|
}
|
|
2166
2181
|
});
|
|
2167
2182
|
export {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2183
|
+
El as BodySection,
|
|
2184
|
+
ll as ColConfig,
|
|
2185
|
+
se as ComponentsBox,
|
|
2186
|
+
uo as FeedComponent,
|
|
2187
|
+
re as FieldsForm,
|
|
2188
|
+
lt as GlobalConfig,
|
|
2174
2189
|
ce as InitialComponent,
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2190
|
+
Xl as Pagebuilder,
|
|
2191
|
+
Il as RowConfig,
|
|
2192
|
+
Pt as SourceFilter,
|
|
2193
|
+
Xl as default
|
|
2179
2194
|
};
|