impaktapps-ui-builder 0.0.963-CopyComponent.1 → 0.0.963-CopyComponent.11

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
  },
@@ -239,26 +260,7 @@ const PageMasterUiSchema = (theme) => {
239
260
  main: {
240
261
  icon: "FileCopyIcon",
241
262
  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"
263
+ styleDefault: true
262
264
  }
263
265
  }
264
266
  }
@@ -295,6 +297,27 @@ const PageMasterUiSchema = (theme) => {
295
297
  }
296
298
  }
297
299
  }
300
+ },
301
+ {
302
+ widget: {
303
+ type: "Control",
304
+ scope: "#/properties/Paste_Icon",
305
+ options: {
306
+ widget: "IconButton"
307
+ },
308
+ config: {
309
+ main: {
310
+ onClick: "PasteEvent",
311
+ size: "small",
312
+ icon: "SendIcon",
313
+ iconLabel: "Paste",
314
+ styleDefault: true
315
+ },
316
+ style: {
317
+ mt: "6px"
318
+ }
319
+ }
320
+ }
298
321
  }
299
322
  ]
300
323
  },
@@ -353,6 +376,25 @@ const PageMasterUiSchema = (theme) => {
353
376
  }
354
377
  }
355
378
  }
379
+ },
380
+ {
381
+ header: "Copy",
382
+ field: "Copy_Event",
383
+ flex: 1,
384
+ widget: {
385
+ type: "Control",
386
+ scope: "#/properties/CopyEvent",
387
+ options: {
388
+ widget: "IconButton"
389
+ },
390
+ config: {
391
+ main: {
392
+ icon: "FileCopyIcon",
393
+ onClick: "CopyEvent",
394
+ styleDefault: true
395
+ }
396
+ }
397
+ }
356
398
  }
357
399
  ]
358
400
  }
@@ -6453,7 +6495,10 @@ const ComponentSchema = {
6453
6495
  name: {
6454
6496
  type: "string"
6455
6497
  },
6456
- label: { type: "string" }
6498
+ label: { type: "string" },
6499
+ CopyComponent: {
6500
+ disabled: false
6501
+ }
6457
6502
  },
6458
6503
  required: ["name"]
6459
6504
  };
@@ -6812,12 +6857,18 @@ const componentBasicUiSchema = (theme) => {
6812
6857
  },
6813
6858
  {
6814
6859
  type: "Control",
6815
- scope: "#/properties/EmptyBox",
6860
+ scope: "#/properties/copiedElementDetails",
6816
6861
  options: {
6817
- widget: "EmptyBox"
6862
+ widget: "Box"
6818
6863
  },
6819
6864
  config: {
6820
- layout: { xs: 4, sm: 8 }
6865
+ layout: { xs: 4, sm: 8 },
6866
+ main: {
6867
+ heading: ""
6868
+ },
6869
+ style: {
6870
+ float: "left"
6871
+ }
6821
6872
  }
6822
6873
  },
6823
6874
  {
@@ -7136,6 +7187,27 @@ const EventSection = (theme) => {
7136
7187
  }
7137
7188
  }
7138
7189
  }
7190
+ },
7191
+ {
7192
+ widget: {
7193
+ type: "Control",
7194
+ scope: "#/properties/Paste_Icon",
7195
+ options: {
7196
+ widget: "IconButton"
7197
+ },
7198
+ config: {
7199
+ main: {
7200
+ onClick: "PasteEvent",
7201
+ size: "small",
7202
+ icon: "SendIcon",
7203
+ iconLabel: "Paste",
7204
+ styleDefault: true
7205
+ },
7206
+ style: {
7207
+ mt: "6px"
7208
+ }
7209
+ }
7210
+ }
7139
7211
  }
7140
7212
  ]
7141
7213
  },
@@ -7195,6 +7267,26 @@ const EventSection = (theme) => {
7195
7267
  }
7196
7268
  }
7197
7269
  }
