impaktapps-ui-builder 0.0.962 → 0.0.963-CopyComponent.10

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 +308 -8
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +13 -13
  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/graph.d.ts +4 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +47 -2
  8. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -0
  9. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -0
  10. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +4 -0
  11. package/package.json +1 -1
  12. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +43 -38
  13. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +9 -0
  14. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +9 -0
  15. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +2 -0
  16. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +47 -0
  17. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +2 -2
  18. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +48 -1
  19. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +5 -1
  20. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +25 -3
  21. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +94 -1
  22. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +45 -0
  23. package/src/impaktapps-ui-builder/builder/services/component.ts +150 -1
  24. package/src/impaktapps-ui-builder/builder/services/event.ts +26 -2
  25. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +38 -0
@@ -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
  },
@@ -224,6 +245,25 @@ const PageMasterUiSchema = (theme) => {
224
245
  }
225
246
  }
226
247
  }
248
+ },
249
+ {
250
+ header: "Copy",
251
+ field: "Copy_Component",
252
+ flex: 1,
253
+ widget: {
254
+ type: "Control",
255
+ scope: "#/properties/CopyComponent",
256
+ options: {
257
+ widget: "IconButton"
258
+ },
259
+ config: {
260
+ main: {
261
+ icon: "FileCopyIcon",
262
+ onClick: "CopyComponent",
263
+ styleDefault: true
264
+ }
265
+ }
266
+ }
227
267
  }
228
268
  ]
229
269
  },
@@ -257,6 +297,27 @@ const PageMasterUiSchema = (theme) => {
257
297
  }
258
298
  }
259
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
+ }
260
321
  }
261
322
  ]
262
323
  },
@@ -315,6 +376,25 @@ const PageMasterUiSchema = (theme) => {
315
376
  }
316
377
  }
317
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
+ }
318
398
  }
319
399
  ]
320
400
  }
@@ -6415,7 +6495,10 @@ const ComponentSchema = {
6415
6495
  name: {
6416
6496
  type: "string"
6417
6497
  },
6418
- label: { type: "string" }
6498
+ label: { type: "string" },
6499
+ CopyComponent: {
6500
+ disabled: false
6501
+ }
6419
6502
  },
6420
6503
  required: ["name"]
6421
6504
  };
@@ -6774,12 +6857,18 @@ const componentBasicUiSchema = (theme) => {
6774
6857
  },
6775
6858
  {
6776
6859
  type: "Control",
6777
- scope: "#/properties/EmptyBox",
6860
+ scope: "#/properties/copiedElementDetails",
6778
6861
  options: {
6779
- widget: "EmptyBox"
6862
+ widget: "Box"
6780
6863
  },
6781
6864
  config: {
6782
- layout: { xs: 4, sm: 8 }
6865
+ layout: { xs: 4, sm: 8 },
6866
+ main: {
6867
+ heading: ""
6868
+ },
6869
+ style: {
6870
+ float: "left"
6871
+ }
6783
6872
  }
6784
6873
  },
6785
6874
  {
@@ -7098,6 +7187,27 @@ const EventSection = (theme) => {
7098
7187
  }
7099
7188
  }
7100
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
+ }
7101
7211
  }
7102
7212
  ]
7103
7213
  },
@@ -7157,6 +7267,26 @@ const EventSection = (theme) => {
7157
7267
  }
7158
7268
  }
7159
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
+ }
7160
7290
  }
7161
7291
  ]
7162
7292
  }
@@ -7534,6 +7664,8 @@ const buildPropertiesSection = function(type) {
7534
7664
  getSelectField("graphType", "Graph Type"),
7535
7665
  getInputField("leftLabel", "Left Label"),
7536
7666
  getInputField("bottomLabel", "Bottom Label"),
7667
+ getInputField("leftLabelMargin", "Left Label Margin"),
7668
+ getInputField("leftLabelOffset", "Left Label Offset"),
7537
7669
  emptyBox$1("GraphEmpty1", { xs: 6, sm: 0, md: 0, lg: 0 }),
7538
7670
  getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
7539
7671
  getInputField("yAxisValue", "Y-AxisValue"),
@@ -7683,6 +7815,27 @@ const TableSection = (theme) => {
7683
7815
  }
7684
7816
  }
7685
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
+ }
7686
7839
  }
7687
7840
  ]
7688
7841
  },
@@ -7742,6 +7895,25 @@ const TableSection = (theme) => {
7742
7895
  }
7743
7896
  }
7744
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
+ }
7745
7917
  }
7746
7918
  ]
7747
7919
  }
@@ -8163,6 +8335,62 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8163
8335
  const rowId = dynamicData2.path.split(".")[1];
