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