jupiter-dynamic-forms 1.15.3 → 1.15.5
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -10
- 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;
|
|
@@ -7245,12 +7246,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7245
7246
|
});
|
|
7246
7247
|
console.log("✅ Custom order applied to _allSections:", this._allSections.map((s2) => s2.title));
|
|
7247
7248
|
}
|
|
7248
|
-
if (this.roleFilterAxes && this.roleFilterAxes.length > 0) {
|
|
7249
|
-
this._allSections = this._filterRolesByAxisConfig(this._allSections);
|
|
7250
|
-
}
|
|
7251
7249
|
if (this._selectedRoleIds.length === 0) {
|
|
7252
|
-
this.
|
|
7253
|
-
|
|
7250
|
+
const initialSections = this.roleFilterAxes && this.roleFilterAxes.length > 0 ? this._filterRolesByAxisConfig(this._allSections) : this._allSections;
|
|
7251
|
+
this._selectedRoleIds = initialSections.map((section2) => section2.id);
|
|
7252
|
+
console.log(`✅ Auto-selected ${this._selectedRoleIds.length} roles (of ${this._allSections.length} total)`);
|
|
7254
7253
|
}
|
|
7255
7254
|
this._applyRoleFilter();
|
|
7256
7255
|
this._columns = [
|
|
@@ -8538,9 +8537,11 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8538
8537
|
_handleSubmit() {
|
|
8539
8538
|
console.log("📝 Form submission started...");
|
|
8540
8539
|
this._submitted = true;
|
|
8540
|
+
this._submitDisabled = true;
|
|
8541
8541
|
if (this.mode === "admin") {
|
|
8542
8542
|
this._handleSaveDraft();
|
|
8543
8543
|
this._handleAdminModeSubmit();
|
|
8544
|
+
this._submitDisabled = false;
|
|
8544
8545
|
return;
|
|
8545
8546
|
}
|
|
8546
8547
|
console.log(`🔵 [Submit] Checking for errors...`);
|
|
@@ -8549,6 +8550,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8549
8550
|
if (this._xbrlFormErrors.length > 0) {
|
|
8550
8551
|
console.log("❌ [Submit] Cannot submit - validation errors present:", this._xbrlFormErrors);
|
|
8551
8552
|
this._showErrorPopup = true;
|
|
8553
|
+
this._submitDisabled = false;
|
|
8552
8554
|
this.requestUpdate();
|
|
8553
8555
|
return;
|
|
8554
8556
|
}
|
|
@@ -8557,6 +8559,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8557
8559
|
if (!this._valid) {
|
|
8558
8560
|
console.log("❌ [Submit] Cannot submit - form validation errors present:", this._errors);
|
|
8559
8561
|
this._showErrorPopup = true;
|
|
8562
|
+
this._submitDisabled = false;
|
|
8560
8563
|
this.requestUpdate();
|
|
8561
8564
|
return;
|
|
8562
8565
|
}
|
|
@@ -8576,6 +8579,9 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8576
8579
|
bubbles: true
|
|
8577
8580
|
}));
|
|
8578
8581
|
console.log("✅ Form submit event dispatched");
|
|
8582
|
+
setTimeout(() => {
|
|
8583
|
+
this._submitDisabled = false;
|
|
8584
|
+
}, 1e3);
|
|
8579
8585
|
}
|
|
8580
8586
|
_handleSaveDraft() {
|
|
8581
8587
|
console.log(`🔵 [Save Draft] Checking for errors...`);
|
|
@@ -8734,9 +8740,6 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8734
8740
|
this._periodPreferences
|
|
8735
8741
|
);
|
|
8736
8742
|
this._allSections = [...this._currentSchema.sections];
|
|
8737
|
-
if (this.roleFilterAxes && this.roleFilterAxes.length > 0) {
|
|
8738
|
-
this._allSections = this._filterRolesByAxisConfig(this._allSections);
|
|
8739
|
-
}
|
|
8740
8743
|
console.log("✅ Schema rebuilt with restored period preferences");
|
|
8741
8744
|
console.log("🔄 Applying custom period data to schema fields...");
|
|
8742
8745
|
this._applyCustomPeriodDataToFields();
|
|
@@ -10409,10 +10412,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
10409
10412
|
</button>
|
|
10410
10413
|
` : ""}
|
|
10411
10414
|
|
|
10412
|
-
<button
|
|
10415
|
+
<button
|
|
10413
10416
|
class="btn-primary"
|
|
10414
10417
|
@click="${this._handleSubmit}"
|
|
10415
|
-
?disabled="${this.disabled || this.readonly}"
|
|
10418
|
+
?disabled="${this.disabled || this.readonly || this._submitDisabled}"
|
|
10416
10419
|
>
|
|
10417
10420
|
${this.submitButtonLabel || I18n.t("form.submit")}
|
|
10418
10421
|
</button>
|
|
@@ -11322,6 +11325,9 @@ __decorateClass([
|
|
|
11322
11325
|
__decorateClass([
|
|
11323
11326
|
r()
|
|
11324
11327
|
], JupiterDynamicForm.prototype, "_showErrorPopup", 2);
|
|
11328
|
+
__decorateClass([
|
|
11329
|
+
r()
|
|
11330
|
+
], JupiterDynamicForm.prototype, "_submitDisabled", 2);
|
|
11325
11331
|
__decorateClass([
|
|
11326
11332
|
r()
|
|
11327
11333
|
], JupiterDynamicForm.prototype, "_currentSchema", 2);
|