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