bhl-forms 0.0.46 → 0.0.49

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,13 +11310,28 @@ 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,
11314
11317
  week: textClassification
11315
11318
  };
11316
11319
  var index = "";
11320
+ if (!Object.fromEntries) {
11321
+ Object.defineProperty(Object, "fromEntries", {
11322
+ value(entries) {
11323
+ if (!entries || !entries[Symbol.iterator]) {
11324
+ throw new Error("Object.fromEntries() requires a single iterable argument");
11325
+ }
11326
+ const o2 = {};
11327
+ Object.keys(entries).forEach((key) => {
11328
+ const [k2, v] = entries[key];
11329
+ o2[k2] = v;
11330
+ });
11331
+ return o2;
11332
+ }
11333
+ });
11334
+ }
11317
11335
  function toInteger(dirtyNumber) {
11318
11336
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
11319
11337
  return NaN;
@@ -15603,6 +15621,12 @@ const init = () => {
15603
15621
  data.submitUrl = data.submitUrl || defaultSubmitUrl;
15604
15622
  data.prepData = data.prepData || prepData;
15605
15623
  data.fireStepEvent = data.fireStepEvent || fireStepEvent;
15624
+ data.scrollAnchor = data.scrollAnchor || scrollAnchor;
15625
+ data.onEnter = (callback) => (e2) => {
15626
+ if (e2.key === "Enter" || e2.keyCode === 13) {
15627
+ callback();
15628
+ }
15629
+ };
15606
15630
  const app = createApp(_sfc_main$1, { schema: schemaObj, data }).use(plugin$1, defaultConfig({
15607
15631
  inputs: {
15608
15632
  DatePicker: createInput(_sfc_main)