@charisol/plexo-sdk 1.0.38 → 1.0.39
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/PlexoRenderer.d.ts +1 -0
- package/dist/{compiler-BSPA3AY-.js → compiler-CogJrihV.js} +232 -180
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +9 -9
- package/dist/components/icons.d.ts +1 -0
- package/dist/components/properties/accordionSections/AccordionPropertiesAccordion.d.ts +2 -0
- package/dist/components/sidebarTabs/BodyGlobalSettingsTab.d.ts +1 -0
- package/dist/{iconSvgStatic-JHlo_YyU.js → iconSvgStatic-DOyb-nIf.js} +48 -10
- package/dist/index.js +13881 -13122
- package/dist/plexo-sdk.css +1 -1
- package/dist/utilities/elementResolvers.d.ts +19 -1
- package/dist/utilities/playground.helpers.d.ts +375 -0
- package/dist/utilities/playground.interfaces.d.ts +16 -0
- package/dist/utilities/tierFeatures.d.ts +1 -1
- package/dist/utilities/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/compiler.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-CogJrihV.js";
|
|
2
2
|
export { c as DEFAULT_BODY_FONT_FAMILY, i as FORM_NON_CSS_STYLE_KEYS, o as collectResponsiveRule, n as compileToHTML, e as compileToHTMLWithStrataAuto, a as compileToPlainText, s as convertSectionRowToPlexoRow, t as getFormDefaultStyle, r as getInlineStylesImportant, l as injectStrataBundle };
|
package/dist/compilerClient.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as e, f as t, l as n, p as r, r as i, s as a, t as o, u as s } from "./iconSvgStatic-DOyb-nIf.js";
|
|
2
2
|
//#region src/utilities/compilerClient.ts
|
|
3
3
|
var c = {
|
|
4
4
|
facebook: "facebook",
|
|
@@ -52,19 +52,19 @@ var c = {
|
|
|
52
52
|
return `<mj-image src="${u(v.src || "")}" alt="${u(v.alt || "")}"${t}${n} />`;
|
|
53
53
|
}
|
|
54
54
|
if (l.type === "social") {
|
|
55
|
-
let e =
|
|
55
|
+
let e = s(l), t = e.filter((e) => c[e.provider]), n = e.filter((e) => !c[e.provider]);
|
|
56
56
|
return `${t.length ? `<mj-social font-size="13px" icon-size="30px" mode="horizontal">${t.map((e) => `<mj-social-element name="${c[e.provider]}" href="${u(e.url)}" background-color="${u(e.backgroundColor)}" color="${u(e.color)}"></mj-social-element>`).join("")}</mj-social>` : ""}${n.length ? `<mj-text align="center">${n.map((e) => `<a href="${u(e.url)}" style="color: ${u(e.color)}; text-decoration: none; margin: 0 6px;">${u(e.provider)}</a>`).join("")}</mj-text>` : ""}`;
|
|
57
57
|
}
|
|
58
|
-
if (l.type === "menu") return `<mj-navbar hamburger="hamburger">${
|
|
58
|
+
if (l.type === "menu") return `<mj-navbar hamburger="hamburger">${n(l).map((e) => `<mj-navbar-link href="${u(e.href)}">${u(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
|
|
59
59
|
if (l.type === "table") {
|
|
60
|
-
let
|
|
61
|
-
let o = a ? "th" : "td", s = a ?
|
|
62
|
-
return `<tr>${
|
|
63
|
-
},
|
|
64
|
-
return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${
|
|
60
|
+
let t = e(l), n = l.style || {}, r = `${n.borderWidth || "1px"} ${n.borderStyle || "solid"} ${n.borderColor || "#cbd5e1"}`, i = (e, i, a) => {
|
|
61
|
+
let o = a ? "th" : "td", s = a ? n.headerBgColor || "#f8fafc" : t.striped && i % 2 == 1 ? "#f8fafc" : n.contentBgColor || "#ffffff", c = a ? n.headerTextColor || "#1e293b" : n.contentTextColor || "#475569";
|
|
62
|
+
return `<tr>${e.map((e) => `<${o} style="padding: ${n.cellPadding || "8px"}; border: ${r}; background-color: ${s}; color: ${c};">${u(e) || " "}</${o}>`).join("")}</tr>`;
|
|
63
|
+
}, a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length;
|
|
64
|
+
return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${t.enableHeader && t.cells.length > 0 ? `<thead>${i(t.cells[0], 0, !0)}</thead>` : ""}<tbody>${t.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1)).join("")}</tbody>${t.enableFooter && t.cells.length > a ? `<tfoot>${i(t.cells[t.cells.length - 1], t.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
|
|
65
65
|
}
|
|
66
66
|
if (l.type === "video") {
|
|
67
|
-
let e =
|
|
67
|
+
let e = r(v.videoUrl), t = v.linkType === "email" ? `mailto:${v.href || ""}` : v.href || v.videoUrl || "#";
|
|
68
68
|
return `<mj-image src="${u(e.thumbnailUrl)}" href="${u(t)}" alt="${u(v.alt || "Video preview")}" />`;
|
|
69
69
|
}
|
|
70
70
|
if (l.type === "timer") {
|
|
@@ -14,6 +14,7 @@ interface BodyGlobalSettingsTabProps {
|
|
|
14
14
|
Toggle: React.ComponentType<any>;
|
|
15
15
|
InlineTextInput: React.ComponentType<any>;
|
|
16
16
|
InlineTextArea: React.ComponentType<any>;
|
|
17
|
+
SpacingControls: React.ComponentType<any>;
|
|
17
18
|
disableImageUpload?: boolean;
|
|
18
19
|
onOpenImageLibrary?: (tab: 'images' | 'uploads', target: any) => void;
|
|
19
20
|
}
|
|
@@ -147,9 +147,47 @@ function _(e) {
|
|
|
147
147
|
striped: !!t.striped
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
+
var v = 8;
|
|
151
|
+
function y(e, t, n) {
|
|
152
|
+
let r = n < v && Array.isArray(e?.children) ? e.children : [];
|
|
153
|
+
return {
|
|
154
|
+
id: typeof e?.id == "string" && e.id ? e.id : `item-${t}`,
|
|
155
|
+
title: typeof e?.title == "string" && e.title.trim() ? e.title : `Item ${t + 1}`,
|
|
156
|
+
content: typeof e?.content == "string" ? e.content : "",
|
|
157
|
+
defaultOpen: !!e?.defaultOpen,
|
|
158
|
+
children: r.map((e, t) => y(e, t, n + 1))
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function b(e, t) {
|
|
162
|
+
if (t !== "multi") {
|
|
163
|
+
let t = !1;
|
|
164
|
+
for (let n of e) n.defaultOpen && (t ? n.defaultOpen = !1 : t = !0);
|
|
165
|
+
}
|
|
166
|
+
for (let n of e) b(n.children, t);
|
|
167
|
+
}
|
|
168
|
+
function x(e) {
|
|
169
|
+
let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) => y(e, t, 0));
|
|
170
|
+
return b(r, n), r;
|
|
171
|
+
}
|
|
172
|
+
function S(e, t, n) {
|
|
173
|
+
let r = JSON.parse(JSON.stringify(Array.isArray(e) ? e : [])), i = (e, t) => {
|
|
174
|
+
let [r, ...a] = t;
|
|
175
|
+
if (e[r]) {
|
|
176
|
+
if (a.length === 0) {
|
|
177
|
+
let t = !e[r].defaultOpen;
|
|
178
|
+
n === "multi" ? e[r].defaultOpen = t : e.forEach((e, n) => {
|
|
179
|
+
e.defaultOpen = n === r && t;
|
|
180
|
+
});
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
Array.isArray(e[r].children) || (e[r].children = []), i(e[r].children, a);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
return i(r, t), r;
|
|
187
|
+
}
|
|
150
188
|
//#endregion
|
|
151
189
|
//#region src/utilities/iconSvgStatic.ts
|
|
152
|
-
var
|
|
190
|
+
var C = {
|
|
153
191
|
"a-arrow-down": [
|
|
154
192
|
["path", { d: "m14 12 4 4 4-4" }],
|
|
155
193
|
["path", { d: "M18 16V7" }],
|
|
@@ -14969,18 +15007,18 @@ var v = {
|
|
|
14969
15007
|
y2: "11"
|
|
14970
15008
|
}]
|
|
14971
15009
|
]
|
|
14972
|
-
},
|
|
14973
|
-
function
|
|
15010
|
+
}, w = "circle-help";
|
|
15011
|
+
function T(e) {
|
|
14974
15012
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
14975
15013
|
}
|
|
14976
|
-
function
|
|
14977
|
-
let t = e || "HelpCircle", n =
|
|
14978
|
-
if (
|
|
15014
|
+
function E(e) {
|
|
15015
|
+
let t = e || "HelpCircle", n = T(t.replace(/^\w/, (e) => e.toUpperCase()));
|
|
15016
|
+
if (C[n]) return n;
|
|
14979
15017
|
let r = t.toLowerCase().replace(/[-_\s]/g, "");
|
|
14980
|
-
return Object.keys(
|
|
15018
|
+
return Object.keys(C).find((e) => e.replace(/-/g, "") === r) || w;
|
|
14981
15019
|
}
|
|
14982
|
-
function
|
|
14983
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(
|
|
15020
|
+
function D(e, t, n) {
|
|
15021
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(C[E(e)] || C[w] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
|
|
14984
15022
|
}
|
|
14985
15023
|
//#endregion
|
|
14986
|
-
export {
|
|
15024
|
+
export { c as a, g as c, _ as d, u as f, a as i, n as l, S as m, x as n, o, h as p, i as r, r as s, D as t, t as u };
|