impaktapps-ui-builder 0.0.968 → 0.0.970

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.
Files changed (25) hide show
  1. package/dist/impaktapps-ui-builder.es.js +521 -75
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +55 -2
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +0 -15
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +50 -2
  8. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +3 -0
  9. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +3 -0
  10. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +8 -2
  11. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +5 -0
  12. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +5 -0
  13. package/package.json +1 -1
  14. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +47 -0
  15. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +6 -7
  16. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +45 -1
  17. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +4 -1
  18. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +98 -50
  19. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +4 -1
  20. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +148 -9
  21. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -1
  22. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +97 -6
  23. package/src/impaktapps-ui-builder/builder/services/component.ts +85 -6
  24. package/src/impaktapps-ui-builder/builder/services/event.ts +17 -3
  25. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +20 -2
@@ -39,6 +39,9 @@ const PageMasterSchema = {
39
39
  }
40
40
  }
41
41
  }
42
+ },
43
+ RemoveItemButton: {
44
+ disabled: true
42
45
  }
43
46
  },
44
47
  required: ["template", "name", "label"]
@@ -165,6 +168,27 @@ const PageMasterUiSchema = (theme) => {
165
168
  }
166
169
  }
167
170
  }
171
+ },
172
+ {
173
+ widget: {
174
+ type: "Control",
175
+ scope: "#/properties/Paste_Component",
176
+ options: {
177
+ widget: "IconButton"
178
+ },
179
+ config: {
180
+ main: {
181
+ onClick: "copyPasteElement",
182
+ size: "small",
183
+ icon: "PasteIcon",
184
+ iconLabel: "Paste",
185
+ styleDefault: true
186
+ },
187
+ style: {
188
+ mt: "6px"
189
+ }
190
+ }
191
+ }
168
192
  }
169
193
  ]
170
194
  },
@@ -224,6 +248,25 @@ const PageMasterUiSchema = (theme) => {
224
248
  }
225
249
  }
226
250
  }
251
+ },
252
+ {
253
+ header: "Copy",
254
+ field: "Copy_Component",
255
+ flex: 1,
256
+ widget: {
257
+ type: "Control",
258
+ scope: "#/properties/Copy_Component",
259
+ options: {
260
+ widget: "IconButton"
261
+ },
262
+ config: {
263
+ main: {
264
+ icon: "FileCopyIcon",
265
+ onClick: "copyPasteElement",
266
+ styleDefault: true
267
+ }
268
+ }
269
+ }
227
270
  }
228
271
  ]
229
272
  },
@@ -257,6 +300,27 @@ const PageMasterUiSchema = (theme) => {
257
300
  }
258
301
  }
259
302
  }
303
+ },
304
+ {
305
+ widget: {
306
+ type: "Control",
307
+ scope: "#/properties/Paste_Event",
308
+ options: {
309
+ widget: "IconButton"
310
+ },
311
+ config: {
312
+ main: {
313
+ onClick: "copyPasteElement",
314
+ size: "small",
315
+ icon: "PasteIcon",
316
+ iconLabel: "Paste",
317
+ styleDefault: true
318
+ },
319
+ style: {
320
+ mt: "6px"
321
+ }
322
+ }
323
+ }
260
324
  }
261
325
  ]
262
326
  },
@@ -315,20 +379,83 @@ const PageMasterUiSchema = (theme) => {
315
379
  }
316
380
  }
317
381
  }
382
+ },
383
+ {
384
+ header: "Copy",
385
+ field: "Copy_Event",
386
+ flex: 1,
387
+ widget: {
388
+ type: "Control",
389
+ scope: "#/properties/Copy_Event",
390
+ options: {
391
+ widget: "IconButton"
392
+ },
393
+ config: {
394
+ main: {
395
+ icon: "FileCopyIcon",
396
+ onClick: "copyPasteElement",
397
+ styleDefault: true
398
+ }
399
+ }
400
+ }
318
401
  }
319
402
  ]
320
403
  }
321
404
  ]
322
405
  },
