@gomusdev/web-components 1.27.0 → 1.27.2

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.
@@ -15349,7 +15349,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
15349
15349
  }
15350
15350
  function errors(fields) {
15351
15351
  if (!fields) return 0;
15352
- const ret = fields.filter((f) => f.mounted && f.errors?.length).length;
15352
+ const ret = fields.filter((f) => f.mounted && (f.errors?.length || f.apiErrors?.length)).length;
15353
15353
  return ret;
15354
15354
  }
15355
15355
  function AnnualTicketPersonalizationForm($$anchor, $$props) {
@@ -15557,6 +15557,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
15557
15557
  return;
15558
15558
  }
15559
15559
  for (const [key, value] of Object.entries(errors2)) {
15560
+ if (key === "full_messages ") continue;
15560
15561
  const field = this.fields.find((f) => f.apiKey === key);
15561
15562
  if (!field) {
15562
15563
  console.error(`(set apiErrors) Field with API key ${key} not found`);
@@ -16132,7 +16133,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
16132
16133
  }
16133
16134
  const beforeSubmit = go.config.forms.checkoutGuest?.beforeSubmit;
16134
16135
  if (beforeSubmit) {
16135
- beforeSubmit(form.details.formData);
16136
+ await beforeSubmit(form.details.formData);
16136
16137
  }
16137
16138
  const paymentUrl = checkout.data.meta.payment_url;
16138
16139
  go.config.navigateTo?.(paymentUrl);
@@ -15349,7 +15349,7 @@ function formFields(formId) {
15349
15349
  }
15350
15350
  function errors(fields) {
15351
15351
  if (!fields) return 0;
15352
- const ret = fields.filter((f) => f.mounted && f.errors?.length).length;
15352
+ const ret = fields.filter((f) => f.mounted && (f.errors?.length || f.apiErrors?.length)).length;
15353
15353
  return ret;
15354
15354
  }
15355
15355
  function AnnualTicketPersonalizationForm($$anchor, $$props) {
@@ -15557,6 +15557,7 @@ class FormDetails {
15557
15557
  return;
15558
15558
  }
15559
15559
  for (const [key, value] of Object.entries(errors2)) {
15560
+ if (key === "full_messages ") continue;
15560
15561
  const field = this.fields.find((f) => f.apiKey === key);
15561
15562
  if (!field) {
15562
15563
  console.error(`(set apiErrors) Field with API key ${key} not found`);
@@ -16132,7 +16133,7 @@ function CheckoutForm($$anchor, $$props) {
16132
16133
  }
16133
16134
  const beforeSubmit = go.config.forms.checkoutGuest?.beforeSubmit;
16134
16135
  if (beforeSubmit) {
16135
- beforeSubmit(form.details.formData);
16136
+ await beforeSubmit(form.details.formData);
16136
16137
  }
16137
16138
  const paymentUrl = checkout.data.meta.payment_url;
16138
16139
  go.config.navigateTo?.(paymentUrl);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.27.0",
7
+ "version": "1.27.2",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",