@embedreach/components 0.2.13 → 0.2.15
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/chunks/index.js +38 -6
- package/dist/index.umd.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -63053,6 +63053,44 @@ const MissingSenderForPreview = ({
|
|
|
63053
63053
|
] });
|
|
63054
63054
|
};
|
|
63055
63055
|
const StripoEditor = ({ containerRef, stripoDialogDimensions, showSaving }) => {
|
|
63056
|
+
useEffect(() => {
|
|
63057
|
+
const handleWheel = (e4) => {
|
|
63058
|
+
const container22 = containerRef.current;
|
|
63059
|
+
if (!container22) return;
|
|
63060
|
+
const uiEditor = container22.querySelector("ui-editor");
|
|
63061
|
+
if (!uiEditor) return;
|
|
63062
|
+
const shadowRoot = uiEditor.shadowRoot;
|
|
63063
|
+
if (!shadowRoot) return;
|
|
63064
|
+
const rect = shadowRoot.host.getBoundingClientRect();
|
|
63065
|
+
const x3 = e4.clientX - rect.left;
|
|
63066
|
+
const y4 = e4.clientY - rect.top;
|
|
63067
|
+
const el = shadowRoot.elementFromPoint(x3, y4);
|
|
63068
|
+
function findScrollable(node) {
|
|
63069
|
+
while (node) {
|
|
63070
|
+
const style2 = getComputedStyle(node);
|
|
63071
|
+
if ((style2.overflowY === "auto" || style2.overflowY === "scroll") && node.scrollHeight > node.clientHeight) {
|
|
63072
|
+
return node;
|
|
63073
|
+
}
|
|
63074
|
+
node = node.parentElement;
|
|
63075
|
+
}
|
|
63076
|
+
return null;
|
|
63077
|
+
}
|
|
63078
|
+
const scrollable = findScrollable(el) || shadowRoot.firstElementChild;
|
|
63079
|
+
if (!scrollable) return;
|
|
63080
|
+
scrollable.scrollTop += e4.deltaY;
|
|
63081
|
+
scrollable.scrollLeft += e4.deltaX;
|
|
63082
|
+
e4.preventDefault();
|
|
63083
|
+
};
|
|
63084
|
+
const container2 = containerRef.current;
|
|
63085
|
+
if (container2) {
|
|
63086
|
+
container2.addEventListener("wheel", handleWheel, { passive: false });
|
|
63087
|
+
}
|
|
63088
|
+
return () => {
|
|
63089
|
+
if (container2) {
|
|
63090
|
+
container2.removeEventListener("wheel", handleWheel);
|
|
63091
|
+
}
|
|
63092
|
+
};
|
|
63093
|
+
}, [containerRef]);
|
|
63056
63094
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center", children: [
|
|
63057
63095
|
/* @__PURE__ */ jsx(
|
|
63058
63096
|
"div",
|
|
@@ -64546,12 +64584,6 @@ const EditCampaignContent = ({
|
|
|
64546
64584
|
}
|
|
64547
64585
|
});
|
|
64548
64586
|
} else {
|
|
64549
|
-
if (communicationGroup?.id && communicationGroup.extraMergeFields !== null) {
|
|
64550
|
-
updateCommunicationGroup2({
|
|
64551
|
-
groupId: communicationGroup?.id,
|
|
64552
|
-
params: { extraMergeFields: null }
|
|
64553
|
-
});
|
|
64554
|
-
}
|
|
64555
64587
|
setMergeFieldsResponse(getMergeFields$1);
|
|
64556
64588
|
}
|
|
64557
64589
|
}, [
|