323
406
  {
324
- type: "Control",
325
- scope: "#/properties/btn",
326
- options: {
327
- widget: "EmptyBox"
328
- },
407
+ type: "HorizontalLayout",
329
408
  config: {
330
- layout: { xs: 8, sm: 10 }
331
- }
409
+ layout: { xs: 12, sm: 9 }
410
+ },
411
+ elements: [
412
+ {
413
+ type: "Control",
414
+ scope: "#/properties/RemoveItemButton",
415
+ options: {
416
+ widget: "IconButton"
417
+ },
418
+ config: {
419
+ layout: { xs: 1, sm: 1 },
420
+ main: {
421
+ onClick: "RemoveItemButton",
422
+ size: "large",
423
+ icon: "RejectIcon",
424
+ styleDefault: true
425
+ },
426
+ style: {
427
+ marginLeft: "-5px"
428
+ }
429
+ }
430
+ },
431
+ {
432
+ type: "Control",
433
+ scope: "#/properties/copiedElementDetails",
434
+ options: {
435
+ widget: "Box"
436
+ },
437
+ config: {
438
+ layout: { xs: 6, sm: 6 },
439
+ main: {
440
+ heading: "No element copied"
441
+ },
442
+ style: {
443
+ color: "#535557",
444
+ marginLeft: "-30px"
445
+ }
446
+ }
447
+ },
448
+ {
449
+ type: "Control",
450
+ scope: "#/properties/EmptyBox",
451
+ options: {
452
+ widget: "EmptyBox"
453
+ },
454
+ config: {
455
+ layout: { xs: 1, sm: 5 }
456
+ }
457
+ }
458
+ ]
332
459
  },
333
460
  {
334
461
  type: "Control",
@@ -6415,7 +6542,10 @@ const ComponentSchema = {
6415
6542
  name: {
6416
6543
  type: "string"
6417
6544
  },
6418
- label: { type: "string" }
6545
+ label: { type: "string" },
6546
+ RemoveItemButton: {
6547
+ disabled: true
6548
+ }
6419
6549
  },
6420
6550
  required: ["name"]
6421
6551
  };
@@ -6590,6 +6720,96 @@ const componentBasicUiSchema = (theme) => {
6590
6720
  }
6591
6721
  ]
6592
6722
  },
6723
+ {
6724
+ type: "HorizontalLayout",
6725
+ config: {
6726
+ layout: { xs: 12, sm: 6 }
6727
+ },
6728
+ elements: [
6729
+ {
6730
+ type: "Control",
6731
+ scope: "#/properties/RemoveItemButton",
6732
+ options: {
6733
+ widget: "IconButton"
6734
+ },
6735
+ config: {
6736
+ layout: { xs: 1, sm: 1 },
6737
+ main: {
6738
+ onClick: "RemoveItemButton",
6739
+ size: "large",
6740
+ icon: "RejectIcon",
6741
+ styleDefault: true
6742
+ },
6743
+ style: {
6744
+ marginLeft: "-10px"
6745
+ }
6746
+ }
6747
+ },
6748
+ {
6749
+ type: "Control",
6750
+ scope: "#/properties/copiedElementDetails",
6751
+ options: {
6752
+ widget: "Box"
6753
+ },
6754
+ config: {
6755
+ layout: { xs: 6, sm: 6 },
6756
+ main: {
6757
+ heading: "No element copied"
6758
+ },
6759
+ style: {
6760
+ color: "#535557",
6761
+ marginLeft: "-10px"
6762
+ }
6763
+ }
6764
+ },
6765
+ {
6766
+ type: "Control",
6767
+ scope: "#/properties/EmptyBox",
6768
+ options: {
6769
+ widget: "EmptyBox"
6770
+ },
6771
+ config: {
6772
+ layout: { xs: 1, sm: 5 }
6773
+ }
6774
+ }
6775
+ ]
6776
+ },
6777
+ {
6778
+ type: "Control",
6779
+ scope: "#/properties/btn",
6780
+ options: {
6781
+ widget: "Button"
6782
+ },
6783
+ config: {
6784
+ layout: { xs: 4, sm: 2 },
6785
+ main: {
6786
+ name: "Ok",
6787
+ startIcon: "ApproveIcon",
6788
+ variant: "contained",
6789
+ type: "text",
6790
+ onClick: "okHandler",
6791
+ size: "medium"
6792
+ }
6793
+ }
6794
+ },
6795
+ {
6796
+ type: "Control",
6797
+ scope: "#/properties/btnSubmit",
6798
+ options: {
6799
+ widget: "Button"
6800
+ },
6801
+ config: {
6802
+ layout: { xs: 4, sm: 2 },
6803
+ main: {
6804
+ name: "Save & Exit",
6805
+ startIcon: "ApproveIcon",
6806
+ variant: "contained",
6807
+ type: "text",
6808
+ onClick: "saveHandler",
6809
+ size: "medium"
6810
+ }
6811
+ }
6812
+ },
6593
6813
  {
6594
6814
  type: "Control",
6595
6815
  scope: "#/properties/popUpComponentSection",
@@ -6772,52 +6992,6 @@ const componentBasicUiSchema = (theme) => {
6772
6992
  }
6773
6993
  ]
