bhl-forms 0.0.47 → 0.0.48
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/bhl-forms.es.js +8 -4
- package/dist/bhl-forms.iife.js +6 -6
- package/dist/bhl-forms.modern.es.js +8 -4
- package/dist/bhl-forms.modern.iife.js +8 -8
- package/dist/bhl-forms.modern.umd.js +8 -8
- package/dist/bhl-forms.umd.js +6 -6
- package/dist/forms/childAndFamily.es.js +1 -1
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/generalLegal.es.js +1 -1
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/testForm.es.js +1 -1
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/package.json +1 -1
package/dist/bhl-forms.es.js
CHANGED
|
@@ -11194,10 +11194,7 @@ function getCoords(elem) {
|
|
|
11194
11194
|
left: box2.left + window.pageXOffset
|
|
11195
11195
|
};
|
|
11196
11196
|
}
|
|
11197
|
-
const
|
|
11198
|
-
if (!stepResult) {
|
|
11199
|
-
return;
|
|
11200
|
-
}
|
|
11197
|
+
const scrollAnchor = (formNode) => () => {
|
|
11201
11198
|
const anchorId = formNode.attrs.anchorElement || formNode.id;
|
|
11202
11199
|
if (anchorId) {
|
|
11203
11200
|
const anchor = document.getElementById(anchorId);
|
|
@@ -11206,6 +11203,12 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
11206
11203
|
window.scrollTo(pos.right, pos.top);
|
|
11207
11204
|
}
|
|
11208
11205
|
}
|
|
11206
|
+
};
|
|
11207
|
+
const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
11208
|
+
if (!stepResult) {
|
|
11209
|
+
return;
|
|
11210
|
+
}
|
|
11211
|
+
scrollAnchor(formNode)();
|
|
11209
11212
|
var step_values = null;
|
|
11210
11213
|
if (stepHistory2.value.length > 0) {
|
|
11211
11214
|
step_values = flattenObj(formNode.value[stepHistory2.value[stepHistory2.value.length - 1]] || {});
|
|
@@ -15618,6 +15621,7 @@ const init = () => {
|
|
|
15618
15621
|
data.submitUrl = data.submitUrl || defaultSubmitUrl;
|
|
15619
15622
|
data.prepData = data.prepData || prepData;
|
|
15620
15623
|
data.fireStepEvent = data.fireStepEvent || fireStepEvent;
|
|
15624
|
+
data.scrollAnchor = data.scrollAnchor || scrollAnchor;
|
|
15621
15625
|
data.onEnter = (callback) => (e2) => {
|
|
15622
15626
|
if (e2.key === "Enter" || e2.keyCode === 13) {
|
|
15623
15627
|
callback();
|