@charisol/plexo-sdk 1.0.38 → 1.0.40

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.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-BSPA3AY-.js";
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 };
@@ -1,4 +1,4 @@
1
- import { c as e, d as t, f as n, l as r, n as i, o as a, t as o, u as s } from "./iconSvgStatic-JHlo_YyU.js";
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 = r(l), t = e.filter((e) => c[e.provider]), n = e.filter((e) => !c[e.provider]);
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">${e(l).map((e) => `<mj-navbar-link href="${u(e.href)}">${u(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
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 e = s(l), t = l.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, r = (r, i, a) => {
61
- let o = a ? "th" : "td", s = a ? t.headerBgColor || "#f8fafc" : e.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", c = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569";
62
- return `<tr>${r.map((e) => `<${o} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${s}; color: ${c};">${u(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
63
- }, i = +!!e.enableHeader, a = e.enableFooter ? e.cells.length - 1 : e.cells.length;
64
- return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : ""}<tbody>${e.cells.slice(i, Math.max(i, a)).map((e, t) => r(e, t, !1)).join("")}</tbody>${e.enableFooter && e.cells.length > i ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
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) || "&nbsp;"}</${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 = n(v.videoUrl), t = v.linkType === "email" ? `mailto:${v.href || ""}` : v.href || v.videoUrl || "#";
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") {
@@ -17,6 +17,7 @@ export declare const ICONS: {
17
17
  table: React.JSX.Element;
18
18
  timer: React.JSX.Element;
19
19
  form: React.JSX.Element;
20
+ accordion: React.JSX.Element;
20
21
  columns: React.JSX.Element;
21
22
  icon: React.JSX.Element;
22
23
  row1: React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AccordionPropertiesAccordion: React.FC<any>;
@@ -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 v = {
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
- }, y = "circle-help";
14973
- function b(e) {
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 x(e) {
14977
- let t = e || "HelpCircle", n = b(t.replace(/^\w/, (e) => e.toUpperCase()));
14978
- if (v[n]) return n;
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(v).find((e) => e.replace(/-/g, "") === r) || y;
15018
+ return Object.keys(C).find((e) => e.replace(/-/g, "") === r) || w;
14981
15019
  }
14982
- function S(e, t, n) {
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">${(v[x(e)] || v[y] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
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 { o as a, n as c, u as d, h as f, c as i, t as l, i as n, r as o, a as r, g as s, S as t, _ as u };
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 };