6774
6994
  },
6775
- {
6776
- type: "Control",
6777
- scope: "#/properties/EmptyBox",
6778
- options: {
6779
- widget: "EmptyBox"
6780
- },
6781
- config: {
6782
- layout: { xs: 4, sm: 8 }
6783
- }
6784
- },
6785
- {
6786
- type: "Control",
6787
- scope: "#/properties/btn",
6788
- options: {
6789
- widget: "Button"
6790
- },
6791
- config: {
6792
- layout: { xs: 4, sm: 2 },
6793
- main: {
6794
- name: "Ok",
6795
- startIcon: "ApproveIcon",
6796
- variant: "contained",
6797
- type: "text",
6798
- onClick: "okHandler",
6799
- size: "medium"
6800
- }
6801
- }
6802
- },
6803
- {
6804
- type: "Control",
6805
- scope: "#/properties/btnSubmit",
6806
- options: {
6807
- widget: "Button"
6808
- },
6809
- config: {
6810
- layout: { xs: 4, sm: 2 },
6811
- main: {
6812
- name: "Save & Exit",
6813
- startIcon: "ApproveIcon",
6814
- variant: "contained",
6815
- type: "text",
6816
- onClick: "saveHandler",
6817
- size: "medium"
6818
- }
6819
- }
6820
- },
6821
6995
  {
6822
6996
  type: "Control",
6823
6997
  scope: "#/properties/notify",
@@ -7098,6 +7272,27 @@ const EventSection = (theme) => {
7098
7272
  }
7099
7273
  }
7100
7274
  }
7275
+ },
7276
+ {
7277
+ widget: {
7278
+ type: "Control",
7279
+ scope: "#/properties/Paste_Event",
7280
+ options: {
7281
+ widget: "IconButton"
7282
+ },
7283
+ config: {
7284
+ main: {
7285
+ onClick: "copyPasteElement",
7286
+ size: "small",
7287
+ icon: "PasteIcon",
7288
+ iconLabel: "Paste",
7289
+ styleDefault: true
7290
+ },
7291
+ style: {
7292
+ mt: "6px"
7293
+ }
7294
+ }
7295
+ }
7101
7296
  }
7102
7297
  ]
7103
7298
  },
@@ -7157,6 +7352,26 @@ const EventSection = (theme) => {
7157
7352
  }
7158
7353
  }
7159
7354
  }
7355
+ },
7356
+ {
7357
+ header: "Copy",
7358
+ field: "Copy_Event",
7359
+ flex: 1,
7360
+ widget: {
7361
+ type: "Control",
7362
+ scope: "#/properties/Copy_Event",
7363
+ options: {
7364
+ widget: "IconButton"
7365
+ },
7366
+ config: {
7367
+ main: {
7368
+ icon: "FileCopyIcon",
7369
+ onClick: "copyPasteElement",
7370
+ tooltipMessage: "Reject This Record",
7371
+ styleDefault: true
7372
+ }
7373
+ }
7374
+ }
7160
7375
  }