7270
+ },
7271
+ {
7272
+ header: "Copy",
7273
+ field: "Copy_Event",
7274
+ flex: 1,
7275
+ widget: {
7276
+ type: "Control",
7277
+ scope: "#/properties/CopyEvent",
7278
+ options: {
7279
+ widget: "IconButton"
7280
+ },
7281
+ config: {
7282
+ main: {
7283
+ icon: "FileCopyIcon",
7284
+ onClick: "CopyEvent",
7285
+ tooltipMessage: "Reject This Record",
7286
+ styleDefault: true
7287
+ }
7288
+ }
7289
+ }
7198
7290
  }
7199
7291
  ]
7200
7292
  }
@@ -7723,6 +7815,27 @@ const TableSection = (theme) => {
7723
7815
  }
7724
7816
  }
7725
7817
  }
7818
+ },
7819
+ {
7820
+ widget: {
7821
+ type: "Control",
7822
+ scope: "#/properties/Paste_Icon",
7823
+ options: {
7824
+ widget: "IconButton"
7825
+ },
7826
+ config: {
7827
+ main: {
7828
+ onClick: "PasteComponent",
7829
+ size: "small",
7830
+ icon: "SendIcon",
7831
+ iconLabel: "Paste",
7832
+ styleDefault: true
7833
+ },
7834
+ style: {
7835
+ mt: "6px"
7836
+ }
7837
+ }
7838
+ }
7726
7839
  }
7727
7840
  ]
7728
7841
  },
@@ -7782,6 +7895,25 @@ const TableSection = (theme) => {
7782
7895
  }
7783
7896
  }
7784
7897
  }
7898
+ },
7899
+ {
7900
+ header: "Copy",
7901
+ field: "Copy_Component",
7902
+ flex: 1,
7903
+ widget: {
7904
+ type: "Control",
7905
+ scope: "#/properties/CopyComponent",
7906
+ options: {
7907
+ widget: "IconButton"
7908
+ },
7909
+ config: {
7910
+ main: {
7911
+ icon: "FileCopyIcon",
7912
+ onClick: "CopyComponent",
7913
+ styleDefault: true
7914
+ }
7915
+ }
7916
+ }
7785
7917
  }
7786
7918
  ]
7787
7919
  }
@@ -8203,6 +8335,62 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8203
8335
  const rowId = dynamicData2.path.split(".")[1];
8204
8336
  sessionStorage.setItem("rowId", rowId);
8205
8337
  store2.updateDialog("popUpEventSection");
8338
+ },
8339
+ CopyComponent: function() {
8340
+ var _a;
8341
+ lodash.exports.cloneDeep(store2.schema);
8342
+ const uiSchema = lodash.exports.cloneDeep(store2.uiSchema);
8343
+ const rowId = dynamicData2.path.split(".")[1];
8344
+ const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8345
+ const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8346
+ const formData = getFormdataFromSessionStorage(copiedComponentPath);
8347
+ uiSchema.elements[4].config.main.heading = formData.name;
8348
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8349
+ store2.setUiSchema(uiSchema);
8350
+ },
8351
+ PasteComponent: function() {
8352
+ var _a;
8353
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8354
+ const formData = getFormdataFromSessionStorage(path);
8355
+ const insertComponentPath = formData.elements.length;
8356
+ const finalPath = `${path}.elements[${insertComponentPath}]`;
8357
+ const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8358
+ if (!copiedData.elements) {
8359
+ store2.setNotify({
8360
+ FailMessage: "Pasting not Valid",
8361
+ Fail: true
8362
+ });
8363
+ } else {
8364
+ saveFormdataInSessionStorage(copiedData, finalPath);
8365
+ sessionStorage.removeItem("copiedConfig");
8366
+ this.setPage();
8367
+ }
8368
+ },
8369
+ CopyEvent: function() {
8370
+ var _a;
8371
+ const rowId = dynamicData2.path.split(".")[1];
8372
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8373
+ const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
8374
+ const formData = getFormdataFromSessionStorage(updatedPath);
8375
+ sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8376
+ },
8377
+ PasteEvent: function() {
8378
+ var _a;
8379
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8380
+ const formData = getFormdataFromSessionStorage(path);
8381
+ const insertComponentPath = formData.events.length;
8382
+ const finalPath = `${path}.events[${insertComponentPath}]`;
8383
+ const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8384
+ if (!copiedData.events) {
8385
+ store2.setNotify({
8386
+ FailMessage: "Pasting not Valid",
8387
+ Fail: true
8388
+ });
8389
+ } else {
8390
+ saveFormdataInSessionStorage(copiedData, finalPath);
8391
+ sessionStorage.removeItem("copiedConfig");
8392
+ this.setPage();
8393
+ }
8206
8394
  }
