impaktapps-ui-builder 0.0.963-CopyComponent.6 → 0.0.963-CopyComponent.7

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.
@@ -165,6 +165,27 @@ const PageMasterUiSchema = (theme) => {
165
165
  }
166
166
  }
167
167
  }
168
+ },
169
+ {
170
+ widget: {
171
+ type: "Control",
172
+ scope: "#/properties/Paste_Icon",
173
+ options: {
174
+ widget: "IconButton"
175
+ },
176
+ config: {
177
+ main: {
178
+ onClick: "PasteComponent",
179
+ size: "small",
180
+ icon: "SendIcon",
181
+ iconLabel: "Paste",
182
+ styleDefault: true
183
+ },
184
+ style: {
185
+ mt: "6px"
186
+ }
187
+ }
188
+ }
168
189
  }
169
190
  ]
170
191
  },
@@ -238,27 +259,7 @@ const PageMasterUiSchema = (theme) => {
238
259
  config: {
239
260
  main: {
240
261
  icon: "FileCopyIcon",
241
- onClick: "CopyComponent",
242
- tooltipMessage: "Reject This Record"
243
- }
244
- }
245
- }
246
- },
247
- {
248
- header: "paste",
249
- field: "Paste_Component",
250
- flex: 1,
251
- widget: {
252
- type: "Control",
253
- scope: "#/properties/PasteComponent",
254
- options: {
255
- widget: "IconButton"
256
- },
257
- config: {
258
- main: {
259
- icon: "SendIcon",
260
- onClick: "PasteComponent",
261
- tooltipMessage: "Reject This Record"
262
+ onClick: "CopyComponent"
262
263
  }
263
264
  }
264
265
  }
@@ -295,6 +296,27 @@ const PageMasterUiSchema = (theme) => {
295
296
  }
296
297
  }
297
298
  }
299
+ },
300
+ {
301
+ widget: {
302
+ type: "Control",
303
+ scope: "#/properties/Paste_Icon",
304
+ options: {
305
+ widget: "IconButton"
306
+ },
307
+ config: {
308
+ main: {
309
+ onClick: "PasteEvent",
310
+ size: "small",
311
+ icon: "SendIcon",
312
+ iconLabel: "Paste",
313
+ styleDefault: true
314
+ },
315
+ style: {
316
+ mt: "6px"
317
+ }
318
+ }
319
+ }
298
320
  }
299
321
  ]
300
322
  },
@@ -353,6 +375,24 @@ const PageMasterUiSchema = (theme) => {
353
375
  }
354
376
  }
355
377
  }
378
+ },
379
+ {
380
+ header: "Copy",
381
+ field: "Copy_Event",
382
+ flex: 1,
383
+ widget: {
384
+ type: "Control",
385
+ scope: "#/properties/CopyEvent",
386
+ options: {
387
+ widget: "IconButton"
388
+ },
389
+ config: {
390
+ main: {
391
+ icon: "FileCopyIcon",
392
+ onClick: "CopyEvent"
393
+ }
394
+ }
395
+ }
356
396
  }
357
397
  ]
358
398
  }
@@ -7136,6 +7176,27 @@ const EventSection = (theme) => {
7136
7176
  }
7137
7177
  }
7138
7178
  }
7179
+ },
7180
+ {
7181
+ widget: {
7182
+ type: "Control",
7183
+ scope: "#/properties/Paste_Icon",
7184
+ options: {
7185
+ widget: "IconButton"
7186
+ },
7187
+ config: {
7188
+ main: {
7189
+ onClick: "PasteEvent",
7190
+ size: "small",
7191
+ icon: "SendIcon",
7192
+ iconLabel: "Paste",
7193
+ styleDefault: true
7194
+ },
7195
+ style: {
7196
+ mt: "6px"
7197
+ }
7198
+ }
7199
+ }
7139
7200
  }
7140
7201
  ]
7141
7202
  },
@@ -7761,6 +7822,27 @@ const TableSection = (theme) => {
7761
7822
  }
7762
7823
  }
7763
7824
  }
7825
+ },
7826
+ {
7827
+ widget: {
7828
+ type: "Control",
7829
+ scope: "#/properties/Paste_Icon",
7830
+ options: {
7831
+ widget: "IconButton"
7832
+ },
7833
+ config: {
7834
+ main: {
7835
+ onClick: "PasteComponent",
7836
+ size: "small",
7837
+ icon: "SendIcon",
7838
+ iconLabel: "Paste",
7839
+ styleDefault: true
7840
+ },
7841
+ style: {
7842
+ mt: "6px"
7843
+ }
7844
+ }
7845
+ }
7764
7846
  }