7161
7376
  ]
7162
7377
  }
@@ -7685,6 +7900,27 @@ const TableSection = (theme) => {
7685
7900
  }
7686
7901
  }
7687
7902
  }
7903
+ },
7904
+ {
7905
+ widget: {
7906
+ type: "Control",
7907
+ scope: "#/properties/Paste_Component",
7908
+ options: {
7909
+ widget: "IconButton"
7910
+ },
7911
+ config: {
7912
+ main: {
7913
+ onClick: "copyPasteElement",
7914
+ size: "small",
7915
+ icon: "PasteIcon",
7916
+ iconLabel: "Paste",
7917
+ styleDefault: true
7918
+ },
7919
+ style: {
7920
+ mt: "6px"
7921
+ }
7922
+ }
7923
+ }
7688
7924
  }
7689
7925
  ]
7690
7926
  },
@@ -7744,6 +7980,26 @@ const TableSection = (theme) => {
7744
7980
  }
7745
7981
  }
7746
7982
  }
7983
+ },
7984
+ {
7985
+ header: "Copy",
7986
+ field: "Copy_Component",
7987
+ flex: 1,
7988
+ widget: {
7989
+ type: "Control",
7990
+ scope: "#/properties/Copy_Component",
7991
+ options: {
7992
+ widget: "IconButton"
7993
+ },
7994
+ config: {
7995
+ main: {
7996
+ icon: "FileCopyIcon",
7997
+ onClick: "copyPasteElement",
7998
+ styleDefault: true,
7999
+ disabled: false
8000
+ }
8001
+ }
8002
+ }
7747
8003
  }
7748
8004
  ]
7749
8005
  }
@@ -8035,7 +8291,7 @@ const sectionLabels = {
8035
8291
  TreeMap: ["Core", "Components", "Properties", "Event", "Style"],
8036
8292
  ColumnGroup: ["Core", "Components"]
8037
8293
  };
