@charisol/plexo-sdk 1.4.30 → 1.4.31
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.
|
@@ -903,7 +903,43 @@ var ie = (g, _ = !1) => {
|
|
|
903
903
|
f += "\n </div>";
|
|
904
904
|
}
|
|
905
905
|
return f += "\n </div>", f;
|
|
906
|
-
}
|
|
906
|
+
};
|
|
907
|
+
function ae(e) {
|
|
908
|
+
let t = /* @__PURE__ */ new Set(), n = 0, r = (e) => {
|
|
909
|
+
let r;
|
|
910
|
+
do
|
|
911
|
+
r = `${e}-dedup${++n}`;
|
|
912
|
+
while (t.has(r));
|
|
913
|
+
return r;
|
|
914
|
+
}, i = (e) => {
|
|
915
|
+
let n = e.id;
|
|
916
|
+
return t.has(n) && (n = r("row")), t.add(n), {
|
|
917
|
+
...e,
|
|
918
|
+
id: n,
|
|
919
|
+
columns: (e.columns || []).map(a)
|
|
920
|
+
};
|
|
921
|
+
}, a = (e) => {
|
|
922
|
+
let n = {}, a = (e.elements || []).map((e) => {
|
|
923
|
+
let i = e.id;
|
|
924
|
+
return t.has(i) && (i = r("el"), n[e.id] = i), t.add(i), i === e.id ? e : {
|
|
925
|
+
...e,
|
|
926
|
+
id: i
|
|
927
|
+
};
|
|
928
|
+
}), o = (e.nestedRows || []).map((e) => {
|
|
929
|
+
let t = e.id, r = i(e);
|
|
930
|
+
return r.id !== t && (n[t] = r.id), r;
|
|
931
|
+
}), s = e.id;
|
|
932
|
+
return t.has(s) && (s = r("col")), t.add(s), {
|
|
933
|
+
...e,
|
|
934
|
+
id: s,
|
|
935
|
+
elements: a,
|
|
936
|
+
nestedRows: o,
|
|
937
|
+
childOrder: e.childOrder ? e.childOrder.map((e) => n[e] ?? e) : e.childOrder
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
return e.map(i);
|
|
941
|
+
}
|
|
942
|
+
var Q = (e, t) => {
|
|
907
943
|
let n = t?.canvasEditorPadding ?? !1;
|
|
908
944
|
if (!e || typeof e != "object") return "<!-- Empty template -->";
|
|
909
945
|
let r = e.designJson || e.template || e, i = r.body || (Array.isArray(r.rows) ? {
|
|
@@ -935,7 +971,7 @@ var ie = (g, _ = !1) => {
|
|
|
935
971
|
"ogImageUrl"
|
|
936
972
|
], s = {};
|
|
937
973
|
for (let e of Object.keys(a)) o.includes(e) || (s[e] = a[e]);
|
|
938
|
-
let c = P(s), l = typeof a.htmlTitle == "string" && a.htmlTitle.trim() ? a.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = V("id", a.htmlId), d = V("class", a.htmlClass), f = typeof a.customCss == "string" && a.customCss.trim() ? a.customCss.trim() : "", p = typeof a.customJs == "string" && a.customJs.trim() ? a.customJs.trim() : "", m = typeof a.favicon == "string" && a.favicon.trim() ? a.favicon.trim() : "", h = typeof a.metaDescription == "string" && a.metaDescription.trim() ? a.metaDescription.trim() : "", g = typeof a.ogImageUrl == "string" && a.ogImageUrl.trim() ? a.ogImageUrl.trim() : "", v = typeof a.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", y = Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : [], b = N(M(y, [a.fontFamily])), x = {
|
|
974
|
+
let c = P(s), l = typeof a.htmlTitle == "string" && a.htmlTitle.trim() ? a.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = V("id", a.htmlId), d = V("class", a.htmlClass), f = typeof a.customCss == "string" && a.customCss.trim() ? a.customCss.trim() : "", p = typeof a.customJs == "string" && a.customJs.trim() ? a.customJs.trim() : "", m = typeof a.favicon == "string" && a.favicon.trim() ? a.favicon.trim() : "", h = typeof a.metaDescription == "string" && a.metaDescription.trim() ? a.metaDescription.trim() : "", g = typeof a.ogImageUrl == "string" && a.ogImageUrl.trim() ? a.ogImageUrl.trim() : "", v = typeof a.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", y = ae(Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : []), b = N(M(y, [a.fontFamily])), x = {
|
|
939
975
|
tablet: [],
|
|
940
976
|
mobile: []
|
|
941
977
|
}, S = "";
|
|
@@ -1009,14 +1045,14 @@ ${p ? ` <script>\n${p}\n <\/script>` : ""}
|
|
|
1009
1045
|
function $(e) {
|
|
1010
1046
|
return e.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
|
1011
1047
|
}
|
|
1012
|
-
function
|
|
1048
|
+
function oe(e) {
|
|
1013
1049
|
return $(Q(e));
|
|
1014
1050
|
}
|
|
1015
|
-
function
|
|
1051
|
+
function se(e) {
|
|
1016
1052
|
return Q(e);
|
|
1017
1053
|
}
|
|
1018
|
-
function
|
|
1054
|
+
function ce(e) {
|
|
1019
1055
|
return e;
|
|
1020
1056
|
}
|
|
1021
1057
|
//#endregion
|
|
1022
|
-
export {
|
|
1058
|
+
export { se as a, z as c, ce as d, k as f, Q as i, F as l, H as n, oe as o, L as r, j as s, A as t, $ as u };
|
package/dist/compiler.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-2cd_aviO.js";
|
|
2
2
|
export { l as DEFAULT_BODY_FONT_FAMILY, a as FORM_NON_CSS_STYLE_KEYS, s as collectResponsiveRule, r as compileToHTML, e as compileToHTMLWithStrataAuto, o as compileToPlainText, c as convertSectionRowToPlexoRow, t as getFormDefaultStyle, i as getInlineStylesImportant, u as htmlToPlainText, n as injectStrataBundle };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-D3k1f2jT.js";
|
|
2
2
|
import { S as o, _ as s, a as c, b as l, c as u, f as d, h as f, i as p, l as m, o as h, p as g, s as _, u as v, x as y, y as b } from "./iconSvgStatic-CGue7nyp.js";
|
|
3
|
-
import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-
|
|
3
|
+
import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-2cd_aviO.js";
|
|
4
4
|
import { t as ne } from "./compilerClient-BIrZIgfG.js";
|
|
5
5
|
import T, { createContext as E, createElement as re, forwardRef as ie, useCallback as ae, useContext as oe, useEffect as D, useImperativeHandle as se, useMemo as O, useRef as k, useState as A } from "react";
|
|
6
6
|
import { DndContext as ce, DragOverlay as le, MeasuringStrategy as ue, PointerSensor as de, TouchSensor as fe, pointerWithin as pe, rectIntersection as me, useDraggable as j, useDroppable as he, useSensor as M, useSensors as ge } from "@dnd-kit/core";
|
package/package.json
CHANGED