impaktapps-ui-builder 0.0.963-copyElement.1018 → 0.0.963-copyElement.1019
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.
|
@@ -8472,15 +8472,15 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8472
8472
|
}
|
|
8473
8473
|
const pastedElementParentPath = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8474
8474
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
8475
|
-
const insertElementIndex = elementType === "
|
|
8475
|
+
const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
|
|
8476
8476
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
8477
8477
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8478
|
-
if (copiedConfig.Handler && elementType === "
|
|
8478
|
+
if (copiedConfig.Handler && elementType === "Component") {
|
|
8479
8479
|
store2.setNotify({
|
|
8480
8480
|
FailMessage: "The pasted content is invalid; the event cannot be integrated into the component section.",
|
|
8481
8481
|
Fail: true
|
|
8482
8482
|
});
|
|
8483
|
-
} else if (copiedConfig.elements && elementType === "
|
|
8483
|
+
} else if (copiedConfig.elements && elementType === "Event") {
|
|
8484
8484
|
store2.setNotify({
|
|
8485
8485
|
FailMessage: "The pasted content is invalid; the component cannot be integrated into the event section.",
|
|
8486
8486
|
Fail: true
|