7765
7847
  ]
7766
7848
  },
@@ -7823,38 +7905,18 @@ const TableSection = (theme) => {
7823
7905
  },
7824
7906
  {
7825
7907
  header: "Copy",
7826
- field: "Copy_Component2",
7908
+ field: "Copy_Component",
7827
7909
  flex: 1,
7828
7910
  widget: {
7829
7911
  type: "Control",
7830
- scope: "#/properties/CopyComponent2",
7912
+ scope: "#/properties/CopyComponent",
7831
7913
  options: {
7832
7914
  widget: "IconButton"
7833
7915
  },
7834
7916
  config: {
7835
7917
  main: {
7836
7918
  icon: "FileCopyIcon",
7837
- onClick: "CopyComponent",
7838
- tooltipMessage: "Reject This Record"
7839
- }
7840
- }
7841
- }
7842
- },
7843
- {
7844
- header: "paste",
7845
- field: "Paste_Component2",
7846
- flex: 1,
7847
- widget: {
7848
- type: "Control",
7849
- scope: "#/properties/PasteComponent2",
7850
- options: {
7851
- widget: "IconButton"
7852
- },
7853
- config: {
7854
- main: {
7855
- icon: "SendIcon",
7856
- onClick: "PasteComponent",
7857
- tooltipMessage: "Reject This Record"
7919
+ onClick: "CopyComponent"
7858
7920
  }
7859
7921
  }
7860
7922
  }
@@ -8283,22 +8345,26 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8283
8345
  CopyComponent: function() {
8284
8346
  var _a;
8285
8347
  const rowId = dynamicData2.path.split(".")[1];
8286
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8287
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8288
- const formData = getFormdataFromSessionStorage(updatedPath);
8289
- sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
8348
+ const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8349
+ const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8350
+ const formData = getFormdataFromSessionStorage(copiedComponentPath);
8351
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8290
8352
  },
8291
8353
  PasteComponent: function() {
8292
8354
  var _a;
8293
8355
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8294
- const rowId = dynamicData2.path.split(".")[1];
8295
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8296
- const formData = getFormdataFromSessionStorage(updatedPath);
8356
+ const formData = getFormdataFromSessionStorage(path);
8297
8357
  const insertComponentPath = formData.elements.length;
8298
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8299
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
8358
+ const finalPath = `${path}.elements[${insertComponentPath}]`;
8359
+ const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8360
+ if (!copiedData.elements) {
8361
+ store2.setNotify({
8362
+ FailMessage: "Pasting not Valid",
8363
+ Fail: true
8364
+ });
8365
+ }
8300
8366
  saveFormdataInSessionStorage(copiedData, finalPath);
8301
- sessionStorage.removeItem("copiedComponent");
8367
+ sessionStorage.removeItem("copiedConfig");
8302
8368
  this.setPage();
8303
8369
  },
8304
8370
  CopyEvent: function() {
@@ -8307,19 +8373,23 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8307
8373
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8308
8374
  const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
8309
8375
  const formData = getFormdataFromSessionStorage(updatedPath);
8310
- sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
8376
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8311
8377
  },
8312
8378
  PasteEvent: function() {
8313
8379
  var _a;
8314
8380
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8315
- const rowId = dynamicData2.path.split(".")[1];
8316
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
8317
- const formData = getFormdataFromSessionStorage(updatedPath);
8318
- const insertComponentPath = formData.elements.length;
8319
- const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
8320
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
8381
+ const formData = getFormdataFromSessionStorage(path);
8382
+ const insertComponentPath = formData.events.length;
8383
+ const finalPath = `${path}.events[${insertComponentPath}]`;
8384
+ const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8385
+ if (!copiedData.events) {
8386
+ store2.setNotify({
8387
+ FailMessage: "Pasting not Valid",
8388
+ Fail: true
8389
+ });
8390
+ }
8321
8391
  saveFormdataInSessionStorage(copiedData, finalPath);
8322
- sessionStorage.removeItem("copiedComponent");
8392
+ sessionStorage.removeItem("copiedConfig");
8323
8393
  this.setPage();
8324
8394
  }
8325
8395
  };
