impaktapps-ui-builder 0.0.963-CopyComponent.2 → 0.0.963-CopyComponent.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/impaktapps-ui-builder.es.js +6 -6
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +4 -4
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +6 -3
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +5 -3
|
@@ -8248,17 +8248,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8248
8248
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8249
8249
|
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8250
8250
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
8251
|
-
sessionStorage.setItem("copiedComponent", formData);
|
|
8251
|
+
sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
|
|
8252
8252
|
},
|
|
8253
8253
|
PasteComponent: function() {
|
|
8254
8254
|
var _a;
|
|
8255
8255
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8256
8256
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8257
|
-
const updatedPath = `${path}.elements[${rowId}]`;
|
|
8257
|
+
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8258
8258
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
8259
8259
|
const insertComponentPath = formData.elements.length;
|
|
8260
8260
|
const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
8261
|
-
const copiedData = sessionStorage.getItem("copiedComponent");
|
|
8261
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
8262
8262
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
8263
8263
|
sessionStorage.removeItem("copiedComponent");
|
|
8264
8264
|
}
|
|
@@ -8362,17 +8362,17 @@ var pageMaster = (funcParams) => {
|
|
|
8362
8362
|
(_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
8363
8363
|
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8364
8364
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
8365
|
-
sessionStorage.setItem("copiedComponent", formData);
|
|
8365
|
+
sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
|
|
8366
8366
|
},
|
|
8367
8367
|
PasteComponent: function() {
|
|
8368
8368
|
var _a;
|
|
8369
8369
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8370
8370
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8371
|
-
const updatedPath = `${path}.elements[${rowId}]`;
|
|
8371
|
+
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8372
8372
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
8373
8373
|
const insertComponentPath = formData.elements.length;
|
|
8374
8374
|
const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
8375
|
-
const copiedData = sessionStorage.getItem("copiedComponent");
|
|
8375
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
8376
8376
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
8377
8377
|
sessionStorage.removeItem("copiedComponent");
|
|
8378
8378
|
}
|