impaktapps-ui-builder 0.0.963-copyElement.1019 → 0.0.963-copyElement.1021
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.
|
@@ -8431,9 +8431,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8431
8431
|
store2.updateDialog("popUpEventSection");
|
|
8432
8432
|
},
|
|
8433
8433
|
copyPasteElement: function(paramStore, setPage = this.setPage.bind(this)) {
|
|
8434
|
-
const path = dynamicData2.path.split(".")
|
|
8435
|
-
const actionType = path.split("_")[0];
|
|
8436
|
-
const elementType = path.split("_")[1];
|
|
8434
|
+
const path = dynamicData2.path.split(".").pop();
|
|
8435
|
+
const actionType = path == null ? void 0 : path.split("_")[0];
|
|
8436
|
+
const elementType = path == null ? void 0 : path.split("_")[1];
|
|
8437
8437
|
if (actionType === "Copy") {
|
|
8438
8438
|
this.CopyElement(paramStore, elementType);
|
|
8439
8439
|
} else {
|
|
@@ -8441,7 +8441,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8441
8441
|
}
|
|
8442
8442
|
},
|
|
8443
8443
|
elementPathHandler: function(parentPath, rowId, elementType) {
|
|
8444
|
-
if (elementType === "
|
|
8444
|
+
if (elementType === "Component") {
|
|
8445
8445
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8446
8446
|
}
|
|
8447
8447
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
@@ -8455,7 +8455,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8455
8455
|
const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8456
8456
|
const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
|
|
8457
8457
|
const formData = getFormdataFromSessionStorage(copiedElementPath);
|
|
8458
|
-
const elementHeading = elementType === "
|
|
8458
|
+
const elementHeading = elementType === "Component" ? `Copied Element: ${formData.name}` : `Copied Event: ${formData.eventType} `;
|
|
8459
8459
|
uiSchema.elements[2].elements[1].config.main.heading = elementHeading;
|
|
8460
8460
|
sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
|
|
8461
8461
|
store2.setSchema(schema2);
|