8038
- const refreshPage = (type, store2) => {
8294
+ function refreshPage(type, store2) {
8039
8295
  var _a;
8040
8296
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
8041
8297
  if (type) {
@@ -8052,8 +8308,11 @@ const refreshPage = (type, store2) => {
8052
8308
  UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
8053
8309
  UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
8054
8310
  }
8311
+ if (sessionStorage.getItem("copiedConfig")) {
8312
+ this.ElementPathSetter(UiSchema);
8313
+ }
8055
8314
  store2.setUiSchema(UiSchema);
8056
- };
8315
+ }
8057
8316
  var Component = (store2, dynamicData2, submitHandler, service2) => {
8058
8317
  return {
8059
8318
  setPage: async function() {
@@ -8070,7 +8329,11 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8070
8329
  return getFormdataFromSessionStorage(path);
8071
8330
  },
8072
8331
  getSchema: function() {
8073
- return ComponentSchema;
8332
+ const schema2 = _.cloneDeep(ComponentSchema);
8333
+ if (sessionStorage.getItem("copiedConfig")) {
8334
+ schema2.properties.RemoveItemButton.disabled = false;
8335
+ }
8336
+ return schema2;
8074
8337
  },
8075
8338
  okHandler: () => okHandler(store2),
8076
8339
  saveHandler: async () => await saveHandler(store2, service2, submitHandler, "PageMaster"),
@@ -8165,6 +8428,78 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8165
8428
  const rowId = dynamicData2.path.split(".")[1];
8166
8429
  sessionStorage.setItem("rowId", rowId);
8167
8430
  store2.updateDialog("popUpEventSection");
8431
+ },
8432
+ copyPasteElement: function(paramStore, setPage = this.setPage.bind(this)) {
8433
+ var _a;
8434
+ const [actionType, elementType] = (_a = dynamicData2.path.split(".").pop()) == null ? void 0 : _a.split("_");
8435
+ actionType === "Copy" ? this.CopyElement(paramStore, elementType) : this.PasteElement(setPage, elementType);
8436
+ },
8437
+ CopyElement: function(paramStore = store2, elementType) {
8438
+ var _a;
8439
+ const schema2 = lodash.exports.cloneDeep(paramStore.schema);
8440
+ const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema);
8441
+ schema2.properties.RemoveItemButton.disabled = false;
8442
+ const rowId = dynamicData2.path.split(".")[1];
8443
+ const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8444
+ const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
8445
+ const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
8446
+ this.ElementPathSetter(uiSchema, copiedFormData);
8447
+ sessionStorage.setItem("copiedConfig", JSON.stringify(copiedFormData));
8448
+ store2.setSchema(schema2);
8449
+ store2.setUiSchema(uiSchema);
8450
+ },
8451
+ PasteElement: function(setPage, elementType) {
8452
+ var _a;
8453
+ if (!sessionStorage.getItem("copiedConfig")) {
8454
+ store2.setNotify({
8455
+ FailMessage: "No item has been copied.",
8456
+ Fail: true
8457
+ });
8458
+ return;
8459
+ }
8460
+ const pastedElementParentPath = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8461
+ const formData = getFormdataFromSessionStorage(pastedElementParentPath);
8462
+ const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
8463
+ const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
8464
+ const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
8465
+ const notificationMessages = {
8466
+ Event: "The pasted content is invalid; the event cannot be integrated into the component section.",
8467
+ Component: "The pasted content is invalid; the component cannot be integrated into the event section."
8468
+ };
8469
+ if (copiedConfig.Handler && elementType === "Component") {
8470
+ store2.setNotify({
8471
+ FailMessage: notificationMessages.Event,
8472
+ Fail: true
8473
+ });
8474
+ } else if (copiedConfig.name && elementType === "Event") {
8475
+ store2.setNotify({
8476
+ FailMessage: notificationMessages.Component,
8477
+ Fail: true
8478
+ });
8479
+ } else {
8480
+ saveFormdataInSessionStorage(copiedConfig, pastedElementPath);
8481
+ setPage();
8482
+ }
8483
+ },
8484
+ RemoveItemButton: function(paramStore = store2) {
8485
+ const schema2 = lodash.exports.cloneDeep(paramStore.schema);
8486
+ const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema);
8487
+ schema2.properties.RemoveItemButton.disabled = true;
8488
+ uiSchema.elements[2].elements[1].config.main.heading = `No element copied`;
8489
+ sessionStorage.removeItem("copiedConfig");
8490
+ store2.setSchema(schema2);
8491
+ store2.setUiSchema(uiSchema);
8492
+ },
8493
+ elementPathHandler: function(parentPath, rowId, elementType) {
8494
+ if (elementType === "Component") {
8495
+ return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
8496
+ }
8497
+ return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
8498
+ },
8499
+ ElementPathSetter: function(uiSchema, copiedFormData) {
8500
+ const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
8501
+ const elementHeading = formData.name ? `Copied Element: ${formData.name}` : `Event Type: ${formData.eventType} `;
8502
+ uiSchema.elements[2].elements[1].config.main.heading = elementHeading;
8168
8503
  }
8169
8504
  };
8170
8505
  };
@@ -8191,10 +8526,18 @@ var pageMaster = (funcParams) => {
8191
8526
  return config;
8192
8527
  },
8193
8528
  getUiSchema: function() {
8194
- return PageMasterUiSchema(store2.theme.myTheme);
8529
+ const UiSchema = _.cloneDeep(PageMasterUiSchema(store2.theme.myTheme));
8530
+ if (sessionStorage.getItem("copiedConfig")) {
8531
+ Component(store2, dynamicData2, submitHandler, service2).ElementPathSetter(UiSchema);
8532
+ }
8533
+ return UiSchema;
8195
8534
  },
8196
8535
  getSchema: () => {
8197
- return PageMasterSchema;
8536
+ const schema2 = _.cloneDeep(PageMasterSchema);
8537
+ if (sessionStorage.getItem("copiedConfig")) {
8538
+ schema2.properties.RemoveItemButton.disabled = false;
8539
+ }
8540
+ return schema2;
8198
8541
  },
