@saasbase-io/core-elements 1.1.0 → 1.1.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.
package/dist/index.mjs CHANGED
@@ -1192,9 +1192,13 @@ class lr {
1192
1192
  }
1193
1193
  const n = yield this.loginflow.processEvent(t, (l) => M(this, void 0, void 0, function* () {
1194
1194
  var d;
1195
- !((d = l.data) === null || d === void 0) && d.conditional_create_enabled && (console.log("attempt to register a passkey conditionally"), yield this.registerPasskey(i, !0));
1195
+ if (!((d = l.data) === null || d === void 0) && d.conditional_create_enabled) {
1196
+ console.log("attempt to register a passkey conditionally");
1197
+ const u = yield this.registerPasskey(i, !0);
1198
+ u && (u.render_spec = void 0);
1199
+ }
1196
1200
  }));
1197
- if (r.onFlowStateChange) {
1201
+ if (console.log("render spec", n.render_spec), r.onFlowStateChange) {
1198
1202
  const l = sessionStorage.getItem("saasbase_loginflow_state");
1199
1203
  let d = "custom";
1200
1204
  if (l)
@@ -1271,7 +1275,7 @@ class lr {
1271
1275
  conditional: o
1272
1276
  }
1273
1277
  });
1274
- return console.log("passkey creation response", i), i;
1278
+ return console.log("passkey creation res", i), i;
1275
1279
  } catch (r) {
1276
1280
  console.log("error", r);
1277
1281
  }
@@ -24049,7 +24053,7 @@ let Yt = class extends E {
24049
24053
  async _onSubmit(e, t) {
24050
24054
  e.preventDefault();
24051
24055
  const s = e.submitter;
24052
- if (!s || !t || s.id !== t) return;
24056
+ if (!s || !t || this.loadingButtons[t] || s.id !== t) return;
24053
24057
  const o = this._findButtonById(t);
24054
24058
  o && await this.handleEvent(o.properties.event, o);
24055
24059
  }
@@ -24131,22 +24135,26 @@ let Yt = class extends E {
24131
24135
  } finally {
24132
24136
  this.eventEmitting = !1;
24133
24137
  }
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;
24138
+ else {
24139
+ if (this.loadingButtons[t.id])
24140
+ return;
24141
+ if ((s = t.properties.requires_valid) == null || s.forEach((i) => {
24142
+ Xo(this, i, "submit"), this.requestUpdate();
24143
+ }), !(((o = t.properties.requires_valid) == null ? void 0 : o.some(
24144
+ (i) => {
24145
+ var n, l;
24146
+ return ((l = (n = this.errors) == null ? void 0 : n[i]) == null ? void 0 : l.length) > 0;
24147
+ }
24148
+ )) ?? !1)) {
24149
+ this.loadingButtons = { ...this.loadingButtons, [t.id]: !0 }, this.eventEmitting = !0;
24150
+ try {
24151
+ await qt.processLoginflowEvent({
24152
+ event: e,
24153
+ data: this.formData
24154
+ });
24155
+ } finally {
24156
+ this.loadingButtons = { ...this.loadingButtons, [t.id]: !1 }, this.eventEmitting = !1;
24157
+ }
24150
24158
  }
24151
24159
  }
24152
24160
  }