8164
8336
  sessionStorage.setItem("rowId", rowId);
8165
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[5].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
+ }
8166
8394
  }
8167
8395
  };
8168
8396
  };
@@ -8256,7 +8484,11 @@ var pageMaster = (funcParams) => {
8256
8484
  const rowId = dynamicData2.path.split(".")[1];
8257
8485
  sessionStorage.setItem("rowId", rowId);
8258
8486
  store2.updateDialog("popUpPageMasterEvent");
8259
- }
8487
+ },
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
8260
8492
  };
8261
8493
  };
8262
8494
  const EventSchema = {
@@ -8443,6 +8675,27 @@ const EventUiSchema = (theme) => {
8443
8675
  }
8444
8676
  }
8445
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
+ }
8446
8699
  }
8447
8700
  ]
8448
8701
  },
@@ -8501,6 +8754,25 @@ const EventUiSchema = (theme) => {
8501
8754
  }
8502
8755
  }
8503
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
+ }
8504
8776
  }
8505
8777
  ]
8506
8778
  }
@@ -9099,7 +9371,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9099
9371
  const rowId = dynamicData2.path.split(".")[1];
9100
9372
  sessionStorage.setItem("rowId", rowId);
9101
9373
  store2.updateDialog("popUpEvent");
9102
- }
9374
+ },
9375
+ CopyEvent: Component(store2, dynamicData2, submitHandler, service2).CopyEvent,
9376
+ PasteEvent: Component(store2, dynamicData2, submitHandler, service2).PasteEvent
9103
9377
  };
9104
9378
  };
9105
9379
  const downloadFile$1 = (obj) => {
@@ -10220,7 +10494,7 @@ const BarGraph = {
10220
10494
  },
10221
10495
  config: {
10222
10496
  main: {},
10223
- style: { containerStyle: {} }
10497
+ style: { containerStyle: {}, labelStyle: {} }
10224
10498
  }
10225
10499
  };
10226
10500
  const PieGraph = {
@@ -10281,7 +10555,9 @@ const HorizontalBarGraph = {
10281
10555
  main: {
10282
10556
  type: "HorizontalBarGraph"
10283
10557
  },
10284
- style: {}
10558
+ style: {
10559
+ labelStyle: {}
10560
+ }
10285
10561
  }
10286
10562
  };
10287
10563
  const buildHorizontalBarGraph = (config, componentScope) => {
@@ -10315,6 +10591,14 @@ const buildHorizontalBarGraph = (config, componentScope) => {
10315
10591
  if (config.leftLabel) {
10316
10592
  horizontalBarGraph.config.main.leftLabel = config.leftLabel;
10317
10593
  }
10594
+ if (config.leftLabelMargin) {
10595
+ horizontalBarGraph.config.style.labelStyle.margin = {
10596
+ left: config.leftLabelMargin
10597
+ };
10598
+ }
10599
+ if (config.leftLabelOffset) {
10600
+ horizontalBarGraph.config.style.labelStyle.leftLabelOffset = config.leftLabelOffset;
10601
+ }
10318
10602
  return horizontalBarGraph;
10319
10603
  };
10320
10604
  var SpeedoMeter = {
@@ -10467,6 +10751,14 @@ const buildStackbarGraph = (config, componentScope) => {
10467
10751
  if (config.leftLabel) {
10468
10752
  barGraph.config.main.leftLabel = config.leftLabel;
10469
10753
  }
10754
+ if (config.leftLabelMargin) {
10755
+ barGraph.config.style.labelStyle.margin = {
10756
+ left: config.leftLabelMargin
10757
+ };
10758
+ }
10759
+ if (config.leftLabelOffset) {
10760
+ barGraph.config.style.labelStyle.leftLabelOffset = config.leftLabelOffset;
10761
+ }
10470
10762
  barGraph.scope = componentScope;
10471
10763
  return barGraph;
10472
10764
  };
@@ -11315,6 +11607,14 @@ const buildLineGraph = (config, componentScope) => {
11315
11607
  if (config.pieArcColors) {
11316
11608
  lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
11317
11609
  }
11610
+ if (config.leftLabelMargin) {
11611
+ lineGraph.config.style.labelStyle.margin = {
11612
+ left: config.leftLabelMargin
11613
+ };
11614
+ }
11615
+ if (config.leftLabelOffset) {
11616
+ lineGraph.config.style.labelStyle.leftLabelOffset = config.leftLabelOffset;
11617
+ }
11318
11618
  lineGraph.scope = componentScope;
11319
11619
  return lineGraph;
11320
11620
  };