@@ -8416,25 +8486,28 @@ var pageMaster = (funcParams) => {
8416
8486
  store2.updateDialog("popUpPageMasterEvent");
8417
8487
  },
8418
8488
  CopyComponent: function() {
8419
- var _a, _b;
8489
+ var _a;
8420
8490
  const rowId = dynamicData2.path.split(".")[1];
8421
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8422
- (_b = store2.searchParams) == null ? void 0 : _b.get("id");
8423
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8424
- const formData = getFormdataFromSessionStorage(updatedPath);
8425
- sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
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));
8426
8495
  },
8427
8496
  PasteComponent: function() {
8428
8497
  var _a;
8429
8498
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8430
- const rowId = dynamicData2.path.split(".")[1];
8431
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8432
- const formData = getFormdataFromSessionStorage(updatedPath);
8499
+ const formData = getFormdataFromSessionStorage(path);
8433
8500
  const insertComponentPath = formData.elements.length;
8434
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8435
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
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
+ }
8436
8509
  saveFormdataInSessionStorage(copiedData, finalPath);
8437
- sessionStorage.removeItem("copiedComponent");
8510
+ sessionStorage.removeItem("copiedConfig");
8438
8511
  this.setPage();
8439
8512
  }
8440
8513
  };
@@ -8623,6 +8696,27 @@ const EventUiSchema = (theme) => {
8623
8696
  }
8624
8697
  }
8625
8698
  }
8699
+ },
8700
+ {
8701
+ widget: {
8702
+ type: "Control",
8703
+ scope: "#/properties/Paste_Icon",
8704
+ options: {
8705
+ widget: "IconButton"
8706
+ },
8707
+ config: {
8708
+ main: {
8709
+ onClick: "PasteEvent",
8710
+ size: "small",
8711
+ icon: "SendIcon",
8712
+ iconLabel: "Paste",
8713
+ styleDefault: true
8714
+ },
8715
+ style: {
8716
+ mt: "6px"
8717
+ }
8718
+ }
8719
+ }
8626
8720
  }
8627
8721
  ]
8628
8722
  },
@@ -8684,38 +8778,18 @@ const EventUiSchema = (theme) => {
8684
8778
  },
8685
8779
  {
8686
8780
  header: "Copy",
8687
- field: "Copy_Event2",
8781
+ field: "Copy_Event",
8688
8782
  flex: 1,
8689
8783
  widget: {
8690
8784
  type: "Control",
8691
- scope: "#/properties/CopyEvent2",
8785
+ scope: "#/properties/CopyEvent",
8692
8786
  options: {
8693
8787
  widget: "IconButton"
8694
8788
  },
8695
8789
  config: {
8696
8790
  main: {
8697
8791
  icon: "FileCopyIcon",
8698
- onClick: "CopyEvent",
8699
- tooltipMessage: "Reject This Record"
8700
- }
8701
- }
8702
- }
8703
- },
8704
- {
8705
- header: "paste",
8706
- field: "Paste_Event2",
8707
- flex: 1,
8708
- widget: {
8709
- type: "Control",
8710
- scope: "#/properties/PasteEvent2",
8711
- options: {
8712
- widget: "IconButton"
8713
- },
8714
- config: {
8715
- main: {
8716
- icon: "SendIcon",
8717
- onClick: "PasteEvent",
8718
- tooltipMessage: "Reject This Record"
8792
+ onClick: "CopyEvent"
8719
8793
  }
8720
8794
  }
8721
8795
  }
@@ -9324,19 +9398,17 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9324
9398
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
9325
9399
  const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
9326
9400
  const formData = getFormdataFromSessionStorage(updatedPath);
9327
- sessionStorage.setItem("copiedComponent", JSON.stringify(formData));
9401
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
9328
9402
  },
9329
9403
  PasteEvent: function() {
9330
9404
  var _a;
9331
9405
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
9332
- const rowId = dynamicData2.path.split(".")[1];
9333
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
9334
- const formData = getFormdataFromSessionStorage(updatedPath);
9335
- const insertComponentPath = formData.elements.length;
9336
- const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
9337
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
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"));
9338
9410
  saveFormdataInSessionStorage(copiedData, finalPath);
9339
- sessionStorage.removeItem("copiedComponent");
9411
+ sessionStorage.removeItem("copiedConfig");
9340
9412
  this.setPage();
9341
9413
  }
9342
9414
  };