easy-email-pro-theme 1.50.7 → 1.50.9
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.js +100 -45
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -15720,13 +15720,47 @@ const TextAlign$1 = () => {
|
|
|
15720
15720
|
match: (n) => NodeUtils.isContentElement(n),
|
|
15721
15721
|
mode: "all"
|
|
15722
15722
|
});
|
|
15723
|
+
const { enabledHtmlBlockNodeAlign } = useEditorProps();
|
|
15723
15724
|
const node = match == null ? void 0 : match[0];
|
|
15724
15725
|
const { setFieldValue } = useEditorContext();
|
|
15725
15726
|
const matchAlign = match && get(node.attributes, "align");
|
|
15726
15727
|
const onAlignHandle = (align) => {
|
|
15727
15728
|
if (!match)
|
|
15728
15729
|
return;
|
|
15729
|
-
|
|
15730
|
+
if (!enabledHtmlBlockNodeAlign) {
|
|
15731
|
+
setFieldValue(match[1], "attributes.align", align);
|
|
15732
|
+
return;
|
|
15733
|
+
}
|
|
15734
|
+
const htmlBlockNodeElementEntry = Editor.above(editor, {
|
|
15735
|
+
match(node2, path2) {
|
|
15736
|
+
return NodeUtils.isHTMLBlockNodeElement(node2);
|
|
15737
|
+
},
|
|
15738
|
+
mode: "highest"
|
|
15739
|
+
});
|
|
15740
|
+
if (!htmlBlockNodeElementEntry) {
|
|
15741
|
+
Transforms.wrapNodes(
|
|
15742
|
+
editor,
|
|
15743
|
+
{
|
|
15744
|
+
type: ElementType.HTML_BLOCK_NODE,
|
|
15745
|
+
children: [],
|
|
15746
|
+
data: {
|
|
15747
|
+
tagName: "div"
|
|
15748
|
+
},
|
|
15749
|
+
attributes: {
|
|
15750
|
+
style: `text-align:${align};`
|
|
15751
|
+
}
|
|
15752
|
+
},
|
|
15753
|
+
{
|
|
15754
|
+
match: (node2) => !NodeUtils.isBlockElement(node2) && !NodeUtils.isHTMLBlockNodeElement(node2)
|
|
15755
|
+
}
|
|
15756
|
+
);
|
|
15757
|
+
} else {
|
|
15758
|
+
Transforms.setNodes(editor, {
|
|
15759
|
+
attributes: __spreadProps(__spreadValues({}, htmlBlockNodeElementEntry[0].attributes), {
|
|
15760
|
+
style: `text-align:${align};`
|
|
15761
|
+
})
|
|
15762
|
+
});
|
|
15763
|
+
}
|
|
15730
15764
|
};
|
|
15731
15765
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
15732
15766
|
FormatButton,
|
|
@@ -16017,6 +16051,13 @@ const Image$5 = () => {
|
|
|
16017
16051
|
const [from] = Form.useForm();
|
|
16018
16052
|
const onSubmit = (values) => {
|
|
16019
16053
|
var _a;
|
|
16054
|
+
let style = `max-width:100%;display:inline-block;`;
|
|
16055
|
+
if (values.width) {
|
|
16056
|
+
style += `width:${values.width};`;
|
|
16057
|
+
}
|
|
16058
|
+
if (values.height) {
|
|
16059
|
+
style += `height:${values.height};`;
|
|
16060
|
+
}
|
|
16020
16061
|
const imageNode = BlockManager.getBlockByType(ElementType.HTML_NODE).create(
|
|
16021
16062
|
{
|
|
16022
16063
|
type: ElementType.HTML_NODE,
|
|
@@ -16027,9 +16068,9 @@ const Image$5 = () => {
|
|
|
16027
16068
|
attributes: {
|
|
16028
16069
|
src: values.src,
|
|
16029
16070
|
alt: values.alt,
|
|
16030
|
-
width: values.width,
|
|
16031
|
-
height: values.height,
|
|
16032
|
-
style
|
|
16071
|
+
width: values.width ? values.width.replace("px", "") : "",
|
|
16072
|
+
height: values.height ? values.height.replace("px", "") : "",
|
|
16073
|
+
style
|
|
16033
16074
|
}
|
|
16034
16075
|
}
|
|
16035
16076
|
);
|
|
@@ -31709,6 +31750,7 @@ const HTMLEditor = ({
|
|
|
31709
31750
|
children,
|
|
31710
31751
|
wrapper
|
|
31711
31752
|
}) => {
|
|
31753
|
+
useState(null);
|
|
31712
31754
|
const [value, setValue] = useState(initialValue);
|
|
31713
31755
|
const [visible, setVisible] = useState(false);
|
|
31714
31756
|
const onSave = () => {
|
|
@@ -31735,65 +31777,78 @@ const HTMLEditor = ({
|
|
|
31735
31777
|
width: "100vw",
|
|
31736
31778
|
visible,
|
|
31737
31779
|
footer: null,
|
|
31780
|
+
zIndex: 1e4,
|
|
31781
|
+
style: { width: "100vw", height: "100vh" },
|
|
31738
31782
|
bodyStyle: { padding: 0, overflow: "hidden" }
|
|
31739
31783
|
},
|
|
31740
|
-
/* @__PURE__ */ React__default.createElement(
|
|
31741
|
-
Suspense,
|
|
31742
|
-
{
|
|
31743
|
-
fallback: /* @__PURE__ */ React__default.createElement(
|
|
31744
|
-
"div",
|
|
31745
|
-
{
|
|
31746
|
-
style: {
|
|
31747
|
-
height: "100%",
|
|
31748
|
-
width: "100%",
|
|
31749
|
-
display: "flex",
|
|
31750
|
-
alignItems: "center",
|
|
31751
|
-
backgroundColor: "#263238",
|
|
31752
|
-
justifyContent: "center",
|
|
31753
|
-
fontSize: 24,
|
|
31754
|
-
color: "#fff"
|
|
31755
|
-
}
|
|
31756
|
-
},
|
|
31757
|
-
t("Editor Loading...")
|
|
31758
|
-
)
|
|
31759
|
-
},
|
|
31760
|
-
/* @__PURE__ */ React__default.createElement(
|
|
31761
|
-
HTMLEditorEditorContent,
|
|
31762
|
-
{
|
|
31763
|
-
initialValue,
|
|
31764
|
-
onChange: setValue
|
|
31765
|
-
}
|
|
31766
|
-
)
|
|
31767
|
-
)), /* @__PURE__ */ React__default.createElement(
|
|
31784
|
+
/* @__PURE__ */ React__default.createElement(
|
|
31768
31785
|
"div",
|
|
31769
31786
|
{
|
|
31770
31787
|
style: {
|
|
31771
|
-
|
|
31788
|
+
display: "flex",
|
|
31772
31789
|
height: "100%",
|
|
31773
|
-
|
|
31774
|
-
marginRight: 10,
|
|
31775
|
-
textAlign: "center"
|
|
31790
|
+
pointerEvents: "auto"
|
|
31776
31791
|
}
|
|
31777
31792
|
},
|
|
31793
|
+
/* @__PURE__ */ React__default.createElement("div", { style: { flex: 1, height: "100%" } }, /* @__PURE__ */ React__default.createElement(
|
|
31794
|
+
Suspense,
|
|
31795
|
+
{
|
|
31796
|
+
fallback: /* @__PURE__ */ React__default.createElement(
|
|
31797
|
+
"div",
|
|
31798
|
+
{
|
|
31799
|
+
style: {
|
|
31800
|
+
height: "100%",
|
|
31801
|
+
width: "100%",
|
|
31802
|
+
display: "flex",
|
|
31803
|
+
alignItems: "center",
|
|
31804
|
+
backgroundColor: "#263238",
|
|
31805
|
+
justifyContent: "center",
|
|
31806
|
+
fontSize: 24,
|
|
31807
|
+
color: "#fff"
|
|
31808
|
+
}
|
|
31809
|
+
},
|
|
31810
|
+
t("Editor Loading...")
|
|
31811
|
+
)
|
|
31812
|
+
},
|
|
31813
|
+
/* @__PURE__ */ React__default.createElement(
|
|
31814
|
+
HTMLEditorEditorContent,
|
|
31815
|
+
{
|
|
31816
|
+
initialValue,
|
|
31817
|
+
onChange: setValue
|
|
31818
|
+
}
|
|
31819
|
+
)
|
|
31820
|
+
)),
|
|
31778
31821
|
/* @__PURE__ */ React__default.createElement(
|
|
31779
|
-
|
|
31822
|
+
"div",
|
|
31780
31823
|
{
|
|
31781
31824
|
style: {
|
|
31782
|
-
|
|
31783
|
-
|
|
31784
|
-
|
|
31825
|
+
flex: 1,
|
|
31826
|
+
height: "100%",
|
|
31827
|
+
overflow: "auto",
|
|
31828
|
+
marginRight: 10,
|
|
31829
|
+
textAlign: "center"
|
|
31785
31830
|
}
|
|
31786
31831
|
},
|
|
31787
31832
|
/* @__PURE__ */ React__default.createElement(
|
|
31788
|
-
|
|
31833
|
+
IframeComponent,
|
|
31789
31834
|
{
|
|
31790
|
-
|
|
31791
|
-
|
|
31835
|
+
style: {
|
|
31836
|
+
width: "600px",
|
|
31837
|
+
margin: "auto",
|
|
31838
|
+
minHeight: `calc(100vh - 60px)`
|
|
31792
31839
|
}
|
|
31793
|
-
}
|
|
31840
|
+
},
|
|
31841
|
+
/* @__PURE__ */ React__default.createElement(
|
|
31842
|
+
"div",
|
|
31843
|
+
{
|
|
31844
|
+
dangerouslySetInnerHTML: {
|
|
31845
|
+
__html: wrapper ? wrapper(value) : value
|
|
31846
|
+
}
|
|
31847
|
+
}
|
|
31848
|
+
)
|
|
31794
31849
|
)
|
|
31795
31850
|
)
|
|
31796
|
-
)
|
|
31851
|
+
)
|
|
31797
31852
|
), /* @__PURE__ */ React__default.createElement("div", { onClick: () => setVisible(true) }, children));
|
|
31798
31853
|
};
|
|
31799
31854
|
const Code = ({ nodePath }) => {
|