@mxenabled/connect-widget 0.15.1 → 0.15.3
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/index.es.js +28 -0
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -65468,6 +65468,7 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
65468
65468
|
}
|
|
65469
65469
|
)
|
|
65470
65470
|
] }),
|
|
65471
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
65471
65472
|
/* @__PURE__ */ jsxRuntimeExports.jsx(PrivateAndSecure, {})
|
|
65472
65473
|
] }),
|
|
65473
65474
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -76183,6 +76184,33 @@ const ManualAccountForm = React__default.forwardRef(
|
|
|
76183
76184
|
});
|
|
76184
76185
|
return schema;
|
|
76185
76186
|
}
|
|
76187
|
+
useEffect(() => {
|
|
76188
|
+
const handleFocus = (event) => {
|
|
76189
|
+
const focusedElement = event.target;
|
|
76190
|
+
if (formRef.current && focusedElement !== null) {
|
|
76191
|
+
const containerRect = formRef.current.getBoundingClientRect();
|
|
76192
|
+
const elementRect = focusedElement.getBoundingClientRect();
|
|
76193
|
+
const stickyHeader = document.querySelector(
|
|
76194
|
+
'[data-test="navigation-header"]'
|
|
76195
|
+
);
|
|
76196
|
+
const stickyHeaderHeight = stickyHeader ? stickyHeader.offsetHeight : 0;
|
|
76197
|
+
if (elementRect.top < containerRect.top + stickyHeaderHeight || // Account for sticky header
|
|
76198
|
+
elementRect.bottom > containerRect.bottom) {
|
|
76199
|
+
focusedElement.scrollIntoView({
|
|
76200
|
+
behavior: "smooth",
|
|
76201
|
+
block: "center"
|
|
76202
|
+
});
|
|
76203
|
+
if (stickyHeaderHeight > 0) {
|
|
76204
|
+
window.scrollBy(0, -stickyHeaderHeight);
|
|
76205
|
+
}
|
|
76206
|
+
}
|
|
76207
|
+
}
|
|
76208
|
+
};
|
|
76209
|
+
formRef.current?.addEventListener("focusin", handleFocus);
|
|
76210
|
+
return () => {
|
|
76211
|
+
formRef.current?.addEventListener("focusin", handleFocus);
|
|
76212
|
+
};
|
|
76213
|
+
}, [formRef]);
|
|
76186
76214
|
useEffect(() => {
|
|
76187
76215
|
if (!saving) return () => {
|
|
76188
76216
|
};
|