impaktapps-ui-builder 0.0.963-CopyComponent.5 → 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
  },
@@ -7195,6 +7256,44 @@ const EventSection = (theme) => {
7195
7256
  }
7196
7257
  }
7197
7258
  }
7259
+ },
7260
+ {
7261
+ header: "Copy",
7262
+ field: "Copy_Event",
7263
+ flex: 1,
7264
+ widget: {
7265
+ type: "Control",
7266
+ scope: "#/properties/CopyEvent",
7267
+ options: {
7268
+ widget: "IconButton"
7269
+ },
7270
+ config: {
7271
+ main: {
7272
+ icon: "FileCopyIcon",
7273
+ 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"
7294
+ }
7295
+ }
7296
+ }
7198
7297
  }
7199
7298
  ]
7200
7299
  }
@@ -7723,6 +7822,27 @@ const TableSection = (theme) => {
7723
7822
  }
7724
7823
  }
7725
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
+ }
7726
7846
  }
7727
7847
  ]
7728
7848
  },
@@ -7785,38 +7905,18 @@ const TableSection = (theme) => {
7785
7905
  },
7786
7906
  {
7787
7907
  header: "Copy",
7788
- field: "Copy_Component2",
7908
+ field: "Copy_Component",
7789
7909
  flex: 1,
7790
7910
  widget: {
7791
7911
  type: "Control",
7792
- scope: "#/properties/CopyComponent2",
7912
+ scope: "#/properties/CopyComponent",
7793
7913
  options: {
7794
7914
  widget: "IconButton"
7795
7915
  },
7796
7916
  config: {
7797
7917
  main: {
7798
7918
  icon: "FileCopyIcon",
7799
- onClick: "CopyComponent",
7800
- tooltipMessage: "Reject This Record"
7801
- }
7802
- }
7803
- }
7804
- },
7805
- {
7806
- header: "paste",
7807
- field: "Paste_Component2",
7808
- flex: 1,
7809
- widget: {
7810
- type: "Control",
7811
- scope: "#/properties/PasteComponent2",
7812
- options: {
7813
- widget: "IconButton"
7814
- },
7815
- config: {
7816
- main: {
7817
- icon: "SendIcon",
7818
- onClick: "PasteComponent",
7819
- tooltipMessage: "Reject This Record"
7919
+ onClick: "CopyComponent"
7820
7920
  }
7821
7921
  }
7822
7922
  }
@@ -8245,22 +8345,51 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8245
8345
  CopyComponent: function() {
8246
8346
  var _a;
8247
8347
  const rowId = dynamicData2.path.split(".")[1];
8248
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8249
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8250
- const formData = getFormdataFromSessionStorage(updatedPath);
8251
- 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));
8252
8352
  },
8253
8353
  PasteComponent: function() {
8254
8354
  var _a;
8255
8355
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8356
+ const formData = getFormdataFromSessionStorage(path);
8357
+ const insertComponentPath = formData.elements.length;
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
+ }
8366
+ saveFormdataInSessionStorage(copiedData, finalPath);
8367
+ sessionStorage.removeItem("copiedConfig");
8368
+ this.setPage();
8369
+ },
8370
+ CopyEvent: function() {
8371
+ var _a;
8256
8372
  const rowId = dynamicData2.path.split(".")[1];
8257
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8373
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8374
+ const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
8258
8375
  const formData = getFormdataFromSessionStorage(updatedPath);
8259
- const insertComponentPath = formData.elements.length;
8260
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8261
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
8376
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8377
+ },
8378
+ PasteEvent: function() {
8379
+ var _a;
8380
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
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
+ }
8262
8391
  saveFormdataInSessionStorage(copiedData, finalPath);
8263
- sessionStorage.removeItem("copiedComponent");
8392
+ sessionStorage.removeItem("copiedConfig");
8264
8393
  this.setPage();
8265
8394
  }
8266
8395
  };
@@ -8357,25 +8486,28 @@ var pageMaster = (funcParams) => {
8357
8486
  store2.updateDialog("popUpPageMasterEvent");
8358
8487
  },
8359
8488
  CopyComponent: function() {
8360
- var _a, _b;
8489
+ var _a;
8361
8490
  const rowId = dynamicData2.path.split(".")[1];
8362
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8363
- (_b = store2.searchParams) == null ? void 0 : _b.get("id");
8364
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8365
- const formData = getFormdataFromSessionStorage(updatedPath);
8366
- 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));
8367
8495
  },
8368
8496
  PasteComponent: function() {
8369
8497
  var _a;
8370
8498
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8371
- const rowId = dynamicData2.path.split(".")[1];
8372
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8373
- const formData = getFormdataFromSessionStorage(updatedPath);
8499
+ const formData = getFormdataFromSessionStorage(path);
8374
8500
  const insertComponentPath = formData.elements.length;
8375
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8376
- 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
+ }
8377
8509
  saveFormdataInSessionStorage(copiedData, finalPath);
8378
- sessionStorage.removeItem("copiedComponent");
8510
+ sessionStorage.removeItem("copiedConfig");
8379
8511
  this.setPage();
8380
8512
  }
8381
8513
  };
@@ -8564,6 +8696,27 @@ const EventUiSchema = (theme) => {
8564
8696
  }
8565
8697
  }
8566
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
+ }
8567
8720
  }
8568
8721
  ]
8569
8722
  },
@@ -8622,6 +8775,24 @@ const EventUiSchema = (theme) => {
8622
8775
  }
8623
8776
  }
8624
8777
  }
8778
+ },
8779
+ {
8780
+ header: "Copy",
8781
+ field: "Copy_Event",
8782
+ flex: 1,
8783
+ widget: {
8784
+ type: "Control",
8785
+ scope: "#/properties/CopyEvent",
8786
+ options: {
8787
+ widget: "IconButton"
8788
+ },
8789
+ config: {
8790
+ main: {
8791
+ icon: "FileCopyIcon",
8792
+ onClick: "CopyEvent"
8793
+ }
8794
+ }
8795
+ }
8625
8796
  }
8626
8797
  ]
8627
8798
  }
@@ -9220,6 +9391,25 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9220
9391
  const rowId = dynamicData2.path.split(".")[1];
9221
9392
  sessionStorage.setItem("rowId", rowId);
9222
9393
  store2.updateDialog("popUpEvent");
9394
+ },
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();
9223
9413
  }
9224
9414
  };
9225
9415
  };