@ivanholiak/easy-email-extensions 4.16.7 → 4.16.8
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.
|
@@ -29,7 +29,13 @@ export interface ExtensionProps extends BlockLayerProps {
|
|
|
29
29
|
} | {
|
|
30
30
|
label: string;
|
|
31
31
|
active?: boolean;
|
|
32
|
-
blocks: Array<React.ReactNode
|
|
32
|
+
blocks: Array<React.ReactNode | {
|
|
33
|
+
type: string;
|
|
34
|
+
payload?: any;
|
|
35
|
+
title?: string;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
canDragAndDrop?: boolean;
|
|
38
|
+
}>;
|
|
33
39
|
displayType: 'custom';
|
|
34
40
|
}>;
|
|
35
41
|
showSourceCode?: boolean;
|
package/lib/index2.js
CHANGED
|
@@ -59147,9 +59147,25 @@ function Blocks() {
|
|
|
59147
59147
|
contentStyle: { padding: 0, paddingBottom: 0, paddingTop: 20 },
|
|
59148
59148
|
name: cat.label,
|
|
59149
59149
|
header: cat.label
|
|
59150
|
-
}, /* @__PURE__ */ React__default.createElement(Grid$1.Row, null, cat.blocks.map((item2,
|
|
59150
|
+
}, /* @__PURE__ */ React__default.createElement(Grid$1.Row, null, cat.blocks.map((item2, blockIndex) => {
|
|
59151
|
+
if (typeof item2 === "object" && item2 !== null && !React__default.isValidElement(item2) && "type" in item2 && "children" in item2) {
|
|
59152
|
+
const customBlock = item2;
|
|
59153
|
+
const canDragAndDrop = customBlock.canDragAndDrop !== false;
|
|
59154
|
+
const blockContent = /* @__PURE__ */ React__default.createElement("div", {
|
|
59155
|
+
className: styles$2.blockItemContainer
|
|
59156
|
+
}, customBlock.children);
|
|
59157
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
59158
|
+
key: blockIndex,
|
|
59159
|
+
className: styles$2.blockItem
|
|
59160
|
+
}, canDragAndDrop ? /* @__PURE__ */ React__default.createElement(BlockAvatarWrapper, {
|
|
59161
|
+
type: customBlock.type,
|
|
59162
|
+
payload: customBlock.payload
|
|
59163
|
+
}, blockContent) : /* @__PURE__ */ React__default.createElement("div", {
|
|
59164
|
+
style: { cursor: "not-allowed", opacity: 0.6 }
|
|
59165
|
+
}, blockContent));
|
|
59166
|
+
}
|
|
59151
59167
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, {
|
|
59152
|
-
key:
|
|
59168
|
+
key: blockIndex
|
|
59153
59169
|
}, item2);
|
|
59154
59170
|
})));
|
|
59155
59171
|
}
|