impaktapps-ui-builder 0.0.963-copyElement.1020 → 0.0.963-copyElement.1022

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.
@@ -8310,7 +8310,8 @@ const refreshPage = (type, store2) => {
8310
8310
  }
8311
8311
  if (sessionStorage.getItem("copiedConfig")) {
8312
8312
  const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8313
- UiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
8313
+ const elementHeading = formData.elements ? `Copied Element: ${formData.name}` : `Copied Event: ${formData.eventType} `;
8314
+ UiSchema.elements[2].elements[1].config.main.heading = elementHeading;
8314
8315
  }
8315
8316
  store2.setUiSchema(UiSchema);
8316
8317
  };
@@ -8431,9 +8432,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8431
8432
  store2.updateDialog("popUpEventSection");
8432
8433
  },
8433
8434
  copyPasteElement: function(paramStore, setPage = this.setPage.bind(this)) {
8434
- const path = dynamicData2.path.split(".")[2];
8435
- const actionType = path.split("_")[0];
8436
- const elementType = path.split("_")[1];
8435
+ const path = dynamicData2.path.split(".").pop();
8436
+ const actionType = path == null ? void 0 : path.split("_")[0];
8437
+ const elementType = path == null ? void 0 : path.split("_")[1];
8437
8438
  if (actionType === "Copy") {
8438
8439
  this.CopyElement(paramStore, elementType);
8439
8440
  } else {
@@ -8527,7 +8528,8 @@ var pageMaster = (funcParams) => {
8527
8528
  const UiSchema = _.cloneDeep(PageMasterUiSchema(store2.theme.myTheme));
8528
8529
  if (sessionStorage.getItem("copiedConfig")) {
8529
8530
  const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8530
- UiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
8531
+ const elementHeading = formData.elements ? `Copied Element: ${formData.name}` : `Copied Event: ${formData.eventType} `;
8532
+ UiSchema.elements[2].elements[1].config.main.heading = elementHeading;
8531
8533
  }
8532
8534
  return UiSchema;
8533
8535
  },
@@ -8694,6 +8696,9 @@ const EventSchema = {
8694
8696
  }
8695
8697
  }
8696
8698
  }
8699
+ },
8700
+ RemoveItemButton: {
8701
+ disabled: true
8697
8702
  }
8698
8703
  },
8699
8704
  required: ["eventType", "Handler"]
@@ -8911,7 +8916,7 @@ const EventUiSchema = (theme) => {
8911
8916
  config: {
8912
8917
  layout: { xs: 1, sm: 1 },
8913
8918
  main: {
8914
- onClick: "RemoveCopiedConfig",
8919
+ onClick: "RemoveItemButton",
8915
8920
  size: "large",
8916
8921
  icon: "RejectIcon",
8917
8922
  styleDefault: true
@@ -9487,6 +9492,13 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9487
9492
  },
9488
9493
  getFormData: Component(store2, dynamicData2, submitHandler, service2).getFormdata,
9489
9494
  getUiSchema: function() {
9495
+ const UiSchema = _.cloneDeep(EventUiSchema(store2.theme.myTheme));
9496
+ if (sessionStorage.getItem("copiedConfig")) {
9497
+ const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
9498
+ const elementHeading = formData.elements ? `Copied Element: ${formData.name}` : `Copied Event: ${formData.eventType} `;
9499
+ UiSchema.elements[2].elements[1].config.main.heading = elementHeading;
9500
+ }
9501
+ store2.setUiSchema(UiSchema);
9490
9502
  return EventUiSchema;
9491
9503
  },
9492
9504
  getSchema: () => {