impaktapps-ui-builder 0.0.963-CopyComponent.7 → 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.
@@ -259,7 +259,8 @@ const PageMasterUiSchema = (theme) => {
259
259
  config: {
260
260
  main: {
261
261
  icon: "FileCopyIcon",
262
- onClick: "CopyComponent"
262
+ onClick: "CopyComponent",
263
+ styleDefault: true
263
264
  }
264
265
  }
265
266
  }
@@ -389,7 +390,8 @@ const PageMasterUiSchema = (theme) => {
389
390
  config: {
390
391
  main: {
391
392
  icon: "FileCopyIcon",
392
- onClick: "CopyEvent"
393
+ onClick: "CopyEvent",
394
+ styleDefault: true
393
395
  }
394
396
  }
395
397
  }
@@ -6493,7 +6495,10 @@ const ComponentSchema = {
6493
6495
  name: {
6494
6496
  type: "string"
6495
6497
  },
6496
- label: { type: "string" }
6498
+ label: { type: "string" },
6499
+ CopyComponent: {
6500
+ disabled: false
6501
+ }
6497
6502
  },
6498
6503
  required: ["name"]
6499
6504
  };
@@ -6852,12 +6857,18 @@ const componentBasicUiSchema = (theme) => {
6852
6857
  },
6853
6858
  {
6854
6859
  type: "Control",
6855
- scope: "#/properties/EmptyBox",
6860
+ scope: "#/properties/copiedElementDetails",
6856
6861
  options: {
6857
- widget: "EmptyBox"
6862
+ widget: "Box"
6858
6863
  },
6859
6864
  config: {
6860
- layout: { xs: 4, sm: 8 }
6865
+ layout: { xs: 4, sm: 8 },
6866
+ main: {
6867
+ heading: ""
6868
+ },
6869
+ style: {
6870
+ float: "left"
6871
+ }
6861
6872
  }
6862
6873
  },
6863
6874
  {
@@ -7271,26 +7282,8 @@ const EventSection = (theme) => {
7271
7282
  main: {
7272
7283
  icon: "FileCopyIcon",
7273
7284
  onClick: "CopyEvent",
7274
- tooltipMessage: "Reject This Record"
7275
- }
7276
- }
7277
- }
7278
- },
7279
- {
7280
- header: "paste",
7281
- field: "Paste_Event",
7282
- flex: 1,
7283
- widget: {
7284
- type: "Control",
7285
- scope: "#/properties/PasteEvent",
7286
- options: {
7287
- widget: "IconButton"
7288
- },
7289
- config: {
7290
- main: {
7291
- icon: "SendIcon",
7292
- onClick: "PasteEvent",
7293
- tooltipMessage: "Reject This Record"
7285
+ tooltipMessage: "Reject This Record",
7286
+ styleDefault: true
7294
7287
  }
7295
7288
  }
7296
7289
  }
@@ -7916,7 +7909,8 @@ const TableSection = (theme) => {
7916
7909
  config: {
7917
7910
  main: {
7918
7911
  icon: "FileCopyIcon",
7919
- onClick: "CopyComponent"
7912
+ onClick: "CopyComponent",
7913
+ styleDefault: true
7920
7914
  }
7921
7915
  }
7922
7916
  }
@@ -8344,11 +8338,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8344
8338
  },
8345
8339
  CopyComponent: function() {
8346
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;
8347
8344
  const rowId = dynamicData2.path.split(".")[1];
8348
8345
  const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8349
8346
  const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8350
8347
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
8348
+ uiSchema.elements[5].config.main.heading = formData.name;
8351
8349
  sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8350
+ store2.setSchema(schema2);
8351
+ store2.setUiSchema(uiSchema);
8352
8352
  },
8353
8353
  PasteComponent: function() {
8354
8354
  var _a;
@@ -8362,10 +8362,11 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8362
8362
  FailMessage: "Pasting not Valid",
8363
8363
  Fail: true
8364
8364
  });
8365
+ } else {
8366
+ saveFormdataInSessionStorage(copiedData, finalPath);
8367
+ sessionStorage.removeItem("copiedConfig");
8368
+ this.setPage();
8365
8369
  }