8199
8542
  backHandler: () => {
8200
8543
  sessionStorage.removeItem("pageFormdata");
@@ -8258,6 +8601,12 @@ var pageMaster = (funcParams) => {
8258
8601
  const rowId = dynamicData2.path.split(".")[1];
8259
8602
  sessionStorage.setItem("rowId", rowId);
8260
8603
  store2.updateDialog("popUpPageMasterEvent");
8604
+ },
8605
+ copyPasteElement: function() {
8606
+ Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(store2, this.setPage.bind(this));
8607
+ },
8608
+ RemoveItemButton: function() {
8609
+ Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(store2);
8261
8610
  }
8262
8611
  };
8263
8612
  };
@@ -8346,6 +8695,9 @@ const EventSchema = {
8346
8695
  }
8347
8696
  }
8348
8697
  }
8698
+ },
8699
+ RemoveItemButton: {
8700
+ disabled: true
8349
8701
  }
8350
8702
  },
8351
8703
  required: ["eventType", "Handler"]
@@ -8445,6 +8797,27 @@ const EventUiSchema = (theme) => {
8445
8797
  }
8446
8798
  }
8447
8799
  }
8800
+ },
8801
+ {
8802
+ widget: {
8803
+ type: "Control",
8804
+ scope: "#/properties/Paste_Event",
8805
+ options: {
8806
+ widget: "IconButton"
8807
+ },
8808
+ config: {
8809
+ main: {
8810
+ onClick: "copyPasteElement",
8811
+ size: "small",
8812
+ icon: "PasteIcon",
8813
+ iconLabel: "Paste",
8814
+ styleDefault: true
8815
+ },
8816
+ style: {
8817
+ mt: "6px"
8818
+ }
8819
+ }
8820
+ }
8448
8821
  }
8449
8822
  ]
8450
8823
  },
@@ -8503,20 +8876,83 @@ const EventUiSchema = (theme) => {
8503
8876
  }
8504
8877
  }
8505
8878
  }
8879
+ },
8880
+ {
8881
+ header: "Copy",
8882
+ field: "Copy_Event",
8883
+ flex: 1,
8884
+ widget: {
8885
+ type: "Control",
8886
+ scope: "#/properties/Copy_Event",
8887
+ options: {
8888
+ widget: "IconButton"
8889
+ },
8890
+ config: {
8891
+ main: {
8892
+ icon: "FileCopyIcon",
8893
+ onClick: "copyPasteElement",
8894
+ styleDefault: true
8895
+ }
8896
+ }
8897
+ }
8506
8898
  }
8507
8899
  ]
8508
8900
  }
8509
8901
  ]
8510
8902
  },
8511
8903
  {
8512
- type: "Control",
8513
- scope: "#/properties/EmptyBox",
8514
- options: {
8515
- widget: "EmptyBox"
8516
- },
8904
+ type: "HorizontalLayout",
8517
8905
  config: {
8518
- layout: { xs: 4, sm: 8 }
8519
- }
8906
+ layout: { xs: 12, sm: 6 }
8907
+ },
8908
+ elements: [
8909
+ {
8910
+ type: "Control",
8911
+ scope: "#/properties/RemoveItemButton",
8912
+ options: {
8913
+ widget: "IconButton"
8914
+ },
8915
+ config: {
8916
+ layout: { xs: 1, sm: 1 },
8917
+ main: {
8918
+ onClick: "RemoveItemButton",
8919
+ size: "large",
8920
+ icon: "RejectIcon",
8921
+ styleDefault: true
8922
+ },
8923
+ style: {
8924
+ marginLeft: "-10px"
8925
+ }
8926
+ }
8927
+ },
8928
+ {
8929
+ type: "Control",
8930
+ scope: "#/properties/copiedElementDetails",
8931
+ options: {
8932
+ widget: "Box"
8933
+ },
8934
+ config: {
8935
+ layout: { xs: 6, sm: 6 },
8936
+ main: {
8937
+ heading: "No element copied"
8938
+ },
8939
+ style: {
8940
+ color: "#535557",
8941
+ marginLeft: "-10px"
8942
+ }
8943
+ }
8944
+ },
8945
+ {
8946
+ type: "Control",
8947
+ scope: "#/properties/EmptyBox",
8948
+ options: {
8949
+ widget: "EmptyBox"
8950
+ },
8951
+ config: {
8952
+ layout: { xs: 1, sm: 5 }
8953
+ }
8954
+ }
8955
+ ]
8520
8956
  },
