jupiter-dynamic-forms 1.15.2 → 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 +19 -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,11 +8552,19 @@ 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
|
}
|
|
8555
8559
|
console.log(`✅ [Submit] No validation errors, proceeding with submission...`);
|
|
8556
8560
|
this._validateForm();
|
|
8561
|
+
if (!this._valid) {
|
|
8562
|
+
console.log("❌ [Submit] Cannot submit - form validation errors present:", this._errors);
|
|
8563
|
+
this._showErrorPopup = true;
|
|
8564
|
+
this._submitDisabled = false;
|
|
8565
|
+
this.requestUpdate();
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8557
8568
|
const submissionData = this._generateSubmissionData();
|
|
8558
8569
|
console.log("📊 Form Submission Data:", JSON.stringify(submissionData, null, 2));
|
|
8559
8570
|
console.log("📊 Submission Data Summary:");
|
|
@@ -8570,6 +8581,9 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8570
8581
|
bubbles: true
|
|
8571
8582
|
}));
|
|
8572
8583
|
console.log("✅ Form submit event dispatched");
|
|
8584
|
+
setTimeout(() => {
|
|
8585
|
+
this._submitDisabled = false;
|
|
8586
|
+
}, 1e3);
|
|
8573
8587
|
}
|
|
8574
8588
|
_handleSaveDraft() {
|
|
8575
8589
|
console.log(`🔵 [Save Draft] Checking for errors...`);
|
|
@@ -10403,10 +10417,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
10403
10417
|
</button>
|
|
10404
10418
|
` : ""}
|
|
10405
10419
|
|
|
10406
|
-
<button
|
|
10420
|
+
<button
|
|
10407
10421
|
class="btn-primary"
|
|
10408
10422
|
@click="${this._handleSubmit}"
|
|
10409
|
-
?disabled="${this.disabled || this.readonly}"
|
|
10423
|
+
?disabled="${this.disabled || this.readonly || this._submitDisabled}"
|
|
10410
10424
|
>
|
|
10411
10425
|
${this.submitButtonLabel || I18n.t("form.submit")}
|
|
10412
10426
|
</button>
|
|
@@ -11316,6 +11330,9 @@ __decorateClass([
|
|
|
11316
11330
|
__decorateClass([
|
|
11317
11331
|
r()
|
|
11318
11332
|
], JupiterDynamicForm.prototype, "_showErrorPopup", 2);
|
|
11333
|
+
__decorateClass([
|
|
11334
|
+
r()
|
|
11335
|
+
], JupiterDynamicForm.prototype, "_submitDisabled", 2);
|
|
11319
11336
|
__decorateClass([
|
|
11320
11337
|
r()
|
|
11321
11338
|
], JupiterDynamicForm.prototype, "_currentSchema", 2);
|