8366
- saveFormdataInSessionStorage(copiedData, finalPath);
8367
- sessionStorage.removeItem("copiedConfig");
8368
- this.setPage();
8369
8370
  },
8370
8371
  CopyEvent: function() {
8371
8372
  var _a;
@@ -8387,10 +8388,11 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8387
8388
  FailMessage: "Pasting not Valid",
8388
8389
  Fail: true
8389
8390
  });
8391
+ } else {
8392
+ saveFormdataInSessionStorage(copiedData, finalPath);
8393
+ sessionStorage.removeItem("copiedConfig");
8394
+ this.setPage();
8390
8395
  }
8391
- saveFormdataInSessionStorage(copiedData, finalPath);
8392
- sessionStorage.removeItem("copiedConfig");
8393
- this.setPage();
8394
8396
  }
8395
8397
  };
8396
8398
  };
@@ -8485,31 +8487,10 @@ var pageMaster = (funcParams) => {
8485
8487
  sessionStorage.setItem("rowId", rowId);
8486
8488
  store2.updateDialog("popUpPageMasterEvent");
8487
8489
  },
8488
- CopyComponent: function() {
8489
- var _a;
8490
- const rowId = dynamicData2.path.split(".")[1];
8491
- const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8492
- const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8493
- const formData = getFormdataFromSessionStorage(copiedComponentPath);
8494
- sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8495
- },
8496
- PasteComponent: function() {
8497
- var _a;
8498
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8499
- const formData = getFormdataFromSessionStorage(path);
8500
- const insertComponentPath = formData.elements.length;
8501
- const finalPath = `${path}.elements[${insertComponentPath}]`;
8502
- const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8503
- if (!copiedData.elements) {
8504
- store2.setNotify({
8505
- FailMessage: "Pasting not Valid",
8506
- Fail: true
8507
- });
8508
- }
8509
- saveFormdataInSessionStorage(copiedData, finalPath);
8510
- sessionStorage.removeItem("copiedConfig");
8511
- this.setPage();
8512
- }
8490
+ CopyComponent: Component(store2, dynamicData2, submitHandler, service2).CopyComponent,
8491
+ PasteComponent: Component(store2, dynamicData2, submitHandler, service2).PasteComponent,
8492
+ CopyEvent: Component(store2, dynamicData2, submitHandler, service2).CopyEvent,
8493
+ PasteEvent: Component(store2, dynamicData2, submitHandler, service2).PasteEvent
8513
8494
  };
8514
8495
  };
8515
8496
  const EventSchema = {
@@ -8789,7 +8770,8 @@ const EventUiSchema = (theme) => {
8789
8770
  config: {
8790
8771
  main: {
8791
8772
  icon: "FileCopyIcon",
8792
- onClick: "CopyEvent"
8773
+ onClick: "CopyEvent",
8774
+ styleDefault: true
8793
8775
  }
8794
8776
  }
8795
8777
  }
@@ -9392,25 +9374,8 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9392
9374
  sessionStorage.setItem("rowId", rowId);
9393
9375
  store2.updateDialog("popUpEvent");
9394
9376
  },
9395
- CopyEvent: function() {
9396
- var _a;
9397
- const rowId = dynamicData2.path.split(".")[1];
9398
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
9399
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
9400
- const formData = getFormdataFromSessionStorage(updatedPath);
9401
- sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
9402
- },
9403
- PasteEvent: function() {
9404
- var _a;
9405
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
9406
- const formData = getFormdataFromSessionStorage(path);
9407
- const insertComponentPath = formData.events.length;
9408
- const finalPath = `${path}.events[${insertComponentPath}]`;
9409
- const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
9410
- saveFormdataInSessionStorage(copiedData, finalPath);
9411
- sessionStorage.removeItem("copiedConfig");
9412
- this.setPage();
9413
- }
9377
+ CopyEvent: Component(store2, dynamicData2, submitHandler, service2).CopyEvent,
9378
+ PasteEvent: Component(store2, dynamicData2, submitHandler, service2).PasteEvent
9414
9379
  };
9415
9380
  };
9416
9381
  const downloadFile$1 = (obj) => {