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