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