8521
8957
  {
8522
8958
  type: "Control",
@@ -9050,6 +9486,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9050
9486
  ...functionsName
9051
9487
  ];
9052
9488
  }
9489
+ if (sessionStorage.getItem("copiedConfig")) {
9490
+ Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(uiSchema);
9491
+ }
9053
9492
  store22.setSchema(schema2);
9054
9493
  store22.setUiSchema(uiSchema);
9055
9494
  },
@@ -9058,7 +9497,11 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9058
9497
  return EventUiSchema;
9059
9498
  },
9060
9499
  getSchema: () => {
9061
- return EventSchema;
9500
+ const schema2 = _.cloneDeep(EventSchema);
9501
+ if (sessionStorage.getItem("copiedConfig")) {
9502
+ schema2.properties.RemoveItemButton.disabled = false;
9503
+ }
9504
+ return schema2;
9062
9505
  },
9063
9506
  okHandler: () => okHandler(store2),
9064
9507
  saveHandler: async () => await saveHandler(store2, service2, submitHandler, "PageMaster"),
@@ -9101,6 +9544,12 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9101
9544
  const rowId = dynamicData2.path.split(".")[1];
9102
9545
  sessionStorage.setItem("rowId", rowId);
9103
9546
  store2.updateDialog("popUpEvent");
9547
+ },
9548
+ copyPasteElement: function() {
9549
+ Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(store2, this.setPage.bind(this));
9550
+ },
9551
+ RemoveItemButton: function() {
9552
+ Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(store2);
9104
9553
  }
9105
9554
  };
9106
9555
  };
@@ -9898,7 +10347,7 @@ var leaderBoard = {
9898
10347
  scope: "#/properties/leaderBoard/properties/firstName",
9899
10348
  config: {
9900
10349
  main: {
9901
- heading: "No User"
10350
+ heading: "Satendra Raghav"
9902
10351
  },
9903
10352
  style: {
9904
10353
  objectFit: "cover",
@@ -9926,7 +10375,7 @@ var leaderBoard = {
9926
10375
  scope: "#/properties/leaderBoard/properties/secondName",
9927
10376
  config: {
9928
10377
  main: {
9929
- heading: "No User"
10378
+ heading: "Satendra Raghav"
9930
10379
  },
9931
10380
  style: {
9932
10381
  objectFit: "cover",
@@ -9953,7 +10402,7 @@ var leaderBoard = {
9953
10402
  scope: "#/properties/leaderBoard/properties/thirdName",
9954
10403
  config: {
9955
10404
  main: {
9956
- heading: "No User"
10405
+ heading: "Satendra Raghav"
9957
10406
  },
9958
10407
  style: {
9959
10408
  objectFit: "cover",
@@ -10108,18 +10557,15 @@ var leaderBoard = {
10108
10557
  fontWeight: 900,
10109
10558
  background: "rgb(179, 198, 255)"
10110
10559
  },
10111
- top: { xs: "100px", sm: "200px", md: "390px", lg: "390px" },
10560
+ top: { xs: "300px", sm: "300px", md: "390px", lg: "390px" },
10112
10561
  border: "2px solid rgb(179, 198, 255)",
10113
10562
  width: "95%",
10114
10563
  left: "2.5%",
10115
10564
  margin: "auto"
10116
10565
  },
10117
10566
  main: {
10118
- disableColumnFilter: true,
10119
10567
  disableAction: true,
10120
- disableSelection: true,
10121
- disableGlobalSearch: true,
10122
- disableSorting: true
10568
+ disableSelection: true
10123
10569
  }
10124
10570
  }
10125
10571
  }