8207
8395
  };
8208
8396
  };
@@ -8297,26 +8485,10 @@ var pageMaster = (funcParams) => {
8297
8485
  sessionStorage.setItem("rowId", rowId);
8298
8486
  store2.updateDialog("popUpPageMasterEvent");
8299
8487
  },
8300
- CopyComponent: function() {
8301
- var _a, _b;
8302
- dynamicData2.path.split(".")[1];
8303
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8304
- (_b = store2.searchParams) == null ? void 0 : _b.get("id");
8305
- const formData = getFormdataFromSessionStorage(path);
8306
- sessionStorage.setItem("copiedComponent", formData);
8307
- },
8308
- PasteComponent: function() {
8309
- var _a;
8310
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8311
- const rowId = dynamicData2.path.split(".")[1];
8312
- const updatedPath = `${path}.elements[${rowId}]`;
8313
- const formData = getFormdataFromSessionStorage(updatedPath);
8314
- const insertComponentPath = formData.elements.length;
8315
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8316
- const copiedData = sessionStorage.getItem("copiedComponent");
8317
- saveFormdataInSessionStorage(copiedData, finalPath);
8318
- sessionStorage.removeItem("copiedComponent");
8319
- }
8488
+ CopyComponent: Component(store2, dynamicData2, submitHandler, service2).CopyComponent,
8489
+ PasteComponent: Component(store2, dynamicData2, submitHandler, service2).PasteComponent,
8490
+ CopyEvent: Component(store2, dynamicData2, submitHandler, service2).CopyEvent,
8491
+ PasteEvent: Component(store2, dynamicData2, submitHandler, service2).PasteEvent
8320
8492
  };
8321
8493
  };
8322
8494
  const EventSchema = {
@@ -8503,6 +8675,27 @@ const EventUiSchema = (theme) => {
8503
8675
  }
8504
8676
  }
8505
8677
  }
8678
+ },
8679
+ {
8680
+ widget: {
8681
+ type: "Control",
8682
+ scope: "#/properties/Paste_Icon",
8683
+ options: {
8684
+ widget: "IconButton"
8685
+ },
8686
+ config: {
8687
+ main: {
8688
+ onClick: "PasteEvent",
8689
+ size: "small",
8690
+ icon: "SendIcon",
8691
+ iconLabel: "Paste",
8692
+ styleDefault: true
8693
+ },
8694
+ style: {
8695
+ mt: "6px"
8696
+ }
8697
+ }
8698
+ }
8506
8699
  }
8507
8700
  ]
8508
8701
  },
@@ -8561,6 +8754,25 @@ const EventUiSchema = (theme) => {
8561
8754
  }
8562
8755
  }
8563
8756
  }
8757
+ },
8758
+ {
8759
+ header: "Copy",
8760
+ field: "Copy_Event",
8761
+ flex: 1,
8762
+ widget: {
8763
+ type: "Control",
8764
+ scope: "#/properties/CopyEvent",
8765
+ options: {
8766
+ widget: "IconButton"
8767
+ },
8768
+ config: {
8769
+ main: {
8770
+ icon: "FileCopyIcon",
8771
+ onClick: "CopyEvent",
8772
+ styleDefault: true
8773
+ }
8774
+ }
8775
+ }
8564
8776
  }
8565
8777
  ]
8566
8778
  }
@@ -9159,7 +9371,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9159
9371
  const rowId = dynamicData2.path.split(".")[1];
9160
9372
  sessionStorage.setItem("rowId", rowId);
9161
9373
  store2.updateDialog("popUpEvent");
9162
- }
9374
+ },
9375
+ CopyEvent: Component(store2, dynamicData2, submitHandler, service2).CopyEvent,
9376
+ PasteEvent: Component(store2, dynamicData2, submitHandler, service2).PasteEvent
9163
9377
  };
9164
9378
  };
9165
9379
  const downloadFile$1 = (obj) => {