impaktapps-ui-builder 0.0.963-copyElement.1004 → 0.0.963-copyElement.1006

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.
@@ -8441,7 +8441,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8441
8441
  const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8442
8442
  const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8443
8443
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
8444
- uiSchema.elements[4].config.main.heading = `Copied Element: ${formData.name}`;
8444
+ uiSchema.elements[4].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
8445
8445
  sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8446
8446
  store2.setSchema(schema2);
8447
8447
  store2.setUiSchema(uiSchema);
@@ -8454,7 +8454,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8454
8454
  const insertComponentPath = formData.elements.length;
8455
8455
  const finalPath = `${path}.elements[${insertComponentPath}]`;
8456
8456
  const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8457
- if (!copiedData.elements) {
8457
+ if (!copiedData.type) {
8458
8458
  store2.setNotify({
8459
8459
  FailMessage: "Pasting element not Valid",
8460
8460
  Fail: true