@charisol/plexo-sdk 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{compiler-Do7SiKdp.js → compiler-BpXCk9OP.js} +177 -189
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +94 -90
- package/dist/{iconSvgStatic-DKNX8fUj.js → iconSvgStatic-CeiuMavi.js} +62 -50
- package/dist/index.js +387 -387
- package/dist/utilities/elementResolvers.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m } from "./iconSvgStatic-CeiuMavi.js";
|
|
2
2
|
//#region src/utilities/playground.constants.ts
|
|
3
|
-
var
|
|
3
|
+
var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g = [
|
|
4
4
|
{
|
|
5
5
|
id: "all",
|
|
6
6
|
label: "All sources"
|
|
@@ -17,7 +17,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
17
17
|
id: "pixabay",
|
|
18
18
|
label: "Pixabay"
|
|
19
19
|
}
|
|
20
|
-
],
|
|
20
|
+
], _ = [
|
|
21
21
|
{
|
|
22
22
|
id: "surface-book",
|
|
23
23
|
label: "Surface Book",
|
|
@@ -84,7 +84,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
84
84
|
width: 375,
|
|
85
85
|
category: "mobile"
|
|
86
86
|
}
|
|
87
|
-
],
|
|
87
|
+
], v = 1280, y = [
|
|
88
88
|
{
|
|
89
89
|
id: "facebook",
|
|
90
90
|
label: "Facebook"
|
|
@@ -117,7 +117,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
117
117
|
id: "tiktok",
|
|
118
118
|
label: "TikTok"
|
|
119
119
|
}
|
|
120
|
-
],
|
|
120
|
+
], b = [
|
|
121
121
|
{
|
|
122
122
|
label: "Text",
|
|
123
123
|
value: "text"
|
|
@@ -150,7 +150,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
150
150
|
label: "Checkbox",
|
|
151
151
|
value: "checkbox"
|
|
152
152
|
}
|
|
153
|
-
],
|
|
153
|
+
], x = [
|
|
154
154
|
{
|
|
155
155
|
label: "1 Column",
|
|
156
156
|
widths: ["100%"],
|
|
@@ -199,7 +199,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
199
199
|
"25%"
|
|
200
200
|
]
|
|
201
201
|
}
|
|
202
|
-
],
|
|
202
|
+
], S = [
|
|
203
203
|
{
|
|
204
204
|
label: "Roboto",
|
|
205
205
|
value: "'Roboto', sans-serif",
|
|
@@ -600,8 +600,8 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
|
|
|
600
600
|
value: "'Great Vibes', cursive",
|
|
601
601
|
style: "handwriting"
|
|
602
602
|
}
|
|
603
|
-
],
|
|
604
|
-
function
|
|
603
|
+
], C = new Map(S.map((e) => [e.value, e.label]));
|
|
604
|
+
function w(e, t = []) {
|
|
605
605
|
let n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
606
606
|
if (!e) return;
|
|
607
607
|
let t = Array.isArray(e.columns) ? e.columns : [];
|
|
@@ -619,17 +619,17 @@ function C(e, t = []) {
|
|
|
619
619
|
for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
|
|
620
620
|
return n;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function T(e) {
|
|
623
623
|
let t = /* @__PURE__ */ new Set();
|
|
624
624
|
for (let n of e) {
|
|
625
|
-
let e =
|
|
625
|
+
let e = C.get(n);
|
|
626
626
|
e && t.add(e);
|
|
627
627
|
}
|
|
628
628
|
return t.size === 0 ? null : `https://fonts.googleapis.com/css?family=${Array.from(t).map((e) => `${encodeURIComponent(e).replace(/%20/g, "+")}:400,700`).join("|")}&display=swap`;
|
|
629
629
|
}
|
|
630
630
|
//#endregion
|
|
631
631
|
//#region src/utilities/responsiveDefaults.ts
|
|
632
|
-
var
|
|
632
|
+
var ee = {
|
|
633
633
|
tablet: {
|
|
634
634
|
thresholdPx: 24,
|
|
635
635
|
scale: .85,
|
|
@@ -640,7 +640,7 @@ var T = {
|
|
|
640
640
|
scale: .7,
|
|
641
641
|
floorPx: 14
|
|
642
642
|
}
|
|
643
|
-
},
|
|
643
|
+
}, E = {
|
|
644
644
|
tablet: {
|
|
645
645
|
thresholdPx: 320,
|
|
646
646
|
scale: .8,
|
|
@@ -651,7 +651,7 @@ var T = {
|
|
|
651
651
|
scale: .55,
|
|
652
652
|
floorPx: 140
|
|
653
653
|
}
|
|
654
|
-
},
|
|
654
|
+
}, D = {
|
|
655
655
|
tablet: {
|
|
656
656
|
thresholdPx: 48,
|
|
657
657
|
scale: .75,
|
|
@@ -662,7 +662,7 @@ var T = {
|
|
|
662
662
|
scale: .55,
|
|
663
663
|
floorPx: 16
|
|
664
664
|
}
|
|
665
|
-
},
|
|
665
|
+
}, O = {
|
|
666
666
|
tablet: {
|
|
667
667
|
thresholdPx: 500,
|
|
668
668
|
scale: 1,
|
|
@@ -673,11 +673,11 @@ var T = {
|
|
|
673
673
|
scale: 1,
|
|
674
674
|
floorPx: 0
|
|
675
675
|
}
|
|
676
|
-
},
|
|
676
|
+
}, k = ["fontSize"], A = [
|
|
677
677
|
"height",
|
|
678
678
|
"minHeight",
|
|
679
679
|
"maxHeight"
|
|
680
|
-
],
|
|
680
|
+
], j = [
|
|
681
681
|
"padding",
|
|
682
682
|
"paddingTop",
|
|
683
683
|
"paddingBottom",
|
|
@@ -686,8 +686,8 @@ var T = {
|
|
|
686
686
|
"margin",
|
|
687
687
|
"marginTop",
|
|
688
688
|
"marginBottom"
|
|
689
|
-
],
|
|
690
|
-
function
|
|
689
|
+
], M = ["width", "maxWidth"];
|
|
690
|
+
function N(e) {
|
|
691
691
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
692
692
|
if (typeof e != "string") return null;
|
|
693
693
|
let t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
|
|
@@ -695,59 +695,47 @@ function M(e) {
|
|
|
695
695
|
let n = parseFloat(t[1]);
|
|
696
696
|
return Number.isFinite(n) ? n : null;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function P(e, t) {
|
|
699
699
|
return e < t.thresholdPx ? null : Math.max(Math.round(e * t.scale), t.floorPx);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function F(e, t) {
|
|
702
702
|
if (!e || typeof e != "object") return {};
|
|
703
703
|
let n = {};
|
|
704
|
-
for (let r of O) {
|
|
705
|
-
let i = M(e[r]);
|
|
706
|
-
if (i === null) continue;
|
|
707
|
-
let a = N(i, T[t]);
|
|
708
|
-
a !== null && (n[r] = `${a}px`);
|
|
709
|
-
}
|
|
710
704
|
for (let r of k) {
|
|
711
|
-
let i =
|
|
705
|
+
let i = N(e[r]);
|
|
712
706
|
if (i === null) continue;
|
|
713
|
-
let a =
|
|
707
|
+
let a = P(i, ee[t]);
|
|
714
708
|
a !== null && (n[r] = `${a}px`);
|
|
715
709
|
}
|
|
716
710
|
for (let r of A) {
|
|
717
|
-
let i =
|
|
711
|
+
let i = N(e[r]);
|
|
718
712
|
if (i === null) continue;
|
|
719
|
-
let a =
|
|
713
|
+
let a = P(i, E[t]);
|
|
720
714
|
a !== null && (n[r] = `${a}px`);
|
|
721
715
|
}
|
|
722
716
|
for (let r of j) {
|
|
723
|
-
let i =
|
|
724
|
-
i
|
|
717
|
+
let i = N(e[r]);
|
|
718
|
+
if (i === null) continue;
|
|
719
|
+
let a = P(i, D[t]);
|
|
720
|
+
a !== null && (n[r] = `${a}px`);
|
|
721
|
+
}
|
|
722
|
+
for (let r of M) {
|
|
723
|
+
let i = N(e[r]);
|
|
724
|
+
i !== null && i >= O[t].thresholdPx && (n[r] = "100%");
|
|
725
725
|
}
|
|
726
726
|
return n;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function I(e, t, n) {
|
|
729
729
|
let r = e || {};
|
|
730
730
|
return n ? {
|
|
731
731
|
...r,
|
|
732
|
-
...
|
|
732
|
+
...F(r, n),
|
|
733
733
|
...t || {}
|
|
734
734
|
} : r;
|
|
735
735
|
}
|
|
736
736
|
//#endregion
|
|
737
737
|
//#region src/utilities/compiler.ts
|
|
738
|
-
var
|
|
739
|
-
switch (te(e)) {
|
|
740
|
-
case "facebook": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M14 8h2V4h-2c-2.2 0-4 1.8-4 4v2H8v4h2v6h4v-6h2.5l.5-4H14V8c0-.55.45-1 1-1Z"/></svg>`;
|
|
741
|
-
case "instagram": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="5" ry="5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="12" cy="12" r="3.5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="17" cy="7" r="1" fill="${t}"/></svg>`;
|
|
742
|
-
case "linkedin": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="8" cy="9" r="1.25" fill="${t}"/><path fill="${t}" d="M7 11h2v6H7zM11 11h2v.9c.5-.7 1.34-1.15 2.4-1.15 2 0 3.1 1.25 3.1 3.6V17h-2v-2.2c0-1.3-.45-2.05-1.55-2.05-1.2 0-1.85.8-1.85 2.05V17h-2z"/></svg>`;
|
|
743
|
-
case "x": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M6 5h3.1l3 4.2L15.7 5H18l-4.8 5.5L18.4 18h-3.1l-3.3-4.7L8 18H5.6l5-5.8z"/></svg>`;
|
|
744
|
-
case "youtube": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><rect x="3" y="6.5" width="18" height="11" rx="3" fill="${t}"/><path fill="#fff" d="m10 9 5 3-5 3z"/></svg>`;
|
|
745
|
-
case "pinterest": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M12 4a8 8 0 0 0-2.9 15.46c-.04-1.17 0-2.58.3-3.82l1.1-4.6s-.27-.56-.27-1.4c0-1.3.75-2.27 1.68-2.27.8 0 1.18.6 1.18 1.3 0 .8-.5 2-.77 3.12-.22.94.47 1.7 1.4 1.7 1.67 0 2.8-2.15 2.8-4.7 0-1.93-1.3-3.37-3.67-3.37-2.68 0-4.35 2-4.35 4.23 0 .77.23 1.34.6 1.77.17.2.2.29.13.53l-.2.8c-.07.25-.3.34-.56.25-1.55-.63-2.27-2.32-2.27-4.22 0-3.14 2.64-6.9 7.89-6.9 4.21 0 6.98 3.05 6.98 6.32 0 4.32-2.4 7.54-5.93 7.54-1.18 0-2.28-.64-2.65-1.37l-.73 2.78c-.26.95-.77 2.14-1.22 2.96A8 8 0 1 0 12 4Z"/></svg>`;
|
|
746
|
-
case "whatsapp": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M12 4a8 8 0 0 0-6.9 12.04L4 20l4.11-1.06A8 8 0 1 0 12 4Zm4.55 11.36c-.2.56-1.14 1.04-1.57 1.1-.4.06-.92.09-1.48-.08-.34-.11-.78-.25-1.35-.5-2.37-1.03-3.92-3.45-4.04-3.6-.11-.15-.96-1.27-.96-2.42s.6-1.72.8-1.96c.2-.24.45-.3.6-.3h.43c.14 0 .33-.05.51.38.2.48.7 1.67.75 1.79.06.12.1.26.02.42-.07.15-.11.26-.22.39-.11.13-.23.29-.33.39-.11.11-.22.23-.1.45.11.22.52.86 1.11 1.39.76.68 1.4.89 1.62.99.22.11.35.09.48-.06.13-.15.56-.65.72-.88.15-.22.31-.18.52-.11.22.08 1.36.64 1.6.76.23.11.38.17.44.27.06.1.06.61-.14 1.17Z"/></svg>`;
|
|
747
|
-
case "tiktok": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M14.4 4c.24 1.12.9 2.08 1.86 2.67.7.42 1.52.64 2.35.63V10a6.5 6.5 0 0 1-4.2-1.52v5.24A4.72 4.72 0 1 1 9.7 9v2.6a2.12 2.12 0 1 0 2.1 2.12V4z"/></svg>`;
|
|
748
|
-
default: return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="12" cy="12" r="4" fill="${t}"/></svg>`;
|
|
749
|
-
}
|
|
750
|
-
};
|
|
738
|
+
var L = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
|
|
751
739
|
function R(e) {
|
|
752
740
|
if (!e || typeof e != "object") return null;
|
|
753
741
|
if (Array.isArray(e.columns) && e.columns.length > 0) return e;
|
|
@@ -1021,7 +1009,7 @@ function V(e) {
|
|
|
1021
1009
|
}
|
|
1022
1010
|
function H(e, t, n, r, i) {
|
|
1023
1011
|
let a = {
|
|
1024
|
-
...
|
|
1012
|
+
...F(n, r),
|
|
1025
1013
|
...i || {}
|
|
1026
1014
|
};
|
|
1027
1015
|
for (let e of Object.keys(a)) V(a[e]) && delete a[e];
|
|
@@ -1134,84 +1122,84 @@ function Y(e, t, n) {
|
|
|
1134
1122
|
function X(e) {
|
|
1135
1123
|
return `<!-- Unsupported block ${String(e)} -->`;
|
|
1136
1124
|
}
|
|
1137
|
-
var Z = (
|
|
1138
|
-
if (!
|
|
1139
|
-
let
|
|
1125
|
+
var Z = (e) => {
|
|
1126
|
+
if (!e || typeof e != "object") return "";
|
|
1127
|
+
let h = e.style || {}, g = z(e.type === "form_container" ? {
|
|
1140
1128
|
...U(),
|
|
1141
|
-
...
|
|
1142
|
-
} :
|
|
1143
|
-
switch (
|
|
1144
|
-
case "heading": return `<h2${
|
|
1145
|
-
case "paragraph": return `<p${
|
|
1146
|
-
case "text": return `<div${
|
|
1129
|
+
...h
|
|
1130
|
+
} : h), _ = e.attributes || {}, v = ` data-plexo-id="${W(e.id)}"`;
|
|
1131
|
+
switch (e.type) {
|
|
1132
|
+
case "heading": return `<h2${v} style="margin-top: 0; margin-bottom: 8px; ${g}">${_.text || "Heading"}</h2>`;
|
|
1133
|
+
case "paragraph": return `<p${v} style="margin-top: 0; margin-bottom: 12px; ${g}">${_.text || "Paragraph text content."}</p>`;
|
|
1134
|
+
case "text": return `<div${v} style="${g}">${_.text || ""}</div>`;
|
|
1147
1135
|
case "button": {
|
|
1148
|
-
let
|
|
1149
|
-
...
|
|
1150
|
-
width:
|
|
1151
|
-
height:
|
|
1136
|
+
let n = t(e), r = z({
|
|
1137
|
+
...h,
|
|
1138
|
+
width: n.width,
|
|
1139
|
+
height: n.height
|
|
1152
1140
|
});
|
|
1153
|
-
return `<div style="text-align: ${
|
|
1141
|
+
return `<div style="text-align: ${h.textAlign || "center"};"><a${v} href="${_.href || "#"}" target="${_.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${r}">${_.text || "Button"}</a></div>`;
|
|
1154
1142
|
}
|
|
1155
1143
|
case "image": {
|
|
1156
|
-
let
|
|
1157
|
-
...
|
|
1158
|
-
width:
|
|
1159
|
-
height:
|
|
1144
|
+
let t = s(e), n = h.textAlign === "center" ? "margin: 0 auto; display: block;" : h.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = z({
|
|
1145
|
+
...h,
|
|
1146
|
+
width: t.width,
|
|
1147
|
+
height: t.height
|
|
1160
1148
|
});
|
|
1161
|
-
return `<img${
|
|
1149
|
+
return `<img${v} src="${_.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${_.alt || ""}" style="${r} ${n}" />`;
|
|
1162
1150
|
}
|
|
1163
|
-
case "divider": return `<hr${
|
|
1164
|
-
case "spacer": return `<div${
|
|
1165
|
-
case "card": return `<div${
|
|
1166
|
-
<h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${
|
|
1167
|
-
<p style="margin: 0; color: #94a3b8; font-size: 14px;">${
|
|
1151
|
+
case "divider": return `<hr${v} style="border: 0; border-top: ${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#334155"}; ${g}" />`;
|
|
1152
|
+
case "spacer": return `<div${v} style="height: ${h.height || "24px"};"></div>`;
|
|
1153
|
+
case "card": return `<div${v} style="${g}">
|
|
1154
|
+
<h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${_.title || "Card Title"}</h3>
|
|
1155
|
+
<p style="margin: 0; color: #94a3b8; font-size: 14px;">${_.description || "Card description."}</p>
|
|
1168
1156
|
</div>`;
|
|
1169
1157
|
case "form_container": {
|
|
1170
1158
|
let t = {
|
|
1171
1159
|
...U(),
|
|
1172
|
-
...
|
|
1160
|
+
...h
|
|
1173
1161
|
}, n = {};
|
|
1174
1162
|
for (let e of Object.keys(t)) K.includes(e) || (n[e] = t[e]);
|
|
1175
|
-
n.height = e
|
|
1176
|
-
let r = z(n),
|
|
1163
|
+
n.height = u(e);
|
|
1164
|
+
let r = z(n), i = p(Array.isArray(_.fields) ? _.fields : []), a = t.fieldSpacing || "12px", s = i.map((e) => `<div style="margin-bottom: ${a};">${q(e)}</div>`).join(""), c = _.buttonAutoWidth === !1 ? t.buttonWidth || "100%" : "auto", l = t.buttonAlign === "left" ? "flex-start" : t.buttonAlign === "right" ? "flex-end" : "center", d = _.buttonAutoHeight === !1 && t.buttonHeight || "auto", f = z({
|
|
1177
1165
|
backgroundColor: t.buttonBackgroundColor,
|
|
1178
1166
|
color: t.buttonTextColor,
|
|
1179
1167
|
borderRadius: t.buttonBorderRadius,
|
|
1180
|
-
paddingTop:
|
|
1181
|
-
paddingBottom:
|
|
1182
|
-
paddingLeft:
|
|
1183
|
-
paddingRight:
|
|
1184
|
-
marginTop:
|
|
1185
|
-
marginBottom:
|
|
1186
|
-
marginLeft:
|
|
1187
|
-
marginRight:
|
|
1168
|
+
paddingTop: o(t.buttonPaddingTop, t.buttonPadding, "top", "10px"),
|
|
1169
|
+
paddingBottom: o(t.buttonPaddingBottom, t.buttonPadding, "bottom", "10px"),
|
|
1170
|
+
paddingLeft: o(t.buttonPaddingLeft, t.buttonPadding, "left", "14px"),
|
|
1171
|
+
paddingRight: o(t.buttonPaddingRight, t.buttonPadding, "right", "14px"),
|
|
1172
|
+
marginTop: o(t.buttonMarginTop, t.buttonMargin, "top"),
|
|
1173
|
+
marginBottom: o(t.buttonMarginBottom, t.buttonMargin, "bottom"),
|
|
1174
|
+
marginLeft: o(t.buttonMarginLeft, t.buttonMargin, "left"),
|
|
1175
|
+
marginRight: o(t.buttonMarginRight, t.buttonMargin, "right"),
|
|
1188
1176
|
fontSize: t.buttonFontSize,
|
|
1189
1177
|
fontWeight: t.buttonFontWeight,
|
|
1190
|
-
width:
|
|
1191
|
-
height:
|
|
1178
|
+
width: c,
|
|
1179
|
+
height: d
|
|
1192
1180
|
});
|
|
1193
|
-
return `<form${
|
|
1181
|
+
return `<form${v} action="${W(_.actionUrl || _.action || "#")}" method="${W(_.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_.submitLabel || "Submit"}</button></div></form>`;
|
|
1194
1182
|
}
|
|
1195
1183
|
case "input": {
|
|
1196
|
-
let e =
|
|
1197
|
-
return `<input${
|
|
1184
|
+
let e = _.inputType || _.type || "text", t = W(_.name || _.fieldName || "field"), n = W(_.placeholder || ""), r = _.required ? " required" : "";
|
|
1185
|
+
return `<input${v} type="${W(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${r} />`;
|
|
1198
1186
|
}
|
|
1199
|
-
case "textarea": return `<textarea${
|
|
1200
|
-
case "select": return `<select${
|
|
1201
|
-
case "html": return `<div${
|
|
1202
|
-
...
|
|
1203
|
-
height:
|
|
1204
|
-
})}">${
|
|
1187
|
+
case "textarea": return `<textarea${v} name="${W(_.name || _.fieldName || "field")}" placeholder="${W(_.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}></textarea>`;
|
|
1188
|
+
case "select": return `<select${v} name="${W(_.name || _.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}>${(Array.isArray(_.options) ? _.options : []).map((e) => `<option value="${W(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
|
|
1189
|
+
case "html": return `<div${v} style="${z({
|
|
1190
|
+
...h,
|
|
1191
|
+
height: n(e, "auto")
|
|
1192
|
+
})}">${_.htmlContent || _.text || ""}</div>`;
|
|
1205
1193
|
case "social": {
|
|
1206
|
-
let
|
|
1207
|
-
return `<div${
|
|
1208
|
-
padding:
|
|
1209
|
-
margin:
|
|
1194
|
+
let t = i(e), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
|
|
1195
|
+
return `<div${v} style="${z({
|
|
1196
|
+
padding: h.padding,
|
|
1197
|
+
margin: h.margin,
|
|
1210
1198
|
display: "flex",
|
|
1211
1199
|
flexWrap: "wrap",
|
|
1212
|
-
gap:
|
|
1213
|
-
justifyContent:
|
|
1214
|
-
})}">${
|
|
1200
|
+
gap: h.iconSpacing || "8px",
|
|
1201
|
+
justifyContent: n
|
|
1202
|
+
})}">${t.map((e) => {
|
|
1215
1203
|
let t = z({
|
|
1216
1204
|
width: e.size,
|
|
1217
1205
|
height: e.size,
|
|
@@ -1224,137 +1212,137 @@ var Z = (i) => {
|
|
|
1224
1212
|
justifyContent: "center",
|
|
1225
1213
|
overflow: "hidden"
|
|
1226
1214
|
});
|
|
1227
|
-
return `<a href="${W(e.url)}" style="${t} text-decoration: none;">${
|
|
1215
|
+
return `<a href="${W(e.url)}" style="${t} text-decoration: none;">${l(e.provider, e.color)}</a>`;
|
|
1228
1216
|
}).join("")}</div>`;
|
|
1229
1217
|
}
|
|
1230
1218
|
case "menu": {
|
|
1231
|
-
let
|
|
1232
|
-
return `<div${
|
|
1233
|
-
...
|
|
1219
|
+
let t = r(e), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
|
|
1220
|
+
return `<div${v} style="${z({
|
|
1221
|
+
...h,
|
|
1234
1222
|
display: "flex",
|
|
1235
1223
|
flexWrap: "wrap",
|
|
1236
1224
|
gap: "16px",
|
|
1237
|
-
justifyContent:
|
|
1238
|
-
})}">${
|
|
1225
|
+
justifyContent: n
|
|
1226
|
+
})}">${t.map((e) => `<a href="${W(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${h.fontWeight || 600};">${W(e.label)}</a>`).join("")}</div>`;
|
|
1239
1227
|
}
|
|
1240
1228
|
case "icon": {
|
|
1241
|
-
let e =
|
|
1242
|
-
padding:
|
|
1243
|
-
margin:
|
|
1229
|
+
let e = h.fontSize || `${_.iconSize || 48}px`, t = h.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(_.iconName, n, t), i = h.textAlign === "right" ? "flex-end" : h.textAlign === "left" ? "flex-start" : "center", a = z({
|
|
1230
|
+
padding: h.padding,
|
|
1231
|
+
margin: h.margin,
|
|
1244
1232
|
display: "flex",
|
|
1245
1233
|
justifyContent: i
|
|
1246
|
-
}), o = typeof
|
|
1247
|
-
return `<div style="${a}">${o ? `<a${
|
|
1234
|
+
}), o = typeof _.href == "string" ? _.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
|
|
1235
|
+
return `<div style="${a}">${o ? `<a${v} href="${W(o)}" target="${_.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${v}>${s}</span>`}</div>`;
|
|
1248
1236
|
}
|
|
1249
1237
|
case "table": {
|
|
1250
|
-
let
|
|
1251
|
-
let a = i ? "th" : "td", o = i ?
|
|
1252
|
-
return `<tr>${
|
|
1253
|
-
let
|
|
1254
|
-
padding:
|
|
1255
|
-
border:
|
|
1238
|
+
let t = d(e), n = `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#cbd5e1"}`, r = (e, r, i) => {
|
|
1239
|
+
let a = i ? "th" : "td", o = i ? h.headerBgColor || "#f8fafc" : t.striped && r % 2 == 1 ? "#f8fafc" : h.contentBgColor || "#ffffff", s = i ? h.headerTextColor || "#1e293b" : h.contentTextColor || "#475569", c = i ? h.headerTextAlign || "left" : h.contentTextAlign || "left";
|
|
1240
|
+
return `<tr>${e.map((e) => {
|
|
1241
|
+
let t = z({
|
|
1242
|
+
padding: h.cellPadding || "8px",
|
|
1243
|
+
border: n,
|
|
1256
1244
|
backgroundColor: o,
|
|
1257
1245
|
color: s,
|
|
1258
1246
|
textAlign: c,
|
|
1259
|
-
lineHeight:
|
|
1260
|
-
letterSpacing:
|
|
1247
|
+
lineHeight: h.contentLineHeight,
|
|
1248
|
+
letterSpacing: h.contentLetterSpacing,
|
|
1261
1249
|
fontWeight: i ? "700" : void 0
|
|
1262
1250
|
});
|
|
1263
|
-
return `<${a} style="${
|
|
1251
|
+
return `<${a} style="${t}">${e || " "}</${a}>`;
|
|
1264
1252
|
}).join("")}</tr>`;
|
|
1265
|
-
},
|
|
1253
|
+
}, i = t.enableHeader && t.cells.length > 0 ? `<thead>${r(t.cells[0], 0, !0)}</thead>` : "", a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length, s = t.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join(""), c = t.enableFooter && t.cells.length > a ? `<tfoot>${r(t.cells[t.cells.length - 1], t.cells.length - 1, !1)}</tfoot>` : "", l = z({
|
|
1266
1254
|
borderCollapse: "collapse",
|
|
1267
1255
|
width: "100%"
|
|
1268
1256
|
});
|
|
1269
|
-
return `<div${
|
|
1270
|
-
padding:
|
|
1271
|
-
margin:
|
|
1257
|
+
return `<div${v} style="${z({
|
|
1258
|
+
padding: h.padding,
|
|
1259
|
+
margin: h.margin,
|
|
1272
1260
|
overflowX: "auto"
|
|
1273
|
-
})}"><table style="${
|
|
1261
|
+
})}"><table style="${l}">${i}<tbody>${s}</tbody>${c}</table></div>`;
|
|
1274
1262
|
}
|
|
1275
1263
|
case "video": {
|
|
1276
|
-
let e =
|
|
1277
|
-
return `<div${
|
|
1278
|
-
padding:
|
|
1279
|
-
margin:
|
|
1280
|
-
borderRadius:
|
|
1264
|
+
let e = a(_.videoUrl), t = _.linkType === "email" ? `mailto:${_.href || ""}` : _.href || _.videoUrl || "#", n = _.target || "_blank";
|
|
1265
|
+
return `<div${v} style="${z({
|
|
1266
|
+
padding: h.padding,
|
|
1267
|
+
margin: h.margin,
|
|
1268
|
+
borderRadius: h.borderRadius,
|
|
1281
1269
|
overflow: "hidden"
|
|
1282
|
-
})}"><a href="${W(t)}" target="${W(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${W(e.thumbnailUrl)}" alt="${W(
|
|
1270
|
+
})}"><a href="${W(t)}" target="${W(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${W(e.thumbnailUrl)}" alt="${W(_.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
|
|
1283
1271
|
}
|
|
1284
1272
|
case "timer": {
|
|
1285
|
-
let
|
|
1286
|
-
fontFamily:
|
|
1287
|
-
fontSize:
|
|
1288
|
-
color:
|
|
1273
|
+
let t = _.showLabels !== !1, n = z({
|
|
1274
|
+
fontFamily: h.digitsFontFamily,
|
|
1275
|
+
fontSize: h.digitsFontSize || "40px",
|
|
1276
|
+
color: h.digitsColor || "#1e293b",
|
|
1289
1277
|
fontWeight: "800"
|
|
1290
|
-
}), n = z({
|
|
1291
|
-
fontFamily: m.labelsFontFamily,
|
|
1292
|
-
fontSize: m.labelsFontSize || "16px",
|
|
1293
|
-
color: m.labelsColor || "#64748b"
|
|
1294
1278
|
}), r = z({
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1279
|
+
fontFamily: h.labelsFontFamily,
|
|
1280
|
+
fontSize: h.labelsFontSize || "16px",
|
|
1281
|
+
color: h.labelsColor || "#64748b"
|
|
1282
|
+
}), i = z({
|
|
1283
|
+
backgroundColor: h.backgroundColor || "#f8fafc",
|
|
1284
|
+
borderRadius: h.borderRadius || "8px",
|
|
1285
|
+
padding: h.padding || "16px",
|
|
1298
1286
|
textAlign: "center"
|
|
1299
|
-
}), a = (
|
|
1300
|
-
return `<div${
|
|
1287
|
+
}), a = (e, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${e}" style="${n}">${a}</span>${t ? `<span style="${r}">${i}</span>` : ""}</div>`, o = c(_.targetDate), s = W(_.targetDate || "2026-12-31T23:59:59"), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
|
|
1288
|
+
return `<div${v} data-plexo-target="${s}" style="${i}"><div>${a("days", "Days", o.days)}${a("hours", "Hours", o.hours)}${a("minutes", "Mins", o.minutes)}${a("seconds", "Secs", o.seconds)}</div>${l}</div>`;
|
|
1301
1289
|
}
|
|
1302
1290
|
case "carousel": {
|
|
1303
|
-
let
|
|
1304
|
-
padding:
|
|
1305
|
-
margin:
|
|
1306
|
-
backgroundColor:
|
|
1291
|
+
let t = Array.isArray(_.images) ? _.images : [], n = z({
|
|
1292
|
+
padding: h.padding || "10px",
|
|
1293
|
+
margin: h.margin,
|
|
1294
|
+
backgroundColor: h.backgroundColor,
|
|
1307
1295
|
position: "relative",
|
|
1308
1296
|
overflow: "hidden",
|
|
1309
1297
|
borderRadius: "12px"
|
|
1310
1298
|
});
|
|
1311
|
-
if (
|
|
1312
|
-
let
|
|
1313
|
-
return `<div${
|
|
1299
|
+
if (t.length === 0) return `<div${v} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
|
|
1300
|
+
let r = Math.min(t.length - 1, Math.max(0, parseInt(String(_.activeIdx), 10) || 0)), i = t.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === r ? "block" : "none"};"><img src="${W(e.src)}" alt="${W(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${W(e.caption)}</div>` : ""}</div>`).join(""), a = t.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${t.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === r ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
|
|
1301
|
+
return `<div${v} data-active-idx="${r}" style="${n}">${t.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${i}${a}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
|
|
1314
1302
|
}
|
|
1315
1303
|
case "accordion": {
|
|
1316
|
-
let
|
|
1317
|
-
border: `${
|
|
1318
|
-
borderRadius:
|
|
1304
|
+
let t = f(e), n = _.mode === "multi" ? "multi" : "single", r = _.iconStyle || "chevron", i = _.iconPosition === "left", a = _.showDividers !== !1, o = _.animation !== "none", s = z({
|
|
1305
|
+
border: `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#e2e8f0"}`,
|
|
1306
|
+
borderRadius: h.borderRadius || "10px",
|
|
1319
1307
|
overflow: "hidden",
|
|
1320
|
-
margin:
|
|
1308
|
+
margin: h.margin
|
|
1321
1309
|
});
|
|
1322
|
-
return
|
|
1323
|
-
iconStyle:
|
|
1324
|
-
iconOnLeft:
|
|
1310
|
+
return t.length === 0 ? `<div${v} style="${s}"></div>` : `<div${v} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${s}"><div class="plexo-acc-group">${Y(t, h, {
|
|
1311
|
+
iconStyle: r,
|
|
1312
|
+
iconOnLeft: i,
|
|
1325
1313
|
showDividers: a,
|
|
1326
1314
|
animated: o
|
|
1327
|
-
})}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${
|
|
1315
|
+
})}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
|
|
1328
1316
|
}
|
|
1329
|
-
default: return X(
|
|
1317
|
+
default: return X(e.type);
|
|
1330
1318
|
}
|
|
1331
|
-
}, Q = (
|
|
1332
|
-
if (!
|
|
1333
|
-
let
|
|
1334
|
-
if (!
|
|
1335
|
-
let
|
|
1336
|
-
H(
|
|
1337
|
-
let c = `\n <!-- ROW START: ${
|
|
1338
|
-
c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${
|
|
1339
|
-
let l = Array.isArray(
|
|
1340
|
-
for (let
|
|
1341
|
-
if (!
|
|
1342
|
-
let
|
|
1343
|
-
H(
|
|
1344
|
-
let l = Array.isArray(
|
|
1345
|
-
for (let
|
|
1346
|
-
...
|
|
1319
|
+
}, Q = (t, n) => {
|
|
1320
|
+
if (!t || typeof t != "object") return "";
|
|
1321
|
+
let r = R(t);
|
|
1322
|
+
if (!r) return `\n <!-- ROW SKIPPED (type="${typeof t.type == "string" ? t.type : "unknown"}"${t.id ? `, id="${t.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
|
|
1323
|
+
let i = z(r.style || {}), a = G("id", r.htmlId), o = G("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
|
|
1324
|
+
H(n, s, r.style, "tablet", r.styleTablet), H(n, s, r.style, "mobile", r.styleMobile);
|
|
1325
|
+
let c = `\n <!-- ROW START: ${r.id || "row"} -->`;
|
|
1326
|
+
c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${i}">`;
|
|
1327
|
+
let l = Array.isArray(r.columns) ? r.columns : [];
|
|
1328
|
+
for (let t of l) {
|
|
1329
|
+
if (!t) continue;
|
|
1330
|
+
let r = t.styles || t.style || {}, i = z(r), a = G("id", t.attrs?.htmlId), o = t.attrs?.htmlClass ? ` ${t.attrs.htmlClass}` : "", s = t.id || `col-${Math.random().toString(36).substring(2, 9)}`;
|
|
1331
|
+
H(n, s, r, "tablet", t.stylesTablet), H(n, s, r, "mobile", t.stylesMobile), c += `\n <!-- COLUMN START: ${t.id || "col"} -->`, c += `\n <div data-plexo-id="${s}"${a} class="plexo-col${o}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${t.width || "100%"}; ${i}">`;
|
|
1332
|
+
let l = Array.isArray(t.elements) ? t.elements : [], u = Array.isArray(t.nestedRows) ? t.nestedRows : [], d = new Map(l.map((e) => [e.id, e])), f = new Map(u.map((e) => [e.id, e]));
|
|
1333
|
+
for (let r of e({
|
|
1334
|
+
...t,
|
|
1347
1335
|
elements: l,
|
|
1348
1336
|
nestedRows: u
|
|
1349
1337
|
})) {
|
|
1350
|
-
let e = d.get(
|
|
1338
|
+
let e = d.get(r);
|
|
1351
1339
|
if (e) {
|
|
1352
|
-
let
|
|
1353
|
-
H(
|
|
1340
|
+
let t = e.attributes || {}, r = typeof t.htmlClassNames == "string" ? t.htmlClassNames : typeof t.htmlClass == "string" ? t.htmlClass : typeof t.className == "string" ? t.className : "", i = G("id", t.htmlId), a = G("class", r), o = e.style?.display, s = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
|
|
1341
|
+
H(n, e.id, e.style, "tablet", e.styleTablet), H(n, e.id, e.style, "mobile", e.styleMobile), c += `\n <div${i}${a} style="${s}">`, c += `\n ${Z(e)}`, c += "\n </div>";
|
|
1354
1342
|
continue;
|
|
1355
1343
|
}
|
|
1356
|
-
let
|
|
1357
|
-
|
|
1344
|
+
let t = f.get(r);
|
|
1345
|
+
t && (c += Q(t, n));
|
|
1358
1346
|
}
|
|
1359
1347
|
c += "\n </div>";
|
|
1360
1348
|
}
|
|
@@ -1387,7 +1375,7 @@ var Z = (i) => {
|
|
|
1387
1375
|
"favicon"
|
|
1388
1376
|
], a = {};
|
|
1389
1377
|
for (let e of Object.keys(r)) i.includes(e) || (a[e] = r[e]);
|
|
1390
|
-
let o = z(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = G("id", r.htmlId), l = G("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = w(
|
|
1378
|
+
let o = z(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = G("id", r.htmlId), l = G("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = T(w(p, [r.fontFamily])), h = {
|
|
1391
1379
|
tablet: [],
|
|
1392
1380
|
mobile: []
|
|
1393
1381
|
}, g = "";
|
|
@@ -1401,7 +1389,7 @@ var Z = (i) => {
|
|
|
1401
1389
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1402
1390
|
${m ? `<link rel="stylesheet" href="${m}">` : ""}
|
|
1403
1391
|
<style>
|
|
1404
|
-
body { margin: 0; font-family: ${
|
|
1392
|
+
body { margin: 0; font-family: ${L}; }
|
|
1405
1393
|
.plexo-row {
|
|
1406
1394
|
display: flex;
|
|
1407
1395
|
flex-wrap: wrap;
|
|
@@ -1431,14 +1419,14 @@ ${d ? ` <script>\n${d}\n <\/script>` : ""}
|
|
|
1431
1419
|
</body>
|
|
1432
1420
|
</html>`, y = y.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), y;
|
|
1433
1421
|
};
|
|
1434
|
-
function
|
|
1422
|
+
function te(e) {
|
|
1435
1423
|
return $(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
|
1436
1424
|
}
|
|
1437
|
-
function
|
|
1425
|
+
function ne(e) {
|
|
1438
1426
|
return $(e);
|
|
1439
1427
|
}
|
|
1440
|
-
function
|
|
1428
|
+
function re(e) {
|
|
1441
1429
|
return e;
|
|
1442
1430
|
}
|
|
1443
1431
|
//#endregion
|
|
1444
|
-
export {
|
|
1432
|
+
export { S as _, ne as a, g as b, U as c, I as d, T as f, b as g, _ as h, $ as i, B as l, x as m, K as n, te as o, w as p, H as r, R as s, L as t, re as u, v, h as x, y };
|