jupiter-dynamic-forms 1.15.3 → 1.15.4
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/core/dynamic-form.d.ts +1 -0
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7121,6 +7121,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7121
7121
|
this._submitted = false;
|
|
7122
7122
|
this._xbrlFormErrors = [];
|
|
7123
7123
|
this._showErrorPopup = false;
|
|
7124
|
+
this._submitDisabled = false;
|
|
7124
7125
|
this._allSections = [];
|
|
7125
7126
|
this._selectedRoleIds = [];
|
|
7126
7127
|
this._showFilterDialog = false;
|
|
@@ -8538,9 +8539,11 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8538
8539
|
_handleSubmit() {
|
|
8539
8540
|
console.log("📝 Form submission started...");
|
|
8540
8541
|
this._submitted = true;
|
|
8542
|
+
this._submitDisabled = true;
|
|
8541
8543
|
if (this.mode === "admin") {
|
|
8542
8544
|
this._handleSaveDraft();
|
|
8543
8545
|
this._handleAdminModeSubmit();
|
|
8546
|
+
this._submitDisabled = false;
|
|
8544
8547
|
return;
|
|
8545
8548
|
}
|
|
8546
8549
|
console.log(`🔵 [Submit] Checking for errors...`);
|
|
@@ -8549,6 +8552,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8549
8552
|
if (this._xbrlFormErrors.length > 0) {
|
|
8550
8553
|
console.log("❌ [Submit] Cannot submit - validation errors present:", this._xbrlFormErrors);
|
|
8551
8554
|
this._showErrorPopup = true;
|
|
8555
|
+
this._submitDisabled = false;
|
|
8552
8556
|
this.requestUpdate();
|
|
8553
8557
|
return;
|
|
8554
8558
|
}
|
|
@@ -8557,6 +8561,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8557
8561
|
if (!this._valid) {
|
|
8558
8562
|
console.log("❌ [Submit] Cannot submit - form validation errors present:", this._errors);
|
|
8559
8563
|
this._showErrorPopup = true;
|
|
8564
|
+
this._submitDisabled = false;
|
|
8560
8565
|
this.requestUpdate();
|
|
8561
8566
|
return;
|
|
8562
8567
|
}
|
|
@@ -8576,6 +8581,9 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8576
8581
|
bubbles: true
|
|
8577
8582
|
}));
|
|
8578
8583
|
console.log("✅ Form submit event dispatched");
|
|
8584
|
+
setTimeout(() => {
|
|
8585
|
+
this._submitDisabled = false;
|
|
8586
|
+
}, 1e3);
|
|
8579
8587
|
}
|
|
8580
8588
|
_handleSaveDraft() {
|
|
8581
8589
|
console.log(`🔵 [Save Draft] Checking for errors...`);
|
|
@@ -10409,10 +10417,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
10409
10417
|
</button>
|
|
10410
10418
|
` : ""}
|
|
10411
10419
|
|
|
10412
|
-
<button
|
|
10420
|
+
<button
|
|
10413
10421
|
class="btn-primary"
|
|
10414
10422
|
@click="${this._handleSubmit}"
|
|
10415
|
-
?disabled="${this.disabled || this.readonly}"
|
|
10423
|
+
?disabled="${this.disabled || this.readonly || this._submitDisabled}"
|
|
10416
10424
|
>
|
|
10417
10425
|
${this.submitButtonLabel || I18n.t("form.submit")}
|
|
10418
10426
|
</button>
|
|
@@ -11322,6 +11330,9 @@ __decorateClass([
|
|
|
11322
11330
|
__decorateClass([
|
|
11323
11331
|
r()
|
|
11324
11332
|
], JupiterDynamicForm.prototype, "_showErrorPopup", 2);
|
|
11333
|
+
__decorateClass([
|
|
11334
|
+
r()
|
|
11335
|
+
], JupiterDynamicForm.prototype, "_submitDisabled", 2);
|
|
11325
11336
|
__decorateClass([
|
|
11326
11337
|
r()
|
|
11327
11338
|
], JupiterDynamicForm.prototype, "_currentSchema", 2);
|