@saasbase-io/core-elements 1.1.0 → 1.1.1

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.mjs CHANGED
@@ -24049,7 +24049,7 @@ let Yt = class extends E {
24049
24049
  async _onSubmit(e, t) {
24050
24050
  e.preventDefault();
24051
24051
  const s = e.submitter;
24052
- if (!s || !t || s.id !== t) return;
24052
+ if (!s || !t || this.loadingButtons[t] || s.id !== t) return;
24053
24053
  const o = this._findButtonById(t);
24054
24054
  o && await this.handleEvent(o.properties.event, o);
24055
24055
  }
@@ -24131,22 +24131,26 @@ let Yt = class extends E {
24131
24131
  } finally {
24132
24132
  this.eventEmitting = !1;
24133
24133
  }
24134
- else if ((s = t.properties.requires_valid) == null || s.forEach((i) => {
24135
- Xo(this, i, "submit"), this.requestUpdate();
24136
- }), !(((o = t.properties.requires_valid) == null ? void 0 : o.some(
24137
- (i) => {
24138
- var n, l;
24139
- return ((l = (n = this.errors) == null ? void 0 : n[i]) == null ? void 0 : l.length) > 0;
24140
- }
24141
- )) ?? !1)) {
24142
- this.loadingButtons = { ...this.loadingButtons, [t.id]: !0 }, this.eventEmitting = !0;
24143
- try {
24144
- await qt.processLoginflowEvent({
24145
- event: e,
24146
- data: this.formData
24147
- });
24148
- } finally {
24149
- this.loadingButtons = { ...this.loadingButtons, [t.id]: !1 }, this.eventEmitting = !1;
24134
+ else {
24135
+ if (this.loadingButtons[t.id])
24136
+ return;
24137
+ if ((s = t.properties.requires_valid) == null || s.forEach((i) => {
24138
+ Xo(this, i, "submit"), this.requestUpdate();
24139
+ }), !(((o = t.properties.requires_valid) == null ? void 0 : o.some(
24140
+ (i) => {
24141
+ var n, l;
24142
+ return ((l = (n = this.errors) == null ? void 0 : n[i]) == null ? void 0 : l.length) > 0;
24143
+ }
24144
+ )) ?? !1)) {
24145
+ this.loadingButtons = { ...this.loadingButtons, [t.id]: !0 }, this.eventEmitting = !0;
24146
+ try {
24147
+ await qt.processLoginflowEvent({
24148
+ event: e,
24149
+ data: this.formData
24150
+ });
24151
+ } finally {
24152
+ this.loadingButtons = { ...this.loadingButtons, [t.id]: !1 }, this.eventEmitting = !1;
24153
+ }
24150
24154
  }
24151
24155
  }
24152
24156
  }