easy-email-pro-theme 1.38.4 → 1.38.5
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 +36 -24
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2056,7 +2056,11 @@ const ElementPlaceholder$1 = ({ element, nodeElement, isSelected, isHover, path:
|
|
|
2056
2056
|
renderContent = /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderContent, /* @__PURE__ */ React__default.createElement("div", { className: "wrapper-category-hover" }));
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
|
-
|
|
2059
|
+
let parentElement = void 0;
|
|
2060
|
+
try {
|
|
2061
|
+
parentElement = Node$1.get(editor, Path.parent(path2));
|
|
2062
|
+
} catch (error2) {
|
|
2063
|
+
}
|
|
2060
2064
|
if (isUnsetElement && parentElement && NodeUtils.isContentElement(parentElement)) {
|
|
2061
2065
|
isContentElement = true;
|
|
2062
2066
|
}
|
|
@@ -7551,23 +7555,27 @@ const BlockLayer = () => {
|
|
|
7551
7555
|
);
|
|
7552
7556
|
const onSelect = useCallback$1(
|
|
7553
7557
|
(item2) => {
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
node
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7558
|
+
try {
|
|
7559
|
+
const currentPath = ReactEditor.findPath(editor, item2.data);
|
|
7560
|
+
const element = Node$1.get(editor, currentPath);
|
|
7561
|
+
if (!NodeUtils.isBlockElement(element) || NodeUtils.isUnsetElement(element)) {
|
|
7562
|
+
return;
|
|
7563
|
+
}
|
|
7564
|
+
setSelectedNodePath(currentPath);
|
|
7565
|
+
if (scrollWhenSelect) {
|
|
7566
|
+
setTimeout(() => {
|
|
7567
|
+
const node = ReactEditor.toDOMNode(editor, item2.data);
|
|
7568
|
+
if (node) {
|
|
7569
|
+
node.scrollIntoView({
|
|
7570
|
+
block: "center",
|
|
7571
|
+
behavior: "smooth",
|
|
7572
|
+
inline: "center"
|
|
7573
|
+
});
|
|
7574
|
+
}
|
|
7575
|
+
}, 200);
|
|
7576
|
+
}
|
|
7577
|
+
} catch (error2) {
|
|
7578
|
+
console.log(error2);
|
|
7571
7579
|
}
|
|
7572
7580
|
},
|
|
7573
7581
|
[editor, scrollWhenSelect, setSelectedNodePath]
|
|
@@ -7921,13 +7929,17 @@ const ConfigurationPanel = ({
|
|
|
7921
7929
|
const { quantityLimitCheck, compact } = useEditorProps();
|
|
7922
7930
|
const { copyBlock, deleteBlock, isChanged, resetSelectedNode } = useElementInteract();
|
|
7923
7931
|
const onCopy = useEventCallback((path2) => {
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7932
|
+
try {
|
|
7933
|
+
if (quantityLimitCheck && !quantityLimitCheck({
|
|
7934
|
+
element: Node$1.get(editor, path2),
|
|
7935
|
+
pageData: editor.children[0]
|
|
7936
|
+
})) {
|
|
7937
|
+
return;
|
|
7938
|
+
}
|
|
7939
|
+
copyBlock(path2);
|
|
7940
|
+
} catch (error2) {
|
|
7941
|
+
console.error(error2);
|
|
7929
7942
|
}
|
|
7930
|
-
copyBlock(path2);
|
|
7931
7943
|
});
|
|
7932
7944
|
let element = null;
|
|
7933
7945
|
if (selectedNodePath) {
|