impaktapps-ui-builder 0.0.963-copyElement.1027 → 0.0.963-copyElement.1028

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.
@@ -8442,9 +8442,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8442
8442
  const rowId = dynamicData2.path.split(".")[1];
8443
8443
  const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8444
8444
  const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
8445
- const formData = getFormdataFromSessionStorage(copiedElementPath);
8446
- this.ElementPathSetter(uiSchema);
8447
- sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8445
+ const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
8446
+ this.ElementPathSetter(uiSchema, copiedFormData);
8447
+ sessionStorage.setItem("copiedConfig", JSON.stringify(copiedFormData));
8448
8448
  store2.setSchema(schema2);
8449
8449
  store2.setUiSchema(uiSchema);
8450
8450
  },
@@ -8496,8 +8496,8 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8496
8496
  }
8497
8497
  return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
8498
8498
  },
8499
- ElementPathSetter: function(uiSchema) {
8500
- const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8499
+ ElementPathSetter: function(uiSchema, copiedFormData) {
8500
+ const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
8501
8501
  const completePath = formData.pageName.split(">").map((item) => item.trim());
8502
8502
  const componentName = completePath[completePath.length - 2];
8503
8503
  const elementHeading = formData.name ? `Copied Element: ${formData.name}` : `Copied Event: ${componentName} Event Type: ${formData.eventType} `;