bhl-forms 0.0.47 → 0.0.50

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.
@@ -11194,10 +11194,7 @@ function getCoords(elem) {
11194
11194
  left: box2.left + window.pageXOffset
11195
11195
  };
11196
11196
  }
11197
- const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
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]] || {});
@@ -11307,7 +11310,7 @@ var theme = {
11307
11310
  tel: textClassification,
11308
11311
  text: textClassification,
11309
11312
  textarea: __spreadProps(__spreadValues({}, textClassification), {
11310
- input: "t-block t-w-full t-h-48 t-px-3 t-pt-1 t-border-none t-text-base t-text-gray-700 t-placeholder-gray-400 placeholder:t-text-base focus:t-shadow-outline"
11313
+ input: "t-block t-w-full t-h-40 t-px-3 t-pt-1 t-border-none t-text-base t-text-gray-700 t-placeholder-gray-400 placeholder:t-text-base focus:t-shadow-outline"
11311
11314
  }),
11312
11315
  time: textClassification,
11313
11316
  url: textClassification,
@@ -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();