impaktapps-ui-builder 0.0.963-CopyComponent.8 → 0.0.963-CopyComponent.9

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.
@@ -6495,7 +6495,10 @@ const ComponentSchema = {
6495
6495
  name: {
6496
6496
  type: "string"
6497
6497
  },
6498
- label: { type: "string" }
6498
+ label: { type: "string" },
6499
+ CopyComponent: {
6500
+ disabled: false
6501
+ }
6499
6502
  },
6500
6503
  required: ["name"]
6501
6504
  };
@@ -6854,12 +6857,18 @@ const componentBasicUiSchema = (theme) => {
6854
6857
  },
6855
6858
  {
6856
6859
  type: "Control",
6857
- scope: "#/properties/EmptyBox",
6860
+ scope: "#/properties/copiedElementDetails",
6858
6861
  options: {
6859
- widget: "EmptyBox"
6862
+ widget: "Box"
6860
6863
  },
6861
6864
  config: {
6862
- layout: { xs: 4, sm: 8 }
6865
+ layout: { xs: 4, sm: 8 },
6866
+ main: {
6867
+ heading: ""
6868
+ },
6869
+ style: {
6870
+ float: "left"
6871
+ }
6863
6872
  }
6864
6873
  },
6865
6874
  {
@@ -8329,11 +8338,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8329
8338
  },
8330
8339
  CopyComponent: function() {
8331
8340
  var _a;
8341
+ const schema2 = lodash.exports.cloneDeep(store2.schema);
8342
+ const uiSchema = lodash.exports.cloneDeep(store2.uiSchema);
8343
+ schema2.properties.CopyComponent.disabled = true;
8332
8344
  const rowId = dynamicData2.path.split(".")[1];
8333
8345
  const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8334
8346
  const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8335
8347
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
8348
+ uiSchema.elements[5].config.main.heading = formData.name;
8336
8349
  sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8350
+ store2.setSchema(schema2);
8351
+ store2.setUiSchema(uiSchema);
8337
8352
  },
8338
8353
  PasteComponent: function() {
8339
8354
  var _a;