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