easy-email-pro-editor 1.43.2 → 1.44.0
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/lib/index-c8c9b559.js +33 -0
- package/lib/index.js +15646 -53
- package/lib/typings/components/Elements/atom/HtmlNode.d.ts +2 -1
- package/lib/typings/components/Elements/atom/Page/FrozenFooterSlateRender.d.ts +5 -1
- package/lib/typings/components/Elements/atom/Page/FrozenHeaderSlateRender.d.ts +5 -1
- package/lib/typings/components/FrozenSlateRender/index.d.ts +4 -2
- package/lib/typings/constants/index.d.ts +1 -0
- package/package.json +1 -1
- package/lib/index-a1b1af29.js +0 -15549
- package/lib/index-fb967edb.js +0 -39
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import n, { useRef as p, useMemo as l } from "react";
|
|
2
|
+
import { isEqual as u } from "lodash";
|
|
3
|
+
import { EditorAuth as E, EditorCore as s } from "easy-email-pro-core";
|
|
4
|
+
import { MJMLElementRender as d } from "./index.js";
|
|
5
|
+
import "slate";
|
|
6
|
+
import "slate-react";
|
|
7
|
+
import "slate-history";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
const b = ({
|
|
10
|
+
element: r,
|
|
11
|
+
context: e,
|
|
12
|
+
isMobileActive: t
|
|
13
|
+
}) => {
|
|
14
|
+
if (!E.getFeatureEnabled("FROZEN_BLOCK"))
|
|
15
|
+
throw new Error("Current plan do not support FROZEN_BLOCK");
|
|
16
|
+
const o = p(r), a = l(() => (u(o.current, r) || (o.current = r), o.current), [r]), m = s.elementToMjml(a, {
|
|
17
|
+
pageElement: e,
|
|
18
|
+
mode: "testing",
|
|
19
|
+
keepEmptyAttributes: !0,
|
|
20
|
+
displayMode: t ? "only-mobile" : "only-desktop"
|
|
21
|
+
});
|
|
22
|
+
return l(() => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
23
|
+
d,
|
|
24
|
+
{
|
|
25
|
+
context: e,
|
|
26
|
+
mjmlString: m,
|
|
27
|
+
isMobileActive: t
|
|
28
|
+
}
|
|
29
|
+
)), [e, t, m]);
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
b as default
|
|
33
|
+
};
|