jupiter-dynamic-forms 1.14.1 → 1.14.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/core/dynamic-form.d.ts +1 -0
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7278,6 +7278,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7278
7278
|
console.log("📝 Form submission started...");
|
|
7279
7279
|
this._submitted = true;
|
|
7280
7280
|
if (this.mode === "admin") {
|
|
7281
|
+
this._handleSaveDraft();
|
|
7281
7282
|
this._handleAdminModeSubmit();
|
|
7282
7283
|
return;
|
|
7283
7284
|
}
|
|
@@ -8358,15 +8359,30 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8358
8359
|
}
|
|
8359
8360
|
return updatedRole;
|
|
8360
8361
|
});
|
|
8362
|
+
const savedMetadata = this.dynaformsMetadata || this._loadMetadataFromLocalStorage();
|
|
8363
|
+
console.log("📋 Updated Presentation Data:", updatedPresentationData);
|
|
8364
|
+
console.log("📋 Metadata from localStorage:", savedMetadata);
|
|
8361
8365
|
this.dispatchEvent(new CustomEvent("admin-config-updated", {
|
|
8362
8366
|
detail: {
|
|
8363
8367
|
presentationData: updatedPresentationData,
|
|
8364
|
-
roleConfigs: this._adminRoleConfigs
|
|
8368
|
+
roleConfigs: this._adminRoleConfigs,
|
|
8369
|
+
metadata: savedMetadata
|
|
8365
8370
|
},
|
|
8366
8371
|
bubbles: true,
|
|
8367
8372
|
composed: true
|
|
8368
8373
|
}));
|
|
8369
|
-
console.log("✅ Admin configuration saved successfully");
|
|
8374
|
+
console.log("✅ Admin configuration saved successfully with metadata");
|
|
8375
|
+
}
|
|
8376
|
+
_loadMetadataFromLocalStorage() {
|
|
8377
|
+
try {
|
|
8378
|
+
const metadataStr = localStorage.getItem("jupiter-form-draft-metadata");
|
|
8379
|
+
if (metadataStr) {
|
|
8380
|
+
return JSON.parse(metadataStr);
|
|
8381
|
+
}
|
|
8382
|
+
} catch (error2) {
|
|
8383
|
+
console.error("Failed to load metadata from localStorage:", error2);
|
|
8384
|
+
}
|
|
8385
|
+
return null;
|
|
8370
8386
|
}
|
|
8371
8387
|
_renderAccordionLayout(schema, config, showValidationSummary, errorCount) {
|
|
8372
8388
|
return html`
|
|
@@ -8610,13 +8626,15 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8610
8626
|
</button>
|
|
8611
8627
|
` : ""}
|
|
8612
8628
|
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8629
|
+
${this.mode !== "admin" ? html`
|
|
8630
|
+
<button
|
|
8631
|
+
class="btn-secondary"
|
|
8632
|
+
@click="${this._handleSaveDraft}"
|
|
8633
|
+
?disabled="${this.disabled || this.readonly}"
|
|
8634
|
+
>
|
|
8635
|
+
${I18n.t("form.saveDraft")}
|
|
8636
|
+
</button>
|
|
8637
|
+
` : ""}
|
|
8620
8638
|
|
|
8621
8639
|
<button
|
|
8622
8640
|
class="btn-primary"
|